From 12388ede8a64b8e69d6fed17c7be4ab561f7f920 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 20 Oct 2026 12:12:29 +0100 Subject: [PATCH 1/8] Release the GIL when updating a System or deleting its frames. --- wrapper/System/System.pypp.cpp | 3424 ++++++++++++-------------------- 1 file changed, 1248 insertions(+), 2176 deletions(-) diff --git a/wrapper/System/System.pypp.cpp b/wrapper/System/System.pypp.cpp index 6f700451b..6e83f4835 100644 --- a/wrapper/System/System.pypp.cpp +++ b/wrapper/System/System.pypp.cpp @@ -2,9 +2,9 @@ // (C) Christopher Woods, LGPL >= 3 License -#include "boost/python.hpp" -#include "Helpers/clone_const_reference.hpp" #include "System.pypp.hpp" +#include "Helpers/clone_const_reference.hpp" +#include "boost/python.hpp" namespace bp = boost::python; @@ -74,7 +74,7 @@ namespace bp = boost::python; #include "SireBase/slice.h" -SireSystem::System __copy__(const SireSystem::System &other){ return SireSystem::System(other); } +SireSystem::System __copy__(const SireSystem::System &other) { return SireSystem::System(other); } #include "Helpers/copy.hpp" @@ -84,2583 +84,1655 @@ SireSystem::System __copy__(const SireSystem::System &other){ return SireSystem: #include "Helpers/release_gil_policy.hpp" +#include "Helpers/scoped_gil_release.hpp" + #include "Helpers/len.hpp" -void register_System_class(){ +namespace +{ + /** Updating a system or deleting its frames touches every molecule, which + is slow for large systems. Nothing in either call touches Python, so + the GIL is dropped for the duration. + */ + template + void update_no_gil(SireSystem::System &system, const T &molecules, bool auto_commit) + { + SireHelpers::ScopedGILRelease release_gil; + system.update(molecules, auto_commit); + } + + void deleteAllFrames_no_gil(SireSystem::System &system) + { + SireHelpers::ScopedGILRelease release_gil; + system.deleteAllFrames(); + } + + void deleteAllFrames_map_no_gil(SireSystem::System &system, + const SireBase::PropertyMap &map) + { + SireHelpers::ScopedGILRelease release_gil; + system.deleteAllFrames(map); + } +} + +void register_System_class() +{ { //::SireSystem::System - typedef bp::class_< SireSystem::System, bp::bases< SireMol::MolGroupsBase, SireBase::Property > > System_exposer_t; - System_exposer_t System_exposer = System_exposer_t( "System", "This is a simulation system. If contains molecules, forcefields that\nprovide energy functions of those molecules, and monitors that\ncan monitor the changing state of the system\n\nAuthor: Christopher Woods\n", bp::init< >("Construct an unnamed System") ); - bp::scope System_scope( System_exposer ); - System_exposer.def( bp::init< QString const & >(( bp::arg("name") ), "Construct a named System") ); - System_exposer.def( bp::init< SireSystem::System const & >(( bp::arg("other") ), "Copy constructor") ); + typedef bp::class_> System_exposer_t; + System_exposer_t System_exposer = System_exposer_t("System", "This is a simulation system. If contains molecules, forcefields that\nprovide energy functions of those molecules, and monitors that\ncan monitor the changing state of the system\n\nAuthor: Christopher Woods\n", bp::init<>("Construct an unnamed System")); + bp::scope System_scope(System_exposer); + System_exposer.def(bp::init((bp::arg("name")), "Construct a named System")); + System_exposer.def(bp::init((bp::arg("other")), "Copy constructor")); { //::SireSystem::System::UID - - typedef ::QUuid const & ( ::SireSystem::System::*UID_function_type)( ) const; - UID_function_type UID_function_value( &::SireSystem::System::UID ); - - System_exposer.def( - "UID" - , UID_function_value - , bp::return_value_policy< bp::copy_const_reference >() - , "" ); - + + typedef ::QUuid const &(::SireSystem::System::*UID_function_type)() const; + UID_function_type UID_function_value(&::SireSystem::System::UID); + + System_exposer.def( + "UID", UID_function_value, bp::return_value_policy(), ""); } { //::SireSystem::System::accept - - typedef void ( ::SireSystem::System::*accept_function_type)( ) ; - accept_function_type accept_function_value( &::SireSystem::System::accept ); - - 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" ); - + + typedef void (::SireSystem::System::*accept_function_type)(); + accept_function_type accept_function_value(&::SireSystem::System::accept); + + 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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::QString const &,::SireSystem::SystemMonitor const &,int ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "add" - , add_function_value - , ( bp::arg("name"), bp::arg("monitor"), bp::arg("frequency")=(int)(1) ) - , "Add a system monitor monitor, identified by the name name, which\nwill be updated every frequency steps.\nThrow: SireSystem::duplicate_monitor\n" ); - + + typedef void (::SireSystem::System::*add_function_type)(::QString const &, ::SireSystem::SystemMonitor const &, int); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "add", add_function_value, (bp::arg("name"), bp::arg("monitor"), bp::arg("frequency") = (int)(1)), "Add a system monitor monitor, identified by the name name, which\nwill be updated every frequency steps.\nThrow: SireSystem::duplicate_monitor\n"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireSystem::SystemMonitors const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "add" - , add_function_value - , ( bp::arg("monitors") ) - , bp::release_gil_policy() - , "Add the monitors in monitors to this system\nThrow: SireSystem::duplicate_monitor\n" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireSystem::SystemMonitors const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "add", add_function_value, (bp::arg("monitors")), bp::release_gil_policy(), "Add the monitors in monitors to this system\nThrow: SireSystem::duplicate_monitor\n"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireSystem::SystemMonitors const &,int ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireSystem::SystemMonitors const &, int); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireFF::FF const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireFF::FF const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::MoleculeGroup const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::MoleculeGroup const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireSystem::Constraint const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "add" - , add_function_value - , ( bp::arg("constraint") ) - , bp::release_gil_policy() - , "Add the passed constraint to the system" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireSystem::Constraint const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "add", add_function_value, (bp::arg("constraint")), bp::release_gil_policy(), "Add the passed constraint to the system"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireSystem::Constraints const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "add" - , add_function_value - , ( bp::arg("constraints") ) - , bp::release_gil_policy() - , "Add the passed constraint to the system" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireSystem::Constraints const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "add", add_function_value, (bp::arg("constraints")), bp::release_gil_policy(), "Add the passed constraint to the system"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::MoleculeView const &,::SireMol::MGID const &,::SireBase::PropertyMap const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::MoleculeView const &, ::SireMol::MGID const &, ::SireBase::PropertyMap const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::ViewsOfMol const &,::SireMol::MGID const &,::SireBase::PropertyMap const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::ViewsOfMol const &, ::SireMol::MGID const &, ::SireBase::PropertyMap const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::Molecules const &,::SireMol::MGID const &,::SireBase::PropertyMap const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::Molecules const &, ::SireMol::MGID const &, ::SireBase::PropertyMap const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::MoleculeGroup const &,::SireMol::MGID const &,::SireBase::PropertyMap const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::MoleculeGroup const &, ::SireMol::MGID const &, ::SireBase::PropertyMap const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::MoleculeView const &,::SireMol::MGID const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::MoleculeView const &, ::SireMol::MGID const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::ViewsOfMol const &,::SireMol::MGID const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::ViewsOfMol const &, ::SireMol::MGID const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::Molecules const &,::SireMol::MGID const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::Molecules const &, ::SireMol::MGID const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::add - - typedef void ( ::SireSystem::System::*add_function_type)( ::SireMol::MoleculeGroup const &,::SireMol::MGID const & ) ; - add_function_type add_function_value( &::SireSystem::System::add ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*add_function_type)(::SireMol::MoleculeGroup const &, ::SireMol::MGID const &); + add_function_type add_function_value(&::SireSystem::System::add); + + System_exposer.def( + "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"); } { //::SireSystem::System::addIfUnique - - typedef void ( ::SireSystem::System::*addIfUnique_function_type)( ::SireMol::MoleculeView const &,::SireMol::MGID const &,::SireBase::PropertyMap const & ) ; - addIfUnique_function_type addIfUnique_function_value( &::SireSystem::System::addIfUnique ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*addIfUnique_function_type)(::SireMol::MoleculeView const &, ::SireMol::MGID const &, ::SireBase::PropertyMap const &); + addIfUnique_function_type addIfUnique_function_value(&::SireSystem::System::addIfUnique); + + System_exposer.def( + "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"); } { //::SireSystem::System::addIfUnique - - typedef void ( ::SireSystem::System::*addIfUnique_function_type)( ::SireMol::ViewsOfMol const &,::SireMol::MGID const &,::SireBase::PropertyMap const & ) ; - addIfUnique_function_type addIfUnique_function_value( &::SireSystem::System::addIfUnique ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*addIfUnique_function_type)(::SireMol::ViewsOfMol const &, ::SireMol::MGID const &, ::SireBase::PropertyMap const &); + addIfUnique_function_type addIfUnique_function_value(&::SireSystem::System::addIfUnique); + + System_exposer.def( + "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"); } { //::SireSystem::System::addIfUnique - - typedef void ( ::SireSystem::System::*addIfUnique_function_type)( ::SireMol::Molecules const &,::SireMol::MGID const &,::SireBase::PropertyMap const & ) ; - addIfUnique_function_type addIfUnique_function_value( &::SireSystem::System::addIfUnique ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*addIfUnique_function_type)(::SireMol::Molecules const &, ::SireMol::MGID const &, ::SireBase::PropertyMap const &); + addIfUnique_function_type addIfUnique_function_value(&::SireSystem::System::addIfUnique); + + System_exposer.def( + "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"); } { //::SireSystem::System::addIfUnique - - typedef void ( ::SireSystem::System::*addIfUnique_function_type)( ::SireMol::MoleculeGroup const &,::SireMol::MGID const &,::SireBase::PropertyMap const & ) ; - addIfUnique_function_type addIfUnique_function_value( &::SireSystem::System::addIfUnique ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*addIfUnique_function_type)(::SireMol::MoleculeGroup const &, ::SireMol::MGID const &, ::SireBase::PropertyMap const &); + addIfUnique_function_type addIfUnique_function_value(&::SireSystem::System::addIfUnique); + + System_exposer.def( + "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"); } { //::SireSystem::System::addIfUnique - - typedef void ( ::SireSystem::System::*addIfUnique_function_type)( ::SireMol::MoleculeView const &,::SireMol::MGID const & ) ; - addIfUnique_function_type addIfUnique_function_value( &::SireSystem::System::addIfUnique ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*addIfUnique_function_type)(::SireMol::MoleculeView const &, ::SireMol::MGID const &); + addIfUnique_function_type addIfUnique_function_value(&::SireSystem::System::addIfUnique); + + System_exposer.def( + "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"); } { //::SireSystem::System::addIfUnique - - typedef void ( ::SireSystem::System::*addIfUnique_function_type)( ::SireMol::ViewsOfMol const &,::SireMol::MGID const & ) ; - addIfUnique_function_type addIfUnique_function_value( &::SireSystem::System::addIfUnique ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*addIfUnique_function_type)(::SireMol::ViewsOfMol const &, ::SireMol::MGID const &); + addIfUnique_function_type addIfUnique_function_value(&::SireSystem::System::addIfUnique); + + System_exposer.def( + "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"); } { //::SireSystem::System::addIfUnique - - typedef void ( ::SireSystem::System::*addIfUnique_function_type)( ::SireMol::Molecules const &,::SireMol::MGID const & ) ; - addIfUnique_function_type addIfUnique_function_value( &::SireSystem::System::addIfUnique ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*addIfUnique_function_type)(::SireMol::Molecules const &, ::SireMol::MGID const &); + addIfUnique_function_type addIfUnique_function_value(&::SireSystem::System::addIfUnique); + + System_exposer.def( + "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"); } { //::SireSystem::System::addIfUnique - - typedef void ( ::SireSystem::System::*addIfUnique_function_type)( ::SireMol::MoleculeGroup const &,::SireMol::MGID const & ) ; - addIfUnique_function_type addIfUnique_function_value( &::SireSystem::System::addIfUnique ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*addIfUnique_function_type)(::SireMol::MoleculeGroup const &, ::SireMol::MGID const &); + addIfUnique_function_type addIfUnique_function_value(&::SireSystem::System::addIfUnique); + + System_exposer.def( + "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"); } { //::SireSystem::System::addSharedProperty - - typedef void ( ::SireSystem::System::*addSharedProperty_function_type)( ::QString const & ) ; - addSharedProperty_function_type addSharedProperty_function_value( &::SireSystem::System::addSharedProperty ); - - System_exposer.def( - "addSharedProperty" - , addSharedProperty_function_value - , ( bp::arg("name") ) - , bp::release_gil_policy() - , "Specify that the property called name should be a shared property" ); - + + typedef void (::SireSystem::System::*addSharedProperty_function_type)(::QString const &); + addSharedProperty_function_type addSharedProperty_function_value(&::SireSystem::System::addSharedProperty); + + System_exposer.def( + "addSharedProperty", addSharedProperty_function_value, (bp::arg("name")), bp::release_gil_policy(), "Specify that the property called name should be a shared property"); } { //::SireSystem::System::addSharedProperty - - typedef void ( ::SireSystem::System::*addSharedProperty_function_type)( ::QString const &,::SireBase::Property const & ) ; - addSharedProperty_function_type addSharedProperty_function_value( &::SireSystem::System::addSharedProperty ); - - System_exposer.def( - "addSharedProperty" - , addSharedProperty_function_value - , ( bp::arg("name"), bp::arg("value") ) - , bp::release_gil_policy() - , "Specify that the passed property called name with value value\n should be a shared property\n" ); - + + typedef void (::SireSystem::System::*addSharedProperty_function_type)(::QString const &, ::SireBase::Property const &); + addSharedProperty_function_type addSharedProperty_function_value(&::SireSystem::System::addSharedProperty); + + System_exposer.def( + "addSharedProperty", addSharedProperty_function_value, (bp::arg("name"), bp::arg("value")), bp::release_gil_policy(), "Specify that the passed property called name with value value\n should be a shared property\n"); } { //::SireSystem::System::applyConstraints - - typedef void ( ::SireSystem::System::*applyConstraints_function_type)( ) ; - applyConstraints_function_type applyConstraints_function_value( &::SireSystem::System::applyConstraints ); - - System_exposer.def( - "applyConstraints" - , applyConstraints_function_value - , bp::release_gil_policy() - , "Apply the system (and molecule) constraints" ); - + + typedef void (::SireSystem::System::*applyConstraints_function_type)(); + applyConstraints_function_type applyConstraints_function_value(&::SireSystem::System::applyConstraints); + + System_exposer.def( + "applyConstraints", applyConstraints_function_value, bp::release_gil_policy(), "Apply the system (and molecule) constraints"); } { //::SireSystem::System::at - - typedef ::SireFF::FF const & ( ::SireSystem::System::*at_function_type)( ::SireFF::FFID const & ) const; - at_function_type at_function_value( &::SireSystem::System::at ); - - System_exposer.def( - "at" - , at_function_value - , ( bp::arg("ffid") ) - , 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" ); - + + typedef ::SireFF::FF const &(::SireSystem::System::*at_function_type)(::SireFF::FFID const &) const; + at_function_type at_function_value(&::SireSystem::System::at); + + System_exposer.def( + "at", at_function_value, (bp::arg("ffid")), 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"); } { //::SireSystem::System::at - - typedef ::SireSystem::SystemMonitor const & ( ::SireSystem::System::*at_function_type)( ::SireSystem::MonitorID const & ) const; - at_function_type at_function_value( &::SireSystem::System::at ); - - System_exposer.def( - "at" - , at_function_value - , ( bp::arg("monid") ) - , bp::return_value_policy() - , "Return the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n" ); - + + typedef ::SireSystem::SystemMonitor const &(::SireSystem::System::*at_function_type)(::SireSystem::MonitorID const &) const; + at_function_type at_function_value(&::SireSystem::System::at); + + System_exposer.def( + "at", at_function_value, (bp::arg("monid")), bp::return_value_policy(), "Return the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n"); } { //::SireSystem::System::at - - typedef ::SireMol::MoleculeGroup const & ( ::SireSystem::System::*at_function_type)( ::SireMol::MGNum ) const; - at_function_type at_function_value( &::SireSystem::System::at ); - - System_exposer.def( - "at" - , at_function_value - , ( bp::arg("mgnum") ) - , bp::return_value_policy() - , "overloading MolGroupsBase virtual functions" ); - + + typedef ::SireMol::MoleculeGroup const &(::SireSystem::System::*at_function_type)(::SireMol::MGNum) const; + at_function_type at_function_value(&::SireSystem::System::at); + + System_exposer.def( + "at", at_function_value, (bp::arg("mgnum")), bp::return_value_policy(), "overloading MolGroupsBase virtual functions"); } { //::SireSystem::System::builtinProperties - - typedef ::SireBase::Properties ( ::SireSystem::System::*builtinProperties_function_type)( ) const; - builtinProperties_function_type builtinProperties_function_value( &::SireSystem::System::builtinProperties ); - - System_exposer.def( - "builtinProperties" - , builtinProperties_function_value - , bp::release_gil_policy() - , "Return the values of all built-in properties of this system" ); - + + typedef ::SireBase::Properties (::SireSystem::System::*builtinProperties_function_type)() const; + builtinProperties_function_type builtinProperties_function_value(&::SireSystem::System::builtinProperties); + + System_exposer.def( + "builtinProperties", builtinProperties_function_value, bp::release_gil_policy(), "Return the values of all built-in properties of this system"); } { //::SireSystem::System::builtinProperty - - typedef ::SireBase::Property const & ( ::SireSystem::System::*builtinProperty_function_type)( ::QString const & ) const; - builtinProperty_function_type builtinProperty_function_value( &::SireSystem::System::builtinProperty ); - - System_exposer.def( - "builtinProperty" - , builtinProperty_function_value - , ( bp::arg("name") ) - , 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" ); - + + typedef ::SireBase::Property const &(::SireSystem::System::*builtinProperty_function_type)(::QString const &) const; + builtinProperty_function_type builtinProperty_function_value(&::SireSystem::System::builtinProperty); + + System_exposer.def( + "builtinProperty", builtinProperty_function_value, (bp::arg("name")), 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"); } { //::SireSystem::System::clearStatistics - - typedef void ( ::SireSystem::System::*clearStatistics_function_type)( ) ; - clearStatistics_function_type clearStatistics_function_value( &::SireSystem::System::clearStatistics ); - - System_exposer.def( - "clearStatistics" - , clearStatistics_function_value - , bp::release_gil_policy() - , "Completely clear all statistics held in the monitors" ); - + + typedef void (::SireSystem::System::*clearStatistics_function_type)(); + clearStatistics_function_type clearStatistics_function_value(&::SireSystem::System::clearStatistics); + + System_exposer.def( + "clearStatistics", clearStatistics_function_value, bp::release_gil_policy(), "Completely clear all statistics held in the monitors"); } { //::SireSystem::System::clearStatistics - - typedef void ( ::SireSystem::System::*clearStatistics_function_type)( ::SireSystem::MonitorID const & ) ; - clearStatistics_function_type clearStatistics_function_value( &::SireSystem::System::clearStatistics ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*clearStatistics_function_type)(::SireSystem::MonitorID const &); + clearStatistics_function_type clearStatistics_function_value(&::SireSystem::System::clearStatistics); + + System_exposer.def( + "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"); } { //::SireSystem::System::collectStats - - typedef void ( ::SireSystem::System::*collectStats_function_type)( ) ; - collectStats_function_type collectStats_function_value( &::SireSystem::System::collectStats ); - - System_exposer.def( - "collectStats" - , collectStats_function_value - , bp::release_gil_policy() - , "Collect statistics about the current configuration" ); - + + typedef void (::SireSystem::System::*collectStats_function_type)(); + collectStats_function_type collectStats_function_value(&::SireSystem::System::collectStats); + + System_exposer.def( + "collectStats", collectStats_function_value, bp::release_gil_policy(), "Collect statistics about the current configuration"); } { //::SireSystem::System::componentExpression - - typedef ::SireCAS::Expression ( ::SireSystem::System::*componentExpression_function_type)( ::SireCAS::Symbol const & ) const; - componentExpression_function_type componentExpression_function_value( &::SireSystem::System::componentExpression ); - - System_exposer.def( - "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" ); - + + typedef ::SireCAS::Expression (::SireSystem::System::*componentExpression_function_type)(::SireCAS::Symbol const &) const; + componentExpression_function_type componentExpression_function_value(&::SireSystem::System::componentExpression); + + System_exposer.def( + "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"); } { //::SireSystem::System::componentExpressions - - typedef ::QHash< SireCAS::Symbol, SireCAS::Expression > ( ::SireSystem::System::*componentExpressions_function_type)( ::QSet< SireCAS::Symbol > const & ) const; - componentExpressions_function_type componentExpressions_function_value( &::SireSystem::System::componentExpressions ); - - System_exposer.def( - "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" ); - + + typedef ::QHash (::SireSystem::System::*componentExpressions_function_type)(::QSet const &) const; + componentExpressions_function_type componentExpressions_function_value(&::SireSystem::System::componentExpressions); + + System_exposer.def( + "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"); } { //::SireSystem::System::componentExpressions - - typedef ::QHash< SireCAS::Symbol, SireCAS::Expression > ( ::SireSystem::System::*componentExpressions_function_type)( ) const; - componentExpressions_function_type componentExpressions_function_value( &::SireSystem::System::componentExpressions ); - - 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" ); - + + typedef ::QHash (::SireSystem::System::*componentExpressions_function_type)() const; + componentExpressions_function_type componentExpressions_function_value(&::SireSystem::System::componentExpressions); + + 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"); } { //::SireSystem::System::componentSymbols - - typedef ::QSet< SireCAS::Symbol > ( ::SireSystem::System::*componentSymbols_function_type)( ) const; - componentSymbols_function_type componentSymbols_function_value( &::SireSystem::System::componentSymbols ); - - 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" ); - + + typedef ::QSet (::SireSystem::System::*componentSymbols_function_type)() const; + componentSymbols_function_type componentSymbols_function_value(&::SireSystem::System::componentSymbols); + + 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"); } { //::SireSystem::System::componentValue - - typedef double ( ::SireSystem::System::*componentValue_function_type)( ::SireCAS::Symbol const & ) ; - componentValue_function_type componentValue_function_value( &::SireSystem::System::componentValue ); - - System_exposer.def( - "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" ); - + + typedef double (::SireSystem::System::*componentValue_function_type)(::SireCAS::Symbol const &); + componentValue_function_type componentValue_function_value(&::SireSystem::System::componentValue); + + System_exposer.def( + "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"); } { //::SireSystem::System::componentValues - - typedef ::SireCAS::Values ( ::SireSystem::System::*componentValues_function_type)( ) ; - componentValues_function_type componentValues_function_value( &::SireSystem::System::componentValues ); - - 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)" ); - + + typedef ::SireCAS::Values (::SireSystem::System::*componentValues_function_type)(); + componentValues_function_type componentValues_function_value(&::SireSystem::System::componentValues); + + 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)"); } { //::SireSystem::System::componentValues - - typedef ::SireCAS::Values ( ::SireSystem::System::*componentValues_function_type)( ::QSet< SireCAS::Symbol > const & ) ; - componentValues_function_type componentValues_function_value( &::SireSystem::System::componentValues ); - - System_exposer.def( - "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" ); - + + typedef ::SireCAS::Values (::SireSystem::System::*componentValues_function_type)(::QSet const &); + componentValues_function_type componentValues_function_value(&::SireSystem::System::componentValues); + + System_exposer.def( + "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"); } { //::SireSystem::System::compoundProperty - - typedef ::SireBase::Property const & ( ::SireSystem::System::*compoundProperty_function_type)( ::QString const & ) const; - compoundProperty_function_type compoundProperty_function_value( &::SireSystem::System::compoundProperty ); - - System_exposer.def( - "compoundProperty" - , compoundProperty_function_value - , ( bp::arg("name") ) - , 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" ); - + + typedef ::SireBase::Property const &(::SireSystem::System::*compoundProperty_function_type)(::QString const &) const; + compoundProperty_function_type compoundProperty_function_value(&::SireSystem::System::compoundProperty); + + System_exposer.def( + "compoundProperty", compoundProperty_function_value, (bp::arg("name")), 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"); } { //::SireSystem::System::constant - - typedef double ( ::SireSystem::System::*constant_function_type)( ::SireCAS::Symbol const & ) const; - constant_function_type constant_function_value( &::SireSystem::System::constant ); - - System_exposer.def( - "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" ); - + + typedef double (::SireSystem::System::*constant_function_type)(::SireCAS::Symbol const &) const; + constant_function_type constant_function_value(&::SireSystem::System::constant); + + System_exposer.def( + "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"); } { //::SireSystem::System::constantComponents - - typedef ::SireCAS::Values ( ::SireSystem::System::*constantComponents_function_type)( ) const; - constantComponents_function_type constantComponents_function_value( &::SireSystem::System::constantComponents ); - - System_exposer.def( - "constantComponents" - , constantComponents_function_value - , bp::release_gil_policy() - , "Return the values of all constant components of this system" ); - + + typedef ::SireCAS::Values (::SireSystem::System::*constantComponents_function_type)() const; + constantComponents_function_type constantComponents_function_value(&::SireSystem::System::constantComponents); + + System_exposer.def( + "constantComponents", constantComponents_function_value, bp::release_gil_policy(), "Return the values of all constant components of this system"); } { //::SireSystem::System::constantExpression - - typedef ::SireCAS::Expression ( ::SireSystem::System::*constantExpression_function_type)( ::SireCAS::Symbol const & ) const; - constantExpression_function_type constantExpression_function_value( &::SireSystem::System::constantExpression ); - - System_exposer.def( - "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" ); - + + typedef ::SireCAS::Expression (::SireSystem::System::*constantExpression_function_type)(::SireCAS::Symbol const &) const; + constantExpression_function_type constantExpression_function_value(&::SireSystem::System::constantExpression); + + System_exposer.def( + "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"); } { //::SireSystem::System::constantExpressions - - typedef ::QHash< SireCAS::Symbol, SireCAS::Expression > ( ::SireSystem::System::*constantExpressions_function_type)( ::QSet< SireCAS::Symbol > const & ) const; - constantExpressions_function_type constantExpressions_function_value( &::SireSystem::System::constantExpressions ); - - System_exposer.def( - "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" ); - + + typedef ::QHash (::SireSystem::System::*constantExpressions_function_type)(::QSet const &) const; + constantExpressions_function_type constantExpressions_function_value(&::SireSystem::System::constantExpressions); + + System_exposer.def( + "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"); } { //::SireSystem::System::constantExpressions - - typedef ::QHash< SireCAS::Symbol, SireCAS::Expression > ( ::SireSystem::System::*constantExpressions_function_type)( ) const; - constantExpressions_function_type constantExpressions_function_value( &::SireSystem::System::constantExpressions ); - - System_exposer.def( - "constantExpressions" - , constantExpressions_function_value - , bp::release_gil_policy() - , "Return all of the expressions that define the constant components\nof this system" ); - + + typedef ::QHash (::SireSystem::System::*constantExpressions_function_type)() const; + constantExpressions_function_type constantExpressions_function_value(&::SireSystem::System::constantExpressions); + + System_exposer.def( + "constantExpressions", constantExpressions_function_value, bp::release_gil_policy(), "Return all of the expressions that define the constant components\nof this system"); } { //::SireSystem::System::constantSymbols - - typedef ::QSet< SireCAS::Symbol > ( ::SireSystem::System::*constantSymbols_function_type)( ) const; - constantSymbols_function_type constantSymbols_function_value( &::SireSystem::System::constantSymbols ); - - System_exposer.def( - "constantSymbols" - , constantSymbols_function_value - , bp::release_gil_policy() - , "Return the symbols that represent constant components of this system" ); - + + typedef ::QSet (::SireSystem::System::*constantSymbols_function_type)() const; + constantSymbols_function_type constantSymbols_function_value(&::SireSystem::System::constantSymbols); + + System_exposer.def( + "constantSymbols", constantSymbols_function_value, bp::release_gil_policy(), "Return the symbols that represent constant components of this system"); } { //::SireSystem::System::constants - - typedef ::SireCAS::Values ( ::SireSystem::System::*constants_function_type)( ) const; - constants_function_type constants_function_value( &::SireSystem::System::constants ); - - System_exposer.def( - "constants" - , constants_function_value - , bp::release_gil_policy() - , "Return the values of all constant components in this system" ); - + + typedef ::SireCAS::Values (::SireSystem::System::*constants_function_type)() const; + constants_function_type constants_function_value(&::SireSystem::System::constants); + + System_exposer.def( + "constants", constants_function_value, bp::release_gil_policy(), "Return the values of all constant components in this system"); } { //::SireSystem::System::constants - - typedef ::SireCAS::Values ( ::SireSystem::System::*constants_function_type)( ::QSet< SireCAS::Symbol > const & ) const; - constants_function_type constants_function_value( &::SireSystem::System::constants ); - - System_exposer.def( - "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" ); - + + typedef ::SireCAS::Values (::SireSystem::System::*constants_function_type)(::QSet const &) const; + constants_function_type constants_function_value(&::SireSystem::System::constants); + + System_exposer.def( + "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"); } { //::SireSystem::System::constraints - - typedef ::SireSystem::Constraints const & ( ::SireSystem::System::*constraints_function_type)( ) const; - constraints_function_type constraints_function_value( &::SireSystem::System::constraints ); - - System_exposer.def( - "constraints" - , constraints_function_value - , bp::return_value_policy< bp::copy_const_reference >() - , "Return all of the contraints that are applied to the system" ); - + + typedef ::SireSystem::Constraints const &(::SireSystem::System::*constraints_function_type)() const; + constraints_function_type constraints_function_value(&::SireSystem::System::constraints); + + System_exposer.def( + "constraints", constraints_function_value, bp::return_value_policy(), "Return all of the contraints that are applied to the system"); } { //::SireSystem::System::constraintsSatisfied - - typedef bool ( ::SireSystem::System::*constraintsSatisfied_function_type)( ) const; - constraintsSatisfied_function_type constraintsSatisfied_function_value( &::SireSystem::System::constraintsSatisfied ); - - System_exposer.def( - "constraintsSatisfied" - , constraintsSatisfied_function_value - , bp::release_gil_policy() - , "Return whether or not the constraints are satisfied" ); - + + typedef bool (::SireSystem::System::*constraintsSatisfied_function_type)() const; + constraintsSatisfied_function_type constraintsSatisfied_function_value(&::SireSystem::System::constraintsSatisfied); + + System_exposer.def( + "constraintsSatisfied", constraintsSatisfied_function_value, bp::release_gil_policy(), "Return whether or not the constraints are satisfied"); } { //::SireSystem::System::containsProperty - - typedef bool ( ::SireSystem::System::*containsProperty_function_type)( ::QString const & ) const; - containsProperty_function_type containsProperty_function_value( &::SireSystem::System::containsProperty ); - - System_exposer.def( - "containsProperty" - , containsProperty_function_value - , ( bp::arg("name") ) - , bp::release_gil_policy() - , "Return whether or not any of the forcefields contain a property called name" ); - + + typedef bool (::SireSystem::System::*containsProperty_function_type)(::QString const &) const; + containsProperty_function_type containsProperty_function_value(&::SireSystem::System::containsProperty); + + System_exposer.def( + "containsProperty", containsProperty_function_value, (bp::arg("name")), bp::release_gil_policy(), "Return whether or not any of the forcefields contain a property called name"); } { //::SireSystem::System::containsProperty - - typedef bool ( ::SireSystem::System::*containsProperty_function_type)( ::SireFF::FFID const &,::QString const & ) const; - containsProperty_function_type containsProperty_function_value( &::SireSystem::System::containsProperty ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*containsProperty_function_type)(::SireFF::FFID const &, ::QString const &) const; + containsProperty_function_type containsProperty_function_value(&::SireSystem::System::containsProperty); + + System_exposer.def( + "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"); } { //::SireSystem::System::containsProperty - - typedef bool ( ::SireSystem::System::*containsProperty_function_type)( ::SireBase::PropertyName const & ) const; - containsProperty_function_type containsProperty_function_value( &::SireSystem::System::containsProperty ); - - System_exposer.def( - "containsProperty" - , containsProperty_function_value - , ( bp::arg("name") ) - , bp::release_gil_policy() - , "Return whether or not any of the forcefields contain a property called name" ); - + + typedef bool (::SireSystem::System::*containsProperty_function_type)(::SireBase::PropertyName const &) const; + containsProperty_function_type containsProperty_function_value(&::SireSystem::System::containsProperty); + + System_exposer.def( + "containsProperty", containsProperty_function_value, (bp::arg("name")), bp::release_gil_policy(), "Return whether or not any of the forcefields contain a property called name"); } { //::SireSystem::System::containsProperty - - typedef bool ( ::SireSystem::System::*containsProperty_function_type)( ::SireFF::FFID const &,::SireBase::PropertyName const & ) const; - containsProperty_function_type containsProperty_function_value( &::SireSystem::System::containsProperty ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*containsProperty_function_type)(::SireFF::FFID const &, ::SireBase::PropertyName const &) const; + containsProperty_function_type containsProperty_function_value(&::SireSystem::System::containsProperty); + + System_exposer.def( + "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"); } { //::SireSystem::System::deleteAllFrames - - typedef void ( ::SireSystem::System::*deleteAllFrames_function_type)( ) ; - deleteAllFrames_function_type deleteAllFrames_function_value( &::SireSystem::System::deleteAllFrames ); - - System_exposer.def( - "deleteAllFrames" - , deleteAllFrames_function_value - , bp::release_gil_policy() - , "" ); - + + System_exposer.def( + "deleteAllFrames", &deleteAllFrames_no_gil, ""); } { //::SireSystem::System::deleteAllFrames - - typedef void ( ::SireSystem::System::*deleteAllFrames_function_type)( ::SireBase::PropertyMap const & ) ; - deleteAllFrames_function_type deleteAllFrames_function_value( &::SireSystem::System::deleteAllFrames ); - - System_exposer.def( - "deleteAllFrames" - , deleteAllFrames_function_value - , ( bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + System_exposer.def( + "deleteAllFrames", &deleteAllFrames_map_no_gil, (bp::arg("map")), ""); } { //::SireSystem::System::deleteFrame - - typedef void ( ::SireSystem::System::*deleteFrame_function_type)( int ) ; - deleteFrame_function_type deleteFrame_function_value( &::SireSystem::System::deleteFrame ); - - System_exposer.def( - "deleteFrame" - , deleteFrame_function_value - , ( bp::arg("frame") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*deleteFrame_function_type)(int); + deleteFrame_function_type deleteFrame_function_value(&::SireSystem::System::deleteFrame); + + System_exposer.def( + "deleteFrame", deleteFrame_function_value, (bp::arg("frame")), bp::release_gil_policy(), ""); } { //::SireSystem::System::deleteFrame - - typedef void ( ::SireSystem::System::*deleteFrame_function_type)( int,::SireBase::PropertyMap const & ) ; - deleteFrame_function_type deleteFrame_function_value( &::SireSystem::System::deleteFrame ); - - System_exposer.def( - "deleteFrame" - , deleteFrame_function_value - , ( bp::arg("frame"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*deleteFrame_function_type)(int, ::SireBase::PropertyMap const &); + deleteFrame_function_type deleteFrame_function_value(&::SireSystem::System::deleteFrame); + + System_exposer.def( + "deleteFrame", deleteFrame_function_value, (bp::arg("frame"), bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireSystem::System::energies - - typedef ::SireCAS::Values ( ::SireSystem::System::*energies_function_type)( ) ; - energies_function_type energies_function_value( &::SireSystem::System::energies ); - - System_exposer.def( - "energies" - , energies_function_value - , bp::release_gil_policy() - , "Return the energies of all energy components in this system" ); - + + typedef ::SireCAS::Values (::SireSystem::System::*energies_function_type)(); + energies_function_type energies_function_value(&::SireSystem::System::energies); + + System_exposer.def( + "energies", energies_function_value, bp::release_gil_policy(), "Return the energies of all energy components in this system"); } { //::SireSystem::System::energies - - typedef ::SireCAS::Values ( ::SireSystem::System::*energies_function_type)( ::QSet< SireCAS::Symbol > const & ) ; - energies_function_type energies_function_value( &::SireSystem::System::energies ); - - System_exposer.def( - "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" ); - + + typedef ::SireCAS::Values (::SireSystem::System::*energies_function_type)(::QSet const &); + energies_function_type energies_function_value(&::SireSystem::System::energies); + + System_exposer.def( + "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"); } { //::SireSystem::System::energy - - typedef ::SireUnits::Dimension::MolarEnergy ( ::SireSystem::System::*energy_function_type)( ) ; - energy_function_type energy_function_value( &::SireSystem::System::energy ); - - System_exposer.def( - "energy" - , energy_function_value - , bp::release_gil_policy() - , "Return the total energy of this system." ); - + + typedef ::SireUnits::Dimension::MolarEnergy (::SireSystem::System::*energy_function_type)(); + energy_function_type energy_function_value(&::SireSystem::System::energy); + + System_exposer.def( + "energy", energy_function_value, bp::release_gil_policy(), "Return the total energy of this system."); } { //::SireSystem::System::energy - - typedef ::SireUnits::Dimension::MolarEnergy ( ::SireSystem::System::*energy_function_type)( ::SireCAS::Symbol const & ) ; - energy_function_type energy_function_value( &::SireSystem::System::energy ); - - System_exposer.def( - "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" ); - + + typedef ::SireUnits::Dimension::MolarEnergy (::SireSystem::System::*energy_function_type)(::SireCAS::Symbol const &); + energy_function_type energy_function_value(&::SireSystem::System::energy); + + System_exposer.def( + "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"); } { //::SireSystem::System::energy - - typedef void ( ::SireSystem::System::*energy_function_type)( ::SireFF::EnergyTable &,double ) ; - energy_function_type energy_function_value( &::SireSystem::System::energy ); - - System_exposer.def( - "energy" - , energy_function_value - , ( bp::arg("energytable"), bp::arg("scale_energy")=1 ) - , "Return the total energytable in this system\n" ); - + + typedef void (::SireSystem::System::*energy_function_type)(::SireFF::EnergyTable &, double); + energy_function_type energy_function_value(&::SireSystem::System::energy); + + System_exposer.def( + "energy", energy_function_value, (bp::arg("energytable"), bp::arg("scale_energy") = 1), "Return the total energytable in this system\n"); } { //::SireSystem::System::energy - - typedef void ( ::SireSystem::System::*energy_function_type)( ::SireFF::EnergyTable &,::SireCAS::Symbol const &,double ) ; - energy_function_type energy_function_value( &::SireSystem::System::energy ); - - System_exposer.def( - "energy" - , energy_function_value - , ( bp::arg("energytable"), bp::arg("component"), bp::arg("scale_energy")=1 ) - , "Return the total energytable of the energy component in this system\nthat is identified by the energy component component\n" ); - + + typedef void (::SireSystem::System::*energy_function_type)(::SireFF::EnergyTable &, ::SireCAS::Symbol const &, double); + energy_function_type energy_function_value(&::SireSystem::System::energy); + + System_exposer.def( + "energy", energy_function_value, (bp::arg("energytable"), bp::arg("component"), bp::arg("scale_energy") = 1), "Return the total energytable of the energy component in this system\nthat is identified by the energy component component\n"); } { //::SireSystem::System::energyComponents - - typedef ::SireCAS::Values ( ::SireSystem::System::*energyComponents_function_type)( ) ; - energyComponents_function_type energyComponents_function_value( &::SireSystem::System::energyComponents ); - - System_exposer.def( - "energyComponents" - , energyComponents_function_value - , bp::release_gil_policy() - , "Return all of the energy components of this system" ); - + + typedef ::SireCAS::Values (::SireSystem::System::*energyComponents_function_type)(); + energyComponents_function_type energyComponents_function_value(&::SireSystem::System::energyComponents); + + System_exposer.def( + "energyComponents", energyComponents_function_value, bp::release_gil_policy(), "Return all of the energy components of this system"); } { //::SireSystem::System::energyExpression - - typedef ::SireCAS::Expression ( ::SireSystem::System::*energyExpression_function_type)( ::SireCAS::Symbol const & ) const; - energyExpression_function_type energyExpression_function_value( &::SireSystem::System::energyExpression ); - - System_exposer.def( - "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" ); - + + typedef ::SireCAS::Expression (::SireSystem::System::*energyExpression_function_type)(::SireCAS::Symbol const &) const; + energyExpression_function_type energyExpression_function_value(&::SireSystem::System::energyExpression); + + System_exposer.def( + "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"); } { //::SireSystem::System::energyExpressions - - typedef ::QHash< SireCAS::Symbol, SireCAS::Expression > ( ::SireSystem::System::*energyExpressions_function_type)( ::QSet< SireCAS::Symbol > const & ) const; - energyExpressions_function_type energyExpressions_function_value( &::SireSystem::System::energyExpressions ); - - System_exposer.def( - "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" ); - + + typedef ::QHash (::SireSystem::System::*energyExpressions_function_type)(::QSet const &) const; + energyExpressions_function_type energyExpressions_function_value(&::SireSystem::System::energyExpressions); + + System_exposer.def( + "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"); } { //::SireSystem::System::energyExpressions - - typedef ::QHash< SireCAS::Symbol, SireCAS::Expression > ( ::SireSystem::System::*energyExpressions_function_type)( ) const; - energyExpressions_function_type energyExpressions_function_value( &::SireSystem::System::energyExpressions ); - - System_exposer.def( - "energyExpressions" - , energyExpressions_function_value - , bp::release_gil_policy() - , "Return all of the energy expressions in this system" ); - + + typedef ::QHash (::SireSystem::System::*energyExpressions_function_type)() const; + energyExpressions_function_type energyExpressions_function_value(&::SireSystem::System::energyExpressions); + + System_exposer.def( + "energyExpressions", energyExpressions_function_value, bp::release_gil_policy(), "Return all of the energy expressions in this system"); } { //::SireSystem::System::energySymbols - - typedef ::QSet< SireCAS::Symbol > ( ::SireSystem::System::*energySymbols_function_type)( ) const; - energySymbols_function_type energySymbols_function_value( &::SireSystem::System::energySymbols ); - - System_exposer.def( - "energySymbols" - , energySymbols_function_value - , bp::release_gil_policy() - , "Return the symbols that represent the energy expressions of this system" ); - + + typedef ::QSet (::SireSystem::System::*energySymbols_function_type)() const; + energySymbols_function_type energySymbols_function_value(&::SireSystem::System::energySymbols); + + System_exposer.def( + "energySymbols", energySymbols_function_value, bp::release_gil_policy(), "Return the symbols that represent the energy expressions of this system"); } { //::SireSystem::System::extraGroups - - typedef ::SireMol::MoleculeGroups const & ( ::SireSystem::System::*extraGroups_function_type)( ) const; - extraGroups_function_type extraGroups_function_value( &::SireSystem::System::extraGroups ); - - System_exposer.def( - "extraGroups" - , extraGroups_function_value - , bp::return_value_policy() - , "Return all of the extra non-forcefield molecule groups in this system" ); - + + typedef ::SireMol::MoleculeGroups const &(::SireSystem::System::*extraGroups_function_type)() const; + extraGroups_function_type extraGroups_function_value(&::SireSystem::System::extraGroups); + + System_exposer.def( + "extraGroups", extraGroups_function_value, bp::return_value_policy(), "Return all of the extra non-forcefield molecule groups in this system"); } { //::SireSystem::System::ffIdx - - typedef ::SireFF::FFIdx ( ::SireSystem::System::*ffIdx_function_type)( ::SireFF::FFID const & ) const; - ffIdx_function_type ffIdx_function_value( &::SireSystem::System::ffIdx ); - - System_exposer.def( - "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" ); - + + typedef ::SireFF::FFIdx (::SireSystem::System::*ffIdx_function_type)(::SireFF::FFID const &) const; + ffIdx_function_type ffIdx_function_value(&::SireSystem::System::ffIdx); + + System_exposer.def( + "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"); } { //::SireSystem::System::ffName - - typedef ::SireFF::FFName const & ( ::SireSystem::System::*ffName_function_type)( ::SireFF::FFID const & ) const; - ffName_function_type ffName_function_value( &::SireSystem::System::ffName ); - - System_exposer.def( - "ffName" - , ffName_function_value - , ( bp::arg("ffid") ) - , 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" ); - + + typedef ::SireFF::FFName const &(::SireSystem::System::*ffName_function_type)(::SireFF::FFID const &) const; + ffName_function_type ffName_function_value(&::SireSystem::System::ffName); + + System_exposer.def( + "ffName", ffName_function_value, (bp::arg("ffid")), 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"); } { //::SireSystem::System::field - - typedef void ( ::SireSystem::System::*field_function_type)( ::SireFF::FieldTable &,double ) ; - field_function_type field_function_value( &::SireSystem::System::field ); - - System_exposer.def( - "field" - , field_function_value - , ( bp::arg("fieldtable"), bp::arg("scale_field")=1 ) - , "Add the fields acting on the molecules in the fieldtable fieldtable\nfrom this system onto this fieldtable, scaled by the optionally\nsupplied scale_field" ); - + + typedef void (::SireSystem::System::*field_function_type)(::SireFF::FieldTable &, double); + field_function_type field_function_value(&::SireSystem::System::field); + + System_exposer.def( + "field", field_function_value, (bp::arg("fieldtable"), bp::arg("scale_field") = 1), "Add the fields acting on the molecules in the fieldtable fieldtable\nfrom this system onto this fieldtable, scaled by the optionally\nsupplied scale_field"); } { //::SireSystem::System::field - - typedef void ( ::SireSystem::System::*field_function_type)( ::SireFF::FieldTable &,::SireCAS::Symbol const &,double ) ; - field_function_type field_function_value( &::SireSystem::System::field ); - - System_exposer.def( - "field" - , field_function_value - , ( bp::arg("fieldtable"), bp::arg("component"), bp::arg("scale_field")=1 ) - , "Add the fields acting on the molecules in the fieldtable fieldtable\nfrom the component of this system identified by component onto\nthis fieldtable, scaled by the optionally supplied scale_field" ); - + + typedef void (::SireSystem::System::*field_function_type)(::SireFF::FieldTable &, ::SireCAS::Symbol const &, double); + field_function_type field_function_value(&::SireSystem::System::field); + + System_exposer.def( + "field", field_function_value, (bp::arg("fieldtable"), bp::arg("component"), bp::arg("scale_field") = 1), "Add the fields acting on the molecules in the fieldtable fieldtable\nfrom the component of this system identified by component onto\nthis fieldtable, scaled by the optionally supplied scale_field"); } { //::SireSystem::System::field - - typedef void ( ::SireSystem::System::*field_function_type)( ::SireFF::FieldTable &,::SireFF::Probe const &,double ) ; - field_function_type field_function_value( &::SireSystem::System::field ); - - System_exposer.def( - "field" - , field_function_value - , ( bp::arg("fieldtable"), bp::arg("probe"), bp::arg("scale_field")=1 ) - , "Add the fields acting on the molecules in the fieldtable fieldtable\nfrom this system onto this fieldtable, scaled by the optionally\nsupplied scale_field" ); - + + typedef void (::SireSystem::System::*field_function_type)(::SireFF::FieldTable &, ::SireFF::Probe const &, double); + field_function_type field_function_value(&::SireSystem::System::field); + + System_exposer.def( + "field", field_function_value, (bp::arg("fieldtable"), bp::arg("probe"), bp::arg("scale_field") = 1), "Add the fields acting on the molecules in the fieldtable fieldtable\nfrom this system onto this fieldtable, scaled by the optionally\nsupplied scale_field"); } { //::SireSystem::System::field - - typedef void ( ::SireSystem::System::*field_function_type)( ::SireFF::FieldTable &,::SireCAS::Symbol const &,::SireFF::Probe const &,double ) ; - field_function_type field_function_value( &::SireSystem::System::field ); - - System_exposer.def( - "field" - , field_function_value - , ( bp::arg("fieldtable"), bp::arg("component"), bp::arg("probe"), bp::arg("scale_field")=1 ) - , "Add the fields acting on the molecules in the fieldtable fieldtable\nfrom the component of this system identified by component onto\nthis fieldtable, scaled by the optionally supplied scale_field" ); - + + typedef void (::SireSystem::System::*field_function_type)(::SireFF::FieldTable &, ::SireCAS::Symbol const &, ::SireFF::Probe const &, double); + field_function_type field_function_value(&::SireSystem::System::field); + + System_exposer.def( + "field", field_function_value, (bp::arg("fieldtable"), bp::arg("component"), bp::arg("probe"), bp::arg("scale_field") = 1), "Add the fields acting on the molecules in the fieldtable fieldtable\nfrom the component of this system identified by component onto\nthis fieldtable, scaled by the optionally supplied scale_field"); } { //::SireSystem::System::force - - typedef void ( ::SireSystem::System::*force_function_type)( ::SireFF::ForceTable &,double ) ; - force_function_type force_function_value( &::SireSystem::System::force ); - - System_exposer.def( - "force" - , force_function_value - , ( bp::arg("forcetable"), bp::arg("scale_force")=1 ) - , "Add the forces acting on the molecules in the forcetable forcetable\nfrom this system onto this forcetable, scaled by the optionally\nsupplied scale_force" ); - + + typedef void (::SireSystem::System::*force_function_type)(::SireFF::ForceTable &, double); + force_function_type force_function_value(&::SireSystem::System::force); + + System_exposer.def( + "force", force_function_value, (bp::arg("forcetable"), bp::arg("scale_force") = 1), "Add the forces acting on the molecules in the forcetable forcetable\nfrom this system onto this forcetable, scaled by the optionally\nsupplied scale_force"); } { //::SireSystem::System::force - - typedef void ( ::SireSystem::System::*force_function_type)( ::SireFF::ForceTable &,::SireCAS::Symbol const &,double ) ; - force_function_type force_function_value( &::SireSystem::System::force ); - - System_exposer.def( - "force" - , force_function_value - , ( bp::arg("forcetable"), bp::arg("component"), bp::arg("scale_force")=1 ) - , "Add the forces acting on the molecules in the forcetable forcetable\nfrom the component of this system identified by component onto\nthis forcetable, scaled by the optionally supplied scale_force" ); - + + typedef void (::SireSystem::System::*force_function_type)(::SireFF::ForceTable &, ::SireCAS::Symbol const &, double); + force_function_type force_function_value(&::SireSystem::System::force); + + System_exposer.def( + "force", force_function_value, (bp::arg("forcetable"), bp::arg("component"), bp::arg("scale_force") = 1), "Add the forces acting on the molecules in the forcetable forcetable\nfrom the component of this system identified by component onto\nthis forcetable, scaled by the optionally supplied scale_force"); } { //::SireSystem::System::forceField - - typedef ::SireFF::FF const & ( ::SireSystem::System::*forceField_function_type)( ::SireFF::FFID const & ) const; - forceField_function_type forceField_function_value( &::SireSystem::System::forceField ); - - System_exposer.def( - "forceField" - , forceField_function_value - , ( bp::arg("ffid") ) - , 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" ); - + + typedef ::SireFF::FF const &(::SireSystem::System::*forceField_function_type)(::SireFF::FFID const &) const; + forceField_function_type forceField_function_value(&::SireSystem::System::forceField); + + System_exposer.def( + "forceField", forceField_function_value, (bp::arg("ffid")), 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"); } { //::SireSystem::System::forceField - - typedef ::SireFF::FF const & ( ::SireSystem::System::*forceField_function_type)( ::SireMol::MGID const & ) const; - forceField_function_type forceField_function_value( &::SireSystem::System::forceField ); - - System_exposer.def( - "forceField" - , forceField_function_value - , ( bp::arg("mgid") ) - , 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" ); - + + typedef ::SireFF::FF const &(::SireSystem::System::*forceField_function_type)(::SireMol::MGID const &) const; + forceField_function_type forceField_function_value(&::SireSystem::System::forceField); + + System_exposer.def( + "forceField", forceField_function_value, (bp::arg("mgid")), 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"); } { //::SireSystem::System::forceFields - - typedef ::SireFF::ForceFields const & ( ::SireSystem::System::*forceFields_function_type)( ) const; - forceFields_function_type forceFields_function_value( &::SireSystem::System::forceFields ); - - System_exposer.def( - "forceFields" - , forceFields_function_value - , bp::return_value_policy< bp::copy_const_reference >() - , "Return an array of all of the forcefields in this system" ); - + + typedef ::SireFF::ForceFields const &(::SireSystem::System::*forceFields_function_type)() const; + forceFields_function_type forceFields_function_value(&::SireSystem::System::forceFields); + + System_exposer.def( + "forceFields", forceFields_function_value, bp::return_value_policy(), "Return an array of all of the forcefields in this system"); } { //::SireSystem::System::hasComponent - - typedef bool ( ::SireSystem::System::*hasComponent_function_type)( ::SireCAS::Symbol const & ) const; - hasComponent_function_type hasComponent_function_value( &::SireSystem::System::hasComponent ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*hasComponent_function_type)(::SireCAS::Symbol const &) const; + hasComponent_function_type hasComponent_function_value(&::SireSystem::System::hasComponent); + + System_exposer.def( + "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"); } { //::SireSystem::System::hasConstantComponent - - typedef bool ( ::SireSystem::System::*hasConstantComponent_function_type)( ::SireCAS::Symbol const & ) const; - hasConstantComponent_function_type hasConstantComponent_function_value( &::SireSystem::System::hasConstantComponent ); - - System_exposer.def( - "hasConstantComponent" - , hasConstantComponent_function_value - , ( bp::arg("component") ) - , bp::release_gil_policy() - , "Return whether or not this system has a constant\ncomponent with symbol component" ); - + + typedef bool (::SireSystem::System::*hasConstantComponent_function_type)(::SireCAS::Symbol const &) const; + hasConstantComponent_function_type hasConstantComponent_function_value(&::SireSystem::System::hasConstantComponent); + + System_exposer.def( + "hasConstantComponent", hasConstantComponent_function_value, (bp::arg("component")), bp::release_gil_policy(), "Return whether or not this system has a constant\ncomponent with symbol component"); } { //::SireSystem::System::hasEnergyComponent - - typedef bool ( ::SireSystem::System::*hasEnergyComponent_function_type)( ::SireCAS::Symbol const & ) const; - hasEnergyComponent_function_type hasEnergyComponent_function_value( &::SireSystem::System::hasEnergyComponent ); - - System_exposer.def( - "hasEnergyComponent" - , hasEnergyComponent_function_value - , ( bp::arg("component") ) - , bp::release_gil_policy() - , "Return whether or not this system has an energy component component" ); - + + typedef bool (::SireSystem::System::*hasEnergyComponent_function_type)(::SireCAS::Symbol const &) const; + hasEnergyComponent_function_type hasEnergyComponent_function_value(&::SireSystem::System::hasEnergyComponent); + + System_exposer.def( + "hasEnergyComponent", hasEnergyComponent_function_value, (bp::arg("component")), bp::release_gil_policy(), "Return whether or not this system has an energy component component"); } { //::SireSystem::System::isBuiltinProperty - - typedef bool ( ::SireSystem::System::*isBuiltinProperty_function_type)( ::QString const & ) const; - isBuiltinProperty_function_type isBuiltinProperty_function_value( &::SireSystem::System::isBuiltinProperty ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*isBuiltinProperty_function_type)(::QString const &) const; + isBuiltinProperty_function_type isBuiltinProperty_function_value(&::SireSystem::System::isBuiltinProperty); + + System_exposer.def( + "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"); } { //::SireSystem::System::isClean - - typedef bool ( ::SireSystem::System::*isClean_function_type)( ) const; - isClean_function_type isClean_function_value( &::SireSystem::System::isClean ); - - System_exposer.def( - "isClean" - , isClean_function_value - , bp::release_gil_policy() - , "Return whether or not all of the forcefields are clean" ); - + + typedef bool (::SireSystem::System::*isClean_function_type)() const; + isClean_function_type isClean_function_value(&::SireSystem::System::isClean); + + System_exposer.def( + "isClean", isClean_function_value, bp::release_gil_policy(), "Return whether or not all of the forcefields are clean"); } { //::SireSystem::System::isCompoundProperty - - typedef bool ( ::SireSystem::System::*isCompoundProperty_function_type)( ::QString const & ) const; - isCompoundProperty_function_type isCompoundProperty_function_value( &::SireSystem::System::isCompoundProperty ); - - System_exposer.def( - "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)" ); - + + typedef bool (::SireSystem::System::*isCompoundProperty_function_type)(::QString const &) const; + isCompoundProperty_function_type isCompoundProperty_function_value(&::SireSystem::System::isCompoundProperty); + + System_exposer.def( + "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)"); } { //::SireSystem::System::isConstantComponent - - typedef bool ( ::SireSystem::System::*isConstantComponent_function_type)( ::SireCAS::Symbol const & ) const; - isConstantComponent_function_type isConstantComponent_function_value( &::SireSystem::System::isConstantComponent ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*isConstantComponent_function_type)(::SireCAS::Symbol const &) const; + isConstantComponent_function_type isConstantComponent_function_value(&::SireSystem::System::isConstantComponent); + + System_exposer.def( + "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"); } { //::SireSystem::System::isDirty - - typedef bool ( ::SireSystem::System::*isDirty_function_type)( ) const; - isDirty_function_type isDirty_function_value( &::SireSystem::System::isDirty ); - - System_exposer.def( - "isDirty" - , isDirty_function_value - , bp::release_gil_policy() - , "Return whether or not any of the forcefields are dirty" ); - + + typedef bool (::SireSystem::System::*isDirty_function_type)() const; + isDirty_function_type isDirty_function_value(&::SireSystem::System::isDirty); + + System_exposer.def( + "isDirty", isDirty_function_value, bp::release_gil_policy(), "Return whether or not any of the forcefields are dirty"); } { //::SireSystem::System::isEnergyComponent - - typedef bool ( ::SireSystem::System::*isEnergyComponent_function_type)( ::SireCAS::Symbol const & ) const; - isEnergyComponent_function_type isEnergyComponent_function_value( &::SireSystem::System::isEnergyComponent ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*isEnergyComponent_function_type)(::SireCAS::Symbol const &) const; + isEnergyComponent_function_type isEnergyComponent_function_value(&::SireSystem::System::isEnergyComponent); + + System_exposer.def( + "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"); } { //::SireSystem::System::isUserProperty - - typedef bool ( ::SireSystem::System::*isUserProperty_function_type)( ::QString const & ) const; - isUserProperty_function_type isUserProperty_function_value( &::SireSystem::System::isUserProperty ); - - System_exposer.def( - "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)" ); - + + typedef bool (::SireSystem::System::*isUserProperty_function_type)(::QString const &) const; + isUserProperty_function_type isUserProperty_function_value(&::SireSystem::System::isUserProperty); + + System_exposer.def( + "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)"); } { //::SireSystem::System::loadFrame - - typedef void ( ::SireSystem::System::*loadFrame_function_type)( int ) ; - loadFrame_function_type loadFrame_function_value( &::SireSystem::System::loadFrame ); - - System_exposer.def( - "loadFrame" - , loadFrame_function_value - , ( bp::arg("frame") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*loadFrame_function_type)(int); + loadFrame_function_type loadFrame_function_value(&::SireSystem::System::loadFrame); + + System_exposer.def( + "loadFrame", loadFrame_function_value, (bp::arg("frame")), bp::release_gil_policy(), ""); } { //::SireSystem::System::loadFrame - - typedef void ( ::SireSystem::System::*loadFrame_function_type)( int,::SireBase::LazyEvaluator const & ) ; - loadFrame_function_type loadFrame_function_value( &::SireSystem::System::loadFrame ); - - System_exposer.def( - "loadFrame" - , loadFrame_function_value - , ( bp::arg("frame"), bp::arg("evaluator") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*loadFrame_function_type)(int, ::SireBase::LazyEvaluator const &); + loadFrame_function_type loadFrame_function_value(&::SireSystem::System::loadFrame); + + System_exposer.def( + "loadFrame", loadFrame_function_value, (bp::arg("frame"), bp::arg("evaluator")), bp::release_gil_policy(), ""); } { //::SireSystem::System::loadFrame - - typedef void ( ::SireSystem::System::*loadFrame_function_type)( int,::SireBase::PropertyMap const & ) ; - loadFrame_function_type loadFrame_function_value( &::SireSystem::System::loadFrame ); - - System_exposer.def( - "loadFrame" - , loadFrame_function_value - , ( bp::arg("frame"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*loadFrame_function_type)(int, ::SireBase::PropertyMap const &); + loadFrame_function_type loadFrame_function_value(&::SireSystem::System::loadFrame); + + System_exposer.def( + "loadFrame", loadFrame_function_value, (bp::arg("frame"), bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireSystem::System::loadFrame - - typedef void ( ::SireSystem::System::*loadFrame_function_type)( int,::SireBase::LazyEvaluator const &,::SireBase::PropertyMap const & ) ; - loadFrame_function_type loadFrame_function_value( &::SireSystem::System::loadFrame ); - - System_exposer.def( - "loadFrame" - , loadFrame_function_value - , ( bp::arg("frame"), bp::arg("evaluator"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*loadFrame_function_type)(int, ::SireBase::LazyEvaluator const &, ::SireBase::PropertyMap const &); + loadFrame_function_type loadFrame_function_value(&::SireSystem::System::loadFrame); + + System_exposer.def( + "loadFrame", loadFrame_function_value, (bp::arg("frame"), bp::arg("evaluator"), bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireSystem::System::makeWhole - - typedef void ( ::SireSystem::System::*makeWhole_function_type)( ) ; - makeWhole_function_type makeWhole_function_value( &::SireSystem::System::makeWhole ); - - System_exposer.def( - "makeWhole" - , makeWhole_function_value - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*makeWhole_function_type)(); + makeWhole_function_type makeWhole_function_value(&::SireSystem::System::makeWhole); + + System_exposer.def( + "makeWhole", makeWhole_function_value, bp::release_gil_policy(), ""); } { //::SireSystem::System::makeWhole - - typedef void ( ::SireSystem::System::*makeWhole_function_type)( ::SireBase::PropertyMap const & ) ; - makeWhole_function_type makeWhole_function_value( &::SireSystem::System::makeWhole ); - - System_exposer.def( - "makeWhole" - , makeWhole_function_value - , ( bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*makeWhole_function_type)(::SireBase::PropertyMap const &); + makeWhole_function_type makeWhole_function_value(&::SireSystem::System::makeWhole); + + System_exposer.def( + "makeWhole", makeWhole_function_value, (bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireSystem::System::makeWhole - - typedef void ( ::SireSystem::System::*makeWhole_function_type)( ::SireMaths::Vector const & ) ; - makeWhole_function_type makeWhole_function_value( &::SireSystem::System::makeWhole ); - - System_exposer.def( - "makeWhole" - , makeWhole_function_value - , ( bp::arg("center") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*makeWhole_function_type)(::SireMaths::Vector const &); + makeWhole_function_type makeWhole_function_value(&::SireSystem::System::makeWhole); + + System_exposer.def( + "makeWhole", makeWhole_function_value, (bp::arg("center")), bp::release_gil_policy(), ""); } { //::SireSystem::System::makeWhole - - typedef void ( ::SireSystem::System::*makeWhole_function_type)( ::SireMaths::Vector const &,::SireBase::PropertyMap const & ) ; - makeWhole_function_type makeWhole_function_value( &::SireSystem::System::makeWhole ); - - System_exposer.def( - "makeWhole" - , makeWhole_function_value - , ( bp::arg("center"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*makeWhole_function_type)(::SireMaths::Vector const &, ::SireBase::PropertyMap const &); + makeWhole_function_type makeWhole_function_value(&::SireSystem::System::makeWhole); + + System_exposer.def( + "makeWhole", makeWhole_function_value, (bp::arg("center"), bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireSystem::System::monitor - - typedef ::SireSystem::SystemMonitor const & ( ::SireSystem::System::*monitor_function_type)( ::SireSystem::MonitorID const & ) const; - monitor_function_type monitor_function_value( &::SireSystem::System::monitor ); - - System_exposer.def( - "monitor" - , monitor_function_value - , ( bp::arg("monid") ) - , bp::return_value_policy() - , "Return the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n" ); - + + typedef ::SireSystem::SystemMonitor const &(::SireSystem::System::*monitor_function_type)(::SireSystem::MonitorID const &) const; + monitor_function_type monitor_function_value(&::SireSystem::System::monitor); + + System_exposer.def( + "monitor", monitor_function_value, (bp::arg("monid")), bp::return_value_policy(), "Return the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n"); } { //::SireSystem::System::monitorName - - typedef ::SireSystem::MonitorName ( ::SireSystem::System::*monitorName_function_type)( ::SireSystem::MonitorID const & ) const; - monitorName_function_type monitorName_function_value( &::SireSystem::System::monitorName ); - - System_exposer.def( - "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" ); - + + typedef ::SireSystem::MonitorName (::SireSystem::System::*monitorName_function_type)(::SireSystem::MonitorID const &) const; + monitorName_function_type monitorName_function_value(&::SireSystem::System::monitorName); + + System_exposer.def( + "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"); } { //::SireSystem::System::monitors - - typedef ::QList< SireBase::PropPtr< SireSystem::SystemMonitor > > ( ::SireSystem::System::*monitors_function_type)( ::SireSystem::MonitorID const & ) const; - monitors_function_type monitors_function_value( &::SireSystem::System::monitors ); - - System_exposer.def( - "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" ); - + + typedef ::QList> (::SireSystem::System::*monitors_function_type)(::SireSystem::MonitorID const &) const; + monitors_function_type monitors_function_value(&::SireSystem::System::monitors); + + System_exposer.def( + "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"); } { //::SireSystem::System::monitors - - typedef ::SireSystem::SystemMonitors const & ( ::SireSystem::System::*monitors_function_type)( ) const; - monitors_function_type monitors_function_value( &::SireSystem::System::monitors ); - - System_exposer.def( - "monitors" - , monitors_function_value - , bp::return_value_policy< bp::copy_const_reference >() - , "Return the list of all monitors of this system" ); - + + typedef ::SireSystem::SystemMonitors const &(::SireSystem::System::*monitors_function_type)() const; + monitors_function_type monitors_function_value(&::SireSystem::System::monitors); + + System_exposer.def( + "monitors", monitors_function_value, bp::return_value_policy(), "Return the list of all monitors of this system"); } { //::SireSystem::System::mustNowRecalculateFromScratch - - typedef void ( ::SireSystem::System::*mustNowRecalculateFromScratch_function_type)( ) ; - mustNowRecalculateFromScratch_function_type mustNowRecalculateFromScratch_function_value( &::SireSystem::System::mustNowRecalculateFromScratch ); - - 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" ); - + + typedef void (::SireSystem::System::*mustNowRecalculateFromScratch_function_type)(); + mustNowRecalculateFromScratch_function_type mustNowRecalculateFromScratch_function_value(&::SireSystem::System::mustNowRecalculateFromScratch); + + 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"); } { //::SireSystem::System::nConstraints - - typedef int ( ::SireSystem::System::*nConstraints_function_type)( ) const; - nConstraints_function_type nConstraints_function_value( &::SireSystem::System::nConstraints ); - - System_exposer.def( - "nConstraints" - , nConstraints_function_value - , bp::release_gil_policy() - , "Return the number of constraints on the system" ); - + + typedef int (::SireSystem::System::*nConstraints_function_type)() const; + nConstraints_function_type nConstraints_function_value(&::SireSystem::System::nConstraints); + + System_exposer.def( + "nConstraints", nConstraints_function_value, bp::release_gil_policy(), "Return the number of constraints on the system"); } { //::SireSystem::System::nForceFields - - typedef int ( ::SireSystem::System::*nForceFields_function_type)( ) const; - nForceFields_function_type nForceFields_function_value( &::SireSystem::System::nForceFields ); - - System_exposer.def( - "nForceFields" - , nForceFields_function_value - , bp::release_gil_policy() - , "Return the number of forcefields in this system" ); - + + typedef int (::SireSystem::System::*nForceFields_function_type)() const; + nForceFields_function_type nForceFields_function_value(&::SireSystem::System::nForceFields); + + System_exposer.def( + "nForceFields", nForceFields_function_value, bp::release_gil_policy(), "Return the number of forcefields in this system"); } { //::SireSystem::System::nFrames - - typedef int ( ::SireSystem::System::*nFrames_function_type)( ) const; - nFrames_function_type nFrames_function_value( &::SireSystem::System::nFrames ); - - System_exposer.def( - "nFrames" - , nFrames_function_value - , bp::release_gil_policy() - , "" ); - + + typedef int (::SireSystem::System::*nFrames_function_type)() const; + nFrames_function_type nFrames_function_value(&::SireSystem::System::nFrames); + + System_exposer.def( + "nFrames", nFrames_function_value, bp::release_gil_policy(), ""); } { //::SireSystem::System::nFrames - - typedef int ( ::SireSystem::System::*nFrames_function_type)( ::SireBase::PropertyMap const & ) const; - nFrames_function_type nFrames_function_value( &::SireSystem::System::nFrames ); - - System_exposer.def( - "nFrames" - , nFrames_function_value - , ( bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef int (::SireSystem::System::*nFrames_function_type)(::SireBase::PropertyMap const &) const; + nFrames_function_type nFrames_function_value(&::SireSystem::System::nFrames); + + System_exposer.def( + "nFrames", nFrames_function_value, (bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireSystem::System::nMonitors - - typedef int ( ::SireSystem::System::*nMonitors_function_type)( ) const; - nMonitors_function_type nMonitors_function_value( &::SireSystem::System::nMonitors ); - - System_exposer.def( - "nMonitors" - , nMonitors_function_value - , bp::release_gil_policy() - , "Return the number of monitors in this system" ); - + + typedef int (::SireSystem::System::*nMonitors_function_type)() const; + nMonitors_function_type nMonitors_function_value(&::SireSystem::System::nMonitors); + + System_exposer.def( + "nMonitors", nMonitors_function_value, bp::release_gil_policy(), "Return the number of monitors in this system"); } { //::SireSystem::System::name - - typedef ::SireSystem::SysName const & ( ::SireSystem::System::*name_function_type)( ) const; - name_function_type name_function_value( &::SireSystem::System::name ); - - System_exposer.def( - "name" - , name_function_value - , bp::return_value_policy() - , "" ); - + + typedef ::SireSystem::SysName const &(::SireSystem::System::*name_function_type)() const; + name_function_type name_function_value(&::SireSystem::System::name); + + System_exposer.def( + "name", name_function_value, bp::return_value_policy(), ""); } { //::SireSystem::System::needsAccepting - - typedef bool ( ::SireSystem::System::*needsAccepting_function_type)( ) const; - needsAccepting_function_type needsAccepting_function_value( &::SireSystem::System::needsAccepting ); - - 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" ); - + + typedef bool (::SireSystem::System::*needsAccepting_function_type)() const; + needsAccepting_function_type needsAccepting_function_value(&::SireSystem::System::needsAccepting); + + 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"); } { //::SireSystem::System::null - - typedef ::SireSystem::System const & ( *null_function_type )( ); - null_function_type null_function_value( &::SireSystem::System::null ); - - System_exposer.def( - "null" - , null_function_value - , bp::return_value_policy< bp::copy_const_reference >() - , "" ); - - } - System_exposer.def( bp::self != bp::self ); + + typedef ::SireSystem::System const &(*null_function_type)(); + null_function_type null_function_value(&::SireSystem::System::null); + + System_exposer.def( + "null", null_function_value, bp::return_value_policy(), ""); + } + System_exposer.def(bp::self != bp::self); { //::SireSystem::System::operator= - - typedef ::SireSystem::System & ( ::SireSystem::System::*assign_function_type)( ::SireSystem::System const & ) ; - assign_function_type assign_function_value( &::SireSystem::System::operator= ); - - System_exposer.def( - "assign" - , assign_function_value - , ( bp::arg("other") ) - , bp::return_self< >() - , "" ); - - } - System_exposer.def( bp::self == bp::self ); + + typedef ::SireSystem::System &(::SireSystem::System::*assign_function_type)(::SireSystem::System const &); + assign_function_type assign_function_value(&::SireSystem::System::operator=); + + System_exposer.def( + "assign", assign_function_value, (bp::arg("other")), bp::return_self<>(), ""); + } + System_exposer.def(bp::self == bp::self); { //::SireSystem::System::operator[] - - typedef ::SireFF::FF const & ( ::SireSystem::System::*__getitem___function_type)( ::SireFF::FFID const & ) const; - __getitem___function_type __getitem___function_value( &::SireSystem::System::operator[] ); - - System_exposer.def( - "__getitem__" - , __getitem___function_value - , ( bp::arg("ffid") ) - , bp::return_value_policy() - , "" ); - + + typedef ::SireFF::FF const &(::SireSystem::System::*__getitem___function_type)(::SireFF::FFID const &) const; + __getitem___function_type __getitem___function_value(&::SireSystem::System::operator[]); + + System_exposer.def( + "__getitem__", __getitem___function_value, (bp::arg("ffid")), bp::return_value_policy(), ""); } { //::SireSystem::System::operator[] - - typedef ::SireSystem::SystemMonitor const & ( ::SireSystem::System::*__getitem___function_type)( ::SireSystem::MonitorID const & ) const; - __getitem___function_type __getitem___function_value( &::SireSystem::System::operator[] ); - - System_exposer.def( - "__getitem__" - , __getitem___function_value - , ( bp::arg("monid") ) - , bp::return_value_policy() - , "" ); - + + typedef ::SireSystem::SystemMonitor const &(::SireSystem::System::*__getitem___function_type)(::SireSystem::MonitorID const &) const; + __getitem___function_type __getitem___function_value(&::SireSystem::System::operator[]); + + System_exposer.def( + "__getitem__", __getitem___function_value, (bp::arg("monid")), bp::return_value_policy(), ""); } { //::SireSystem::System::operator[] - - typedef ::SireMol::MoleculeGroup const & ( ::SireSystem::System::*__getitem___function_type)( ::SireMol::MGID const & ) const; - __getitem___function_type __getitem___function_value( &::SireSystem::System::operator[] ); - - System_exposer.def( - "__getitem__" - , __getitem___function_value - , ( bp::arg("mgid") ) - , bp::return_value_policy() - , "" ); - + + typedef ::SireMol::MoleculeGroup const &(::SireSystem::System::*__getitem___function_type)(::SireMol::MGID const &) const; + __getitem___function_type __getitem___function_value(&::SireSystem::System::operator[]); + + System_exposer.def( + "__getitem__", __getitem___function_value, (bp::arg("mgid")), 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") ) - , "" ); - + + 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") ) - , "" ); - + + 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") ) - , "" ); - + + typedef ::QList> (::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")), ""); } { //::SireSystem::System::operator[] - - typedef ::SireMol::ViewsOfMol ( ::SireSystem::System::*__getitem___function_type)( ::SireMol::MolNum ) const; - __getitem___function_type __getitem___function_value( &::SireSystem::System::operator[] ); - - System_exposer.def( - "__getitem__" - , __getitem___function_value - , ( bp::arg("molnum") ) - , "" ); - + + typedef ::SireMol::ViewsOfMol (::SireSystem::System::*__getitem___function_type)(::SireMol::MolNum) const; + __getitem___function_type __getitem___function_value(&::SireSystem::System::operator[]); + + System_exposer.def( + "__getitem__", __getitem___function_value, (bp::arg("molnum")), ""); } { //::SireSystem::System::operator[] - - typedef ::SireMol::ViewsOfMol ( ::SireSystem::System::*__getitem___function_type)( ::SireMol::MolID const & ) const; - __getitem___function_type __getitem___function_value( &::SireSystem::System::operator[] ); - - System_exposer.def( - "__getitem__" - , __getitem___function_value - , ( bp::arg("molid") ) - , "" ); - + + typedef ::SireMol::ViewsOfMol (::SireSystem::System::*__getitem___function_type)(::SireMol::MolID const &) const; + __getitem___function_type __getitem___function_value(&::SireSystem::System::operator[]); + + System_exposer.def( + "__getitem__", __getitem___function_value, (bp::arg("molid")), ""); } { //::SireSystem::System::potential - - typedef void ( ::SireSystem::System::*potential_function_type)( ::SireFF::PotentialTable &,::SireFF::Probe const &,double ) ; - potential_function_type potential_function_value( &::SireSystem::System::potential ); - - System_exposer.def( - "potential" - , potential_function_value - , ( bp::arg("pottable"), bp::arg("probe"), bp::arg("scale_potential")=1 ) - , "Add the potentials acting on the molecules in the potential table pottable\nfrom this system onto this potential table, scaled by the optionally\nsupplied scale_potential" ); - + + typedef void (::SireSystem::System::*potential_function_type)(::SireFF::PotentialTable &, ::SireFF::Probe const &, double); + potential_function_type potential_function_value(&::SireSystem::System::potential); + + System_exposer.def( + "potential", potential_function_value, (bp::arg("pottable"), bp::arg("probe"), bp::arg("scale_potential") = 1), "Add the potentials acting on the molecules in the potential table pottable\nfrom this system onto this potential table, scaled by the optionally\nsupplied scale_potential"); } { //::SireSystem::System::potential - - typedef void ( ::SireSystem::System::*potential_function_type)( ::SireFF::PotentialTable &,::SireCAS::Symbol const &,::SireFF::Probe const &,double ) ; - potential_function_type potential_function_value( &::SireSystem::System::potential ); - - System_exposer.def( - "potential" - , potential_function_value - , ( bp::arg("pottable"), bp::arg("component"), bp::arg("probe"), bp::arg("scale_potential")=1 ) - , "Add the potentials acting on the molecules in the potential table pottable\nfrom the component of this system identified by component onto\nthis potential table, scaled by the optionally supplied scale_potential" ); - + + typedef void (::SireSystem::System::*potential_function_type)(::SireFF::PotentialTable &, ::SireCAS::Symbol const &, ::SireFF::Probe const &, double); + potential_function_type potential_function_value(&::SireSystem::System::potential); + + System_exposer.def( + "potential", potential_function_value, (bp::arg("pottable"), bp::arg("component"), bp::arg("probe"), bp::arg("scale_potential") = 1), "Add the potentials acting on the molecules in the potential table pottable\nfrom the component of this system identified by component onto\nthis potential table, scaled by the optionally supplied scale_potential"); } { //::SireSystem::System::potential - - typedef void ( ::SireSystem::System::*potential_function_type)( ::SireFF::PotentialTable &,double ) ; - potential_function_type potential_function_value( &::SireSystem::System::potential ); - - System_exposer.def( - "potential" - , potential_function_value - , ( bp::arg("pottable"), bp::arg("scale_potential")=1 ) - , "Add the potentials acting on the molecules in the potential table pottable\nfrom this system onto this potential table, scaled by the optionally\nsupplied scale_potential" ); - + + typedef void (::SireSystem::System::*potential_function_type)(::SireFF::PotentialTable &, double); + potential_function_type potential_function_value(&::SireSystem::System::potential); + + System_exposer.def( + "potential", potential_function_value, (bp::arg("pottable"), bp::arg("scale_potential") = 1), "Add the potentials acting on the molecules in the potential table pottable\nfrom this system onto this potential table, scaled by the optionally\nsupplied scale_potential"); } { //::SireSystem::System::potential - - typedef void ( ::SireSystem::System::*potential_function_type)( ::SireFF::PotentialTable &,::SireCAS::Symbol const &,double ) ; - potential_function_type potential_function_value( &::SireSystem::System::potential ); - - System_exposer.def( - "potential" - , potential_function_value - , ( bp::arg("pottable"), bp::arg("component"), bp::arg("scale_potential")=1 ) - , "Add the potentials acting on the molecules in the potential table pottable\nfrom the component of this system identified by component onto\nthis potential table, scaled by the optionally supplied scale_potential" ); - + + typedef void (::SireSystem::System::*potential_function_type)(::SireFF::PotentialTable &, ::SireCAS::Symbol const &, double); + potential_function_type potential_function_value(&::SireSystem::System::potential); + + System_exposer.def( + "potential", potential_function_value, (bp::arg("pottable"), bp::arg("component"), bp::arg("scale_potential") = 1), "Add the potentials acting on the molecules in the potential table pottable\nfrom the component of this system identified by component onto\nthis potential table, scaled by the optionally supplied scale_potential"); } { //::SireSystem::System::properties - - typedef ::SireBase::Properties ( ::SireSystem::System::*properties_function_type)( ) const; - properties_function_type properties_function_value( &::SireSystem::System::properties ); - - 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" ); - + + typedef ::SireBase::Properties (::SireSystem::System::*properties_function_type)() const; + properties_function_type properties_function_value(&::SireSystem::System::properties); + + 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"); } { //::SireSystem::System::properties - - typedef ::SireBase::Properties ( ::SireSystem::System::*properties_function_type)( ::SireFF::FFID const & ) const; - properties_function_type properties_function_value( &::SireSystem::System::properties ); - - System_exposer.def( - "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" ); - + + typedef ::SireBase::Properties (::SireSystem::System::*properties_function_type)(::SireFF::FFID const &) const; + properties_function_type properties_function_value(&::SireSystem::System::properties); + + System_exposer.def( + "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"); } { //::SireSystem::System::property - - typedef ::SireBase::Property const & ( ::SireSystem::System::*property_function_type)( ::SireBase::PropertyName const & ) const; - property_function_type property_function_value( &::SireSystem::System::property ); - - System_exposer.def( - "property" - , property_function_value - , ( bp::arg("name") ) - , 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" ); - + + typedef ::SireBase::Property const &(::SireSystem::System::*property_function_type)(::SireBase::PropertyName const &) const; + property_function_type property_function_value(&::SireSystem::System::property); + + System_exposer.def( + "property", property_function_value, (bp::arg("name")), 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"); } { //::SireSystem::System::property - - typedef ::SireBase::Property const & ( ::SireSystem::System::*property_function_type)( ::SireFF::FFID const &,::SireBase::PropertyName const & ) const; - property_function_type property_function_value( &::SireSystem::System::property ); - - System_exposer.def( - "property" - , property_function_value - , ( bp::arg("ffid"), bp::arg("name") ) - , 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" ); - + + typedef ::SireBase::Property const &(::SireSystem::System::*property_function_type)(::SireFF::FFID const &, ::SireBase::PropertyName const &) const; + property_function_type property_function_value(&::SireSystem::System::property); + + System_exposer.def( + "property", property_function_value, (bp::arg("ffid"), bp::arg("name")), 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"); } { //::SireSystem::System::propertyKeys - - typedef ::QStringList ( ::SireSystem::System::*propertyKeys_function_type)( ) const; - propertyKeys_function_type propertyKeys_function_value( &::SireSystem::System::propertyKeys ); - - System_exposer.def( - "propertyKeys" - , propertyKeys_function_value - , bp::release_gil_policy() - , "Return the names of all of the properties of this system" ); - + + typedef ::QStringList (::SireSystem::System::*propertyKeys_function_type)() const; + propertyKeys_function_type propertyKeys_function_value(&::SireSystem::System::propertyKeys); + + System_exposer.def( + "propertyKeys", propertyKeys_function_value, bp::release_gil_policy(), "Return the names of all of the properties of this system"); } { //::SireSystem::System::propertyKeys - - typedef ::QStringList ( ::SireSystem::System::*propertyKeys_function_type)( ::SireFF::FFID const & ) const; - propertyKeys_function_type propertyKeys_function_value( &::SireSystem::System::propertyKeys ); - - System_exposer.def( - "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" ); - + + typedef ::QStringList (::SireSystem::System::*propertyKeys_function_type)(::SireFF::FFID const &) const; + propertyKeys_function_type propertyKeys_function_value(&::SireSystem::System::propertyKeys); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef void ( ::SireSystem::System::*remove_function_type)( ::SireSystem::MonitorID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*remove_function_type)(::SireSystem::MonitorID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef void ( ::SireSystem::System::*remove_function_type)( ::SireFF::FFID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*remove_function_type)(::SireFF::FFID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef void ( ::SireSystem::System::*remove_function_type)( ::SireFF::FF const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*remove_function_type)(::SireFF::FF const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::SireMol::MGID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::SireMol::MGID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::SireMol::MoleculeGroup const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::SireMol::MoleculeGroup const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::SireMol::MolID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::SireMol::MolID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef void ( ::SireSystem::System::*remove_function_type)( ::SireSystem::Constraint const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*remove_function_type)(::SireSystem::Constraint const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef void ( ::SireSystem::System::*remove_function_type)( ::SireSystem::Constraints const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*remove_function_type)(::SireSystem::Constraints const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::SireMol::MoleculeView const &,::SireMol::MGID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::SireMol::MoleculeView const &, ::SireMol::MGID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::SireMol::ViewsOfMol const &,::SireMol::MGID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::SireMol::ViewsOfMol const &, ::SireMol::MGID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::SireMol::Molecules const &,::SireMol::MGID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::SireMol::Molecules const &, ::SireMol::MGID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::SireMol::MoleculeGroup const &,::SireMol::MGID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::SireMol::MoleculeGroup const &, ::SireMol::MGID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::SireMol::MolNum,::SireMol::MGID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::SireMol::MolNum, ::SireMol::MGID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::remove - - typedef bool ( ::SireSystem::System::*remove_function_type)( ::QSet< SireMol::MolNum > const &,::SireMol::MGID const & ) ; - remove_function_type remove_function_value( &::SireSystem::System::remove ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*remove_function_type)(::QSet const &, ::SireMol::MGID const &); + remove_function_type remove_function_value(&::SireSystem::System::remove); + + System_exposer.def( + "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"); } { //::SireSystem::System::removeAll - - typedef bool ( ::SireSystem::System::*removeAll_function_type)( ::SireMol::MGID const & ) ; - removeAll_function_type removeAll_function_value( &::SireSystem::System::removeAll ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*removeAll_function_type)(::SireMol::MGID const &); + removeAll_function_type removeAll_function_value(&::SireSystem::System::removeAll); + + System_exposer.def( + "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"); } { //::SireSystem::System::removeAll - - typedef bool ( ::SireSystem::System::*removeAll_function_type)( ::SireMol::MoleculeView const &,::SireMol::MGID const & ) ; - removeAll_function_type removeAll_function_value( &::SireSystem::System::removeAll ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*removeAll_function_type)(::SireMol::MoleculeView const &, ::SireMol::MGID const &); + removeAll_function_type removeAll_function_value(&::SireSystem::System::removeAll); + + System_exposer.def( + "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"); } { //::SireSystem::System::removeAll - - typedef bool ( ::SireSystem::System::*removeAll_function_type)( ::SireMol::ViewsOfMol const &,::SireMol::MGID const & ) ; - removeAll_function_type removeAll_function_value( &::SireSystem::System::removeAll ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*removeAll_function_type)(::SireMol::ViewsOfMol const &, ::SireMol::MGID const &); + removeAll_function_type removeAll_function_value(&::SireSystem::System::removeAll); + + System_exposer.def( + "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"); } { //::SireSystem::System::removeAll - - typedef bool ( ::SireSystem::System::*removeAll_function_type)( ::SireMol::Molecules const &,::SireMol::MGID const & ) ; - removeAll_function_type removeAll_function_value( &::SireSystem::System::removeAll ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*removeAll_function_type)(::SireMol::Molecules const &, ::SireMol::MGID const &); + removeAll_function_type removeAll_function_value(&::SireSystem::System::removeAll); + + System_exposer.def( + "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"); } { //::SireSystem::System::removeAll - - typedef bool ( ::SireSystem::System::*removeAll_function_type)( ::SireMol::MoleculeGroup const &,::SireMol::MGID const & ) ; - removeAll_function_type removeAll_function_value( &::SireSystem::System::removeAll ); - - System_exposer.def( - "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" ); - + + typedef bool (::SireSystem::System::*removeAll_function_type)(::SireMol::MoleculeGroup const &, ::SireMol::MGID const &); + removeAll_function_type removeAll_function_value(&::SireSystem::System::removeAll); + + System_exposer.def( + "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"); } { //::SireSystem::System::removeAllConstraints - - typedef void ( ::SireSystem::System::*removeAllConstraints_function_type)( ) ; - removeAllConstraints_function_type removeAllConstraints_function_value( &::SireSystem::System::removeAllConstraints ); - - System_exposer.def( - "removeAllConstraints" - , removeAllConstraints_function_value - , bp::release_gil_policy() - , "Remove all constraints from this system" ); - + + typedef void (::SireSystem::System::*removeAllConstraints_function_type)(); + removeAllConstraints_function_type removeAllConstraints_function_value(&::SireSystem::System::removeAllConstraints); + + System_exposer.def( + "removeAllConstraints", removeAllConstraints_function_value, bp::release_gil_policy(), "Remove all constraints from this system"); } { //::SireSystem::System::removeAllForceFields - - typedef void ( ::SireSystem::System::*removeAllForceFields_function_type)( ) ; - removeAllForceFields_function_type removeAllForceFields_function_value( &::SireSystem::System::removeAllForceFields ); - - 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" ); - + + typedef void (::SireSystem::System::*removeAllForceFields_function_type)(); + removeAllForceFields_function_type removeAllForceFields_function_value(&::SireSystem::System::removeAllForceFields); + + 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"); } { //::SireSystem::System::removeAllMoleculeGroups - - typedef void ( ::SireSystem::System::*removeAllMoleculeGroups_function_type)( ) ; - removeAllMoleculeGroups_function_type removeAllMoleculeGroups_function_value( &::SireSystem::System::removeAllMoleculeGroups ); - - System_exposer.def( - "removeAllMoleculeGroups" - , removeAllMoleculeGroups_function_value - , bp::release_gil_policy() - , "Completely remove all non-forcefield molecule groups\nfrom this system" ); - + + typedef void (::SireSystem::System::*removeAllMoleculeGroups_function_type)(); + removeAllMoleculeGroups_function_type removeAllMoleculeGroups_function_value(&::SireSystem::System::removeAllMoleculeGroups); + + System_exposer.def( + "removeAllMoleculeGroups", removeAllMoleculeGroups_function_value, bp::release_gil_policy(), "Completely remove all non-forcefield molecule groups\nfrom this system"); } { //::SireSystem::System::removeAllMolecules - - typedef bool ( ::SireSystem::System::*removeAllMolecules_function_type)( ) ; - removeAllMolecules_function_type removeAllMolecules_function_value( &::SireSystem::System::removeAllMolecules ); - - System_exposer.def( - "removeAllMolecules" - , removeAllMolecules_function_value - , bp::release_gil_policy() - , "Completely remove all molecules from this system" ); - + + typedef bool (::SireSystem::System::*removeAllMolecules_function_type)(); + removeAllMolecules_function_type removeAllMolecules_function_value(&::SireSystem::System::removeAllMolecules); + + System_exposer.def( + "removeAllMolecules", removeAllMolecules_function_value, bp::release_gil_policy(), "Completely remove all molecules from this system"); } { //::SireSystem::System::removeAllMonitors - - typedef void ( ::SireSystem::System::*removeAllMonitors_function_type)( ) ; - removeAllMonitors_function_type removeAllMonitors_function_value( &::SireSystem::System::removeAllMonitors ); - - System_exposer.def( - "removeAllMonitors" - , removeAllMonitors_function_value - , bp::release_gil_policy() - , "Completely remove all monitors from this system" ); - + + typedef void (::SireSystem::System::*removeAllMonitors_function_type)(); + removeAllMonitors_function_type removeAllMonitors_function_value(&::SireSystem::System::removeAllMonitors); + + System_exposer.def( + "removeAllMonitors", removeAllMonitors_function_value, bp::release_gil_policy(), "Completely remove all monitors from this system"); } { //::SireSystem::System::removeAllSharedProperties - - typedef void ( ::SireSystem::System::*removeAllSharedProperties_function_type)( ) ; - removeAllSharedProperties_function_type removeAllSharedProperties_function_value( &::SireSystem::System::removeAllSharedProperties ); - - System_exposer.def( - "removeAllSharedProperties" - , removeAllSharedProperties_function_value - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*removeAllSharedProperties_function_type)(); + removeAllSharedProperties_function_type removeAllSharedProperties_function_value(&::SireSystem::System::removeAllSharedProperties); + + System_exposer.def( + "removeAllSharedProperties", removeAllSharedProperties_function_value, bp::release_gil_policy(), ""); } { //::SireSystem::System::removeProperty - - typedef void ( ::SireSystem::System::*removeProperty_function_type)( ::QString const & ) ; - removeProperty_function_type removeProperty_function_value( &::SireSystem::System::removeProperty ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*removeProperty_function_type)(::QString const &); + removeProperty_function_type removeProperty_function_value(&::SireSystem::System::removeProperty); + + System_exposer.def( + "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"); } { //::SireSystem::System::removeSharedProperty - - typedef void ( ::SireSystem::System::*removeSharedProperty_function_type)( ::QString const & ) ; - removeSharedProperty_function_type removeSharedProperty_function_value( &::SireSystem::System::removeSharedProperty ); - - System_exposer.def( - "removeSharedProperty" - , removeSharedProperty_function_value - , ( bp::arg("name") ) - , bp::release_gil_policy() - , "Remove the specified shared property from this system. This will\n remove the property, and will also remove its value from all of the\n contained molecules.\n" ); - + + typedef void (::SireSystem::System::*removeSharedProperty_function_type)(::QString const &); + removeSharedProperty_function_type removeSharedProperty_function_value(&::SireSystem::System::removeSharedProperty); + + System_exposer.def( + "removeSharedProperty", removeSharedProperty_function_value, (bp::arg("name")), bp::release_gil_policy(), "Remove the specified shared property from this system. This will\n remove the property, and will also remove its value from all of the\n contained molecules.\n"); } { //::SireSystem::System::saveFrame - - typedef void ( ::SireSystem::System::*saveFrame_function_type)( int ) ; - saveFrame_function_type saveFrame_function_value( &::SireSystem::System::saveFrame ); - - System_exposer.def( - "saveFrame" - , saveFrame_function_value - , ( bp::arg("frame") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*saveFrame_function_type)(int); + saveFrame_function_type saveFrame_function_value(&::SireSystem::System::saveFrame); + + System_exposer.def( + "saveFrame", saveFrame_function_value, (bp::arg("frame")), bp::release_gil_policy(), ""); } { //::SireSystem::System::saveFrame - - typedef void ( ::SireSystem::System::*saveFrame_function_type)( ) ; - saveFrame_function_type saveFrame_function_value( &::SireSystem::System::saveFrame ); - - System_exposer.def( - "saveFrame" - , saveFrame_function_value - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*saveFrame_function_type)(); + saveFrame_function_type saveFrame_function_value(&::SireSystem::System::saveFrame); + + System_exposer.def( + "saveFrame", saveFrame_function_value, bp::release_gil_policy(), ""); } { //::SireSystem::System::saveFrame - - typedef void ( ::SireSystem::System::*saveFrame_function_type)( int,::SireBase::PropertyMap const & ) ; - saveFrame_function_type saveFrame_function_value( &::SireSystem::System::saveFrame ); - - System_exposer.def( - "saveFrame" - , saveFrame_function_value - , ( bp::arg("frame"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*saveFrame_function_type)(int, ::SireBase::PropertyMap const &); + saveFrame_function_type saveFrame_function_value(&::SireSystem::System::saveFrame); + + System_exposer.def( + "saveFrame", saveFrame_function_value, (bp::arg("frame"), bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireSystem::System::saveFrame - - typedef void ( ::SireSystem::System::*saveFrame_function_type)( ::SireBase::PropertyMap const & ) ; - saveFrame_function_type saveFrame_function_value( &::SireSystem::System::saveFrame ); - - System_exposer.def( - "saveFrame" - , saveFrame_function_value - , ( bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*saveFrame_function_type)(::SireBase::PropertyMap const &); + saveFrame_function_type saveFrame_function_value(&::SireSystem::System::saveFrame); + + System_exposer.def( + "saveFrame", saveFrame_function_value, (bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireSystem::System::setComponent - - typedef void ( ::SireSystem::System::*setComponent_function_type)( ::SireCAS::Symbol const &,double ) ; - setComponent_function_type setComponent_function_value( &::SireSystem::System::setComponent ); - - System_exposer.def( - "setComponent" - , setComponent_function_value - , ( bp::arg("symbol"), bp::arg("value") ) - , bp::release_gil_policy() - , "Synonym for System::setConstantComponent(symbol, value)" ); - + + typedef void (::SireSystem::System::*setComponent_function_type)(::SireCAS::Symbol const &, double); + setComponent_function_type setComponent_function_value(&::SireSystem::System::setComponent); + + System_exposer.def( + "setComponent", setComponent_function_value, (bp::arg("symbol"), bp::arg("value")), bp::release_gil_policy(), "Synonym for System::setConstantComponent(symbol, value)"); } { //::SireSystem::System::setComponent - - typedef void ( ::SireSystem::System::*setComponent_function_type)( ::SireCAS::Symbol const &,::SireCAS::Expression const & ) ; - setComponent_function_type setComponent_function_value( &::SireSystem::System::setComponent ); - - System_exposer.def( - "setComponent" - , setComponent_function_value - , ( bp::arg("symbol"), bp::arg("expression") ) - , bp::release_gil_policy() - , "Synonym for System::setEnergyComponent(symbol, expression)" ); - + + typedef void (::SireSystem::System::*setComponent_function_type)(::SireCAS::Symbol const &, ::SireCAS::Expression const &); + setComponent_function_type setComponent_function_value(&::SireSystem::System::setComponent); + + System_exposer.def( + "setComponent", setComponent_function_value, (bp::arg("symbol"), bp::arg("expression")), bp::release_gil_policy(), "Synonym for System::setEnergyComponent(symbol, expression)"); } { //::SireSystem::System::setConstant - - typedef void ( ::SireSystem::System::*setConstant_function_type)( ::SireCAS::Symbol const &,double ) ; - setConstant_function_type setConstant_function_value( &::SireSystem::System::setConstant ); - - System_exposer.def( - "setConstant" - , setConstant_function_value - , ( bp::arg("symbol"), bp::arg("value") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*setConstant_function_type)(::SireCAS::Symbol const &, double); + setConstant_function_type setConstant_function_value(&::SireSystem::System::setConstant); + + System_exposer.def( + "setConstant", setConstant_function_value, (bp::arg("symbol"), bp::arg("value")), bp::release_gil_policy(), ""); } { //::SireSystem::System::setConstant - - typedef void ( ::SireSystem::System::*setConstant_function_type)( ::SireCAS::Symbol const &,::SireCAS::Expression const & ) ; - setConstant_function_type setConstant_function_value( &::SireSystem::System::setConstant ); - - System_exposer.def( - "setConstant" - , setConstant_function_value - , ( bp::arg("symbol"), bp::arg("expression") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireSystem::System::*setConstant_function_type)(::SireCAS::Symbol const &, ::SireCAS::Expression const &); + setConstant_function_type setConstant_function_value(&::SireSystem::System::setConstant); + + System_exposer.def( + "setConstant", setConstant_function_value, (bp::arg("symbol"), bp::arg("expression")), bp::release_gil_policy(), ""); } { //::SireSystem::System::setConstantComponent - - typedef void ( ::SireSystem::System::*setConstantComponent_function_type)( ::SireCAS::Symbol const &,double ) ; - setConstantComponent_function_type setConstantComponent_function_value( &::SireSystem::System::setConstantComponent ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setConstantComponent_function_type)(::SireCAS::Symbol const &, double); + setConstantComponent_function_type setConstantComponent_function_value(&::SireSystem::System::setConstantComponent); + + System_exposer.def( + "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"); } { //::SireSystem::System::setConstantComponent - - typedef void ( ::SireSystem::System::*setConstantComponent_function_type)( ::SireCAS::Symbol const &,::SireCAS::Expression const & ) ; - setConstantComponent_function_type setConstantComponent_function_value( &::SireSystem::System::setConstantComponent ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setConstantComponent_function_type)(::SireCAS::Symbol const &, ::SireCAS::Expression const &); + setConstantComponent_function_type setConstantComponent_function_value(&::SireSystem::System::setConstantComponent); + + System_exposer.def( + "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"); } { //::SireSystem::System::setConstraints - - typedef void ( ::SireSystem::System::*setConstraints_function_type)( ::SireSystem::Constraints const & ) ; - setConstraints_function_type setConstraints_function_value( &::SireSystem::System::setConstraints ); - - System_exposer.def( - "setConstraints" - , setConstraints_function_value - , ( bp::arg("constraints") ) - , bp::release_gil_policy() - , "Set the constraints for the system equal to constraints" ); - + + typedef void (::SireSystem::System::*setConstraints_function_type)(::SireSystem::Constraints const &); + setConstraints_function_type setConstraints_function_value(&::SireSystem::System::setConstraints); + + System_exposer.def( + "setConstraints", setConstraints_function_value, (bp::arg("constraints")), bp::release_gil_policy(), "Set the constraints for the system equal to constraints"); } { //::SireSystem::System::setContents - - typedef void ( ::SireSystem::System::*setContents_function_type)( ::SireMol::MGID const &,::SireMol::MoleculeView const &,::SireBase::PropertyMap const & ) ; - setContents_function_type setContents_function_value( &::SireSystem::System::setContents ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setContents_function_type)(::SireMol::MGID const &, ::SireMol::MoleculeView const &, ::SireBase::PropertyMap const &); + setContents_function_type setContents_function_value(&::SireSystem::System::setContents); + + System_exposer.def( + "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"); } { //::SireSystem::System::setContents - - typedef void ( ::SireSystem::System::*setContents_function_type)( ::SireMol::MGID const &,::SireMol::ViewsOfMol const &,::SireBase::PropertyMap const & ) ; - setContents_function_type setContents_function_value( &::SireSystem::System::setContents ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setContents_function_type)(::SireMol::MGID const &, ::SireMol::ViewsOfMol const &, ::SireBase::PropertyMap const &); + setContents_function_type setContents_function_value(&::SireSystem::System::setContents); + + System_exposer.def( + "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"); } { //::SireSystem::System::setContents - - typedef void ( ::SireSystem::System::*setContents_function_type)( ::SireMol::MGID const &,::SireMol::Molecules const &,::SireBase::PropertyMap const & ) ; - setContents_function_type setContents_function_value( &::SireSystem::System::setContents ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setContents_function_type)(::SireMol::MGID const &, ::SireMol::Molecules const &, ::SireBase::PropertyMap const &); + setContents_function_type setContents_function_value(&::SireSystem::System::setContents); + + System_exposer.def( + "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"); } { //::SireSystem::System::setContents - - typedef void ( ::SireSystem::System::*setContents_function_type)( ::SireMol::MGID const &,::SireMol::MoleculeGroup const &,::SireBase::PropertyMap const & ) ; - setContents_function_type setContents_function_value( &::SireSystem::System::setContents ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setContents_function_type)(::SireMol::MGID const &, ::SireMol::MoleculeGroup const &, ::SireBase::PropertyMap const &); + setContents_function_type setContents_function_value(&::SireSystem::System::setContents); + + System_exposer.def( + "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"); } { //::SireSystem::System::setContents - - typedef void ( ::SireSystem::System::*setContents_function_type)( ::SireMol::MGID const &,::SireMol::MoleculeView const & ) ; - setContents_function_type setContents_function_value( &::SireSystem::System::setContents ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setContents_function_type)(::SireMol::MGID const &, ::SireMol::MoleculeView const &); + setContents_function_type setContents_function_value(&::SireSystem::System::setContents); + + System_exposer.def( + "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"); } { //::SireSystem::System::setContents - - typedef void ( ::SireSystem::System::*setContents_function_type)( ::SireMol::MGID const &,::SireMol::ViewsOfMol const & ) ; - setContents_function_type setContents_function_value( &::SireSystem::System::setContents ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setContents_function_type)(::SireMol::MGID const &, ::SireMol::ViewsOfMol const &); + setContents_function_type setContents_function_value(&::SireSystem::System::setContents); + + System_exposer.def( + "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"); } { //::SireSystem::System::setContents - - typedef void ( ::SireSystem::System::*setContents_function_type)( ::SireMol::MGID const &,::SireMol::Molecules const & ) ; - setContents_function_type setContents_function_value( &::SireSystem::System::setContents ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setContents_function_type)(::SireMol::MGID const &, ::SireMol::Molecules const &); + setContents_function_type setContents_function_value(&::SireSystem::System::setContents); + + System_exposer.def( + "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"); } { //::SireSystem::System::setContents - - typedef void ( ::SireSystem::System::*setContents_function_type)( ::SireMol::MGID const &,::SireMol::MoleculeGroup const & ) ; - setContents_function_type setContents_function_value( &::SireSystem::System::setContents ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setContents_function_type)(::SireMol::MGID const &, ::SireMol::MoleculeGroup const &); + setContents_function_type setContents_function_value(&::SireSystem::System::setContents); + + System_exposer.def( + "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"); } { //::SireSystem::System::setEnergyComponent - - typedef void ( ::SireSystem::System::*setEnergyComponent_function_type)( ::SireCAS::Symbol const &,::SireCAS::Expression const & ) ; - setEnergyComponent_function_type setEnergyComponent_function_value( &::SireSystem::System::setEnergyComponent ); - - System_exposer.def( - "setEnergyComponent" - , setEnergyComponent_function_value - , ( bp::arg("symbol"), bp::arg("expression") ) - , bp::release_gil_policy() - , "Set the energy component symbol equal to the expression expression" ); - + + typedef void (::SireSystem::System::*setEnergyComponent_function_type)(::SireCAS::Symbol const &, ::SireCAS::Expression const &); + setEnergyComponent_function_type setEnergyComponent_function_value(&::SireSystem::System::setEnergyComponent); + + System_exposer.def( + "setEnergyComponent", setEnergyComponent_function_value, (bp::arg("symbol"), bp::arg("expression")), bp::release_gil_policy(), "Set the energy component symbol equal to the expression expression"); } { //::SireSystem::System::setMonitors - - typedef void ( ::SireSystem::System::*setMonitors_function_type)( ::SireSystem::SystemMonitors const & ) ; - setMonitors_function_type setMonitors_function_value( &::SireSystem::System::setMonitors ); - - System_exposer.def( - "setMonitors" - , setMonitors_function_value - , ( bp::arg("monitors") ) - , bp::release_gil_policy() - , "Set the monitors of this system to monitors" ); - + + typedef void (::SireSystem::System::*setMonitors_function_type)(::SireSystem::SystemMonitors const &); + setMonitors_function_type setMonitors_function_value(&::SireSystem::System::setMonitors); + + System_exposer.def( + "setMonitors", setMonitors_function_value, (bp::arg("monitors")), bp::release_gil_policy(), "Set the monitors of this system to monitors"); } { //::SireSystem::System::setMonitors - - typedef void ( ::SireSystem::System::*setMonitors_function_type)( ::SireSystem::SystemMonitors const &,int ) ; - setMonitors_function_type setMonitors_function_value( &::SireSystem::System::setMonitors ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setMonitors_function_type)(::SireSystem::SystemMonitors const &, int); + setMonitors_function_type setMonitors_function_value(&::SireSystem::System::setMonitors); + + System_exposer.def( + "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" ); - + + 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 - - typedef void ( ::SireSystem::System::*setName_function_type)( ::QString 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" ); - + + typedef void (::SireSystem::System::*setName_function_type)(::QString 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::setProperty - - typedef void ( ::SireSystem::System::*setProperty_function_type)( ::QString const &,::SireBase::Property const & ) ; - setProperty_function_type setProperty_function_value( &::SireSystem::System::setProperty ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setProperty_function_type)(::QString const &, ::SireBase::Property const &); + setProperty_function_type setProperty_function_value(&::SireSystem::System::setProperty); + + System_exposer.def( + "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"); } { //::SireSystem::System::setProperty - - typedef void ( ::SireSystem::System::*setProperty_function_type)( ::SireFF::FFID const &,::QString const &,::SireBase::Property const & ) ; - setProperty_function_type setProperty_function_value( &::SireSystem::System::setProperty ); - - System_exposer.def( - "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" ); - + + typedef void (::SireSystem::System::*setProperty_function_type)(::SireFF::FFID const &, ::QString const &, ::SireBase::Property const &); + setProperty_function_type setProperty_function_value(&::SireSystem::System::setProperty); + + System_exposer.def( + "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"); } { //::SireSystem::System::setSharedProperty - - typedef void ( ::SireSystem::System::*setSharedProperty_function_type)( ::QString const &,::SireBase::Property const & ) ; - setSharedProperty_function_type setSharedProperty_function_value( &::SireSystem::System::setSharedProperty ); - - System_exposer.def( - "setSharedProperty" - , setSharedProperty_function_value - , ( bp::arg("name"), bp::arg("value") ) - , bp::release_gil_policy() - , "Set the shared property called name to the value value" ); - + + typedef void (::SireSystem::System::*setSharedProperty_function_type)(::QString const &, ::SireBase::Property const &); + setSharedProperty_function_type setSharedProperty_function_value(&::SireSystem::System::setSharedProperty); + + System_exposer.def( + "setSharedProperty", setSharedProperty_function_value, (bp::arg("name"), bp::arg("value")), bp::release_gil_policy(), "Set the shared property called name to the value value"); } { //::SireSystem::System::sharedProperties - - typedef ::SireBase::Properties ( ::SireSystem::System::*sharedProperties_function_type)( ) const; - sharedProperties_function_type sharedProperties_function_value( &::SireSystem::System::sharedProperties ); - - System_exposer.def( - "sharedProperties" - , sharedProperties_function_value - , bp::release_gil_policy() - , "" ); - + + typedef ::SireBase::Properties (::SireSystem::System::*sharedProperties_function_type)() const; + sharedProperties_function_type sharedProperties_function_value(&::SireSystem::System::sharedProperties); + + System_exposer.def( + "sharedProperties", sharedProperties_function_value, bp::release_gil_policy(), ""); } { //::SireSystem::System::subVersion - - typedef ::quint32 ( ::SireSystem::System::*subVersion_function_type)( ) const; - subVersion_function_type subVersion_function_value( &::SireSystem::System::subVersion ); - - System_exposer.def( - "subVersion" - , subVersion_function_value - , bp::release_gil_policy() - , "" ); - + + typedef ::quint32 (::SireSystem::System::*subVersion_function_type)() const; + subVersion_function_type subVersion_function_value(&::SireSystem::System::subVersion); + + System_exposer.def( + "subVersion", subVersion_function_value, bp::release_gil_policy(), ""); } { //::SireSystem::System::toString - - typedef ::QString ( ::SireSystem::System::*toString_function_type)( ) const; - toString_function_type toString_function_value( &::SireSystem::System::toString ); - - System_exposer.def( - "toString" - , toString_function_value - , bp::release_gil_policy() - , "Return a string representation of this system" ); - + + typedef ::QString (::SireSystem::System::*toString_function_type)() const; + toString_function_type toString_function_value(&::SireSystem::System::toString); + + System_exposer.def( + "toString", toString_function_value, bp::release_gil_policy(), "Return a string representation of this system"); } { //::SireSystem::System::totalComponent - - typedef ::SireCAS::Symbol const & ( ::SireSystem::System::*totalComponent_function_type)( ) const; - totalComponent_function_type totalComponent_function_value( &::SireSystem::System::totalComponent ); - - System_exposer.def( - "totalComponent" - , totalComponent_function_value - , bp::return_value_policy() - , "Return the symbol that represents the total energy component\nof the system" ); - + + typedef ::SireCAS::Symbol const &(::SireSystem::System::*totalComponent_function_type)() const; + totalComponent_function_type totalComponent_function_value(&::SireSystem::System::totalComponent); + + System_exposer.def( + "totalComponent", totalComponent_function_value, bp::return_value_policy(), "Return the symbol that represents the total energy component\nof the system"); } { //::SireSystem::System::typeName - - typedef char const * ( *typeName_function_type )( ); - typeName_function_type typeName_function_value( &::SireSystem::System::typeName ); - - System_exposer.def( - "typeName" - , typeName_function_value - , bp::release_gil_policy() - , "" ); - + + typedef char const *(*typeName_function_type)(); + typeName_function_type typeName_function_value(&::SireSystem::System::typeName); + + System_exposer.def( + "typeName", typeName_function_value, bp::release_gil_policy(), ""); } { //::SireSystem::System::update - - typedef void ( ::SireSystem::System::*update_function_type)( ::SireMol::MoleculeData const &,bool ) ; - update_function_type update_function_value( &::SireSystem::System::update ); - - System_exposer.def( - "update" - , update_function_value - , ( bp::arg("moldata"), bp::arg("auto_commit")=(bool)(true) ) - , "Update this system so that it uses the version of the molecule\navailable in moldata\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); - + + System_exposer.def( + "update", &update_no_gil<::SireMol::MoleculeData>, (bp::arg("moldata"), bp::arg("auto_commit") = (bool)(true)), "Update this system so that it uses the version of the molecule\navailable in moldata\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n"); } { //::SireSystem::System::update - - typedef void ( ::SireSystem::System::*update_function_type)( ::SireMol::MoleculeView const &,bool ) ; - update_function_type update_function_value( &::SireSystem::System::update ); - - System_exposer.def( - "update" - , update_function_value - , ( bp::arg("molview"), bp::arg("auto_commit")=(bool)(true) ) - , "Update this system so that it uses the same version of the molecules\npresent in molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); - + + System_exposer.def( + "update", &update_no_gil<::SireMol::MoleculeView>, (bp::arg("molview"), bp::arg("auto_commit") = (bool)(true)), "Update this system so that it uses the same version of the molecules\npresent in molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n"); } { //::SireSystem::System::update - - typedef void ( ::SireSystem::System::*update_function_type)( ::SireMol::Molecules const &,bool ) ; - update_function_type update_function_value( &::SireSystem::System::update ); - - System_exposer.def( - "update" - , update_function_value - , ( bp::arg("molecules"), bp::arg("auto_commit")=(bool)(true) ) - , "Update this system so that it uses the same version of the molecules\npresent in molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); - + + System_exposer.def( + "update", &update_no_gil<::SireMol::Molecules>, (bp::arg("molecules"), bp::arg("auto_commit") = (bool)(true)), "Update this system so that it uses the same version of the molecules\npresent in molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n"); } { //::SireSystem::System::update - - typedef void ( ::SireSystem::System::*update_function_type)( ::SireMol::MoleculeGroup const &,bool ) ; - update_function_type update_function_value( &::SireSystem::System::update ); - - System_exposer.def( - "update" - , update_function_value - , ( bp::arg("molgroup"), bp::arg("auto_commit")=(bool)(true) ) - , "Update this system so that it uses the same version of the molecules\npresent in the molecule group molgroup\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); - + + System_exposer.def( + "update", &update_no_gil<::SireMol::MoleculeGroup>, (bp::arg("molgroup"), bp::arg("auto_commit") = (bool)(true)), "Update this system so that it uses the same version of the molecules\npresent in the molecule group molgroup\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n"); } { //::SireSystem::System::update - - typedef void ( ::SireSystem::System::*update_function_type)( ::SireMol::SelectorMol const &,bool ) ; - update_function_type update_function_value( &::SireSystem::System::update ); - - System_exposer.def( - "update" - , update_function_value - , ( bp::arg("molecules"), bp::arg("auto_commit")=(bool)(true) ) - , "Update this system so that it uses the same version of the molecules\npresent in molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); - + + System_exposer.def( + "update", &update_no_gil<::SireMol::SelectorMol>, (bp::arg("molecules"), bp::arg("auto_commit") = (bool)(true)), "Update this system so that it uses the same version of the molecules\npresent in molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n"); } { //::SireSystem::System::userProperties - - typedef ::SireBase::Properties ( ::SireSystem::System::*userProperties_function_type)( ) const; - userProperties_function_type userProperties_function_value( &::SireSystem::System::userProperties ); - - System_exposer.def( - "userProperties" - , userProperties_function_value - , bp::release_gil_policy() - , "Return the values of all user-level properties of this\nsystem" ); - + + typedef ::SireBase::Properties (::SireSystem::System::*userProperties_function_type)() const; + userProperties_function_type userProperties_function_value(&::SireSystem::System::userProperties); + + System_exposer.def( + "userProperties", userProperties_function_value, bp::release_gil_policy(), "Return the values of all user-level properties of this\nsystem"); } { //::SireSystem::System::userProperty - - typedef ::SireBase::Property const & ( ::SireSystem::System::*userProperty_function_type)( ::QString const & ) const; - userProperty_function_type userProperty_function_value( &::SireSystem::System::userProperty ); - - System_exposer.def( - "userProperty" - , userProperty_function_value - , ( bp::arg("name") ) - , 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" ); - + + typedef ::SireBase::Property const &(::SireSystem::System::*userProperty_function_type)(::QString const &) const; + userProperty_function_type userProperty_function_value(&::SireSystem::System::userProperty); + + System_exposer.def( + "userProperty", userProperty_function_value, (bp::arg("name")), 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"); } { //::SireSystem::System::version - - typedef ::SireBase::Version const & ( ::SireSystem::System::*version_function_type)( ) const; - version_function_type version_function_value( &::SireSystem::System::version ); - - System_exposer.def( - "version" - , version_function_value - , bp::return_value_policy() - , "" ); - - } - System_exposer.staticmethod( "null" ); - System_exposer.staticmethod( "typeName" ); - System_exposer.def( "__copy__", &__copy__); - System_exposer.def( "__deepcopy__", &__copy__); - System_exposer.def( "clone", &__copy__); - System_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::System >, - bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); - System_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::System >, - bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); - System_exposer.def_pickle(sire_pickle_suite< ::SireSystem::System >()); - System_exposer.def( "__str__", &__str__< ::SireSystem::System > ); - System_exposer.def( "__repr__", &__str__< ::SireSystem::System > ); - System_exposer.def( "__len__", &__len_count< ::SireSystem::System > ); - } + typedef ::SireBase::Version const &(::SireSystem::System::*version_function_type)() const; + version_function_type version_function_value(&::SireSystem::System::version); + + System_exposer.def( + "version", version_function_value, bp::return_value_policy(), ""); + } + System_exposer.staticmethod("null"); + System_exposer.staticmethod("typeName"); + System_exposer.def("__copy__", &__copy__); + System_exposer.def("__deepcopy__", &__copy__); + System_exposer.def("clone", &__copy__); + System_exposer.def("__rlshift__", &__rlshift__QDataStream<::SireSystem::System>, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1, 2>>()); + System_exposer.def("__rrshift__", &__rrshift__QDataStream<::SireSystem::System>, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1, 2>>()); + System_exposer.def_pickle(sire_pickle_suite<::SireSystem::System>()); + System_exposer.def("__str__", &__str__<::SireSystem::System>); + System_exposer.def("__repr__", &__str__<::SireSystem::System>); + System_exposer.def("__len__", &__len_count<::SireSystem::System>); + } } From 7b1e4b09499cdb90e57de3c0322513c245f2cde2 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 20 Oct 2026 12:16:47 +0100 Subject: [PATCH 2/8] Free large Systems and SelectorMols with the GIL released. --- src/sire/system/_system.py | 52 +- wrapper/Mol/SelectorMol.pypp.cpp | 2014 ++++++++++++------------------ wrapper/System/System.pypp.cpp | 16 + 3 files changed, 823 insertions(+), 1259 deletions(-) diff --git a/src/sire/system/_system.py b/src/sire/system/_system.py index 37a7175ee..6b518f247 100644 --- a/src/sire/system/_system.py +++ b/src/sire/system/_system.py @@ -102,6 +102,28 @@ def clone(self): s._molecules = None return s + def _free_molecules(self): + """ + Drop the cached molecules. These can hold the last references to old + versions of the molecules, so they are freed with the GIL released, + unless something else still refers to them. + """ + from sys import getrefcount + + if self._molecules is not None and getrefcount(self._molecules) == 2: + self._molecules._free() + + self._molecules = None + + def _free(self): + """ + Empty this System, freeing its contents with the GIL released. This + is for a large System that is no longer needed, which would otherwise + be freed with the GIL held. + """ + self._free_molecules() + self._system._free() + def count(self): """Return the number of items in this System""" return self.__len__() @@ -170,7 +192,7 @@ def make_whole(self, center=None, map=None): self._system.make_whole(center=center, map=create_map(map)) - self._molecules = None + self._free_molecules() def num_frames(self, map=None): """Return the number of trajectory frames for this System""" @@ -183,7 +205,7 @@ def load_frame(self, i, map=None): from ..base import create_map self._system.load_frame(i, map=create_map(map)) - self._molecules = None + self._free_molecules() def save_frame(self, i=None, map=None): """Save the current coordinates to the ith frame of this System. @@ -199,21 +221,21 @@ def save_frame(self, i=None, map=None): else: self._system.save_frame(i, map=map) - self._molecules = None + self._free_molecules() def delete_frame(self, i, map=None): """Delete the ith frame from the trajectory""" from ..base import create_map self._system.delete_frame(i, map=create_map(map)) - self._molecules = None + self._free_molecules() def delete_all_frames(self, map=None): """Delete all the frames from the trajectory""" from ..base import create_map self._system.delete_all_frames(map=create_map(map)) - self._molecules = None + self._free_molecules() def to_molecule_group(self): """Return this System converted to a sire.mol.MoleculeGroup""" @@ -803,7 +825,7 @@ def set_space(self, space, map=None): if space_property.has_source(): self._system.set_property(space_property.source(), space) - self._molecules = None + self._free_molecules() def set_time(self, time, map=None): """ @@ -842,7 +864,7 @@ def set_time(self, time, map=None): if time_property.has_source(): self._system.set_property(time_property.source(), time) - self._molecules = None + self._free_molecules() def energy_trajectory( self, @@ -976,14 +998,14 @@ def property(self, *args, **kwargs): def set_property(self, *args, **kwargs): """Set the System property according to the passed arguments""" self._system.set_property(*args, **kwargs) - self._molecules = None + self._free_molecules() def set_shared_property(self, name, value): """Set the shared System property according to the passed arguments""" from ..base import wrap self._system.set_shared_property(name, wrap(value)) - self._molecules = None + self._free_molecules() def add_shared_property(self, name, value=None): """ @@ -997,7 +1019,7 @@ def add_shared_property(self, name, value=None): self._system.add_shared_property(name, wrap(value)) - self._molecules = None + self._free_molecules() def remove_shared_property(self, *args, **kwargs): """ @@ -1005,7 +1027,7 @@ def remove_shared_property(self, *args, **kwargs): as a non-shared property for the future """ self._system.remove_shared_property(*args, **kwargs) - self._molecules = None + self._free_molecules() def remove_all_shared_properties(self, *args, **kwargs): """ @@ -1013,7 +1035,7 @@ def remove_all_shared_properties(self, *args, **kwargs): as being shared from this system """ self._system.remove_all_shared_properties(*args, **kwargs) - self._molecules = None + self._free_molecules() def properties(self): """Return all of the System-level properties of this System""" @@ -1161,7 +1183,7 @@ def add(self, molecules): else: self._system.add_if_unique(molecules, mgid) - self._molecules = None + self._free_molecules() def remove(self, molecules): """ @@ -1182,7 +1204,7 @@ def remove(self, molecules): for molnum in molnums: self._system.remove(molnum) - self._molecules = None + self._free_molecules() def update(self, molecules): """ @@ -1200,7 +1222,7 @@ def update(self, molecules): else: self._system.update(molecules) - self._molecules = None + self._free_molecules() def apply(self, *args, **kwargs): """ diff --git a/wrapper/Mol/SelectorMol.pypp.cpp b/wrapper/Mol/SelectorMol.pypp.cpp index a1c443d01..291e32aca 100644 --- a/wrapper/Mol/SelectorMol.pypp.cpp +++ b/wrapper/Mol/SelectorMol.pypp.cpp @@ -2,8 +2,8 @@ // (C) Christopher Woods, LGPL >= 3 License -#include "boost/python.hpp" #include "SelectorMol.pypp.hpp" +#include "boost/python.hpp" namespace bp = boost::python; @@ -53,7 +53,7 @@ namespace bp = boost::python; #include "selectormol.h" -SireMol::SelectorMol __copy__(const SireMol::SelectorMol &other){ return SireMol::SelectorMol(other); } +SireMol::SelectorMol __copy__(const SireMol::SelectorMol &other) { return SireMol::SelectorMol(other); } #include "Helpers/copy.hpp" @@ -63,1484 +63,1010 @@ SireMol::SelectorMol __copy__(const SireMol::SelectorMol &other){ return SireMol #include "Helpers/release_gil_policy.hpp" +#include "Helpers/scoped_gil_release.hpp" + #include "Helpers/len.hpp" -void register_SelectorMol_class(){ +#include + +namespace +{ + /** Destroying a large selection frees every molecule it holds the last + reference to. This empties the selection, freeing its contents with + the GIL released. + */ + void free_no_gil(SireMol::SelectorMol &mols) + { + std::unique_ptr contents(new SireMol::SelectorMol(mols)); + mols = SireMol::SelectorMol(); + + SireHelpers::ScopedGILRelease release_gil; + contents.reset(); + } +} + +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< QList< SireMol::Molecule > const & >(( bp::arg("mols") ), "") ); - SelectorMol_exposer.def( bp::init< QVector< SireMol::Molecule > 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< QList< SireMol::SelectorMol > const & >(( bp::arg("others") ), "") ); - SelectorMol_exposer.def( bp::init< QVector< SireMol::SelectorMol > const & >(( bp::arg("others") ), "") ); - SelectorMol_exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("other") ), "") ); + typedef bp::class_> 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((bp::arg("mol")), "")); + SelectorMol_exposer.def(bp::init((bp::arg("mols")), "")); + SelectorMol_exposer.def(bp::init((bp::arg("mols")), "")); + SelectorMol_exposer.def(bp::init((bp::arg("mols")), "")); + SelectorMol_exposer.def(bp::init((bp::arg("mols")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("mols")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("mols")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("other")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("other")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("other")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("other")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("other")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("others")), "")); + SelectorMol_exposer.def(bp::init const &>((bp::arg("others")), "")); + SelectorMol_exposer.def(bp::init((bp::arg("other")), "")); + SelectorMol_exposer.def("_free", &free_no_gil, "Empty this selection, freeing its contents with the GIL released"); { //::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() - , "" ); - + + typedef ::QList (::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::append - - typedef void ( ::SireMol::SelectorMol::*append_function_type)( ::SireMol::Molecule const & ) ; - append_function_type append_function_value( &::SireMol::SelectorMol::append ); - - SelectorMol_exposer.def( - "append" - , append_function_value - , ( bp::arg("mol") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*append_function_type)(::SireMol::Molecule const &); + append_function_type append_function_value(&::SireMol::SelectorMol::append); + + SelectorMol_exposer.def( + "append", append_function_value, (bp::arg("mol")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::append - - typedef void ( ::SireMol::SelectorMol::*append_function_type)( ::SireMol::SelectorMol const & ) ; - append_function_type append_function_value( &::SireMol::SelectorMol::append ); - - SelectorMol_exposer.def( - "append" - , append_function_value - , ( bp::arg("mols") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*append_function_type)(::SireMol::SelectorMol const &); + append_function_type append_function_value(&::SireMol::SelectorMol::append); + + SelectorMol_exposer.def( + "append", append_function_value, (bp::arg("mols")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::atom - - typedef ::SireMol::Atom ( ::SireMol::SelectorMol::*atom_function_type)( int,::SireBase::PropertyMap const & ) const; - atom_function_type atom_function_value( &::SireMol::SelectorMol::atom ); - - SelectorMol_exposer.def( - "atom" - , atom_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Atom (::SireMol::SelectorMol::*atom_function_type)(int, ::SireBase::PropertyMap const &) const; + atom_function_type atom_function_value(&::SireMol::SelectorMol::atom); + + SelectorMol_exposer.def( + "atom", atom_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::atom - - typedef ::SireMol::Atom ( ::SireMol::SelectorMol::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - atom_function_type atom_function_value( &::SireMol::SelectorMol::atom ); - - SelectorMol_exposer.def( - "atom" - , atom_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Atom (::SireMol::SelectorMol::*atom_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + atom_function_type atom_function_value(&::SireMol::SelectorMol::atom); + + SelectorMol_exposer.def( + "atom", atom_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::atom - - typedef ::SireMol::Atom ( ::SireMol::SelectorMol::*atom_function_type)( ::SireMol::AtomID const &,::SireBase::PropertyMap const & ) const; - atom_function_type atom_function_value( &::SireMol::SelectorMol::atom ); - - SelectorMol_exposer.def( - "atom" - , atom_function_value - , ( bp::arg("atomid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Atom (::SireMol::SelectorMol::*atom_function_type)(::SireMol::AtomID const &, ::SireBase::PropertyMap const &) const; + atom_function_type atom_function_value(&::SireMol::SelectorMol::atom); + + SelectorMol_exposer.def( + "atom", atom_function_value, (bp::arg("atomid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + typedef ::SireMol::SelectorM (::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,::SireBase::PropertyMap const & ) const; - atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); - - SelectorMol_exposer.def( - "atoms" - , atoms_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*atoms_function_type)(int, ::SireBase::PropertyMap const &) const; + atoms_function_type atoms_function_value(&::SireMol::SelectorMol::atoms); + + SelectorMol_exposer.def( + "atoms", atoms_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::atoms - - typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; - atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); - - SelectorMol_exposer.def( - "atoms" - , atoms_function_value - , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*atoms_function_type)(::SireBase::Slice const &, ::SireBase::PropertyMap const &) const; + atoms_function_type atoms_function_value(&::SireMol::SelectorMol::atoms); + + SelectorMol_exposer.def( + "atoms", atoms_function_value, (bp::arg("slice"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::atoms - - typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; - atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); - - SelectorMol_exposer.def( - "atoms" - , atoms_function_value - , ( bp::arg("idxs"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*atoms_function_type)(::QList const &, ::SireBase::PropertyMap const &) const; + atoms_function_type atoms_function_value(&::SireMol::SelectorMol::atoms); + + SelectorMol_exposer.def( + "atoms", atoms_function_value, (bp::arg("idxs"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::atoms - - typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); - - SelectorMol_exposer.def( - "atoms" - , atoms_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*atoms_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + atoms_function_type atoms_function_value(&::SireMol::SelectorMol::atoms); + + SelectorMol_exposer.def( + "atoms", atoms_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::atoms - - typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ::SireMol::AtomID const &,::SireBase::PropertyMap const & ) const; - atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); - - SelectorMol_exposer.def( - "atoms" - , atoms_function_value - , ( bp::arg("atomid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*atoms_function_type)(::SireMol::AtomID const &, ::SireBase::PropertyMap const &) const; + atoms_function_type atoms_function_value(&::SireMol::SelectorMol::atoms); + + SelectorMol_exposer.def( + "atoms", atoms_function_value, (bp::arg("atomid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::chain - - typedef ::SireMol::Chain ( ::SireMol::SelectorMol::*chain_function_type)( int,::SireBase::PropertyMap const & ) const; - chain_function_type chain_function_value( &::SireMol::SelectorMol::chain ); - - SelectorMol_exposer.def( - "chain" - , chain_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Chain (::SireMol::SelectorMol::*chain_function_type)(int, ::SireBase::PropertyMap const &) const; + chain_function_type chain_function_value(&::SireMol::SelectorMol::chain); + + SelectorMol_exposer.def( + "chain", chain_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::chain - - typedef ::SireMol::Chain ( ::SireMol::SelectorMol::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - chain_function_type chain_function_value( &::SireMol::SelectorMol::chain ); - - SelectorMol_exposer.def( - "chain" - , chain_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Chain (::SireMol::SelectorMol::*chain_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + chain_function_type chain_function_value(&::SireMol::SelectorMol::chain); + + SelectorMol_exposer.def( + "chain", chain_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::chain - - typedef ::SireMol::Chain ( ::SireMol::SelectorMol::*chain_function_type)( ::SireMol::ChainID const &,::SireBase::PropertyMap const & ) const; - chain_function_type chain_function_value( &::SireMol::SelectorMol::chain ); - - SelectorMol_exposer.def( - "chain" - , chain_function_value - , ( bp::arg("chainid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Chain (::SireMol::SelectorMol::*chain_function_type)(::SireMol::ChainID const &, ::SireBase::PropertyMap const &) const; + chain_function_type chain_function_value(&::SireMol::SelectorMol::chain); + + SelectorMol_exposer.def( + "chain", chain_function_value, (bp::arg("chainid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + typedef ::SireMol::SelectorM (::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,::SireBase::PropertyMap const & ) const; - chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); - - SelectorMol_exposer.def( - "chains" - , chains_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*chains_function_type)(int, ::SireBase::PropertyMap const &) const; + chains_function_type chains_function_value(&::SireMol::SelectorMol::chains); + + SelectorMol_exposer.def( + "chains", chains_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::chains - - typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; - chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); - - SelectorMol_exposer.def( - "chains" - , chains_function_value - , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*chains_function_type)(::SireBase::Slice const &, ::SireBase::PropertyMap const &) const; + chains_function_type chains_function_value(&::SireMol::SelectorMol::chains); + + SelectorMol_exposer.def( + "chains", chains_function_value, (bp::arg("slice"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::chains - - typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; - chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); - - SelectorMol_exposer.def( - "chains" - , chains_function_value - , ( bp::arg("idxs"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*chains_function_type)(::QList const &, ::SireBase::PropertyMap const &) const; + chains_function_type chains_function_value(&::SireMol::SelectorMol::chains); + + SelectorMol_exposer.def( + "chains", chains_function_value, (bp::arg("idxs"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::chains - - typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); - - SelectorMol_exposer.def( - "chains" - , chains_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*chains_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + chains_function_type chains_function_value(&::SireMol::SelectorMol::chains); + + SelectorMol_exposer.def( + "chains", chains_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::chains - - typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ::SireMol::ChainID const &,::SireBase::PropertyMap const & ) const; - chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); - - SelectorMol_exposer.def( - "chains" - , chains_function_value - , ( bp::arg("chainid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*chains_function_type)(::SireMol::ChainID const &, ::SireBase::PropertyMap const &) const; + chains_function_type chains_function_value(&::SireMol::SelectorMol::chains); + + SelectorMol_exposer.def( + "chains", chains_function_value, (bp::arg("chainid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + 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() - , "" ); - + + 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,::SireBase::PropertyMap const & ) const; - cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorMol::cutGroup ); - - SelectorMol_exposer.def( - "cutGroup" - , cutGroup_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::CutGroup (::SireMol::SelectorMol::*cutGroup_function_type)(int, ::SireBase::PropertyMap const &) const; + cutGroup_function_type cutGroup_function_value(&::SireMol::SelectorMol::cutGroup); + + SelectorMol_exposer.def( + "cutGroup", cutGroup_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::cutGroup - - typedef ::SireMol::CutGroup ( ::SireMol::SelectorMol::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorMol::cutGroup ); - - SelectorMol_exposer.def( - "cutGroup" - , cutGroup_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::CutGroup (::SireMol::SelectorMol::*cutGroup_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + cutGroup_function_type cutGroup_function_value(&::SireMol::SelectorMol::cutGroup); + + SelectorMol_exposer.def( + "cutGroup", cutGroup_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::cutGroup - - typedef ::SireMol::CutGroup ( ::SireMol::SelectorMol::*cutGroup_function_type)( ::SireMol::CGID const &,::SireBase::PropertyMap const & ) const; - cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorMol::cutGroup ); - - SelectorMol_exposer.def( - "cutGroup" - , cutGroup_function_value - , ( bp::arg("cgid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::CutGroup (::SireMol::SelectorMol::*cutGroup_function_type)(::SireMol::CGID const &, ::SireBase::PropertyMap const &) const; + cutGroup_function_type cutGroup_function_value(&::SireMol::SelectorMol::cutGroup); + + SelectorMol_exposer.def( + "cutGroup", cutGroup_function_value, (bp::arg("cgid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + typedef ::SireMol::SelectorM (::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,::SireBase::PropertyMap const & ) const; - cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); - - SelectorMol_exposer.def( - "cutGroups" - , cutGroups_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*cutGroups_function_type)(int, ::SireBase::PropertyMap const &) const; + cutGroups_function_type cutGroups_function_value(&::SireMol::SelectorMol::cutGroups); + + SelectorMol_exposer.def( + "cutGroups", cutGroups_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::cutGroups - - typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; - cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); - - SelectorMol_exposer.def( - "cutGroups" - , cutGroups_function_value - , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*cutGroups_function_type)(::SireBase::Slice const &, ::SireBase::PropertyMap const &) const; + cutGroups_function_type cutGroups_function_value(&::SireMol::SelectorMol::cutGroups); + + SelectorMol_exposer.def( + "cutGroups", cutGroups_function_value, (bp::arg("slice"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::cutGroups - - typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; - cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); - - SelectorMol_exposer.def( - "cutGroups" - , cutGroups_function_value - , ( bp::arg("idxs"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*cutGroups_function_type)(::QList const &, ::SireBase::PropertyMap const &) const; + cutGroups_function_type cutGroups_function_value(&::SireMol::SelectorMol::cutGroups); + + SelectorMol_exposer.def( + "cutGroups", cutGroups_function_value, (bp::arg("idxs"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::cutGroups - - typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); - - SelectorMol_exposer.def( - "cutGroups" - , cutGroups_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*cutGroups_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + cutGroups_function_type cutGroups_function_value(&::SireMol::SelectorMol::cutGroups); + + SelectorMol_exposer.def( + "cutGroups", cutGroups_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::cutGroups - - typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ::SireMol::CGID const &,::SireBase::PropertyMap const & ) const; - cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); - - SelectorMol_exposer.def( - "cutGroups" - , cutGroups_function_value - , ( bp::arg("cgid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*cutGroups_function_type)(::SireMol::CGID const &, ::SireBase::PropertyMap const &) const; + cutGroups_function_type cutGroups_function_value(&::SireMol::SelectorMol::cutGroups); + + SelectorMol_exposer.def( + "cutGroups", cutGroups_function_value, (bp::arg("cgid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::deleteAllFrames - - typedef void ( ::SireMol::SelectorMol::*deleteAllFrames_function_type)( ) ; - deleteAllFrames_function_type deleteAllFrames_function_value( &::SireMol::SelectorMol::deleteAllFrames ); - - SelectorMol_exposer.def( - "deleteAllFrames" - , deleteAllFrames_function_value - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*deleteAllFrames_function_type)(); + deleteAllFrames_function_type deleteAllFrames_function_value(&::SireMol::SelectorMol::deleteAllFrames); + + SelectorMol_exposer.def( + "deleteAllFrames", deleteAllFrames_function_value, bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::deleteAllFrames - - typedef void ( ::SireMol::SelectorMol::*deleteAllFrames_function_type)( ::SireBase::PropertyMap const & ) ; - deleteAllFrames_function_type deleteAllFrames_function_value( &::SireMol::SelectorMol::deleteAllFrames ); - - SelectorMol_exposer.def( - "deleteAllFrames" - , deleteAllFrames_function_value - , ( bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*deleteAllFrames_function_type)(::SireBase::PropertyMap const &); + deleteAllFrames_function_type deleteAllFrames_function_value(&::SireMol::SelectorMol::deleteAllFrames); + + SelectorMol_exposer.def( + "deleteAllFrames", deleteAllFrames_function_value, (bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::deleteFrame - - typedef void ( ::SireMol::SelectorMol::*deleteFrame_function_type)( int ) ; - deleteFrame_function_type deleteFrame_function_value( &::SireMol::SelectorMol::deleteFrame ); - - SelectorMol_exposer.def( - "deleteFrame" - , deleteFrame_function_value - , ( bp::arg("frame") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*deleteFrame_function_type)(int); + deleteFrame_function_type deleteFrame_function_value(&::SireMol::SelectorMol::deleteFrame); + + SelectorMol_exposer.def( + "deleteFrame", deleteFrame_function_value, (bp::arg("frame")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::deleteFrame - - typedef void ( ::SireMol::SelectorMol::*deleteFrame_function_type)( int,::SireBase::PropertyMap const & ) ; - deleteFrame_function_type deleteFrame_function_value( &::SireMol::SelectorMol::deleteFrame ); - - SelectorMol_exposer.def( - "deleteFrame" - , deleteFrame_function_value - , ( bp::arg("frame"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*deleteFrame_function_type)(int, ::SireBase::PropertyMap const &); + deleteFrame_function_type deleteFrame_function_value(&::SireMol::SelectorMol::deleteFrame); + + SelectorMol_exposer.def( + "deleteFrame", deleteFrame_function_value, (bp::arg("frame"), bp::arg("map")), 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() - , "" ); - + + 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::extract - - typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*extract_function_type)( ) const; - extract_function_type extract_function_value( &::SireMol::SelectorMol::extract ); - - SelectorMol_exposer.def( - "extract" - , extract_function_value - , bp::release_gil_policy() - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*extract_function_type)() const; + extract_function_type extract_function_value(&::SireMol::SelectorMol::extract); + + SelectorMol_exposer.def( + "extract", extract_function_value, bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::find - - typedef ::QList< long long > ( ::SireMol::SelectorMol::*find_function_type)( ::SireMol::Molecule const & ) const; - find_function_type find_function_value( &::SireMol::SelectorMol::find ); - - SelectorMol_exposer.def( - "find" - , find_function_value - , ( bp::arg("view") ) - , bp::release_gil_policy() - , "Return the index of view in this list of molecules.\n Returns an empty list if the view is not in this collection\n" ); - + + typedef ::QList (::SireMol::SelectorMol::*find_function_type)(::SireMol::Molecule const &) const; + find_function_type find_function_value(&::SireMol::SelectorMol::find); + + SelectorMol_exposer.def( + "find", find_function_value, (bp::arg("view")), bp::release_gil_policy(), "Return the index of view in this list of molecules.\n Returns an empty list if the view is not in this collection\n"); } { //::SireMol::SelectorMol::find - - typedef ::QList< long long > ( ::SireMol::SelectorMol::*find_function_type)( ::SireMol::SelectorMol const & ) const; - find_function_type find_function_value( &::SireMol::SelectorMol::find ); - - SelectorMol_exposer.def( - "find" - , find_function_value - , ( bp::arg("views") ) - , bp::release_gil_policy() - , "Return the index of views in this list of molecules.\n Returns an empty list if none of the views are in this collection\n" ); - + + typedef ::QList (::SireMol::SelectorMol::*find_function_type)(::SireMol::SelectorMol const &) const; + find_function_type find_function_value(&::SireMol::SelectorMol::find); + + SelectorMol_exposer.def( + "find", find_function_value, (bp::arg("views")), bp::release_gil_policy(), "Return the index of views in this list of molecules.\n Returns an empty list if none of the views are in this collection\n"); } { //::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() - , "" ); - + + typedef ::QList (::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() - , "" ); - + + 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::isSelector - - typedef bool ( ::SireMol::SelectorMol::*isSelector_function_type)( ) const; - isSelector_function_type isSelector_function_value( &::SireMol::SelectorMol::isSelector ); - - SelectorMol_exposer.def( - "isSelector" - , isSelector_function_value - , bp::release_gil_policy() - , "" ); - + + typedef bool (::SireMol::SelectorMol::*isSelector_function_type)() const; + isSelector_function_type isSelector_function_value(&::SireMol::SelectorMol::isSelector); + + SelectorMol_exposer.def( + "isSelector", isSelector_function_value, bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::loadFrame - - typedef void ( ::SireMol::SelectorMol::*loadFrame_function_type)( int ) ; - loadFrame_function_type loadFrame_function_value( &::SireMol::SelectorMol::loadFrame ); - - SelectorMol_exposer.def( - "loadFrame" - , loadFrame_function_value - , ( bp::arg("frame") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*loadFrame_function_type)(int); + loadFrame_function_type loadFrame_function_value(&::SireMol::SelectorMol::loadFrame); + + SelectorMol_exposer.def( + "loadFrame", loadFrame_function_value, (bp::arg("frame")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::loadFrame - - typedef void ( ::SireMol::SelectorMol::*loadFrame_function_type)( int,::SireBase::LazyEvaluator const & ) ; - loadFrame_function_type loadFrame_function_value( &::SireMol::SelectorMol::loadFrame ); - - SelectorMol_exposer.def( - "loadFrame" - , loadFrame_function_value - , ( bp::arg("frame"), bp::arg("evaluator") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*loadFrame_function_type)(int, ::SireBase::LazyEvaluator const &); + loadFrame_function_type loadFrame_function_value(&::SireMol::SelectorMol::loadFrame); + + SelectorMol_exposer.def( + "loadFrame", loadFrame_function_value, (bp::arg("frame"), bp::arg("evaluator")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::loadFrame - - typedef void ( ::SireMol::SelectorMol::*loadFrame_function_type)( int,::SireBase::PropertyMap const & ) ; - loadFrame_function_type loadFrame_function_value( &::SireMol::SelectorMol::loadFrame ); - - SelectorMol_exposer.def( - "loadFrame" - , loadFrame_function_value - , ( bp::arg("frame"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*loadFrame_function_type)(int, ::SireBase::PropertyMap const &); + loadFrame_function_type loadFrame_function_value(&::SireMol::SelectorMol::loadFrame); + + SelectorMol_exposer.def( + "loadFrame", loadFrame_function_value, (bp::arg("frame"), bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::loadFrame - - typedef void ( ::SireMol::SelectorMol::*loadFrame_function_type)( int,::SireBase::LazyEvaluator const &,::SireBase::PropertyMap const & ) ; - loadFrame_function_type loadFrame_function_value( &::SireMol::SelectorMol::loadFrame ); - - SelectorMol_exposer.def( - "loadFrame" - , loadFrame_function_value - , ( bp::arg("frame"), bp::arg("evaluator"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*loadFrame_function_type)(int, ::SireBase::LazyEvaluator const &, ::SireBase::PropertyMap const &); + loadFrame_function_type loadFrame_function_value(&::SireMol::SelectorMol::loadFrame); + + SelectorMol_exposer.def( + "loadFrame", loadFrame_function_value, (bp::arg("frame"), bp::arg("evaluator"), bp::arg("map")), 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() - , "" ); - + + typedef ::QVector (::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,::SireBase::PropertyMap const & ) const; - molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); - - SelectorMol_exposer.def( - "molecule" - , molecule_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Molecule (::SireMol::SelectorMol::*molecule_function_type)(int, ::SireBase::PropertyMap const &) const; + molecule_function_type molecule_function_value(&::SireMol::SelectorMol::molecule); + + SelectorMol_exposer.def( + "molecule", molecule_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecule - - typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); - - SelectorMol_exposer.def( - "molecule" - , molecule_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Molecule (::SireMol::SelectorMol::*molecule_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + molecule_function_type molecule_function_value(&::SireMol::SelectorMol::molecule); + + SelectorMol_exposer.def( + "molecule", molecule_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecule - - typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::SireMol::MolIdx const &,::SireBase::PropertyMap const & ) const; - molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); - - SelectorMol_exposer.def( - "molecule" - , molecule_function_value - , ( bp::arg("molidx"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Molecule (::SireMol::SelectorMol::*molecule_function_type)(::SireMol::MolIdx const &, ::SireBase::PropertyMap const &) const; + molecule_function_type molecule_function_value(&::SireMol::SelectorMol::molecule); + + SelectorMol_exposer.def( + "molecule", molecule_function_value, (bp::arg("molidx"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecule - - typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::SireMol::MolName const &,::SireBase::PropertyMap const & ) const; - molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); - - SelectorMol_exposer.def( - "molecule" - , molecule_function_value - , ( bp::arg("molname"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Molecule (::SireMol::SelectorMol::*molecule_function_type)(::SireMol::MolName const &, ::SireBase::PropertyMap const &) const; + molecule_function_type molecule_function_value(&::SireMol::SelectorMol::molecule); + + SelectorMol_exposer.def( + "molecule", molecule_function_value, (bp::arg("molname"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecule - - typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::SireMol::MolNum const &,::SireBase::PropertyMap const & ) const; - molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); - - SelectorMol_exposer.def( - "molecule" - , molecule_function_value - , ( bp::arg("molnum"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Molecule (::SireMol::SelectorMol::*molecule_function_type)(::SireMol::MolNum const &, ::SireBase::PropertyMap const &) const; + molecule_function_type molecule_function_value(&::SireMol::SelectorMol::molecule); + + SelectorMol_exposer.def( + "molecule", molecule_function_value, (bp::arg("molnum"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecule - - typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::SireMol::MolID const &,::SireBase::PropertyMap const & ) const; - molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); - - SelectorMol_exposer.def( - "molecule" - , molecule_function_value - , ( bp::arg("molid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Molecule (::SireMol::SelectorMol::*molecule_function_type)(::SireMol::MolID const &, ::SireBase::PropertyMap const &) const; + molecule_function_type molecule_function_value(&::SireMol::SelectorMol::molecule); + + SelectorMol_exposer.def( + "molecule", molecule_function_value, (bp::arg("molid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + 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,::SireBase::PropertyMap const & ) const; - molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); - - SelectorMol_exposer.def( - "molecules" - , molecules_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*molecules_function_type)(int, ::SireBase::PropertyMap const &) const; + molecules_function_type molecules_function_value(&::SireMol::SelectorMol::molecules); + + SelectorMol_exposer.def( + "molecules", molecules_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecules - - typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; - molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); - - SelectorMol_exposer.def( - "molecules" - , molecules_function_value - , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*molecules_function_type)(::SireBase::Slice const &, ::SireBase::PropertyMap const &) const; + molecules_function_type molecules_function_value(&::SireMol::SelectorMol::molecules); + + SelectorMol_exposer.def( + "molecules", molecules_function_value, (bp::arg("slice"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecules - - typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; - molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); - - SelectorMol_exposer.def( - "molecules" - , molecules_function_value - , ( bp::arg("idxs"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*molecules_function_type)(::QList const &, ::SireBase::PropertyMap const &) const; + molecules_function_type molecules_function_value(&::SireMol::SelectorMol::molecules); + + SelectorMol_exposer.def( + "molecules", molecules_function_value, (bp::arg("idxs"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecules - - typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); - - SelectorMol_exposer.def( - "molecules" - , molecules_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*molecules_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + molecules_function_type molecules_function_value(&::SireMol::SelectorMol::molecules); + + SelectorMol_exposer.def( + "molecules", molecules_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecules - - typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireMol::MolIdx const &,::SireBase::PropertyMap const & ) const; - molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); - - SelectorMol_exposer.def( - "molecules" - , molecules_function_value - , ( bp::arg("molidx"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*molecules_function_type)(::SireMol::MolIdx const &, ::SireBase::PropertyMap const &) const; + molecules_function_type molecules_function_value(&::SireMol::SelectorMol::molecules); + + SelectorMol_exposer.def( + "molecules", molecules_function_value, (bp::arg("molidx"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecules - - typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireMol::MolName const &,::SireBase::PropertyMap const & ) const; - molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); - - SelectorMol_exposer.def( - "molecules" - , molecules_function_value - , ( bp::arg("molname"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*molecules_function_type)(::SireMol::MolName const &, ::SireBase::PropertyMap const &) const; + molecules_function_type molecules_function_value(&::SireMol::SelectorMol::molecules); + + SelectorMol_exposer.def( + "molecules", molecules_function_value, (bp::arg("molname"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecules - - typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireMol::MolNum const &,::SireBase::PropertyMap const & ) const; - molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); - - SelectorMol_exposer.def( - "molecules" - , molecules_function_value - , ( bp::arg("molnum"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*molecules_function_type)(::SireMol::MolNum const &, ::SireBase::PropertyMap const &) const; + molecules_function_type molecules_function_value(&::SireMol::SelectorMol::molecules); + + SelectorMol_exposer.def( + "molecules", molecules_function_value, (bp::arg("molnum"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::molecules - - typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireMol::MolID const &,::SireBase::PropertyMap const & ) const; - molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); - - SelectorMol_exposer.def( - "molecules" - , molecules_function_value - , ( bp::arg("molid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*molecules_function_type)(::SireMol::MolID const &, ::SireBase::PropertyMap const &) const; + molecules_function_type molecules_function_value(&::SireMol::SelectorMol::molecules); + + SelectorMol_exposer.def( + "molecules", molecules_function_value, (bp::arg("molid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + 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() - , "" ); - + + 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() - , "" ); - + + 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::nFrames - - typedef int ( ::SireMol::SelectorMol::*nFrames_function_type)( ) const; - nFrames_function_type nFrames_function_value( &::SireMol::SelectorMol::nFrames ); - - SelectorMol_exposer.def( - "nFrames" - , nFrames_function_value - , bp::release_gil_policy() - , "" ); - + + typedef int (::SireMol::SelectorMol::*nFrames_function_type)() const; + nFrames_function_type nFrames_function_value(&::SireMol::SelectorMol::nFrames); + + SelectorMol_exposer.def( + "nFrames", nFrames_function_value, bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::nFrames - - typedef int ( ::SireMol::SelectorMol::*nFrames_function_type)( ::SireBase::PropertyMap const & ) const; - nFrames_function_type nFrames_function_value( &::SireMol::SelectorMol::nFrames ); - - SelectorMol_exposer.def( - "nFrames" - , nFrames_function_value - , ( bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef int (::SireMol::SelectorMol::*nFrames_function_type)(::SireBase::PropertyMap const &) const; + nFrames_function_type nFrames_function_value(&::SireMol::SelectorMol::nFrames); + + SelectorMol_exposer.def( + "nFrames", nFrames_function_value, (bp::arg("map")), 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() - , "" ); - + + 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() - , "" ); - + + 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() - , "" ); - + + 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() - , "" ); - + + typedef ::QList (::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 ); - SelectorMol_exposer.def( bp::self + bp::other< SireMol::Molecule >() ); - SelectorMol_exposer.def( bp::self + bp::self ); + + typedef ::QList (::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); + SelectorMol_exposer.def(bp::self + bp::other()); + 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 ); + + 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") ) - , "" ); - + + 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") ) - , "" ); - + + 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") ) - , "" ); - + + typedef ::SireMol::SelectorMol (::SireMol::SelectorMol::*__getitem___function_type)(::QList 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") ) - , "" ); - + + 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") ) - , "" ); - + + 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") ) - , "" ); - + + 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") ) - , "" ); - + + 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") ) - , "" ); - + + 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,::SireBase::PropertyMap const & ) const; - residue_function_type residue_function_value( &::SireMol::SelectorMol::residue ); - - SelectorMol_exposer.def( - "residue" - , residue_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Residue (::SireMol::SelectorMol::*residue_function_type)(int, ::SireBase::PropertyMap const &) const; + residue_function_type residue_function_value(&::SireMol::SelectorMol::residue); + + SelectorMol_exposer.def( + "residue", residue_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::residue - - typedef ::SireMol::Residue ( ::SireMol::SelectorMol::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - residue_function_type residue_function_value( &::SireMol::SelectorMol::residue ); - - SelectorMol_exposer.def( - "residue" - , residue_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Residue (::SireMol::SelectorMol::*residue_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + residue_function_type residue_function_value(&::SireMol::SelectorMol::residue); + + SelectorMol_exposer.def( + "residue", residue_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::residue - - typedef ::SireMol::Residue ( ::SireMol::SelectorMol::*residue_function_type)( ::SireMol::ResID const &,::SireBase::PropertyMap const & ) const; - residue_function_type residue_function_value( &::SireMol::SelectorMol::residue ); - - SelectorMol_exposer.def( - "residue" - , residue_function_value - , ( bp::arg("resid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Residue (::SireMol::SelectorMol::*residue_function_type)(::SireMol::ResID const &, ::SireBase::PropertyMap const &) const; + residue_function_type residue_function_value(&::SireMol::SelectorMol::residue); + + SelectorMol_exposer.def( + "residue", residue_function_value, (bp::arg("resid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + typedef ::SireMol::SelectorM (::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,::SireBase::PropertyMap const & ) const; - residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); - - SelectorMol_exposer.def( - "residues" - , residues_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*residues_function_type)(int, ::SireBase::PropertyMap const &) const; + residues_function_type residues_function_value(&::SireMol::SelectorMol::residues); + + SelectorMol_exposer.def( + "residues", residues_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::residues - - typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; - residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); - - SelectorMol_exposer.def( - "residues" - , residues_function_value - , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*residues_function_type)(::SireBase::Slice const &, ::SireBase::PropertyMap const &) const; + residues_function_type residues_function_value(&::SireMol::SelectorMol::residues); + + SelectorMol_exposer.def( + "residues", residues_function_value, (bp::arg("slice"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::residues - - typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; - residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); - - SelectorMol_exposer.def( - "residues" - , residues_function_value - , ( bp::arg("idxs"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*residues_function_type)(::QList const &, ::SireBase::PropertyMap const &) const; + residues_function_type residues_function_value(&::SireMol::SelectorMol::residues); + + SelectorMol_exposer.def( + "residues", residues_function_value, (bp::arg("idxs"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::residues - - typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); - - SelectorMol_exposer.def( - "residues" - , residues_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*residues_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + residues_function_type residues_function_value(&::SireMol::SelectorMol::residues); + + SelectorMol_exposer.def( + "residues", residues_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::residues - - typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ::SireMol::ResID const &,::SireBase::PropertyMap const & ) const; - residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); - - SelectorMol_exposer.def( - "residues" - , residues_function_value - , ( bp::arg("resid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*residues_function_type)(::SireMol::ResID const &, ::SireBase::PropertyMap const &) const; + residues_function_type residues_function_value(&::SireMol::SelectorMol::residues); + + SelectorMol_exposer.def( + "residues", residues_function_value, (bp::arg("resid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::saveFrame - - typedef void ( ::SireMol::SelectorMol::*saveFrame_function_type)( int ) ; - saveFrame_function_type saveFrame_function_value( &::SireMol::SelectorMol::saveFrame ); - - SelectorMol_exposer.def( - "saveFrame" - , saveFrame_function_value - , ( bp::arg("frame") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*saveFrame_function_type)(int); + saveFrame_function_type saveFrame_function_value(&::SireMol::SelectorMol::saveFrame); + + SelectorMol_exposer.def( + "saveFrame", saveFrame_function_value, (bp::arg("frame")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::saveFrame - - typedef void ( ::SireMol::SelectorMol::*saveFrame_function_type)( ) ; - saveFrame_function_type saveFrame_function_value( &::SireMol::SelectorMol::saveFrame ); - - SelectorMol_exposer.def( - "saveFrame" - , saveFrame_function_value - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*saveFrame_function_type)(); + saveFrame_function_type saveFrame_function_value(&::SireMol::SelectorMol::saveFrame); + + SelectorMol_exposer.def( + "saveFrame", saveFrame_function_value, bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::saveFrame - - typedef void ( ::SireMol::SelectorMol::*saveFrame_function_type)( int,::SireBase::PropertyMap const & ) ; - saveFrame_function_type saveFrame_function_value( &::SireMol::SelectorMol::saveFrame ); - - SelectorMol_exposer.def( - "saveFrame" - , saveFrame_function_value - , ( bp::arg("frame"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*saveFrame_function_type)(int, ::SireBase::PropertyMap const &); + saveFrame_function_type saveFrame_function_value(&::SireMol::SelectorMol::saveFrame); + + SelectorMol_exposer.def( + "saveFrame", saveFrame_function_value, (bp::arg("frame"), bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::saveFrame - - typedef void ( ::SireMol::SelectorMol::*saveFrame_function_type)( ::SireBase::PropertyMap const & ) ; - saveFrame_function_type saveFrame_function_value( &::SireMol::SelectorMol::saveFrame ); - - SelectorMol_exposer.def( - "saveFrame" - , saveFrame_function_value - , ( bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*saveFrame_function_type)(::SireBase::PropertyMap const &); + saveFrame_function_type saveFrame_function_value(&::SireMol::SelectorMol::saveFrame); + + SelectorMol_exposer.def( + "saveFrame", saveFrame_function_value, (bp::arg("map")), 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() - , "" ); - + + 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::search - - typedef ::SireMol::SelectResult ( ::SireMol::SelectorMol::*search_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - search_function_type search_function_value( &::SireMol::SelectorMol::search ); - - SelectorMol_exposer.def( - "search" - , search_function_value - , ( bp::arg("search_string"), bp::arg("map") ) - , bp::release_gil_policy() - , "" ); - + + typedef ::SireMol::SelectResult (::SireMol::SelectorMol::*search_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + search_function_type search_function_value(&::SireMol::SelectorMol::search); + + SelectorMol_exposer.def( + "search", search_function_value, (bp::arg("search_string"), bp::arg("map")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::segment - - typedef ::SireMol::Segment ( ::SireMol::SelectorMol::*segment_function_type)( int,::SireBase::PropertyMap const & ) const; - segment_function_type segment_function_value( &::SireMol::SelectorMol::segment ); - - SelectorMol_exposer.def( - "segment" - , segment_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Segment (::SireMol::SelectorMol::*segment_function_type)(int, ::SireBase::PropertyMap const &) const; + segment_function_type segment_function_value(&::SireMol::SelectorMol::segment); + + SelectorMol_exposer.def( + "segment", segment_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::segment - - typedef ::SireMol::Segment ( ::SireMol::SelectorMol::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - segment_function_type segment_function_value( &::SireMol::SelectorMol::segment ); - - SelectorMol_exposer.def( - "segment" - , segment_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Segment (::SireMol::SelectorMol::*segment_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + segment_function_type segment_function_value(&::SireMol::SelectorMol::segment); + + SelectorMol_exposer.def( + "segment", segment_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::segment - - typedef ::SireMol::Segment ( ::SireMol::SelectorMol::*segment_function_type)( ::SireMol::SegID const &,::SireBase::PropertyMap const & ) const; - segment_function_type segment_function_value( &::SireMol::SelectorMol::segment ); - - SelectorMol_exposer.def( - "segment" - , segment_function_value - , ( bp::arg("segid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::Segment (::SireMol::SelectorMol::*segment_function_type)(::SireMol::SegID const &, ::SireBase::PropertyMap const &) const; + segment_function_type segment_function_value(&::SireMol::SelectorMol::segment); + + SelectorMol_exposer.def( + "segment", segment_function_value, (bp::arg("segid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + typedef ::SireMol::SelectorM (::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,::SireBase::PropertyMap const & ) const; - segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); - - SelectorMol_exposer.def( - "segments" - , segments_function_value - , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*segments_function_type)(int, ::SireBase::PropertyMap const &) const; + segments_function_type segments_function_value(&::SireMol::SelectorMol::segments); + + SelectorMol_exposer.def( + "segments", segments_function_value, (bp::arg("i"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::segments - - typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; - segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); - - SelectorMol_exposer.def( - "segments" - , segments_function_value - , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*segments_function_type)(::SireBase::Slice const &, ::SireBase::PropertyMap const &) const; + segments_function_type segments_function_value(&::SireMol::SelectorMol::segments); + + SelectorMol_exposer.def( + "segments", segments_function_value, (bp::arg("slice"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::segments - - typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; - segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); - - SelectorMol_exposer.def( - "segments" - , segments_function_value - , ( bp::arg("idxs"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*segments_function_type)(::QList const &, ::SireBase::PropertyMap const &) const; + segments_function_type segments_function_value(&::SireMol::SelectorMol::segments); + + SelectorMol_exposer.def( + "segments", segments_function_value, (bp::arg("idxs"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::segments - - typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); - - SelectorMol_exposer.def( - "segments" - , segments_function_value - , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*segments_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + segments_function_type segments_function_value(&::SireMol::SelectorMol::segments); + + SelectorMol_exposer.def( + "segments", segments_function_value, (bp::arg("name"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::SireMol::SelectorMol::segments - - typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ::SireMol::SegID const &,::SireBase::PropertyMap const & ) const; - segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); - - SelectorMol_exposer.def( - "segments" - , segments_function_value - , ( bp::arg("segid"), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); - + + typedef ::SireMol::SelectorM (::SireMol::SelectorMol::*segments_function_type)(::SireMol::SegID const &, ::SireBase::PropertyMap const &) const; + segments_function_type segments_function_value(&::SireMol::SelectorMol::segments); + + SelectorMol_exposer.def( + "segments", segments_function_value, (bp::arg("segid"), bp::arg("map") = SireBase::PropertyMap()), ""); } { //::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() - , "" ); - + + 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() - , "" ); - + + typedef ::QList> (::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() - , "" ); - + + 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::toMolecules - - typedef ::SireMol::Molecules ( ::SireMol::SelectorMol::*toMolecules_function_type)( ) const; - toMolecules_function_type toMolecules_function_value( &::SireMol::SelectorMol::toMolecules ); - - SelectorMol_exposer.def( - "toMolecules" - , toMolecules_function_value - , bp::release_gil_policy() - , "" ); - + + typedef ::SireMol::Molecules (::SireMol::SelectorMol::*toMolecules_function_type)() const; + toMolecules_function_type toMolecules_function_value(&::SireMol::SelectorMol::toMolecules); + + SelectorMol_exposer.def( + "toMolecules", toMolecules_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() - , "" ); - + + 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() - , "" ); - + + 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() - , "" ); - + + 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::update - - typedef void ( ::SireMol::SelectorMol::*update_function_type)( ::SireMol::MoleculeView const & ) ; - update_function_type update_function_value( &::SireMol::SelectorMol::update ); - - SelectorMol_exposer.def( - "update" - , update_function_value - , ( bp::arg("molview") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*update_function_type)(::SireMol::MoleculeView const &); + update_function_type update_function_value(&::SireMol::SelectorMol::update); + + SelectorMol_exposer.def( + "update", update_function_value, (bp::arg("molview")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::update - - typedef void ( ::SireMol::SelectorMol::*update_function_type)( ::SireMol::MoleculeData const & ) ; - update_function_type update_function_value( &::SireMol::SelectorMol::update ); - - SelectorMol_exposer.def( - "update" - , update_function_value - , ( bp::arg("moldata") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*update_function_type)(::SireMol::MoleculeData const &); + update_function_type update_function_value(&::SireMol::SelectorMol::update); + + SelectorMol_exposer.def( + "update", update_function_value, (bp::arg("moldata")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::update - - typedef void ( ::SireMol::SelectorMol::*update_function_type)( ::SireMol::Molecules const & ) ; - update_function_type update_function_value( &::SireMol::SelectorMol::update ); - - SelectorMol_exposer.def( - "update" - , update_function_value - , ( bp::arg("molecules") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*update_function_type)(::SireMol::Molecules const &); + update_function_type update_function_value(&::SireMol::SelectorMol::update); + + SelectorMol_exposer.def( + "update", update_function_value, (bp::arg("molecules")), bp::release_gil_policy(), ""); } { //::SireMol::SelectorMol::update - - typedef void ( ::SireMol::SelectorMol::*update_function_type)( ::SireMol::SelectorMol const & ) ; - update_function_type update_function_value( &::SireMol::SelectorMol::update ); - - SelectorMol_exposer.def( - "update" - , update_function_value - , ( bp::arg("molecules") ) - , bp::release_gil_policy() - , "" ); - + + typedef void (::SireMol::SelectorMol::*update_function_type)(::SireMol::SelectorMol const &); + update_function_type update_function_value(&::SireMol::SelectorMol::update); + + SelectorMol_exposer.def( + "update", update_function_value, (bp::arg("molecules")), 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 > ); - } + 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/System/System.pypp.cpp b/wrapper/System/System.pypp.cpp index 6e83f4835..b3ae353da 100644 --- a/wrapper/System/System.pypp.cpp +++ b/wrapper/System/System.pypp.cpp @@ -88,6 +88,8 @@ SireSystem::System __copy__(const SireSystem::System &other) { return SireSystem #include "Helpers/len.hpp" +#include + namespace { /** Updating a system or deleting its frames touches every molecule, which @@ -113,6 +115,19 @@ namespace SireHelpers::ScopedGILRelease release_gil; system.deleteAllFrames(map); } + + /** Destroying a large system frees every molecule it holds the last + reference to. This empties the system, freeing its contents with the + GIL released. + */ + void free_no_gil(SireSystem::System &system) + { + std::unique_ptr contents(new SireSystem::System(system)); + system = SireSystem::System(); + + SireHelpers::ScopedGILRelease release_gil; + contents.reset(); + } } void register_System_class() @@ -124,6 +139,7 @@ void register_System_class() bp::scope System_scope(System_exposer); System_exposer.def(bp::init((bp::arg("name")), "Construct a named System")); System_exposer.def(bp::init((bp::arg("other")), "Copy constructor")); + System_exposer.def("_free", &free_no_gil, "Empty this system, freeing its contents with the GIL released"); { //::SireSystem::System::UID typedef ::QUuid const &(::SireSystem::System::*UID_function_type)() const; From 7e323577bea63eb2747aab9d3abfa0188f160842 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 20 Oct 2026 12:26:50 +0100 Subject: [PATCH 3/8] Skip building the current frame when writing a trajectory. --- corelib/src/libs/SireIO/amberrst.cpp | 15 ++++++++++----- corelib/src/libs/SireIO/ambertraj.cpp | 13 +++++++++---- corelib/src/libs/SireIO/dcd.cpp | 13 +++++++++---- corelib/src/libs/SireIO/moleculeparser.cpp | 18 ++++++++++++------ corelib/src/libs/SireIO/moleculeparser.h | 2 ++ corelib/src/libs/SireIO/trr.cpp | 13 +++++++++---- corelib/src/libs/SireIO/xtc.cpp | 13 +++++++++---- 7 files changed, 60 insertions(+), 27 deletions(-) diff --git a/corelib/src/libs/SireIO/amberrst.cpp b/corelib/src/libs/SireIO/amberrst.cpp index f87cf2df7..3f1c2c307 100644 --- a/corelib/src/libs/SireIO/amberrst.cpp +++ b/corelib/src/libs/SireIO/amberrst.cpp @@ -47,15 +47,15 @@ #include "SireUnits/units.h" #include "SireBase/generalunitproperty.h" +#include "SireBase/getinstalldir.h" #include "SireBase/parallel.h" -#include "SireBase/stringproperty.h" -#include "SireBase/timeproperty.h" #include "SireBase/progressbar.h" #include "SireBase/releasegil.h" -#include "SireBase/getinstalldir.h" +#include "SireBase/stringproperty.h" +#include "SireBase/timeproperty.h" -#include "SireIO/errors.h" #include "SireError/errors.h" +#include "SireIO/errors.h" #include "SireStream/shareddatastream.h" @@ -1641,7 +1641,9 @@ AmberRst::AmberRst(const System &system, const PropertyMap &map) : ConcreteProperty(system, map), nframes(1), frame_idx(0) { - current_frame = MoleculeParser::createFrame(system, map); + // A trajectory is written frame by frame from the system's trajectory + if (not this->writingTrajectory()) + current_frame = MoleculeParser::createFrame(system, map); } /** Copy constructor */ @@ -1803,6 +1805,9 @@ void AmberRst::addToSystem(System &system, const PropertyMap &map) const /** Return the number of atoms whose coordinates are contained in this restart file */ int AmberRst::nAtoms() const { + if (this->writingTrajectory()) + return this->savedSystem().nAtoms(); + return current_frame.nAtoms(); } diff --git a/corelib/src/libs/SireIO/ambertraj.cpp b/corelib/src/libs/SireIO/ambertraj.cpp index 5a402152f..5e2e91960 100644 --- a/corelib/src/libs/SireIO/ambertraj.cpp +++ b/corelib/src/libs/SireIO/ambertraj.cpp @@ -48,13 +48,13 @@ #include "SireBase/generalunitproperty.h" #include "SireBase/parallel.h" +#include "SireBase/progressbar.h" +#include "SireBase/releasegil.h" #include "SireBase/stringproperty.h" #include "SireBase/timeproperty.h" -#include "SireBase/releasegil.h" -#include "SireBase/progressbar.h" -#include "SireIO/errors.h" #include "SireError/errors.h" +#include "SireIO/errors.h" #include "SireStream/shareddatastream.h" @@ -871,7 +871,9 @@ AmberTraj::AmberTraj(const System &system, const PropertyMap &map) else if (ttle.isEmpty()) ttle = "TRAJ file create by sire"; - current_frame = MoleculeParser::createFrame(system, map); + // A trajectory is written frame by frame from the system's trajectory + if (not this->writingTrajectory()) + current_frame = MoleculeParser::createFrame(system, map); } /** Copy constructor */ @@ -1031,6 +1033,9 @@ QString AmberTraj::title() const /** Return the number of atoms whose coordinates are contained in this restart file */ int AmberTraj::nAtoms() const { + if (this->writingTrajectory()) + return this->savedSystem().nAtoms(); + return current_frame.nAtoms(); } diff --git a/corelib/src/libs/SireIO/dcd.cpp b/corelib/src/libs/SireIO/dcd.cpp index e3b50b2b3..072f37c44 100644 --- a/corelib/src/libs/SireIO/dcd.cpp +++ b/corelib/src/libs/SireIO/dcd.cpp @@ -51,11 +51,11 @@ #include "SireBase/generalunitproperty.h" #include "SireBase/getinstalldir.h" #include "SireBase/parallel.h" +#include "SireBase/progressbar.h" +#include "SireBase/releasegil.h" #include "SireBase/stringproperty.h" #include "SireBase/timeproperty.h" #include "SireBase/unittest.h" -#include "SireBase/releasegil.h" -#include "SireBase/progressbar.h" #include "SireIO/errors.h" @@ -66,10 +66,10 @@ #include "sire_version.h" #include +#include #include #include #include -#include using namespace SireIO; using namespace SireIO::detail; @@ -884,7 +884,9 @@ DCD::DCD(const System &system, const PropertyMap &map) : ConcreteProperty(system, map), nframes(1), frame_idx(0) { - current_frame = MoleculeParser::createFrame(system, map); + // A trajectory is written frame by frame from the system's trajectory + if (not this->writingTrajectory()) + current_frame = MoleculeParser::createFrame(system, map); } /** Copy constructor */ @@ -1046,6 +1048,9 @@ void DCD::addToSystem(System &system, const PropertyMap &map) const /** Return the number of atoms whose coordinates are contained in this restart file */ int DCD::nAtoms() const { + if (this->writingTrajectory()) + return this->savedSystem().nAtoms(); + return current_frame.nAtoms(); } diff --git a/corelib/src/libs/SireIO/moleculeparser.cpp b/corelib/src/libs/SireIO/moleculeparser.cpp index 6dca6781f..dd5562979 100644 --- a/corelib/src/libs/SireIO/moleculeparser.cpp +++ b/corelib/src/libs/SireIO/moleculeparser.cpp @@ -34,26 +34,26 @@ #include "SireBase/booleanproperty.h" #include "SireBase/parallel.h" -#include "SireBase/stringproperty.h" #include "SireBase/releasegil.h" +#include "SireBase/stringproperty.h" #include "SireFF/ffdetail.h" #include "SireMM/mmdetail.h" #include "SireMol/core.h" -#include "SireMol/molecule.h" -#include "SireMol/moleditor.h" -#include "SireMol/trajectory.h" #include "SireMol/mgname.h" #include "SireMol/mgnum.h" +#include "SireMol/molecule.h" +#include "SireMol/moleditor.h" #include "SireMol/molidx.h" +#include "SireMol/trajectory.h" #include "SireMol/trajectoryaligner.h" -#include "SireBase/timeproperty.h" #include "SireBase/parallel.h" +#include "SireBase/progressbar.h" #include "SireBase/propertylist.h" #include "SireBase/releasegil.h" -#include "SireBase/progressbar.h" +#include "SireBase/timeproperty.h" #include "SireSystem/system.h" @@ -3312,6 +3312,12 @@ QString MoleculeParser::saveTitle() const return saved_system.name().value(); } +/** Return the System being written */ +const System &MoleculeParser::savedSystem() const +{ + return saved_system; +} + Q_GLOBAL_STATIC(NullParser, nullParser) const NullParser &MoleculeParser::null() diff --git a/corelib/src/libs/SireIO/moleculeparser.h b/corelib/src/libs/SireIO/moleculeparser.h index 1f0dfaa6f..e4cd45c6a 100644 --- a/corelib/src/libs/SireIO/moleculeparser.h +++ b/corelib/src/libs/SireIO/moleculeparser.h @@ -320,6 +320,8 @@ namespace SireIO QString saveTitle() const; + const SireSystem::System &savedSystem() const; + private: static MoleculeParserPtr _pvt_parse(const QString &filename, const PropertyMap &map); diff --git a/corelib/src/libs/SireIO/trr.cpp b/corelib/src/libs/SireIO/trr.cpp index 78a2310c2..1c00b3cc0 100644 --- a/corelib/src/libs/SireIO/trr.cpp +++ b/corelib/src/libs/SireIO/trr.cpp @@ -47,13 +47,13 @@ #include "SireBase/generalunitproperty.h" #include "SireBase/parallel.h" -#include "SireBase/stringproperty.h" -#include "SireBase/timeproperty.h" #include "SireBase/progressbar.h" #include "SireBase/releasegil.h" +#include "SireBase/stringproperty.h" +#include "SireBase/timeproperty.h" -#include "SireIO/errors.h" #include "SireError/errors.h" +#include "SireIO/errors.h" #include "SireStream/shareddatastream.h" @@ -188,7 +188,9 @@ TRR::TRR(const System &system, const PropertyMap &map) : ConcreteProperty(system, map), nframes(1), frame_idx(0) { - current_frame = MoleculeParser::createFrame(system, map); + // A trajectory is written frame by frame from the system's trajectory + if (not this->writingTrajectory()) + current_frame = MoleculeParser::createFrame(system, map); } /** Copy constructor */ @@ -350,6 +352,9 @@ void TRR::addToSystem(System &system, const PropertyMap &map) const /** Return the number of atoms whose coordinates are contained in this restart file */ int TRR::nAtoms() const { + if (this->writingTrajectory()) + return this->savedSystem().nAtoms(); + return current_frame.nAtoms(); } diff --git a/corelib/src/libs/SireIO/xtc.cpp b/corelib/src/libs/SireIO/xtc.cpp index 002f4691d..cfb2f614d 100644 --- a/corelib/src/libs/SireIO/xtc.cpp +++ b/corelib/src/libs/SireIO/xtc.cpp @@ -47,13 +47,13 @@ #include "SireBase/generalunitproperty.h" #include "SireBase/parallel.h" -#include "SireBase/stringproperty.h" -#include "SireBase/timeproperty.h" #include "SireBase/progressbar.h" #include "SireBase/releasegil.h" +#include "SireBase/stringproperty.h" +#include "SireBase/timeproperty.h" -#include "SireIO/errors.h" #include "SireError/errors.h" +#include "SireIO/errors.h" #include "SireStream/shareddatastream.h" @@ -188,7 +188,9 @@ XTC::XTC(const System &system, const PropertyMap &map) : ConcreteProperty(system, map), nframes(1), frame_idx(0) { - current_frame = MoleculeParser::createFrame(system, map); + // A trajectory is written frame by frame from the system's trajectory + if (not this->writingTrajectory()) + current_frame = MoleculeParser::createFrame(system, map); } /** Copy constructor */ @@ -350,6 +352,9 @@ void XTC::addToSystem(System &system, const PropertyMap &map) const /** Return the number of atoms whose coordinates are contained in this restart file */ int XTC::nAtoms() const { + if (this->writingTrajectory()) + return this->savedSystem().nAtoms(); + return current_frame.nAtoms(); } From fa821600e15480a3f4594de4cb9759ddd753bc60 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 20 Oct 2026 12:27:02 +0100 Subject: [PATCH 4/8] Don't load the current frame when saving a DCD, TRR or XTC trajectory. --- src/sire/_load.py | 40 ++++++++++++++++++++++++++++++----- tests/io/test_trajectories.py | 22 +++++++++++++++++++ 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/src/sire/_load.py b/src/sire/_load.py index 66334ce8a..e128cfdcd 100644 --- a/src/sire/_load.py +++ b/src/sire/_load.py @@ -198,7 +198,7 @@ def _resolve_path(path, directory=".", auto_unzip=True, silent=False): return _resolve_path(filename, directory=directory, silent=silent) else: raise IOError( - f"Cannot overwrite {filename} as it is an " "existing directory!" + f"Cannot overwrite {filename} as it is an existing directory!" ) if not silent: @@ -527,6 +527,31 @@ def save_to_string( return MoleculeParser.parse(molecules, format, map=map).lines() +def _is_trajectory_format(filename, format, map): + """ + Internal function to return whether every file will be written by a + trajectory parser, which writes each frame from the trajectory rather + than from the current coordinates of the molecules + """ + import os + + trajectory_formats = {"DCD", "TRR", "XTC"} + + if format is None: + if map.specified("fileformat"): + return False + + # MoleculeParser uses everything after the first dot as the format. + parts = os.path.basename(filename).split(".", 1) + + if len(parts) != 2: + return False + + format = [parts[1]] + + return all(f.upper() in trajectory_formats for f in format) + + def save( molecules, filename: _Union[str, _List[str]], @@ -685,7 +710,13 @@ def save( if molecules._is_trajectory_iterator(): # we are saving a trajectory - not just the molecules map = molecules._populate_map(map) - molecules = molecules.current() + + # Trajectory formats write every frame from the trajectory itself, + # so the current frame only needs loading for other formats. + if _is_trajectory_format(filename, format, map): + molecules = molecules._view + else: + molecules = molecules.current() molecules = _to_legacy_system(molecules) @@ -708,7 +739,7 @@ def load_test_files(files: _Union[_List[str], str], *args, map=None): sire.system.System The loaded molecules """ - if not type(files) is list: + if type(files) is not list: files = [files] for arg in args: @@ -940,8 +971,7 @@ def smarts( mol = mols if mol.num_atoms() == 0: raise ValueError( - "Failed to generate a molecule from the smarts string " - f"'{smarts[0]}'." + f"Failed to generate a molecule from the smarts string '{smarts[0]}'." ) else: empty_mols = [] diff --git a/tests/io/test_trajectories.py b/tests/io/test_trajectories.py index 64d5b7983..8c4fc1e63 100644 --- a/tests/io/test_trajectories.py +++ b/tests/io/test_trajectories.py @@ -130,6 +130,28 @@ def test_trajectories(tmpdir, ala_traj): assert_coords_equal(m[0], m2[0], precision) +@pytest.mark.parametrize("format", ["DCD", "TRR", "XTC"]) +def test_trajectory_ignores_current_frame(tmpdir, ala_traj, format): + mols = ala_traj.clone() + + # The current coordinates aren't from any of the frames being saved. + mols.load_frame(100) + + d = tmpdir.mkdir(f"test_trajectory_ignores_current_frame_{format}") + + top = sr.save(mols, d.join("top"), format=["PRMTOP"]) + traj = sr.save(mols.trajectory()[0:5], d.join("traj"), format=[format]) + + mols2 = sr.load(top + traj) + + assert mols2.num_frames() == 5 + + for i in range(5): + m = mols.trajectory()[i].current() + m2 = mols2.trajectory()[i].current() + assert_coords_equal(m[0], m2[0], 0.01) + + def test_frame_names(tmpdir, ala_traj): mols = ala_traj.clone() From 77eaa842395db05cb62d87606d99c46a8aaf916e Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 20 Oct 2026 12:46:45 +0100 Subject: [PATCH 5/8] Fix review issues in freeing systems and saving trajectories. --- src/sire/_load.py | 4 +++- src/sire/system/_system.py | 12 ++++++------ wrapper/Mol/SelectorMol.pypp.cpp | 6 ++---- wrapper/System/System.pypp.cpp | 12 ++++-------- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/sire/_load.py b/src/sire/_load.py index e128cfdcd..300470f1b 100644 --- a/src/sire/_load.py +++ b/src/sire/_load.py @@ -713,7 +713,9 @@ def save( # Trajectory formats write every frame from the trajectory itself, # so the current frame only needs loading for other formats. - if _is_trajectory_format(filename, format, map): + if molecules._view is not None and _is_trajectory_format( + filename, format, map + ): molecules = molecules._view else: molecules = molecules.current() diff --git a/src/sire/system/_system.py b/src/sire/system/_system.py index 6b518f247..9638c4680 100644 --- a/src/sire/system/_system.py +++ b/src/sire/system/_system.py @@ -105,12 +105,10 @@ def clone(self): def _free_molecules(self): """ Drop the cached molecules. These can hold the last references to old - versions of the molecules, so they are freed with the GIL released, - unless something else still refers to them. + versions of the molecules, so they are freed with the GIL released. + The cache is never handed out, so nothing else can refer to it. """ - from sys import getrefcount - - if self._molecules is not None and getrefcount(self._molecules) == 2: + if self._molecules is not None: self._molecules._free() self._molecules = None @@ -119,7 +117,9 @@ def _free(self): """ Empty this System, freeing its contents with the GIL released. This is for a large System that is no longer needed, which would otherwise - be freed with the GIL held. + be freed with the GIL held. The underlying legacy System is emptied in + place, so nothing else may refer to it, e.g. one passed to System() or + returned by _to_legacy_system(). """ self._free_molecules() self._system._free() diff --git a/wrapper/Mol/SelectorMol.pypp.cpp b/wrapper/Mol/SelectorMol.pypp.cpp index 291e32aca..21a5959e4 100644 --- a/wrapper/Mol/SelectorMol.pypp.cpp +++ b/wrapper/Mol/SelectorMol.pypp.cpp @@ -71,10 +71,8 @@ SireMol::SelectorMol __copy__(const SireMol::SelectorMol &other) { return SireMo namespace { - /** Destroying a large selection frees every molecule it holds the last - reference to. This empties the selection, freeing its contents with - the GIL released. - */ + /** Empty the selection, destroying its contents with the GIL released, + since freeing every molecule of a large selection is slow. */ void free_no_gil(SireMol::SelectorMol &mols) { std::unique_ptr contents(new SireMol::SelectorMol(mols)); diff --git a/wrapper/System/System.pypp.cpp b/wrapper/System/System.pypp.cpp index b3ae353da..2d79c2c0e 100644 --- a/wrapper/System/System.pypp.cpp +++ b/wrapper/System/System.pypp.cpp @@ -92,10 +92,8 @@ SireSystem::System __copy__(const SireSystem::System &other) { return SireSystem namespace { - /** Updating a system or deleting its frames touches every molecule, which - is slow for large systems. Nothing in either call touches Python, so - the GIL is dropped for the duration. - */ + /** Updating a system or deleting its frames touches every molecule and + never uses Python, so the GIL is released for the duration. */ template void update_no_gil(SireSystem::System &system, const T &molecules, bool auto_commit) { @@ -116,10 +114,8 @@ namespace system.deleteAllFrames(map); } - /** Destroying a large system frees every molecule it holds the last - reference to. This empties the system, freeing its contents with the - GIL released. - */ + /** Empty the system, destroying its contents with the GIL released, + since freeing every molecule of a large system is slow. */ void free_no_gil(SireSystem::System &system) { std::unique_ptr contents(new SireSystem::System(system)); From 479bb9a386b2c96ca72dea00f9c0351d51f2fcb9 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 20 Oct 2026 13:49:58 +0100 Subject: [PATCH 6/8] Add DCD.concatenate to join DCD files without a topology. --- corelib/src/libs/SireIO/dcd.cpp | 87 ++++++++ corelib/src/libs/SireIO/dcd.h | 3 + tests/io/test_trajectories.py | 28 +++ wrapper/IO/DCD.pypp.cpp | 382 +++++++++++++------------------- 4 files changed, 267 insertions(+), 233 deletions(-) diff --git a/corelib/src/libs/SireIO/dcd.cpp b/corelib/src/libs/SireIO/dcd.cpp index 072f37c44..f70d138c5 100644 --- a/corelib/src/libs/SireIO/dcd.cpp +++ b/corelib/src/libs/SireIO/dcd.cpp @@ -1015,6 +1015,93 @@ DCD DCD::parse(const QString &filename) return DCD(filename); } +/** Concatenate the frames of the DCD files 'filenames' into 'output', 'timestep' + apart, one frame at a time and without needing the molecules */ +void DCD::concatenate(const QStringList &filenames, const QString &output, + const SireUnits::Dimension::Time ×tep) +{ + auto gil = SireBase::release_gil(); + + QList inputs; + qint64 nframes = 0; + + for (const auto &filename : filenames) + { + DCDFile input(filename); + input.open(QIODevice::ReadOnly); + + if (not inputs.isEmpty() and input.nAtoms() != inputs.first().nAtoms()) + { + throw SireError::incompatible_error( + QObject::tr("Cannot concatenate %1, which has %2 atoms, with %3, " + "which has %4 atoms.") + .arg(filename) + .arg(input.nAtoms()) + .arg(filenames.first()) + .arg(inputs.first().nAtoms()), + CODELOC); + } + + nframes += input.nFrames(); + inputs.append(input); + } + + if (nframes == 0) + { + throw SireError::invalid_arg( + QObject::tr("There are no frames to concatenate into %1.").arg(output), + CODELOC); + } + + // The header records whether every frame has a periodic space. + bool is_periodic = false; + + for (const auto &input : inputs) + { + if (input.nFrames() > 0) + { + is_periodic = input.readFrame(0).space().isPeriodic(); + break; + } + } + + DCDFile outfile(output); + + if (not outfile.open(QIODevice::WriteOnly)) + { + throw SireError::file_error( + QObject::tr("Could not open %1 to write the DCD file.").arg(output), + CODELOC); + } + + outfile.setTimeStep(timestep); + outfile.writeHeader(nframes, inputs.first().nAtoms(), is_periodic); + + for (int i = 0; i < inputs.count(); ++i) + { + const auto &input = inputs.at(i); + + for (int j = 0; j < input.nFrames(); ++j) + { + const auto frame = input.readFrame(j); + + if (frame.space().isPeriodic() != is_periodic) + { + throw SireError::incompatible_error( + QObject::tr("Cannot concatenate %1, as its frames do not have " + "the same type of space as those of %2.") + .arg(filenames.at(i)) + .arg(filenames.first()), + CODELOC); + } + + outfile.writeFrame(frame); + } + } + + outfile.close(); +} + /** Internal function used to add the data from this parser into the passed System */ void DCD::addToSystem(System &system, const PropertyMap &map) const { diff --git a/corelib/src/libs/SireIO/dcd.h b/corelib/src/libs/SireIO/dcd.h index 4f4823192..74a469441 100644 --- a/corelib/src/libs/SireIO/dcd.h +++ b/corelib/src/libs/SireIO/dcd.h @@ -96,6 +96,9 @@ namespace SireIO static DCD parse(const QString &filename); + static void concatenate(const QStringList &filenames, const QString &output, + const SireUnits::Dimension::Time ×tep); + bool isFrame() const; int nFrames() const; diff --git a/tests/io/test_trajectories.py b/tests/io/test_trajectories.py index 8c4fc1e63..f37ebacb3 100644 --- a/tests/io/test_trajectories.py +++ b/tests/io/test_trajectories.py @@ -152,6 +152,34 @@ def test_trajectory_ignores_current_frame(tmpdir, ala_traj, format): assert_coords_equal(m[0], m2[0], 0.01) +def test_dcd_concatenate(tmpdir, ala_traj): + mols = ala_traj.clone() + + d = tmpdir.mkdir("test_dcd_concatenate") + + top = sr.save(mols, d.join("top"), format=["PRMTOP"]) + + chunks = [ + sr.save(mols.trajectory()[i : i + 2], d.join(f"chunk{i}"), format=["DCD"])[0] + for i in (0, 2, 4) + ] + + output = str(d.join("traj.dcd")) + sr.legacy.IO.DCD.concatenate(chunks, output, 0.5 * sr.units.picosecond) + + mols2 = sr.load(top + [output]) + + assert mols2.num_frames() == 6 + + for i in range(6): + m = mols.trajectory()[i].current() + m2 = mols2.trajectory()[i].current() + + assert_coords_equal(m[0], m2[0], 0.001) + assert_space_equal(m.property("space"), m2.property("space"), 0.001) + assert m2.time().to(sr.units.picosecond) == pytest.approx(0.5 * i) + + def test_frame_names(tmpdir, ala_traj): mols = ala_traj.clone() diff --git a/wrapper/IO/DCD.pypp.cpp b/wrapper/IO/DCD.pypp.cpp index 59f80c1ac..05610461d 100644 --- a/wrapper/IO/DCD.pypp.cpp +++ b/wrapper/IO/DCD.pypp.cpp @@ -2,8 +2,8 @@ // (C) Christopher Woods, LGPL >= 3 License -#include "boost/python.hpp" #include "DCD.pypp.hpp" +#include "boost/python.hpp" namespace bp = boost::python; @@ -81,7 +81,7 @@ namespace bp = boost::python; #include "dcd.h" -SireIO::DCD __copy__(const SireIO::DCD &other){ return SireIO::DCD(other); } +SireIO::DCD __copy__(const SireIO::DCD &other) { return SireIO::DCD(other); } #include "Helpers/copy.hpp" @@ -93,278 +93,194 @@ SireIO::DCD __copy__(const SireIO::DCD &other){ return SireIO::DCD(other); } #include "Helpers/len.hpp" -void register_DCD_class(){ +void register_DCD_class() +{ { //::SireIO::DCD - typedef bp::class_< SireIO::DCD, bp::bases< SireIO::MoleculeParser, SireBase::Property > > DCD_exposer_t; - DCD_exposer_t DCD_exposer = DCD_exposer_t( "DCD", "This class represents a DCD file reader.\n\nThe format is described here\n\nhttps:www.ks.uiuc.eduResearchvmdpluginsmolfiledcdplugin.html\n\nAuthor: Christopher Woods\n", bp::init< >("Constructor") ); - bp::scope DCD_scope( DCD_exposer ); - DCD_exposer.def( bp::init< QString const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("filename"), bp::arg("map")=SireBase::PropertyMap() ), "Construct by parsing the passed file") ); - DCD_exposer.def( bp::init< QStringList const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("lines"), bp::arg("map")=SireBase::PropertyMap() ), "Construct by parsing the data in the passed text lines") ); - DCD_exposer.def( bp::init< SireSystem::System const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("system"), bp::arg("map")=SireBase::PropertyMap() ), "Construct by extracting the necessary data from the passed System") ); - DCD_exposer.def( bp::init< SireIO::DCD const & >(( bp::arg("other") ), "Copy constructor") ); + typedef bp::class_> DCD_exposer_t; + DCD_exposer_t DCD_exposer = DCD_exposer_t("DCD", "This class represents a DCD file reader.\n\nThe format is described here\n\nhttps:www.ks.uiuc.eduResearchvmdpluginsmolfiledcdplugin.html\n\nAuthor: Christopher Woods\n", bp::init<>("Constructor")); + bp::scope DCD_scope(DCD_exposer); + DCD_exposer.def(bp::init>((bp::arg("filename"), bp::arg("map") = SireBase::PropertyMap()), "Construct by parsing the passed file")); + DCD_exposer.def(bp::init>((bp::arg("lines"), bp::arg("map") = SireBase::PropertyMap()), "Construct by parsing the data in the passed text lines")); + DCD_exposer.def(bp::init>((bp::arg("system"), bp::arg("map") = SireBase::PropertyMap()), "Construct by extracting the necessary data from the passed System")); + DCD_exposer.def(bp::init((bp::arg("other")), "Copy constructor")); { //::SireIO::DCD::construct - - typedef ::SireIO::MoleculeParserPtr ( ::SireIO::DCD::*construct_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; - construct_function_type construct_function_value( &::SireIO::DCD::construct ); - - DCD_exposer.def( - "construct" - , construct_function_value - , ( bp::arg("filename"), bp::arg("map") ) - , bp::release_gil_policy() - , "Return this parser constructed from the passed filename" ); - + + typedef ::SireIO::MoleculeParserPtr (::SireIO::DCD::*construct_function_type)(::QString const &, ::SireBase::PropertyMap const &) const; + construct_function_type construct_function_value(&::SireIO::DCD::construct); + + DCD_exposer.def( + "construct", construct_function_value, (bp::arg("filename"), bp::arg("map")), bp::release_gil_policy(), "Return this parser constructed from the passed filename"); } { //::SireIO::DCD::construct - - typedef ::SireIO::MoleculeParserPtr ( ::SireIO::DCD::*construct_function_type)( ::QStringList const &,::SireBase::PropertyMap const & ) const; - construct_function_type construct_function_value( &::SireIO::DCD::construct ); - - DCD_exposer.def( - "construct" - , construct_function_value - , ( bp::arg("lines"), bp::arg("map") ) - , bp::release_gil_policy() - , "Return this parser constructed from the passed set of lines" ); - + + typedef ::SireIO::MoleculeParserPtr (::SireIO::DCD::*construct_function_type)(::QStringList const &, ::SireBase::PropertyMap const &) const; + construct_function_type construct_function_value(&::SireIO::DCD::construct); + + DCD_exposer.def( + "construct", construct_function_value, (bp::arg("lines"), bp::arg("map")), bp::release_gil_policy(), "Return this parser constructed from the passed set of lines"); } { //::SireIO::DCD::construct - - typedef ::SireIO::MoleculeParserPtr ( ::SireIO::DCD::*construct_function_type)( ::SireSystem::System const &,::SireBase::PropertyMap const & ) const; - construct_function_type construct_function_value( &::SireIO::DCD::construct ); - - DCD_exposer.def( - "construct" - , construct_function_value - , ( bp::arg("system"), bp::arg("map") ) - , bp::release_gil_policy() - , "Return this parser constructed from the passed SireSystem::System" ); - + + typedef ::SireIO::MoleculeParserPtr (::SireIO::DCD::*construct_function_type)(::SireSystem::System const &, ::SireBase::PropertyMap const &) const; + construct_function_type construct_function_value(&::SireIO::DCD::construct); + + DCD_exposer.def( + "construct", construct_function_value, (bp::arg("system"), bp::arg("map")), bp::release_gil_policy(), "Return this parser constructed from the passed SireSystem::System"); } { //::SireIO::DCD::count - - typedef int ( ::SireIO::DCD::*count_function_type)( ) const; - count_function_type count_function_value( &::SireIO::DCD::count ); - - DCD_exposer.def( - "count" - , count_function_value - , bp::release_gil_policy() - , "" ); - + + typedef int (::SireIO::DCD::*count_function_type)() const; + count_function_type count_function_value(&::SireIO::DCD::count); + + DCD_exposer.def( + "count", count_function_value, bp::release_gil_policy(), ""); } { //::SireIO::DCD::formatDescription - - typedef ::QString ( ::SireIO::DCD::*formatDescription_function_type)( ) const; - formatDescription_function_type formatDescription_function_value( &::SireIO::DCD::formatDescription ); - - DCD_exposer.def( - "formatDescription" - , formatDescription_function_value - , bp::release_gil_policy() - , "Return a description of the file format" ); - + + typedef ::QString (::SireIO::DCD::*formatDescription_function_type)() const; + formatDescription_function_type formatDescription_function_value(&::SireIO::DCD::formatDescription); + + DCD_exposer.def( + "formatDescription", formatDescription_function_value, bp::release_gil_policy(), "Return a description of the file format"); } { //::SireIO::DCD::formatName - - typedef ::QString ( ::SireIO::DCD::*formatName_function_type)( ) const; - formatName_function_type formatName_function_value( &::SireIO::DCD::formatName ); - - DCD_exposer.def( - "formatName" - , formatName_function_value - , bp::release_gil_policy() - , "Return the format name that is used to identify this file format within Sire" ); - + + typedef ::QString (::SireIO::DCD::*formatName_function_type)() const; + formatName_function_type formatName_function_value(&::SireIO::DCD::formatName); + + DCD_exposer.def( + "formatName", formatName_function_value, bp::release_gil_policy(), "Return the format name that is used to identify this file format within Sire"); } { //::SireIO::DCD::formatSuffix - - typedef ::QStringList ( ::SireIO::DCD::*formatSuffix_function_type)( ) const; - formatSuffix_function_type formatSuffix_function_value( &::SireIO::DCD::formatSuffix ); - - DCD_exposer.def( - "formatSuffix" - , formatSuffix_function_value - , bp::release_gil_policy() - , "Return the suffixes that DCD files will typically have" ); - + + typedef ::QStringList (::SireIO::DCD::*formatSuffix_function_type)() const; + formatSuffix_function_type formatSuffix_function_value(&::SireIO::DCD::formatSuffix); + + DCD_exposer.def( + "formatSuffix", formatSuffix_function_value, bp::release_gil_policy(), "Return the suffixes that DCD files will typically have"); } { //::SireIO::DCD::getFrame - - typedef ::SireMol::Frame ( ::SireIO::DCD::*getFrame_function_type)( int ) const; - getFrame_function_type getFrame_function_value( &::SireIO::DCD::getFrame ); - - DCD_exposer.def( - "getFrame" - , getFrame_function_value - , ( bp::arg("i") ) - , bp::release_gil_policy() - , "" ); - + + typedef ::SireMol::Frame (::SireIO::DCD::*getFrame_function_type)(int) const; + getFrame_function_type getFrame_function_value(&::SireIO::DCD::getFrame); + + DCD_exposer.def( + "getFrame", getFrame_function_value, (bp::arg("i")), bp::release_gil_policy(), ""); } { //::SireIO::DCD::isFrame - - typedef bool ( ::SireIO::DCD::*isFrame_function_type)( ) const; - isFrame_function_type isFrame_function_value( &::SireIO::DCD::isFrame ); - - DCD_exposer.def( - "isFrame" - , isFrame_function_value - , bp::release_gil_policy() - , "" ); - + + typedef bool (::SireIO::DCD::*isFrame_function_type)() const; + isFrame_function_type isFrame_function_value(&::SireIO::DCD::isFrame); + + DCD_exposer.def( + "isFrame", isFrame_function_value, bp::release_gil_policy(), ""); } { //::SireIO::DCD::isTextFile - - typedef bool ( ::SireIO::DCD::*isTextFile_function_type)( ) const; - isTextFile_function_type isTextFile_function_value( &::SireIO::DCD::isTextFile ); - - DCD_exposer.def( - "isTextFile" - , isTextFile_function_value - , bp::release_gil_policy() - , "This is not a text file" ); - + + typedef bool (::SireIO::DCD::*isTextFile_function_type)() const; + isTextFile_function_type isTextFile_function_value(&::SireIO::DCD::isTextFile); + + DCD_exposer.def( + "isTextFile", isTextFile_function_value, bp::release_gil_policy(), "This is not a text file"); } { //::SireIO::DCD::nAtoms - - typedef int ( ::SireIO::DCD::*nAtoms_function_type)( ) const; - nAtoms_function_type nAtoms_function_value( &::SireIO::DCD::nAtoms ); - - DCD_exposer.def( - "nAtoms" - , nAtoms_function_value - , bp::release_gil_policy() - , "Return the number of atoms whose coordinates are contained in this restart file" ); - + + typedef int (::SireIO::DCD::*nAtoms_function_type)() const; + nAtoms_function_type nAtoms_function_value(&::SireIO::DCD::nAtoms); + + DCD_exposer.def( + "nAtoms", nAtoms_function_value, bp::release_gil_policy(), "Return the number of atoms whose coordinates are contained in this restart file"); } { //::SireIO::DCD::nFrames - - typedef int ( ::SireIO::DCD::*nFrames_function_type)( ) const; - nFrames_function_type nFrames_function_value( &::SireIO::DCD::nFrames ); - - DCD_exposer.def( - "nFrames" - , nFrames_function_value - , bp::release_gil_policy() - , "" ); - + + typedef int (::SireIO::DCD::*nFrames_function_type)() const; + nFrames_function_type nFrames_function_value(&::SireIO::DCD::nFrames); + + DCD_exposer.def( + "nFrames", nFrames_function_value, bp::release_gil_policy(), ""); } - DCD_exposer.def( bp::self != bp::self ); + DCD_exposer.def(bp::self != bp::self); { //::SireIO::DCD::operator= - - typedef ::SireIO::DCD & ( ::SireIO::DCD::*assign_function_type)( ::SireIO::DCD const & ) ; - assign_function_type assign_function_value( &::SireIO::DCD::operator= ); - - DCD_exposer.def( - "assign" - , assign_function_value - , ( bp::arg("other") ) - , bp::return_self< >() - , "" ); - + + typedef ::SireIO::DCD &(::SireIO::DCD::*assign_function_type)(::SireIO::DCD const &); + assign_function_type assign_function_value(&::SireIO::DCD::operator=); + + DCD_exposer.def( + "assign", assign_function_value, (bp::arg("other")), bp::return_self<>(), ""); } - DCD_exposer.def( bp::self == bp::self ); + DCD_exposer.def(bp::self == bp::self); { //::SireIO::DCD::operator[] - - typedef ::SireIO::DCD ( ::SireIO::DCD::*__getitem___function_type)( int ) const; - __getitem___function_type __getitem___function_value( &::SireIO::DCD::operator[] ); - - DCD_exposer.def( - "__getitem__" - , __getitem___function_value - , ( bp::arg("i") ) - , "" ); - + + typedef ::SireIO::DCD (::SireIO::DCD::*__getitem___function_type)(int) const; + __getitem___function_type __getitem___function_value(&::SireIO::DCD::operator[]); + + DCD_exposer.def( + "__getitem__", __getitem___function_value, (bp::arg("i")), ""); } { //::SireIO::DCD::parse - - typedef ::SireIO::DCD ( *parse_function_type )( ::QString const & ); - parse_function_type parse_function_value( &::SireIO::DCD::parse ); - - DCD_exposer.def( - "parse" - , parse_function_value - , ( bp::arg("filename") ) - , bp::release_gil_policy() - , "Parse from the passed file" ); - + + typedef ::SireIO::DCD (*parse_function_type)(::QString const &); + parse_function_type parse_function_value(&::SireIO::DCD::parse); + + DCD_exposer.def( + "parse", parse_function_value, (bp::arg("filename")), bp::release_gil_policy(), "Parse from the passed file"); } { //::SireIO::DCD::size - - typedef int ( ::SireIO::DCD::*size_function_type)( ) const; - size_function_type size_function_value( &::SireIO::DCD::size ); - - DCD_exposer.def( - "size" - , size_function_value - , bp::release_gil_policy() - , "" ); - + + typedef int (::SireIO::DCD::*size_function_type)() const; + size_function_type size_function_value(&::SireIO::DCD::size); + + DCD_exposer.def( + "size", size_function_value, bp::release_gil_policy(), ""); } { //::SireIO::DCD::toString - - typedef ::QString ( ::SireIO::DCD::*toString_function_type)( ) const; - toString_function_type toString_function_value( &::SireIO::DCD::toString ); - - DCD_exposer.def( - "toString" - , toString_function_value - , bp::release_gil_policy() - , "" ); - + + typedef ::QString (::SireIO::DCD::*toString_function_type)() const; + toString_function_type toString_function_value(&::SireIO::DCD::toString); + + DCD_exposer.def( + "toString", toString_function_value, bp::release_gil_policy(), ""); } { //::SireIO::DCD::typeName - - typedef char const * ( *typeName_function_type )( ); - typeName_function_type typeName_function_value( &::SireIO::DCD::typeName ); - - DCD_exposer.def( - "typeName" - , typeName_function_value - , bp::release_gil_policy() - , "" ); - + + typedef char const *(*typeName_function_type)(); + typeName_function_type typeName_function_value(&::SireIO::DCD::typeName); + + DCD_exposer.def( + "typeName", typeName_function_value, bp::release_gil_policy(), ""); } { //::SireIO::DCD::what - - typedef char const * ( ::SireIO::DCD::*what_function_type)( ) const; - what_function_type what_function_value( &::SireIO::DCD::what ); - - DCD_exposer.def( - "what" - , what_function_value - , bp::release_gil_policy() - , "" ); - + + typedef char const *(::SireIO::DCD::*what_function_type)() const; + what_function_type what_function_value(&::SireIO::DCD::what); + + DCD_exposer.def( + "what", what_function_value, bp::release_gil_policy(), ""); } { //::SireIO::DCD::writeToFile - - typedef ::QStringList ( ::SireIO::DCD::*writeToFile_function_type)( ::QString const & ) const; - writeToFile_function_type writeToFile_function_value( &::SireIO::DCD::writeToFile ); - - DCD_exposer.def( - "writeToFile" - , writeToFile_function_value - , ( bp::arg("filename") ) - , bp::release_gil_policy() - , "Write this binary file filename" ); - + + typedef ::QStringList (::SireIO::DCD::*writeToFile_function_type)(::QString const &) const; + writeToFile_function_type writeToFile_function_value(&::SireIO::DCD::writeToFile); + + DCD_exposer.def( + "writeToFile", writeToFile_function_value, (bp::arg("filename")), bp::release_gil_policy(), "Write this binary file filename"); } - DCD_exposer.staticmethod( "parse" ); - DCD_exposer.staticmethod( "typeName" ); - DCD_exposer.def( "__copy__", &__copy__); - DCD_exposer.def( "__deepcopy__", &__copy__); - DCD_exposer.def( "clone", &__copy__); - DCD_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireIO::DCD >, - bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); - DCD_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireIO::DCD >, - bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); - DCD_exposer.def_pickle(sire_pickle_suite< ::SireIO::DCD >()); - DCD_exposer.def( "__str__", &__str__< ::SireIO::DCD > ); - DCD_exposer.def( "__repr__", &__str__< ::SireIO::DCD > ); - DCD_exposer.def( "__len__", &__len_size< ::SireIO::DCD > ); + DCD_exposer.def( + "concatenate", &::SireIO::DCD::concatenate, (bp::arg("filenames"), bp::arg("output"), bp::arg("timestep")), "Concatenate the frames of the DCD files filenames into output, timestep\napart, one frame at a time and without needing the molecules"); + DCD_exposer.staticmethod("concatenate"); + DCD_exposer.staticmethod("parse"); + DCD_exposer.staticmethod("typeName"); + DCD_exposer.def("__copy__", &__copy__); + DCD_exposer.def("__deepcopy__", &__copy__); + DCD_exposer.def("clone", &__copy__); + DCD_exposer.def("__rlshift__", &__rlshift__QDataStream<::SireIO::DCD>, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1, 2>>()); + DCD_exposer.def("__rrshift__", &__rrshift__QDataStream<::SireIO::DCD>, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1, 2>>()); + DCD_exposer.def_pickle(sire_pickle_suite<::SireIO::DCD>()); + DCD_exposer.def("__str__", &__str__<::SireIO::DCD>); + DCD_exposer.def("__repr__", &__str__<::SireIO::DCD>); + DCD_exposer.def("__len__", &__len_size<::SireIO::DCD>); } - } From 671bdde241599ea9bb9da982efef8cd1c78e5a7f Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 20 Oct 2026 14:10:23 +0100 Subject: [PATCH 7/8] Open DCD inputs one at a time, add a start time and avoid double reads. --- corelib/src/libs/SireIO/dcd.cpp | 75 ++++++++++++++++++++------------- corelib/src/libs/SireIO/dcd.h | 3 +- tests/io/test_trajectories.py | 6 ++- wrapper/IO/DCD.pypp.cpp | 2 +- 4 files changed, 53 insertions(+), 33 deletions(-) diff --git a/corelib/src/libs/SireIO/dcd.cpp b/corelib/src/libs/SireIO/dcd.cpp index f70d138c5..406e4968d 100644 --- a/corelib/src/libs/SireIO/dcd.cpp +++ b/corelib/src/libs/SireIO/dcd.cpp @@ -114,6 +114,8 @@ class DCDFile SireUnits::Dimension::Time getTimeStep() const; void setTimeStep(const SireUnits::Dimension::Time ×tep); + void setFirstFrame(qint64 first_frame); + void close(); private: @@ -370,7 +372,7 @@ void DCDFile::writeHeader(int nframes, int natoms, bool has_periodic_space) // every value is zero, as we don't know what they are ints[0] = nframes; - // ints[1] = 0; // index of the first frame - we don't know this either... + ints[1] = istart; // index of the first frame, which is zero unless set ints[2] = 1; // number of timesteps between frames ints[3] = nframes; // number of timesteps written // ints[8] = 0; // nfixed is zero - everything will be treated as moving @@ -398,6 +400,7 @@ void DCDFile::writeHeader(int nframes, int natoms, bool has_periodic_space) // bytes 52-79 - should all be zero - can re-use ints ints[0] = 0; + ints[1] = 0; ints[2] = 0; ints[3] = 0; line.writeInt32(ints, 7); @@ -610,9 +613,7 @@ Frame DCDFile::readFrame(int frame, bool use_parallel) const auto coords = this->readCoordinates(frame); auto time = this->readTime(frame); - return Frame(this->readCoordinates(frame), - this->readSpace(frame).read(), - this->readTime(frame)); + return Frame(coords, space.read(), time); } void DCDFile::writeFrame(const SireMol::Frame &frame, bool use_parallel) @@ -742,6 +743,12 @@ void DCDFile::setTimeStep(const SireUnits::Dimension::Time &t) timestep = t.to(picosecond); } +/** Set the index of the first frame, so frame i is at (first_frame + i) * timestep */ +void DCDFile::setFirstFrame(qint64 first_frame) +{ + istart = first_frame; +} + int DCDFile::nAtoms() const { return natoms; @@ -1016,21 +1023,28 @@ DCD DCD::parse(const QString &filename) } /** Concatenate the frames of the DCD files 'filenames' into 'output', 'timestep' - apart, one frame at a time and without needing the molecules */ + apart from 'start', one frame at a time and without needing the molecules */ void DCD::concatenate(const QStringList &filenames, const QString &output, - const SireUnits::Dimension::Time ×tep) + const SireUnits::Dimension::Time ×tep, + const SireUnits::Dimension::Time &start) { auto gil = SireBase::release_gil(); - QList inputs; + // Count the frames first, closing each file again so that only one + // input is open at a time. qint64 nframes = 0; + qint64 natoms = 0; + bool is_periodic = false; + bool have_frame = false; - for (const auto &filename : filenames) + for (int i = 0; i < filenames.count(); ++i) { + const auto &filename = filenames.at(i); + DCDFile input(filename); input.open(QIODevice::ReadOnly); - if (not inputs.isEmpty() and input.nAtoms() != inputs.first().nAtoms()) + if (i > 0 and input.nAtoms() != natoms) { throw SireError::incompatible_error( QObject::tr("Cannot concatenate %1, which has %2 atoms, with %3, " @@ -1038,12 +1052,20 @@ void DCD::concatenate(const QStringList &filenames, const QString &output, .arg(filename) .arg(input.nAtoms()) .arg(filenames.first()) - .arg(inputs.first().nAtoms()), + .arg(natoms), CODELOC); } + natoms = input.nAtoms(); + + // The header records whether every frame has a periodic space. + if (not have_frame and input.nFrames() > 0) + { + is_periodic = input.readFrame(0).space().isPeriodic(); + have_frame = true; + } + nframes += input.nFrames(); - inputs.append(input); } if (nframes == 0) @@ -1053,18 +1075,6 @@ void DCD::concatenate(const QStringList &filenames, const QString &output, CODELOC); } - // The header records whether every frame has a periodic space. - bool is_periodic = false; - - for (const auto &input : inputs) - { - if (input.nFrames() > 0) - { - is_periodic = input.readFrame(0).space().isPeriodic(); - break; - } - } - DCDFile outfile(output); if (not outfile.open(QIODevice::WriteOnly)) @@ -1074,23 +1084,30 @@ void DCD::concatenate(const QStringList &filenames, const QString &output, CODELOC); } + // A DCD file can only start a whole number of frames from zero. + const double timestep_ps = timestep.to(picosecond); + + if (timestep_ps > 0) + outfile.setFirstFrame(qRound64(start.to(picosecond) / timestep_ps)); + outfile.setTimeStep(timestep); - outfile.writeHeader(nframes, inputs.first().nAtoms(), is_periodic); + outfile.writeHeader(nframes, natoms, is_periodic); - for (int i = 0; i < inputs.count(); ++i) + for (const auto &filename : filenames) { - const auto &input = inputs.at(i); + DCDFile input(filename); + input.open(QIODevice::ReadOnly); - for (int j = 0; j < input.nFrames(); ++j) + for (int i = 0; i < input.nFrames(); ++i) { - const auto frame = input.readFrame(j); + const auto frame = input.readFrame(i); if (frame.space().isPeriodic() != is_periodic) { throw SireError::incompatible_error( QObject::tr("Cannot concatenate %1, as its frames do not have " "the same type of space as those of %2.") - .arg(filenames.at(i)) + .arg(filename) .arg(filenames.first()), CODELOC); } diff --git a/corelib/src/libs/SireIO/dcd.h b/corelib/src/libs/SireIO/dcd.h index 74a469441..f98ad563a 100644 --- a/corelib/src/libs/SireIO/dcd.h +++ b/corelib/src/libs/SireIO/dcd.h @@ -97,7 +97,8 @@ namespace SireIO static DCD parse(const QString &filename); static void concatenate(const QStringList &filenames, const QString &output, - const SireUnits::Dimension::Time ×tep); + const SireUnits::Dimension::Time ×tep, + const SireUnits::Dimension::Time &start = SireUnits::Dimension::Time(0)); bool isFrame() const; diff --git a/tests/io/test_trajectories.py b/tests/io/test_trajectories.py index f37ebacb3..9d4a3291b 100644 --- a/tests/io/test_trajectories.py +++ b/tests/io/test_trajectories.py @@ -165,7 +165,9 @@ def test_dcd_concatenate(tmpdir, ala_traj): ] output = str(d.join("traj.dcd")) - sr.legacy.IO.DCD.concatenate(chunks, output, 0.5 * sr.units.picosecond) + sr.legacy.IO.DCD.concatenate( + chunks, output, 0.5 * sr.units.picosecond, 0.5 * sr.units.picosecond + ) mols2 = sr.load(top + [output]) @@ -177,7 +179,7 @@ def test_dcd_concatenate(tmpdir, ala_traj): assert_coords_equal(m[0], m2[0], 0.001) assert_space_equal(m.property("space"), m2.property("space"), 0.001) - assert m2.time().to(sr.units.picosecond) == pytest.approx(0.5 * i) + assert m2.time().to(sr.units.picosecond) == pytest.approx(0.5 * (i + 1)) def test_frame_names(tmpdir, ala_traj): diff --git a/wrapper/IO/DCD.pypp.cpp b/wrapper/IO/DCD.pypp.cpp index 05610461d..84224c70f 100644 --- a/wrapper/IO/DCD.pypp.cpp +++ b/wrapper/IO/DCD.pypp.cpp @@ -267,7 +267,7 @@ void register_DCD_class() "writeToFile", writeToFile_function_value, (bp::arg("filename")), bp::release_gil_policy(), "Write this binary file filename"); } DCD_exposer.def( - "concatenate", &::SireIO::DCD::concatenate, (bp::arg("filenames"), bp::arg("output"), bp::arg("timestep")), "Concatenate the frames of the DCD files filenames into output, timestep\napart, one frame at a time and without needing the molecules"); + "concatenate", &::SireIO::DCD::concatenate, (bp::arg("filenames"), bp::arg("output"), bp::arg("timestep"), bp::arg("start") = SireUnits::Dimension::Time(0)), "Concatenate the frames of the DCD files filenames into output, timestep\napart from start, one frame at a time and without needing the molecules"); DCD_exposer.staticmethod("concatenate"); DCD_exposer.staticmethod("parse"); DCD_exposer.staticmethod("typeName"); From 7a4512ebce6061db1079e7253e4f2f59d892d219 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 20 Oct 2026 15:51:47 +0100 Subject: [PATCH 8/8] Update CHANGELOG. --- doc/source/changelog.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 214a6ea5f..946bc3af9 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -108,6 +108,19 @@ organisation on `GitHub `__. no longer draws ascii convergence and PMF plots, and the legacy ``package_sire`` installer and its supporting scripts. +* Release the GIL when updating a ``System`` or deleting its trajectory frames, and added a + private ``_free()`` method to ``System`` and ``SelectorMol`` that empties them, destroying + their contents with the GIL released. Freeing a large system's molecules no longer holds + up other Python threads, e.g. when several replicas are checkpointed in parallel. + +* Speed up saving trajectories in DCD, TRR or XTC format, which no longer copy the system + and load the current frame into it before writing the frames themselves. + +* Added ``DCD.concatenate()``, which joins DCD files into one, a frame at a time and without + a topology, with frames a given timestep apart from a given start time. + +* Fixed reading a DCD frame reading the coordinates, space and time from the file twice. + `2026.2.0 `__ - September 2026 ----------------------------------------------------------------------------------------------