From b1db53ceba941a2f0d8be648d21e475c58f420ea Mon Sep 17 00:00:00 2001 From: Christopher Woods Date: Sat, 22 Jun 2024 18:30:02 +0100 Subject: [PATCH 1/4] Now reorder cutgroups so that the CGAtomIdx order always matches the AtomIdx order. This works really well, except that it fails when merging submolecules, because the CGAtomIdx order changes on commit. I need to fix this. I suspect it will be by converting merged proteins into a single cutgroup? --- corelib/src/libs/SireMol/structureeditor.cpp | 128 +++++++++++++++++++ tests/mol/test_reorder.py | 36 ++++++ 2 files changed, 164 insertions(+) create mode 100644 tests/mol/test_reorder.py diff --git a/corelib/src/libs/SireMol/structureeditor.cpp b/corelib/src/libs/SireMol/structureeditor.cpp index df276c401..0452b4e8e 100644 --- a/corelib/src/libs/SireMol/structureeditor.cpp +++ b/corelib/src/libs/SireMol/structureeditor.cpp @@ -3210,6 +3210,134 @@ const MoleculeInfoData &StructureEditor::commitInfo() } } + // make sure that the AtomIdx order matches the CGAtomIdx order + // This is needed to remove confusion in code that assumes + // AtomIdx order is always correct. This is a big change in code + // behaviour, but it is necessary to make the code more robust, + // and also recognises the reality that CutGroups are now "under + // the hood" in the code and not really visible or known about by + // end users. + int atom_count = 0; + bool in_atomidx_order = true; + + for (int i = 0; i < this->nCutGroupsInMolecule(); ++i) + { + const auto cgdata = this->getCGData(CGIdx(i)); + + for (const auto &atomidx : cgdata.get<1>()) + { + if (atomidx != AtomIdx(atom_count)) + { + in_atomidx_order = false; + break; + } + + ++atom_count; + } + } + + if (atom_count != this->nAtomsInMolecule()) + { + in_atomidx_order = false; + } + + if (not in_atomidx_order) + { + SireBase::Console::warning(QObject::tr( + "The atoms in the CutGroups are not in the same order as the atoms in the molecule. " + "Rebuilding CutGroups so that the CGAtomIdx order matches the AtomIdx order.")); + + // are the atoms contiguous in residues? + bool contiguous_residues = true; + QSet seen_residues; + seen_residues.reserve(this->nResiduesInMolecule()); + ResIdx prev_residx = ResIdx::null(); + + for (int i = 0; i < this->nAtomsInMolecule(); ++i) + { + const auto info = this->getAtomData(AtomIdx(i)); + + if (prev_residx.isNull()) + { + prev_residx = info.get<4>(); + seen_residues.insert(prev_residx); + } + else + { + if (info.get<4>() != prev_residx) + { + prev_residx = info.get<4>(); + + if (seen_residues.contains(prev_residx)) + { + contiguous_residues = false; + break; + } + else + { + seen_residues.insert(prev_residx); + } + } + } + } + + // delete all existing CutGroups + this->removeAllCutGroups(); + + if (contiguous_residues) + { + prev_residx = ResIdx::null(); + int cgcount = 0; + + for (int i = 0; i < this->nAtomsInMolecule(); ++i) + { + const auto info = this->getAtomData(AtomIdx(i)); + + if (prev_residx.isNull() or info.get<4>() != prev_residx) + { + prev_residx = info.get<4>(); + this->addCutGroup().rename(CGName(QString::number(cgcount))); + cgcount += 1; + } + + this->reparentAtom(this->getUID(AtomIdx(i)), CGIdx(cgcount - 1)); + } + + if (cgcount != this->nResiduesInMolecule()) + { + SireBase::Console::warning(QObject::tr( + "The number of CutGroups created (%1) does not match " + "the number of residues in the molecule (%2)! Rebuilding " + "into a single CutGroup.") + .arg(cgcount) + .arg(this->nResiduesInMolecule())); + + this->removeAllCutGroups(); + + this->addCutGroup().rename(CGName("0")); + + for (int i = 0; i < this->nAtomsInMolecule(); ++i) + { + this->reparentAtom(this->getUID(AtomIdx(i)), CGIdx(0)); + } + } + } + else + { + // create a new CutGroup and add all atoms to it + SireBase::Console::warning(QObject::tr( + "The atoms in the molecule are not contiguous in residues. " + "Rebuilding into a single CutGroup.")); + + this->addCutGroup().rename(CGName("0")); + + for (int i = 0; i < this->nAtomsInMolecule(); ++i) + { + this->reparentAtom(this->getUID(AtomIdx(i)), CGIdx(0)); + } + } + } + d->cached_molinfo = new MoleculeInfoData(*this); } diff --git a/tests/mol/test_reorder.py b/tests/mol/test_reorder.py new file mode 100644 index 000000000..e04325da8 --- /dev/null +++ b/tests/mol/test_reorder.py @@ -0,0 +1,36 @@ +def test_reorder_atoms(ala_mols): + mols = ala_mols + + mol = mols[0] + + # check that reorder preserves residue cutting + mol = mol.edit() + atom = mol.atom(2) + atom = atom.reindex(0) + mol = atom.molecule().commit() + + assert mol.num_residues() == 3 + assert mol.num_cutgroups() == mol.num_residues() + + atomidx = 0 + + for cutgroup in mol.cutgroups(): + for atom in cutgroup.atoms(): + assert atom.index().value() == atomidx + atomidx += 1 + + # now check with reordering that break residue cutting + mol = mols[0] + + mol = mol.edit() + atom = mol.atom("HA") + atom = atom.reindex(0) + mol = atom.molecule().commit() + + assert mol.num_cutgroups() == 1 + + atomidx = 0 + + for atom in mol.cutgroups()[0].atoms(): + assert atom.index().value() == atomidx + atomidx += 1 From 26a79eeca9ed143b73e9f1a595fc58a8065db942 Mon Sep 17 00:00:00 2001 From: Christopher Woods Date: Sat, 22 Jun 2024 22:55:08 +0100 Subject: [PATCH 2/4] Fixed the merge code by making sure that the AtomIdx of the added atom is correct for its position in the molecule (i.e. is one higher than the AtomIdx of the last atom in the residue) --- corelib/src/libs/SireSystem/merge.cpp | 14 ++++++++++++++ doc/source/changelog.rst | 13 +++++++++++++ 2 files changed, 27 insertions(+) diff --git a/corelib/src/libs/SireSystem/merge.cpp b/corelib/src/libs/SireSystem/merge.cpp index 5031f81d8..d01703f76 100644 --- a/corelib/src/libs/SireSystem/merge.cpp +++ b/corelib/src/libs/SireSystem/merge.cpp @@ -390,12 +390,26 @@ namespace SireSystem auto res = mol.residue(residx); + // get the AtomIdx of the last atom in this residue + AtomIdx last_atomidx(0); + + if (res.nAtoms() > 0) + { + last_atomidx = res.atom(res.nAtoms() - 1).index(); + } + // add the atom - it has the name "Xxx" as it doesn't exist // in the reference state auto atom = res.add(AtomName("Xxx")); largest_atomnum = AtomNum(largest_atomnum.value() + 1); atom.renumber(largest_atomnum); + // ensure that its index follows on from the index of the + // last atom in the residue - this is so that we keep + // the AtomIdx and CGAtomIdx orders in sync, and don't + // force a complex reordering of the atoms when we commit + atom.reindex(last_atomidx + 1); + // reparent this atom to the CutGroup for this residue atom.reparent(cgidx); diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 6af579eef..ac86ad415 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -55,6 +55,19 @@ organisation on `GitHub `__. * Added a map option (fix_perturbable_zero_sigmas) to prevent perturbation of the Lennard-Jones sigma parameter for ghost atoms during alchemical free energy simulations. +* [CHANGE IN BEHAVIOUR] - added code that ensures that, when editing molecules, + the CGAtomIdx order will always follow the AtomIdx order of atoms. This is + because a lot of code had implicitly assumed this, and so it was a cause + of bugs when this wasn't the case. Now, when you edit a molecule, on committing, + the orders will be checked. If they don't agree, then the CutGroups will be + reordered, with atoms reordered as necessary to make the CGAtomIdx order match + the AtomIdx order. If this isn't possible (e.g. because atoms in CutGroups + are not contiguous), then the molecule will be converted to a single-cutgroup + molecule, with the atoms placed in AtomIdx order. As part of this change, + the merge code will now also ensure that added atoms are added with the + correct AtomIdx, rather than added as the last atoms in the molecule. This + is also more natural. This fixes issue #202. + * Please add an item to this changelog when you create your PR `2024.1.0 `__ - April 2024 From 89ae69e2d30c182f0bdb18a2adea31b2204a2d4a Mon Sep 17 00:00:00 2001 From: Christopher Woods Date: Sun, 23 Jun 2024 17:46:26 +0100 Subject: [PATCH 3/4] Added the "center" keyword argument to Cursors, CursorsM and System (plus legacy.System.System). Also added "origin" and "zero" as recognised options for constructing vectors, e.g. ``` c = mols.cursor() c.make_whole(center="origin") ``` will work. --- corelib/src/libs/SireSystem/system.cpp | 59 +++++++++++++++++++ corelib/src/libs/SireSystem/system.h | 4 ++ src/sire/maths/_vector.py | 7 +++ src/sire/mol/_cursor.py | 8 +-- src/sire/system/_system.py | 22 +++++-- tests/mol/test_make_whole.py | 20 ++++++- wrapper/System/AngleComponent.pypp.cpp | 8 ++- wrapper/System/AssignerGroup.pypp.cpp | 8 ++- wrapper/System/CheckPoint.pypp.cpp | 8 ++- wrapper/System/CloseMols.pypp.cpp | 8 ++- wrapper/System/ComponentConstraint.pypp.cpp | 8 ++- wrapper/System/Constraints.pypp.cpp | 8 ++- wrapper/System/DihedralComponent.pypp.cpp | 8 ++- wrapper/System/DistanceComponent.pypp.cpp | 8 ++- .../System/DoubleDistanceComponent.pypp.cpp | 8 ++- wrapper/System/EnergyMonitor.pypp.cpp | 8 ++- wrapper/System/ForceFieldInfo.pypp.cpp | 8 ++- wrapper/System/FreeEnergyMonitor.pypp.cpp | 8 ++- wrapper/System/IDAndSet_MonitorID_.pypp.cpp | 8 ++- wrapper/System/IDAndSet_SysID_.pypp.cpp | 8 ++- wrapper/System/IDAssigner.pypp.cpp | 8 ++- wrapper/System/IDOrSet_MonitorID_.pypp.cpp | 8 ++- wrapper/System/IDOrSet_SysID_.pypp.cpp | 8 ++- wrapper/System/IdentityConstraint.pypp.cpp | 8 ++- wrapper/System/MonitorComponent.pypp.cpp | 8 ++- wrapper/System/MonitorComponents.pypp.cpp | 8 ++- wrapper/System/MonitorIdx.pypp.cpp | 8 ++- wrapper/System/MonitorMonitor.pypp.cpp | 8 ++- wrapper/System/MonitorName.pypp.cpp | 8 ++- wrapper/System/MonitorProperty.pypp.cpp | 8 ++- wrapper/System/NullConstraint.pypp.cpp | 8 ++- wrapper/System/NullMonitor.pypp.cpp | 8 ++- .../System/PerturbationConstraint.pypp.cpp | 8 ++- wrapper/System/PolariseCharges.pypp.cpp | 8 ++- wrapper/System/PolariseChargesFF.pypp.cpp | 8 ++- wrapper/System/PropertyConstraint.pypp.cpp | 8 ++- wrapper/System/SireSystem_registrars.cpp | 3 + wrapper/System/SpaceWrapper.pypp.cpp | 8 ++- wrapper/System/Specify_MonitorID_.pypp.cpp | 8 ++- wrapper/System/Specify_SysID_.pypp.cpp | 8 ++- wrapper/System/SysIdx.pypp.cpp | 8 ++- wrapper/System/SysName.pypp.cpp | 8 ++- wrapper/System/System.pypp.cpp | 34 ++++++++++- wrapper/System/SystemMonitors.pypp.cpp | 8 ++- .../System/TripleDistanceComponent.pypp.cpp | 8 ++- wrapper/System/VolMapMonitor.pypp.cpp | 8 ++- wrapper/System/WindowedComponent.pypp.cpp | 8 ++- 47 files changed, 337 insertions(+), 132 deletions(-) diff --git a/corelib/src/libs/SireSystem/system.cpp b/corelib/src/libs/SireSystem/system.cpp index d64c3996b..874d0abb1 100644 --- a/corelib/src/libs/SireSystem/system.cpp +++ b/corelib/src/libs/SireSystem/system.cpp @@ -4162,6 +4162,65 @@ void System::makeWhole() this->makeWhole(PropertyMap()); } +void System::makeWhole(const Vector ¢er, const PropertyMap &map) +{ + if (this->needsAccepting()) + { + this->accept(); + } + + if (not this->containsProperty(map["space"])) + return; + + if (not this->property(map["space"]).isA()) + return; + + const auto &space = this->property(map["space"]).asA(); + + if (not space.isPeriodic()) + return; + + PropertyMap m = map; + m.set("space", space); + + // get a list of all molecules in the system + const SelectorMol mols(*this); + + SelectorMol changed_mols; + + for (const auto &mol : mols) + { + auto new_mol = mol.move().makeWhole(center, m).commit(); + + if (new_mol.data().version() != mol.data().version()) + { + changed_mols.append(new_mol); + } + } + + if (not changed_mols.isEmpty()) + { + Delta delta(*this, true); + + // this ensures that only a single copy of System is used - prevents + // unnecessary copying + this->operator=(System()); + delta.update(changed_mols.toMolecules()); + this->operator=(delta.apply()); + + if (this->needsAccepting()) + { + delta = Delta(); + this->accept(); + } + } +} + +void System::makeWhole(const Vector ¢er) +{ + this->makeWhole(center, PropertyMap()); +} + const char *System::typeName() { return QMetaType::typeName(qMetaTypeId()); diff --git a/corelib/src/libs/SireSystem/system.h b/corelib/src/libs/SireSystem/system.h index 83d5f3698..6d726fdd4 100644 --- a/corelib/src/libs/SireSystem/system.h +++ b/corelib/src/libs/SireSystem/system.h @@ -443,6 +443,10 @@ namespace SireSystem void makeWhole(); void makeWhole(const SireBase::PropertyMap &map); + void makeWhole(const SireMaths::Vector ¢er); + void makeWhole(const SireMaths::Vector ¢er, + const SireBase::PropertyMap &map); + static const System &null(); protected: diff --git a/src/sire/maths/_vector.py b/src/sire/maths/_vector.py index 85c10aaf6..79edd1286 100644 --- a/src/sire/maths/_vector.py +++ b/src/sire/maths/_vector.py @@ -237,6 +237,13 @@ class containing 3 double precision values. These values """ def __init__(self, *args, **kwargs): + if len(args) == 1: + # check for "zero" or "origin" + arg0 = str(args[0]).strip().lower() + + if arg0 == "zero" or arg0 == "origin": + args = [0.0, 0.0, 0.0] + from ..units import angstrom from .. import u diff --git a/src/sire/mol/_cursor.py b/src/sire/mol/_cursor.py index 26e88d1eb..600c12ffa 100644 --- a/src/sire/mol/_cursor.py +++ b/src/sire/mol/_cursor.py @@ -2624,7 +2624,7 @@ def delete_frame(self, *args, **kwargs): return self - def make_whole(self, *args, map=None): + def make_whole(self, center=None, map=None): """ Make all of the atoms operated on by this cursor whole (they won't be broken across a periodic box boundary) @@ -2634,7 +2634,7 @@ def make_whole(self, *args, map=None): which they should be wrapped. """ for cursor in self._cursors: - cursor.make_whole(*args, map=map) + cursor.make_whole(center=center, map=map) return self @@ -3779,7 +3779,7 @@ def delete_frame(self, *args, **kwargs): return self - def make_whole(self, *args, map=None): + def make_whole(self, center=None, map=None): """ Make all of the atoms operated on by this cursor whole (they won't be broken across a periodic box boundary) @@ -3789,7 +3789,7 @@ def make_whole(self, *args, map=None): which they should be wrapped. """ for cursor in self._cursors: - cursor.make_whole(*args, map=map) + cursor.make_whole(center=center, map=map) return self diff --git a/src/sire/system/_system.py b/src/sire/system/_system.py index a2eb05a77..9f00b81ea 100644 --- a/src/sire/system/_system.py +++ b/src/sire/system/_system.py @@ -145,18 +145,30 @@ def numbers(self): """Return the numbers of all of the molecules in this System""" return self.molecules().numbers() - def make_whole(self, map=None): + def make_whole(self, center=None, map=None): """ Make all of the molecules in this system whole. This maps each molecule into the current space, such that no molecule is broken across a periodic box boundary """ - if map is None: - self._system.make_whole() + if center is None: + if map is None: + self._system.make_whole() + else: + from ..base import create_map + + self._system.make_whole(map=create_map(map)) else: - from ..base import create_map + from ..maths import Vector + + center = Vector(center) + + if map is None: + self._system.make_whole(center=center) + else: + from ..base import create_map - self._system.make_whole(map=create_map(map)) + self._system.make_whole(center=center, map=create_map(map)) self._molecules = None diff --git a/tests/mol/test_make_whole.py b/tests/mol/test_make_whole.py index cc00792db..78c4898f1 100644 --- a/tests/mol/test_make_whole.py +++ b/tests/mol/test_make_whole.py @@ -59,9 +59,7 @@ def test_auto_make_whole_on_load_frame(wrapped_mols): def test_auto_make_whole_on_load(): - mols = sr.load_test_files( - "wrapped.rst7", "wrapped.prm7", map={"make_whole": True} - ) + mols = sr.load_test_files("wrapped.rst7", "wrapped.prm7", map={"make_whole": True}) _assert_correct_com(mols[0].evaluate().center_of_mass()) @@ -84,3 +82,19 @@ def test_auto_make_whole_on_load_no_breakage(kigaki_mols): kigaki_mols[0].evaluate().center_of_mass() == mols[0].evaluate().center_of_mass() ) + + +def test_make_whole_center_args(ala_mols): + mols = ala_mols + + c = mols[0].cursor() + c.make_whole(center="origin") + + c = mols.cursor() + c.make_whole(center=0) + + c = mols[0].atoms().cursor() + c.make_whole(center=(1, 2, 3)) + + mols = mols.clone() + mols.make_whole(center=("1A", "2A", "3A")) diff --git a/wrapper/System/AngleComponent.pypp.cpp b/wrapper/System/AngleComponent.pypp.cpp index bf494bd7d..35cf5b2a7 100644 --- a/wrapper/System/AngleComponent.pypp.cpp +++ b/wrapper/System/AngleComponent.pypp.cpp @@ -30,6 +30,8 @@ namespace bp = boost::python; SireSystem::AngleComponent __copy__(const SireSystem::AngleComponent &other){ return SireSystem::AngleComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -237,9 +239,9 @@ void register_AngleComponent_class(){ AngleComponent_exposer.staticmethod( "theta021" ); AngleComponent_exposer.staticmethod( "theta102" ); AngleComponent_exposer.staticmethod( "typeName" ); - AngleComponent_exposer.def( "__copy__", &__copy__); - AngleComponent_exposer.def( "__deepcopy__", &__copy__); - AngleComponent_exposer.def( "clone", &__copy__); + AngleComponent_exposer.def( "__copy__", &__copy__); + AngleComponent_exposer.def( "__deepcopy__", &__copy__); + AngleComponent_exposer.def( "clone", &__copy__); AngleComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::AngleComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AngleComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::AngleComponent >, diff --git a/wrapper/System/AssignerGroup.pypp.cpp b/wrapper/System/AssignerGroup.pypp.cpp index 651cdaf56..b3946f03a 100644 --- a/wrapper/System/AssignerGroup.pypp.cpp +++ b/wrapper/System/AssignerGroup.pypp.cpp @@ -44,6 +44,8 @@ namespace bp = boost::python; SireSystem::AssignerGroup __copy__(const SireSystem::AssignerGroup &other){ return SireSystem::AssignerGroup(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireSystem::AssignerGroup&){ return "SireSystem::AssignerGroup";} @@ -197,9 +199,9 @@ void register_AssignerGroup_class(){ } AssignerGroup_exposer.staticmethod( "typeName" ); - AssignerGroup_exposer.def( "__copy__", &__copy__); - AssignerGroup_exposer.def( "__deepcopy__", &__copy__); - AssignerGroup_exposer.def( "clone", &__copy__); + AssignerGroup_exposer.def( "__copy__", &__copy__); + AssignerGroup_exposer.def( "__deepcopy__", &__copy__); + AssignerGroup_exposer.def( "clone", &__copy__); AssignerGroup_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::AssignerGroup >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AssignerGroup_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::AssignerGroup >, diff --git a/wrapper/System/CheckPoint.pypp.cpp b/wrapper/System/CheckPoint.pypp.cpp index 306ff5f73..09ee88b27 100644 --- a/wrapper/System/CheckPoint.pypp.cpp +++ b/wrapper/System/CheckPoint.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireSystem::CheckPoint __copy__(const SireSystem::CheckPoint &other){ return SireSystem::CheckPoint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -72,9 +74,9 @@ void register_CheckPoint_class(){ } CheckPoint_exposer.staticmethod( "typeName" ); - CheckPoint_exposer.def( "__copy__", &__copy__); - CheckPoint_exposer.def( "__deepcopy__", &__copy__); - CheckPoint_exposer.def( "clone", &__copy__); + CheckPoint_exposer.def( "__copy__", &__copy__); + CheckPoint_exposer.def( "__deepcopy__", &__copy__); + CheckPoint_exposer.def( "clone", &__copy__); CheckPoint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::CheckPoint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CheckPoint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::CheckPoint >, diff --git a/wrapper/System/CloseMols.pypp.cpp b/wrapper/System/CloseMols.pypp.cpp index 22aafe076..fc54e9802 100644 --- a/wrapper/System/CloseMols.pypp.cpp +++ b/wrapper/System/CloseMols.pypp.cpp @@ -28,6 +28,8 @@ namespace bp = boost::python; SireSystem::CloseMols __copy__(const SireSystem::CloseMols &other){ return SireSystem::CloseMols(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireSystem::CloseMols&){ return "SireSystem::CloseMols";} @@ -207,9 +209,9 @@ void register_CloseMols_class(){ } CloseMols_exposer.staticmethod( "typeName" ); - CloseMols_exposer.def( "__copy__", &__copy__); - CloseMols_exposer.def( "__deepcopy__", &__copy__); - CloseMols_exposer.def( "clone", &__copy__); + CloseMols_exposer.def( "__copy__", &__copy__); + CloseMols_exposer.def( "__deepcopy__", &__copy__); + CloseMols_exposer.def( "clone", &__copy__); CloseMols_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::CloseMols >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CloseMols_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::CloseMols >, diff --git a/wrapper/System/ComponentConstraint.pypp.cpp b/wrapper/System/ComponentConstraint.pypp.cpp index bd24e732e..3aba0a6d6 100644 --- a/wrapper/System/ComponentConstraint.pypp.cpp +++ b/wrapper/System/ComponentConstraint.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; SireSystem::ComponentConstraint __copy__(const SireSystem::ComponentConstraint &other){ return SireSystem::ComponentConstraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -114,9 +116,9 @@ void register_ComponentConstraint_class(){ } ComponentConstraint_exposer.staticmethod( "typeName" ); - ComponentConstraint_exposer.def( "__copy__", &__copy__); - ComponentConstraint_exposer.def( "__deepcopy__", &__copy__); - ComponentConstraint_exposer.def( "clone", &__copy__); + ComponentConstraint_exposer.def( "__copy__", &__copy__); + ComponentConstraint_exposer.def( "__deepcopy__", &__copy__); + ComponentConstraint_exposer.def( "clone", &__copy__); ComponentConstraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::ComponentConstraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ComponentConstraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::ComponentConstraint >, diff --git a/wrapper/System/Constraints.pypp.cpp b/wrapper/System/Constraints.pypp.cpp index 02065e84b..df0853950 100644 --- a/wrapper/System/Constraints.pypp.cpp +++ b/wrapper/System/Constraints.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; SireSystem::Constraints __copy__(const SireSystem::Constraints &other){ return SireSystem::Constraints(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -271,9 +273,9 @@ void register_Constraints_class(){ } Constraints_exposer.staticmethod( "typeName" ); - Constraints_exposer.def( "__copy__", &__copy__); - Constraints_exposer.def( "__deepcopy__", &__copy__); - Constraints_exposer.def( "clone", &__copy__); + Constraints_exposer.def( "__copy__", &__copy__); + Constraints_exposer.def( "__deepcopy__", &__copy__); + Constraints_exposer.def( "clone", &__copy__); Constraints_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::Constraints >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Constraints_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::Constraints >, diff --git a/wrapper/System/DihedralComponent.pypp.cpp b/wrapper/System/DihedralComponent.pypp.cpp index 3e968952e..7f526cb8a 100644 --- a/wrapper/System/DihedralComponent.pypp.cpp +++ b/wrapper/System/DihedralComponent.pypp.cpp @@ -30,6 +30,8 @@ namespace bp = boost::python; SireSystem::DihedralComponent __copy__(const SireSystem::DihedralComponent &other){ return SireSystem::DihedralComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -249,9 +251,9 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.staticmethod( "theta012" ); DihedralComponent_exposer.staticmethod( "theta123" ); DihedralComponent_exposer.staticmethod( "typeName" ); - DihedralComponent_exposer.def( "__copy__", &__copy__); - DihedralComponent_exposer.def( "__deepcopy__", &__copy__); - DihedralComponent_exposer.def( "clone", &__copy__); + DihedralComponent_exposer.def( "__copy__", &__copy__); + DihedralComponent_exposer.def( "__deepcopy__", &__copy__); + DihedralComponent_exposer.def( "clone", &__copy__); DihedralComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::DihedralComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); DihedralComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::DihedralComponent >, diff --git a/wrapper/System/DistanceComponent.pypp.cpp b/wrapper/System/DistanceComponent.pypp.cpp index 69245cb0e..e6a939d04 100644 --- a/wrapper/System/DistanceComponent.pypp.cpp +++ b/wrapper/System/DistanceComponent.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; SireSystem::DistanceComponent __copy__(const SireSystem::DistanceComponent &other){ return SireSystem::DistanceComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -143,9 +145,9 @@ void register_DistanceComponent_class(){ } DistanceComponent_exposer.staticmethod( "r" ); DistanceComponent_exposer.staticmethod( "typeName" ); - DistanceComponent_exposer.def( "__copy__", &__copy__); - DistanceComponent_exposer.def( "__deepcopy__", &__copy__); - DistanceComponent_exposer.def( "clone", &__copy__); + DistanceComponent_exposer.def( "__copy__", &__copy__); + DistanceComponent_exposer.def( "__deepcopy__", &__copy__); + DistanceComponent_exposer.def( "clone", &__copy__); DistanceComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::DistanceComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); DistanceComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::DistanceComponent >, diff --git a/wrapper/System/DoubleDistanceComponent.pypp.cpp b/wrapper/System/DoubleDistanceComponent.pypp.cpp index 7013a9a35..703203939 100644 --- a/wrapper/System/DoubleDistanceComponent.pypp.cpp +++ b/wrapper/System/DoubleDistanceComponent.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; SireSystem::DoubleDistanceComponent __copy__(const SireSystem::DoubleDistanceComponent &other){ return SireSystem::DoubleDistanceComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -180,9 +182,9 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.staticmethod( "r01" ); DoubleDistanceComponent_exposer.staticmethod( "r23" ); DoubleDistanceComponent_exposer.staticmethod( "typeName" ); - DoubleDistanceComponent_exposer.def( "__copy__", &__copy__); - DoubleDistanceComponent_exposer.def( "__deepcopy__", &__copy__); - DoubleDistanceComponent_exposer.def( "clone", &__copy__); + DoubleDistanceComponent_exposer.def( "__copy__", &__copy__); + DoubleDistanceComponent_exposer.def( "__deepcopy__", &__copy__); + DoubleDistanceComponent_exposer.def( "clone", &__copy__); DoubleDistanceComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::DoubleDistanceComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); DoubleDistanceComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::DoubleDistanceComponent >, diff --git a/wrapper/System/EnergyMonitor.pypp.cpp b/wrapper/System/EnergyMonitor.pypp.cpp index 45119994d..922d5441b 100644 --- a/wrapper/System/EnergyMonitor.pypp.cpp +++ b/wrapper/System/EnergyMonitor.pypp.cpp @@ -40,6 +40,8 @@ namespace bp = boost::python; SireSystem::EnergyMonitor __copy__(const SireSystem::EnergyMonitor &other){ return SireSystem::EnergyMonitor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -310,9 +312,9 @@ void register_EnergyMonitor_class(){ } EnergyMonitor_exposer.staticmethod( "typeName" ); - EnergyMonitor_exposer.def( "__copy__", &__copy__); - EnergyMonitor_exposer.def( "__deepcopy__", &__copy__); - EnergyMonitor_exposer.def( "clone", &__copy__); + EnergyMonitor_exposer.def( "__copy__", &__copy__); + EnergyMonitor_exposer.def( "__deepcopy__", &__copy__); + EnergyMonitor_exposer.def( "clone", &__copy__); EnergyMonitor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::EnergyMonitor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); EnergyMonitor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::EnergyMonitor >, diff --git a/wrapper/System/ForceFieldInfo.pypp.cpp b/wrapper/System/ForceFieldInfo.pypp.cpp index 2a2bff054..bed27e18f 100644 --- a/wrapper/System/ForceFieldInfo.pypp.cpp +++ b/wrapper/System/ForceFieldInfo.pypp.cpp @@ -32,6 +32,8 @@ namespace bp = boost::python; SireSystem::ForceFieldInfo __copy__(const SireSystem::ForceFieldInfo &other){ return SireSystem::ForceFieldInfo(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -312,9 +314,9 @@ void register_ForceFieldInfo_class(){ } ForceFieldInfo_exposer.staticmethod( "cutoffTypes" ); ForceFieldInfo_exposer.staticmethod( "typeName" ); - ForceFieldInfo_exposer.def( "__copy__", &__copy__); - ForceFieldInfo_exposer.def( "__deepcopy__", &__copy__); - ForceFieldInfo_exposer.def( "clone", &__copy__); + ForceFieldInfo_exposer.def( "__copy__", &__copy__); + ForceFieldInfo_exposer.def( "__deepcopy__", &__copy__); + ForceFieldInfo_exposer.def( "clone", &__copy__); ForceFieldInfo_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::ForceFieldInfo >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ForceFieldInfo_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::ForceFieldInfo >, diff --git a/wrapper/System/FreeEnergyMonitor.pypp.cpp b/wrapper/System/FreeEnergyMonitor.pypp.cpp index ce6dcecb3..dc9f1b1f8 100644 --- a/wrapper/System/FreeEnergyMonitor.pypp.cpp +++ b/wrapper/System/FreeEnergyMonitor.pypp.cpp @@ -43,6 +43,8 @@ namespace bp = boost::python; SireSystem::FreeEnergyMonitor __copy__(const SireSystem::FreeEnergyMonitor &other){ return SireSystem::FreeEnergyMonitor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -446,9 +448,9 @@ void register_FreeEnergyMonitor_class(){ } FreeEnergyMonitor_exposer.staticmethod( "merge" ); FreeEnergyMonitor_exposer.staticmethod( "typeName" ); - FreeEnergyMonitor_exposer.def( "__copy__", &__copy__); - FreeEnergyMonitor_exposer.def( "__deepcopy__", &__copy__); - FreeEnergyMonitor_exposer.def( "clone", &__copy__); + FreeEnergyMonitor_exposer.def( "__copy__", &__copy__); + FreeEnergyMonitor_exposer.def( "__deepcopy__", &__copy__); + FreeEnergyMonitor_exposer.def( "clone", &__copy__); FreeEnergyMonitor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::FreeEnergyMonitor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); FreeEnergyMonitor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::FreeEnergyMonitor >, diff --git a/wrapper/System/IDAndSet_MonitorID_.pypp.cpp b/wrapper/System/IDAndSet_MonitorID_.pypp.cpp index 978e3221b..46fcaa58d 100644 --- a/wrapper/System/IDAndSet_MonitorID_.pypp.cpp +++ b/wrapper/System/IDAndSet_MonitorID_.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; SireID::IDAndSet __copy__(const SireID::IDAndSet &other){ return SireID::IDAndSet(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -167,9 +169,9 @@ void register_IDAndSet_MonitorID__class(){ } IDAndSet_MonitorID__exposer.staticmethod( "typeName" ); - IDAndSet_MonitorID__exposer.def( "__copy__", &__copy__); - IDAndSet_MonitorID__exposer.def( "__deepcopy__", &__copy__); - IDAndSet_MonitorID__exposer.def( "clone", &__copy__); + IDAndSet_MonitorID__exposer.def( "__copy__", &__copy__>); + IDAndSet_MonitorID__exposer.def( "__deepcopy__", &__copy__>); + IDAndSet_MonitorID__exposer.def( "clone", &__copy__>); IDAndSet_MonitorID__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireID::IDAndSet >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IDAndSet_MonitorID__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireID::IDAndSet >, diff --git a/wrapper/System/IDAndSet_SysID_.pypp.cpp b/wrapper/System/IDAndSet_SysID_.pypp.cpp index f9b0546c8..a9e7a80c7 100644 --- a/wrapper/System/IDAndSet_SysID_.pypp.cpp +++ b/wrapper/System/IDAndSet_SysID_.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireID::IDAndSet __copy__(const SireID::IDAndSet &other){ return SireID::IDAndSet(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -165,9 +167,9 @@ void register_IDAndSet_SysID__class(){ } IDAndSet_SysID__exposer.staticmethod( "typeName" ); - IDAndSet_SysID__exposer.def( "__copy__", &__copy__); - IDAndSet_SysID__exposer.def( "__deepcopy__", &__copy__); - IDAndSet_SysID__exposer.def( "clone", &__copy__); + IDAndSet_SysID__exposer.def( "__copy__", &__copy__>); + IDAndSet_SysID__exposer.def( "__deepcopy__", &__copy__>); + IDAndSet_SysID__exposer.def( "clone", &__copy__>); IDAndSet_SysID__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireID::IDAndSet >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IDAndSet_SysID__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireID::IDAndSet >, diff --git a/wrapper/System/IDAssigner.pypp.cpp b/wrapper/System/IDAssigner.pypp.cpp index 9af711af5..c678bd6aa 100644 --- a/wrapper/System/IDAssigner.pypp.cpp +++ b/wrapper/System/IDAssigner.pypp.cpp @@ -52,6 +52,8 @@ namespace bp = boost::python; SireSystem::IDAssigner __copy__(const SireSystem::IDAssigner &other){ return SireSystem::IDAssigner(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -206,9 +208,9 @@ void register_IDAssigner_class(){ } IDAssigner_exposer.staticmethod( "typeName" ); - IDAssigner_exposer.def( "__copy__", &__copy__); - IDAssigner_exposer.def( "__deepcopy__", &__copy__); - IDAssigner_exposer.def( "clone", &__copy__); + IDAssigner_exposer.def( "__copy__", &__copy__); + IDAssigner_exposer.def( "__deepcopy__", &__copy__); + IDAssigner_exposer.def( "clone", &__copy__); IDAssigner_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::IDAssigner >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IDAssigner_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::IDAssigner >, diff --git a/wrapper/System/IDOrSet_MonitorID_.pypp.cpp b/wrapper/System/IDOrSet_MonitorID_.pypp.cpp index c0c263d0d..54981fefa 100644 --- a/wrapper/System/IDOrSet_MonitorID_.pypp.cpp +++ b/wrapper/System/IDOrSet_MonitorID_.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; SireID::IDOrSet __copy__(const SireID::IDOrSet &other){ return SireID::IDOrSet(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -167,9 +169,9 @@ void register_IDOrSet_MonitorID__class(){ } IDOrSet_MonitorID__exposer.staticmethod( "typeName" ); - IDOrSet_MonitorID__exposer.def( "__copy__", &__copy__); - IDOrSet_MonitorID__exposer.def( "__deepcopy__", &__copy__); - IDOrSet_MonitorID__exposer.def( "clone", &__copy__); + IDOrSet_MonitorID__exposer.def( "__copy__", &__copy__>); + IDOrSet_MonitorID__exposer.def( "__deepcopy__", &__copy__>); + IDOrSet_MonitorID__exposer.def( "clone", &__copy__>); IDOrSet_MonitorID__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireID::IDOrSet >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IDOrSet_MonitorID__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireID::IDOrSet >, diff --git a/wrapper/System/IDOrSet_SysID_.pypp.cpp b/wrapper/System/IDOrSet_SysID_.pypp.cpp index 1da113c03..8c3d1756d 100644 --- a/wrapper/System/IDOrSet_SysID_.pypp.cpp +++ b/wrapper/System/IDOrSet_SysID_.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireID::IDOrSet __copy__(const SireID::IDOrSet &other){ return SireID::IDOrSet(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -165,9 +167,9 @@ void register_IDOrSet_SysID__class(){ } IDOrSet_SysID__exposer.staticmethod( "typeName" ); - IDOrSet_SysID__exposer.def( "__copy__", &__copy__); - IDOrSet_SysID__exposer.def( "__deepcopy__", &__copy__); - IDOrSet_SysID__exposer.def( "clone", &__copy__); + IDOrSet_SysID__exposer.def( "__copy__", &__copy__>); + IDOrSet_SysID__exposer.def( "__deepcopy__", &__copy__>); + IDOrSet_SysID__exposer.def( "clone", &__copy__>); IDOrSet_SysID__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireID::IDOrSet >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IDOrSet_SysID__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireID::IDOrSet >, diff --git a/wrapper/System/IdentityConstraint.pypp.cpp b/wrapper/System/IdentityConstraint.pypp.cpp index e13c3b9d4..a00fc7f05 100644 --- a/wrapper/System/IdentityConstraint.pypp.cpp +++ b/wrapper/System/IdentityConstraint.pypp.cpp @@ -54,6 +54,8 @@ namespace bp = boost::python; SireSystem::IdentityConstraint __copy__(const SireSystem::IdentityConstraint &other){ return SireSystem::IdentityConstraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -220,9 +222,9 @@ void register_IdentityConstraint_class(){ } IdentityConstraint_exposer.staticmethod( "constrain" ); IdentityConstraint_exposer.staticmethod( "typeName" ); - IdentityConstraint_exposer.def( "__copy__", &__copy__); - IdentityConstraint_exposer.def( "__deepcopy__", &__copy__); - IdentityConstraint_exposer.def( "clone", &__copy__); + IdentityConstraint_exposer.def( "__copy__", &__copy__); + IdentityConstraint_exposer.def( "__deepcopy__", &__copy__); + IdentityConstraint_exposer.def( "clone", &__copy__); IdentityConstraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::IdentityConstraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IdentityConstraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::IdentityConstraint >, diff --git a/wrapper/System/MonitorComponent.pypp.cpp b/wrapper/System/MonitorComponent.pypp.cpp index b452ea47a..473c52b35 100644 --- a/wrapper/System/MonitorComponent.pypp.cpp +++ b/wrapper/System/MonitorComponent.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; SireSystem::MonitorComponent __copy__(const SireSystem::MonitorComponent &other){ return SireSystem::MonitorComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -112,9 +114,9 @@ void register_MonitorComponent_class(){ } MonitorComponent_exposer.staticmethod( "typeName" ); - MonitorComponent_exposer.def( "__copy__", &__copy__); - MonitorComponent_exposer.def( "__deepcopy__", &__copy__); - MonitorComponent_exposer.def( "clone", &__copy__); + MonitorComponent_exposer.def( "__copy__", &__copy__); + MonitorComponent_exposer.def( "__deepcopy__", &__copy__); + MonitorComponent_exposer.def( "clone", &__copy__); MonitorComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::MonitorComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); MonitorComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::MonitorComponent >, diff --git a/wrapper/System/MonitorComponents.pypp.cpp b/wrapper/System/MonitorComponents.pypp.cpp index 1687174f7..29e031701 100644 --- a/wrapper/System/MonitorComponents.pypp.cpp +++ b/wrapper/System/MonitorComponents.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; SireSystem::MonitorComponents __copy__(const SireSystem::MonitorComponents &other){ return SireSystem::MonitorComponents(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -183,9 +185,9 @@ void register_MonitorComponents_class(){ } MonitorComponents_exposer.staticmethod( "typeName" ); - MonitorComponents_exposer.def( "__copy__", &__copy__); - MonitorComponents_exposer.def( "__deepcopy__", &__copy__); - MonitorComponents_exposer.def( "clone", &__copy__); + MonitorComponents_exposer.def( "__copy__", &__copy__); + MonitorComponents_exposer.def( "__deepcopy__", &__copy__); + MonitorComponents_exposer.def( "clone", &__copy__); MonitorComponents_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::MonitorComponents >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); MonitorComponents_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::MonitorComponents >, diff --git a/wrapper/System/MonitorIdx.pypp.cpp b/wrapper/System/MonitorIdx.pypp.cpp index 211f4d0c3..d0f3dfe0e 100644 --- a/wrapper/System/MonitorIdx.pypp.cpp +++ b/wrapper/System/MonitorIdx.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireSystem::MonitorIdx __copy__(const SireSystem::MonitorIdx &other){ return SireSystem::MonitorIdx(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -132,9 +134,9 @@ void register_MonitorIdx_class(){ } MonitorIdx_exposer.staticmethod( "null" ); MonitorIdx_exposer.staticmethod( "typeName" ); - MonitorIdx_exposer.def( "__copy__", &__copy__); - MonitorIdx_exposer.def( "__deepcopy__", &__copy__); - MonitorIdx_exposer.def( "clone", &__copy__); + MonitorIdx_exposer.def( "__copy__", &__copy__); + MonitorIdx_exposer.def( "__deepcopy__", &__copy__); + MonitorIdx_exposer.def( "clone", &__copy__); MonitorIdx_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::MonitorIdx >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); MonitorIdx_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::MonitorIdx >, diff --git a/wrapper/System/MonitorMonitor.pypp.cpp b/wrapper/System/MonitorMonitor.pypp.cpp index f25a05c53..61bbfde7b 100644 --- a/wrapper/System/MonitorMonitor.pypp.cpp +++ b/wrapper/System/MonitorMonitor.pypp.cpp @@ -22,6 +22,8 @@ namespace bp = boost::python; SireSystem::MonitorMonitor __copy__(const SireSystem::MonitorMonitor &other){ return SireSystem::MonitorMonitor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -215,9 +217,9 @@ void register_MonitorMonitor_class(){ } MonitorMonitor_exposer.staticmethod( "typeName" ); - MonitorMonitor_exposer.def( "__copy__", &__copy__); - MonitorMonitor_exposer.def( "__deepcopy__", &__copy__); - MonitorMonitor_exposer.def( "clone", &__copy__); + MonitorMonitor_exposer.def( "__copy__", &__copy__); + MonitorMonitor_exposer.def( "__deepcopy__", &__copy__); + MonitorMonitor_exposer.def( "clone", &__copy__); MonitorMonitor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::MonitorMonitor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); MonitorMonitor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::MonitorMonitor >, diff --git a/wrapper/System/MonitorName.pypp.cpp b/wrapper/System/MonitorName.pypp.cpp index 02d751bb5..e3580573b 100644 --- a/wrapper/System/MonitorName.pypp.cpp +++ b/wrapper/System/MonitorName.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireSystem::MonitorName __copy__(const SireSystem::MonitorName &other){ return SireSystem::MonitorName(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -122,9 +124,9 @@ void register_MonitorName_class(){ } MonitorName_exposer.staticmethod( "typeName" ); - MonitorName_exposer.def( "__copy__", &__copy__); - MonitorName_exposer.def( "__deepcopy__", &__copy__); - MonitorName_exposer.def( "clone", &__copy__); + MonitorName_exposer.def( "__copy__", &__copy__); + MonitorName_exposer.def( "__deepcopy__", &__copy__); + MonitorName_exposer.def( "clone", &__copy__); MonitorName_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::MonitorName >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); MonitorName_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::MonitorName >, diff --git a/wrapper/System/MonitorProperty.pypp.cpp b/wrapper/System/MonitorProperty.pypp.cpp index 03c2e539c..4c5562f66 100644 --- a/wrapper/System/MonitorProperty.pypp.cpp +++ b/wrapper/System/MonitorProperty.pypp.cpp @@ -32,6 +32,8 @@ namespace bp = boost::python; SireSystem::MonitorProperty __copy__(const SireSystem::MonitorProperty &other){ return SireSystem::MonitorProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -237,9 +239,9 @@ void register_MonitorProperty_class(){ } MonitorProperty_exposer.staticmethod( "typeName" ); - MonitorProperty_exposer.def( "__copy__", &__copy__); - MonitorProperty_exposer.def( "__deepcopy__", &__copy__); - MonitorProperty_exposer.def( "clone", &__copy__); + MonitorProperty_exposer.def( "__copy__", &__copy__); + MonitorProperty_exposer.def( "__deepcopy__", &__copy__); + MonitorProperty_exposer.def( "clone", &__copy__); MonitorProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::MonitorProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); MonitorProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::MonitorProperty >, diff --git a/wrapper/System/NullConstraint.pypp.cpp b/wrapper/System/NullConstraint.pypp.cpp index 1e2774cf5..30a1f2f77 100644 --- a/wrapper/System/NullConstraint.pypp.cpp +++ b/wrapper/System/NullConstraint.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireSystem::NullConstraint __copy__(const SireSystem::NullConstraint &other){ return SireSystem::NullConstraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -88,9 +90,9 @@ void register_NullConstraint_class(){ } NullConstraint_exposer.staticmethod( "typeName" ); - NullConstraint_exposer.def( "__copy__", &__copy__); - NullConstraint_exposer.def( "__deepcopy__", &__copy__); - NullConstraint_exposer.def( "clone", &__copy__); + NullConstraint_exposer.def( "__copy__", &__copy__); + NullConstraint_exposer.def( "__deepcopy__", &__copy__); + NullConstraint_exposer.def( "clone", &__copy__); NullConstraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::NullConstraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); NullConstraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::NullConstraint >, diff --git a/wrapper/System/NullMonitor.pypp.cpp b/wrapper/System/NullMonitor.pypp.cpp index 23fa38097..e68a63933 100644 --- a/wrapper/System/NullMonitor.pypp.cpp +++ b/wrapper/System/NullMonitor.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireSystem::NullMonitor __copy__(const SireSystem::NullMonitor &other){ return SireSystem::NullMonitor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -87,9 +89,9 @@ void register_NullMonitor_class(){ } NullMonitor_exposer.staticmethod( "typeName" ); - NullMonitor_exposer.def( "__copy__", &__copy__); - NullMonitor_exposer.def( "__deepcopy__", &__copy__); - NullMonitor_exposer.def( "clone", &__copy__); + NullMonitor_exposer.def( "__copy__", &__copy__); + NullMonitor_exposer.def( "__deepcopy__", &__copy__); + NullMonitor_exposer.def( "clone", &__copy__); NullMonitor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::NullMonitor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); NullMonitor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::NullMonitor >, diff --git a/wrapper/System/PerturbationConstraint.pypp.cpp b/wrapper/System/PerturbationConstraint.pypp.cpp index 3b78bbd41..36653e9c4 100644 --- a/wrapper/System/PerturbationConstraint.pypp.cpp +++ b/wrapper/System/PerturbationConstraint.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; SireSystem::PerturbationConstraint __copy__(const SireSystem::PerturbationConstraint &other){ return SireSystem::PerturbationConstraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -114,9 +116,9 @@ void register_PerturbationConstraint_class(){ } PerturbationConstraint_exposer.staticmethod( "typeName" ); - PerturbationConstraint_exposer.def( "__copy__", &__copy__); - PerturbationConstraint_exposer.def( "__deepcopy__", &__copy__); - PerturbationConstraint_exposer.def( "clone", &__copy__); + PerturbationConstraint_exposer.def( "__copy__", &__copy__); + PerturbationConstraint_exposer.def( "__deepcopy__", &__copy__); + PerturbationConstraint_exposer.def( "clone", &__copy__); PerturbationConstraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::PerturbationConstraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PerturbationConstraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::PerturbationConstraint >, diff --git a/wrapper/System/PolariseCharges.pypp.cpp b/wrapper/System/PolariseCharges.pypp.cpp index 560661a0c..4a588d976 100644 --- a/wrapper/System/PolariseCharges.pypp.cpp +++ b/wrapper/System/PolariseCharges.pypp.cpp @@ -64,6 +64,8 @@ namespace bp = boost::python; SireSystem::PolariseCharges __copy__(const SireSystem::PolariseCharges &other){ return SireSystem::PolariseCharges(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -182,9 +184,9 @@ void register_PolariseCharges_class(){ } PolariseCharges_exposer.staticmethod( "typeName" ); - PolariseCharges_exposer.def( "__copy__", &__copy__); - PolariseCharges_exposer.def( "__deepcopy__", &__copy__); - PolariseCharges_exposer.def( "clone", &__copy__); + PolariseCharges_exposer.def( "__copy__", &__copy__); + PolariseCharges_exposer.def( "__deepcopy__", &__copy__); + PolariseCharges_exposer.def( "clone", &__copy__); PolariseCharges_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::PolariseCharges >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PolariseCharges_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::PolariseCharges >, diff --git a/wrapper/System/PolariseChargesFF.pypp.cpp b/wrapper/System/PolariseChargesFF.pypp.cpp index 3c370c15a..fb6b47adb 100644 --- a/wrapper/System/PolariseChargesFF.pypp.cpp +++ b/wrapper/System/PolariseChargesFF.pypp.cpp @@ -64,6 +64,8 @@ namespace bp = boost::python; SireSystem::PolariseChargesFF __copy__(const SireSystem::PolariseChargesFF &other){ return SireSystem::PolariseChargesFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -184,9 +186,9 @@ void register_PolariseChargesFF_class(){ } PolariseChargesFF_exposer.staticmethod( "typeName" ); - PolariseChargesFF_exposer.def( "__copy__", &__copy__); - PolariseChargesFF_exposer.def( "__deepcopy__", &__copy__); - PolariseChargesFF_exposer.def( "clone", &__copy__); + PolariseChargesFF_exposer.def( "__copy__", &__copy__); + PolariseChargesFF_exposer.def( "__deepcopy__", &__copy__); + PolariseChargesFF_exposer.def( "clone", &__copy__); PolariseChargesFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::PolariseChargesFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PolariseChargesFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::PolariseChargesFF >, diff --git a/wrapper/System/PropertyConstraint.pypp.cpp b/wrapper/System/PropertyConstraint.pypp.cpp index c5921ba2e..a2c529ab8 100644 --- a/wrapper/System/PropertyConstraint.pypp.cpp +++ b/wrapper/System/PropertyConstraint.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireSystem::PropertyConstraint __copy__(const SireSystem::PropertyConstraint &other){ return SireSystem::PropertyConstraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -90,9 +92,9 @@ void register_PropertyConstraint_class(){ } PropertyConstraint_exposer.staticmethod( "typeName" ); - PropertyConstraint_exposer.def( "__copy__", &__copy__); - PropertyConstraint_exposer.def( "__deepcopy__", &__copy__); - PropertyConstraint_exposer.def( "clone", &__copy__); + PropertyConstraint_exposer.def( "__copy__", &__copy__); + PropertyConstraint_exposer.def( "__deepcopy__", &__copy__); + PropertyConstraint_exposer.def( "clone", &__copy__); PropertyConstraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::PropertyConstraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PropertyConstraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::PropertyConstraint >, diff --git a/wrapper/System/SireSystem_registrars.cpp b/wrapper/System/SireSystem_registrars.cpp index 78bae3b56..596197b4a 100644 --- a/wrapper/System/SireSystem_registrars.cpp +++ b/wrapper/System/SireSystem_registrars.cpp @@ -27,6 +27,7 @@ #include "distancecomponent.h" #include "closemols.h" #include "system.h" +#include "systemtrajectory.h" #include "monitorproperty.h" #include "volmapmonitor.h" #include "monitorname.h" @@ -74,6 +75,8 @@ void register_SireSystem_objects() ObjectRegistry::registerConverterFor< SireSystem::TripleDistanceComponent >(); ObjectRegistry::registerConverterFor< SireSystem::CloseMols >(); ObjectRegistry::registerConverterFor< SireSystem::System >(); + ObjectRegistry::registerConverterFor< SireSystem::SystemTrajectory >(); + ObjectRegistry::registerConverterFor< SireSystem::MolSystemTrajectory >(); ObjectRegistry::registerConverterFor< SireSystem::MonitorProperty >(); ObjectRegistry::registerConverterFor< SireSystem::VolMapMonitor >(); ObjectRegistry::registerConverterFor< SireSystem::MonitorName >(); diff --git a/wrapper/System/SpaceWrapper.pypp.cpp b/wrapper/System/SpaceWrapper.pypp.cpp index a2a74572b..5adbeb296 100644 --- a/wrapper/System/SpaceWrapper.pypp.cpp +++ b/wrapper/System/SpaceWrapper.pypp.cpp @@ -30,6 +30,8 @@ namespace bp = boost::python; SireSystem::SpaceWrapper __copy__(const SireSystem::SpaceWrapper &other){ return SireSystem::SpaceWrapper(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -108,9 +110,9 @@ void register_SpaceWrapper_class(){ } SpaceWrapper_exposer.staticmethod( "typeName" ); - SpaceWrapper_exposer.def( "__copy__", &__copy__); - SpaceWrapper_exposer.def( "__deepcopy__", &__copy__); - SpaceWrapper_exposer.def( "clone", &__copy__); + SpaceWrapper_exposer.def( "__copy__", &__copy__); + SpaceWrapper_exposer.def( "__deepcopy__", &__copy__); + SpaceWrapper_exposer.def( "clone", &__copy__); SpaceWrapper_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::SpaceWrapper >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SpaceWrapper_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::SpaceWrapper >, diff --git a/wrapper/System/Specify_MonitorID_.pypp.cpp b/wrapper/System/Specify_MonitorID_.pypp.cpp index ad8a803a9..ccf575686 100644 --- a/wrapper/System/Specify_MonitorID_.pypp.cpp +++ b/wrapper/System/Specify_MonitorID_.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; SireID::Specify __copy__(const SireID::Specify &other){ return SireID::Specify(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -216,9 +218,9 @@ void register_Specify_MonitorID__class(){ } Specify_MonitorID__exposer.staticmethod( "typeName" ); - Specify_MonitorID__exposer.def( "__copy__", &__copy__); - Specify_MonitorID__exposer.def( "__deepcopy__", &__copy__); - Specify_MonitorID__exposer.def( "clone", &__copy__); + Specify_MonitorID__exposer.def( "__copy__", &__copy__>); + Specify_MonitorID__exposer.def( "__deepcopy__", &__copy__>); + Specify_MonitorID__exposer.def( "clone", &__copy__>); Specify_MonitorID__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireID::Specify >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Specify_MonitorID__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireID::Specify >, diff --git a/wrapper/System/Specify_SysID_.pypp.cpp b/wrapper/System/Specify_SysID_.pypp.cpp index 0393793d7..edd900dea 100644 --- a/wrapper/System/Specify_SysID_.pypp.cpp +++ b/wrapper/System/Specify_SysID_.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireID::Specify __copy__(const SireID::Specify &other){ return SireID::Specify(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -214,9 +216,9 @@ void register_Specify_SysID__class(){ } Specify_SysID__exposer.staticmethod( "typeName" ); - Specify_SysID__exposer.def( "__copy__", &__copy__); - Specify_SysID__exposer.def( "__deepcopy__", &__copy__); - Specify_SysID__exposer.def( "clone", &__copy__); + Specify_SysID__exposer.def( "__copy__", &__copy__>); + Specify_SysID__exposer.def( "__deepcopy__", &__copy__>); + Specify_SysID__exposer.def( "clone", &__copy__>); Specify_SysID__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireID::Specify >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Specify_SysID__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireID::Specify >, diff --git a/wrapper/System/SysIdx.pypp.cpp b/wrapper/System/SysIdx.pypp.cpp index e185ba62e..5e6fade82 100644 --- a/wrapper/System/SysIdx.pypp.cpp +++ b/wrapper/System/SysIdx.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireSystem::SysIdx __copy__(const SireSystem::SysIdx &other){ return SireSystem::SysIdx(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -128,9 +130,9 @@ void register_SysIdx_class(){ } SysIdx_exposer.staticmethod( "null" ); SysIdx_exposer.staticmethod( "typeName" ); - SysIdx_exposer.def( "__copy__", &__copy__); - SysIdx_exposer.def( "__deepcopy__", &__copy__); - SysIdx_exposer.def( "clone", &__copy__); + SysIdx_exposer.def( "__copy__", &__copy__); + SysIdx_exposer.def( "__deepcopy__", &__copy__); + SysIdx_exposer.def( "clone", &__copy__); SysIdx_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::SysIdx >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SysIdx_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::SysIdx >, diff --git a/wrapper/System/SysName.pypp.cpp b/wrapper/System/SysName.pypp.cpp index 7d238a215..8c9cc4c62 100644 --- a/wrapper/System/SysName.pypp.cpp +++ b/wrapper/System/SysName.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireSystem::SysName __copy__(const SireSystem::SysName &other){ return SireSystem::SysName(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -118,9 +120,9 @@ void register_SysName_class(){ } SysName_exposer.staticmethod( "typeName" ); - SysName_exposer.def( "__copy__", &__copy__); - SysName_exposer.def( "__deepcopy__", &__copy__); - SysName_exposer.def( "clone", &__copy__); + SysName_exposer.def( "__copy__", &__copy__); + SysName_exposer.def( "__deepcopy__", &__copy__); + SysName_exposer.def( "clone", &__copy__); SysName_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::SysName >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SysName_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::SysName >, diff --git a/wrapper/System/System.pypp.cpp b/wrapper/System/System.pypp.cpp index 99f71009f..f798d4e61 100644 --- a/wrapper/System/System.pypp.cpp +++ b/wrapper/System/System.pypp.cpp @@ -76,6 +76,8 @@ namespace bp = boost::python; SireSystem::System __copy__(const SireSystem::System &other){ return SireSystem::System(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -1369,6 +1371,32 @@ void register_System_class(){ , 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() + , "" ); + + } + { //::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() + , "" ); + } { //::SireSystem::System::monitor @@ -2622,9 +2650,9 @@ void register_System_class(){ } 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( "__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 >, diff --git a/wrapper/System/SystemMonitors.pypp.cpp b/wrapper/System/SystemMonitors.pypp.cpp index 2ff15bf90..e2870b87c 100644 --- a/wrapper/System/SystemMonitors.pypp.cpp +++ b/wrapper/System/SystemMonitors.pypp.cpp @@ -28,6 +28,8 @@ namespace bp = boost::python; SireSystem::SystemMonitors __copy__(const SireSystem::SystemMonitors &other){ return SireSystem::SystemMonitors(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireSystem::SystemMonitors&){ return "SireSystem::SystemMonitors";} @@ -423,9 +425,9 @@ void register_SystemMonitors_class(){ } SystemMonitors_exposer.staticmethod( "typeName" ); - SystemMonitors_exposer.def( "__copy__", &__copy__); - SystemMonitors_exposer.def( "__deepcopy__", &__copy__); - SystemMonitors_exposer.def( "clone", &__copy__); + SystemMonitors_exposer.def( "__copy__", &__copy__); + SystemMonitors_exposer.def( "__deepcopy__", &__copy__); + SystemMonitors_exposer.def( "clone", &__copy__); SystemMonitors_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::SystemMonitors >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SystemMonitors_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::SystemMonitors >, diff --git a/wrapper/System/TripleDistanceComponent.pypp.cpp b/wrapper/System/TripleDistanceComponent.pypp.cpp index d9c7750ec..c12d81f58 100644 --- a/wrapper/System/TripleDistanceComponent.pypp.cpp +++ b/wrapper/System/TripleDistanceComponent.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; SireSystem::TripleDistanceComponent __copy__(const SireSystem::TripleDistanceComponent &other){ return SireSystem::TripleDistanceComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -217,9 +219,9 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.staticmethod( "r23" ); TripleDistanceComponent_exposer.staticmethod( "r45" ); TripleDistanceComponent_exposer.staticmethod( "typeName" ); - TripleDistanceComponent_exposer.def( "__copy__", &__copy__); - TripleDistanceComponent_exposer.def( "__deepcopy__", &__copy__); - TripleDistanceComponent_exposer.def( "clone", &__copy__); + TripleDistanceComponent_exposer.def( "__copy__", &__copy__); + TripleDistanceComponent_exposer.def( "__deepcopy__", &__copy__); + TripleDistanceComponent_exposer.def( "clone", &__copy__); TripleDistanceComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::TripleDistanceComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); TripleDistanceComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::TripleDistanceComponent >, diff --git a/wrapper/System/VolMapMonitor.pypp.cpp b/wrapper/System/VolMapMonitor.pypp.cpp index c1efc7489..29192b7b2 100644 --- a/wrapper/System/VolMapMonitor.pypp.cpp +++ b/wrapper/System/VolMapMonitor.pypp.cpp @@ -40,6 +40,8 @@ namespace bp = boost::python; SireSystem::VolMapMonitor __copy__(const SireSystem::VolMapMonitor &other){ return SireSystem::VolMapMonitor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -282,9 +284,9 @@ void register_VolMapMonitor_class(){ } VolMapMonitor_exposer.staticmethod( "typeName" ); - VolMapMonitor_exposer.def( "__copy__", &__copy__); - VolMapMonitor_exposer.def( "__deepcopy__", &__copy__); - VolMapMonitor_exposer.def( "clone", &__copy__); + VolMapMonitor_exposer.def( "__copy__", &__copy__); + VolMapMonitor_exposer.def( "__deepcopy__", &__copy__); + VolMapMonitor_exposer.def( "clone", &__copy__); VolMapMonitor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::VolMapMonitor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); VolMapMonitor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::VolMapMonitor >, diff --git a/wrapper/System/WindowedComponent.pypp.cpp b/wrapper/System/WindowedComponent.pypp.cpp index 3e7c40cf1..282203fff 100644 --- a/wrapper/System/WindowedComponent.pypp.cpp +++ b/wrapper/System/WindowedComponent.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; SireSystem::WindowedComponent __copy__(const SireSystem::WindowedComponent &other){ return SireSystem::WindowedComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -138,9 +140,9 @@ void register_WindowedComponent_class(){ } WindowedComponent_exposer.staticmethod( "typeName" ); - WindowedComponent_exposer.def( "__copy__", &__copy__); - WindowedComponent_exposer.def( "__deepcopy__", &__copy__); - WindowedComponent_exposer.def( "clone", &__copy__); + WindowedComponent_exposer.def( "__copy__", &__copy__); + WindowedComponent_exposer.def( "__deepcopy__", &__copy__); + WindowedComponent_exposer.def( "clone", &__copy__); WindowedComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireSystem::WindowedComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); WindowedComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireSystem::WindowedComponent >, From 7074b84a101ccbbc1efc37cd5d986663344311eb Mon Sep 17 00:00:00 2001 From: Christopher Woods Date: Sun, 23 Jun 2024 17:56:01 +0100 Subject: [PATCH 4/4] Adding a changelog entry --- doc/source/changelog.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index ac86ad415..95045e4ec 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -68,6 +68,13 @@ organisation on `GitHub `__. correct AtomIdx, rather than added as the last atoms in the molecule. This is also more natural. This fixes issue #202. +* Added the "center" keyword argument to the ``make_whole`` functions of + :class:`~sire.mol.Cursors`, :class:`~sire.mol.CursorsM` and + :class:`~sire.system.System` (as well as to the legacy System class). + Also allowed the constructor of :class:`~sire.maths.Vector` to recognise + ``origin`` and ``zero`` as arguments, meaning you can write + ``cursor.make_whole(center="origin")``. This fixes issue #199. + * Please add an item to this changelog when you create your PR `2024.1.0 `__ - April 2024