diff --git a/modules/mol/mm/doc/buildingblock.rst b/modules/mol/mm/doc/buildingblock.rst index 589b09801913e8ab464630a8a610518d64e94ade..2194e6c150de6713bbfbff505ffbb62d8231f91c 100644 --- a/modules/mol/mm/doc/buildingblock.rst +++ b/modules/mol/mm/doc/buildingblock.rst @@ -16,7 +16,7 @@ implementation. As a special case there also exist HydrogenConstructors. .. class:: BuildingBlock - .. method:: Match(residue, match_connectivity) + .. method:: Match(residue, [,match_connectivity=True]) Checks, wether the given residue matches the atom names in the BuildingBlock. The Connectivity gets optionally checked. @@ -44,7 +44,7 @@ implementation. As a special case there also exist HydrogenConstructors. residue - .. method:: AddAtom(name, type, charge, mass = None) + .. method:: AddAtom(name, type, charge,[,mass = None]) :param name: name of atom :param type: its corresponding forcefield type @@ -60,7 +60,7 @@ implementation. As a special case there also exist HydrogenConstructors. :param name: name of atom to be removed - .. method:: ReplaceAtom(name, new_name, new_type, new_charge, new_mass = None) + .. method:: ReplaceAtom(name, new_name, new_type, new_charge, [,new_mass = None]) Replace given atom with and resets type, charge and mass. All interactions containing that atom get adapted as well @@ -84,7 +84,7 @@ implementation. As a special case there also exist HydrogenConstructors. This gets indicated by an atom name prefixed by a *+* - .. method:: AddBond(bond, replace_existing = False) + .. method:: AddBond(bond, [,replace_existing = False]) :param bond: Bond to be added :param replace_existing: Whether potentially already existing bond for the @@ -94,7 +94,7 @@ implementation. As a special case there also exist HydrogenConstructors. :type replace_exisiting: bool - .. method:: AddAngle(angle, replace_existing = False) + .. method:: AddAngle(angle, [,replace_existing = False]) :param angle: Angle to be added :param replace_existing: Whether potentially already existing angle for the @@ -104,7 +104,7 @@ implementation. As a special case there also exist HydrogenConstructors. :type replace_exisiting: bool - .. method:: AddDihedral(dihedral, replace_existing = False) + .. method:: AddDihedral(dihedral, [,replace_existing = False]) :param dihedral: Dihedral to be added :param replace_existing: Whether potentially already existing dihedral for the @@ -114,7 +114,7 @@ implementation. As a special case there also exist HydrogenConstructors. :type replace_exisiting: bool - .. method:: AddImproper(improper, replace_existing = False) + .. method:: AddImproper(improper, [,replace_existing = False]) :param improper: Improper to be added :param replace_existing: Whether potentially already existing improper for the @@ -124,7 +124,7 @@ implementation. As a special case there also exist HydrogenConstructors. :type replace_exisiting: bool - .. method:: AddExclusion(exclusion, replace_existing = False) + .. method:: AddExclusion(exclusion, [,replace_existing = False]) :param exclusion: Exclusion to be added :param replace_existing: Whether potentially already existing Exclusion for the @@ -134,7 +134,7 @@ implementation. As a special case there also exist HydrogenConstructors. :type replace_exisiting: bool - .. method:: AddCMap(cmap, replace_existing = False) + .. method:: AddCMap(cmap, [,replace_existing = False]) :param cmap: CMap to be added :param replace_existing: Whether potentially already existing cmap for the @@ -144,7 +144,7 @@ implementation. As a special case there also exist HydrogenConstructors. :type replace_exisiting: bool - .. method:: AddConstraint(constraint, replace_existing = False) + .. method:: AddConstraint(constraint, [,replace_existing = False]) :param constraint: Constraint to be added :param replace_existing: Whether potentially already existing constraint for the @@ -188,33 +188,44 @@ implementation. As a special case there also exist HydrogenConstructors. :raises: :class:`RuntimeError` when atom can not be found in BuildingBlock + .. method:: GetAtoms() + :returns: :class:`list` of all atom names + + .. method:: GetTypes() + :returns: :class:`list` of all atom types + + .. method:: GetCharges() + :returns: :class:`list` of all charges + + .. method:: GetMasses() + :returns: :class:`list` of all masses .. method:: GetBonds() - :returns: list of all bonds + :returns: :class:`list` of all bonds .. method:: GetAngles() - :returns: list of all angles + :returns: :class:`list` of all angles .. method:: GetDihedrals() - :returns: list of all dihedrals + :returns: :class:`list` of all dihedrals .. method:: GetImpropers() - :returns: list of all impropers + :returns: :class:`list` of all impropers .. method:: GetCMaps() - :returns: list of all cmaps + :returns: :class:`list` of all cmaps .. method:: GetExclusions() - :returns: list of all exlusions + :returns: :class:`list` of all exlusions .. method:: GetConstraints() - :returns: list of all constraints + :returns: :class:`list` of all constraints Automated modification of :class:`BuildingBlock` and :class:`ResidueHandle` -------------------------------------------------------------------------------- @@ -272,35 +283,40 @@ Automated modification of :class:`BuildingBlock` and :class:`ResidueHandle` .. method:: AddBond(bond) Adds a bond, this only has effect on :class:`BuildingBlock`, not - on :class:`ResidueHandle` + on :class:`ResidueHandle` when the corresponding Apply function gets + called :param bond: :class:`Interaction` bond to be added .. method:: AddAngle(angle) Adds an angle, this only has effect on :class:`BuildingBlock`, not - on :class:`ResidueHandle` + on :class:`ResidueHandle` when the corresponding Apply function gets + called :param angle: :class:`Interaction` angle to be added .. method:: AddDihedral(dihedral) Adds a dihedral, this only has effect on :class:`BuildingBlock`, not - on :class:`ResidueHandle` + on :class:`ResidueHandle` when the corresponding Apply function gets + called :param dihedral: :class:`Interaction` dihedral to be added .. method:: AddImproper(improper) Adds an improper, this only has effect on :class:`BuildingBlock`, not - on :class:`ResidueHandle` + on :class:`ResidueHandle` when the corresponding Apply function gets + called :param improper: :class:`Interaction` improper to be added .. method:: AddCMap(cmap) Adds a cmap, this only has effect on :class:`BuildingBlock`, not - on :class:`ResidueHandle` + on :class:`ResidueHandle` when the corresponding Apply function gets + called :param cmap: :class:`Interaction` cmap to be added @@ -334,7 +350,7 @@ Automated modification of :class:`BuildingBlock` and :class:`ResidueHandle` :param anchors: :class:`list` of strings containing atom names used as anchor -.. class:: HeuristicHydrogenConstructor +.. class:: HeuristicHydrogenConstructor(block) As soon as we leave the well defined world of gromacs residue definitions, we have to find new ways for constructing hydrogens. The @@ -342,6 +358,9 @@ Automated modification of :class:`BuildingBlock` and :class:`ResidueHandle` initialization and builds heuristic rules to build hydrogens based on the connecticity defined in the given block. + :param block: :class:`BuildingBlock` from which the connectivity + information for hydrogen construction is extracted + .. method:: ApplyOnBuildingBlock(block) Guess what it does: !!ABSOLUTELY NOTHING!! just there for consistency diff --git a/modules/mol/mm/doc/forcefield.rst b/modules/mol/mm/doc/forcefield.rst index a5071a311eb34999882418536c5c758fe798a674..f8133f8c00db149c84a03716d055cb7bd03751bc 100644 --- a/modules/mol/mm/doc/forcefield.rst +++ b/modules/mol/mm/doc/forcefield.rst @@ -5,6 +5,8 @@ Forcefields The forcefields are a dump for interactions with their parameters, but also for atom specific information or residue definitions in form of a :class:`BuildingBlock`. +Objects for modifying residues can be set in form of :class:`BlockModifier` or +:class:`HydrogenConstructor`. They're also involved in the naming mess we're observing in the molecular mechanics community and contain definable renaming rules, that can be applied on an :class:`EntityHandle` for renaming from e.g. PDB standard to the forcefield @@ -475,7 +477,8 @@ The Forcefield Class :raises: :class:`RuntimeError` when no :class:`Interaction` matching given types can be found or when pair is true and no - appropriate lj_pair is set. + appropriate lj_pair is set + despite gen_pair flag being false. .. method:: GetConstraint(type1, type2) @@ -496,8 +499,8 @@ The Forcefield Class :returns: the mass - :raises: :class:`RuntimeError` no mass has been set for this - atom type has been set + :raises: :class:`RuntimeError` if no mass has been set for this + atom type .. method:: GetFudgeLJ() diff --git a/modules/mol/mm/doc/interaction.rst b/modules/mol/mm/doc/interaction.rst index b25b9d01e3c96447d3d0a144ad73946dd134cda9..8687fd7d58d4eaa0ee8b0d8eb74e94e7075d2b11 100644 --- a/modules/mol/mm/doc/interaction.rst +++ b/modules/mol/mm/doc/interaction.rst @@ -106,7 +106,7 @@ a harmonic angle) Returns the functype enum of the interaction - :returns: :enum:`~mol.mm.FuncType` + :returns: :enum:`mol.mm.FuncType` ..method:: ReplaceAtom(name, new_name, new_type) diff --git a/modules/mol/mm/pymod/export_block_modifiers.cc b/modules/mol/mm/pymod/export_block_modifiers.cc index 337e36ae2305ff8a2ba45eaaa198e6e6e9313207..f72a91b92ad4b3cbaa5eb71dbb5a77b17dbf5d5c 100644 --- a/modules/mol/mm/pymod/export_block_modifiers.cc +++ b/modules/mol/mm/pymod/export_block_modifiers.cc @@ -27,7 +27,7 @@ using namespace boost::python; namespace{ template<typename T> -std::vector<T> ListToVec(boost::python::list& l){ +std::vector<T> ListToVec(const boost::python::list& l){ std::vector<T> vec; for (int i = 0; i < boost::python::len(l); ++i){ vec.push_back(boost::python::extract<T>(l[i])); @@ -35,9 +35,21 @@ std::vector<T> ListToVec(boost::python::list& l){ return vec; } +void WrapAddAddRule(ost::mol::mm::GromacsBlockModifierPtr p, + int number, int method, + const boost::python::list& atom_names, + const boost::python::list& anchors, + const String& type, Real new_charge){ + std::vector<String> v_atom_names = ListToVec<String>(atom_names); + std::vector<String> v_anchors = ListToVec<String>(anchors); + + p->AddAddRule(number,method,v_atom_names,v_anchors,type,new_charge); + +} void WrapAddHydrogenRule(ost::mol::mm::GromacsHydrogenConstructorPtr p, int number, int method, - boost::python::list hydrogen_names, boost::python::list anchors){ + const boost::python::list& hydrogen_names, + const boost::python::list& anchors){ std::vector<String> v_hydrogen_names = ListToVec<String>(hydrogen_names); std::vector<String> v_anchors = ListToVec<String>(anchors); p->AddHydrogenRule(number,method,v_hydrogen_names,v_anchors); @@ -63,21 +75,21 @@ void export_BlockModifiers() ; class_<ost::mol::mm::GromacsBlockModifier, bases<ost::mol::mm::BlockModifier> >("GromacsBlockModifier", init<>()) - .def("ApplyOnBuildingBlock",&ost::mol::mm::GromacsBlockModifier::ApplyOnBuildingBlock) - .def("ApplyOnResidue",&ost::mol::mm::GromacsBlockModifier::ApplyOnResidue) - .def("AddReplaceRule",&ost::mol::mm::GromacsBlockModifier::AddReplaceRule) - .def("AddAddRule",&ost::mol::mm::GromacsBlockModifier::AddAddRule) - .def("AddBond",&ost::mol::mm::GromacsBlockModifier::AddBond) - .def("AddAngle",&ost::mol::mm::GromacsBlockModifier::AddAngle) - .def("AddDihedral",&ost::mol::mm::GromacsBlockModifier::AddDihedral) - .def("AddImproper",&ost::mol::mm::GromacsBlockModifier::AddImproper) - .def("AddCMap",&ost::mol::mm::GromacsBlockModifier::AddDeleteAtom) - .def("AddDeleteAtom",&ost::mol::mm::GromacsBlockModifier::AddDeleteAtom) + .def("ApplyOnBuildingBlock",&ost::mol::mm::GromacsBlockModifier::ApplyOnBuildingBlock,(arg("block"))) + .def("ApplyOnResidue",&ost::mol::mm::GromacsBlockModifier::ApplyOnResidue,(arg("residue"))) + .def("AddReplaceRule",&ost::mol::mm::GromacsBlockModifier::AddReplaceRule,(arg("name"),arg("new_name"),arg("new_type"),arg("new_charge"))) + .def("AddAddRule",&ost::mol::mm::GromacsBlockModifier::AddAddRule,(arg("number"),arg("method"),arg("atom_names"),arg("anchors"),arg("type"),arg("charge"))) + .def("AddBond",&ost::mol::mm::GromacsBlockModifier::AddBond,(arg("bond"))) + .def("AddAngle",&ost::mol::mm::GromacsBlockModifier::AddAngle,(arg("angle"))) + .def("AddDihedral",&ost::mol::mm::GromacsBlockModifier::AddDihedral,(arg("dihedral"))) + .def("AddImproper",&ost::mol::mm::GromacsBlockModifier::AddImproper,(arg("improper"))) + .def("AddCMap",&ost::mol::mm::GromacsBlockModifier::AddDeleteAtom,(arg("cmap"))) + .def("AddDeleteAtom",&ost::mol::mm::GromacsBlockModifier::AddDeleteAtom,(arg("name"))) ; class_<ost::mol::mm::HeuristicHydrogenConstructor, bases<ost::mol::mm::HydrogenConstructor> >("HeuristicHydrogenConstructor", init<ost::mol::mm::BuildingBlockPtr>()) - .def("ApplyOnBuildingBlock",&ost::mol::mm::HeuristicHydrogenConstructor::ApplyOnBuildingBlock) - .def("ApplyOnResidue",&ost::mol::mm::HeuristicHydrogenConstructor::ApplyOnResidue) + .def("ApplyOnBuildingBlock",&ost::mol::mm::HeuristicHydrogenConstructor::ApplyOnBuildingBlock,(arg("block"))) + .def("ApplyOnResidue",&ost::mol::mm::HeuristicHydrogenConstructor::ApplyOnResidue,(arg("residue"))) ; boost::python::register_ptr_to_python<ost::mol::mm::GromacsHydrogenConstructorPtr>(); diff --git a/modules/mol/mm/pymod/export_buildingblock.cc b/modules/mol/mm/pymod/export_buildingblock.cc index 6ea1f4e2e13277c5c8031653ad932bddefbb3052..aa85249aec4a4b2dcdf0be1b2205f810e5e539d7 100644 --- a/modules/mol/mm/pymod/export_buildingblock.cc +++ b/modules/mol/mm/pymod/export_buildingblock.cc @@ -17,6 +17,7 @@ // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ +#include <limits> #include <boost/python.hpp> #include <ost/mol/mm/buildingblock.hh> #include <ost/log.hh> @@ -74,14 +75,14 @@ void export_Buildingblock() { class_<ost::mol::mm::BuildingBlock>("BuildingBlock",init<>()) .def("Match",&WrapMatch,(arg("res"),arg("match_connectivity")=true)) - .def("Connect",&ost::mol::mm::BuildingBlock::Connect) + .def("Connect",&ost::mol::mm::BuildingBlock::Connect,(arg("residue"),arg("xcs_editor"))) .def("GetAtoms",&WrapGetAtoms) .def("GetTypes",&WrapGetTypes) .def("GetCharges",&WrapGetCharges) .def("GetMasses",&WrapGetMasses) - .def("GetType",&ost::mol::mm::BuildingBlock::GetType) - .def("GetCharge",&ost::mol::mm::BuildingBlock::GetCharge) - .def("GetMass",&ost::mol::mm::BuildingBlock::GetMass) + .def("GetType",&ost::mol::mm::BuildingBlock::GetType,(arg("name"))) + .def("GetCharge",&ost::mol::mm::BuildingBlock::GetCharge,(arg("name"))) + .def("GetMass",&ost::mol::mm::BuildingBlock::GetMass,(arg("name"))) .def("GetBonds",&ost::mol::mm::BuildingBlock::GetBonds) .def("GetAngles",&ost::mol::mm::BuildingBlock::GetAngles) .def("GetDihedrals",&ost::mol::mm::BuildingBlock::GetDihedrals) @@ -97,8 +98,8 @@ void export_Buildingblock() .def("AddExclusion",&ost::mol::mm::BuildingBlock::AddExclusion,(arg("exclusion"),arg("replace_existing")=false)) .def("AddCMap",&ost::mol::mm::BuildingBlock::AddBond,(arg("cmap"),arg("replace_existing")=false)) .def("AddConstraint",&ost::mol::mm::BuildingBlock::AddConstraint,(arg("constraint"),arg("replace_existing")=false)) - .def("RemoveAtom",&ost::mol::mm::BuildingBlock::RemoveAtom) - .def("ReplaceAtom",&ost::mol::mm::BuildingBlock::ReplaceAtom) + .def("RemoveAtom",&ost::mol::mm::BuildingBlock::RemoveAtom,(arg("name"))) + .def("ReplaceAtom",&ost::mol::mm::BuildingBlock::ReplaceAtom,(arg("name"),arg("new_name"),arg("new_type"),arg("new_charge"),arg("new_charge"),arg("new_mass")=std::numeric_limits<Real>::quiet_NaN())) .def("RemoveInteractionsToNext",&ost::mol::mm::BuildingBlock::RemoveInteractionsToNext) .def("RemoveInteractionsToPrev",&ost::mol::mm::BuildingBlock::RemoveInteractionsToPrev) ; diff --git a/modules/mol/mm/pymod/export_ff_reader.cc b/modules/mol/mm/pymod/export_ff_reader.cc index 8e64fb01db4ed00fc502d5f8906ff33bd4c4a2d0..b8a4fa6a894f9635a50d37c4b7c550941ecdd631 100644 --- a/modules/mol/mm/pymod/export_ff_reader.cc +++ b/modules/mol/mm/pymod/export_ff_reader.cc @@ -29,13 +29,13 @@ void export_FFReader() { class_<ost::mol::mm::FFReader>("FFReader",init<String>()) .def("ReadGromacsForcefield",&ost::mol::mm::FFReader::ReadGromacsForcefield) - .def("SetPreprocessorDefinition",&ost::mol::mm::FFReader::SetPreprocessorDefinition) + .def("SetPreprocessorDefinition",&ost::mol::mm::FFReader::SetPreprocessorDefinition,(arg("definition"))) .def("GetForcefield",&ost::mol::mm::FFReader::GetForcefield) - .def("SetForcefield",&ost::mol::mm::FFReader::SetForcefield) - .def("ReadResidueDatabase",&ost::mol::mm::FFReader::ReadResidueDatabase) - .def("ReadITP",&ost::mol::mm::FFReader::ReadITP) - .def("ReadCHARMMPRM",&ost::mol::mm::FFReader::ReadCHARMMPRM) - .def("ReadCHARMMRTF",&ost::mol::mm::FFReader::ReadCHARMMRTF) + .def("SetForcefield",&ost::mol::mm::FFReader::SetForcefield,(arg("forcefield"))) + .def("ReadResidueDatabase",&ost::mol::mm::FFReader::ReadResidueDatabase,(arg("basename"))) + .def("ReadITP",&ost::mol::mm::FFReader::ReadITP,(arg("basename"))) + .def("ReadCHARMMPRM",&ost::mol::mm::FFReader::ReadCHARMMPRM,(arg("basename"))) + .def("ReadCHARMMRTF",&ost::mol::mm::FFReader::ReadCHARMMRTF,(arg("basename"))) ; boost::python::register_ptr_to_python<ost::mol::mm::FFReaderPtr>(); diff --git a/modules/mol/mm/pymod/export_forcefield.cc b/modules/mol/mm/pymod/export_forcefield.cc index 666e2dca0cbc9e94ddfc113b69f30ad21b7947d1..7811fe3af9bba8f318a2c4e7fbfa0ee20ae5c28c 100644 --- a/modules/mol/mm/pymod/export_forcefield.cc +++ b/modules/mol/mm/pymod/export_forcefield.cc @@ -41,44 +41,44 @@ void export_Forcefield() { class_<ost::mol::mm::Forcefield>("Forcefield", init<>()) - .def("Load",&ost::mol::mm::Forcefield::Load).staticmethod("Load") - .def("Save",&ost::mol::mm::Forcefield::Save) - .def("GetBuildingBlock",&ost::mol::mm::Forcefield::GetBuildingBlock) - .def("GetAtomType",&ost::mol::mm::Forcefield::GetAtomType) - .def("GetHydrogenConstructor",&ost::mol::mm::Forcefield::GetHydrogenConstructor) + .def("Load",&ost::mol::mm::Forcefield::Load,(arg("filename"))).staticmethod("Load") + .def("Save",&ost::mol::mm::Forcefield::Save,(arg("filename"))) + .def("GetBuildingBlock",&ost::mol::mm::Forcefield::GetBuildingBlock,(arg("name"))) + .def("GetAtomType",&ost::mol::mm::Forcefield::GetAtomType,(arg("res_name"),arg("atom_name"))) + .def("GetHydrogenConstructor",&ost::mol::mm::Forcefield::GetHydrogenConstructor,arg("name")) .def("GetNTerModifier",&ost::mol::mm::Forcefield::GetNTerModifier,(arg("residue_name"),arg("ter_name")="")) .def("GetCTerModifier",&ost::mol::mm::Forcefield::GetCTerModifier,(arg("residue_name"),arg("ter_name")="")) - .def("GetBond",&ost::mol::mm::Forcefield::GetBond) - .def("GetAngle",&ost::mol::mm::Forcefield::GetAngle) - .def("GetDihedrals",&ost::mol::mm::Forcefield::GetDihedrals) - .def("GetImpropers",&ost::mol::mm::Forcefield::GetImpropers) - .def("GetCMap",&ost::mol::mm::Forcefield::GetCMap) - .def("GetImplicitGenborn",&ost::mol::mm::Forcefield::GetImplicitGenborn) - .def("GetLJ",&GetLJOneType) - .def("GetLJ",&GetLJTwoTypes) - .def("GetConstraint",&ost::mol::mm::Forcefield::GetConstraint) - .def("GetMass",&ost::mol::mm::Forcefield::GetMass) + .def("GetBond",&ost::mol::mm::Forcefield::GetBond,(arg("atom_type_1"),arg("atom_type_2"))) + .def("GetAngle",&ost::mol::mm::Forcefield::GetAngle,(arg("atom_type_1"),arg("atom_type_2"),arg("atom_type_3"))) + .def("GetDihedrals",&ost::mol::mm::Forcefield::GetDihedrals,(arg("atom_type_1"),arg("atom_type_2"),arg("atom_type_3"),arg("atom_type_4"))) + .def("GetImpropers",&ost::mol::mm::Forcefield::GetImpropers,(arg("atom_type_1"),arg("atom_type_2"),arg("atom_type_3"),arg("atom_type_4"))) + .def("GetCMap",&ost::mol::mm::Forcefield::GetCMap,(arg("atom_type_1"),arg("atom_type_2"),arg("atom_type_3"),arg("atom_type_4"),arg("atom_type_5"))) + .def("GetImplicitGenborn",&ost::mol::mm::Forcefield::GetImplicitGenborn,(arg("atom_type"))) + .def("GetLJ",&GetLJOneType,(arg("atom_type"))) + .def("GetLJ",&GetLJTwoTypes,(arg("atom_type_1"),arg("atom_type_2"))) + .def("GetConstraint",&ost::mol::mm::Forcefield::GetConstraint,(arg("atom_type_1"),arg("atom_type_2"))) + .def("GetMass",&ost::mol::mm::Forcefield::GetMass,(arg("atom_type"))) .def("GetFudgeLJ",&ost::mol::mm::Forcefield::GetFudgeLJ) .def("GetFudgeQQ",&ost::mol::mm::Forcefield::GetFudgeQQ) - .def("AddBuildingBlock",&ost::mol::mm::Forcefield::AddBuildingBlock) - .def("AddBond",&ost::mol::mm::Forcefield::AddBond) - .def("AddAngle",&ost::mol::mm::Forcefield::AddAngle) - .def("AddDihedral",&ost::mol::mm::Forcefield::AddDihedral) - .def("AddImproper",&ost::mol::mm::Forcefield::AddImproper) - .def("AddCMap",&ost::mol::mm::Forcefield::AddCMap) - .def("AddImplicitGenborn",&ost::mol::mm::Forcefield::AddImplicitGenborn) - .def("AddLJ",&ost::mol::mm::Forcefield::AddLJ) - .def("AddLJPair",&ost::mol::mm::Forcefield::AddLJPair) - .def("AddMass",&ost::mol::mm::Forcefield::AddMass) - .def("AddResidueRenamingRule",&ost::mol::mm::Forcefield::AddResidueRenamingRule) - .def("AddAtomRenamingRule",&ost::mol::mm::Forcefield::AddAtomRenamingRule) - .def("AddHydrogenConstructor",&ost::mol::mm::Forcefield::AddHydrogenConstructor) - .def("AddBlockModifier",&ost::mol::mm::Forcefield::AddBlockModifier) - .def("SetStandardCTer",&ost::mol::mm::Forcefield::SetStandardCTer) - .def("SetStandardNTer",&ost::mol::mm::Forcefield::SetStandardNTer) - .def("SetFudgeLJ",&ost::mol::mm::Forcefield::SetFudgeLJ) - .def("SetFudgeQQ",&ost::mol::mm::Forcefield::SetFudgeQQ) - .def("SetGenPairs",&ost::mol::mm::Forcefield::SetGenPairs) + .def("AddBuildingBlock",&ost::mol::mm::Forcefield::AddBuildingBlock,(arg("name"),arg("block"))) + .def("AddBond",&ost::mol::mm::Forcefield::AddBond,(arg("bond"))) + .def("AddAngle",&ost::mol::mm::Forcefield::AddAngle,(arg("angle"))) + .def("AddDihedral",&ost::mol::mm::Forcefield::AddDihedral,(arg("dihedral"))) + .def("AddImproper",&ost::mol::mm::Forcefield::AddImproper,(arg("improper"))) + .def("AddCMap",&ost::mol::mm::Forcefield::AddCMap,(arg("cmap"))) + .def("AddImplicitGenborn",&ost::mol::mm::Forcefield::AddImplicitGenborn,(arg("implicit_genborn"))) + .def("AddLJ",&ost::mol::mm::Forcefield::AddLJ,(arg("lj"))) + .def("AddLJPair",&ost::mol::mm::Forcefield::AddLJPair,(arg("lj_pair"))) + .def("AddMass",&ost::mol::mm::Forcefield::AddMass,(arg("mass"))) + .def("AddResidueRenamingRule",&ost::mol::mm::Forcefield::AddResidueRenamingRule,(arg("name"),arg("main_name"),arg("n_ter_name"),arg("c_ter_name"),arg("two_ter_name"))) + .def("AddAtomRenamingRule",&ost::mol::mm::Forcefield::AddAtomRenamingRule,(arg("res_name"),arg("old_atom_name"),arg("new_atom_name"))) + .def("AddHydrogenConstructor",&ost::mol::mm::Forcefield::AddHydrogenConstructor,(arg("name"),arg("hydrogen_constructor"))) + .def("AddBlockModifier",&ost::mol::mm::Forcefield::AddBlockModifier,(arg("name"),arg("modifier"))) + .def("SetStandardCTer",&ost::mol::mm::Forcefield::SetStandardCTer,(arg("res_name"),arg("ter_name"))) + .def("SetStandardNTer",&ost::mol::mm::Forcefield::SetStandardNTer,(arg("res_name"),arg("ter_name"))) + .def("SetFudgeLJ",&ost::mol::mm::Forcefield::SetFudgeLJ,(arg("fudge_factor"))) + .def("SetFudgeQQ",&ost::mol::mm::Forcefield::SetFudgeQQ,(arg("fudge_factor"))) + .def("SetGenPairs",&ost::mol::mm::Forcefield::SetGenPairs,(arg("set_gen_pairs_flag"))) .def("GetResidueRenamingMain",&ost::mol::mm::Forcefield::GetResidueRenamingMain,(arg("res_name"))) .def("GetResidueRenamingNTer",&ost::mol::mm::Forcefield::GetResidueRenamingNTer,(arg("res_name"))) .def("GetResidueRenamingCTer",&ost::mol::mm::Forcefield::GetResidueRenamingCTer,(arg("res_name"))) diff --git a/modules/mol/mm/pymod/export_interaction.cc b/modules/mol/mm/pymod/export_interaction.cc index 8c3084359a68ee76fab04cdf8b4413a6cde5443c..57dc7a911b8fe67996fdc7355024265c8e370595 100644 --- a/modules/mol/mm/pymod/export_interaction.cc +++ b/modules/mol/mm/pymod/export_interaction.cc @@ -100,19 +100,19 @@ void export_Interaction() ; class_<ost::mol::mm::Interaction>("Interaction",init<ost::mol::mm::FuncType>()) - .def("SetTypes",&WrapSetTypes) - .def("SetNames",&WrapSetNames) - .def("SetParam",&WrapSetParam) + .def("SetTypes",&WrapSetTypes,(arg("types"))) + .def("SetNames",&WrapSetNames,(arg("names"))) + .def("SetParam",&WrapSetParam,(arg("parameters"))) .def("GetTypes",&WrapGetTypes) .def("GetNames",&WrapGetNames) .def("GetParam",&WrapGetParam) - .def("GetAtoms",&ost::mol::mm::Interaction::GetAtoms) + .def("GetAtoms",&ost::mol::mm::Interaction::GetAtoms,(arg("residue"))) .def("GetFuncType",&ost::mol::mm::Interaction::GetFuncType) - .def("ReplaceAtom",&ost::mol::mm::Interaction::ReplaceAtom) - .def("MatchTypes",&ost::mol::mm::Interaction::MatchTypes) - .def("MatchNames",&ost::mol::mm::Interaction::MatchNames) - .def("HasName",&ost::mol::mm::Interaction::HasName) - .def("HasType",&ost::mol::mm::Interaction::HasType) + .def("ReplaceAtom",&ost::mol::mm::Interaction::ReplaceAtom,(arg("name"),arg("new_name"),arg("new_type"))) + .def("MatchTypes",&ost::mol::mm::Interaction::MatchTypes,(arg("types"))) + .def("MatchNames",&ost::mol::mm::Interaction::MatchNames,(arg("names"))) + .def("HasName",&ost::mol::mm::Interaction::HasName,(arg("name"))) + .def("HasType",&ost::mol::mm::Interaction::HasType,(arg("type"))) .def("IsParametrized",&ost::mol::mm::Interaction::IsParametrized) .def("HasTypeWildcard",&ost::mol::mm::Interaction::HasTypeWildcard) .def("HasNameWildcard",&ost::mol::mm::Interaction::HasNameWildcard) diff --git a/modules/mol/mm/pymod/export_openmm.cc b/modules/mol/mm/pymod/export_openmm.cc index 9a34525a6428ce5a7410d814428e276a53aecf09..38a09d305b51edd0df5278644832633f2100498e 100644 --- a/modules/mol/mm/pymod/export_openmm.cc +++ b/modules/mol/mm/pymod/export_openmm.cc @@ -30,42 +30,42 @@ void export_OpenMM() //we have to tell boost, that the Integrator class is around... class_<OpenMM::Integrator, boost::noncopyable>("Integrator",no_init) .def("GetConstraintTolerance",&OpenMM::Integrator::getConstraintTolerance) - .def("SetConstraintTolerance",&OpenMM::Integrator::setConstraintTolerance) + .def("SetConstraintTolerance",&OpenMM::Integrator::setConstraintTolerance,(arg("tolerance"))) ; class_<OpenMM::VerletIntegrator, bases<OpenMM::Integrator> >("VerletIntegrator", init<double>()); class_<OpenMM::BrownianIntegrator, bases<OpenMM::Integrator> >("BrownianIntegrator", init<double,double,double>()) .def("GetTemperature",&OpenMM::BrownianIntegrator::getTemperature) - .def("SetTemperature",&OpenMM::BrownianIntegrator::setTemperature) + .def("SetTemperature",&OpenMM::BrownianIntegrator::setTemperature,(arg("temperature"))) .def("GetFriction",&OpenMM::BrownianIntegrator::getFriction) - .def("SetFriction",&OpenMM::BrownianIntegrator::setFriction) + .def("SetFriction",&OpenMM::BrownianIntegrator::setFriction,(arg("friction"))) .def("GetRandomNumberSeed",&OpenMM::BrownianIntegrator::getRandomNumberSeed) - .def("SetRandomNumberSeed",&OpenMM::BrownianIntegrator::setRandomNumberSeed) + .def("SetRandomNumberSeed",&OpenMM::BrownianIntegrator::setRandomNumberSeed,(arg("seed"))) ; class_<OpenMM::LangevinIntegrator, bases<OpenMM::Integrator> >("LangevinIntegrator", init<double,double,double>()) .def("GetTemperature",&OpenMM::LangevinIntegrator::getTemperature) - .def("SetTemperature",&OpenMM::LangevinIntegrator::setTemperature) + .def("SetTemperature",&OpenMM::LangevinIntegrator::setTemperature,(arg("temperature"))) .def("GetFriction",&OpenMM::LangevinIntegrator::getFriction) - .def("SetFriction",&OpenMM::LangevinIntegrator::setFriction) + .def("SetFriction",&OpenMM::LangevinIntegrator::setFriction,(arg("friction"))) .def("GetRandomNumberSeed",&OpenMM::LangevinIntegrator::getRandomNumberSeed) - .def("SetRandomNumberSeed",&OpenMM::LangevinIntegrator::setRandomNumberSeed) + .def("SetRandomNumberSeed",&OpenMM::LangevinIntegrator::setRandomNumberSeed,(arg("seed"))) ; class_<OpenMM::VariableVerletIntegrator, bases<OpenMM::Integrator> >("VariableVerletIntegrator",init<double>()) .def("GetErrorTolerance", &OpenMM::VariableVerletIntegrator::getErrorTolerance) - .def("SetErrorTolerance", &OpenMM::VariableVerletIntegrator::setErrorTolerance) + .def("SetErrorTolerance", &OpenMM::VariableVerletIntegrator::setErrorTolerance,(arg("tolerance"))) ; class_<OpenMM::VariableLangevinIntegrator, bases<OpenMM::Integrator> >("VaribaleLangevinIntegrator", init<double,double,double>()) .def("GetTemperature",&OpenMM::VariableLangevinIntegrator::getTemperature) - .def("SetTemperature",&OpenMM::VariableLangevinIntegrator::setTemperature) + .def("SetTemperature",&OpenMM::VariableLangevinIntegrator::setTemperature,(arg("temperature"))) .def("GetFriction",&OpenMM::VariableLangevinIntegrator::getFriction) - .def("SetFriction",&OpenMM::VariableLangevinIntegrator::setFriction) + .def("SetFriction",&OpenMM::VariableLangevinIntegrator::setFriction,(arg("friction"))) .def("GetRandomNumberSeed",&OpenMM::VariableLangevinIntegrator::getRandomNumberSeed) - .def("SetRandomNumberSeed",&OpenMM::VariableLangevinIntegrator::setRandomNumberSeed) + .def("SetRandomNumberSeed",&OpenMM::VariableLangevinIntegrator::setRandomNumberSeed,(arg("seed"))) .def("GetErrorTolerance",&OpenMM::VariableLangevinIntegrator::getErrorTolerance) - .def("SetErrorTolerance",&OpenMM::VariableLangevinIntegrator::setErrorTolerance) + .def("SetErrorTolerance",&OpenMM::VariableLangevinIntegrator::setErrorTolerance,(arg("tolerance"))) ; }