Public API¶
- sire.convert.biosimspace_to_sire(obj, map=None)[source]¶
Convert the passed BioSimSpace object (either a Molecule or list of Molecules) to a sire equivalent
- sire.convert.gemmi_to_sire(obj, map=None)[source]¶
Convert the passed gemmi Structure to the sire equivalent
- sire.convert.openmm_to_sire(obj, map=None)[source]¶
Convert the passed OpenMM.System to the sire equivalent
- sire.convert.rdkit_to_sire(obj, map=None)[source]¶
Convert the passed rdkit object (either a molecule or list of molecules) to the sire equivalent
- sire.convert.sire_to_biosimspace(obj, map=None)[source]¶
Convert the passed sire object (either a molecule or list of molecules) to a BioSimSpace equivalent
- sire.convert.sire_to_gemmi(obj, map=None)[source]¶
Convert the passed sire object to a gemmi structure
- sire.convert.sire_to_openmm(obj, map=None)[source]¶
Convert the passed sire object (either a molecule or list of molecules) to an OpenMM equivalent
- sire.convert.sire_to_rdkit(obj, map=None)[source]¶
Convert the passed sire object (either a molecule or list of molecules) to a rdkit equivalent
- sire.convert.supported_formats()[source]¶
Return the current supported object formats for conversion
- sire.convert.to(obj, format: str = 'sire', map=None)[source]¶
Convert the passed object from its current object format to the specified object format (default “sire”). Typically this will be converting from, e.g. a BioSimSpace, OpenMM or rdkit molecule to a sire molecule (or from a list of molecules to a SelectorMol).
- Parameters:
obj – The input object to convert
format – str (default “sire”) The format to convert to
map – The property map to use for the conversion
- sire.convert.to_biosimspace(obj, map=None)[source]¶
Convert the passed object from its current object format to a BioSimSpace object format.
- sire.convert.to_openmm(obj, map=None)[source]¶
Convert the passed object from its current object format to an openmm object format.
- sire.convert.to_rdkit(obj, map=None)[source]¶
Convert the passed object from its current object format to a rdkit object format.
- sire.convert.to_sire(obj, map=None)[source]¶
Convert the passed object from its current object format to a sire object format. Typically this will be converting from, e.g. an openmm or rdkit molecule to a sire molecule (or from a list of molecules to a SelectorMol).
- class sire.convert.openmm.LambdaLever¶
This is a lever that is used to change the parameters in an OpenMM context according to a lambda value. This is actually a collection of levers, each of which is controlled by the main lever.
You can use SireCAS expressions to control how each lever changes each parameter
- add_lever()¶
addLever( (LambdaLever)arg1, (object)lever_name) -> None :
- C++ signature :
void addLever(SireOpenMM::LambdaLever {lvalue},QString)
- add_perturbable_molecule()¶
- addPerturbableMolecule( (LambdaLever)arg1, (object)molecule, (object)start_indicies [, (PropertyMap)map={}]) -> int :
- Add info for the passed perturbable OpenMMMolecule, returning
its index in the list of perturbable molecules
- C++ signature :
int addPerturbableMolecule(SireOpenMM::LambdaLever {lvalue},SireOpenMM::OpenMMMolecule,QHash<QString, int> [,SireBase::PropertyMap={}])
- add_restraint_index()¶
- addRestraintIndex( (LambdaLever)arg1, (object)force, (int)index) -> None :
- Add the index of a restraint force called restraint in the
OpenMM System. There can be multiple restraint forces with the same name
- C++ signature :
void addRestraintIndex(SireOpenMM::LambdaLever {lvalue},QString,int)
- assign((LambdaLever)arg1, (LambdaLever)other) LambdaLever : ¶
- C++ signature :
SireOpenMM::LambdaLever {lvalue} assign(SireOpenMM::LambdaLever {lvalue},SireOpenMM::LambdaLever)
- clone((LambdaLever)arg1) LambdaLever : ¶
- C++ signature :
SireOpenMM::LambdaLever clone(SireOpenMM::LambdaLever)
- get_force_index()¶
- getForceIndex( (LambdaLever)arg1, (object)name) -> int :
- Get the index of the force called name. Returns -1 if
there is no force with this name
- C++ signature :
int getForceIndex(SireOpenMM::LambdaLever {lvalue},QString)
- get_force_type()¶
- getForceType( (LambdaLever)arg1, (object)name, (object)system) -> object :
- Get the C++ type of the force called name. Returns an
empty string if there is no such force
- C++ signature :
QString getForceType(SireOpenMM::LambdaLever {lvalue},QString,OpenMM::System)
- get_lever_values()¶
- getLeverValues( (LambdaLever)arg1, (object)lambda_values, (PerturbableOpenMMMolecule)mol) -> PropertyList :
- Get all of the lever values that would be set for the passed
lambda values using the current context. This returns a PropertyList of columns, where each column is a PropertyMap with the column name and either double or QString array property of values.
This is designed to be used by a higher-level python function that will convert this output into, e.g. a pandas DataFrame
- C++ signature :
SireBase::PropertyList getLeverValues(SireOpenMM::LambdaLever {lvalue},QVector<double>,SireOpenMM::PerturbableOpenMMMolecule)
- get_perturbable_molecule_maps()¶
- getPerturbableMoleculeMaps( (LambdaLever)arg1) -> object :
- Return all of the property maps used to find the perturbable properties
of the perturbable molecules. This is indexed by molecule number
- C++ signature :
QHash<SireMol::MolNum, SireBase::PropertyMap> getPerturbableMoleculeMaps(SireOpenMM::LambdaLever {lvalue})
- get_restraints()¶
- getRestraints( (LambdaLever)arg1, (object)name, (object)system) -> object :
- Return the pointers to all of the forces from the passed System
are restraints called restraint. This returns an empty list if there are no restraints with this name
- C++ signature :
QList<OpenMM::Force*> getRestraints(SireOpenMM::LambdaLever {lvalue},QString,OpenMM::System {lvalue})
- get_schedule()¶
getSchedule( (LambdaLever)arg1) -> LambdaSchedule :
- C++ signature :
SireCAS::LambdaSchedule getSchedule(SireOpenMM::LambdaLever {lvalue})
- has_lever()¶
hasLever( (LambdaLever)arg1, (object)lever_name) -> bool :
- C++ signature :
bool hasLever(SireOpenMM::LambdaLever {lvalue},QString)
- set_constraint_indicies()¶
- setConstraintIndicies( (LambdaLever)arg1, (int)idx, (object)constraint_idxs) -> None :
- Set the constraint indicies for the perturbable molecule at
index mol_idx
- C++ signature :
void setConstraintIndicies(SireOpenMM::LambdaLever {lvalue},int,QVector<int>)
- set_exception_indicies()¶
- setExceptionIndicies( (LambdaLever)arg1, (int)idx, (object)ff, (object)exception_idxs) -> None :
- Set the exception indices for the perturbable molecule at
index mol_idx
- C++ signature :
void setExceptionIndicies(SireOpenMM::LambdaLever {lvalue},int,QString,QVector<boost::tuples::tuple<int, int, 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>>)
- set_force_index()¶
- setForceIndex( (LambdaLever)arg1, (object)force, (int)index) -> None :
- Set the index of the force called force in the OpenMM System.
There can only be one force with this name. Attempts to add a duplicate will cause an error to be raised.
- C++ signature :
void setForceIndex(SireOpenMM::LambdaLever {lvalue},QString,int)
- set_lambda()¶
- setLambda( (LambdaLever)arg1, (object)system, (float)lambda_value [, (bool)update_constraints=True]) -> float :
- Set the value of lambda in the passed context. Returns the
actual value of lambda set.
- C++ signature :
double setLambda(SireOpenMM::LambdaLever {lvalue},OpenMM::Context {lvalue},double [,bool=True])
- set_schedule()¶
setSchedule( (LambdaLever)arg1, (LambdaSchedule)schedule) -> None :
- C++ signature :
void setSchedule(SireOpenMM::LambdaLever {lvalue},SireCAS::LambdaSchedule)
- typename()¶
typeName() -> str :
- C++ signature :
char const* typeName()
- what((LambdaLever)arg1) str : ¶
- C++ signature :
char const* what(SireOpenMM::LambdaLever {lvalue})
- class sire.convert.openmm.OpenMMMetaData¶
This is a read-only container for the extra information we need to create an OpenMM system and make it editable
This is used for a number of things:
1. For an array of OpenMM::Vec3 objects (e.g. coordinates or velocities). This is used internally to return coordinate and velocity data up to Python, so that it can be passed back down again to populate the openmm.Context
2. Index - this is a SelectorM<Atom> in the order that the atoms appear in the system. This lets us easily locate atoms by searching
3. LambdaLever - the simplest LambdaLever which can be used to update the parameters of the system containing perturbable atoms between the two end states
- box_vectors()¶
boxVectors( (OpenMMMetaData)arg1) -> vector_less__OpenMM_scope_Vec3__greater_ :
- C++ signature :
std::__1::vector<OpenMM::Vec3, std::__1::allocator<OpenMM::Vec3>> boxVectors(SireOpenMM::OpenMMMetaData {lvalue})
- clone((OpenMMMetaData)arg1) OpenMMMetaData : ¶
- C++ signature :
SireOpenMM::OpenMMMetaData clone(SireOpenMM::OpenMMMetaData)
- coordinates((OpenMMMetaData)arg1) vector_less__OpenMM_scope_Vec3__greater_ : ¶
- C++ signature :
std::__1::vector<OpenMM::Vec3, std::__1::allocator<OpenMM::Vec3>> coordinates(SireOpenMM::OpenMMMetaData {lvalue})
- has_box_vectors()¶
hasBoxVectors( (OpenMMMetaData)arg1) -> bool :
- C++ signature :
bool hasBoxVectors(SireOpenMM::OpenMMMetaData {lvalue})
- has_coordinates()¶
hasCoordinates( (OpenMMMetaData)arg1) -> bool :
- C++ signature :
bool hasCoordinates(SireOpenMM::OpenMMMetaData {lvalue})
- has_velocities()¶
hasVelocities( (OpenMMMetaData)arg1) -> bool :
- C++ signature :
bool hasVelocities(SireOpenMM::OpenMMMetaData {lvalue})
- index((OpenMMMetaData)arg1) SelectorM_Atom_ : ¶
- C++ signature :
SireMol::SelectorM<SireMol::Atom> index(SireOpenMM::OpenMMMetaData {lvalue})
- lambda_lever()¶
lambdaLever( (OpenMMMetaData)arg1) -> LambdaLever :
- C++ signature :
SireOpenMM::LambdaLever lambdaLever(SireOpenMM::OpenMMMetaData {lvalue})
- to_string()¶
toString( (OpenMMMetaData)arg1) -> object :
- C++ signature :
QString toString(SireOpenMM::OpenMMMetaData {lvalue})
- typename()¶
typeName() -> str :
- C++ signature :
char const* typeName()
- velocities((OpenMMMetaData)arg1) vector_less__OpenMM_scope_Vec3__greater_ : ¶
- C++ signature :
std::__1::vector<OpenMM::Vec3, std::__1::allocator<OpenMM::Vec3>> velocities(SireOpenMM::OpenMMMetaData {lvalue})
- what((OpenMMMetaData)arg1) str : ¶
- C++ signature :
char const* what(SireOpenMM::OpenMMMetaData {lvalue})
- class sire.convert.openmm.PerturbableOpenMMMolecule¶
This class holds all of the information of an OpenMM molecule that can be perturbed using a LambdaSchedule. The data is held in easy-to-access arrays, with guarantees that the arrays are compatible and the data is aligned.
- angles((PerturbableOpenMMMolecule)arg1) object : ¶
- Return the angles which are perturbed, in the order they are
set in this perturbation
- C++ signature :
QList<SireMM::Angle> angles(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- assign((PerturbableOpenMMMolecule)arg1, (PerturbableOpenMMMolecule)other) PerturbableOpenMMMolecule : ¶
- C++ signature :
SireOpenMM::PerturbableOpenMMMolecule {lvalue} assign(SireOpenMM::PerturbableOpenMMMolecule {lvalue},SireOpenMM::PerturbableOpenMMMolecule)
- atoms((PerturbableOpenMMMolecule)arg1) object : ¶
- Return the atoms which are perturbed, in the order they are
set in this perturbation
- C++ signature :
QList<SireMol::Atom> atoms(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- bonds((PerturbableOpenMMMolecule)arg1) object : ¶
- Return the bonds which are perturbed, in the order they are
set in this perturbation
- C++ signature :
QList<SireMM::Bond> bonds(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- changed_angles(to_pandas: bool = True)¶
Return a list of the angles that change parameters in this perturbation
- Parameters:
to_pandas (bool, optional, default=True) – If True then the list of angles will be returned as a pandas DataFrame
- changed_atoms(to_pandas: bool = True)¶
Return a list of the atoms that change parameters in this perturbation
- Parameters:
to_pandas (bool, optional, default=True) – If True then the list of atoms will be returned as a pandas DataFrame
- changed_bonds(to_pandas: bool = True)¶
Return a list of the bonds that change parameters in this perturbation
- Parameters:
to_pandas (bool, optional, default=True) – If True then the list of bonds will be returned as a pandas DataFrame
- changed_constraints(to_pandas: bool = True)¶
Return a list of the constraints that change parameters in this perturbation
- Parameters:
to_pandas (bool, optional, default=True) – If True then the list of constraints will be returned as a pandas DataFrame
- changed_exceptions(to_pandas: bool = True)¶
Return a list of the exceptions that change parameters in this perturbation
- Parameters:
to_pandas (bool, optional, default=True) – If True then the list of exceptions will be returned as a pandas DataFrame
- changed_torsions(to_pandas: bool = True)¶
Return a list of the torsions that change parameters in this perturbation. Note that this combines the dihedrals and improper dihedrals into a single list.
- Parameters:
to_pandas (bool, optional, default=True) – If True then the list of torsions will be returned as a pandas DataFrame
- clone((PerturbableOpenMMMolecule)arg1) PerturbableOpenMMMolecule : ¶
- C++ signature :
SireOpenMM::PerturbableOpenMMMolecule clone(SireOpenMM::PerturbableOpenMMMolecule)
- get_alphas0()¶
- getAlphas0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the alpha parameters of the reference state
- C++ signature :
QVector<double> getAlphas0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_alphas1()¶
- getAlphas1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the alpha parameters of the perturbed state
- C++ signature :
QVector<double> getAlphas1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_angle_ks0()¶
- getAngleKs0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the angle k parameters of the reference state
- C++ signature :
QVector<double> getAngleKs0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_angle_ks1()¶
- getAngleKs1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the angle k parameters of the perturbed state
- C++ signature :
QVector<double> getAngleKs1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_angle_sizes0()¶
- getAngleSizes0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the angle size parameters of the reference state
- C++ signature :
QVector<double> getAngleSizes0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_angle_sizes1()¶
- getAngleSizes1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the angle size parameters of the perturbed state
- C++ signature :
QVector<double> getAngleSizes1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_bond_ks0()¶
- getBondKs0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the bond k parameters of the reference state
- C++ signature :
QVector<double> getBondKs0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_bond_ks1()¶
- getBondKs1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the bond k parameters of the perturbed state
- C++ signature :
QVector<double> getBondKs1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_bond_lengths0()¶
- getBondLengths0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the bond length parameters of the reference state
- C++ signature :
QVector<double> getBondLengths0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_bond_lengths1()¶
- getBondLengths1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the bond length parameters of the perturbed state
- C++ signature :
QVector<double> getBondLengths1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_charge_scales0()¶
- getChargeScales0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the coulomb intramolecular scale factors of the reference state
- C++ signature :
QVector<double> getChargeScales0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_charge_scales1()¶
- getChargeScales1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the coulomb intramolecular scale factors of the perturbed state
- C++ signature :
QVector<double> getChargeScales1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_charges0()¶
- getCharges0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the atom charges of the reference state
- C++ signature :
QVector<double> getCharges0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_charges1()¶
- getCharges1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the atom charges of the perturbed state
- C++ signature :
QVector<double> getCharges1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_constraint_indicies()¶
- getConstraintIndicies( (PerturbableOpenMMMolecule)arg1) -> object :
Return the indicies of the perturbable constraints
- C++ signature :
QVector<int> getConstraintIndicies(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_epsilons0()¶
- getEpsilons0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the LJ epsilon parameters of the reference state
- C++ signature :
QVector<double> getEpsilons0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_epsilons1()¶
- getEpsilons1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the LJ epsilon parameters of the perturbed state
- C++ signature :
QVector<double> getEpsilons1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_exception_atoms()¶
- getExceptionAtoms( (PerturbableOpenMMMolecule)arg1) -> object :
Return the indices of the atoms in the exceptions
- C++ signature :
QVector<boost::tuples::tuple<int, int, 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>> getExceptionAtoms(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_exception_indicies()¶
- getExceptionIndicies( (PerturbableOpenMMMolecule)arg1, (object)name) -> object :
- Return the global indexes of the exceptions in the non-bonded and
ghost-14 forces
- C++ signature :
QVector<boost::tuples::tuple<int, int, 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>> getExceptionIndicies(SireOpenMM::PerturbableOpenMMMolecule {lvalue},QString)
- get_from_ghost_idxs()¶
- getFromGhostIdxs( (PerturbableOpenMMMolecule)arg1) -> object :
- Return the indexes of the atoms that were ghosts in the
reference state
- C++ signature :
QSet<int> getFromGhostIdxs(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_kappas0()¶
- getKappas0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the kappa parameters of the reference state
- C++ signature :
QVector<double> getKappas0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_kappas1()¶
- getKappas1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the kappa parameters of the perturbed state
- C++ signature :
QVector<double> getKappas1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_lever_values(schedule=None, lambda_values=None, num_lambda: int = 101, to_pandas: bool = True)¶
Return the value of all of the parameters for this perturbable molecule at all of the specified values of lambda, given the passed lambda schedule. If no schedule is passed then a default morph will be used. Return this as a pandas DataFrame if ‘to_pandas’ is True
If a pandas DataFrame is returned then note the following two points:
1. Note that this function will only return the values of parameters that change during the morph. If a parameter does not change then it is not included.
2. Also note that columns are merged together if they have identical values. You can see which columns have been merged by looking at the “merged” attribute of the returned DataFrame (e.g. ‘df.attrs[“merged”]’)
Otherwise, the raw data is returned as a set of dictionaries with no additional processing.
- Parameters:
schedule (LambdaSchedule, optional, default=None) – The lambda schedule to use for the morph. If this is not passed then a default morph will be used
lambda_values (list[float], optional, default=None) – A list of lambda values to evaluate. If this is not passed then the lambda values will be auto-generated based on an even spacing between 0 and 1 of ‘num_lambda’ points
num_lambda (int, optional, default=101) – The number of lambda values to evaluate if ‘lambda_values’ is not passed
to_pandas (bool, optional, default=True) – Whether or not to return the result as a pandas DataFrame (defaults to True)
- Returns:
A pandas DataFrame containing the values of the parameters at each of the lambda values, or a dictionary containing the values of the parameters at each of the lambda values
- Return type:
pandas.DataFrame or dict
- get_lj_scales0()¶
- getLJScales0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the LJ intramolecular scale factors of the reference state
- C++ signature :
QVector<double> getLJScales0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_lj_scales1()¶
- getLJScales1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the LJ intramolecular scale factors of the perturbed state
- C++ signature :
QVector<double> getLJScales1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_perturbable_constraints()¶
- getPerturbableConstraints( (PerturbableOpenMMMolecule)arg1) -> object :
- Return three arrays containing the constraint indexes, and the
reference and perturbed values of the constraint lengths
- C++ signature :
boost::tuples::tuple<QVector<int>, QVector<double>, QVector<double>, 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> getPerturbableConstraints(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_perturbable_constraints_with_atoms()¶
- getPerturbableConstraintsWithAtoms( (PerturbableOpenMMMolecule)arg1) -> object :
- Return the atom indexes of all of the constraints, with
the constraint lengths at the two end states, in the order they appear in this molecule
- C++ signature :
QVector<boost::tuples::tuple<int, int, double, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>> getPerturbableConstraintsWithAtoms(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_sigmas0()¶
- getSigmas0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the LJ sigma parameters of the reference state
- C++ signature :
QVector<double> getSigmas0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_sigmas1()¶
- getSigmas1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the LJ sigma parameters of the perturbed state
- C++ signature :
QVector<double> getSigmas1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_to_ghost_idxs()¶
- getToGhostIdxs( (PerturbableOpenMMMolecule)arg1) -> object :
- Return the indexes of the atoms that are to be ghosted in the
perturbed state
- C++ signature :
QSet<int> getToGhostIdxs(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_torsion_ks0()¶
- getTorsionKs0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the torsion k parameters of the reference state
- C++ signature :
QVector<double> getTorsionKs0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_torsion_ks1()¶
- getTorsionKs1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the torsion k parameters of the perturbed state
- C++ signature :
QVector<double> getTorsionKs1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_torsion_periodicities0()¶
- getTorsionPeriodicities0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the torsion periodicity parameters of the reference state
- C++ signature :
QVector<signed char> getTorsionPeriodicities0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_torsion_periodicities1()¶
- getTorsionPeriodicities1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the torsion periodicity parameters of the perturbed state
- C++ signature :
QVector<signed char> getTorsionPeriodicities1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_torsion_phases0()¶
- getTorsionPhases0( (PerturbableOpenMMMolecule)arg1) -> object :
Return the torsion phase parameters of the reference state
- C++ signature :
QVector<double> getTorsionPhases0(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- get_torsion_phases1()¶
- getTorsionPhases1( (PerturbableOpenMMMolecule)arg1) -> object :
Return the torsion phase parameters of the perturbed state
- C++ signature :
QVector<double> getTorsionPhases1(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- is_ghost_atom()¶
- isGhostAtom( (PerturbableOpenMMMolecule)arg1, (int)atom) -> bool :
- Return true if the atom is a ghost atom in the
referenece or perturbed states
- C++ signature :
bool isGhostAtom(SireOpenMM::PerturbableOpenMMMolecule {lvalue},int)
- is_null()¶
- isNull( (PerturbableOpenMMMolecule)arg1) -> bool :
Return whether or not this is null
- C++ signature :
bool isNull(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- set_constraint_indicies()¶
- setConstraintIndicies( (PerturbableOpenMMMolecule)arg1, (object)constraint_idxs) -> None :
Set the indexes of perturbable constraints in the System
- C++ signature :
void setConstraintIndicies(SireOpenMM::PerturbableOpenMMMolecule {lvalue},QVector<int>)
- set_exception_indicies()¶
- setExceptionIndicies( (PerturbableOpenMMMolecule)arg1, (object)name, (object)exception_idxs) -> None :
- Set the global indexes of the exceptions in the non-bonded and
ghost-14 forces
- C++ signature :
void setExceptionIndicies(SireOpenMM::PerturbableOpenMMMolecule {lvalue},QString,QVector<boost::tuples::tuple<int, int, 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>>)
- to_string()¶
toString( (PerturbableOpenMMMolecule)arg1) -> object :
- C++ signature :
QString toString(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- torsions((PerturbableOpenMMMolecule)arg1) object : ¶
- Return the torsions which are perturbed, in the order they are
set in this perturbation. Note that this include both the normal dihedrals and the improper torsions (openmm internally treats them the same)
- C++ signature :
QList<SireMM::Dihedral> torsions(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- typename()¶
typeName() -> str :
- C++ signature :
char const* typeName()
- what((PerturbableOpenMMMolecule)arg1) str : ¶
- C++ signature :
char const* what(SireOpenMM::PerturbableOpenMMMolecule {lvalue})
- class sire.convert.openmm.SOMMContext(system=None, integrator=None, platform=None, metadata=None, map=None)[source]¶
This is a specialised version of an OpenMM Context class that provides extra information and functions to support the integration with sire.
Extra information includes an atom index (so we can map atom metadata to atom index in the openmm context) and a LambdaLever that can be used to morph a context between end states. There are extra functions that use this LambdaLever to set the lambda value of the context
- get_atom_index()[source]¶
Return the index mapping from atom metadata to its index in the openmm context
- get_constraints()[source]¶
Return all pairs of atoms that are constrained, together with the constraint distance
- get_lambda_lever()[source]¶
Return the LambdaLever used to change the lambda value of the parameters
- get_lambda_schedule()[source]¶
Return the LambdaSchedule used to control how different forcefield parameters will be changed with lambda
- get_platform_properties()[source]¶
Return all of the properties (and their values) of the platform used to run the simulation.
- get_potential_energy(to_sire_units: bool = True)[source]¶
Calculate and return the potential energy of the system
- set_lambda(lambda_value: float, update_constraints: bool = True)[source]¶
Update the parameters in the context to set the lambda value to ‘lamval’. If update_constraints is True then the constraints will be updated to match the new value of lambda
- set_lambda_schedule(schedule)[source]¶
Set the LambdaSchedule used to control how different forcefield parameters will be changed with lambda
- set_platform_property(key, value)[source]¶
Set the value of the platform property ‘key’ to ‘value’
Note that this probably doesn’t do anything as it looks like platform properties cannot be changed after construction. This function may be removed.