From 896772a64d7be7668a9ae5736f4c05a49e8cd98d Mon Sep 17 00:00:00 2001 From: Christopher Woods Date: Sat, 29 Jun 2024 17:49:09 +0100 Subject: [PATCH] Copied changes from devel into main ready for 2024.2.0 release --- .github/workflows/choose_branch.yaml | 8 +- .github/workflows/devel.yaml | 8 +- .github/workflows/main.yaml | 8 +- .github/workflows/pr.yaml | 8 +- README.rst | 34 +- SECURITY.md | 8 +- corelib/CMakeLists.txt | 2 +- corelib/src/libs/SireBase/CMakeLists.txt | 4 + corelib/src/libs/SireBase/atexit.cpp | 60 + corelib/src/libs/SireBase/atexit.h | 81 + corelib/src/libs/SireBase/pagecache.cpp | 2026 +++++++++++++++++ corelib/src/libs/SireBase/pagecache.h | 211 ++ corelib/src/libs/SireIO/grotop.cpp | 6 + corelib/src/libs/SireIO/moleculeparser.cpp | 4 +- corelib/src/libs/SireMM/ljparameter.h | 10 +- corelib/src/libs/SireMol/moleculegroups.cpp | 5 + corelib/src/libs/SireMol/molecules.cpp | 32 +- corelib/src/libs/SireMol/structureeditor.cpp | 128 ++ corelib/src/libs/SireMol/trajectory.cpp | 306 ++- corelib/src/libs/SireMol/trajectory.h | 10 + corelib/src/libs/SireSystem/CMakeLists.txt | 2 + corelib/src/libs/SireSystem/merge.cpp | 14 + corelib/src/libs/SireSystem/system.cpp | 245 +- corelib/src/libs/SireSystem/system.h | 14 + .../src/libs/SireSystem/systemtrajectory.cpp | 901 ++++++++ .../src/libs/SireSystem/systemtrajectory.h | 184 ++ corelib/src/libs/SireVol/triclinicbox.cpp | 15 + corelib/src/libs/SireVol/triclinicbox.h | 3 + doc/source/changelog.rst | 65 + doc/source/cheatsheet/trajectory.rst | 49 + doc/source/index.rst | 24 + recipes/sire/conda_build_config.yaml | 10 + recipes/sire/template.yaml | 2 +- setup.py | 118 +- src/sire/base/CMakeLists.txt | 1 + src/sire/base/__init__.py | 11 +- src/sire/base/_pagecache.py | 53 + src/sire/maths/_vector.py | 7 + src/sire/mol/_cursor.py | 8 +- src/sire/morph/_pertfile.py | 12 +- src/sire/system/_system.py | 22 +- src/sire/utils/_try_import.py | 28 +- tests/base/test_pagecache.py | 95 + tests/convert/test_gemmi.py | 10 +- tests/convert/test_openmm_trajectory.py | 38 + tests/io/test_grotop.py | 6 + tests/io/test_pdbx.py | 7 +- tests/mol/test_make_whole.py | 20 +- tests/mol/test_reorder.py | 36 + tests/morph/test_pert.py | 18 + tests/vol/test_triclinic.py | 31 + version.txt | 2 +- wrapper/AutoGenerate/create_wrappers.py | 16 +- wrapper/Base/Array2D_double_.pypp.cpp | 8 +- wrapper/Base/BooleanProperty.pypp.cpp | 8 +- wrapper/Base/CMakeAutogenFile.txt | 1 + wrapper/Base/CPUID.pypp.cpp | 8 +- wrapper/Base/ChunkedVector_double_.pypp.cpp | 8 +- wrapper/Base/DoubleArrayProperty.pypp.cpp | 8 +- wrapper/Base/FlopsMark.pypp.cpp | 8 +- .../Base/GeneralUnitArrayProperty.pypp.cpp | 8 +- wrapper/Base/GeneralUnitProperty.pypp.cpp | 8 +- wrapper/Base/Incremint.pypp.cpp | 8 +- wrapper/Base/IntegerArrayProperty.pypp.cpp | 8 +- wrapper/Base/LazyEvaluator.pypp.cpp | 8 +- wrapper/Base/LengthProperty.pypp.cpp | 8 +- wrapper/Base/LinkToProperty.pypp.cpp | 8 +- wrapper/Base/LowerCaseString.pypp.cpp | 8 +- wrapper/Base/MajorMinorVersion.pypp.cpp | 8 +- wrapper/Base/MemInfo.pypp.cpp | 8 +- wrapper/Base/NoMangling.pypp.cpp | 8 +- wrapper/Base/NullProperty.pypp.cpp | 8 +- wrapper/Base/NumberProperty.pypp.cpp | 8 +- ...PackedArray2D_DoubleArrayProperty.pypp.cpp | 8 +- ...Array2D_DoubleArrayProperty_Array.pypp.cpp | 8 +- ...ackedArray2D_IntegerArrayProperty.pypp.cpp | 8 +- ...rray2D_IntegerArrayProperty_Array.pypp.cpp | 8 +- .../Base/PackedArray2D_PropertyList.pypp.cpp | 8 +- .../PackedArray2D_PropertyList_Array.pypp.cpp | 8 +- wrapper/Base/PackedArray2D_QString_.pypp.cpp | 8 +- .../Base/PackedArray2D_QString_Array.pypp.cpp | 8 +- wrapper/Base/PackedArray2D_QVariant_.pypp.cpp | 8 +- .../PackedArray2D_QVariant_Array.pypp.cpp | 8 +- ...PackedArray2D_StringArrayProperty.pypp.cpp | 8 +- ...Array2D_StringArrayProperty_Array.pypp.cpp | 8 +- wrapper/Base/PackedArray2D_double_.pypp.cpp | 8 +- .../Base/PackedArray2D_double_Array.pypp.cpp | 8 +- wrapper/Base/PackedArray2D_int_.pypp.cpp | 8 +- wrapper/Base/PackedArray2D_int_Array.pypp.cpp | 8 +- wrapper/Base/PageCache.pypp.cpp | 752 ++++++ wrapper/Base/PageCache.pypp.hpp | 10 + wrapper/Base/Process.pypp.cpp | 8 +- wrapper/Base/ProgressBar.pypp.cpp | 8 +- wrapper/Base/Properties.pypp.cpp | 8 +- wrapper/Base/PropertyList.pypp.cpp | 8 +- wrapper/Base/PropertyMap.pypp.cpp | 8 +- wrapper/Base/PropertyName.pypp.cpp | 8 +- wrapper/Base/SimpleRange.pypp.cpp | 8 +- wrapper/Base/StringArrayProperty.pypp.cpp | 8 +- wrapper/Base/StringProperty.pypp.cpp | 8 +- wrapper/Base/TimeProperty.pypp.cpp | 8 +- wrapper/Base/TrigArray2D_double_.pypp.cpp | 8 +- wrapper/Base/TrimString.pypp.cpp | 8 +- wrapper/Base/UnitTest.pypp.cpp | 8 +- wrapper/Base/UpperCaseString.pypp.cpp | 8 +- wrapper/Base/VariantProperty.pypp.cpp | 8 +- wrapper/Base/Version.pypp.cpp | 8 +- wrapper/Base/_Base.main.cpp | 4 + wrapper/Base/_Base_free_functions.pypp.cpp | 22 + wrapper/Base/__init__.py | 13 + wrapper/Base/active_headers.h | 2 + wrapper/CMakeLists.txt | 2 + .../Convert/SireOpenMM/LambdaLever.pypp.cpp | 15 +- .../SireOpenMM/OpenMMMetaData.pypp.cpp | 8 +- .../PerturbableOpenMMMolecule.pypp.cpp | 24 +- wrapper/Convert/SireOpenMM/lambdalever.cpp | 5 +- wrapper/Convert/SireOpenMM/lambdalever.h | 3 +- wrapper/Convert/SireOpenMM/openmmmolecule.cpp | 77 +- wrapper/Convert/SireOpenMM/openmmmolecule.h | 8 +- .../SireOpenMM/sire_to_openmm_system.cpp | 102 +- wrapper/Convert/__init__.py | 2 +- wrapper/Helpers/copy.hpp | 46 + wrapper/MM/AmberAngle.pypp.cpp | 8 +- wrapper/MM/AmberBond.pypp.cpp | 8 +- wrapper/MM/AmberDihPart.pypp.cpp | 8 +- wrapper/MM/AmberDihedral.pypp.cpp | 8 +- wrapper/MM/AmberNB14.pypp.cpp | 8 +- wrapper/MM/AmberParams.pypp.cpp | 8 +- wrapper/MM/Angle.pypp.cpp | 8 +- wrapper/MM/AngleComponent.pypp.cpp | 8 +- wrapper/MM/AngleParameterName.pypp.cpp | 8 +- wrapper/MM/AngleRestraint.pypp.cpp | 8 +- wrapper/MM/AngleSymbols.pypp.cpp | 8 +- wrapper/MM/AtomLJs.pypp.cpp | 8 +- wrapper/MM/BendBendComponent.pypp.cpp | 8 +- wrapper/MM/BendBendParameterName.pypp.cpp | 8 +- wrapper/MM/BendBendSymbols.pypp.cpp | 8 +- wrapper/MM/Bond.pypp.cpp | 8 +- wrapper/MM/BondComponent.pypp.cpp | 8 +- wrapper/MM/BondParameterName.pypp.cpp | 8 +- wrapper/MM/BondRestraint.pypp.cpp | 8 +- wrapper/MM/BondRestraints.pypp.cpp | 8 +- wrapper/MM/BondSymbols.pypp.cpp | 8 +- wrapper/MM/BoreschRestraint.pypp.cpp | 8 +- wrapper/MM/BoreschRestraints.pypp.cpp | 8 +- wrapper/MM/CHARMMSwitchingFunction.pypp.cpp | 8 +- wrapper/MM/CLJ14Group.pypp.cpp | 8 +- wrapper/MM/CLJAtom.pypp.cpp | 8 +- wrapper/MM/CLJAtoms.pypp.cpp | 8 +- wrapper/MM/CLJBox.pypp.cpp | 8 +- wrapper/MM/CLJBoxDistance.pypp.cpp | 8 +- wrapper/MM/CLJBoxIndex.pypp.cpp | 8 +- wrapper/MM/CLJBoxes.pypp.cpp | 8 +- wrapper/MM/CLJCalculator.pypp.cpp | 8 +- wrapper/MM/CLJComponent.pypp.cpp | 8 +- wrapper/MM/CLJDelta.pypp.cpp | 8 +- wrapper/MM/CLJExtractor.pypp.cpp | 8 +- wrapper/MM/CLJGrid.pypp.cpp | 8 +- wrapper/MM/CLJGroup.pypp.cpp | 8 +- wrapper/MM/CLJIntraRFFunction.pypp.cpp | 8 +- wrapper/MM/CLJIntraShiftFunction.pypp.cpp | 8 +- wrapper/MM/CLJNBPairs.pypp.cpp | 10 +- wrapper/MM/CLJParameterNames.pypp.cpp | 8 +- wrapper/MM/CLJParameterNames3D.pypp.cpp | 8 +- wrapper/MM/CLJProbe.pypp.cpp | 8 +- wrapper/MM/CLJRFFunction.pypp.cpp | 8 +- wrapper/MM/CLJScaleFactor.pypp.cpp | 8 +- wrapper/MM/CLJShiftFunction.pypp.cpp | 8 +- wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp | 8 +- wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp | 8 +- wrapper/MM/CLJSoftRFFunction.pypp.cpp | 8 +- wrapper/MM/CLJSoftShiftFunction.pypp.cpp | 8 +- wrapper/MM/CLJWorkspace.pypp.cpp | 8 +- wrapper/MM/ChargeParameterName.pypp.cpp | 8 +- wrapper/MM/ChargeParameterName3D.pypp.cpp | 8 +- wrapper/MM/CoulombComponent.pypp.cpp | 8 +- wrapper/MM/CoulombNBPairs.pypp.cpp | 8 +- wrapper/MM/CoulombProbe.pypp.cpp | 8 +- wrapper/MM/CoulombScaleFactor.pypp.cpp | 8 +- wrapper/MM/Dihedral.pypp.cpp | 8 +- wrapper/MM/DihedralComponent.pypp.cpp | 8 +- wrapper/MM/DihedralParameterName.pypp.cpp | 8 +- wrapper/MM/DihedralRestraint.pypp.cpp | 8 +- wrapper/MM/DihedralSymbols.pypp.cpp | 8 +- wrapper/MM/DistanceRestraint.pypp.cpp | 8 +- wrapper/MM/DoubleDistanceRestraint.pypp.cpp | 8 +- wrapper/MM/ExcludedPairs.pypp.cpp | 8 +- wrapper/MM/FourAtomFunction.pypp.cpp | 8 +- wrapper/MM/FourAtomFunctions.pypp.cpp | 8 +- wrapper/MM/FourAtomPerturbation.pypp.cpp | 8 +- wrapper/MM/GridFF.pypp.cpp | 8 +- wrapper/MM/GridFF2.pypp.cpp | 8 +- wrapper/MM/GromacsAngle.pypp.cpp | 8 +- wrapper/MM/GromacsAtomType.pypp.cpp | 8 +- wrapper/MM/GromacsBond.pypp.cpp | 8 +- wrapper/MM/GromacsDihedral.pypp.cpp | 8 +- wrapper/MM/GroupInternalParameters.pypp.cpp | 8 +- wrapper/MM/HarmonicSwitchingFunction.pypp.cpp | 8 +- wrapper/MM/Improper.pypp.cpp | 8 +- wrapper/MM/ImproperComponent.pypp.cpp | 8 +- wrapper/MM/ImproperParameterName.pypp.cpp | 8 +- wrapper/MM/ImproperSymbols.pypp.cpp | 8 +- wrapper/MM/InterCLJFF.pypp.cpp | 8 +- wrapper/MM/InterCLJFFBase.pypp.cpp | 8 +- wrapper/MM/InterCoulombFF.pypp.cpp | 8 +- wrapper/MM/InterCoulombFFBase.pypp.cpp | 8 +- wrapper/MM/InterFF.pypp.cpp | 8 +- wrapper/MM/InterGroupCLJFF.pypp.cpp | 8 +- wrapper/MM/InterGroupCLJFFBase.pypp.cpp | 8 +- wrapper/MM/InterGroupCoulombFF.pypp.cpp | 8 +- wrapper/MM/InterGroupCoulombFFBase.pypp.cpp | 8 +- wrapper/MM/InterGroupFF.pypp.cpp | 8 +- wrapper/MM/InterGroupLJFF.pypp.cpp | 8 +- wrapper/MM/InterGroupLJFFBase.pypp.cpp | 8 +- wrapper/MM/InterGroupSoftCLJFF.pypp.cpp | 8 +- wrapper/MM/InterGroupSoftCLJFFBase.pypp.cpp | 8 +- wrapper/MM/InterLJFF.pypp.cpp | 8 +- wrapper/MM/InterLJFFBase.pypp.cpp | 8 +- wrapper/MM/InterSoftCLJFF.pypp.cpp | 8 +- wrapper/MM/InterSoftCLJFFBase.pypp.cpp | 8 +- wrapper/MM/InternalComponent.pypp.cpp | 8 +- wrapper/MM/InternalFF.pypp.cpp | 8 +- wrapper/MM/InternalGroupFF.pypp.cpp | 8 +- wrapper/MM/InternalParameterNames.pypp.cpp | 8 +- wrapper/MM/InternalParameterNames3D.pypp.cpp | 8 +- wrapper/MM/InternalParameters.pypp.cpp | 8 +- wrapper/MM/InternalParameters3D.pypp.cpp | 8 +- wrapper/MM/InternalSymbols.pypp.cpp | 8 +- wrapper/MM/Intra14Component.pypp.cpp | 8 +- wrapper/MM/Intra14CoulombComponent.pypp.cpp | 8 +- wrapper/MM/Intra14LJComponent.pypp.cpp | 8 +- wrapper/MM/IntraCLJFF.pypp.cpp | 8 +- wrapper/MM/IntraCLJFFBase.pypp.cpp | 8 +- wrapper/MM/IntraCoulombFF.pypp.cpp | 8 +- wrapper/MM/IntraCoulombFFBase.pypp.cpp | 8 +- wrapper/MM/IntraFF.pypp.cpp | 8 +- wrapper/MM/IntraGroupCLJFF.pypp.cpp | 8 +- wrapper/MM/IntraGroupCLJFFBase.pypp.cpp | 8 +- wrapper/MM/IntraGroupCoulombFF.pypp.cpp | 8 +- wrapper/MM/IntraGroupCoulombFFBase.pypp.cpp | 8 +- wrapper/MM/IntraGroupFF.pypp.cpp | 8 +- wrapper/MM/IntraGroupLJFF.pypp.cpp | 8 +- wrapper/MM/IntraGroupLJFFBase.pypp.cpp | 8 +- wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp | 8 +- wrapper/MM/IntraGroupSoftCLJFFBase.pypp.cpp | 8 +- wrapper/MM/IntraLJFF.pypp.cpp | 8 +- wrapper/MM/IntraLJFFBase.pypp.cpp | 8 +- wrapper/MM/IntraSoftCLJFF.pypp.cpp | 8 +- wrapper/MM/IntraSoftCLJFFBase.pypp.cpp | 8 +- wrapper/MM/LJ1264Parameter.pypp.cpp | 8 +- wrapper/MM/LJComponent.pypp.cpp | 8 +- wrapper/MM/LJException.pypp.cpp | 8 +- wrapper/MM/LJExceptionID.pypp.cpp | 8 +- wrapper/MM/LJNBPairs.pypp.cpp | 8 +- wrapper/MM/LJParameter.pypp.cpp | 8 +- wrapper/MM/LJParameterName.pypp.cpp | 8 +- wrapper/MM/LJParameterName3D.pypp.cpp | 8 +- wrapper/MM/LJPerturbation.pypp.cpp | 8 +- wrapper/MM/LJProbe.pypp.cpp | 8 +- wrapper/MM/LJScaleFactor.pypp.cpp | 8 +- wrapper/MM/MMDetail.pypp.cpp | 8 +- wrapper/MM/Mover_Angle_.pypp.cpp | 8 +- wrapper/MM/Mover_Bond_.pypp.cpp | 8 +- wrapper/MM/Mover_Dihedral_.pypp.cpp | 8 +- wrapper/MM/Mover_Improper_.pypp.cpp | 8 +- wrapper/MM/Mover_SelectorAngle_.pypp.cpp | 8 +- wrapper/MM/Mover_SelectorBond_.pypp.cpp | 8 +- wrapper/MM/Mover_SelectorDihedral_.pypp.cpp | 8 +- wrapper/MM/Mover_SelectorImproper_.pypp.cpp | 8 +- wrapper/MM/MultiCLJComponent.pypp.cpp | 8 +- wrapper/MM/NoCutoff.pypp.cpp | 8 +- wrapper/MM/NullCLJFunction.pypp.cpp | 8 +- wrapper/MM/NullRestraint.pypp.cpp | 8 +- wrapper/MM/PositionalRestraint.pypp.cpp | 8 +- wrapper/MM/PositionalRestraints.pypp.cpp | 8 +- wrapper/MM/RestraintComponent.pypp.cpp | 8 +- wrapper/MM/RestraintFF.pypp.cpp | 8 +- wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp | 8 +- .../MM/ScaledChargeParameterNames3D.pypp.cpp | 8 +- wrapper/MM/ScaledLJParameterNames3D.pypp.cpp | 8 +- wrapper/MM/SelectorAngle.pypp.cpp | 8 +- wrapper/MM/SelectorBond.pypp.cpp | 8 +- wrapper/MM/SelectorDihedral.pypp.cpp | 8 +- wrapper/MM/SelectorImproper.pypp.cpp | 8 +- wrapper/MM/SelectorMAngle.pypp.cpp | 8 +- wrapper/MM/SelectorMBond.pypp.cpp | 8 +- wrapper/MM/SelectorMDihedral.pypp.cpp | 8 +- wrapper/MM/SelectorMImproper.pypp.cpp | 8 +- wrapper/MM/SoftCLJComponent.pypp.cpp | 8 +- wrapper/MM/StretchBendComponent.pypp.cpp | 8 +- wrapper/MM/StretchBendParameterName.pypp.cpp | 8 +- wrapper/MM/StretchBendSymbols.pypp.cpp | 8 +- .../MM/StretchBendTorsionComponent.pypp.cpp | 8 +- .../StretchBendTorsionParameterName.pypp.cpp | 8 +- wrapper/MM/StretchBendTorsionSymbols.pypp.cpp | 8 +- wrapper/MM/StretchStretchComponent.pypp.cpp | 8 +- .../MM/StretchStretchParameterName.pypp.cpp | 8 +- wrapper/MM/StretchStretchSymbols.pypp.cpp | 8 +- wrapper/MM/TestFF.pypp.cpp | 8 +- wrapper/MM/ThreeAtomFunction.pypp.cpp | 8 +- wrapper/MM/ThreeAtomFunctions.pypp.cpp | 8 +- wrapper/MM/ThreeAtomPerturbation.pypp.cpp | 8 +- wrapper/MM/TripleDistanceRestraint.pypp.cpp | 8 +- wrapper/MM/TwoAtomFunction.pypp.cpp | 8 +- wrapper/MM/TwoAtomFunctions.pypp.cpp | 8 +- wrapper/MM/TwoAtomPerturbation.pypp.cpp | 8 +- wrapper/MM/UreyBradleyComponent.pypp.cpp | 8 +- wrapper/MM/UreyBradleyParameterName.pypp.cpp | 8 +- wrapper/Mol/AtomCoords.pypp.cpp | 2 + wrapper/Mol/AtomIdxMapping.pypp.cpp | 48 + wrapper/Mol/Trajectory.pypp.cpp | 28 + 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 | 36 +- wrapper/System/SystemMonitors.pypp.cpp | 8 +- .../System/TripleDistanceComponent.pypp.cpp | 8 +- wrapper/System/VolMapMonitor.pypp.cpp | 8 +- wrapper/System/WindowedComponent.pypp.cpp | 8 +- .../System/_System_free_functions.pypp.cpp | 6 + wrapper/System/active_headers.h | 1 + wrapper/__init__.py | 22 +- 355 files changed, 7434 insertions(+), 1044 deletions(-) create mode 100644 corelib/src/libs/SireBase/atexit.cpp create mode 100644 corelib/src/libs/SireBase/atexit.h create mode 100644 corelib/src/libs/SireBase/pagecache.cpp create mode 100644 corelib/src/libs/SireBase/pagecache.h create mode 100644 corelib/src/libs/SireSystem/systemtrajectory.cpp create mode 100644 corelib/src/libs/SireSystem/systemtrajectory.h create mode 100644 src/sire/base/_pagecache.py create mode 100644 tests/base/test_pagecache.py create mode 100644 tests/convert/test_openmm_trajectory.py create mode 100644 tests/mol/test_reorder.py create mode 100644 wrapper/Base/PageCache.pypp.cpp create mode 100644 wrapper/Base/PageCache.pypp.hpp create mode 100644 wrapper/Helpers/copy.hpp diff --git a/.github/workflows/choose_branch.yaml b/.github/workflows/choose_branch.yaml index 534742c71..41541f42d 100644 --- a/.github/workflows/choose_branch.yaml +++ b/.github/workflows/choose_branch.yaml @@ -55,14 +55,12 @@ jobs: python-version: ${{ matrix.python-version }} activate-environment: sire_build miniforge-version: latest - miniforge-variant: Mambaforge - use-mamba: true # - name: Clone the desired branch run: git clone https://github.com/${{ env.REPO }} -b ${{ github.event.inputs.branch }} sire # - name: Setup Conda - run: mamba install -y -c conda-forge boa anaconda-client packaging pip-requirements-parser + run: conda install -y -c conda-forge conda-build boa anaconda-client packaging pip-requirements-parser # - name: Update Conda recipe run: python ${{ github.workspace }}/sire/actions/update_recipe.py @@ -70,8 +68,8 @@ jobs: - name: Prepare build location run: mkdir ${{ github.workspace }}/build # - - name: Build Conda package using mamba build - run: conda mambabuild -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/sire/recipes/sire + - name: Build Conda package using conda build + run: conda build -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/sire/recipes/sire # - name: Upload Conda package # Maybe add the logic here that this is a dev package? diff --git a/.github/workflows/devel.yaml b/.github/workflows/devel.yaml index e63e5072a..9f623d3e2 100644 --- a/.github/workflows/devel.yaml +++ b/.github/workflows/devel.yaml @@ -50,14 +50,12 @@ jobs: python-version: ${{ matrix.python-version }} activate-environment: sire_build miniforge-version: latest - miniforge-variant: Mambaforge - use-mamba: true # - name: Clone the devel branch (push to devel) run: git clone https://github.com/${{ env.REPO }} sire # - name: Setup Conda - run: mamba install -y -c conda-forge boa anaconda-client packaging pip-requirements-parser + run: conda install -y -c conda-forge conda-build boa anaconda-client packaging pip-requirements-parser # - name: Update Conda recipe run: python ${{ github.workspace }}/sire/actions/update_recipe.py @@ -65,8 +63,8 @@ jobs: - name: Prepare build location run: mkdir ${{ github.workspace }}/build # - - name: Build Conda package using mamba build - run: conda mambabuild -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/sire/recipes/sire + - name: Build Conda package using conda build + run: conda build -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/sire/recipes/sire # - name: Upload Conda package # Maybe add the logic here that this is a dev package? diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 76732f2ec..0b2c9ad5e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -50,14 +50,12 @@ jobs: python-version: ${{ matrix.python-version }} activate-environment: sire_build miniforge-version: latest - miniforge-variant: Mambaforge - use-mamba: true # - name: Clone the main branch (push to main) run: git clone -b main https://github.com/openbiosim/sire sire # - name: Setup Conda - run: mamba install -y -c conda-forge boa anaconda-client packaging pip-requirements-parser + run: conda install -y -c conda-forge conda-build boa anaconda-client packaging pip-requirements-parser # - name: Update Conda recipe run: python ${{ github.workspace }}/sire/actions/update_recipe.py @@ -65,8 +63,8 @@ jobs: - name: Prepare build location run: mkdir ${{ github.workspace }}/build # - - name: Build Conda package using mamba build - run: conda mambabuild -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/sire/recipes/sire + - name: Build Conda package using conda build + run: conda build -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/sire/recipes/sire # - name: Upload Conda package # upload to the 'test' channel diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index e1a45542b..a49c5cc71 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -52,14 +52,12 @@ jobs: python-version: ${{ matrix.python-version }} activate-environment: sire_build miniforge-version: latest - miniforge-variant: Mambaforge - use-mamba: true # - name: Clone the feature branch (pull request to devel) run: git clone -b ${{ github.head_ref }} --single-branch https://github.com/${{ env.REPO }} sire # - name: Setup Conda - run: mamba install -y -c conda-forge boa anaconda-client packaging pip-requirements-parser + run: conda install -y -c conda-forge conda-build boa anaconda-client packaging pip-requirements-parser # - name: Update Conda recipe run: python ${{ github.workspace }}/sire/actions/update_recipe.py @@ -67,5 +65,5 @@ jobs: - name: Prepare build location run: mkdir ${{ github.workspace }}/build # - - name: Build Conda package using mamba build - run: conda mambabuild -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/sire/recipes/sire + - name: Build Conda package using conda build + run: conda build -c conda-forge -c openbiosim/label/dev ${{ github.workspace }}/sire/recipes/sire diff --git a/README.rst b/README.rst index 4689732d8..8d1aa9ce2 100644 --- a/README.rst +++ b/README.rst @@ -2,17 +2,29 @@ `Sire `__ ====================================== -.. image:: https://github.com/openbiosim/sire/workflows/Build/badge.svg - :target: https://github.com/openbiosim/sire/actions?query=workflow%3ABuild - :alt: Build status - -.. image:: https://anaconda.org/openbiosim/sire/badges/downloads.svg - :target: https://anaconda.org/openbiosim/sire - :alt: Downloads - -.. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg - :target: https://www.gnu.org/licenses/gpl-3.0.en.html - :alt: License +Citation +======== + +If you use sire in your work, please cite the +`following paper `__: + +.. code-block:: bibtex + + @article{10.1063/5.0200458, + author = {Woods, Christopher J. and Hedges, Lester O. and Mulholland, Adrian J. and Malaisree, Maturos and Tosco, Paolo and Loeffler, Hannes H. and Suruzhon, Miroslav and Burman, Matthew and Bariami, Sofia and Bosisio, Stefano and Calabro, Gaetano and Clark, Finlay and Mey, Antonia S. J. S. and Michel, Julien}, + title = "{Sire: An interoperability engine for prototyping algorithms and exchanging information between molecular simulation programs}", + journal = {The Journal of Chemical Physics}, + volume = {160}, + number = {20}, + pages = {202503}, + year = {2024}, + month = {05}, + abstract = "{Sire is a Python/C++ library that is used both to prototype new algorithms and as an interoperability engine for exchanging information between molecular simulation programs. It provides a collection of file parsers and information converters that together make it easier to combine and leverage the functionality of many other programs and libraries. This empowers researchers to use sire to write a single script that can, for example, load a molecule from a PDBx/mmCIF file via Gemmi, perform SMARTS searches via RDKit, parameterize molecules using BioSimSpace, run GPU-accelerated molecular dynamics via OpenMM, and then display the resulting dynamics trajectory in a NGLView Jupyter notebook 3D molecular viewer. This functionality is built on by BioSimSpace, which uses sire’s molecular information engine to interconvert with programs such as GROMACS, NAMD, Amber, and AmberTools for automated molecular parameterization and the running of molecular dynamics, metadynamics, and alchemical free energy workflows. Sire comes complete with a powerful molecular information search engine, plus trajectory loading and editing, analysis, and energy evaluation engines. This, when combined with an in-built computer algebra system, gives substantial flexibility to researchers to load, search for, edit, and combine molecular information from multiple sources and use that to drive novel algorithms by combining functionality from other programs. Sire is open source (GPL3) and is available via conda and at a free Jupyter notebook server at https://try.openbiosim.org. Sire is supported by the not-for-profit OpenBioSim community interest company.}", + issn = {0021-9606}, + doi = {10.1063/5.0200458}, + url = {https://doi.org/10.1063/5.0200458}, + eprint = {https://pubs.aip.org/aip/jcp/article-pdf/doi/10.1063/5.0200458/19969848/202503\_1\_5.0200458.pdf}, + } About ===== diff --git a/SECURITY.md b/SECURITY.md index a084c17cc..3a2828e33 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,13 +4,13 @@ As we have limited resource, we only support the latest major release of sire with security updates. For example, if the current version -is 2023.5.0, then only versions 2023.5.0 to 2023.5.X wil have updates, -which will be released as 2023.5.X+1. +is 2024.1.0, then only versions 2024.1.0 to 2024.1.X wil have updates, +which will be released as 2024.1.X+1. | Version | Supported | | ------- | ------------------ | -| 2023.5.x | :white_check_mark: | -| < 2023.5.x| :x: | +| 2024.1.x | :white_check_mark: | +| < 2024.1.x| :x: | ## Reporting a Vulnerability diff --git a/corelib/CMakeLists.txt b/corelib/CMakeLists.txt index 23f60519a..d659f70bd 100644 --- a/corelib/CMakeLists.txt +++ b/corelib/CMakeLists.txt @@ -631,7 +631,7 @@ elseif (MSVC) set ( SIRE_SMALL_FLAGS "/O1" ) set ( SIRE_WARNALL_FLAGS "" ) - set ( SIRE_RELEASE_FLAGS "/O2 /GL /Gw" ) + set ( SIRE_RELEASE_FLAGS "/O2 /GL /Gw /D_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING" ) set ( SIRE_DEBUG_FLAGS "/Zi" ) set ( SIRE_VISIBILITY_FLAGS "/DSIRE_NO_VISIBILITY_AVAILABLE" ) GET_SIRE_VECTOR_FLAGS( "/openmp:experimental" "/arch:SSE2" "/arch:AVX" "/arch:AVX512" "/arch:NEON" ) diff --git a/corelib/src/libs/SireBase/CMakeLists.txt b/corelib/src/libs/SireBase/CMakeLists.txt index 55f240aca..099e81b99 100644 --- a/corelib/src/libs/SireBase/CMakeLists.txt +++ b/corelib/src/libs/SireBase/CMakeLists.txt @@ -21,6 +21,7 @@ set ( SIREBASE_HEADERS array2d.hpp array2d.h arrayproperty.hpp + atexit.h booleanproperty.h chunkedhash.hpp chunkedvector.hpp @@ -46,6 +47,7 @@ set ( SIREBASE_HEADERS packedarray2d.h packedarray2d.hpp packedarrays.h + pagecache.h pairmatrix.hpp range.h ranges.h @@ -84,6 +86,7 @@ set ( SIREBASE_SOURCES array2d.cpp arrayproperty.cpp + atexit.cpp booleanproperty.cpp chunkedhash.cpp chunkedvector.cpp @@ -103,6 +106,7 @@ set ( SIREBASE_SOURCES meminfo.cpp numberproperty.cpp packedarray2d.cpp + pagecache.cpp parallel.cpp process.cpp progressbar.cpp diff --git a/corelib/src/libs/SireBase/atexit.cpp b/corelib/src/libs/SireBase/atexit.cpp new file mode 100644 index 000000000..d0eca61ea --- /dev/null +++ b/corelib/src/libs/SireBase/atexit.cpp @@ -0,0 +1,60 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2024 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the website + * at https://sire.openbiosim.org + * +\*********************************************/ + +#include "SireBase/atexit.h" + +#include + +#include + +namespace SireBase +{ + std::vector> clean_up_functions; + + void clean_up() + { + for (auto &func : clean_up_functions) + { + try + { + func(); + } + catch (...) + { + // we can't raise exceptions now, and shouldn't + // print anything, so just fail silently + } + } + } + + void register_clean_up_function(std::function func) + { + clean_up_functions.push_back(func); + } + +} // namespace SireBase diff --git a/corelib/src/libs/SireBase/atexit.h b/corelib/src/libs/SireBase/atexit.h new file mode 100644 index 000000000..b4022947a --- /dev/null +++ b/corelib/src/libs/SireBase/atexit.h @@ -0,0 +1,81 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2024 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the website + * at https://sire.openbiosim.org + * +\*********************************************/ + +#ifndef SIREBASE_ATEXIT_H +#define SIREBASE_ATEXIT_H + +#include "sireglobal.h" + +#include + +SIRE_BEGIN_HEADER + +namespace SireBase +{ + SIREBASE_EXPORT void clean_up(); + + SIREBASE_EXPORT void register_clean_up_function(std::function func); + + /** This class makes it easier to register a function to be called + * when the program exits. This is useful for cleaning up resources + * that are allocated during the program's execution. + * + * Simply define your function (should be void func() { ... }) and + * then create a static instance of this class with the function as the + * argument. The constructor will be called at library load + * (static initialisation) and the function will be registered to be + * called at exit. + * + * e.g. + * + * void my_exit_function() + * { + * // clean up code here + * } + * + * static RegisterExitFunction my_exit_function_instance(my_exit_function); + * + */ + class SIREBASE_EXPORT RegisterExitFunction + { + public: + RegisterExitFunction(std::function func) + { + SireBase::register_clean_up_function(func); + } + + ~RegisterExitFunction() {} + }; + +} // namespace SireBase + +SIRE_EXPOSE_FUNCTION(SireBase::clean_up); + +SIRE_END_HEADER + +#endif \ No newline at end of file diff --git a/corelib/src/libs/SireBase/pagecache.cpp b/corelib/src/libs/SireBase/pagecache.cpp new file mode 100644 index 000000000..d2d6f2ee9 --- /dev/null +++ b/corelib/src/libs/SireBase/pagecache.cpp @@ -0,0 +1,2026 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2024 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the website + * at https://sire.openbiosim.org + * +\*********************************************/ + +#include "pagecache.h" + +#include "SireError/errors.h" + +#include "SireBase/parallel.h" +#include "SireBase/console.h" +#include "SireBase/atexit.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include // needed for memcpy + +namespace SireBase +{ + namespace detail + { + /** This class holds a page of data that has been restored from disk */ + class RestoredPage : public boost::noncopyable + { + public: + RestoredPage(const QByteArray &data); + ~RestoredPage(); + + QByteArray fetch(unsigned int offset, unsigned int n_bytes) const; + + int timeToLive() const; + + private: + /** The restored data */ + QByteArray d; + + /** The time to live - this is reset every time the + * data is accessed via the fetch method */ + QAtomicInt ttl; + }; + + /** This class handles the movement of pages between disk + * and memory + */ + class PageHandler : boost::noncopyable + { + public: + PageHandler(QString cache_dir_template); + ~PageHandler(); + + QPair> store(const QByteArray &data); + std::shared_ptr restore(QTemporaryFile &pagefile); + + QString path() const; + + void cleanUpOnExit(); + + static void setMaxResidentPages(unsigned int n_pages); + static unsigned int maxResidentPages(); + + private: + void _lkr_addToRestored(const std::shared_ptr &page); + + /** The maximum number of pages left resident in memory + * per cache + */ + static unsigned int max_resident_pages; + + /** Mutex to protect access to the data of this class */ + QMutex mutex; + + /** List of all pages restored by this handler */ + QList> restored_pages; + + /** Checksum of the data in all temporary page files */ + QHash checksums; + + /** Pointer to the temporary directory for all pagefiles */ + QTemporaryDir *cache_dir; + }; + + /** This class holds all of the data for a PageCache, providing + * a cache where data is stored, returning a handle to the + * stored data, through which it can be fetched. The data + * is internally divided into pages, which are pushed to disk + * so that memory usage is kept to a minimum. + */ + class CacheData : public QThread + { + public: + CacheData(QString cachedir, unsigned int page_size); + ~CacheData(); + + static QString getStatistics(); + + static void setMaxPageSize(unsigned int size, bool update_existing); + static unsigned int maxPageSize(); + + QString cacheDir() const; + + PageCache::Handle store(const QByteArray &data); + + unsigned int pageSize() const; + + unsigned int nPages() const; + unsigned int nBytes() const; + + void setSelf(const std::shared_ptr &cache); + + static void cleanUpOnExit(); + + protected: + void run(); + + private: + void enqueue(const std::shared_ptr &handle); + std::shared_ptr getPageHandler(); + + /** Mutex protecting the list of all caches */ + static QMutex caches_mutex; + + /** The list of all caches - weak pointers so that they + * can be deleted when the last reference is removed + */ + static QList> caches; + + /** The current default maximum page size */ + static unsigned int max_page_size; + + /** Mutex protected the queue of Handles containing data + * that should be pushed to the cache + */ + QMutex queue_mutex; + + /** Queue of handles that are yet to be cached */ + QQueue> queue; + + /** Mutex to protect access to the list of pages + * associated with this cache + */ + QMutex page_mutex; + + /** The current page of data being filled - weak pointer + * so that it is deleted if no longer needed + */ + std::weak_ptr current_page; + + /** The list of filled pages of data, which have been frozen + * to disk. Weak pointers so that they are deleted if no longer + * needed + */ + QList> pages; + + /** Weak point to self */ + std::weak_ptr self; + + /** Weak pointer to the page handler for this cache. + * This is passed to pages when they are frozen so that + * the handler can be used to restore the data. + * Weak pointer to that is is automatically deleted when + * all pages are deleted + */ + std::weak_ptr page_handler; + + /** Template used for the cache directory - this is in a format + * that is recognised by QTemporaryDir + */ + QString cache_dir_template; + + /** The default maximum page size for pages. This is a guide, + * i.e. items larger than this size will be cached into their + * own page. Also, a new page will be automatically created + * if there is insufficient space on the current page + */ + int page_size; + + /** Flag set when the underlying thread is exiting. This is used + * to prevent race conditions + */ + bool exiting; + }; + + /** This class holds the implementation of a single page of data */ + class PageData : public boost::noncopyable + { + public: + PageData(unsigned int max_size, const std::shared_ptr &cache); + ~PageData(); + + unsigned int maxBytes() const; + unsigned int nBytes() const; + unsigned int bytesRemaining() const; + + bool isResident() const; + bool isCached() const; + + unsigned int store(const QByteArray &data); + + void freeze(std::shared_ptr handler); + + QByteArray fetch(unsigned int offset, unsigned int n_bytes) const; + + PageCache parent() const; + + void cleanUpOnExit(); + + private: + /** Weak pointer to the parent cache - weak so that the + * cache is automatically deleted if the user releases + * all references to it + */ + std::weak_ptr c; + + /** Mutex to protect access to the data of this page */ + QMutex mutex; + + /** The handler used to restore this page from disk. + * This is null if the page has not yet been frozen + */ + std::shared_ptr page_handler; + + /** Weak pointer to the restored page. This is weak so + * that, if the page handler decides to remove the page + * from memory, then this pointer will be automatically + * set to null in a thread-safe way + */ + std::weak_ptr restored_page; + + /** The maximum number of bytes allowed in the page. + * This is set equal to the current number of bytes + * when the page is frozen + */ + unsigned int max_bytes; + + /** The current number of bytes in the page */ + unsigned int nbytes; + + /** Pointer to the temporary file used to hold the frozen + * page + */ + QTemporaryFile *cache_file; + + /** Pointer to the page of data - this is only used when the + * page is being filled. It is set to null when the page + * is frozen to disk + */ + char *d; + }; + + class HandleData : public boost::noncopyable + { + public: + enum State + { + EMPTY = 0, + DATA_IN_HANDLE = 1, + DATA_ON_PAGE = 2 + }; + + HandleData(const QByteArray &data); + ~HandleData(); + + QByteArray fetch() const; + + PageCache::Page page() const; + + unsigned int nBytes() const; + + bool isValid() const; + bool isNull() const; + + PageCache parent() const; + + void setPage(const PageCache::Page &page, int offset); + + private: + /** The page containing this data */ + PageCache::Page p; + + /** Mutex to lock access to this data */ + QMutex mutex; + + /** The data being cached - this is stored here until it is + property added to the cache */ + QByteArray d; + + /** The current state of the handle */ + State state; + + /** The offset of this data within the page */ + unsigned int offset; + + /** The number of bytes of data */ + unsigned int nbytes; + }; + } +} + +using namespace SireBase; +using namespace SireBase::detail; + +/////// +/////// Implementation of detail::RestoredPage +/////// + +/** Construct to hold the restored data in 'data'. By default, + * the ttl starts at 100 + */ +RestoredPage::RestoredPage(const QByteArray &data) + : d(data), ttl(100) +{ +} + +/** Destructor */ +RestoredPage::~RestoredPage() +{ +} + +/** Return the time to live for this page, and decrement it by 1 */ +int RestoredPage::timeToLive() const +{ + // this uses an atomic integer, so is thread-safe + return const_cast(this)->ttl.fetchAndAddRelaxed(-1); +} + +/** Fetch 'n_bytes' bytes of data starting at 'offset' */ +QByteArray RestoredPage::fetch(unsigned int offset, unsigned int n_bytes) const +{ + if (offset + n_bytes > static_cast(d.size())) + { + throw SireError::invalid_arg( + QObject::tr("Impossible to fetch %1 bytes starting at " + "offset %2 from a page of only %3 bytes") + .arg(n_bytes) + .arg(offset) + .arg(d.size()), + CODELOC); + } + + // reset the TTL to 100 - this uses an atomic integer, so is thread-safe + const_cast(this)->ttl.storeRelaxed(100); + + // return the requested data + return QByteArray(d.constData() + offset, n_bytes); +} + +/////// +/////// Implementation of detail::PageHandler +/////// + +/** Construct a PageHandler that will handle freezing and restoring + * pages from a temporary directory following the passed template + */ +PageHandler::PageHandler(QString cache_dir_template) + : cache_dir(new QTemporaryDir(cache_dir_template)) +{ + if (not cache_dir->isValid()) + { + auto message = QObject::tr("Failed to create cache directory %1. %2") + .arg(cache_dir_template) + .arg(cache_dir->errorString()); + + Console::error(message); + throw SireError::io_error(message, CODELOC); + } +} + +/** Destructor */ +PageHandler::~PageHandler() +{ + delete cache_dir; +} + +/** Clean up the PageHandler (called on exit) */ +void PageHandler::cleanUpOnExit() +{ + QMutexLocker lkr(&mutex); + delete cache_dir; + cache_dir = 0; + checksums.clear(); + restored_pages.clear(); +} + +/** Return the path to the cache directory */ +QString PageHandler::path() const +{ + return cache_dir->path(); +} + +// this would be a maximum of 256 MB resident per cache +unsigned int PageHandler::max_resident_pages = 32; + +/** Set the maximum number of pages that can be resident in memory + * at any one time + */ +void PageHandler::setMaxResidentPages(unsigned int n_pages) +{ + if (n_pages < 1) + { + Console::warning(QObject::tr("Setting maximum resident pages to the minimum of 1.")); + n_pages = 1; + } + else if (n_pages > 256) + { + Console::warning(QObject::tr("Setting maximum resident pages to the maximum of 256.")); + n_pages = 256; + } + + max_resident_pages = n_pages; +} + +/** Return the current maximum number of pages that can be resident + * in memory at any one time + */ +unsigned int PageHandler::maxResidentPages() +{ + return max_resident_pages; +} + +/** Add the passed restored page to the cache */ +void PageHandler::_lkr_addToRestored(const std::shared_ptr &restored) +{ + // check to see if we need to replace an old page + auto max_resident = max_resident_pages; + + if (static_cast(restored_pages.count()) < max_resident) + { + restored_pages.append(restored); + return; + } + + // we need to replace a page... + int smallest_index = -1; + int smallest_value = -1; + + for (int i = 0; i < restored_pages.size(); i++) + { + if (restored_pages[i].get() == nullptr) + { + // this page has already been deleted, so should + // be removed first + smallest_index = i; + } + else + { + // find the oldest page to restore - do this by reducing + // the TTL for each page each time we go through this loop, + // and then find the first page with the smallest TTL + int val = restored_pages[i]->timeToLive(); + + if (smallest_index == -1 or smallest_value > val) + { + smallest_index = i; + smallest_value = val; + } + } + } + + restored_pages[smallest_index] = restored; +} + +/** Store the passed page of data to a temporary page cache file. + * This returns a pointer to the created temporary file, + * which is owned by the caller (in this case, the PageData) + */ +QPair> PageHandler::store(const QByteArray &data) +{ + if (cache_dir == 0) + { + // we are likely being shut down, so return a null pointer + return QPair>(0, 0); + } + + QTemporaryFile *cache_file = new QTemporaryFile(cache_dir->filePath("page_XXXXXX.bin")); + + try + { + if (not cache_file->open()) + { + Console::error(QObject::tr("Failed to open temporary file %1. %2") + .arg(cache_file->fileName()) + .arg(cache_file->errorString())); + throw SireError::file_error(*cache_file, CODELOC); + } + + // create a handle to the restored page + auto restored_page = std::make_shared(data); + + // compress the data and write it to a temporary file + QByteArray compressed_data = qCompress(data, 9); + + auto checksum = qChecksum(compressed_data.constData(), + compressed_data.size()); + + if (compressed_data.size() != cache_file->write(compressed_data)) + { + throw SireError::file_error(*cache_file, CODELOC); + } + + cache_file->close(); + + QMutexLocker lkr(&mutex); + + checksums.insert(cache_file, checksum); + + // save this restored page so that it is not immediately deleted + this->_lkr_addToRestored(restored_page); + + return QPair>(cache_file, restored_page); + } + catch (...) + { + delete cache_file; + throw; + } +} + +/** Restore the QByteArray held in the passed pagefile, and + * add it to the list of restored pages. If there are more than + * 5 restored pages, then the oldest page is replaced with the + * new page (oldest based on looking at the TTL values of each page) + */ +std::shared_ptr PageHandler::restore(QTemporaryFile &pagefile) +{ + if (not pagefile.open()) + { + Console::error(QObject::tr("Failed to open temporary file %1. %2") + .arg(pagefile.fileName()) + .arg(pagefile.errorString())); + throw SireError::file_error(pagefile, CODELOC); + } + + // read the raw data + QByteArray compressed_data = pagefile.readAll(); + pagefile.close(); + + // make sure that the checksum matches what we calculated when we + // stored the data to disk + QMutexLocker lkr(&mutex); + + auto checksum = checksums.value(&pagefile, 0); + auto readsum = qChecksum(compressed_data.constData(), compressed_data.size()); + + if (checksum != readsum) + { + QString message = QObject::tr("Checksum failed on page data for %1: %2 versus %3") + .arg(pagefile.fileName()) + .arg(checksum) + .arg(readsum); + + Console::error(message); + + throw SireError::invalid_state(message, CODELOC); + } + + // uncompress the data + QByteArray decompressed_data = qUncompress(compressed_data); + compressed_data = QByteArray(); + + // create a new RestoredPage object for this data + auto restored = std::make_shared(decompressed_data); + decompressed_data = QByteArray(); + + this->_lkr_addToRestored(restored); + + return restored; +} + +/////// +/////// Implementation of detail::CacheData +/////// + +QMutex CacheData::caches_mutex; +QList> CacheData::caches; + +/** Default to 8 MB pages - this seems to be a good balance for + * not having pages so large that they take a noticeable time to + * load from disk + */ +unsigned int CacheData::max_page_size = 8 * 1024 * 1024; + +/** Clean-up function that will remove all temporary files etc when + * the program exits, and will interupt all of the background threads + * so that they will (hopefully) exit + */ +void CacheData::cleanUpOnExit() +{ + QMutexLocker lkr(&caches_mutex); + + for (auto &cache : caches) + { + auto c = cache.lock(); + + if (c.get() != nullptr) + { + // interupt the thread so that it will stop + c->requestInterruption(); + + // clean up all of the pages associated with this cache + QMutexLocker lkr2(&(c->page_mutex)); + + for (auto &page : c->pages) + { + auto p = page.lock(); + + if (p.get() != nullptr) + { + p->cleanUpOnExit(); + } + } + + lkr2.unlock(); + + auto handler = c->page_handler.lock(); + + if (handler.get() != nullptr) + { + handler->cleanUpOnExit(); + } + } + } + + // wait for all of the threads to stop, and if they don't + // then kill them + for (auto &cache : caches) + { + auto c = cache.lock(); + + if (c.get() != nullptr) + { + if (QThread::currentThread() != c.get()) + { + if (not c->wait(50)) + { + // kill it + c->terminate(); + } + } + } + } +} + +/** This is the clean-up function that is registered with the + * atexit function. It will call the cleanUpOnExit function + * of CacheData + */ +void clean_up_pagecache() +{ + CacheData::cleanUpOnExit(); +} + +static const RegisterExitFunction clean_up_pagecache_instance(clean_up_pagecache); + +/** Set the maximum page size to the passed value */ +void CacheData::setMaxPageSize(unsigned int size, bool update_existing) +{ + if (size < 1024) + { + Console::warning(QObject::tr("Setting page size to the minimum of 1024 bytes.")); + size = 1024; + } + else if (size > 128 * 1024 * 1024) + { + Console::warning(QObject::tr("Setting page size to the maximum of 128 MB.")); + size = 128 * 1024 * 1024; + } + + QMutexLocker lkr(&caches_mutex); + max_page_size = size; + + if (update_existing) + { + for (auto &cache : caches) + { + auto c = cache.lock(); + + if (c.get() != nullptr) + { + c->page_size = size; + } + } + } +} + +/** Return the current maximum page size */ +unsigned int CacheData::maxPageSize() +{ + QMutexLocker lkr(&caches_mutex); + return max_page_size; +} + +/** Set the self pointer for this cache */ +void CacheData::setSelf(const std::shared_ptr &cache) +{ + if (cache.get() == nullptr) + { + return; + } + + if (self.lock().get() != nullptr) + { + QString message = QObject::tr("Cache already has a self pointer!"); + Console::error(message); + throw SireError::invalid_state(message, CODELOC); + } + + if (cache.get() != this) + { + QString message = QObject::tr("Cache self pointer does not match this cache!"); + Console::error(message); + throw SireError::invalid_state(message, CODELOC); + } + + QMutexLocker lkr(&caches_mutex); + + if (self.lock().get() != nullptr) + { + QString message = QObject::tr("Cache already has a self pointer!"); + Console::error(message); + throw SireError::invalid_state(message, CODELOC); + } + + caches.append(cache); + self = cache; +} + +/** Return a string giving all of the statistics for all caches */ +QString CacheData::getStatistics() +{ + QMutexLocker lkr(&caches_mutex); + QList> local_caches = caches; + lkr.unlock(); + + QString stats; + + for (auto &cache : local_caches) + { + auto c = cache.lock(); + + if (c.get() != nullptr) + { + stats += QString("Cache: %1\n") + .arg(c->cacheDir()); + + QMutexLocker lkr2(&(c->page_mutex)); + + auto current = c->current_page.lock(); + + int total_bytes = 0; + + if (current.get() != nullptr) + { + stats += QString(" Current Page: %1 KB : is_resident %2\n") + .arg(current->nBytes() / 1024.0) + .arg(current->isResident()); + + total_bytes += current->nBytes(); + } + + int page_count = 0; + + for (auto &page : c->pages) + { + auto p = page.lock(); + + if (p.get() != nullptr) + { + page_count += 1; + + stats += QString(" Page %1: %2 KB : is_resident %3\n") + .arg(page_count) + .arg(p->nBytes() / 1024.0) + .arg(p->isResident()); + + total_bytes += p->nBytes(); + } + } + + stats += QString(" Total size: %1 KB\n") + .arg(total_bytes / 1024.0); + } + } + + return stats; +} + +/** Construct the data for a single cache, using the passed + * template for the cache directory and the passed suggested + * maximum page size + */ +CacheData::CacheData(QString c, unsigned int p) + : page_size(p), exiting(false) +{ + if (c.simplified().isEmpty()) + { + // by default, go into the current directory + c = QDir(PageCache::rootDirectory()).filePath("temp_XXXXXX"); + } + + if (page_size < 1024) + { + Console::warning(QObject::tr("Setting page size to the minimum of 1024 bytes.")); + page_size = 1024; + } + else if (page_size > 128 * 1024 * 1024) + { + Console::warning(QObject::tr("Setting page size to the maximum of 128 MB.")); + page_size = 128 * 1024 * 1024; + } + + cache_dir_template = c; + + // make sure that we can actually create a cache directory in this + // space - do this by creating a test directory and then deleting it + QTemporaryDir test_dir(c); + + if (not test_dir.isValid()) + { + throw SireError::io_error(QObject::tr( + "Failed to create cache directory %1. %2") + .arg(c) + .arg(test_dir.errorString()), + CODELOC); + } +} + +/** Destructor */ +CacheData::~CacheData() +{ + // tell the thread to stop + this->requestInterruption(); + + if (QThread::currentThread() != this) + { + // wait for the thread to stop + this->wait(); + } + else + { + // we are in the thread, so we can't wait for it to stop + // (use qWarning, as at this point the Console may be gone...) + qWarning() << "CacheData is deleting itself!" << this->cacheDir(); + } +} + +/** Return the PageHandler for this cache - this automatically creates + * a new one if it doesn't exist, or if the old one was lost + * (happens if all pages are deleted) + * + * Note that this function is ONLY called from the background running + * thread, so does not need to be (and isn't) thread-safe + */ +std::shared_ptr CacheData::getPageHandler() +{ + auto handler = page_handler.lock(); + + if (handler.get() == nullptr) + { + handler = std::make_shared(cache_dir_template); + page_handler = handler; + } + + return handler; +} + +/** Store the data in the cache, returning a handle to the data */ +PageCache::Handle CacheData::store(const QByteArray &data) +{ + auto handle = std::make_shared(data); + this->enqueue(handle); + return PageCache::Handle(handle); +} + +/** Return the cache directory for this cache */ +QString CacheData::cacheDir() const +{ + auto handler = page_handler.lock(); + + if (handler.get() == nullptr) + { + return cache_dir_template; + } + else + { + return handler->path(); + } +} + +/** Return the suggested maximum page size for this cache */ +unsigned int CacheData::pageSize() const +{ + return page_size; +} + +/** Return the number of pages in this cache */ +unsigned int CacheData::nPages() const +{ + QMutexLocker lkr(const_cast(&page_mutex)); + unsigned int npages = 0; + + if (current_page.lock().get() != nullptr) + { + npages += 1; + } + + for (auto &page : pages) + { + if (page.lock().get() != nullptr) + { + npages += 1; + } + } + + return npages; +} + +/** Return the number of bytes in this cache */ +unsigned int CacheData::nBytes() const +{ + QMutexLocker lkr(const_cast(&page_mutex)); + + unsigned int nbytes = 0; + + auto current = current_page.lock(); + + if (current.get() != nullptr) + { + nbytes += current->nBytes(); + } + + for (auto &page : pages) + { + auto p = page.lock(); + + if (p.get() != nullptr) + { + nbytes += p->nBytes(); + } + } + + return nbytes; +} + +/** Internal function that is used to add a handler to the queue + * to be processed by the background thread and copied to a page + */ +void CacheData::enqueue(const std::shared_ptr &handle) +{ + if (handle.get() == nullptr) + { + return; + } + + QMutexLocker lkr(&queue_mutex); + + if (this->exiting) + { + // this is the race condition where the current thread loop + // is in the process of exiting, but we need to wait for that + // to complete + if (QThread::currentThread() != this) + this->wait(); + + this->exiting = false; + } + + queue.enqueue(handle); + + // Start the background thread if it is not running + // (it automatically stops if there is nothing to do) + if (not this->isRunning()) + { + this->start(); + } +} + +/** The background thread that processes the queue of data to be + * added to the cache + */ +void CacheData::run() +{ + try + { + int empty_count = 0; + + while (true) + { + if (this->isInterruptionRequested()) + { + // stop what we are doing + break; + } + + std::shared_ptr handle; + bool have_item = false; + + // pull an item off the queue + { + QMutexLocker lkr(&queue_mutex); + + if (this->isInterruptionRequested()) + { + // stop what we are doing + break; + } + + while (not queue.isEmpty()) + { + handle = queue.dequeue().lock(); + + if (handle.get() != nullptr) + { + have_item = true; + break; + } + } + } + + if (have_item) + { + // get the data + QByteArray data = handle->fetch(); + + const unsigned int n_bytes = static_cast(data.size()); + + if (n_bytes >= page_size) + { + // this is bigger than a page, so needs to have its + // own page! + auto page = std::make_shared(n_bytes, this->self.lock()); + QMutexLocker lkr(&page_mutex); + this->pages.append(page); + lkr.unlock(); + auto offset = page->store(data); + + // straight write this to disk and prevent any changes + page->freeze(this->getPageHandler()); + + // return a handle to the new page + handle->setPage(PageCache::Page(page), offset); + } + else if (n_bytes != 0) + { + // make sure we have a current page... + auto current = current_page.lock(); + + if (current.get() == nullptr) + { + current = std::make_shared(page_size, this->self.lock()); + QMutexLocker lkr(&page_mutex); + current_page = current; + } + + // is there space left on the current page + if (current->bytesRemaining() >= n_bytes) + { + auto offset = current->store(data); + handle->setPage(PageCache::Page(current), offset); + } + else + { + // freeze this page to prevent any further changes + current->freeze(this->getPageHandler()); + + // add the current page to the list of old pages + QMutexLocker lkr(&page_mutex); + this->pages.append(current_page); + + // we need to create a new page + current = std::make_shared(page_size, this->self.lock()); + current_page = current; + lkr.unlock(); + + auto offset = current->store(data); + handle->setPage(PageCache::Page(current), offset); + } + } + + empty_count = 0; + + // we've finished with 'handle' - release the shared + // pointer so we aren't holding onto it for longer than we need + handle.reset(); + } + + if (this->isInterruptionRequested()) + { + // stop what we are doing + break; + } + + bool is_empty = true; + + if (have_item) + { + // check to see if there is anything else to process + QMutexLocker lkr(&queue_mutex); + is_empty = queue.isEmpty(); + } + + if (is_empty) + { + if (this->isInterruptionRequested()) + { + // stop what we are doing + break; + } + + empty_count += 1; + + if (empty_count > 10) + { + // we have been idle for a while, so we can stop + this->exiting = true; + break; + } + + // sleep for a bit + this->msleep(100); + } + } + } + catch (const SireError::exception &e) + { + Console::error(e.error()); + } + catch (const std::exception &e) + { + Console::error(e.what()); + } + catch (...) + { + Console::error("Unknown error in CacheData::run()"); + } +} + +/////// +/////// Implementation of detail::PageData +/////// + +/** Construct an empty new page of data of specified maximum size, + * associated with the specified cache + */ +PageData::PageData(unsigned int max_size, const std::shared_ptr &cache) + : c(cache), max_bytes(max_size), nbytes(0), cache_file(0), d(0) +{ + if (max_bytes < 1024) + { + Console::warning(QObject::tr("Setting page size to the minimum of 1024 bytes.")); + max_bytes = 1024; + } + else if (max_bytes > 128 * 1024 * 1024) + { + Console::warning(QObject::tr("Setting page size to the maximum of 128 MB.")); + max_bytes = 128 * 1024 * 1024; + } + + d = new char[max_bytes]; +} + +/** Destructor */ +PageData::~PageData() +{ + delete cache_file; + delete[] d; +} + +/** Called when the program is exiting - makes sure that page file is + * deleted + */ +void PageData::cleanUpOnExit() +{ + QMutexLocker lkr(&mutex); + + if (cache_file != 0) + { + cache_file->remove(); + delete cache_file; + cache_file = 0; + } + + if (d != 0) + { + delete[] d; + d = 0; + } +} + +/** Return the maximum number of bytes that can be stored in this page */ +unsigned int PageData::maxBytes() const +{ + if (d == 0) + { + return nbytes; + } + else + { + return max_bytes; + } +} + +/** Return the number of bytes currently stored in this page */ +unsigned int PageData::nBytes() const +{ + return nbytes; +} + +/** Return the number of bytes remaining in this page */ +unsigned int PageData::bytesRemaining() const +{ + if (d == 0) + { + return 0; + } + else + { + return max_bytes - nbytes; + } +} + +/** Return true if the page is resident in memory */ +bool PageData::isResident() const +{ + return d != 0 or restored_page.lock().get() != nullptr; +} + +/** Return true if the page is cached to disk */ +bool PageData::isCached() const +{ + return cache_file != 0; +} + +/** Store the data in the page, returning the offset at which + * the data is stored. This function is only ever called by + * the background thread of a CacheData, so does not need to + * be (and isn't) thread-safe + */ +unsigned int PageData::store(const QByteArray &data) +{ + // this test will fail if the page is frozen + if (static_cast(data.size()) > this->bytesRemaining()) + { + QString message = QObject::tr("Data is too large to fit on this page!"); + Console::error(message); + throw SireError::invalid_arg( + QObject::tr("Data is too large to fit on this page!"), CODELOC); + } + + // only the thread calling this function will change d, so it is + // save to assume that d will not change during this function + + if (d == 0) + { + QString message = QObject::tr("Page is already frozen!"); + Console::error(message); + throw SireError::invalid_state( + QObject::tr("Page is already frozen!"), CODELOC); + } + + // copy the data into the page + std::memcpy(d + nbytes, data.constData(), data.size()); + + // update the number of bytes in the page and get the offset + unsigned int offset = nbytes; + nbytes += data.size(); + + return offset; +} + +/** Fetch 'n_bytes' bytes of data starting at 'offset' from this page */ +QByteArray PageData::fetch(unsigned int offset, unsigned int n_bytes) const +{ + if (offset + n_bytes > nbytes) + { + throw SireError::invalid_arg( + QObject::tr("Impossible to fetch %1 bytes starting at " + "offset %2 from a page of only %3 bytes") + .arg(n_bytes) + .arg(offset) + .arg(nbytes), + CODELOC); + } + + auto restored = restored_page.lock(); + + if (restored.get() != nullptr) + { + return restored->fetch(offset, n_bytes); + } + + // need to lock because the background thread may be changing + // the data (moving d to the page) + QMutexLocker lkr(&(const_cast(this)->mutex)); + + if (d == 0) + { + if (page_handler.get() == nullptr or cache_file == 0) + { + QString message = QObject::tr("Page has not been frozen to disk?"); + Console::error(message); + return QByteArray(); + } + + auto restored = page_handler->restore(*cache_file); + + const_cast(this)->restored_page = restored; + lkr.unlock(); + + return restored->fetch(offset, n_bytes); + } + else + { + return QByteArray(d + offset, n_bytes); + } +} + +/** Freeze the page to disk, using the passed handler. This function + * will only ever be called by the background thread of a CacheData, + * so does not need to be (and isn't) thread-safe + */ +void PageData::freeze(std::shared_ptr handler) +{ + // page is already frozen, or something else weird + if (d == 0 or nbytes == 0 or handler.get() == nullptr or + page_handler.get() != nullptr or cache_file != 0) + { + Console::error(QObject::tr("Page is already frozen?")); + return; + } + + // make sure that the QByteArray takes a copy of the data in d + // so that we don't get any memory corruption + auto cached = handler->store(QByteArray(d, nbytes)); + + cache_file = cached.first; + + QMutexLocker lkr(&mutex); + // need to lock before deleting d because fetch() may be called + delete[] d; + d = 0; + page_handler = handler; + restored_page = cached.second; +} + +PageCache PageData::parent() const +{ + return PageCache(c.lock()); +} + +/////// +/////// Implementation of detail::HandleData +/////// + +/** Construct a HandleData object containing the passed data */ +HandleData::HandleData(const QByteArray &data) + : d(data), offset(0), nbytes(data.size()) +{ + if (nbytes == 0) + { + state = EMPTY; + } + else + { + state = DATA_IN_HANDLE; + } +} + +/** Destructor */ +HandleData::~HandleData() +{ +} + +/** Fetch the data from this handle */ +QByteArray HandleData::fetch() const +{ + // need to lock because the background thread may be + // changing the data (moving d to the page) + QMutexLocker lkr(const_cast(&mutex)); + + if (state == EMPTY or state == DATA_IN_HANDLE) + { + return d; + } + + lkr.unlock(); + + // this is a page, so fetch it from here (this call is thread-safe) + return p.fetch(offset, nbytes); +} + +/** Internal function used to set the page containing this data */ +void HandleData::setPage(const PageCache::Page &page, int off) +{ + // Need to lock because the background thread will call this, + // while we may be accessing the data via the thread-safe fetch() + QMutexLocker lkr(&mutex); + + if (state == EMPTY) + { + QString message = QObject::tr("Handle is empty"); + Console::error(message); + throw SireError::invalid_state(message, CODELOC); + } + else if (state == DATA_ON_PAGE) + { + QString message = QObject::tr("Handle is already on the page!"); + Console::error(message); + throw SireError::invalid_state(message, CODELOC); + } + + p = page; + offset = off; + state = DATA_ON_PAGE; + d = QByteArray(); + + lkr.unlock(); +} + +/** Return the page containing this data. This will be a null + * page if the data is not yet on a page + */ +PageCache::Page HandleData::page() const +{ + QMutexLocker lkr(const_cast(&mutex)); + return p; +} + +/** Return the number of bytes of the data held in this handle */ +unsigned int HandleData::nBytes() const +{ + return nbytes; +} + +/** Return whether or not this handle is valid (actually holds anything) */ +bool HandleData::isValid() const +{ + return nbytes > 0; +} + +/** Return whether or not this handle is null (does not hold anything) */ +bool HandleData::isNull() const +{ + return nbytes == 0; +} + +/** Return the cache that this handle is associated with */ +PageCache HandleData::parent() const +{ + QMutexLocker lkr(const_cast(&mutex)); + return p.parent(); +} + +/////// +/////// Implementation of PageCache::Page +/////// + +/** Construct an empty page */ +PageCache::Page::Page() + : p(nullptr) +{ +} + +/** Construct a page from the passed data */ +PageCache::Page::Page(std::shared_ptr data) + : p(data) +{ +} + +/** Copy constructor */ +PageCache::Page::Page(const PageCache::Page &other) + : p(other.p) +{ +} + +/** Destructor */ +PageCache::Page::~Page() +{ +} + +/** Assignment operator */ +PageCache::Page &PageCache::Page::operator=(const PageCache::Page &other) +{ + p = other.p; + return *this; +} + +/** Return the type name for this object */ +const char *PageCache::Page::typeName() +{ + return "SireBase::PageCache::Page"; +} + +/** Return the type name for this object */ +const char *PageCache::Page::what() const +{ + return PageCache::Page::typeName(); +} + +/** Return a string representation of this object */ +QString PageCache::Page::toString() const +{ + return QString("PageCache::Page(%1 KB used from %2 KB)") + .arg(this->nBytes() / 1024.0) + .arg(this->maxBytes() / 1024.0); +} + +/** Clone this object */ +PageCache::Page *PageCache::Page::clone() const +{ + return new PageCache::Page(*this); +} + +/** Assert that this object is valid */ +void PageCache::Page::assertValid() const +{ + if (p == nullptr) + { + throw SireError::invalid_state( + QObject::tr("Page object is null"), CODELOC); + } +} + +/** Return whether this page is valid (has some size) */ +bool PageCache::Page::isValid() const +{ + return p != nullptr; +} + +/** Return whether this page is null (has no size) */ +bool PageCache::Page::isNull() const +{ + return p == nullptr; +} + +/** Return whether this page is resident in memory */ +bool PageCache::Page::isResident() const +{ + if (this->isNull()) + { + return false; + } + + return p->isResident(); +} + +/** Return whether this page is cached to disk */ +bool PageCache::Page::isCached() const +{ + if (this->isNull()) + { + return false; + } + + return p->isCached(); +} + +/** Return the number of bytes in this page */ +unsigned int PageCache::Page::nBytes() const +{ + if (this->isNull()) + { + return 0; + } + + return p->nBytes(); +} + +/** Return the number of bytes in this page */ +unsigned int PageCache::Page::size() const +{ + return this->nBytes(); +} + +/** Return the maximum number of bytes that can be stored in this page */ +unsigned int PageCache::Page::maxBytes() const +{ + if (this->isNull()) + { + return 0; + } + + return p->maxBytes(); +} + +/** Return the parent cache for this page */ +PageCache PageCache::Page::parent() const +{ + if (this->isNull()) + { + return PageCache(); + } + + return p->parent(); +} + +QByteArray PageCache::Page::fetch(int offset, int n_bytes) const +{ + if (this->isNull()) + { + throw SireError::invalid_state( + QObject::tr("Page object is null - you cannot fetch any bytes!"), + CODELOC); + } + + return p->fetch(offset, n_bytes); +} + +/////// +/////// Implementation of PageCache::Handle +/////// + +/** Construct an empty handle */ +PageCache::Handle::Handle() + : h(nullptr) +{ +} + +/** Construct a handle from the passed data */ +PageCache::Handle::Handle(std::shared_ptr data) + : h(data) +{ +} + +/** Copy constructor */ +PageCache::Handle::Handle(const PageCache::Handle &other) + : h(other.h) +{ +} + +/** Destructor */ +PageCache::Handle::~Handle() +{ +} + +/** Assignment operator */ +PageCache::Handle &PageCache::Handle::operator=(const PageCache::Handle &other) +{ + h = other.h; + return *this; +} + +/** Return the type name for this object */ +const char *PageCache::Handle::typeName() +{ + return "SireBase::PageCache::Handle"; +} + +/** Return the type name for this object */ +const char *PageCache::Handle::what() const +{ + return PageCache::Handle::typeName(); +} + +/** Return a string representation of this object */ +QString PageCache::Handle::toString() const +{ + const int nbytes = this->nBytes(); + + if (nbytes == 0) + { + return QString("PageCache::Handle::empty"); + } + else + { + return QString("PageCache::Handle(size = %1 KB)").arg(nbytes / 1024.0); + } +} + +/** Clone this object */ +PageCache::Handle *PageCache::Handle::clone() const +{ + return new PageCache::Handle(*this); +} + +/** Assert that this object is valid */ +void PageCache::Handle::assertValid() const +{ + if (h == nullptr) + { + throw SireError::invalid_state( + QObject::tr("Handle object is null"), CODELOC); + } +} + +/** Return the page on which the data for this handle is placed. + * This will be null if the data has not yet been put on a page + */ +PageCache::Page PageCache::Handle::page() const +{ + if (this->isNull()) + { + return PageCache::Page(); + } + + return Page(h->page()); +} + +/** Return the data held in this handle */ +QByteArray PageCache::Handle::fetch() const +{ + if (this->isNull()) + { + return QByteArray(); + } + + return h->fetch(); +} + +/** Return the parent cache for this handle */ +PageCache PageCache::Handle::parent() const +{ + if (this->isNull()) + { + return PageCache(); + } + + return h->parent(); +} + +/** Return whether this handle is valid (holds data) */ +bool PageCache::Handle::isValid() const +{ + return h != nullptr; +} + +/** Return whether this handle is null (does not hold data) */ +bool PageCache::Handle::isNull() const +{ + return h == nullptr; +} + +/** Return the number of bytes in this handle */ +unsigned int PageCache::Handle::size() const +{ + return this->nBytes(); +} + +/** Return the number of bytes in this handle */ +unsigned int PageCache::Handle::nBytes() const +{ + if (this->isNull()) + { + return 0; + } + + return h->nBytes(); +} + +/** Clear the data from this handle */ +void PageCache::Handle::clear() +{ + h.reset(); +} + +/** Clear the data in this handle */ +void PageCache::Handle::reset() +{ + h.reset(); +} + +/////// +/////// Implementation of PageCache +/////// + +/** Construct a new page cache with the default + * recomended maximum page size */ +PageCache::PageCache() + : d(new CacheData(QString(), CacheData::maxPageSize())) +{ + d->setSelf(d); +} + +/** Construct a new page cache with the specified + recomended maximum page size */ +PageCache::PageCache(unsigned int page_size) + : d(new CacheData(QString(), page_size)) +{ + d->setSelf(d); +} + +/** Construct a new page cache with specified cache directory + and recomended maximum page size */ +PageCache::PageCache(const QString &cachedir) + : d(new CacheData(cachedir, CacheData::maxPageSize())) +{ + d->setSelf(d); +} + +/** Construct a new page cache with the specified + recomended maximum page size and cache directory + template (using QTemporaryDir format) */ +PageCache::PageCache(const QString &cachedir, unsigned int page_size) + : d(new CacheData(cachedir, page_size)) +{ + d->setSelf(d); +} + +/** Internal constructor used to construct from a CacheData */ +PageCache::PageCache(std::shared_ptr data) + : d(data) +{ +} + +/** Copy constructor */ +PageCache::PageCache(const PageCache &other) + : d(other.d) +{ +} + +/** Destructor */ +PageCache::~PageCache() +{ +} + +/** Assignment operator */ +PageCache &PageCache::operator=(const PageCache &other) +{ + d = other.d; + return *this; +} + +/** Return the type name for this object */ +const char *PageCache::typeName() +{ + return "SireBase::PageCache"; +} + +/** Return the type name for this object */ +const char *PageCache::what() const +{ + return PageCache::typeName(); +} + +/** Return a string representation of this object */ +QString PageCache::toString() const +{ + return QString("PageCache(size = %1 KB)").arg(this->nBytes() / 1024.0); +} + +/** Clone this object */ +PageCache *PageCache::clone() const +{ + return new PageCache(*this); +} + +/** Set the default maximum page cache size for all new created + * caches that don't specify it themselves */ +void PageCache::setMaxPageSize(unsigned int page_size, + bool update_existing) +{ + CacheData::setMaxPageSize(page_size, update_existing); +} + +/** Set the maximum number of resident pages per cache */ +void PageCache::setMaxResidentPages(unsigned int n_pages) +{ + PageHandler::setMaxResidentPages(n_pages); +} + +/** Return the maximum number of resident pages per cache */ +unsigned int PageCache::maxResidentPages() +{ + return PageHandler::maxResidentPages(); +} + +/** Return the current recommend maximum page size */ +unsigned int PageCache::maxPageSize() +{ + return CacheData::maxPageSize(); +} + +/** Assert that this object is valid */ +void PageCache::assertValid() const +{ + if (d == nullptr) + { + throw SireError::invalid_state( + QObject::tr("PageCache object is null"), CODELOC); + } +} + +/** Return the statistics for all caches */ +QString PageCache::getStatistics() +{ + return CacheData::getStatistics(); +} + +/** Return the cache directory for this cache */ +QString PageCache::cacheDir() const +{ + if (this->isNull()) + { + return QString(); + } + + return d->cacheDir(); +} + +/** Return the suggested maximum page size for this cache */ +unsigned int PageCache::pageSize() const +{ + if (this->isNull()) + { + return 0; + } + + return d->pageSize(); +} + +/** Return the number of pages in this cache */ +unsigned int PageCache::nPages() const +{ + if (this->isNull()) + { + return 0; + } + + return d->nPages(); +} + +/** Return the number of bytes saved in this cache */ +unsigned int PageCache::nBytes() const +{ + if (this->isNull()) + { + return 0; + } + + return d->nBytes(); +} + +/** Return the number of bytes saved in this cache */ +unsigned int PageCache::size() const +{ + return this->nBytes(); +} + +/** Return whether or not this cache is valid */ +bool PageCache::isValid() const +{ + return d != nullptr; +} + +/** Return whether or not this cache is null */ +bool PageCache::isNull() const +{ + return d == nullptr; +} + +/** Store the data in the cache, returning a handle to the data */ +PageCache::Handle PageCache::store(const QByteArray &data) +{ + if (this->isNull()) + { + // create a cache now + d = std::make_shared(QString(), 32 * 1024 * 1024); + } + + return Handle(d->store(data)); +} + +static QString cache_root_dir = QString(); + +/** Set the root directory that should be used for all new caches, + * when the cache directory is not specified + */ +void PageCache::setRootDirectory(const QString &dir) +{ + QDir d; + + if (not d.mkpath(QDir(dir).absolutePath())) + { + throw SireError::io_error(QObject::tr( + "Failed to create cache root directory %1") + .arg(dir), + CODELOC); + } + + cache_root_dir = QDir(dir).absolutePath(); +} + +/** Get the root directory that should be used for all new caches, + * when the cache directory is not specified + */ +QString PageCache::rootDirectory() +{ + if (cache_root_dir.isEmpty()) + { + auto env = qEnvironmentVariable("SIRE_PAGECACHE_ROOT", "."); + PageCache::setRootDirectory(env); + } + + return cache_root_dir; +} diff --git a/corelib/src/libs/SireBase/pagecache.h b/corelib/src/libs/SireBase/pagecache.h new file mode 100644 index 000000000..b951a7214 --- /dev/null +++ b/corelib/src/libs/SireBase/pagecache.h @@ -0,0 +1,211 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2024 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the website + * at https://sire.openbiosim.org + * +\*********************************************/ + +#ifndef SIREBASE_PAGECACHE_H +#define SIREBASE_PAGECACHE_H + +#include "sireglobal.h" + +#include + +#include + +SIRE_BEGIN_HEADER + +namespace SireBase +{ + namespace detail + { + class CacheData; + class PageData; + class HandleData; + } + + /** This class manages a swap cache of binary data that can be + * paged to and from disk. The cache can receive binary data + * of any size, and will automatically manage the paging of + * that data to and from disk as it is accessed. + * + * You can create different caches, and have control over the maximum + * size of each cache page. + * + * Note that deleting the cache will delete all data contained + * therein - including data paged to disk + */ + class SIREBASE_EXPORT PageCache + { + public: + PageCache(); + PageCache(const QString &cache_dir); + + PageCache(unsigned int max_page_size); + PageCache(const QString &cache_dir, unsigned int max_page_size); + + PageCache(std::shared_ptr data); + PageCache(const PageCache &other); + + ~PageCache(); + + PageCache &operator=(const PageCache &other); + + const char *what() const; + static const char *typeName(); + + static unsigned int maxPageSize(); + static void setMaxPageSize(unsigned int max_page_size, + bool update_existing = false); + + static void setMaxResidentPages(unsigned int n_pages); + static unsigned int maxResidentPages(); + + static void setRootDirectory(const QString &cache_dir); + static QString rootDirectory(); + + PageCache *clone() const; + + QString toString() const; + + QString cacheDir() const; + + unsigned int pageSize() const; + unsigned int nPages() const; + unsigned int nBytes() const; + + unsigned int size() const; + + bool isValid() const; + bool isNull() const; + + void assertValid() const; + + static QString getStatistics(); + + /** This is a page in the cache. This can hold multiple + * objects - the whole page is either resident in memory + * or cached to disk. + */ + class SIREBASE_EXPORT Page + { + friend class detail::HandleData; + + public: + Page(); + Page(std::shared_ptr data); + Page(const Page &other); + ~Page(); + + Page &operator=(const Page &other); + + const char *what() const; + static const char *typeName(); + + Page *clone() const; + + QString toString() const; + + bool isValid() const; + bool isNull() const; + + void assertValid() const; + + bool isResident() const; + bool isCached() const; + + unsigned int nBytes() const; + unsigned int size() const; + + unsigned int maxBytes() const; + + PageCache parent() const; + + protected: + QByteArray fetch(int offset, int n_bytes) const; + + private: + std::shared_ptr p; + }; + + /** This is a handle to a piece of data that has + * been added to the cache. This will either contain + * the actual data, or will hold the information + * necessary to retrieve that data from disk. + * + * Data is removed from the cache when all handles + * to it are deleted + */ + class SIREBASE_EXPORT Handle + { + public: + Handle(); + Handle(std::shared_ptr data); + Handle(const Handle &other); + ~Handle(); + + Handle &operator=(const Handle &other); + + const char *what() const; + static const char *typeName(); + + Handle *clone() const; + + QString toString() const; + + Page page() const; + QByteArray fetch() const; + + PageCache parent() const; + + bool isValid() const; + bool isNull() const; + + void assertValid() const; + + unsigned int size() const; + unsigned int nBytes() const; + + void clear(); + void reset(); + + private: + std::shared_ptr h; + }; + + Handle store(const QByteArray &data); + + private: + std::shared_ptr d; + }; +} + +SIRE_EXPOSE_CLASS(SireBase::PageCache) +SIRE_EXPOSE_CLASS(SireBase::PageCache::Page) +SIRE_EXPOSE_CLASS(SireBase::PageCache::Handle) + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireIO/grotop.cpp b/corelib/src/libs/SireIO/grotop.cpp index 5446c47bc..43c169a15 100644 --- a/corelib/src/libs/SireIO/grotop.cpp +++ b/corelib/src/libs/SireIO/grotop.cpp @@ -5399,6 +5399,12 @@ QVector GroTop::preprocess(const QVector &lines, QHash &others, const Pr } } - system.setProperty("trajectory", SireMol::Trajectory(trajectories)); + // comment out as we don't use the System trajectory property, + // and it is confusing if it isn't updated... + // system.setProperty("trajectory", SireMol::Trajectory(trajectories)); // we now have to assume that the trajectories all had the atomic // data in the same order and that this matches the atomidx order diff --git a/corelib/src/libs/SireMM/ljparameter.h b/corelib/src/libs/SireMM/ljparameter.h index dc13a0e19..ee30661a4 100644 --- a/corelib/src/libs/SireMM/ljparameter.h +++ b/corelib/src/libs/SireMM/ljparameter.h @@ -141,12 +141,14 @@ namespace SireMM return not operator==(other); } - /** Return whether or not this is a dummy LJ parameter */ + /** Return whether or not this is a dummy LJ parameter. A dummy LJ + * parameter is one with a zero epsilon value (i.e. it will have a + * a zero LJ interaction energy with all other particles, regardless + * of their LJ parameters) + */ SIRE_ALWAYS_INLINE bool LJParameter::isDummy() const { - // we only need to compare sqrtsig as this will be set to zero if - // sqrteps is zero - return sqrtsig == 0.0; + return sqrteps == 0.0; } /** Return whether or not this parameter has non-zero LJ parameters */ diff --git a/corelib/src/libs/SireMol/moleculegroups.cpp b/corelib/src/libs/SireMol/moleculegroups.cpp index 1dc2481ff..c54e028ea 100644 --- a/corelib/src/libs/SireMol/moleculegroups.cpp +++ b/corelib/src/libs/SireMol/moleculegroups.cpp @@ -1664,6 +1664,11 @@ bool MolGroupsBase::isEmpty() const Note that this is a potentially very slow operation! */ Molecules MolGroupsBase::molecules() const { + if (this->nGroups() == 1) + { + return this->getGroup(this->mgNums()[0]).molecules(); + } + Molecules all_mols; const QHash groups = this->getGroups(); diff --git a/corelib/src/libs/SireMol/molecules.cpp b/corelib/src/libs/SireMol/molecules.cpp index d5d55b7e9..e654d4f23 100644 --- a/corelib/src/libs/SireMol/molecules.cpp +++ b/corelib/src/libs/SireMol/molecules.cpp @@ -45,6 +45,7 @@ #include "select.h" #include "SireBase/lazyevaluator.h" +#include "SireBase/parallel.h" #include "SireMol/errors.h" @@ -1150,9 +1151,36 @@ void Molecules::loadFrame(int frame, const LazyEvaluator &evaluator, frame = Index(frame).map(n); - for (auto it = this->mols.begin(); it != this->mols.end(); ++it) + if (should_run_in_parallel(mols.count(), map)) + { + QVector mols2; + const int nmols = mols.count(); + mols2.reserve(nmols); + + for (auto it = this->mols.constBegin(); it != this->mols.constEnd(); ++it) + { + mols2.append(it.value().molecule()); + } + + auto mols2_array = mols2.data(); + + tbb::parallel_for(tbb::blocked_range(0, nmols), + [&](const tbb::blocked_range &r) + { + for (int i = r.begin(); i < r.end(); ++i) + { + mols2_array[i].loadFrame(frame, evaluator, map); + } + }); + + this->update(Molecules(mols2)); + } + else { - it->loadFrame(frame, evaluator, map); + for (auto it = this->mols.begin(); it != this->mols.end(); ++it) + { + it->loadFrame(frame, evaluator, map); + } } } 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/corelib/src/libs/SireMol/trajectory.cpp b/corelib/src/libs/SireMol/trajectory.cpp index c2728c59f..4e4414d73 100644 --- a/corelib/src/libs/SireMol/trajectory.cpp +++ b/corelib/src/libs/SireMol/trajectory.cpp @@ -50,6 +50,7 @@ #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" +#include "SireStream/magic_error.h" using namespace SireMol; using namespace SireVol; @@ -122,6 +123,15 @@ bool TrajectoryData::isEmpty() const return this->nFrames() == 0; } +/** Return whether or not this trajectory is live - live trajectories + * are capable of being actively updated during new frame data, + * e.g. during a dynamics simulation. + */ +bool TrajectoryData::isLive() const +{ + return false; +} + QList TrajectoryData::getFrames() const { QList frames; @@ -539,14 +549,23 @@ Trajectory::Trajectory() : ConcreteProperty(), sta { } -Trajectory::Trajectory(const TrajectoryData &data) +Trajectory::Trajectory(const TrajectoryDataPtr &data) : ConcreteProperty(), start_atom(0), natoms(0) { - start_atom = 0; - natoms = data.nAtoms(); + if (data.constData() != 0) + { + start_atom = 0; + natoms = data->nAtoms(); - if (data.nFrames() > 0) - d.append(TrajectoryDataPtr(data)); + if (data->isLive() or data->nFrames() > 0) + d.append(data); + } +} + +Trajectory::Trajectory(const TrajectoryData &data) + : ConcreteProperty(), start_atom(0), natoms(0) +{ + this->operator=(Trajectory(TrajectoryDataPtr(data))); } Trajectory::Trajectory(const QList &data) @@ -559,7 +578,7 @@ Trajectory::Trajectory(const QList &data) { if (ptr.constData() != 0) { - if (ptr->nFrames() > 0) + if (ptr->isLive() or ptr->nFrames() > 0) { if (natoms == 0) { @@ -580,21 +599,31 @@ Trajectory::Trajectory(const QList &data) } } -Trajectory::Trajectory(const TrajectoryData &data, int s, int n) +Trajectory::Trajectory(const TrajectoryDataPtr &data, int s, int n) : ConcreteProperty(), start_atom(s), natoms(n) { - if (natoms <= 0 or data.nFrames() <= 0) + if (natoms <= 0 or data.constData() == 0) + { + start_atom = 0; + natoms = 0; return; + } - if (start_atom < 0 or (start_atom + natoms) > data.nAtoms()) + if (start_atom < 0 or (start_atom + natoms) > data->nAtoms()) throw SireError::incompatible_error( QObject::tr("Cannot use start_atom %1 and natoms %2 for a trajectory with %3 atoms.") .arg(start_atom) .arg(natoms) - .arg(data.nAtoms()), + .arg(data->nAtoms()), CODELOC); - d.append(TrajectoryDataPtr(data)); + d.append(data); +} + +Trajectory::Trajectory(const TrajectoryData &data, int s, int n) + : ConcreteProperty(), start_atom(0), natoms(0) +{ + this->operator=(Trajectory(TrajectoryDataPtr(data), s, n)); } Trajectory::Trajectory(const QList &data, int s, int n) @@ -609,7 +638,7 @@ Trajectory::Trajectory(const QList &data, int s, int n) { if (ptr.constData() != 0) { - if (ptr->nFrames() > 0) + if (ptr->isLive() or ptr->nFrames() > 0) { if (n == 0) { @@ -953,6 +982,32 @@ void Trajectory::setFrame(int i, const Frame &frame) } } +void Trajectory::append(const TrajectoryDataPtr &data) +{ + if (data.constData() == 0) + return; + + // check that the start and number of atoms would be compatible + // with this trajectory + if (natoms != data->nAtoms() and (start_atom + natoms > data->nAtoms())) + { + throw SireError::incompatible_error( + QObject::tr("Cannot append a trajectory with %1 atoms to a trajectory with %2 atoms " + "and start_atom %3.") + .arg(data->nAtoms()) + .arg(natoms) + .arg(start_atom), + CODELOC); + } + + d.append(data); +} + +void Trajectory::append(const TrajectoryData &data) +{ + this->append(TrajectoryDataPtr(data)); +} + void Trajectory::appendFrame(const Frame &frame) { if (frame.isEmpty()) @@ -1298,6 +1353,233 @@ bool Frame::operator!=(const Frame &other) const return not operator==(other); } +QByteArray Frame::toByteArray() const +{ + // calculate the size we need... + int nbytes = 0; + + // magic and version + nbytes += 2 * sizeof(quint32); + + // coordinates + nbytes += sizeof(quint32); + nbytes += coords.count() * sizeof(Vector); + + // velocities + nbytes += sizeof(quint32); + nbytes += vels.count() * sizeof(Velocity3D); + + // forces + nbytes += sizeof(quint32); + nbytes += frcs.count() * sizeof(Force3D); + + // append the space, time and properties + QByteArray extra; + QDataStream ds(&extra, QIODevice::WriteOnly); + + ds << spc << t.to(picosecond) << props; + + nbytes += sizeof(quint32); + nbytes += extra.count(); + + QByteArray data("\0", nbytes); + + auto data_ptr = data.data(); + + // magic and version + quint32 val = r_frame.magicID(); + std::memcpy(data_ptr, &val, sizeof(quint32)); + data_ptr += sizeof(quint32); + + val = 1; + std::memcpy(data_ptr, &val, sizeof(quint32)); + data_ptr += sizeof(quint32); + + val = coords.count(); + std::memcpy(data_ptr, &val, sizeof(quint32)); + data_ptr += sizeof(quint32); + + if (val != 0) + { + std::memcpy(data_ptr, coords.constData(), val * sizeof(Vector)); + data_ptr += val * sizeof(Vector); + } + + val = vels.count(); + std::memcpy(data_ptr, &val, sizeof(quint32)); + data_ptr += sizeof(quint32); + + if (val != 0) + { + std::memcpy(data_ptr, vels.constData(), val * sizeof(Velocity3D)); + data_ptr += val * sizeof(Velocity3D); + } + + val = frcs.count(); + std::memcpy(data_ptr, &val, sizeof(quint32)); + data_ptr += sizeof(quint32); + + if (val != 0) + { + std::memcpy(data_ptr, frcs.constData(), val * sizeof(Force3D)); + data_ptr += val * sizeof(Force3D); + } + + val = extra.count(); + std::memcpy(data_ptr, &val, sizeof(quint32)); + data_ptr += sizeof(quint32); + + if (val != 0) + { + std::memcpy(data_ptr, extra.constData(), val); + data_ptr += val; + } + + if (data_ptr - data.constData() != data.count()) + { + throw SireError::program_bug(QObject::tr( + "Memory corruption? %1 versus %2") + .arg(data_ptr - data.constData()) + .arg(data.count()), + CODELOC); + } + + return data; +} + +Frame Frame::fromByteArray(const QByteArray &data) +{ + if (data.count() < 4) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + auto data_ptr = data.constData(); + + quint32 val; + std::memcpy(&val, data_ptr, sizeof(quint32)); + data_ptr += sizeof(quint32); + + if (val != r_frame.magicID()) + { + throw SireStream::magic_error(QObject::tr("The data is not a frame! %1").arg(val), CODELOC); + } + + std::memcpy(&val, data_ptr, sizeof(quint32)); + data_ptr += sizeof(quint32); + + if (val != 1) + { + throw SireStream::version_error(val, "1", r_frame, CODELOC); + } + + if (data_ptr + sizeof(quint32) > data.constData() + data.count()) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + std::memcpy(&val, data_ptr, sizeof(quint32)); + data_ptr += sizeof(quint32); + + QVector coords; + + if (val != 0) + { + if (data_ptr + val * sizeof(Vector) > data.constData() + data.count()) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + coords.resize(val); + std::memcpy(coords.data(), data_ptr, val * sizeof(Vector)); + data_ptr += val * sizeof(Vector); + } + + if (data_ptr + sizeof(quint32) > data.constData() + data.count()) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + std::memcpy(&val, data_ptr, sizeof(quint32)); + data_ptr += sizeof(quint32); + + QVector vels; + + if (val != 0) + { + if (data_ptr + val * sizeof(Velocity3D) > data.constData() + data.count()) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + vels.resize(val); + std::memcpy(vels.data(), data_ptr, val * sizeof(Velocity3D)); + data_ptr += val * sizeof(Velocity3D); + } + + if (data_ptr + sizeof(quint32) > data.constData() + data.count()) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + std::memcpy(&val, data_ptr, sizeof(quint32)); + data_ptr += sizeof(quint32); + + QVector frcs; + + if (val != 0) + { + if (data_ptr + val * sizeof(Force3D) > data.constData() + data.count()) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + frcs.resize(val); + std::memcpy(frcs.data(), data_ptr, val * sizeof(Force3D)); + data_ptr += val * sizeof(Force3D); + } + + if (data_ptr + sizeof(quint32) > data.constData() + data.count()) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + std::memcpy(&val, data_ptr, sizeof(quint32)); + data_ptr += sizeof(quint32); + + SpacePtr spc; + Time t; + Properties props; + + if (val != 0) + { + if (data_ptr + val > data.constData() + data.count()) + { + throw SireError::incompatible_error(QObject::tr("The data is too short to be a frame! %1").arg(data.count()), + CODELOC); + } + + QByteArray extra(data_ptr, val); + QDataStream ds(extra); + + double time; + + ds >> spc >> time >> props; + + t = time * picosecond; + } + + return Frame(coords, vels, frcs, spc, t, props); +} + const char *Frame::typeName() { return QMetaType::typeName(qMetaTypeId()); diff --git a/corelib/src/libs/SireMol/trajectory.h b/corelib/src/libs/SireMol/trajectory.h index c5172d2a9..848fc761e 100644 --- a/corelib/src/libs/SireMol/trajectory.h +++ b/corelib/src/libs/SireMol/trajectory.h @@ -124,6 +124,9 @@ namespace SireMol QString toString() const; + QByteArray toByteArray() const; + static Frame fromByteArray(const QByteArray &data); + bool isEmpty() const; bool hasCoordinates() const; @@ -226,6 +229,8 @@ namespace SireMol virtual QStringList filenames() const = 0; + virtual bool isLive() const; + virtual Frame getFrame(int i) const = 0; virtual Frame getFrame(int i, const LazyEvaluator &evaluator) const = 0; @@ -323,9 +328,11 @@ namespace SireMol Trajectory(); Trajectory(const TrajectoryData &trajectory); + Trajectory(const TrajectoryDataPtr &trajectory); Trajectory(const QList &trajectories); Trajectory(const TrajectoryData &trajectory, int start_atom, int natoms); + Trajectory(const TrajectoryDataPtr &trajectory, int start_atom, int natoms); Trajectory(const QList &trajectories, int start_atom, int natoms); @@ -371,6 +378,9 @@ namespace SireMol void insertFrame(int i, const Frame &frame); void deleteFrame(int i); + void append(const TrajectoryData &data); + void append(const TrajectoryDataPtr &data); + bool isCompatibleWith(const MoleculeInfoData &molinfo) const; SireBase::PropertyList merge(const MolViewProperty &other, diff --git a/corelib/src/libs/SireSystem/CMakeLists.txt b/corelib/src/libs/SireSystem/CMakeLists.txt index 6bdea44f9..bfae5f3ad 100644 --- a/corelib/src/libs/SireSystem/CMakeLists.txt +++ b/corelib/src/libs/SireSystem/CMakeLists.txt @@ -52,6 +52,7 @@ set ( SIRESYSTEM_HEADERS system.h systemmonitor.h systemmonitors.h + systemtrajectory.h volmapmonitor.h ) @@ -94,6 +95,7 @@ set ( SIRESYSTEM_SOURCES system.cpp systemmonitor.cpp systemmonitors.cpp + systemtrajectory.cpp volmapmonitor.cpp ${SIRESYSTEM_HEADERS} 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/corelib/src/libs/SireSystem/system.cpp b/corelib/src/libs/SireSystem/system.cpp index a0ca6a9d1..874d0abb1 100644 --- a/corelib/src/libs/SireSystem/system.cpp +++ b/corelib/src/libs/SireSystem/system.cpp @@ -31,6 +31,7 @@ #include "delta.h" #include "monitorname.h" #include "system.h" +#include "systemtrajectory.h" #include "SireFF/energytable.h" #include "SireFF/ff.h" @@ -279,6 +280,7 @@ System::System(const System &other) sysversion(other.sysversion), sysmonitors(other.sysmonitors), cons(other.cons), mgroups_by_num(other.mgroups_by_num), shared_properties(other.shared_properties), + system_trajectory(other.system_trajectory), subversion(other.subversion) { molgroups[0] = other.molgroups[0]; @@ -304,6 +306,7 @@ System &System::operator=(const System &other) cons = other.cons; mgroups_by_num = other.mgroups_by_num; shared_properties = other.shared_properties; + system_trajectory = other.system_trajectory; subversion = other.subversion; MolGroupsBase::operator=(other); @@ -3883,16 +3886,197 @@ void System::loadFrame(int frame, const LazyEvaluator &evaluator, void System::saveFrame(int frame, const SireBase::PropertyMap &map) { + if (frame == this->nFrames(map)) + { + this->saveFrame(map); + return; + } + this->accept(); this->mustNowRecalculateFromScratch(); MolGroupsBase::saveFrame(frame, map); + system_trajectory = 0; } void System::saveFrame(const SireBase::PropertyMap &map) { + auto traj_prop = map["trajectory"]; + + if (not traj_prop.hasSource()) + return; + this->accept(); this->mustNowRecalculateFromScratch(); - MolGroupsBase::saveFrame(map); + + // get all of the molecules in the system + auto molnums = this->molNums(); + auto mols = this->molecules(); + + // get the space and time values + const auto space_property = map["space"]; + const auto time_property = map["time"]; + + QString time_property_source("time"); + QString space_property_source("space"); + + if (time_property.hasSource()) + time_property_source = QString(time_property.source()); + + if (space_property.hasSource()) + space_property_source = QString(space_property.source()); + + // we must get the space property and a time property + SpacePtr space; + SireUnits::Dimension::Time time; + bool found_space = false; + bool found_time = false; + + try + { + space = this->property(space_property_source).asA(); + found_space = true; + } + catch (...) + { + } + + try + { + time = get_time_from_property(this->property(time_property_source)); + found_time = true; + } + catch (...) + { + } + + if (not found_space) + { + if (space_property.hasValue()) + { + try + { + space = space_property.value().asA(); + found_space = true; + } + catch (...) + { + } + } + + if (not found_space) + { + for (const auto &mol : mols) + { + try + { + space = mol.data().property(space_property_source).asA(); + found_space = true; + break; + } + catch (...) + { + } + } + } + } + + if (not found_time) + { + if (time_property.hasValue()) + { + try + { + time = get_time_from_property(time_property.value()); + found_time = true; + } + catch (...) + { + } + } + + if (not found_time) + { + for (const auto &mol : mols) + { + try + { + time = get_time_from_property(mol.data().property(time_property_source)); + found_time = true; + break; + } + catch (...) + { + } + } + } + } + + if (not found_space) + { + space = Cartesian(); + } + + if (not found_time) + { + time = SireUnits::Dimension::Time(0); + } + + // do we have an active SystemTrajectory? + bool must_create = false; + + if (system_trajectory.constData() == 0) + { + must_create = true; + } + + SystemTrajectory *traj = dynamic_cast(system_trajectory.data()); + + if (traj == 0) + { + must_create = true; + } + else + { + must_create = not traj->isCompatibleWith(molnums, mols, map); + } + + if (must_create) + { + traj = new SystemTrajectory(molnums, mols, map); + system_trajectory = traj; + } + + // save the frame into the system_trajectory - this will automatically + // update all molecules containing this trajectory + traj->saveFrame(mols, space, time, Properties(), map); + + if (must_create) + { + // add this trajectory onto all of the molecules... + auto mols2 = mols; + + for (auto it = mols.constBegin(); it != mols.constEnd(); ++it) + { + auto mol = it->molecule().data(); + + Trajectory moltraj; + + if (mol.hasProperty(traj_prop)) + { + moltraj = mol.property(traj_prop).asA(); + moltraj.append(traj->getTrajectory(mol.number())); + } + else + { + moltraj = Trajectory(traj->getTrajectory(mol.number())); + } + + mol.setProperty(traj_prop.source(), moltraj); + mols2.update(mol); + } + + this->update(mols2); + } } void System::deleteFrame(int frame, const SireBase::PropertyMap &map) @@ -3978,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 d13cf1d69..6d726fdd4 100644 --- a/corelib/src/libs/SireSystem/system.h +++ b/corelib/src/libs/SireSystem/system.h @@ -39,6 +39,7 @@ #include "SireMol/mgnum.h" #include "SireMol/moleculegroup.h" #include "SireMol/moleculegroups.h" +#include "SireMol/trajectory.h" #include "SireFF/forcefields.h" @@ -422,22 +423,30 @@ namespace SireSystem void loadFrame(int frame); void loadFrame(int frame, const SireBase::LazyEvaluator &evaluator); + void saveFrame(int frame); void saveFrame(); + void deleteFrame(int frame); void deleteAllFrames(); void loadFrame(int frame, const SireBase::PropertyMap &map); void loadFrame(int frame, const SireBase::LazyEvaluator &evaluator, const SireBase::PropertyMap &map); + void saveFrame(int frame, const SireBase::PropertyMap &map); void saveFrame(const SireBase::PropertyMap &map); + void deleteFrame(int frame, const SireBase::PropertyMap &map); void deleteAllFrames(const SireBase::PropertyMap &map); 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: @@ -528,6 +537,11 @@ namespace SireSystem By default, these are the "space" and "time" properties */ QStringList shared_properties; + /** Shared pointer to the current active SystemTrajectory. + * This will either be null or a valid pointer to a + * SystemTrajectory object */ + SireMol::TrajectoryDataPtr system_trajectory; + /** The subversion of this system - this is incremented when delta updates are being applied. A system with non-zero subversion is not guaranteed to be in a valid state */ diff --git a/corelib/src/libs/SireSystem/systemtrajectory.cpp b/corelib/src/libs/SireSystem/systemtrajectory.cpp new file mode 100644 index 000000000..1c57da68b --- /dev/null +++ b/corelib/src/libs/SireSystem/systemtrajectory.cpp @@ -0,0 +1,901 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2024 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the website + * at https://sire.openbiosim.org + * +\*********************************************/ + +#include "systemtrajectory.h" + +#include "SireMol/errors.h" + +#include "SireBase/lazyevaluator.h" +#include "SireBase/parallel.h" +#include "SireBase/pagecache.h" + +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" + +#include + +#include + +using namespace SireSystem; +using namespace SireMol; +using namespace SireBase; +using namespace SireStream; + +namespace SireSystem +{ + std::weak_ptr shared_cache; + + /** Return a pointer to the PageCache that is shared by + * all SystemFrames objects + */ + std::shared_ptr getSharedCache() + { + auto cache = shared_cache.lock(); + + static QMutex mutex; + + if (not cache) + { + QMutexLocker locker(&mutex); + cache = shared_cache.lock(); + + if (not cache) + { + QString cache_dir = QDir(PageCache::rootDirectory()).absoluteFilePath("temp_traj_XXXXXX"); + cache = std::make_shared(cache_dir); + shared_cache = cache; + } + } + + return cache; + } + + class SystemFrames + { + public: + enum FrameType + { + EMPTY = 0x0000, + COORDINATES = 0x0001, + VELOCITIES = 0x0010, + FORCES = 0x0100 + }; + + SystemFrames(); + SystemFrames(const QList &molnums, + const Molecules &mols, const PropertyMap &map); + ~SystemFrames(); + + int nFrames() const; + + int nAtoms() const; + int nAtoms(MolNum molnum) const; + + bool saveCoordinates() const; + bool saveVelocities() const; + bool saveForces() const; + + Frame getFrame(int i) const; + Frame getFrame(int i, const LazyEvaluator &evaluator) const; + + Frame getFrame(MolNum molnum, int i) const; + Frame getFrame(MolNum molnum, int i, + const LazyEvaluator &evaluator) const; + + void saveFrame(const Molecules &mols, + const Space &space, + SireUnits::Dimension::Time time, + const Properties &props, + const PropertyMap &map); + + bool isCompatibleWith(const QList &molnums, + const Molecules &mols, + const PropertyMap &map) const; + + private: + tbb::spin_mutex &getMutex() const; + Frame _lkr_getFrame(int i) const; + + /** The order the molecules should appear in the trajectory */ + QList molnums; + + /** The start index and number of atoms for each molecule + * in the system. This is the same for all frames + */ + QHash> mol_atoms; + + /** The data for the trajectory */ + QVector frames; + + /** Pointer to the shared pagecache */ + std::shared_ptr cache; + + /** Mutex to serialize access to the data of this class */ + tbb::spin_mutex mutex; + + /** The current (unpacked) frame */ + Frame current_frame; + + /** The index of the current frame */ + int current_frame_index; + + /** The total number of atoms */ + int natoms; + + /** What type of frame data - coordinates, velocities, forces */ + int frame_type; + }; +} + +tbb::spin_mutex &SystemFrames::getMutex() const +{ + return *(const_cast(&mutex)); +} + +SystemFrames::SystemFrames() + : current_frame_index(-1), natoms(0), frame_type(EMPTY) +{ + cache = getSharedCache(); +} + +SystemFrames::SystemFrames(const QList &nums, + const Molecules &mols, const PropertyMap &map) + : molnums(nums), current_frame_index(-1), natoms(0), frame_type(EMPTY) +{ + cache = getSharedCache(); + + tbb::spin_mutex::scoped_lock lock(getMutex()); + + for (const auto &molnum : molnums) + { + auto it = mols.constFind(molnum); + + if (it == mols.constEnd()) + throw SireMol::missing_molecule(QObject::tr( + "There is no molecule with number %1 in the system") + .arg(molnum.value()), + CODELOC); + + const auto &moldata = it.value().data(); + + mol_atoms.insert(molnum, qMakePair(natoms, moldata.info().nAtoms())); + + natoms += moldata.info().nAtoms(); + } + + // should work out if coords, vels and/or forces should be saved + // based on the properties in the map + frame_type = COORDINATES; + + bool save_coordinates = true; + bool save_velocities = false; + bool save_forces = false; + + if (map.specified("save_coordinates")) + { + save_coordinates = map["save_coordinates"].value().asABoolean(); + } + + if (map.specified("save_velocities")) + { + save_velocities = map["save_velocities"].value().asABoolean(); + } + + if (map.specified("save_forces")) + { + save_forces = map["save_forces"].value().asABoolean(); + } + + if (save_coordinates) + frame_type |= COORDINATES; + + if (save_velocities) + frame_type |= VELOCITIES; + + if (save_forces) + frame_type |= FORCES; +} + +SystemFrames::~SystemFrames() +{ +} + +bool SystemFrames::saveCoordinates() const +{ + return frame_type & COORDINATES; +} + +bool SystemFrames::saveVelocities() const +{ + return frame_type & VELOCITIES; +} + +bool SystemFrames::saveForces() const +{ + return frame_type & FORCES; +} + +int SystemFrames::nAtoms() const +{ + return natoms; +} + +int SystemFrames::nAtoms(MolNum molnum) const +{ + tbb::spin_mutex::scoped_lock lock(getMutex()); + + auto it = mol_atoms.constFind(molnum); + + if (it == mol_atoms.constEnd()) + { + throw SireMol::missing_molecule(QObject::tr( + "There is no molecule with number %1 in the system") + .arg(molnum.value()), + CODELOC); + } + + return it.value().second; +} + +int SystemFrames::nFrames() const +{ + tbb::spin_mutex::scoped_lock lock(getMutex()); + return frames.count(); +} + +/** It is only compatible if we have the same molecules with + * the same number of atoms. This is because we cannot cope + * with molecules being added or removed from the system, + * or with the number of atoms changing. These events will + * trigger the creation of a new SystemFrames higher in the + * stack + */ +bool SystemFrames::isCompatibleWith(const QList &nums, + const Molecules &mols, + const PropertyMap &map) const +{ + tbb::spin_mutex::scoped_lock lock(getMutex()); + + if (molnums != nums or mols.nMolecules() != mol_atoms.size()) + return false; + + // make sure that all of the molecules exist in the hash + // and the number of atoms match + for (const auto &mol : mols) + { + const auto &moldata = mol.data(); + + auto it = mol_atoms.constFind(moldata.number()); + + if (it == mol_atoms.constEnd()) + return false; + + if (it.value().second != moldata.info().nAtoms()) + return false; + } + + return true; +} + +Frame SystemFrames::_lkr_getFrame(int i) const +{ + try + { + i = Index(i).map(frames.count()); + } + catch (...) + { + throw SireError::invalid_index( + QObject::tr("Invalid frame index %1. Number of frames is %2.") + .arg(i) + .arg(frames.count()), + CODELOC); + } + + if (i == current_frame_index) + { + return current_frame; + } + + // fetch the data from the cache and load it into a frame + auto data = frames.at(i).fetch(); + Frame frame = Frame::fromByteArray(data); + data.clear(); + + const_cast(this)->current_frame = frame; + const_cast(this)->current_frame_index = i; + + return current_frame; +} + +Frame SystemFrames::getFrame(int i) const +{ + tbb::spin_mutex::scoped_lock lock(getMutex()); + return this->_lkr_getFrame(i); +} + +Frame SystemFrames::getFrame(int i, const LazyEvaluator &evaluator) const +{ + auto key = QString("%1-%2").arg(qintptr(this)).arg(i); + + auto frame = evaluator.evaluate(key, [&]() + { return this->getFrame(i); }); + + return frame.read().asA(); +} + +Frame SystemFrames::getFrame(MolNum molnum, int i) const +{ + tbb::spin_mutex::scoped_lock lock(getMutex()); + + auto it = mol_atoms.constFind(molnum); + + if (it == mol_atoms.constEnd()) + { + throw SireMol::missing_molecule(QObject::tr( + "There is no molecule with number %1 in the system") + .arg(molnum.value()), + CODELOC); + } + + return this->_lkr_getFrame(i).subset(it.value().first, it.value().second); +} + +Frame SystemFrames::getFrame(MolNum molnum, int i, + const LazyEvaluator &evaluator) const +{ + tbb::spin_mutex::scoped_lock lock(getMutex()); + auto it = mol_atoms.constFind(molnum); + + if (it == mol_atoms.constEnd()) + { + throw SireMol::missing_molecule(QObject::tr( + "There is no molecule with number %1 in the system") + .arg(molnum.value()), + CODELOC); + } + + // below function call gets the lock, so unlock now + lock.release(); + + return this->getFrame(i, evaluator).subset(it.value().first, it.value().second); +} + +void SystemFrames::saveFrame(const Molecules &mols, + const Space &space, + SireUnits::Dimension::Time time, + const Properties &props, + const PropertyMap &map) +{ + const bool save_coords = this->saveCoordinates(); + const bool save_vels = this->saveVelocities(); + const bool save_forces = this->saveForces(); + + if (not save_coords and not save_vels and not save_forces) + { + return; + } + + QVector coordinates; + QVector velocities; + QVector forces; + + Vector *coordinates_data = 0; + Velocity3D *velocities_data = 0; + Force3D *forces_data = 0; + + if (save_coords) + { + coordinates.resize(natoms); + coordinates_data = coordinates.data(); + } + + if (save_vels) + { + velocities.resize(natoms); + velocities_data = velocities.data(); + } + + if (save_forces) + { + forces.resize(natoms); + forces_data = forces.data(); + } + + auto save_frame = [&](MolNum molnum) + { + auto it = mol_atoms.constFind(molnum); + + if (it == mol_atoms.constEnd()) + { + return; + } + + auto it2 = mols.constFind(molnum); + + if (it2 == mols.constEnd()) + { + return; + } + + int start_atom = it.value().first; + int nats = it.value().second; + + if (start_atom < 0 or nats == 0 or start_atom + nats > natoms) + { + return; + } + + const auto &moldata = it2.value().data(); + + if (save_coords) + { + try + { + const auto &coords = moldata.property(map["coordinates"]).asA(); + + if (coords.nAtoms() != nats) + { + return; + } + + std::memcpy(coordinates_data + start_atom, coords.constData(CGIdx(0)), + nats * sizeof(Vector)); + } + catch (...) + { + } + } + + if (save_vels) + { + try + { + const auto &vels = moldata.property(map["velocities"]).asA(); + + if (vels.nAtoms() != nats) + { + return; + } + + std::memcpy(velocities_data + start_atom, vels.constData(CGIdx(0)), + nats * sizeof(Velocity3D)); + } + catch (...) + { + } + } + + if (save_forces) + { + try + { + const auto &frcs = moldata.property(map["forces"]).asA(); + + if (frcs.nAtoms() != nats) + { + return; + } + + std::memcpy(forces_data + start_atom, frcs.constData(CGIdx(0)), + nats * sizeof(Force3D)); + } + catch (...) + { + } + } + }; + + if (should_run_in_parallel(molnums.count(), map)) + { + tbb::parallel_for(tbb::blocked_range(0, molnums.count()), [&](const tbb::blocked_range &r) + { + for (int i = r.begin(); i < r.end(); ++i) + { + save_frame(molnums[i]); + } }); + } + else + { + for (const auto &molnum : molnums) + { + save_frame(molnum); + } + } + + // create the frame, convert it to a data array, then cache + // that array to get the handle + Frame frame(coordinates, velocities, forces, space, time, props); + auto handle = cache->store(frame.toByteArray()); + + // need to hold the write lock, as we are updating global state + // for everyone who holds this live trajectory data + tbb::spin_mutex::scoped_lock lock(getMutex()); + frames.append(handle); + current_frame = frame; + current_frame_index = frames.count() - 1; +} + +//////// +//////// Implementation of MolSystemTrajectory +//////// + +static const RegisterMetaType r_moltraj; + +SIRESYSTEM_EXPORT QDataStream &operator<<(QDataStream &ds, const MolSystemTrajectory &traj) +{ + writeHeader(ds, r_moltraj, 1); + + // we don't stream the trajectory as it would be too big + ds << traj.molnum + << static_cast(traj); + + return ds; +} + +SIRESYSTEM_EXPORT QDataStream &operator>>(QDataStream &ds, MolSystemTrajectory &traj) +{ + auto v = readHeader(ds, r_moltraj); + + if (v == 1) + { + // we don't stream the trajectory as it would be too big + traj.clear(); + ds >> traj.molnum >> static_cast(traj); + } + else + throw version_error(v, "1", r_moltraj, CODELOC); + + return ds; +} + +MolSystemTrajectory::MolSystemTrajectory() : TrajectoryData() +{ +} + +MolSystemTrajectory::MolSystemTrajectory(const SystemTrajectory &trajectory, + SireMol::MolNum mnum) + : TrajectoryData(trajectory), d(trajectory.d), molnum(mnum) +{ +} + +MolSystemTrajectory::MolSystemTrajectory(const MolSystemTrajectory &other) + : TrajectoryData(other), d(other.d), molnum(other.molnum) +{ +} + +MolSystemTrajectory::~MolSystemTrajectory() +{ +} + +MolSystemTrajectory &MolSystemTrajectory::operator=(const MolSystemTrajectory &other) +{ + if (this != &other) + { + TrajectoryData::operator=(other); + d = other.d; + molnum = other.molnum; + } + + return *this; +} + +bool MolSystemTrajectory::operator==(const MolSystemTrajectory &other) const +{ + return TrajectoryData::operator==(other) && + d.get() == other.d.get() && + molnum == other.molnum; +} + +bool MolSystemTrajectory::operator!=(const MolSystemTrajectory &other) const +{ + return not this->operator==(other); +} + +const char *MolSystemTrajectory::typeName() +{ + return QMetaType::typeName(qMetaTypeId()); +} + +const char *MolSystemTrajectory::what() const +{ + return MolSystemTrajectory::typeName(); +} + +MolSystemTrajectory *MolSystemTrajectory::clone() const +{ + return new MolSystemTrajectory(*this); +} + +void MolSystemTrajectory::clear() +{ + d.reset(); + molnum = MolNum(); +} + +int MolSystemTrajectory::nFrames() const +{ + if (not d) + return 0; + else + return d->nFrames(); +} + +int MolSystemTrajectory::nAtoms() const +{ + if (d) + { + return d->nAtoms(molnum); + } + else + { + return 0; + } +} + +QStringList MolSystemTrajectory::filenames() const +{ + return QStringList(); +} + +Frame MolSystemTrajectory::getFrame(int i) const +{ + if (d) + return d->getFrame(molnum, i); + else + throw SireError::invalid_index( + QObject::tr("Invalid frame index %1. Number of frames is 0.") + .arg(i), + CODELOC); +} + +Frame MolSystemTrajectory::getFrame(int i, const SireBase::LazyEvaluator &evaluator) const +{ + if (d) + return d->getFrame(molnum, i, evaluator); + else + throw SireError::invalid_index( + QObject::tr("Invalid frame index %1. Number of frames is 0.") + .arg(i), + CODELOC); +} + +bool MolSystemTrajectory::isEditable() const +{ + return false; +} + +bool MolSystemTrajectory::_equals(const TrajectoryData &other) const +{ + const MolSystemTrajectory *p = dynamic_cast(&other); + + if (p) + return this->operator==(*p); + else + return false; +} + +//////// +//////// Implementation of SystemTrajectory +//////// + +static const RegisterMetaType r_traj; + +SIRESYSTEM_EXPORT QDataStream &operator<<(QDataStream &ds, const SystemTrajectory &traj) +{ + writeHeader(ds, r_traj, 1); + + // we don't stream the trajectory as it would be too big + ds << static_cast(traj); + + return ds; +} + +SIRESYSTEM_EXPORT QDataStream &operator>>(QDataStream &ds, SystemTrajectory &traj) +{ + auto v = readHeader(ds, r_traj); + + if (v == 1) + { + // we don't stream the trajectory as it would be too big + traj.clear(); + ds >> static_cast(traj); + } + else + throw version_error(v, "1", r_traj, CODELOC); + + return ds; +} + +SystemTrajectory::SystemTrajectory() : TrajectoryData() +{ +} + +SystemTrajectory::SystemTrajectory(const QList &molnums, + const Molecules &mols, + const PropertyMap &map) + : TrajectoryData(), d(new SystemFrames(molnums, mols, map)) +{ +} + +SystemTrajectory::SystemTrajectory(const SystemTrajectory &other) + : TrajectoryData(other), d(other.d) +{ +} + +SystemTrajectory::~SystemTrajectory() +{ +} + +SystemTrajectory &SystemTrajectory::operator=(const SystemTrajectory &other) +{ + if (this != &other) + { + TrajectoryData::operator=(other); + d = other.d; + } + + return *this; +} + +bool SystemTrajectory::operator==(const SystemTrajectory &other) const +{ + return TrajectoryData::operator==(other) && + d.get() == other.d.get(); +} + +bool SystemTrajectory::operator!=(const SystemTrajectory &other) const +{ + return not this->operator==(other); +} + +const char *SystemTrajectory::typeName() +{ + return QMetaType::typeName(qMetaTypeId()); +} + +const char *SystemTrajectory::what() const +{ + return SystemTrajectory::typeName(); +} + +SystemTrajectory *SystemTrajectory::clone() const +{ + return new SystemTrajectory(*this); +} + +bool SystemTrajectory::isLive() const +{ + return true; +} + +void SystemTrajectory::clear() +{ + d.reset(); +} + +bool SystemTrajectory::isCompatibleWith(const QList &molnums, + const Molecules &mols, + const PropertyMap &map) const +{ + if (d) + return d->isCompatibleWith(molnums, mols, map); + else + return false; +} + +void SystemTrajectory::saveFrame(const Molecules &mols, + const Space &space, + SireUnits::Dimension::Time time, + const Properties &props, + const PropertyMap &map) +{ + if (not d) + { + throw SireError::invalid_state( + QObject::tr("The trajectory is not initialized"), + CODELOC); + } + + d->saveFrame(mols, space, time, props, map); +} + +TrajectoryDataPtr SystemTrajectory::getTrajectory(MolNum molnum) const +{ + if (not d) + { + throw SireMol::missing_molecule(QObject::tr( + "There is no molecule with number %1 in the system") + .arg(molnum.value()), + CODELOC); + } + + return TrajectoryDataPtr(new MolSystemTrajectory(*this, molnum)); +} + +int SystemTrajectory::nFrames() const +{ + if (not d) + return 0; + else + return d->nFrames(); +} + +int SystemTrajectory::nAtoms() const +{ + if (d) + { + return d->nAtoms(); + } + else + { + return 0; + } +} + +QStringList SystemTrajectory::filenames() const +{ + return QStringList(); +} + +Frame SystemTrajectory::getFrame(int i) const +{ + if (d) + return d->getFrame(i); + else + throw SireError::invalid_index( + QObject::tr("Invalid frame index %1. Number of frames is 0.") + .arg(i), + CODELOC); +} + +Frame SystemTrajectory::getFrame(int i, const LazyEvaluator &evaluator) const +{ + if (d) + return d->getFrame(i, evaluator); + else + throw SireError::invalid_index( + QObject::tr("Invalid frame index %1. Number of frames is 0.") + .arg(i), + CODELOC); +} + +bool SystemTrajectory::isEditable() const +{ + return false; +} + +bool SystemTrajectory::_equals(const TrajectoryData &other) const +{ + const SystemTrajectory *p = dynamic_cast(&other); + + if (p) + return this->operator==(*p); + else + return false; +} diff --git a/corelib/src/libs/SireSystem/systemtrajectory.h b/corelib/src/libs/SireSystem/systemtrajectory.h new file mode 100644 index 000000000..673666a34 --- /dev/null +++ b/corelib/src/libs/SireSystem/systemtrajectory.h @@ -0,0 +1,184 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2024 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the website + * at https://sire.openbiosim.org + * +\*********************************************/ + +#ifndef SIRESYSTEM_SYSTEMTRAJECTORY_H +#define SIRESYSTEM_SYSTEMTRAJECTORY_H + +#include "SireMol/trajectory.h" +#include "SireMol/molecules.h" + +#include "SireVol/space.h" +#include "SireUnits/dimensions.h" + +#include + +SIRE_BEGIN_HEADER + +namespace SireSystem +{ + class SystemTrajectory; + class MolSystemTrajectory; +} + +SIRESYSTEM_EXPORT QDataStream &operator<<(QDataStream &, const SireSystem::SystemTrajectory &); +SIRESYSTEM_EXPORT QDataStream &operator>>(QDataStream &, SireSystem::SystemTrajectory &); + +SIRESYSTEM_EXPORT QDataStream &operator<<(QDataStream &, const SireSystem::MolSystemTrajectory &); +SIRESYSTEM_EXPORT QDataStream &operator>>(QDataStream &, SireSystem::MolSystemTrajectory &); + +namespace SireSystem +{ + class SystemFrames; + + /** This is a TrajectoryData object that is used to hold the trajectory + * data for all molecules in a system. This is used to both speed + * up the reading and writing of trajectory data for entire + * systems (e.g. during a dynamics simulation), plus also to + * support offloading of trajectory data from memory to disk + * as the simulation progresses + */ + class SIRESYSTEM_EXPORT SystemTrajectory : public SireMol::TrajectoryData + { + friend QDataStream & ::operator<<(QDataStream &, const SystemTrajectory &); + friend QDataStream & ::operator>>(QDataStream &, SystemTrajectory &); + + friend class MolSystemTrajectory; + + public: + SystemTrajectory(); + SystemTrajectory(const QList &molnums, + const SireMol::Molecules &mols, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + + SystemTrajectory(const SystemTrajectory &other); + + ~SystemTrajectory(); + + SystemTrajectory &operator=(const SystemTrajectory &other); + + bool operator==(const SystemTrajectory &other) const; + bool operator!=(const SystemTrajectory &other) const; + + static const char *typeName(); + + const char *what() const; + + SystemTrajectory *clone() const; + + bool isLive() const; + + void clear(); + + bool isCompatibleWith(const QList &molnums, + const SireMol::Molecules &mols, + const SireBase::PropertyMap &map = SireBase::PropertyMap()) const; + + void saveFrame(const SireMol::Molecules &mols, + const SireVol::Space &space, + SireUnits::Dimension::Time time, + const SireBase::Properties &props, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + + SireMol::TrajectoryDataPtr getTrajectory(SireMol::MolNum molnum) const; + + int nFrames() const; + int nAtoms() const; + + QStringList filenames() const; + + SireMol::Frame getFrame(int i) const; + SireMol::Frame getFrame(int i, const SireBase::LazyEvaluator &evaluator) const; + + bool isEditable() const; + + protected: + bool _equals(const TrajectoryData &other) const; + + private: + /** Shared pointer to the underlying trajectory frames */ + std::shared_ptr d; + }; + + /** This is the view of a SystemTrajectory that is used to + * access the trajectory data for a single molecule in the system + */ + class SIRESYSTEM_EXPORT MolSystemTrajectory : public SireMol::TrajectoryData + { + friend QDataStream & ::operator<<(QDataStream &, const MolSystemTrajectory &); + friend QDataStream & ::operator>>(QDataStream &, MolSystemTrajectory &); + + public: + MolSystemTrajectory(); + + MolSystemTrajectory(const SystemTrajectory &trajectory, SireMol::MolNum molnum); + + MolSystemTrajectory(const MolSystemTrajectory &other); + + ~MolSystemTrajectory(); + + MolSystemTrajectory &operator=(const MolSystemTrajectory &other); + + bool operator==(const MolSystemTrajectory &other) const; + bool operator!=(const MolSystemTrajectory &other) const; + + static const char *typeName(); + + const char *what() const; + + MolSystemTrajectory *clone() const; + + void clear(); + + int nFrames() const; + int nAtoms() const; + + QStringList filenames() const; + + SireMol::Frame getFrame(int i) const; + SireMol::Frame getFrame(int i, const SireBase::LazyEvaluator &evaluator) const; + + bool isEditable() const; + + protected: + bool _equals(const TrajectoryData &other) const; + + private: + /** Shared pointer to the underlying trajectory frames */ + std::shared_ptr d; + + /** The Molecule number for the molecule that owns this trajectory */ + SireMol::MolNum molnum; + }; +} + +Q_DECLARE_METATYPE(SireSystem::SystemTrajectory) +Q_DECLARE_METATYPE(SireSystem::MolSystemTrajectory) + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireVol/triclinicbox.cpp b/corelib/src/libs/SireVol/triclinicbox.cpp index 413b5f2fc..9f6ddad85 100644 --- a/corelib/src/libs/SireVol/triclinicbox.cpp +++ b/corelib/src/libs/SireVol/triclinicbox.cpp @@ -565,6 +565,21 @@ Matrix TriclinicBox::boxMatrix() const return this->cellMatrix(); } +SireUnits::Dimension::Length TriclinicBox::maximumCutoff() const +{ + // If the box is reduced, then use half the minimum diagonal element. + if (this->isReduced()) + { + QList diagonals = {this->v0.x(), this->v1.y(), this->v2.z()}; + return SireUnits::Dimension::Length(*std::min_element(diagonals.begin(), diagonals.end())/2.0); + } + // Otherwise, use half the norm of the smallest box vector. + else + { + return SireUnits::Dimension::Length(this->dist_max); + } +} + /** Return the volume of the central box of this space. */ SireUnits::Dimension::Volume TriclinicBox::volume() const { diff --git a/corelib/src/libs/SireVol/triclinicbox.h b/corelib/src/libs/SireVol/triclinicbox.h index a39028f52..bc3706ada 100644 --- a/corelib/src/libs/SireVol/triclinicbox.h +++ b/corelib/src/libs/SireVol/triclinicbox.h @@ -153,6 +153,9 @@ namespace SireVol QString toString() const; + /** Get the maximum cutoff distance for the triclinic box. */ + SireUnits::Dimension::Length maximumCutoff() const; + /** Get the volume of the triclinic box. */ SireUnits::Dimension::Volume volume() const; diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 6e7fa5685..95045e4ec 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -12,6 +12,71 @@ Development was migrated into the `OpenBioSim `__ organisation on `GitHub `__. +`2024.2.0 `__ - June 2024 +----------------------------------------------------------------------------------------- + +* Correctly set the ``element1`` property in ``sire.morph.create_from_pertfile``. + +* Added mising :meth:`~sire.vol.TriclinicBox.maximum_cutoff` method so that + the cutoff is set correctly when creating a :obj:`~sire.system.ForceFieldInfo` + object. + +* Added a :class:`sire.base.PageCache` class which can be used to cache and + restore objects to memory pages which are automatically paged to and from + disk as needed. This lets you work on data that can't fit in memory. + +* Updated the way that :class:`sire.system.System` objects hold the + set of temporary frames in a trajectory. Rather than each molecule holding + its own temporary frame, now the :class:`~sire.system.System` object holds + a ``SystemTrajectory`` object. This holds the frame data for all molecules + in the :class:`~sire.system.System` in a single binary array. The data + for this array is paged to disk as needed via the above + :class:`sire.base.PageCache` class. This both significantly speeds up + processing of these temporary frames, and ensures that long simulations + do not fill memory, causing the system to crash. In addition, the + ``SystemTrajectory`` object is NOT streamed to a S3 file. This means that + the S3 file (used normally for restarts) won't grow unbounded with + temporary frames, meaning that it is safe to create restarts of + long-running simulations. Note that this does mean that the temporary + directory is lost. You **must** save the trajectory to a file at the + end of your simulation or it will be lost. You can do this using the + standard trajectory save functions, e.g. + ``sire.save(mols.trajectory(), "output", format=["PRMTOP", "RST"])``. + +* Added code that automatically excludes non-bonded interactions between + from_ghost and to_ghost atoms in the OpenMM layer. This is to prevent + crashes caused by poor interactions between from_ghost atoms appearing + over the top of to_ghost atoms during a perturbation where one group + is grown over another. + +* Ignore BioSimSpace format position restraint include directives when + parsing GROMACS topology files. + +* 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. + +* 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 ------------------------------------------------------------------------------------------ diff --git a/doc/source/cheatsheet/trajectory.rst b/doc/source/cheatsheet/trajectory.rst index 4981383be..967ccf708 100644 --- a/doc/source/cheatsheet/trajectory.rst +++ b/doc/source/cheatsheet/trajectory.rst @@ -436,3 +436,52 @@ and all of the water molecules. 498 498 99.800003 -12.226096 -35.170080 -47.396176 499 499 100.000000 -7.356142 -41.265345 -48.621487 [500 rows x 5 columns] + +Trajectories and PageCache +-------------------------- + +When you run a molecular dynamics simulation, you will typically generate +a lot of frames, which will become too large to fit in memory. To handle +this, a :class:`sire.base.PageCache` is used. This class provides a +:class:`~sire.base.PageCache` to which objects can be stored and fetched. +The memory for those objects is automatically paged back to disk, meaning +that it doesn't need to stay resident in memory. + +The :class:`~sire.system.System` class automatically uses a +:class:`~sire.base.PageCache` to manage the frames involved in its +:meth:`~sire.system.System.save_frame` and +:meth:`~sire.system.System.load_frame` function calls. This page cache +will page data larger than ~256MB to disk, into a directory called +``temp_trajectory_XXXXXX`` in the current working directory +(where ``XXXXXX`` is replaced with a random string). This directory +will be automatically cleaned up when the program exits, and potentially +earlier when the system is deleted and then garbage collected by python. + +You can change the location of the page cache in two ways. Either, +you can set the environment variable ``SIRE_PAGECACHE_ROOT`` to the directory +where you want the page cache to be stored, or you can call the +:meth:`~sire.base.PageCache.set_root_directory` function to set the +root directory in your script. + +You can also use the :class:`~sire.base.PageCache` class directly to +create caches for your own objects. For example, here we will create a +cache into which we will place some data. + +>>> import sire as sr +>>> cache = sr.base.PageCache() +>>> handle1 = cache.store("Hello World") +>>> mols = sr.load_test_files("ala.top", "ala.crd") +>>> handle2 = cache.store(mols) +>>> print(handle1.fetch()) +Hello World +>>> print(handle2.fetch()) +System( name=ACE num_molecules=631 num_residues=633 num_atoms=1912 ) +>>> print(sr.base.PageCache.get_statistics()) +Cache: /path/to/cache_root/temp_XXXXXX + Current Page: 977.279 KB : is_resident 1 + Total size: 977.279 KB + +.. note:: + + The :class:`~sire.base.PageCache` class can hold any object that is + picklable. diff --git a/doc/source/index.rst b/doc/source/index.rst index ce6e90c6a..f5577315a 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -9,6 +9,30 @@ It is used as a key component of `BioSimSpace `__, and is distributed and supported as an open source community project by `OpenBioSim `__. +Citation +======== + +If you use sire in your work, please cite the +`following paper `__: + +.. code-block:: bibtex + + @article{10.1063/5.0200458, + author = {Woods, Christopher J. and Hedges, Lester O. and Mulholland, Adrian J. and Malaisree, Maturos and Tosco, Paolo and Loeffler, Hannes H. and Suruzhon, Miroslav and Burman, Matthew and Bariami, Sofia and Bosisio, Stefano and Calabro, Gaetano and Clark, Finlay and Mey, Antonia S. J. S. and Michel, Julien}, + title = "{Sire: An interoperability engine for prototyping algorithms and exchanging information between molecular simulation programs}", + journal = {The Journal of Chemical Physics}, + volume = {160}, + number = {20}, + pages = {202503}, + year = {2024}, + month = {05}, + abstract = "{Sire is a Python/C++ library that is used both to prototype new algorithms and as an interoperability engine for exchanging information between molecular simulation programs. It provides a collection of file parsers and information converters that together make it easier to combine and leverage the functionality of many other programs and libraries. This empowers researchers to use sire to write a single script that can, for example, load a molecule from a PDBx/mmCIF file via Gemmi, perform SMARTS searches via RDKit, parameterize molecules using BioSimSpace, run GPU-accelerated molecular dynamics via OpenMM, and then display the resulting dynamics trajectory in a NGLView Jupyter notebook 3D molecular viewer. This functionality is built on by BioSimSpace, which uses sire’s molecular information engine to interconvert with programs such as GROMACS, NAMD, Amber, and AmberTools for automated molecular parameterization and the running of molecular dynamics, metadynamics, and alchemical free energy workflows. Sire comes complete with a powerful molecular information search engine, plus trajectory loading and editing, analysis, and energy evaluation engines. This, when combined with an in-built computer algebra system, gives substantial flexibility to researchers to load, search for, edit, and combine molecular information from multiple sources and use that to drive novel algorithms by combining functionality from other programs. Sire is open source (GPL3) and is available via conda and at a free Jupyter notebook server at https://try.openbiosim.org. Sire is supported by the not-for-profit OpenBioSim community interest company.}", + issn = {0021-9606}, + doi = {10.1063/5.0200458}, + url = {https://doi.org/10.1063/5.0200458}, + eprint = {https://pubs.aip.org/aip/jcp/article-pdf/doi/10.1063/5.0200458/19969848/202503\_1\_5.0200458.pdf}, + } + Quick Start =========== diff --git a/recipes/sire/conda_build_config.yaml b/recipes/sire/conda_build_config.yaml index f45e1ecfa..e8bc0c8bf 100644 --- a/recipes/sire/conda_build_config.yaml +++ b/recipes/sire/conda_build_config.yaml @@ -1,3 +1,13 @@ +c_compiler: + - gcc # [linux] + - clang # [osx] + - vs2019 # [win] + +cxx_compiler: + - gxx # [linux] + - clangxx # [osx] + - vs2019 # [win] + c_compiler_version: - 12.3.0 # [linux] diff --git a/recipes/sire/template.yaml b/recipes/sire/template.yaml index a2f6535b5..9a33377bb 100644 --- a/recipes/sire/template.yaml +++ b/recipes/sire/template.yaml @@ -21,7 +21,7 @@ requirements: run: SIRE_RUN_REQUIREMENTS run_constrained: - - {{ pin_compatible('rdkit', max_pin='x.x') }} + - {{ pin_compatible('rdkit', max_pin='x.x.x') }} test: script_env: diff --git a/setup.py b/setup.py index 03cd5bc46..48239a2ff 100644 --- a/setup.py +++ b/setup.py @@ -91,7 +91,7 @@ conda_base = os.path.abspath(os.environ["PREFIX"]) print(f"Setting conda-base to {conda_base}") else: - # Find the path to the conda or mamba executable + # Find the path to the conda executable conda_base = os.path.abspath(os.path.dirname(sys.executable)) if os.path.basename(conda_base) == "bin": @@ -133,21 +133,6 @@ sys.exit(-1) -def find_mamba(): - """Find mamba""" - if conda.endswith(".exe"): - m = os.path.join(os.path.dirname(conda), "mamba.exe") - else: - m = os.path.join(os.path.dirname(conda), "mamba") - - if os.path.exists(m): - return m - else: - return None - - -mamba = find_mamba() - # Get the build operating system and processor is_linux = False is_windows = False @@ -277,6 +262,13 @@ def parse_args(): help="Skip the installation of the dependencies (only use if you know " "that they are already installed)", ) + parser.add_argument( + "--skip-dep", + action="append", + help="List of dependencies to skip when installing. This is useful when " + "you know that a particular dependency is already installed or " + "it is uninstallable on your system.", + ) parser.add_argument( "--skip-build", action="store_true", @@ -331,8 +323,10 @@ def _add_to_dependencies(dependencies, lines): _is_conda_prepped = False +dependencies_to_skip = [] + -def conda_install(dependencies, install_bss_reqs=False): +def conda_install(dependencies, install_bss_reqs=False, yes=True): """Install the passed list of dependencies using conda""" conda_exe = conda @@ -365,35 +359,60 @@ def conda_install(dependencies, install_bss_reqs=False): _is_conda_prepped = True - if mamba is None: - conda_install = [conda, "install", "--yes"] - else: - conda_install = [mamba, "install", "--yes"] + conda_install = [conda, "install"] + + if yes: + conda_install.append("--yes") + + deps = [] + + global dependencies_to_skip + + try: + if len(dependencies_to_skip) > 0: + print(f"Skipping the following dependencies: {dependencies_to_skip}") + except Exception: + dependencies_to_skip = [] + + for dependency in dependencies: + if dependency == "python" or is_installed(dependency, conda_exe): + # no need to install again + continue + + skip_dep = False + + for skip in dependencies_to_skip: + if dependency.find(skip) != -1: + skip_dep = True + break + + if skip_dep: + print(f"Skipping {dependency}") + continue + + # remove duplicates + dep = f'"{dependency}"' + + if dep not in deps: + deps.append(dep) - dependencies = [f'"{dep}"' for dep in dependencies] + dependencies = deps cmd = [*conda_install, *dependencies] - print("\nInstalling packages using: '%s'" % " ".join(cmd)) + print("\nInstalling packages using:\n\n%s\n\n" % " ".join(cmd)) status = subprocess.run(cmd) if status.returncode != 0: - if mamba is not None: - # try with conda, as mamba was broken? - conda_install = [conda, "install", "--yes"] - cmd = [*conda_install, *dependencies] - print("\nTrying again using: '%s'" % " ".join(cmd)) - status = subprocess.run(cmd) - - if status.returncode != 0: - print("Something went wrong installing dependencies!") - print("If the python or conda/mamba executables were updated") - print("in the last install, then this can prevent them") - print("from running again. Please re-execute this script.") - sys.exit(-1) + print("Something went wrong installing dependencies!") + print("If the python or conda executables were updated") + print("in the last install, then this can prevent them") + print("from running again. Please re-execute this script.") + sys.exit(-1) -def install_requires(install_bss_reqs=False): - """Installs all of the dependencies. This can safely be called +def install_requires(install_bss_reqs=False, yes=True): + """ + Installs all of the dependencies. This can safely be called multiple times, as it will cache the result to prevent future installs taking too long """ @@ -408,21 +427,13 @@ def install_requires(install_bss_reqs=False): ) sys.exit(-1) - # install mamba if it doesn't exist already - global mamba - - if mamba is None: - # install mamba first! - conda_install(["mamba"], install_bss_reqs) - mamba = find_mamba() - try: import pip_requirements_parser as _pip_requirements_parser from parse_requirements import parse_requirements except Exception: # this didn't import - maybe we are missing pip-requirements-parser print("Installing pip-requirements-parser") - conda_install(["pip-requirements-parser"], install_bss_reqs) + conda_install(["pip-requirements-parser"], install_bss_reqs, yes=yes) try: from parse_requirements import parse_requirements except ImportError as e: @@ -438,7 +449,7 @@ def install_requires(install_bss_reqs=False): reqs = reqs + bss_reqs dependencies = build_reqs + reqs - conda_install(dependencies, install_bss_reqs) + conda_install(dependencies, install_bss_reqs, yes=yes) def add_default_cmake_defs(cmake_defs, ncores): @@ -546,7 +557,7 @@ def build(ncores: int = 1, npycores: int = 1, coredefs=[], pydefs=[]): CXX = glob.glob(os.path.join(bindir, "clang++"))[0] CC = glob.glob(os.path.join(bindir, "clang"))[0] except Exception: - conda_install(["clang", "clangxx"], False) + conda_install(["clang", "clangxx"], False, yes=True) try: CXX = glob.glob(os.path.join(bindir, "clang++"))[0] CC = glob.glob(os.path.join(bindir, "clang"))[0] @@ -561,9 +572,9 @@ def build(ncores: int = 1, npycores: int = 1, coredefs=[], pydefs=[]): CXX = glob.glob(os.path.join(bindir, "*-g++"))[0] CC = glob.glob(os.path.join(bindir, "*-gcc"))[0] except Exception: - # Need this version of gcc to stay compatible with conda-forge + # Need this version of gcc to stay compatible with conda-forge # (i.e. gemmi needs the exact same compiler version) - conda_install(["gcc==12.3.0", "gxx==12.3.0"], False) + conda_install(["gcc==12.3.0", "gxx==12.3.0"], False, yes=True) try: CXX = glob.glob(os.path.join(bindir, "*-g++"))[0] CC = glob.glob(os.path.join(bindir, "*-gcc"))[0] @@ -869,6 +880,9 @@ def install(ncores: int = 1, npycores: int = 1): install_bss = args.install_bss_deps + if args.skip_dep is not None: + dependencies_to_skip = args.skip_dep + action = args.action[0] if is_windows and (args.generator is None or len(args.generator) == 0): @@ -905,7 +919,7 @@ def install(ncores: int = 1, npycores: int = 1): ) elif action == "install_requires": - install_requires(install_bss_reqs=install_bss) + install_requires(install_bss_reqs=install_bss, yes=False) elif action == "install_module": install_module(ncores=args.ncores[0]) diff --git a/src/sire/base/CMakeLists.txt b/src/sire/base/CMakeLists.txt index ba207178b..1a59adf5b 100644 --- a/src/sire/base/CMakeLists.txt +++ b/src/sire/base/CMakeLists.txt @@ -7,6 +7,7 @@ # Add your script to this list set ( SCRIPTS __init__.py + _pagecache.py _progressbar.py ) diff --git a/src/sire/base/__init__.py b/src/sire/base/__init__.py index 07cf795e5..ccc91ab86 100644 --- a/src/sire/base/__init__.py +++ b/src/sire/base/__init__.py @@ -1,4 +1,11 @@ -__all__ = ["create_map", "wrap", "PropertyMap", "ProgressBar", "Properties"] +__all__ = [ + "create_map", + "wrap", + "PageCache", + "PropertyMap", + "ProgressBar", + "Properties", +] from ..legacy import Base as _Base @@ -8,6 +15,8 @@ from ._progressbar import ProgressBar +from ._pagecache import PageCache + _use_new_api(is_base=True) wrap = _Base.wrap diff --git a/src/sire/base/_pagecache.py b/src/sire/base/_pagecache.py new file mode 100644 index 000000000..09523c299 --- /dev/null +++ b/src/sire/base/_pagecache.py @@ -0,0 +1,53 @@ +__all__ = ["PageCache"] + +from ..legacy.Base import PageCache + + +def __store__(obj, data): + """ + Store the passed object into the cache. This will convert the object + into a binary form (pickled, then hex-encoded) and it will store + it in the cache. This returns a handle to the object in the cache, + which can be used to restore it. + """ + from ..legacy.Qt import QByteArray + from pickle import dumps + + data = dumps(data) + + # now convert this to a QByteArray + b = QByteArray(data.hex()) + return obj.__orig__store__(b) + + +def __fetch__(obj): + """ + Fetch the object from the cache and return it + """ + from ..legacy.Qt import QByteArray + from pickle import loads + + data = obj.__orig__fetch__() + + if hasattr(data, "constData"): + data = bytes.fromhex(data.constData()) + else: + data = bytes.fromhex(data.const_data()) + + return loads(data) + + +if not hasattr(PageCache, "__orig__store__"): + PageCache.__orig__store__ = PageCache.store + PageCache.store = __store__ + + if hasattr(PageCache, "handle"): + PageCache.Handle = PageCache.handle + delattr(PageCache, "handle") + + if hasattr(PageCache, "page"): + PageCache.Page = PageCache.page + delattr(PageCache, "page") + + PageCache.Handle.__orig__fetch__ = PageCache.Handle.fetch + PageCache.Handle.fetch = __fetch__ 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/morph/_pertfile.py b/src/sire/morph/_pertfile.py index d85c37f57..ccd594cc6 100644 --- a/src/sire/morph/_pertfile.py +++ b/src/sire/morph/_pertfile.py @@ -26,6 +26,7 @@ def create_from_pertfile(mol, pertfile, map=None): from ..legacy.IO import PerturbationsLibrary from ..base import create_map + from ..mol import Element map = create_map(map) @@ -65,6 +66,7 @@ def create_from_pertfile(mol, pertfile, map=None): chg_prop = map["charge"].source() lj_prop = map["LJ"].source() typ_prop = map["ambertype"].source() + elem_prop = map["element"].source() c["charge0"] = c[chg_prop] c["charge1"] = c[chg_prop] @@ -75,6 +77,9 @@ def create_from_pertfile(mol, pertfile, map=None): c["ambertype0"] = c[typ_prop] c["ambertype1"] = c[typ_prop] + c["element0"] = c[elem_prop] + c["element1"] = c[elem_prop] + for atom in c.atoms(): atomname = atom.name @@ -97,6 +102,8 @@ def create_from_pertfile(mol, pertfile, map=None): atom["ambertype0"] = typ0 atom["ambertype1"] = typ1 + atom["element1"] = Element.biological_element(typ1) + # now update all of the internals bond_prop = map["bond"].source() ang_prop = map["angle"].source() @@ -251,8 +258,8 @@ def create_from_pertfile(mol, pertfile, map=None): c["improper0"] = impropers0 c["improper1"] = impropers1 - # duplicate the coordinates, mass, and element properties - for prop in ["coordinates", "mass", "element", "forcefield", "intrascale"]: + # duplicate unperturbed properties + for prop in ["coordinates", "mass", "forcefield", "intrascale"]: orig_prop = map[prop].source() c[prop + "0"] = c[orig_prop] c[prop + "1"] = c[orig_prop] @@ -262,6 +269,7 @@ def create_from_pertfile(mol, pertfile, map=None): del c[chg_prop] del c[lj_prop] del c[typ_prop] + del c[elem_prop] del c[bond_prop] del c[ang_prop] del c[dih_prop] 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/src/sire/utils/_try_import.py b/src/sire/utils/_try_import.py index 2b7060718..b6a927f92 100644 --- a/src/sire/utils/_try_import.py +++ b/src/sire/utils/_try_import.py @@ -40,15 +40,7 @@ def _find_conda(): ) return None - if conda.endswith(".exe"): - m = os.path.join(os.path.dirname(conda), "mamba.exe") - else: - m = os.path.join(os.path.dirname(conda), "mamba") - - if os.path.exists(m): - return m - else: - return conda + return conda def _install_package(name, package_registry, version=None): @@ -98,10 +90,7 @@ def _install_package(name, package_registry, version=None): except Exception: pass - print( - "\nWARNING: Unable to install '%s' from package '%s'\n" - % (name, package) - ) + print("\nWARNING: Unable to install '%s' from package '%s'\n" % (name, package)) class _ModuleStub: @@ -109,7 +98,7 @@ def __init__(self, name: str, install_command: str = None): self._name = name if install_command is None: - self._install_command = f"mamba install {name}" + self._install_command = f"conda install {name}" else: self._install_command = install_command @@ -135,7 +124,7 @@ def try_import(name, package_registry=_module_to_package, version=None): the package to install using "package_registry" (or if this is not available, using just the name of the module). This will then be installed using - "mamba", then "conda" (first one that works will return). + "conda" (first one that works will return). For example, use this via @@ -176,9 +165,7 @@ def try_import(name, package_registry=_module_to_package, version=None): return _ModuleStub(name) -def try_import_from( - name, fromlist, package_registry=_module_to_package, version=None -): +def try_import_from(name, fromlist, package_registry=_module_to_package, version=None): """Try to import from the module called 'name' the passed symbol (or list of symbols) contained in 'fromlist', returning the symbol (or list of symbols). @@ -224,15 +211,14 @@ def try_import_from( return try_import_from(name, fromlist, package_registry=None) else: m = " ".join(fromlist) - return _ModuleStub(name, f"mamba install {m}") + return _ModuleStub(name, f"conda install {m}") if nsyms == 1: try: return getattr(mod, fromlist[0]) except Exception: raise ImportError( - "Cannot find the symbol '%s' in module '%s'" - % (fromlist[0], name) + "Cannot find the symbol '%s' in module '%s'" % (fromlist[0], name) ) else: ret = [] diff --git a/tests/base/test_pagecache.py b/tests/base/test_pagecache.py new file mode 100644 index 000000000..ea480a54c --- /dev/null +++ b/tests/base/test_pagecache.py @@ -0,0 +1,95 @@ +import sire as sr + + +def test_pagecache(ala_mols, tmpdir): + import pathlib + + mols = ala_mols + + PageCache = sr.base.PageCache + + root_dir = pathlib.PurePath(PageCache.root_directory()).as_posix() + + assert pathlib.Path(root_dir).exists() + + # should be the current path + cwd = pathlib.Path().cwd().as_posix() + + assert root_dir == cwd + + d = tmpdir.mkdir("test_pagecache") + + new_root_dir = pathlib.PurePath(d.strpath).as_posix() + + PageCache.set_root_directory(new_root_dir) + + root_dir2 = pathlib.PurePath(PageCache.root_directory()).as_posix() + + assert pathlib.Path(root_dir2).exists() + + # should be the tempdir + assert root_dir2 == new_root_dir + + # restore to the original root dir + PageCache.set_root_directory(root_dir) + + assert pathlib.PurePath(PageCache.root_directory()).as_posix() == root_dir + + c = PageCache("temp_pagecache_XXXXXX", 32 * 1024) + + assert c.page_size() == 32 * 1024 + assert c.num_pages() == 0 + assert c.num_bytes() == 0 + + assert "temp_pagecache_" in c.cache_dir() + + h1 = c.store(42) + + assert h1.fetch() == 42 + + h2 = c.store("Hello Python Page Cache") + + assert h2.fetch() == "Hello Python Page Cache" + + assert h1.fetch() == 42 + + h3 = c.store(mols) + + mols2 = h3.fetch() + + assert mols2.num_molecules() == mols.num_molecules() + assert mols2.num_atoms() == mols.num_atoms() + + assert c.num_pages() > 0 + cache_dir = c.cache_dir() + + assert "temp_pagecache_" in cache_dir + + handles = [] + + for i in range(0, 5000): + handles.append(c.store(i)) + + for i, h in enumerate(handles): + assert h.fetch() == i + + # the cache may not have flushed to pages or disk yet + # so we should wait a little bit of time to let it do that... + import time + + n_sleeps = 0 + + while c.num_pages() < 2: + time.sleep(0.1) + n_sleeps += 1 + + if n_sleeps > 50: + break + + assert c.num_pages() >= 2 + + cache_dir = pathlib.PurePath(c.cache_dir()).as_posix() + + assert "temp_pagecache_" in cache_dir + + assert pathlib.Path(cache_dir).exists() diff --git a/tests/convert/test_gemmi.py b/tests/convert/test_gemmi.py index c4da5827f..01fb4b0f3 100644 --- a/tests/convert/test_gemmi.py +++ b/tests/convert/test_gemmi.py @@ -1,6 +1,7 @@ import sire as sr import pytest +import sys def _assert_equal(v0, v1, tol): @@ -10,7 +11,8 @@ def _assert_equal(v0, v1, tol): @pytest.mark.skipif( - "gemmi" not in sr.convert.supported_formats(), reason="gemmi not available" + ("gemmi" not in sr.convert.supported_formats()) or (sys.platform == "win32"), + reason="gemmi not available", ) def test_gemmi(testfile_cache_dir, pdbx_3nss): mols = pdbx_3nss @@ -45,7 +47,8 @@ def test_gemmi(testfile_cache_dir, pdbx_3nss): @pytest.mark.skipif( - "gemmi" not in sr.convert.supported_formats(), reason="gemmi not available" + ("gemmi" not in sr.convert.supported_formats()) or (sys.platform == "win32"), + reason="gemmi not available", ) def test_gemmi_roundtrip(tmpdir, pdbx_3nss): mols = pdbx_3nss.clone() @@ -97,7 +100,8 @@ def test_gemmi_roundtrip(tmpdir, pdbx_3nss): @pytest.mark.skipif( - "gemmi" not in sr.convert.supported_formats(), reason="gemmi not available" + ("gemmi" not in sr.convert.supported_formats()) or (sys.platform == "win32"), + reason="gemmi not available", ) def test_gemmi_complex_metadata(tmpdir, ala_mols): mols = ala_mols.clone() diff --git a/tests/convert/test_openmm_trajectory.py b/tests/convert/test_openmm_trajectory.py new file mode 100644 index 000000000..2f57eba9d --- /dev/null +++ b/tests/convert/test_openmm_trajectory.py @@ -0,0 +1,38 @@ +import sire as sr +import pytest + + +@pytest.mark.veryslow +@pytest.mark.skipif( + "openmm" not in sr.convert.supported_formats(), + reason="openmm support is not available", +) +def test_openmm_trajectory(ala_mols, openmm_platform, tmpdir): + mols = ala_mols + + mols = mols.minimisation(platform=openmm_platform).run().commit() + + d = mols.dynamics(timestep="1fs", temperature="25oC", platform=openmm_platform) + + d.run("0.1ps", save_frequency="0.01ps") + + mols = d.commit() + + assert mols.num_frames() == 10 + + rmsd = mols.trajectory().rmsd() + + assert len(rmsd) == 10 + + dir = tmpdir.mkdir("test_openmm_trajectory") + + f = sr.save(mols.trajectory(), dir.join("test"), format=["PRMTOP", "RST"]) + + mols2 = sr.load(f) + + rmsd2 = mols2.trajectory().rmsd() + + assert len(rmsd2) == 10 + + for r1, r2 in zip(rmsd, rmsd2): + assert r1.value() == pytest.approx(r2.value(), abs=1e-3) diff --git a/tests/io/test_grotop.py b/tests/io/test_grotop.py index 1d4c47d28..5a23a87e4 100644 --- a/tests/io/test_grotop.py +++ b/tests/io/test_grotop.py @@ -33,3 +33,9 @@ def test_grospace(tmpdir, kigaki_mols): mols = sr.load(f, show_warnings=False) assert energy.value() == pytest.approx(mols.energy().value()) + + +def test_posre(): + # Make sure we can parse a file with BioSimSpace position restraint include + # directives. + mols = sr.load_test_files("posre.top") diff --git a/tests/io/test_pdbx.py b/tests/io/test_pdbx.py index 5d30f19bb..b7f09809e 100644 --- a/tests/io/test_pdbx.py +++ b/tests/io/test_pdbx.py @@ -1,6 +1,7 @@ import sire as sr import pytest +import sys def _assert_equal(v0, v1, tol): @@ -10,7 +11,8 @@ def _assert_equal(v0, v1, tol): @pytest.mark.skipif( - "gemmi" not in sr.convert.supported_formats(), reason="gemmi not available" + ("gemmi" not in sr.convert.supported_formats()) or (sys.platform == "win32"), + reason="gemmi not available", ) def test_pdbx(tmpdir, ala_mols): mols = ala_mols @@ -36,7 +38,8 @@ def test_pdbx(tmpdir, ala_mols): @pytest.mark.skipif( - "gemmi" not in sr.convert.supported_formats(), reason="gemmi not available" + ("gemmi" not in sr.convert.supported_formats()) or (sys.platform == "win32"), + reason="gemmi not available", ) def test_pdbx_pdb(pdb_3nss, pdbx_3nss): mols = pdb_3nss 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/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 diff --git a/tests/morph/test_pert.py b/tests/morph/test_pert.py index 535830194..36e76b240 100644 --- a/tests/morph/test_pert.py +++ b/tests/morph/test_pert.py @@ -320,3 +320,21 @@ def test_extract_and_link_solv(solvated_neopentane_methane, openmm_platform): nrg_pert = pert_mols.dynamics(map=map).current_potential_energy().value() assert nrg_1_1 == pytest.approx(nrg_pert, 1e-3) + + +def test_ambertype_to_element(neopentane_methane): + from sire.mol import Element + + mols = neopentane_methane.clone() + + mols = sr.morph.link_to_reference(mols) + + mols2 = sr.morph.extract_reference(mols) + + mol = sr.morph.create_from_pertfile(mols2[0], neopentane_methane_pert) + + element1 = mol.property("element1") + ambertype1 = mol.property("ambertype1") + + for a, e in zip(ambertype1, element1): + assert e == Element.biological_element(a) diff --git a/tests/vol/test_triclinic.py b/tests/vol/test_triclinic.py index 52691eb64..c9e929ea5 100644 --- a/tests/vol/test_triclinic.py +++ b/tests/vol/test_triclinic.py @@ -141,3 +141,34 @@ def test_stream(): # Make sure the boxes are the same. assert recovered_box == box + + +def test_max_cutoff(ala_mols): + """ + Test that the maximum cutoff is set correctly. + """ + + # Create a local copy of the molecules. + mols = ala_mols.clone() + + # Create a cubic triclinic space. + + # Set the vectors. + v0 = sr.maths.Vector(50, 0, 0) + v1 = sr.maths.Vector(0, 50, 0) + v2 = sr.maths.Vector(0, 0, 50) + + # Create the space. + space = sr.vol.TriclinicBox(v0, v1, v2) + + # Check the maximum cutoff. + assert space.maximum_cutoff() == 25 * sr.units.angstroms + + # Now set the space property on the molecules. + mols.set_property("space", space) + + # Create a ForceFieldInfo object. + ffinfo = sr.system.ForceFieldInfo(mols) + + # Check the cutoff. This is the maximum cutoff minus 1 angstrom. + assert ffinfo.cutoff() == 24 * sr.units.angstroms diff --git a/version.txt b/version.txt index a73a8518e..5dc9f0c61 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2024.1.0 +2024.2.0.dev diff --git a/wrapper/AutoGenerate/create_wrappers.py b/wrapper/AutoGenerate/create_wrappers.py index 5665cfc72..40a27bbe0 100644 --- a/wrapper/AutoGenerate/create_wrappers.py +++ b/wrapper/AutoGenerate/create_wrappers.py @@ -375,6 +375,7 @@ def call_with_released_gil(c, func_name): all_exported_classes = {} + def export_class( mb, classname, aliases, includes, special_code, auto_str_function=True ): @@ -508,10 +509,17 @@ def export_class( % (class_name, class_name, class_name) ) - c.add_registration_code('def( "__copy__", &__copy__)') + c.add_declaration_code('#include "Helpers/copy.hpp"') + c.add_registration_code( + 'def( "__copy__", &__copy__<%s>)' % class_name + ) - c.add_registration_code('def( "__deepcopy__", &__copy__)') - c.add_registration_code('def( "clone", &__copy__)') + c.add_registration_code( + 'def( "__deepcopy__", &__copy__<%s>)' % class_name + ) + c.add_registration_code( + 'def( "clone", &__copy__<%s>)' % class_name + ) # only do this once for the class break @@ -820,6 +828,7 @@ def fixMB(mb): define_symbols=[ "GCCXML_PARSE", "__PIC__", + "QT_NO_SIGNALS_SLOTS_KEYWORDS=1", "SIRE_ALWAYS_INLINE=inline", "SIRE_SKIP_INLINE_FUNCTIONS", "SIREN_SKIP_INLINE_FUNCTIONS", @@ -846,6 +855,7 @@ def fixMB(mb): define_symbols=[ "GCCXML_PARSE", "__PIC__", + "QT_NO_SIGNALS_SLOTS_KEYWORDS=1", "SIRE_USE_OPENMM", "SIRE_ALWAYS_INLINE=inline", "SIRE_SKIP_INLINE_FUNCTIONS", diff --git a/wrapper/Base/Array2D_double_.pypp.cpp b/wrapper/Base/Array2D_double_.pypp.cpp index e10715505..815c3e81f 100644 --- a/wrapper/Base/Array2D_double_.pypp.cpp +++ b/wrapper/Base/Array2D_double_.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::Array2D __copy__(const SireBase::Array2D &other){ return SireBase::Array2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -160,9 +162,9 @@ void register_Array2D_double__class(){ , "" ); } - Array2D_double__exposer.def( "__copy__", &__copy__); - Array2D_double__exposer.def( "__deepcopy__", &__copy__); - Array2D_double__exposer.def( "clone", &__copy__); + Array2D_double__exposer.def( "__copy__", &__copy__>); + Array2D_double__exposer.def( "__deepcopy__", &__copy__>); + Array2D_double__exposer.def( "clone", &__copy__>); Array2D_double__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::Array2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Array2D_double__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::Array2D >, diff --git a/wrapper/Base/BooleanProperty.pypp.cpp b/wrapper/Base/BooleanProperty.pypp.cpp index dae7b661e..5be45fac7 100644 --- a/wrapper/Base/BooleanProperty.pypp.cpp +++ b/wrapper/Base/BooleanProperty.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireBase::BooleanProperty __copy__(const SireBase::BooleanProperty &other){ return SireBase::BooleanProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -185,9 +187,9 @@ void register_BooleanProperty_class(){ } BooleanProperty_exposer.staticmethod( "typeName" ); - BooleanProperty_exposer.def( "__copy__", &__copy__); - BooleanProperty_exposer.def( "__deepcopy__", &__copy__); - BooleanProperty_exposer.def( "clone", &__copy__); + BooleanProperty_exposer.def( "__copy__", &__copy__); + BooleanProperty_exposer.def( "__deepcopy__", &__copy__); + BooleanProperty_exposer.def( "clone", &__copy__); BooleanProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::BooleanProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); BooleanProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::BooleanProperty >, diff --git a/wrapper/Base/CMakeAutogenFile.txt b/wrapper/Base/CMakeAutogenFile.txt index 5995b1747..b5db1bb86 100644 --- a/wrapper/Base/CMakeAutogenFile.txt +++ b/wrapper/Base/CMakeAutogenFile.txt @@ -43,6 +43,7 @@ set ( PYPP_SOURCES Properties.pypp.cpp PropertyList.pypp.cpp TrigArray2D_double_.pypp.cpp + PageCache.pypp.cpp PackedArray2D_StringArrayProperty.pypp.cpp VariantProperty.pypp.cpp ArrayProperty_QString_.pypp.cpp diff --git a/wrapper/Base/CPUID.pypp.cpp b/wrapper/Base/CPUID.pypp.cpp index ae7305af4..cf9c2394f 100644 --- a/wrapper/Base/CPUID.pypp.cpp +++ b/wrapper/Base/CPUID.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::CPUID __copy__(const SireBase::CPUID &other){ return SireBase::CPUID(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -193,9 +195,9 @@ void register_CPUID_class(){ } CPUID_exposer.staticmethod( "typeName" ); - CPUID_exposer.def( "__copy__", &__copy__); - CPUID_exposer.def( "__deepcopy__", &__copy__); - CPUID_exposer.def( "clone", &__copy__); + CPUID_exposer.def( "__copy__", &__copy__); + CPUID_exposer.def( "__deepcopy__", &__copy__); + CPUID_exposer.def( "clone", &__copy__); CPUID_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::CPUID >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CPUID_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::CPUID >, diff --git a/wrapper/Base/ChunkedVector_double_.pypp.cpp b/wrapper/Base/ChunkedVector_double_.pypp.cpp index 8d2c3b455..49d2d4a19 100644 --- a/wrapper/Base/ChunkedVector_double_.pypp.cpp +++ b/wrapper/Base/ChunkedVector_double_.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; SireBase::ChunkedVector __copy__(const SireBase::ChunkedVector &other){ return SireBase::ChunkedVector(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireBase::ChunkedVector&){ return "SireBase::ChunkedVector";} @@ -406,9 +408,9 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.staticmethod( "fromList" ); ChunkedVector_double__exposer.staticmethod( "fromStdVector" ); ChunkedVector_double__exposer.staticmethod( "fromVector" ); - ChunkedVector_double__exposer.def( "__copy__", &__copy__); - ChunkedVector_double__exposer.def( "__deepcopy__", &__copy__); - ChunkedVector_double__exposer.def( "clone", &__copy__); + ChunkedVector_double__exposer.def( "__copy__", &__copy__>); + ChunkedVector_double__exposer.def( "__deepcopy__", &__copy__>); + ChunkedVector_double__exposer.def( "clone", &__copy__>); ChunkedVector_double__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::ChunkedVector >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ChunkedVector_double__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::ChunkedVector >, diff --git a/wrapper/Base/DoubleArrayProperty.pypp.cpp b/wrapper/Base/DoubleArrayProperty.pypp.cpp index ceeb4e49c..657d3e012 100644 --- a/wrapper/Base/DoubleArrayProperty.pypp.cpp +++ b/wrapper/Base/DoubleArrayProperty.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; SireBase::DoubleArrayProperty __copy__(const SireBase::DoubleArrayProperty &other){ return SireBase::DoubleArrayProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -188,9 +190,9 @@ void register_DoubleArrayProperty_class(){ } DoubleArrayProperty_exposer.staticmethod( "typeName" ); - DoubleArrayProperty_exposer.def( "__copy__", &__copy__); - DoubleArrayProperty_exposer.def( "__deepcopy__", &__copy__); - DoubleArrayProperty_exposer.def( "clone", &__copy__); + DoubleArrayProperty_exposer.def( "__copy__", &__copy__); + DoubleArrayProperty_exposer.def( "__deepcopy__", &__copy__); + DoubleArrayProperty_exposer.def( "clone", &__copy__); DoubleArrayProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::DoubleArrayProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); DoubleArrayProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::DoubleArrayProperty >, diff --git a/wrapper/Base/FlopsMark.pypp.cpp b/wrapper/Base/FlopsMark.pypp.cpp index b1f0f7f49..77cf4223a 100644 --- a/wrapper/Base/FlopsMark.pypp.cpp +++ b/wrapper/Base/FlopsMark.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::FlopsMark __copy__(const SireBase::FlopsMark &other){ return SireBase::FlopsMark(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireBase::FlopsMark&){ return "SireBase::FlopsMark";} #include "Helpers/release_gil_policy.hpp" @@ -145,9 +147,9 @@ void register_FlopsMark_class(){ FlopsMark_exposer.staticmethod( "benchmarkProduct" ); FlopsMark_exposer.staticmethod( "benchmarkQuotient" ); FlopsMark_exposer.staticmethod( "benchmarkSum" ); - FlopsMark_exposer.def( "__copy__", &__copy__); - FlopsMark_exposer.def( "__deepcopy__", &__copy__); - FlopsMark_exposer.def( "clone", &__copy__); + FlopsMark_exposer.def( "__copy__", &__copy__); + FlopsMark_exposer.def( "__deepcopy__", &__copy__); + FlopsMark_exposer.def( "clone", &__copy__); FlopsMark_exposer.def( "__str__", &pvt_get_name); FlopsMark_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/Base/GeneralUnitArrayProperty.pypp.cpp b/wrapper/Base/GeneralUnitArrayProperty.pypp.cpp index d6f4612d5..7700949fc 100644 --- a/wrapper/Base/GeneralUnitArrayProperty.pypp.cpp +++ b/wrapper/Base/GeneralUnitArrayProperty.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireBase::GeneralUnitArrayProperty __copy__(const SireBase::GeneralUnitArrayProperty &other){ return SireBase::GeneralUnitArrayProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -90,9 +92,9 @@ void register_GeneralUnitArrayProperty_class(){ } GeneralUnitArrayProperty_exposer.staticmethod( "typeName" ); - GeneralUnitArrayProperty_exposer.def( "__copy__", &__copy__); - GeneralUnitArrayProperty_exposer.def( "__deepcopy__", &__copy__); - GeneralUnitArrayProperty_exposer.def( "clone", &__copy__); + GeneralUnitArrayProperty_exposer.def( "__copy__", &__copy__); + GeneralUnitArrayProperty_exposer.def( "__deepcopy__", &__copy__); + GeneralUnitArrayProperty_exposer.def( "clone", &__copy__); GeneralUnitArrayProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::GeneralUnitArrayProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GeneralUnitArrayProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::GeneralUnitArrayProperty >, diff --git a/wrapper/Base/GeneralUnitProperty.pypp.cpp b/wrapper/Base/GeneralUnitProperty.pypp.cpp index 7e3ea428c..a206d6475 100644 --- a/wrapper/Base/GeneralUnitProperty.pypp.cpp +++ b/wrapper/Base/GeneralUnitProperty.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireBase::GeneralUnitProperty __copy__(const SireBase::GeneralUnitProperty &other){ return SireBase::GeneralUnitProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -207,9 +209,9 @@ void register_GeneralUnitProperty_class(){ } GeneralUnitProperty_exposer.staticmethod( "typeName" ); - GeneralUnitProperty_exposer.def( "__copy__", &__copy__); - GeneralUnitProperty_exposer.def( "__deepcopy__", &__copy__); - GeneralUnitProperty_exposer.def( "clone", &__copy__); + GeneralUnitProperty_exposer.def( "__copy__", &__copy__); + GeneralUnitProperty_exposer.def( "__deepcopy__", &__copy__); + GeneralUnitProperty_exposer.def( "clone", &__copy__); GeneralUnitProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::GeneralUnitProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GeneralUnitProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::GeneralUnitProperty >, diff --git a/wrapper/Base/Incremint.pypp.cpp b/wrapper/Base/Incremint.pypp.cpp index 3a41f5b18..44cb1c1f6 100644 --- a/wrapper/Base/Incremint.pypp.cpp +++ b/wrapper/Base/Incremint.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::Incremint __copy__(const SireBase::Incremint &other){ return SireBase::Incremint(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireBase::Incremint&){ return "SireBase::Incremint";} #include "Helpers/release_gil_policy.hpp" @@ -36,9 +38,9 @@ void register_Incremint_class(){ , "" ); } - Incremint_exposer.def( "__copy__", &__copy__); - Incremint_exposer.def( "__deepcopy__", &__copy__); - Incremint_exposer.def( "clone", &__copy__); + Incremint_exposer.def( "__copy__", &__copy__); + Incremint_exposer.def( "__deepcopy__", &__copy__); + Incremint_exposer.def( "clone", &__copy__); Incremint_exposer.def( "__str__", &pvt_get_name); Incremint_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/Base/IntegerArrayProperty.pypp.cpp b/wrapper/Base/IntegerArrayProperty.pypp.cpp index 08ede1ee4..d9498df27 100644 --- a/wrapper/Base/IntegerArrayProperty.pypp.cpp +++ b/wrapper/Base/IntegerArrayProperty.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; SireBase::IntegerArrayProperty __copy__(const SireBase::IntegerArrayProperty &other){ return SireBase::IntegerArrayProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -188,9 +190,9 @@ void register_IntegerArrayProperty_class(){ } IntegerArrayProperty_exposer.staticmethod( "typeName" ); - IntegerArrayProperty_exposer.def( "__copy__", &__copy__); - IntegerArrayProperty_exposer.def( "__deepcopy__", &__copy__); - IntegerArrayProperty_exposer.def( "clone", &__copy__); + IntegerArrayProperty_exposer.def( "__copy__", &__copy__); + IntegerArrayProperty_exposer.def( "__deepcopy__", &__copy__); + IntegerArrayProperty_exposer.def( "clone", &__copy__); IntegerArrayProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::IntegerArrayProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntegerArrayProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::IntegerArrayProperty >, diff --git a/wrapper/Base/LazyEvaluator.pypp.cpp b/wrapper/Base/LazyEvaluator.pypp.cpp index c996070fc..f403f897b 100644 --- a/wrapper/Base/LazyEvaluator.pypp.cpp +++ b/wrapper/Base/LazyEvaluator.pypp.cpp @@ -25,6 +25,8 @@ namespace bp = boost::python; SireBase::LazyEvaluator __copy__(const SireBase::LazyEvaluator &other){ return SireBase::LazyEvaluator(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireBase::LazyEvaluator&){ return "SireBase::LazyEvaluator";} #include "Helpers/release_gil_policy.hpp" @@ -49,9 +51,9 @@ void register_LazyEvaluator_class(){ , "" ); } - LazyEvaluator_exposer.def( "__copy__", &__copy__); - LazyEvaluator_exposer.def( "__deepcopy__", &__copy__); - LazyEvaluator_exposer.def( "clone", &__copy__); + LazyEvaluator_exposer.def( "__copy__", &__copy__); + LazyEvaluator_exposer.def( "__deepcopy__", &__copy__); + LazyEvaluator_exposer.def( "clone", &__copy__); LazyEvaluator_exposer.def( "__str__", &pvt_get_name); LazyEvaluator_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/Base/LengthProperty.pypp.cpp b/wrapper/Base/LengthProperty.pypp.cpp index c44348ecc..824413b30 100644 --- a/wrapper/Base/LengthProperty.pypp.cpp +++ b/wrapper/Base/LengthProperty.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; SireBase::LengthProperty __copy__(const SireBase::LengthProperty &other){ return SireBase::LengthProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -90,9 +92,9 @@ void register_LengthProperty_class(){ } LengthProperty_exposer.staticmethod( "typeName" ); - LengthProperty_exposer.def( "__copy__", &__copy__); - LengthProperty_exposer.def( "__deepcopy__", &__copy__); - LengthProperty_exposer.def( "clone", &__copy__); + LengthProperty_exposer.def( "__copy__", &__copy__); + LengthProperty_exposer.def( "__deepcopy__", &__copy__); + LengthProperty_exposer.def( "clone", &__copy__); LengthProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::LengthProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LengthProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::LengthProperty >, diff --git a/wrapper/Base/LinkToProperty.pypp.cpp b/wrapper/Base/LinkToProperty.pypp.cpp index 829ab2f33..ff9411ac2 100644 --- a/wrapper/Base/LinkToProperty.pypp.cpp +++ b/wrapper/Base/LinkToProperty.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireBase::LinkToProperty __copy__(const SireBase::LinkToProperty &other){ return SireBase::LinkToProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -109,9 +111,9 @@ void register_LinkToProperty_class(){ } LinkToProperty_exposer.staticmethod( "typeName" ); - LinkToProperty_exposer.def( "__copy__", &__copy__); - LinkToProperty_exposer.def( "__deepcopy__", &__copy__); - LinkToProperty_exposer.def( "clone", &__copy__); + LinkToProperty_exposer.def( "__copy__", &__copy__); + LinkToProperty_exposer.def( "__deepcopy__", &__copy__); + LinkToProperty_exposer.def( "clone", &__copy__); LinkToProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::LinkToProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LinkToProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::LinkToProperty >, diff --git a/wrapper/Base/LowerCaseString.pypp.cpp b/wrapper/Base/LowerCaseString.pypp.cpp index 71774b421..e238109ac 100644 --- a/wrapper/Base/LowerCaseString.pypp.cpp +++ b/wrapper/Base/LowerCaseString.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::LowerCaseString __copy__(const SireBase::LowerCaseString &other){ return SireBase::LowerCaseString(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -73,9 +75,9 @@ void register_LowerCaseString_class(){ } LowerCaseString_exposer.staticmethod( "typeName" ); - LowerCaseString_exposer.def( "__copy__", &__copy__); - LowerCaseString_exposer.def( "__deepcopy__", &__copy__); - LowerCaseString_exposer.def( "clone", &__copy__); + LowerCaseString_exposer.def( "__copy__", &__copy__); + LowerCaseString_exposer.def( "__deepcopy__", &__copy__); + LowerCaseString_exposer.def( "clone", &__copy__); LowerCaseString_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::LowerCaseString >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LowerCaseString_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::LowerCaseString >, diff --git a/wrapper/Base/MajorMinorVersion.pypp.cpp b/wrapper/Base/MajorMinorVersion.pypp.cpp index f96f2dbbe..71181afa5 100644 --- a/wrapper/Base/MajorMinorVersion.pypp.cpp +++ b/wrapper/Base/MajorMinorVersion.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; SireBase::MajorMinorVersion __copy__(const SireBase::MajorMinorVersion &other){ return SireBase::MajorMinorVersion(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireBase::MajorMinorVersion&){ return "SireBase::MajorMinorVersion";} #include "Helpers/release_gil_policy.hpp" @@ -133,9 +135,9 @@ void register_MajorMinorVersion_class(){ } MajorMinorVersion_exposer.staticmethod( "typeName" ); - MajorMinorVersion_exposer.def( "__copy__", &__copy__); - MajorMinorVersion_exposer.def( "__deepcopy__", &__copy__); - MajorMinorVersion_exposer.def( "clone", &__copy__); + MajorMinorVersion_exposer.def( "__copy__", &__copy__); + MajorMinorVersion_exposer.def( "__deepcopy__", &__copy__); + MajorMinorVersion_exposer.def( "clone", &__copy__); MajorMinorVersion_exposer.def( "__str__", &pvt_get_name); MajorMinorVersion_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/Base/MemInfo.pypp.cpp b/wrapper/Base/MemInfo.pypp.cpp index 39e9e157b..cf2367d9c 100644 --- a/wrapper/Base/MemInfo.pypp.cpp +++ b/wrapper/Base/MemInfo.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; SireBase::MemInfo __copy__(const SireBase::MemInfo &other){ return SireBase::MemInfo(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -198,9 +200,9 @@ void register_MemInfo_class(){ MemInfo_exposer.staticmethod( "startMonitoring" ); MemInfo_exposer.staticmethod( "stopMonitoring" ); MemInfo_exposer.staticmethod( "takeMeasurement" ); - MemInfo_exposer.def( "__copy__", &__copy__); - MemInfo_exposer.def( "__deepcopy__", &__copy__); - MemInfo_exposer.def( "clone", &__copy__); + MemInfo_exposer.def( "__copy__", &__copy__); + MemInfo_exposer.def( "__deepcopy__", &__copy__); + MemInfo_exposer.def( "clone", &__copy__); MemInfo_exposer.def( "__str__", &__str__< ::SireBase::MemInfo > ); MemInfo_exposer.def( "__repr__", &__str__< ::SireBase::MemInfo > ); } diff --git a/wrapper/Base/NoMangling.pypp.cpp b/wrapper/Base/NoMangling.pypp.cpp index c11436412..484051fc0 100644 --- a/wrapper/Base/NoMangling.pypp.cpp +++ b/wrapper/Base/NoMangling.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::NoMangling __copy__(const SireBase::NoMangling &other){ return SireBase::NoMangling(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -73,9 +75,9 @@ void register_NoMangling_class(){ } NoMangling_exposer.staticmethod( "typeName" ); - NoMangling_exposer.def( "__copy__", &__copy__); - NoMangling_exposer.def( "__deepcopy__", &__copy__); - NoMangling_exposer.def( "clone", &__copy__); + NoMangling_exposer.def( "__copy__", &__copy__); + NoMangling_exposer.def( "__deepcopy__", &__copy__); + NoMangling_exposer.def( "clone", &__copy__); NoMangling_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::NoMangling >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); NoMangling_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::NoMangling >, diff --git a/wrapper/Base/NullProperty.pypp.cpp b/wrapper/Base/NullProperty.pypp.cpp index fac5fba3f..ec8be9085 100644 --- a/wrapper/Base/NullProperty.pypp.cpp +++ b/wrapper/Base/NullProperty.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; SireBase::NullProperty __copy__(const SireBase::NullProperty &other){ return SireBase::NullProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -67,9 +69,9 @@ void register_NullProperty_class(){ } NullProperty_exposer.staticmethod( "typeName" ); - NullProperty_exposer.def( "__copy__", &__copy__); - NullProperty_exposer.def( "__deepcopy__", &__copy__); - NullProperty_exposer.def( "clone", &__copy__); + NullProperty_exposer.def( "__copy__", &__copy__); + NullProperty_exposer.def( "__deepcopy__", &__copy__); + NullProperty_exposer.def( "clone", &__copy__); NullProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::NullProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); NullProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::NullProperty >, diff --git a/wrapper/Base/NumberProperty.pypp.cpp b/wrapper/Base/NumberProperty.pypp.cpp index 9751807fd..f5bfbcbaa 100644 --- a/wrapper/Base/NumberProperty.pypp.cpp +++ b/wrapper/Base/NumberProperty.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; SireBase::NumberProperty __copy__(const SireBase::NumberProperty &other){ return SireBase::NumberProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -212,9 +214,9 @@ void register_NumberProperty_class(){ } NumberProperty_exposer.staticmethod( "typeName" ); - NumberProperty_exposer.def( "__copy__", &__copy__); - NumberProperty_exposer.def( "__deepcopy__", &__copy__); - NumberProperty_exposer.def( "clone", &__copy__); + NumberProperty_exposer.def( "__copy__", &__copy__); + NumberProperty_exposer.def( "__deepcopy__", &__copy__); + NumberProperty_exposer.def( "clone", &__copy__); NumberProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::NumberProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); NumberProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::NumberProperty >, diff --git a/wrapper/Base/PackedArray2D_DoubleArrayProperty.pypp.cpp b/wrapper/Base/PackedArray2D_DoubleArrayProperty.pypp.cpp index 00d1a7088..250aa3c27 100644 --- a/wrapper/Base/PackedArray2D_DoubleArrayProperty.pypp.cpp +++ b/wrapper/Base/PackedArray2D_DoubleArrayProperty.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other){ return SireBase::PackedArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -404,9 +406,9 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ } PackedArray2D_DoubleArrayProperty_exposer.staticmethod( "fromVariant" ); - PackedArray2D_DoubleArrayProperty_exposer.def( "__copy__", &__copy__); - PackedArray2D_DoubleArrayProperty_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_DoubleArrayProperty_exposer.def( "clone", &__copy__); + PackedArray2D_DoubleArrayProperty_exposer.def( "__copy__", &__copy__>); + PackedArray2D_DoubleArrayProperty_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_DoubleArrayProperty_exposer.def( "clone", &__copy__>); PackedArray2D_DoubleArrayProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PackedArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_DoubleArrayProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PackedArray2D >, diff --git a/wrapper/Base/PackedArray2D_DoubleArrayProperty_Array.pypp.cpp b/wrapper/Base/PackedArray2D_DoubleArrayProperty_Array.pypp.cpp index 870fa1bd9..405edef2a 100644 --- a/wrapper/Base/PackedArray2D_DoubleArrayProperty_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_DoubleArrayProperty_Array.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::PackedArray2D_Array &other){ return SireBase::detail::PackedArray2D_Array(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -195,9 +197,9 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ , "" ); } - PackedArray2D_DoubleArrayProperty_Array_exposer.def( "__copy__", &__copy__); - PackedArray2D_DoubleArrayProperty_Array_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_DoubleArrayProperty_Array_exposer.def( "clone", &__copy__); + PackedArray2D_DoubleArrayProperty_Array_exposer.def( "__copy__", &__copy__>); + PackedArray2D_DoubleArrayProperty_Array_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_DoubleArrayProperty_Array_exposer.def( "clone", &__copy__>); PackedArray2D_DoubleArrayProperty_Array_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_DoubleArrayProperty_Array_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, diff --git a/wrapper/Base/PackedArray2D_IntegerArrayProperty.pypp.cpp b/wrapper/Base/PackedArray2D_IntegerArrayProperty.pypp.cpp index d6e32d410..17f7bfc76 100644 --- a/wrapper/Base/PackedArray2D_IntegerArrayProperty.pypp.cpp +++ b/wrapper/Base/PackedArray2D_IntegerArrayProperty.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other){ return SireBase::PackedArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -404,9 +406,9 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ } PackedArray2D_IntegerArrayProperty_exposer.staticmethod( "fromVariant" ); - PackedArray2D_IntegerArrayProperty_exposer.def( "__copy__", &__copy__); - PackedArray2D_IntegerArrayProperty_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_IntegerArrayProperty_exposer.def( "clone", &__copy__); + PackedArray2D_IntegerArrayProperty_exposer.def( "__copy__", &__copy__>); + PackedArray2D_IntegerArrayProperty_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_IntegerArrayProperty_exposer.def( "clone", &__copy__>); PackedArray2D_IntegerArrayProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PackedArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_IntegerArrayProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PackedArray2D >, diff --git a/wrapper/Base/PackedArray2D_IntegerArrayProperty_Array.pypp.cpp b/wrapper/Base/PackedArray2D_IntegerArrayProperty_Array.pypp.cpp index d753b9392..b43e39efc 100644 --- a/wrapper/Base/PackedArray2D_IntegerArrayProperty_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_IntegerArrayProperty_Array.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::PackedArray2D_Array &other){ return SireBase::detail::PackedArray2D_Array(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -195,9 +197,9 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ , "" ); } - PackedArray2D_IntegerArrayProperty_Array_exposer.def( "__copy__", &__copy__); - PackedArray2D_IntegerArrayProperty_Array_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_IntegerArrayProperty_Array_exposer.def( "clone", &__copy__); + PackedArray2D_IntegerArrayProperty_Array_exposer.def( "__copy__", &__copy__>); + PackedArray2D_IntegerArrayProperty_Array_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_IntegerArrayProperty_Array_exposer.def( "clone", &__copy__>); PackedArray2D_IntegerArrayProperty_Array_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_IntegerArrayProperty_Array_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, diff --git a/wrapper/Base/PackedArray2D_PropertyList.pypp.cpp b/wrapper/Base/PackedArray2D_PropertyList.pypp.cpp index 808c7f9ad..69c71830e 100644 --- a/wrapper/Base/PackedArray2D_PropertyList.pypp.cpp +++ b/wrapper/Base/PackedArray2D_PropertyList.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other){ return SireBase::PackedArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -404,9 +406,9 @@ void register_PackedArray2D_PropertyList_class(){ } PackedArray2D_PropertyList_exposer.staticmethod( "fromVariant" ); - PackedArray2D_PropertyList_exposer.def( "__copy__", &__copy__); - PackedArray2D_PropertyList_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_PropertyList_exposer.def( "clone", &__copy__); + PackedArray2D_PropertyList_exposer.def( "__copy__", &__copy__>); + PackedArray2D_PropertyList_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_PropertyList_exposer.def( "clone", &__copy__>); PackedArray2D_PropertyList_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PackedArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_PropertyList_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PackedArray2D >, diff --git a/wrapper/Base/PackedArray2D_PropertyList_Array.pypp.cpp b/wrapper/Base/PackedArray2D_PropertyList_Array.pypp.cpp index c6452d940..deca13123 100644 --- a/wrapper/Base/PackedArray2D_PropertyList_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_PropertyList_Array.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::PackedArray2D_Array &other){ return SireBase::detail::PackedArray2D_Array(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -195,9 +197,9 @@ void register_PackedArray2D_PropertyList_Array_class(){ , "" ); } - PackedArray2D_PropertyList_Array_exposer.def( "__copy__", &__copy__); - PackedArray2D_PropertyList_Array_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_PropertyList_Array_exposer.def( "clone", &__copy__); + PackedArray2D_PropertyList_Array_exposer.def( "__copy__", &__copy__>); + PackedArray2D_PropertyList_Array_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_PropertyList_Array_exposer.def( "clone", &__copy__>); PackedArray2D_PropertyList_Array_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_PropertyList_Array_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, diff --git a/wrapper/Base/PackedArray2D_QString_.pypp.cpp b/wrapper/Base/PackedArray2D_QString_.pypp.cpp index 4db442d00..4eac81d99 100644 --- a/wrapper/Base/PackedArray2D_QString_.pypp.cpp +++ b/wrapper/Base/PackedArray2D_QString_.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other){ return SireBase::PackedArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -404,9 +406,9 @@ void register_PackedArray2D_QString__class(){ } PackedArray2D_QString__exposer.staticmethod( "fromVariant" ); - PackedArray2D_QString__exposer.def( "__copy__", &__copy__); - PackedArray2D_QString__exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_QString__exposer.def( "clone", &__copy__); + PackedArray2D_QString__exposer.def( "__copy__", &__copy__>); + PackedArray2D_QString__exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_QString__exposer.def( "clone", &__copy__>); PackedArray2D_QString__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PackedArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_QString__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PackedArray2D >, diff --git a/wrapper/Base/PackedArray2D_QString_Array.pypp.cpp b/wrapper/Base/PackedArray2D_QString_Array.pypp.cpp index de4e13e51..10954b208 100644 --- a/wrapper/Base/PackedArray2D_QString_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_QString_Array.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::PackedArray2D_Array &other){ return SireBase::detail::PackedArray2D_Array(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -195,9 +197,9 @@ void register_PackedArray2D_QString_Array_class(){ , "" ); } - PackedArray2D_QString_Array_exposer.def( "__copy__", &__copy__); - PackedArray2D_QString_Array_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_QString_Array_exposer.def( "clone", &__copy__); + PackedArray2D_QString_Array_exposer.def( "__copy__", &__copy__>); + PackedArray2D_QString_Array_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_QString_Array_exposer.def( "clone", &__copy__>); PackedArray2D_QString_Array_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_QString_Array_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, diff --git a/wrapper/Base/PackedArray2D_QVariant_.pypp.cpp b/wrapper/Base/PackedArray2D_QVariant_.pypp.cpp index cfec2202f..379cc8682 100644 --- a/wrapper/Base/PackedArray2D_QVariant_.pypp.cpp +++ b/wrapper/Base/PackedArray2D_QVariant_.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other){ return SireBase::PackedArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -404,9 +406,9 @@ void register_PackedArray2D_QVariant__class(){ } PackedArray2D_QVariant__exposer.staticmethod( "fromVariant" ); - PackedArray2D_QVariant__exposer.def( "__copy__", &__copy__); - PackedArray2D_QVariant__exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_QVariant__exposer.def( "clone", &__copy__); + PackedArray2D_QVariant__exposer.def( "__copy__", &__copy__>); + PackedArray2D_QVariant__exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_QVariant__exposer.def( "clone", &__copy__>); PackedArray2D_QVariant__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PackedArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_QVariant__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PackedArray2D >, diff --git a/wrapper/Base/PackedArray2D_QVariant_Array.pypp.cpp b/wrapper/Base/PackedArray2D_QVariant_Array.pypp.cpp index de93160a3..5733a667b 100644 --- a/wrapper/Base/PackedArray2D_QVariant_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_QVariant_Array.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::PackedArray2D_Array &other){ return SireBase::detail::PackedArray2D_Array(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -195,9 +197,9 @@ void register_PackedArray2D_QVariant_Array_class(){ , "" ); } - PackedArray2D_QVariant_Array_exposer.def( "__copy__", &__copy__); - PackedArray2D_QVariant_Array_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_QVariant_Array_exposer.def( "clone", &__copy__); + PackedArray2D_QVariant_Array_exposer.def( "__copy__", &__copy__>); + PackedArray2D_QVariant_Array_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_QVariant_Array_exposer.def( "clone", &__copy__>); PackedArray2D_QVariant_Array_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_QVariant_Array_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, diff --git a/wrapper/Base/PackedArray2D_StringArrayProperty.pypp.cpp b/wrapper/Base/PackedArray2D_StringArrayProperty.pypp.cpp index ae1938e64..2f98adc73 100644 --- a/wrapper/Base/PackedArray2D_StringArrayProperty.pypp.cpp +++ b/wrapper/Base/PackedArray2D_StringArrayProperty.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other){ return SireBase::PackedArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -404,9 +406,9 @@ void register_PackedArray2D_StringArrayProperty_class(){ } PackedArray2D_StringArrayProperty_exposer.staticmethod( "fromVariant" ); - PackedArray2D_StringArrayProperty_exposer.def( "__copy__", &__copy__); - PackedArray2D_StringArrayProperty_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_StringArrayProperty_exposer.def( "clone", &__copy__); + PackedArray2D_StringArrayProperty_exposer.def( "__copy__", &__copy__>); + PackedArray2D_StringArrayProperty_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_StringArrayProperty_exposer.def( "clone", &__copy__>); PackedArray2D_StringArrayProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PackedArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_StringArrayProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PackedArray2D >, diff --git a/wrapper/Base/PackedArray2D_StringArrayProperty_Array.pypp.cpp b/wrapper/Base/PackedArray2D_StringArrayProperty_Array.pypp.cpp index 44279eb36..97a91e95a 100644 --- a/wrapper/Base/PackedArray2D_StringArrayProperty_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_StringArrayProperty_Array.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::PackedArray2D_Array &other){ return SireBase::detail::PackedArray2D_Array(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -195,9 +197,9 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ , "" ); } - PackedArray2D_StringArrayProperty_Array_exposer.def( "__copy__", &__copy__); - PackedArray2D_StringArrayProperty_Array_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_StringArrayProperty_Array_exposer.def( "clone", &__copy__); + PackedArray2D_StringArrayProperty_Array_exposer.def( "__copy__", &__copy__>); + PackedArray2D_StringArrayProperty_Array_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_StringArrayProperty_Array_exposer.def( "clone", &__copy__>); PackedArray2D_StringArrayProperty_Array_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_StringArrayProperty_Array_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, diff --git a/wrapper/Base/PackedArray2D_double_.pypp.cpp b/wrapper/Base/PackedArray2D_double_.pypp.cpp index 6f397c986..01013b220 100644 --- a/wrapper/Base/PackedArray2D_double_.pypp.cpp +++ b/wrapper/Base/PackedArray2D_double_.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other){ return SireBase::PackedArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -404,9 +406,9 @@ void register_PackedArray2D_double__class(){ } PackedArray2D_double__exposer.staticmethod( "fromVariant" ); - PackedArray2D_double__exposer.def( "__copy__", &__copy__); - PackedArray2D_double__exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_double__exposer.def( "clone", &__copy__); + PackedArray2D_double__exposer.def( "__copy__", &__copy__>); + PackedArray2D_double__exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_double__exposer.def( "clone", &__copy__>); PackedArray2D_double__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PackedArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_double__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PackedArray2D >, diff --git a/wrapper/Base/PackedArray2D_double_Array.pypp.cpp b/wrapper/Base/PackedArray2D_double_Array.pypp.cpp index 3046beafc..b2e3655fe 100644 --- a/wrapper/Base/PackedArray2D_double_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_double_Array.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::PackedArray2D_Array &other){ return SireBase::detail::PackedArray2D_Array(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -195,9 +197,9 @@ void register_PackedArray2D_double_Array_class(){ , "" ); } - PackedArray2D_double_Array_exposer.def( "__copy__", &__copy__); - PackedArray2D_double_Array_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_double_Array_exposer.def( "clone", &__copy__); + PackedArray2D_double_Array_exposer.def( "__copy__", &__copy__>); + PackedArray2D_double_Array_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_double_Array_exposer.def( "clone", &__copy__>); PackedArray2D_double_Array_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_double_Array_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, diff --git a/wrapper/Base/PackedArray2D_int_.pypp.cpp b/wrapper/Base/PackedArray2D_int_.pypp.cpp index 68d277be8..1a697ebbc 100644 --- a/wrapper/Base/PackedArray2D_int_.pypp.cpp +++ b/wrapper/Base/PackedArray2D_int_.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other){ return SireBase::PackedArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -404,9 +406,9 @@ void register_PackedArray2D_int__class(){ } PackedArray2D_int__exposer.staticmethod( "fromVariant" ); - PackedArray2D_int__exposer.def( "__copy__", &__copy__); - PackedArray2D_int__exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_int__exposer.def( "clone", &__copy__); + PackedArray2D_int__exposer.def( "__copy__", &__copy__>); + PackedArray2D_int__exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_int__exposer.def( "clone", &__copy__>); PackedArray2D_int__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PackedArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_int__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PackedArray2D >, diff --git a/wrapper/Base/PackedArray2D_int_Array.pypp.cpp b/wrapper/Base/PackedArray2D_int_Array.pypp.cpp index 43a432bb2..5f2f3d26b 100644 --- a/wrapper/Base/PackedArray2D_int_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_int_Array.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::PackedArray2D_Array &other){ return SireBase::detail::PackedArray2D_Array(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -195,9 +197,9 @@ void register_PackedArray2D_int_Array_class(){ , "" ); } - PackedArray2D_int_Array_exposer.def( "__copy__", &__copy__); - PackedArray2D_int_Array_exposer.def( "__deepcopy__", &__copy__); - PackedArray2D_int_Array_exposer.def( "clone", &__copy__); + PackedArray2D_int_Array_exposer.def( "__copy__", &__copy__>); + PackedArray2D_int_Array_exposer.def( "__deepcopy__", &__copy__>); + PackedArray2D_int_Array_exposer.def( "clone", &__copy__>); PackedArray2D_int_Array_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PackedArray2D_int_Array_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::detail::PackedArray2D_Array >, diff --git a/wrapper/Base/PageCache.pypp.cpp b/wrapper/Base/PageCache.pypp.cpp new file mode 100644 index 000000000..eba18819a --- /dev/null +++ b/wrapper/Base/PageCache.pypp.cpp @@ -0,0 +1,752 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 3 License + +#include "boost/python.hpp" +#include "PageCache.pypp.hpp" + +namespace bp = boost::python; + +#include "SireBase/atexit.h" + +#include "SireBase/console.h" + +#include "SireBase/parallel.h" + +#include "SireError/errors.h" + +#include "pagecache.h" + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include "pagecache.h" + +SireBase::PageCache __copy__(const SireBase::PageCache &other){ return SireBase::PageCache(other); } + +#include "Helpers/copy.hpp" + +const char* pvt_get_name(const SireBase::PageCache&){ return "SireBase::PageCache";} + +#include "Helpers/release_gil_policy.hpp" + +#include "SireBase/atexit.h" + +#include "SireBase/console.h" + +#include "SireBase/parallel.h" + +#include "SireError/errors.h" + +#include "pagecache.h" + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include "pagecache.h" + +SireBase::PageCache::Handle __copy__(const SireBase::PageCache::Handle &other){ return SireBase::PageCache::Handle(other); } + +#include "Helpers/copy.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +#include "SireBase/atexit.h" + +#include "SireBase/console.h" + +#include "SireBase/parallel.h" + +#include "SireError/errors.h" + +#include "pagecache.h" + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include + +#include "pagecache.h" + +SireBase::PageCache::Page __copy__(const SireBase::PageCache::Page &other){ return SireBase::PageCache::Page(other); } + +#include "Helpers/copy.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_PageCache_class(){ + + { //::SireBase::PageCache + typedef bp::class_< SireBase::PageCache > PageCache_exposer_t; + PageCache_exposer_t PageCache_exposer = PageCache_exposer_t( "PageCache", "This class manages a swap cache of binary data that can be\npaged to and from disk. The cache can receive binary data\nof any size, and will automatically manage the paging of\nthat data to and from disk as it is accessed.\n\nYou can create different caches, and have control over the maximum\nsize of each cache page.\n\nNote that deleting the cache will delete all data contained\ntherein - including data paged to disk\n", bp::init< >("Construct a new page cache with the default\n recomended maximum page size") ); + bp::scope PageCache_scope( PageCache_exposer ); + { //::SireBase::PageCache::Handle + typedef bp::class_< SireBase::PageCache::Handle > Handle_exposer_t; + Handle_exposer_t Handle_exposer = Handle_exposer_t( "Handle", "This is a handle to a piece of data that has\nbeen added to the cache. This will either contain\nthe actual data, or will hold the information\nnecessary to retrieve that data from disk.\n\nData is removed from the cache when all handles\nto it are deleted\n", bp::init< >("Construct an empty handle") ); + bp::scope Handle_scope( Handle_exposer ); + Handle_exposer.def( bp::init< std::shared_ptr< SireBase::detail::HandleData > >(( bp::arg("data") ), "Construct a handle from the passed data") ); + Handle_exposer.def( bp::init< SireBase::PageCache::Handle const & >(( bp::arg("other") ), "Copy constructor") ); + { //::SireBase::PageCache::Handle::assertValid + + typedef void ( ::SireBase::PageCache::Handle::*assertValid_function_type)( ) const; + assertValid_function_type assertValid_function_value( &::SireBase::PageCache::Handle::assertValid ); + + Handle_exposer.def( + "assertValid" + , assertValid_function_value + , bp::release_gil_policy() + , "Assert that this object is valid" ); + + } + { //::SireBase::PageCache::Handle::clear + + typedef void ( ::SireBase::PageCache::Handle::*clear_function_type)( ) ; + clear_function_type clear_function_value( &::SireBase::PageCache::Handle::clear ); + + Handle_exposer.def( + "clear" + , clear_function_value + , bp::release_gil_policy() + , "Clear the data from this handle" ); + + } + { //::SireBase::PageCache::Handle::fetch + + typedef ::QByteArray ( ::SireBase::PageCache::Handle::*fetch_function_type)( ) const; + fetch_function_type fetch_function_value( &::SireBase::PageCache::Handle::fetch ); + + Handle_exposer.def( + "fetch" + , fetch_function_value + , bp::release_gil_policy() + , "Return the data held in this handle" ); + + } + { //::SireBase::PageCache::Handle::isNull + + typedef bool ( ::SireBase::PageCache::Handle::*isNull_function_type)( ) const; + isNull_function_type isNull_function_value( &::SireBase::PageCache::Handle::isNull ); + + Handle_exposer.def( + "isNull" + , isNull_function_value + , bp::release_gil_policy() + , "Return whether this handle is null (does not hold data)" ); + + } + { //::SireBase::PageCache::Handle::isValid + + typedef bool ( ::SireBase::PageCache::Handle::*isValid_function_type)( ) const; + isValid_function_type isValid_function_value( &::SireBase::PageCache::Handle::isValid ); + + Handle_exposer.def( + "isValid" + , isValid_function_value + , bp::release_gil_policy() + , "Return whether this handle is valid (holds data)" ); + + } + { //::SireBase::PageCache::Handle::nBytes + + typedef unsigned int ( ::SireBase::PageCache::Handle::*nBytes_function_type)( ) const; + nBytes_function_type nBytes_function_value( &::SireBase::PageCache::Handle::nBytes ); + + Handle_exposer.def( + "nBytes" + , nBytes_function_value + , bp::release_gil_policy() + , "Return the number of bytes in this handle" ); + + } + { //::SireBase::PageCache::Handle::operator= + + typedef ::SireBase::PageCache::Handle & ( ::SireBase::PageCache::Handle::*assign_function_type)( ::SireBase::PageCache::Handle const & ) ; + assign_function_type assign_function_value( &::SireBase::PageCache::Handle::operator= ); + + Handle_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + { //::SireBase::PageCache::Handle::page + + typedef ::SireBase::PageCache::Page ( ::SireBase::PageCache::Handle::*page_function_type)( ) const; + page_function_type page_function_value( &::SireBase::PageCache::Handle::page ); + + Handle_exposer.def( + "page" + , page_function_value + , bp::release_gil_policy() + , "Return the page on which the data for this handle is placed.\n This will be null if the data has not yet been put on a page\n" ); + + } + { //::SireBase::PageCache::Handle::parent + + typedef ::SireBase::PageCache ( ::SireBase::PageCache::Handle::*parent_function_type)( ) const; + parent_function_type parent_function_value( &::SireBase::PageCache::Handle::parent ); + + Handle_exposer.def( + "parent" + , parent_function_value + , bp::release_gil_policy() + , "Return the parent cache for this handle" ); + + } + { //::SireBase::PageCache::Handle::reset + + typedef void ( ::SireBase::PageCache::Handle::*reset_function_type)( ) ; + reset_function_type reset_function_value( &::SireBase::PageCache::Handle::reset ); + + Handle_exposer.def( + "reset" + , reset_function_value + , bp::release_gil_policy() + , "Clear the data in this handle" ); + + } + { //::SireBase::PageCache::Handle::size + + typedef unsigned int ( ::SireBase::PageCache::Handle::*size_function_type)( ) const; + size_function_type size_function_value( &::SireBase::PageCache::Handle::size ); + + Handle_exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "Return the number of bytes in this handle" ); + + } + { //::SireBase::PageCache::Handle::toString + + typedef ::QString ( ::SireBase::PageCache::Handle::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireBase::PageCache::Handle::toString ); + + Handle_exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "Return a string representation of this object" ); + + } + { //::SireBase::PageCache::Handle::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireBase::PageCache::Handle::typeName ); + + Handle_exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "Return the type name for this object" ); + + } + { //::SireBase::PageCache::Handle::what + + typedef char const * ( ::SireBase::PageCache::Handle::*what_function_type)( ) const; + what_function_type what_function_value( &::SireBase::PageCache::Handle::what ); + + Handle_exposer.def( + "what" + , what_function_value + , bp::release_gil_policy() + , "Return the type name for this object" ); + + } + Handle_exposer.staticmethod( "typeName" ); + Handle_exposer.def( "__copy__", &__copy__); + Handle_exposer.def( "__deepcopy__", &__copy__); + Handle_exposer.def( "clone", &__copy__); + Handle_exposer.def( "__str__", &__str__< ::SireBase::PageCache::Handle > ); + Handle_exposer.def( "__repr__", &__str__< ::SireBase::PageCache::Handle > ); + Handle_exposer.def( "__len__", &__len_size< ::SireBase::PageCache::Handle > ); + } + { //::SireBase::PageCache::Page + typedef bp::class_< SireBase::PageCache::Page > Page_exposer_t; + Page_exposer_t Page_exposer = Page_exposer_t( "Page", "This is a page in the cache. This can hold multiple\nobjects - the whole page is either resident in memory\nor cached to disk.\n", bp::init< >("Construct an empty page") ); + bp::scope Page_scope( Page_exposer ); + Page_exposer.def( bp::init< std::shared_ptr< SireBase::detail::PageData > >(( bp::arg("data") ), "Construct a page from the passed data") ); + Page_exposer.def( bp::init< SireBase::PageCache::Page const & >(( bp::arg("other") ), "Copy constructor") ); + { //::SireBase::PageCache::Page::assertValid + + typedef void ( ::SireBase::PageCache::Page::*assertValid_function_type)( ) const; + assertValid_function_type assertValid_function_value( &::SireBase::PageCache::Page::assertValid ); + + Page_exposer.def( + "assertValid" + , assertValid_function_value + , bp::release_gil_policy() + , "Assert that this object is valid" ); + + } + { //::SireBase::PageCache::Page::isCached + + typedef bool ( ::SireBase::PageCache::Page::*isCached_function_type)( ) const; + isCached_function_type isCached_function_value( &::SireBase::PageCache::Page::isCached ); + + Page_exposer.def( + "isCached" + , isCached_function_value + , bp::release_gil_policy() + , "Return whether this page is cached to disk" ); + + } + { //::SireBase::PageCache::Page::isNull + + typedef bool ( ::SireBase::PageCache::Page::*isNull_function_type)( ) const; + isNull_function_type isNull_function_value( &::SireBase::PageCache::Page::isNull ); + + Page_exposer.def( + "isNull" + , isNull_function_value + , bp::release_gil_policy() + , "Return whether this page is null (has no size)" ); + + } + { //::SireBase::PageCache::Page::isResident + + typedef bool ( ::SireBase::PageCache::Page::*isResident_function_type)( ) const; + isResident_function_type isResident_function_value( &::SireBase::PageCache::Page::isResident ); + + Page_exposer.def( + "isResident" + , isResident_function_value + , bp::release_gil_policy() + , "Return whether this page is resident in memory" ); + + } + { //::SireBase::PageCache::Page::isValid + + typedef bool ( ::SireBase::PageCache::Page::*isValid_function_type)( ) const; + isValid_function_type isValid_function_value( &::SireBase::PageCache::Page::isValid ); + + Page_exposer.def( + "isValid" + , isValid_function_value + , bp::release_gil_policy() + , "Return whether this page is valid (has some size)" ); + + } + { //::SireBase::PageCache::Page::maxBytes + + typedef unsigned int ( ::SireBase::PageCache::Page::*maxBytes_function_type)( ) const; + maxBytes_function_type maxBytes_function_value( &::SireBase::PageCache::Page::maxBytes ); + + Page_exposer.def( + "maxBytes" + , maxBytes_function_value + , bp::release_gil_policy() + , "Return the maximum number of bytes that can be stored in this page" ); + + } + { //::SireBase::PageCache::Page::nBytes + + typedef unsigned int ( ::SireBase::PageCache::Page::*nBytes_function_type)( ) const; + nBytes_function_type nBytes_function_value( &::SireBase::PageCache::Page::nBytes ); + + Page_exposer.def( + "nBytes" + , nBytes_function_value + , bp::release_gil_policy() + , "Return the number of bytes in this page" ); + + } + { //::SireBase::PageCache::Page::operator= + + typedef ::SireBase::PageCache::Page & ( ::SireBase::PageCache::Page::*assign_function_type)( ::SireBase::PageCache::Page const & ) ; + assign_function_type assign_function_value( &::SireBase::PageCache::Page::operator= ); + + Page_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + { //::SireBase::PageCache::Page::parent + + typedef ::SireBase::PageCache ( ::SireBase::PageCache::Page::*parent_function_type)( ) const; + parent_function_type parent_function_value( &::SireBase::PageCache::Page::parent ); + + Page_exposer.def( + "parent" + , parent_function_value + , bp::release_gil_policy() + , "Return the parent cache for this page" ); + + } + { //::SireBase::PageCache::Page::size + + typedef unsigned int ( ::SireBase::PageCache::Page::*size_function_type)( ) const; + size_function_type size_function_value( &::SireBase::PageCache::Page::size ); + + Page_exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "Return the number of bytes in this page" ); + + } + { //::SireBase::PageCache::Page::toString + + typedef ::QString ( ::SireBase::PageCache::Page::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireBase::PageCache::Page::toString ); + + Page_exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "Return a string representation of this object" ); + + } + { //::SireBase::PageCache::Page::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireBase::PageCache::Page::typeName ); + + Page_exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "Return the type name for this object" ); + + } + { //::SireBase::PageCache::Page::what + + typedef char const * ( ::SireBase::PageCache::Page::*what_function_type)( ) const; + what_function_type what_function_value( &::SireBase::PageCache::Page::what ); + + Page_exposer.def( + "what" + , what_function_value + , bp::release_gil_policy() + , "Return the type name for this object" ); + + } + Page_exposer.staticmethod( "typeName" ); + Page_exposer.def( "__copy__", &__copy__); + Page_exposer.def( "__deepcopy__", &__copy__); + Page_exposer.def( "clone", &__copy__); + Page_exposer.def( "__str__", &__str__< ::SireBase::PageCache::Page > ); + Page_exposer.def( "__repr__", &__str__< ::SireBase::PageCache::Page > ); + Page_exposer.def( "__len__", &__len_size< ::SireBase::PageCache::Page > ); + } + PageCache_exposer.def( bp::init< QString const & >(( bp::arg("cache_dir") ), "Construct a new page cache with specified cache directory\nand recomended maximum page size") ); + PageCache_exposer.def( bp::init< unsigned int >(( bp::arg("max_page_size") ), "Construct a new page cache with the specified\nrecomended maximum page size") ); + PageCache_exposer.def( bp::init< QString const &, unsigned int >(( bp::arg("cache_dir"), bp::arg("max_page_size") ), "Construct a new page cache with the specified\nrecomended maximum page size and cache directory\ntemplate (using QTemporaryDir format)") ); + PageCache_exposer.def( bp::init< std::shared_ptr< SireBase::detail::CacheData > >(( bp::arg("data") ), "Internal constructor used to construct from a CacheData") ); + PageCache_exposer.def( bp::init< SireBase::PageCache const & >(( bp::arg("other") ), "Copy constructor") ); + { //::SireBase::PageCache::assertValid + + typedef void ( ::SireBase::PageCache::*assertValid_function_type)( ) const; + assertValid_function_type assertValid_function_value( &::SireBase::PageCache::assertValid ); + + PageCache_exposer.def( + "assertValid" + , assertValid_function_value + , bp::release_gil_policy() + , "Assert that this object is valid" ); + + } + { //::SireBase::PageCache::cacheDir + + typedef ::QString ( ::SireBase::PageCache::*cacheDir_function_type)( ) const; + cacheDir_function_type cacheDir_function_value( &::SireBase::PageCache::cacheDir ); + + PageCache_exposer.def( + "cacheDir" + , cacheDir_function_value + , bp::release_gil_policy() + , "Return the cache directory for this cache" ); + + } + { //::SireBase::PageCache::getStatistics + + typedef ::QString ( *getStatistics_function_type )( ); + getStatistics_function_type getStatistics_function_value( &::SireBase::PageCache::getStatistics ); + + PageCache_exposer.def( + "getStatistics" + , getStatistics_function_value + , bp::release_gil_policy() + , "Return the statistics for all caches" ); + + } + { //::SireBase::PageCache::isNull + + typedef bool ( ::SireBase::PageCache::*isNull_function_type)( ) const; + isNull_function_type isNull_function_value( &::SireBase::PageCache::isNull ); + + PageCache_exposer.def( + "isNull" + , isNull_function_value + , bp::release_gil_policy() + , "Return whether or not this cache is null" ); + + } + { //::SireBase::PageCache::isValid + + typedef bool ( ::SireBase::PageCache::*isValid_function_type)( ) const; + isValid_function_type isValid_function_value( &::SireBase::PageCache::isValid ); + + PageCache_exposer.def( + "isValid" + , isValid_function_value + , bp::release_gil_policy() + , "Return whether or not this cache is valid" ); + + } + { //::SireBase::PageCache::maxPageSize + + typedef unsigned int ( *maxPageSize_function_type )( ); + maxPageSize_function_type maxPageSize_function_value( &::SireBase::PageCache::maxPageSize ); + + PageCache_exposer.def( + "maxPageSize" + , maxPageSize_function_value + , bp::release_gil_policy() + , "Return the current recommend maximum page size" ); + + } + { //::SireBase::PageCache::maxResidentPages + + typedef unsigned int ( *maxResidentPages_function_type )( ); + maxResidentPages_function_type maxResidentPages_function_value( &::SireBase::PageCache::maxResidentPages ); + + PageCache_exposer.def( + "maxResidentPages" + , maxResidentPages_function_value + , bp::release_gil_policy() + , "Return the maximum number of resident pages per cache" ); + + } + { //::SireBase::PageCache::nBytes + + typedef unsigned int ( ::SireBase::PageCache::*nBytes_function_type)( ) const; + nBytes_function_type nBytes_function_value( &::SireBase::PageCache::nBytes ); + + PageCache_exposer.def( + "nBytes" + , nBytes_function_value + , bp::release_gil_policy() + , "Return the number of bytes saved in this cache" ); + + } + { //::SireBase::PageCache::nPages + + typedef unsigned int ( ::SireBase::PageCache::*nPages_function_type)( ) const; + nPages_function_type nPages_function_value( &::SireBase::PageCache::nPages ); + + PageCache_exposer.def( + "nPages" + , nPages_function_value + , bp::release_gil_policy() + , "Return the number of pages in this cache" ); + + } + { //::SireBase::PageCache::operator= + + typedef ::SireBase::PageCache & ( ::SireBase::PageCache::*assign_function_type)( ::SireBase::PageCache const & ) ; + assign_function_type assign_function_value( &::SireBase::PageCache::operator= ); + + PageCache_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + { //::SireBase::PageCache::pageSize + + typedef unsigned int ( ::SireBase::PageCache::*pageSize_function_type)( ) const; + pageSize_function_type pageSize_function_value( &::SireBase::PageCache::pageSize ); + + PageCache_exposer.def( + "pageSize" + , pageSize_function_value + , bp::release_gil_policy() + , "Return the suggested maximum page size for this cache" ); + + } + { //::SireBase::PageCache::rootDirectory + + typedef ::QString ( *rootDirectory_function_type )( ); + rootDirectory_function_type rootDirectory_function_value( &::SireBase::PageCache::rootDirectory ); + + PageCache_exposer.def( + "rootDirectory" + , rootDirectory_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireBase::PageCache::setMaxPageSize + + typedef void ( *setMaxPageSize_function_type )( unsigned int,bool ); + setMaxPageSize_function_type setMaxPageSize_function_value( &::SireBase::PageCache::setMaxPageSize ); + + PageCache_exposer.def( + "setMaxPageSize" + , setMaxPageSize_function_value + , ( bp::arg("max_page_size"), bp::arg("update_existing")=(bool)(false) ) + , "Set the default maximum page cache size for all new created\n caches that dont specify it themselves" ); + + } + { //::SireBase::PageCache::setMaxResidentPages + + typedef void ( *setMaxResidentPages_function_type )( unsigned int ); + setMaxResidentPages_function_type setMaxResidentPages_function_value( &::SireBase::PageCache::setMaxResidentPages ); + + PageCache_exposer.def( + "setMaxResidentPages" + , setMaxResidentPages_function_value + , ( bp::arg("n_pages") ) + , bp::release_gil_policy() + , "Set the maximum number of resident pages per cache" ); + + } + { //::SireBase::PageCache::setRootDirectory + + typedef void ( *setRootDirectory_function_type )( ::QString const & ); + setRootDirectory_function_type setRootDirectory_function_value( &::SireBase::PageCache::setRootDirectory ); + + PageCache_exposer.def( + "setRootDirectory" + , setRootDirectory_function_value + , ( bp::arg("cache_dir") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireBase::PageCache::size + + typedef unsigned int ( ::SireBase::PageCache::*size_function_type)( ) const; + size_function_type size_function_value( &::SireBase::PageCache::size ); + + PageCache_exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "Return the number of bytes saved in this cache" ); + + } + { //::SireBase::PageCache::store + + typedef ::SireBase::PageCache::Handle ( ::SireBase::PageCache::*store_function_type)( ::QByteArray const & ) ; + store_function_type store_function_value( &::SireBase::PageCache::store ); + + PageCache_exposer.def( + "store" + , store_function_value + , ( bp::arg("data") ) + , bp::release_gil_policy() + , "Store the data in the cache, returning a handle to the data" ); + + } + { //::SireBase::PageCache::toString + + typedef ::QString ( ::SireBase::PageCache::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireBase::PageCache::toString ); + + PageCache_exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "Return a string representation of this object" ); + + } + { //::SireBase::PageCache::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireBase::PageCache::typeName ); + + PageCache_exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "Return the type name for this object" ); + + } + { //::SireBase::PageCache::what + + typedef char const * ( ::SireBase::PageCache::*what_function_type)( ) const; + what_function_type what_function_value( &::SireBase::PageCache::what ); + + PageCache_exposer.def( + "what" + , what_function_value + , bp::release_gil_policy() + , "Return the type name for this object" ); + + } + PageCache_exposer.staticmethod( "getStatistics" ); + PageCache_exposer.staticmethod( "maxPageSize" ); + PageCache_exposer.staticmethod( "maxResidentPages" ); + PageCache_exposer.staticmethod( "rootDirectory" ); + PageCache_exposer.staticmethod( "setMaxPageSize" ); + PageCache_exposer.staticmethod( "setMaxResidentPages" ); + PageCache_exposer.staticmethod( "setRootDirectory" ); + PageCache_exposer.staticmethod( "typeName" ); + PageCache_exposer.def( "__copy__", &__copy__); + PageCache_exposer.def( "__deepcopy__", &__copy__); + PageCache_exposer.def( "clone", &__copy__); + PageCache_exposer.def( "__str__", &pvt_get_name); + PageCache_exposer.def( "__repr__", &pvt_get_name); + } + +} diff --git a/wrapper/Base/PageCache.pypp.hpp b/wrapper/Base/PageCache.pypp.hpp new file mode 100644 index 000000000..7c407910d --- /dev/null +++ b/wrapper/Base/PageCache.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 3 License + +#ifndef PageCache_hpp__pyplusplus_wrapper +#define PageCache_hpp__pyplusplus_wrapper + +void register_PageCache_class(); + +#endif//PageCache_hpp__pyplusplus_wrapper diff --git a/wrapper/Base/Process.pypp.cpp b/wrapper/Base/Process.pypp.cpp index 921f1c9da..fe4a80e50 100644 --- a/wrapper/Base/Process.pypp.cpp +++ b/wrapper/Base/Process.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; SireBase::Process __copy__(const SireBase::Process &other){ return SireBase::Process(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireBase::Process&){ return "SireBase::Process";} #include "Helpers/release_gil_policy.hpp" @@ -241,9 +243,9 @@ void register_Process_class(){ Process_exposer.staticmethod( "killAll" ); Process_exposer.staticmethod( "run" ); Process_exposer.staticmethod( "typeName" ); - Process_exposer.def( "__copy__", &__copy__); - Process_exposer.def( "__deepcopy__", &__copy__); - Process_exposer.def( "clone", &__copy__); + Process_exposer.def( "__copy__", &__copy__); + Process_exposer.def( "__deepcopy__", &__copy__); + Process_exposer.def( "clone", &__copy__); Process_exposer.def( "__str__", &pvt_get_name); Process_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/Base/ProgressBar.pypp.cpp b/wrapper/Base/ProgressBar.pypp.cpp index e702d0fec..cf15bacb0 100644 --- a/wrapper/Base/ProgressBar.pypp.cpp +++ b/wrapper/Base/ProgressBar.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireBase::ProgressBar __copy__(const SireBase::ProgressBar &other){ return SireBase::ProgressBar(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -328,9 +330,9 @@ void register_ProgressBar_class(){ ProgressBar_exposer.staticmethod( "setSilent" ); ProgressBar_exposer.staticmethod( "setTheme" ); ProgressBar_exposer.staticmethod( "typeName" ); - ProgressBar_exposer.def( "__copy__", &__copy__); - ProgressBar_exposer.def( "__deepcopy__", &__copy__); - ProgressBar_exposer.def( "clone", &__copy__); + ProgressBar_exposer.def( "__copy__", &__copy__); + ProgressBar_exposer.def( "__deepcopy__", &__copy__); + ProgressBar_exposer.def( "clone", &__copy__); ProgressBar_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::ProgressBar >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ProgressBar_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::ProgressBar >, diff --git a/wrapper/Base/Properties.pypp.cpp b/wrapper/Base/Properties.pypp.cpp index ae40b6f4d..73316a656 100644 --- a/wrapper/Base/Properties.pypp.cpp +++ b/wrapper/Base/Properties.pypp.cpp @@ -30,6 +30,8 @@ namespace bp = boost::python; SireBase::Properties __copy__(const SireBase::Properties &other){ return SireBase::Properties(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -605,9 +607,9 @@ void register_Properties_class(){ } Properties_exposer.staticmethod( "typeName" ); - Properties_exposer.def( "__copy__", &__copy__); - Properties_exposer.def( "__deepcopy__", &__copy__); - Properties_exposer.def( "clone", &__copy__); + Properties_exposer.def( "__copy__", &__copy__); + Properties_exposer.def( "__deepcopy__", &__copy__); + Properties_exposer.def( "clone", &__copy__); Properties_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::Properties >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Properties_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::Properties >, diff --git a/wrapper/Base/PropertyList.pypp.cpp b/wrapper/Base/PropertyList.pypp.cpp index 664246bc8..66ea4c6b3 100644 --- a/wrapper/Base/PropertyList.pypp.cpp +++ b/wrapper/Base/PropertyList.pypp.cpp @@ -32,6 +32,8 @@ namespace bp = boost::python; SireBase::PropertyList __copy__(const SireBase::PropertyList &other){ return SireBase::PropertyList(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -579,9 +581,9 @@ void register_PropertyList_class(){ } PropertyList_exposer.staticmethod( "typeName" ); - PropertyList_exposer.def( "__copy__", &__copy__); - PropertyList_exposer.def( "__deepcopy__", &__copy__); - PropertyList_exposer.def( "clone", &__copy__); + PropertyList_exposer.def( "__copy__", &__copy__); + PropertyList_exposer.def( "__deepcopy__", &__copy__); + PropertyList_exposer.def( "clone", &__copy__); PropertyList_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PropertyList >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PropertyList_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PropertyList >, diff --git a/wrapper/Base/PropertyMap.pypp.cpp b/wrapper/Base/PropertyMap.pypp.cpp index b16f7f7ab..b8fa8c5ea 100644 --- a/wrapper/Base/PropertyMap.pypp.cpp +++ b/wrapper/Base/PropertyMap.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireBase::PropertyMap __copy__(const SireBase::PropertyMap &other){ return SireBase::PropertyMap(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -253,9 +255,9 @@ void register_PropertyMap_class(){ } PropertyMap_exposer.staticmethod( "typeName" ); - PropertyMap_exposer.def( "__copy__", &__copy__); - PropertyMap_exposer.def( "__deepcopy__", &__copy__); - PropertyMap_exposer.def( "clone", &__copy__); + PropertyMap_exposer.def( "__copy__", &__copy__); + PropertyMap_exposer.def( "__deepcopy__", &__copy__); + PropertyMap_exposer.def( "clone", &__copy__); PropertyMap_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PropertyMap >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PropertyMap_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PropertyMap >, diff --git a/wrapper/Base/PropertyName.pypp.cpp b/wrapper/Base/PropertyName.pypp.cpp index cba50c8c0..328db19b8 100644 --- a/wrapper/Base/PropertyName.pypp.cpp +++ b/wrapper/Base/PropertyName.pypp.cpp @@ -22,6 +22,8 @@ namespace bp = boost::python; SireBase::PropertyName __copy__(const SireBase::PropertyName &other){ return SireBase::PropertyName(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -176,9 +178,9 @@ void register_PropertyName_class(){ } PropertyName_exposer.staticmethod( "none" ); PropertyName_exposer.staticmethod( "typeName" ); - PropertyName_exposer.def( "__copy__", &__copy__); - PropertyName_exposer.def( "__deepcopy__", &__copy__); - PropertyName_exposer.def( "clone", &__copy__); + PropertyName_exposer.def( "__copy__", &__copy__); + PropertyName_exposer.def( "__deepcopy__", &__copy__); + PropertyName_exposer.def( "clone", &__copy__); PropertyName_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::PropertyName >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PropertyName_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::PropertyName >, diff --git a/wrapper/Base/SimpleRange.pypp.cpp b/wrapper/Base/SimpleRange.pypp.cpp index 62c3f7b79..55e8b1de6 100644 --- a/wrapper/Base/SimpleRange.pypp.cpp +++ b/wrapper/Base/SimpleRange.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireBase::SimpleRange __copy__(const SireBase::SimpleRange &other){ return SireBase::SimpleRange(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -125,9 +127,9 @@ void register_SimpleRange_class(){ } SimpleRange_exposer.staticmethod( "typeName" ); - SimpleRange_exposer.def( "__copy__", &__copy__); - SimpleRange_exposer.def( "__deepcopy__", &__copy__); - SimpleRange_exposer.def( "clone", &__copy__); + SimpleRange_exposer.def( "__copy__", &__copy__); + SimpleRange_exposer.def( "__deepcopy__", &__copy__); + SimpleRange_exposer.def( "clone", &__copy__); SimpleRange_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::SimpleRange >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SimpleRange_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::SimpleRange >, diff --git a/wrapper/Base/StringArrayProperty.pypp.cpp b/wrapper/Base/StringArrayProperty.pypp.cpp index 9e33b4fcd..94e16b7bf 100644 --- a/wrapper/Base/StringArrayProperty.pypp.cpp +++ b/wrapper/Base/StringArrayProperty.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; SireBase::StringArrayProperty __copy__(const SireBase::StringArrayProperty &other){ return SireBase::StringArrayProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -188,9 +190,9 @@ void register_StringArrayProperty_class(){ } StringArrayProperty_exposer.staticmethod( "typeName" ); - StringArrayProperty_exposer.def( "__copy__", &__copy__); - StringArrayProperty_exposer.def( "__deepcopy__", &__copy__); - StringArrayProperty_exposer.def( "clone", &__copy__); + StringArrayProperty_exposer.def( "__copy__", &__copy__); + StringArrayProperty_exposer.def( "__deepcopy__", &__copy__); + StringArrayProperty_exposer.def( "clone", &__copy__); StringArrayProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::StringArrayProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); StringArrayProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::StringArrayProperty >, diff --git a/wrapper/Base/StringProperty.pypp.cpp b/wrapper/Base/StringProperty.pypp.cpp index 8e42c55f4..b6d031edc 100644 --- a/wrapper/Base/StringProperty.pypp.cpp +++ b/wrapper/Base/StringProperty.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; SireBase::StringProperty __copy__(const SireBase::StringProperty &other){ return SireBase::StringProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -191,9 +193,9 @@ void register_StringProperty_class(){ } StringProperty_exposer.staticmethod( "typeName" ); - StringProperty_exposer.def( "__copy__", &__copy__); - StringProperty_exposer.def( "__deepcopy__", &__copy__); - StringProperty_exposer.def( "clone", &__copy__); + StringProperty_exposer.def( "__copy__", &__copy__); + StringProperty_exposer.def( "__deepcopy__", &__copy__); + StringProperty_exposer.def( "clone", &__copy__); StringProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::StringProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); StringProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::StringProperty >, diff --git a/wrapper/Base/TimeProperty.pypp.cpp b/wrapper/Base/TimeProperty.pypp.cpp index e569eab93..0e91a3b1c 100644 --- a/wrapper/Base/TimeProperty.pypp.cpp +++ b/wrapper/Base/TimeProperty.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; SireBase::TimeProperty __copy__(const SireBase::TimeProperty &other){ return SireBase::TimeProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -90,9 +92,9 @@ void register_TimeProperty_class(){ } TimeProperty_exposer.staticmethod( "typeName" ); - TimeProperty_exposer.def( "__copy__", &__copy__); - TimeProperty_exposer.def( "__deepcopy__", &__copy__); - TimeProperty_exposer.def( "clone", &__copy__); + TimeProperty_exposer.def( "__copy__", &__copy__); + TimeProperty_exposer.def( "__deepcopy__", &__copy__); + TimeProperty_exposer.def( "clone", &__copy__); TimeProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::TimeProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); TimeProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::TimeProperty >, diff --git a/wrapper/Base/TrigArray2D_double_.pypp.cpp b/wrapper/Base/TrigArray2D_double_.pypp.cpp index 60de5deee..6a896bbe9 100644 --- a/wrapper/Base/TrigArray2D_double_.pypp.cpp +++ b/wrapper/Base/TrigArray2D_double_.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::TrigArray2D __copy__(const SireBase::TrigArray2D &other){ return SireBase::TrigArray2D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -162,9 +164,9 @@ void register_TrigArray2D_double__class(){ , "" ); } - TrigArray2D_double__exposer.def( "__copy__", &__copy__); - TrigArray2D_double__exposer.def( "__deepcopy__", &__copy__); - TrigArray2D_double__exposer.def( "clone", &__copy__); + TrigArray2D_double__exposer.def( "__copy__", &__copy__>); + TrigArray2D_double__exposer.def( "__deepcopy__", &__copy__>); + TrigArray2D_double__exposer.def( "clone", &__copy__>); TrigArray2D_double__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::TrigArray2D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); TrigArray2D_double__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::TrigArray2D >, diff --git a/wrapper/Base/TrimString.pypp.cpp b/wrapper/Base/TrimString.pypp.cpp index 58b09e0fd..03411434d 100644 --- a/wrapper/Base/TrimString.pypp.cpp +++ b/wrapper/Base/TrimString.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::TrimString __copy__(const SireBase::TrimString &other){ return SireBase::TrimString(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -73,9 +75,9 @@ void register_TrimString_class(){ } TrimString_exposer.staticmethod( "typeName" ); - TrimString_exposer.def( "__copy__", &__copy__); - TrimString_exposer.def( "__deepcopy__", &__copy__); - TrimString_exposer.def( "clone", &__copy__); + TrimString_exposer.def( "__copy__", &__copy__); + TrimString_exposer.def( "__deepcopy__", &__copy__); + TrimString_exposer.def( "clone", &__copy__); TrimString_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::TrimString >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); TrimString_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::TrimString >, diff --git a/wrapper/Base/UnitTest.pypp.cpp b/wrapper/Base/UnitTest.pypp.cpp index aceb0ad11..b9d2230b1 100644 --- a/wrapper/Base/UnitTest.pypp.cpp +++ b/wrapper/Base/UnitTest.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::UnitTest __copy__(const SireBase::UnitTest &other){ return SireBase::UnitTest(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireBase::UnitTest&){ return "SireBase::UnitTest";} #include "Helpers/release_gil_policy.hpp" @@ -129,9 +131,9 @@ void register_UnitTest_class(){ UnitTest_exposer.staticmethod( "runAll" ); UnitTest_exposer.staticmethod( "tests" ); bp::register_ptr_to_python< std::shared_ptr< SireBase::UnitTest > >(); - UnitTest_exposer.def( "__copy__", &__copy__); - UnitTest_exposer.def( "__deepcopy__", &__copy__); - UnitTest_exposer.def( "clone", &__copy__); + UnitTest_exposer.def( "__copy__", &__copy__); + UnitTest_exposer.def( "__deepcopy__", &__copy__); + UnitTest_exposer.def( "clone", &__copy__); UnitTest_exposer.def( "__str__", &pvt_get_name); UnitTest_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/Base/UpperCaseString.pypp.cpp b/wrapper/Base/UpperCaseString.pypp.cpp index 68e280a95..ee90bfcf9 100644 --- a/wrapper/Base/UpperCaseString.pypp.cpp +++ b/wrapper/Base/UpperCaseString.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::UpperCaseString __copy__(const SireBase::UpperCaseString &other){ return SireBase::UpperCaseString(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -73,9 +75,9 @@ void register_UpperCaseString_class(){ } UpperCaseString_exposer.staticmethod( "typeName" ); - UpperCaseString_exposer.def( "__copy__", &__copy__); - UpperCaseString_exposer.def( "__deepcopy__", &__copy__); - UpperCaseString_exposer.def( "clone", &__copy__); + UpperCaseString_exposer.def( "__copy__", &__copy__); + UpperCaseString_exposer.def( "__deepcopy__", &__copy__); + UpperCaseString_exposer.def( "clone", &__copy__); UpperCaseString_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::UpperCaseString >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); UpperCaseString_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::UpperCaseString >, diff --git a/wrapper/Base/VariantProperty.pypp.cpp b/wrapper/Base/VariantProperty.pypp.cpp index f653c2b54..ee642e3d4 100644 --- a/wrapper/Base/VariantProperty.pypp.cpp +++ b/wrapper/Base/VariantProperty.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::VariantProperty __copy__(const SireBase::VariantProperty &other){ return SireBase::VariantProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -233,9 +235,9 @@ void register_VariantProperty_class(){ } VariantProperty_exposer.staticmethod( "typeName" ); - VariantProperty_exposer.def( "__copy__", &__copy__); - VariantProperty_exposer.def( "__deepcopy__", &__copy__); - VariantProperty_exposer.def( "clone", &__copy__); + VariantProperty_exposer.def( "__copy__", &__copy__); + VariantProperty_exposer.def( "__deepcopy__", &__copy__); + VariantProperty_exposer.def( "clone", &__copy__); VariantProperty_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::VariantProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); VariantProperty_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::VariantProperty >, diff --git a/wrapper/Base/Version.pypp.cpp b/wrapper/Base/Version.pypp.cpp index d414d2d12..e08dc2e42 100644 --- a/wrapper/Base/Version.pypp.cpp +++ b/wrapper/Base/Version.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireBase::Version __copy__(const SireBase::Version &other){ return SireBase::Version(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -108,9 +110,9 @@ void register_Version_class(){ } Version_exposer.staticmethod( "typeName" ); - Version_exposer.def( "__copy__", &__copy__); - Version_exposer.def( "__deepcopy__", &__copy__); - Version_exposer.def( "clone", &__copy__); + Version_exposer.def( "__copy__", &__copy__); + Version_exposer.def( "__deepcopy__", &__copy__); + Version_exposer.def( "clone", &__copy__); Version_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireBase::Version >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Version_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireBase::Version >, diff --git a/wrapper/Base/_Base.main.cpp b/wrapper/Base/_Base.main.cpp index e22cf2b89..da80e35c3 100644 --- a/wrapper/Base/_Base.main.cpp +++ b/wrapper/Base/_Base.main.cpp @@ -89,6 +89,8 @@ #include "PackedArray2D_int_Array.pypp.hpp" +#include "PageCache.pypp.hpp" + #include "Process.pypp.hpp" #include "ProgressBar.pypp.hpp" @@ -236,6 +238,8 @@ BOOST_PYTHON_MODULE(_Base){ register_PackedArray2D_int__class(); + register_PageCache_class(); + register_Process_class(); register_ProgressBar_class(); diff --git a/wrapper/Base/_Base_free_functions.pypp.cpp b/wrapper/Base/_Base_free_functions.pypp.cpp index daade0ac5..bb6da7b77 100644 --- a/wrapper/Base/_Base_free_functions.pypp.cpp +++ b/wrapper/Base/_Base_free_functions.pypp.cpp @@ -7,6 +7,16 @@ namespace bp = boost::python; +#include "SireBase/atexit.h" + +#include "atexit.h" + +#include + +#include + +#include "atexit.h" + #include "SireError/errors.h" #include "findexe.h" @@ -1033,6 +1043,18 @@ namespace bp = boost::python; void register_free_functions(){ + { //::SireBase::clean_up + + typedef void ( *clean_up_function_type )( ); + clean_up_function_type clean_up_function_value( &::SireBase::clean_up ); + + bp::def( + "clean_up" + , clean_up_function_value + , "" ); + + } + { //::SireBase::findExe typedef ::QFileInfo ( *findExe_function_type )( ::QString const & ); diff --git a/wrapper/Base/__init__.py b/wrapper/Base/__init__.py index 2061027f6..3bd4d04fc 100644 --- a/wrapper/Base/__init__.py +++ b/wrapper/Base/__init__.py @@ -1,11 +1,24 @@ from ..Units import _Units # Need to import so that we have GeneralUnit from ._Base import * +import atexit as _atexit + _wrap_functions = [] _base_wrap = wrap +@_atexit.register +def _cleanup(): + """ + This function is called when Python exits - this will call the + clean_up() function in the C++ code to ensure that all memory is + freed up and all temporary files deleted, threads stopped, + network connections closed etc + """ + clean_up() + + def wrap(value): """Wrap the passed value into a :class:`~sire.base.Property` object. This works recursively, wrapping all items in diff --git a/wrapper/Base/active_headers.h b/wrapper/Base/active_headers.h index 21915c18a..224b1a269 100644 --- a/wrapper/Base/active_headers.h +++ b/wrapper/Base/active_headers.h @@ -6,6 +6,7 @@ #include "array2d.h" #include "array2d.hpp" #include "arrayproperty.hpp" +#include "atexit.h" #include "booleanproperty.h" #include "chunkedvector.hpp" #include "combineproperties.h" @@ -23,6 +24,7 @@ #include "meminfo.h" #include "numberproperty.h" #include "packedarrays.h" +#include "pagecache.h" #include "parallel.h" #include "progressbar.h" #include "properties.h" diff --git a/wrapper/CMakeLists.txt b/wrapper/CMakeLists.txt index bcc167150..77ac9bde9 100644 --- a/wrapper/CMakeLists.txt +++ b/wrapper/CMakeLists.txt @@ -283,6 +283,8 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio") # MSBuild message(STATUS "Turning on bigobj") # needed to link _Mol.pyd add_compile_options("/bigobj") + message(STATUS "Silencing deprecation warning: D_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING") + add_compile_definitions("/D_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING") endif() # Conda can mess up our include paths. This makes sure that every diff --git a/wrapper/Convert/SireOpenMM/LambdaLever.pypp.cpp b/wrapper/Convert/SireOpenMM/LambdaLever.pypp.cpp index ac45c54ee..85786b4a2 100644 --- a/wrapper/Convert/SireOpenMM/LambdaLever.pypp.cpp +++ b/wrapper/Convert/SireOpenMM/LambdaLever.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; SireOpenMM::LambdaLever __copy__(const SireOpenMM::LambdaLever &other){ return SireOpenMM::LambdaLever(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -55,14 +57,13 @@ void register_LambdaLever_class(){ } { //::SireOpenMM::LambdaLever::addPerturbableMolecule - typedef int ( ::SireOpenMM::LambdaLever::*addPerturbableMolecule_function_type)( ::SireOpenMM::OpenMMMolecule const &,::QHash< QString, int > const & ) ; + typedef int ( ::SireOpenMM::LambdaLever::*addPerturbableMolecule_function_type)( ::SireOpenMM::OpenMMMolecule const &,::QHash< QString, int > const &,::SireBase::PropertyMap const & ) ; addPerturbableMolecule_function_type addPerturbableMolecule_function_value( &::SireOpenMM::LambdaLever::addPerturbableMolecule ); LambdaLever_exposer.def( "addPerturbableMolecule" , addPerturbableMolecule_function_value - , ( bp::arg("molecule"), bp::arg("start_indicies") ) - , bp::release_gil_policy() + , ( bp::arg("molecule"), bp::arg("start_indicies"), bp::arg("map")=SireBase::PropertyMap() ) , "Add info for the passed perturbable OpenMMMolecule, returning\n its index in the list of perturbable molecules\n" ); } @@ -115,7 +116,7 @@ void register_LambdaLever_class(){ , getLeverValues_function_value , ( bp::arg("lambda_values"), bp::arg("mol") ) , bp::release_gil_policy() - , "" ); + , "Get all of the lever values that would be set for the passed\n lambda values using the current context. This returns a PropertyList\n of columns, where each column is a PropertyMap with the column name\n and either double or QString array property of values.\n\n This is designed to be used by a higher-level python function that\n will convert this output into, e.g. a pandas DataFrame\n" ); } { //::SireOpenMM::LambdaLever::getPerturbableMoleculeMaps @@ -272,9 +273,9 @@ void register_LambdaLever_class(){ } LambdaLever_exposer.staticmethod( "typeName" ); - LambdaLever_exposer.def( "__copy__", &__copy__); - LambdaLever_exposer.def( "__deepcopy__", &__copy__); - LambdaLever_exposer.def( "clone", &__copy__); + LambdaLever_exposer.def( "__copy__", &__copy__); + LambdaLever_exposer.def( "__deepcopy__", &__copy__); + LambdaLever_exposer.def( "clone", &__copy__); LambdaLever_exposer.def( "__str__", &__str__< ::SireOpenMM::LambdaLever > ); LambdaLever_exposer.def( "__repr__", &__str__< ::SireOpenMM::LambdaLever > ); } diff --git a/wrapper/Convert/SireOpenMM/OpenMMMetaData.pypp.cpp b/wrapper/Convert/SireOpenMM/OpenMMMetaData.pypp.cpp index eb68e6a3f..07b317ddb 100644 --- a/wrapper/Convert/SireOpenMM/OpenMMMetaData.pypp.cpp +++ b/wrapper/Convert/SireOpenMM/OpenMMMetaData.pypp.cpp @@ -129,6 +129,8 @@ namespace bp = boost::python; SireOpenMM::OpenMMMetaData __copy__(const SireOpenMM::OpenMMMetaData &other){ return SireOpenMM::OpenMMMetaData(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -273,9 +275,9 @@ void register_OpenMMMetaData_class(){ } OpenMMMetaData_exposer.staticmethod( "typeName" ); - OpenMMMetaData_exposer.def( "__copy__", &__copy__); - OpenMMMetaData_exposer.def( "__deepcopy__", &__copy__); - OpenMMMetaData_exposer.def( "clone", &__copy__); + OpenMMMetaData_exposer.def( "__copy__", &__copy__); + OpenMMMetaData_exposer.def( "__deepcopy__", &__copy__); + OpenMMMetaData_exposer.def( "clone", &__copy__); OpenMMMetaData_exposer.def( "__str__", &__str__< ::SireOpenMM::OpenMMMetaData > ); OpenMMMetaData_exposer.def( "__repr__", &__str__< ::SireOpenMM::OpenMMMetaData > ); } diff --git a/wrapper/Convert/SireOpenMM/PerturbableOpenMMMolecule.pypp.cpp b/wrapper/Convert/SireOpenMM/PerturbableOpenMMMolecule.pypp.cpp index b24f08114..2c8453127 100644 --- a/wrapper/Convert/SireOpenMM/PerturbableOpenMMMolecule.pypp.cpp +++ b/wrapper/Convert/SireOpenMM/PerturbableOpenMMMolecule.pypp.cpp @@ -113,6 +113,8 @@ namespace bp = boost::python; SireOpenMM::PerturbableOpenMMMolecule __copy__(const SireOpenMM::PerturbableOpenMMMolecule &other){ return SireOpenMM::PerturbableOpenMMMolecule(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -123,8 +125,8 @@ void register_PerturbableOpenMMMolecule_class(){ typedef bp::class_< SireOpenMM::PerturbableOpenMMMolecule > PerturbableOpenMMMolecule_exposer_t; PerturbableOpenMMMolecule_exposer_t PerturbableOpenMMMolecule_exposer = PerturbableOpenMMMolecule_exposer_t( "PerturbableOpenMMMolecule", "This class holds all of the information of an OpenMM molecule\nthat can be perturbed using a LambdaSchedule. The data is held\nin easy-to-access arrays, with guarantees that the arrays are\ncompatible and the data is aligned.\n", bp::init< >("Null constructor") ); bp::scope PerturbableOpenMMMolecule_scope( PerturbableOpenMMMolecule_exposer ); - PerturbableOpenMMMolecule_exposer.def( bp::init< SireOpenMM::OpenMMMolecule const & >(( bp::arg("mol") ), "Construct from the passed OpenMMMolecule") ); - PerturbableOpenMMMolecule_exposer.def( bp::init< SireMol::Molecule const &, SireBase::PropertyMap const & >(( bp::arg("mol"), bp::arg("map") ), "Construct from a passed molecule and map") ); + PerturbableOpenMMMolecule_exposer.def( bp::init< SireOpenMM::OpenMMMolecule const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("mol"), bp::arg("map")=SireBase::PropertyMap() ), "Construct from the passed OpenMMMolecule") ); + PerturbableOpenMMMolecule_exposer.def( bp::init< SireMol::Molecule const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("mol"), bp::arg("map")=SireBase::PropertyMap() ), "Construct from a passed molecule and map") ); PerturbableOpenMMMolecule_exposer.def( bp::init< SireOpenMM::PerturbableOpenMMMolecule const & >(( bp::arg("other") ), "Copy constructor") ); { //::SireOpenMM::PerturbableOpenMMMolecule::angles @@ -595,6 +597,18 @@ void register_PerturbableOpenMMMolecule_class(){ , bp::release_gil_policy() , "Return true if the atom is a ghost atom in the\n referenece or perturbed states" ); + } + { //::SireOpenMM::PerturbableOpenMMMolecule::isNull + + typedef bool ( ::SireOpenMM::PerturbableOpenMMMolecule::*isNull_function_type)( ) const; + isNull_function_type isNull_function_value( &::SireOpenMM::PerturbableOpenMMMolecule::isNull ); + + PerturbableOpenMMMolecule_exposer.def( + "isNull" + , isNull_function_value + , bp::release_gil_policy() + , "Return whether or not this is null" ); + } PerturbableOpenMMMolecule_exposer.def( bp::self != bp::self ); { //::SireOpenMM::PerturbableOpenMMMolecule::operator= @@ -686,9 +700,9 @@ void register_PerturbableOpenMMMolecule_class(){ } PerturbableOpenMMMolecule_exposer.staticmethod( "typeName" ); - PerturbableOpenMMMolecule_exposer.def( "__copy__", &__copy__); - PerturbableOpenMMMolecule_exposer.def( "__deepcopy__", &__copy__); - PerturbableOpenMMMolecule_exposer.def( "clone", &__copy__); + PerturbableOpenMMMolecule_exposer.def( "__copy__", &__copy__); + PerturbableOpenMMMolecule_exposer.def( "__deepcopy__", &__copy__); + PerturbableOpenMMMolecule_exposer.def( "clone", &__copy__); PerturbableOpenMMMolecule_exposer.def( "__str__", &__str__< ::SireOpenMM::PerturbableOpenMMMolecule > ); PerturbableOpenMMMolecule_exposer.def( "__repr__", &__str__< ::SireOpenMM::PerturbableOpenMMMolecule > ); } diff --git a/wrapper/Convert/SireOpenMM/lambdalever.cpp b/wrapper/Convert/SireOpenMM/lambdalever.cpp index f44b38f90..a70a0c18f 100644 --- a/wrapper/Convert/SireOpenMM/lambdalever.cpp +++ b/wrapper/Convert/SireOpenMM/lambdalever.cpp @@ -1964,10 +1964,11 @@ QList LambdaLever::getRestraints(const QString &name, * its index in the list of perturbable molecules */ int LambdaLever::addPerturbableMolecule(const OpenMMMolecule &molecule, - const QHash &starts) + const QHash &starts, + const PropertyMap &map) { // should add in some sanity checks for these inputs - this->perturbable_mols.append(PerturbableOpenMMMolecule(molecule)); + this->perturbable_mols.append(PerturbableOpenMMMolecule(molecule, map)); this->start_indicies.append(starts); this->perturbable_maps.insert(molecule.number, molecule.perturtable_map); this->lambda_cache.clear(); diff --git a/wrapper/Convert/SireOpenMM/lambdalever.h b/wrapper/Convert/SireOpenMM/lambdalever.h index 9bf0b60d7..46cb254d1 100644 --- a/wrapper/Convert/SireOpenMM/lambdalever.h +++ b/wrapper/Convert/SireOpenMM/lambdalever.h @@ -123,7 +123,8 @@ namespace SireOpenMM void addRestraintIndex(const QString &force, int index); int addPerturbableMolecule(const OpenMMMolecule &molecule, - const QHash &start_indicies); + const QHash &start_indicies, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); void setExceptionIndicies(int idx, const QString &ff, const QVector> &exception_idxs); diff --git a/wrapper/Convert/SireOpenMM/openmmmolecule.cpp b/wrapper/Convert/SireOpenMM/openmmmolecule.cpp index 7062c1451..40979610d 100644 --- a/wrapper/Convert/SireOpenMM/openmmmolecule.cpp +++ b/wrapper/Convert/SireOpenMM/openmmmolecule.cpp @@ -1193,15 +1193,22 @@ void OpenMMMolecule::alignInternals(const PropertyMap &map) { if (is_ghost(clj0)) { - from_ghost_idxs.insert(i); + // ghost atoms are only ghosts is they are real in at + // least one end state (cannot be both a to_ghost and + // a from_ghost atom - this is also implicitly tested + // for above in the clj0 != clj1) + if (not is_ghost(clj1)) + { + from_ghost_idxs.insert(i); - // alpha is 1 for the reference state for ghost atoms - // (and will be 0 for the perturbed state) - this->alphas[i] = 1.0; + // alpha is 1 for the reference state for ghost atoms + // (and will be 0 for the perturbed state) + this->alphas[i] = 1.0; - // kappa is 1 for both end states for ghost atoms - this->kappas[i] = 1.0; - this->perturbed->kappas[i] = 1.0; + // kappa is 1 for both end states for ghost atoms + this->kappas[i] = 1.0; + this->perturbed->kappas[i] = 1.0; + } } else if (is_ghost(clj1)) { @@ -1795,6 +1802,18 @@ void OpenMMMolecule::copyInCoordsAndVelocities(OpenMM::Vec3 *c, OpenMM::Vec3 *v) } } +/** Return the number of atoms in this molecule */ +int OpenMMMolecule::nAtoms() const +{ + return this->coords.count(); +} + +/** Return the number of ghost atoms (sum of to_ghosts and from_ghosts) */ +int OpenMMMolecule::nGhostAtoms() const +{ + return from_ghost_idxs.count() + to_ghost_idxs.count(); +} + /** Return the alpha parameters of all atoms in atom order for * this molecule */ @@ -2073,7 +2092,7 @@ PerturbableOpenMMMolecule::PerturbableOpenMMMolecule(const Molecule &mol, const PropertyMap &map) : ConcreteProperty() { - this->operator=(PerturbableOpenMMMolecule(OpenMMMolecule(mol, map))); + this->operator=(PerturbableOpenMMMolecule(OpenMMMolecule(mol, map), map)); } /** Return whether or not this is null */ @@ -2085,7 +2104,8 @@ bool PerturbableOpenMMMolecule::isNull() const } /** Construct from the passed OpenMMMolecule */ -PerturbableOpenMMMolecule::PerturbableOpenMMMolecule(const OpenMMMolecule &mol) +PerturbableOpenMMMolecule::PerturbableOpenMMMolecule(const OpenMMMolecule &mol, + const PropertyMap &map) : ConcreteProperty() { if (mol.perturbed.get() == 0) @@ -2175,6 +2195,45 @@ PerturbableOpenMMMolecule::PerturbableOpenMMMolecule(const OpenMMMolecule &mol) from_ghost_idxs = mol.from_ghost_idxs; perturbable_constraints = mol.perturbable_constraints; + + bool fix_perturbable_zero_sigmas = false; + + if (map.specified("fix_perturbable_zero_sigmas")) + { + fix_perturbable_zero_sigmas = map["fix_perturbable_zero_sigmas"].value().asABoolean(); + } + + if (fix_perturbable_zero_sigmas) + { + const int nats = sig0.count(); + + if (sig1.count() != nats) + { + throw SireError::program_bug(QObject::tr( + "The number of atoms in the reference (%1) and perturbed (%2) " + "states do not match.") + .arg(nats) + .arg(sig1.count()), + CODELOC); + } + + const auto *sig0_data = sig0.constData(); + const auto *sig1_data = sig1.constData(); + + for (int i = 0; i < nats; ++i) + { + if (std::abs(sig0_data[i]) <= 1e-9) + { + sig0[i] = sig1_data[i]; + sig0_data = sig0.constData(); + } + else if (std::abs(sig1_data[i] <= 1e-9)) + { + sig1[i] = sig0_data[i]; + sig1_data = sig1.constData(); + } + } + } } /** Copy constructor */ diff --git a/wrapper/Convert/SireOpenMM/openmmmolecule.h b/wrapper/Convert/SireOpenMM/openmmmolecule.h index 30420f0be..f21c44746 100644 --- a/wrapper/Convert/SireOpenMM/openmmmolecule.h +++ b/wrapper/Convert/SireOpenMM/openmmmolecule.h @@ -79,6 +79,9 @@ namespace SireOpenMM bool isGhostAtom(int atom) const; + int nAtoms() const; + int nGhostAtoms() const; + boost::tuple getException(int atom0, int atom1, int start_index, @@ -204,10 +207,11 @@ namespace SireOpenMM public: PerturbableOpenMMMolecule(); - PerturbableOpenMMMolecule(const OpenMMMolecule &mol); + PerturbableOpenMMMolecule(const OpenMMMolecule &mol, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); PerturbableOpenMMMolecule(const SireMol::Molecule &mol, - const SireBase::PropertyMap &map); + const SireBase::PropertyMap &map = SireBase::PropertyMap()); PerturbableOpenMMMolecule(const PerturbableOpenMMMolecule &other); diff --git a/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp b/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp index bb4733f93..03e2ad242 100644 --- a/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp +++ b/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp @@ -547,6 +547,31 @@ _set_box_vectors(OpenMM::System &system, return boxvecs; } +class IndexPair +{ +public: + IndexPair(int atom0 = 0, int atom1 = 0) : _atom0(atom0), _atom1(atom1) + { + if (atom1 < atom0) + { + std::swap(_atom0, _atom1); + } + } + + bool operator==(const IndexPair &other) const + { + return _atom0 == other._atom0 and _atom1 == other._atom1; + } + + int _atom0; + int _atom1; +}; + +uint qHash(const IndexPair &pair) +{ + return qHash(pair._atom0) ^ qHash(pair._atom1); +} + /** This is the (monster) function that converts a passed set of Sire @@ -1082,13 +1107,32 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, std::vector custom_params = {0.0, 0.0, 0.0, 0.0, 0.0}; // the sets of particle indexes for the ghost atoms and non-ghost atoms - std::set ghost_atoms; - std::set non_ghost_atoms; + QVector ghost_atoms; + QVector non_ghost_atoms; + + // count the number of atoms and ghost atoms + int n_atoms = 0; + int n_ghost_atoms = 0; + + for (int i = 0; i < nmols; ++i) + { + const auto &mol = openmm_mols_data[i]; + n_atoms += mol.nAtoms(); + n_ghost_atoms += mol.nGhostAtoms(); + } + + // there's probably lots of optimisations we can make if the + // number of ghost atoms is zero... + ghost_atoms.reserve(n_ghost_atoms); + non_ghost_atoms.reserve(n_atoms - n_ghost_atoms); // the set of all ghost atoms, with the value // indicating if this is a from-ghost (true) or // a to-ghost (false) - QHash ghost_is_from; + QVector from_ghost_idxs; + QVector to_ghost_idxs; + from_ghost_idxs.reserve(n_ghost_atoms); + to_ghost_idxs.reserve(n_ghost_atoms); // loop over every molecule and add them one by one for (int i = 0; i < nmols; ++i) @@ -1144,7 +1188,8 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, // of perturbable molecules (e.g. the first perturbable // molecule we find has index 0) auto pert_idx = lambda_lever.addPerturbableMolecule(mol, - start_indicies); + start_indicies, + map); // and we can record the map from the molecule index // to the perturbable molecule index @@ -1217,8 +1262,16 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, // this is a ghost atom! We need to record this // fact and make sure that we don't calculate // the LJ energy using the standard cljff - ghost_atoms.insert(atom_index); - ghost_is_from.insert(atom_index, is_from_ghost); + ghost_atoms.append(atom_index); + + if (is_from_ghost) + { + from_ghost_idxs.append(atom_index); + } + else + { + to_ghost_idxs.append(atom_index); + } // don't include the LJ energy as this will be // calculated using the ghost forcefields @@ -1232,7 +1285,7 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, // just add it to the standard cljff as normal cljff->addParticle(charge, boost::get<1>(clj), boost::get<2>(clj)); - non_ghost_atoms.insert(atom_index); + non_ghost_atoms.append(atom_index); } } } @@ -1278,7 +1331,7 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, custom_params[4] = 0.0; ghost_ghostff->addParticle(custom_params); ghost_nonghostff->addParticle(custom_params); - non_ghost_atoms.insert(atom_index); + non_ghost_atoms.append(atom_index); } } } @@ -1339,8 +1392,10 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, { // set up the interaction groups - ghost / non-ghost // ghost / ghost - ghost_ghostff->addInteractionGroup(ghost_atoms, ghost_atoms); - ghost_nonghostff->addInteractionGroup(ghost_atoms, non_ghost_atoms); + std::set ghost_atoms_set(ghost_atoms.begin(), ghost_atoms.end()); + std::set non_ghost_atoms_set(non_ghost_atoms.begin(), non_ghost_atoms.end()); + ghost_ghostff->addInteractionGroup(ghost_atoms_set, ghost_atoms_set); + ghost_nonghostff->addInteractionGroup(ghost_atoms_set, non_ghost_atoms_set); } // see if we want to remove COM motion @@ -1372,6 +1427,11 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, /// /// We will also add all of the perturbable constraints here /// + /// (we need to remember which ghost-ghost interactions we have + /// excluded, so that we don't double-exclude them later) + QSet excluded_ghost_pairs; + excluded_ghost_pairs.reserve((n_ghost_atoms * n_ghost_atoms) / 2); + for (int i = 0; i < nmols; ++i) { int start_index = start_indexes[i]; @@ -1467,6 +1527,12 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, params14); } } + + if (atom0_is_ghost and atom1_is_ghost) + { + // remember that this ghost-ghost interaction is already excluded + excluded_ghost_pairs.insert(IndexPair(boost::get<0>(p), boost::get<1>(p))); + } } else { @@ -1506,6 +1572,22 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, } } + // go through all of the ghost atoms and exclude interactions + // between from_ghosts and to_ghosts + for (const auto &from_ghost_idx : from_ghost_idxs) + { + for (const auto &to_ghost_idx : to_ghost_idxs) + { + if (not excluded_ghost_pairs.contains(IndexPair(from_ghost_idx, to_ghost_idx))) + { + ghost_ghostff->addExclusion(from_ghost_idx, to_ghost_idx); + ghost_nonghostff->addExclusion(from_ghost_idx, to_ghost_idx); + cljff->addException(from_ghost_idx, to_ghost_idx, + 0.0, 1e-9, 1e-9, true); + } + } + } + // Stage 6 is complete. We have set up all of the exceptions. The // total energy / force calculated for the system should now be // correct. diff --git a/wrapper/Convert/__init__.py b/wrapper/Convert/__init__.py index 31f915362..cf71f3f31 100644 --- a/wrapper/Convert/__init__.py +++ b/wrapper/Convert/__init__.py @@ -398,7 +398,7 @@ def sire_to_openmm(mols, map): platform = platforms["cpu"] elif len(platforms) > 0: - platform = platforms[platforms.keys()[0]] + platform = platforms[list(platforms.keys())[0]] if platform is None: raise ValueError( diff --git a/wrapper/Helpers/copy.hpp b/wrapper/Helpers/copy.hpp new file mode 100644 index 000000000..88d967815 --- /dev/null +++ b/wrapper/Helpers/copy.hpp @@ -0,0 +1,46 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2024 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors at https://sire.openbiosim.org + * +\*********************************************/ + +#ifndef PYWRAP_SIREPY_COPY_HPP +#define PYWRAP_SIREPY_COPY_HPP + +#include +#include + +#include "sireglobal.h" + +SIRE_BEGIN_HEADER + +template +T __copy__(const T &obj) +{ + return T(obj); +} + +SIRE_END_HEADER + +#endif diff --git a/wrapper/MM/AmberAngle.pypp.cpp b/wrapper/MM/AmberAngle.pypp.cpp index 3a0c92514..b134b5ff4 100644 --- a/wrapper/MM/AmberAngle.pypp.cpp +++ b/wrapper/MM/AmberAngle.pypp.cpp @@ -73,6 +73,8 @@ namespace bp = boost::python; SireMM::AmberAngle __copy__(const SireMM::AmberAngle &other){ return SireMM::AmberAngle(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -217,9 +219,9 @@ void register_AmberAngle_class(){ } AmberAngle_exposer.staticmethod( "typeName" ); - AmberAngle_exposer.def( "__copy__", &__copy__); - AmberAngle_exposer.def( "__deepcopy__", &__copy__); - AmberAngle_exposer.def( "clone", &__copy__); + AmberAngle_exposer.def( "__copy__", &__copy__); + AmberAngle_exposer.def( "__deepcopy__", &__copy__); + AmberAngle_exposer.def( "clone", &__copy__); AmberAngle_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::AmberAngle >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AmberAngle_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::AmberAngle >, diff --git a/wrapper/MM/AmberBond.pypp.cpp b/wrapper/MM/AmberBond.pypp.cpp index cd1d926e2..765eecf22 100644 --- a/wrapper/MM/AmberBond.pypp.cpp +++ b/wrapper/MM/AmberBond.pypp.cpp @@ -73,6 +73,8 @@ namespace bp = boost::python; SireMM::AmberBond __copy__(const SireMM::AmberBond &other){ return SireMM::AmberBond(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -217,9 +219,9 @@ void register_AmberBond_class(){ } AmberBond_exposer.staticmethod( "typeName" ); - AmberBond_exposer.def( "__copy__", &__copy__); - AmberBond_exposer.def( "__deepcopy__", &__copy__); - AmberBond_exposer.def( "clone", &__copy__); + AmberBond_exposer.def( "__copy__", &__copy__); + AmberBond_exposer.def( "__deepcopy__", &__copy__); + AmberBond_exposer.def( "clone", &__copy__); AmberBond_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::AmberBond >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AmberBond_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::AmberBond >, diff --git a/wrapper/MM/AmberDihPart.pypp.cpp b/wrapper/MM/AmberDihPart.pypp.cpp index 901450127..215e9cba4 100644 --- a/wrapper/MM/AmberDihPart.pypp.cpp +++ b/wrapper/MM/AmberDihPart.pypp.cpp @@ -73,6 +73,8 @@ namespace bp = boost::python; SireMM::AmberDihPart __copy__(const SireMM::AmberDihPart &other){ return SireMM::AmberDihPart(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -215,9 +217,9 @@ void register_AmberDihPart_class(){ } AmberDihPart_exposer.staticmethod( "typeName" ); - AmberDihPart_exposer.def( "__copy__", &__copy__); - AmberDihPart_exposer.def( "__deepcopy__", &__copy__); - AmberDihPart_exposer.def( "clone", &__copy__); + AmberDihPart_exposer.def( "__copy__", &__copy__); + AmberDihPart_exposer.def( "__deepcopy__", &__copy__); + AmberDihPart_exposer.def( "clone", &__copy__); AmberDihPart_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::AmberDihPart >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AmberDihPart_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::AmberDihPart >, diff --git a/wrapper/MM/AmberDihedral.pypp.cpp b/wrapper/MM/AmberDihedral.pypp.cpp index de9fce62c..3f89d3c57 100644 --- a/wrapper/MM/AmberDihedral.pypp.cpp +++ b/wrapper/MM/AmberDihedral.pypp.cpp @@ -73,6 +73,8 @@ namespace bp = boost::python; SireMM::AmberDihedral __copy__(const SireMM::AmberDihedral &other){ return SireMM::AmberDihedral(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -203,9 +205,9 @@ void register_AmberDihedral_class(){ } AmberDihedral_exposer.staticmethod( "typeName" ); - AmberDihedral_exposer.def( "__copy__", &__copy__); - AmberDihedral_exposer.def( "__deepcopy__", &__copy__); - AmberDihedral_exposer.def( "clone", &__copy__); + AmberDihedral_exposer.def( "__copy__", &__copy__); + AmberDihedral_exposer.def( "__deepcopy__", &__copy__); + AmberDihedral_exposer.def( "clone", &__copy__); AmberDihedral_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::AmberDihedral >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AmberDihedral_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::AmberDihedral >, diff --git a/wrapper/MM/AmberNB14.pypp.cpp b/wrapper/MM/AmberNB14.pypp.cpp index de9f3bd99..dd427c21b 100644 --- a/wrapper/MM/AmberNB14.pypp.cpp +++ b/wrapper/MM/AmberNB14.pypp.cpp @@ -73,6 +73,8 @@ namespace bp = boost::python; SireMM::AmberNB14 __copy__(const SireMM::AmberNB14 &other){ return SireMM::AmberNB14(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -190,9 +192,9 @@ void register_AmberNB14_class(){ } AmberNB14_exposer.staticmethod( "typeName" ); - AmberNB14_exposer.def( "__copy__", &__copy__); - AmberNB14_exposer.def( "__deepcopy__", &__copy__); - AmberNB14_exposer.def( "clone", &__copy__); + AmberNB14_exposer.def( "__copy__", &__copy__); + AmberNB14_exposer.def( "__deepcopy__", &__copy__); + AmberNB14_exposer.def( "clone", &__copy__); AmberNB14_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::AmberNB14 >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AmberNB14_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::AmberNB14 >, diff --git a/wrapper/MM/AmberParams.pypp.cpp b/wrapper/MM/AmberParams.pypp.cpp index a1306fe96..8ec4a0bb8 100644 --- a/wrapper/MM/AmberParams.pypp.cpp +++ b/wrapper/MM/AmberParams.pypp.cpp @@ -73,6 +73,8 @@ namespace bp = boost::python; SireMM::AmberParams __copy__(const SireMM::AmberParams &other){ return SireMM::AmberParams(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -858,9 +860,9 @@ void register_AmberParams_class(){ } AmberParams_exposer.staticmethod( "typeName" ); - AmberParams_exposer.def( "__copy__", &__copy__); - AmberParams_exposer.def( "__deepcopy__", &__copy__); - AmberParams_exposer.def( "clone", &__copy__); + AmberParams_exposer.def( "__copy__", &__copy__); + AmberParams_exposer.def( "__deepcopy__", &__copy__); + AmberParams_exposer.def( "clone", &__copy__); AmberParams_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::AmberParams >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AmberParams_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::AmberParams >, diff --git a/wrapper/MM/Angle.pypp.cpp b/wrapper/MM/Angle.pypp.cpp index 0cbb033a4..873a8449d 100644 --- a/wrapper/MM/Angle.pypp.cpp +++ b/wrapper/MM/Angle.pypp.cpp @@ -42,6 +42,8 @@ namespace bp = boost::python; SireMM::Angle __copy__(const SireMM::Angle &other){ return SireMM::Angle(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -471,9 +473,9 @@ void register_Angle_class(){ } Angle_exposer.staticmethod( "typeName" ); - Angle_exposer.def( "__copy__", &__copy__); - Angle_exposer.def( "__deepcopy__", &__copy__); - Angle_exposer.def( "clone", &__copy__); + Angle_exposer.def( "__copy__", &__copy__); + Angle_exposer.def( "__deepcopy__", &__copy__); + Angle_exposer.def( "clone", &__copy__); Angle_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::Angle >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Angle_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::Angle >, diff --git a/wrapper/MM/AngleComponent.pypp.cpp b/wrapper/MM/AngleComponent.pypp.cpp index b2f107988..5e9944b2c 100644 --- a/wrapper/MM/AngleComponent.pypp.cpp +++ b/wrapper/MM/AngleComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::AngleComponent __copy__(const SireMM::AngleComponent &other){ return SireMM::AngleComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_AngleComponent_class(){ } 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< ::SireMM::AngleComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AngleComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::AngleComponent >, diff --git a/wrapper/MM/AngleParameterName.pypp.cpp b/wrapper/MM/AngleParameterName.pypp.cpp index 416ccd350..1a357b7d6 100644 --- a/wrapper/MM/AngleParameterName.pypp.cpp +++ b/wrapper/MM/AngleParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::AngleParameterName __copy__(const SireMM::AngleParameterName &other){ return SireMM::AngleParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::AngleParameterName&){ return "SireMM::AngleParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_AngleParameterName_class(){ , "" ); } - AngleParameterName_exposer.def( "__copy__", &__copy__); - AngleParameterName_exposer.def( "__deepcopy__", &__copy__); - AngleParameterName_exposer.def( "clone", &__copy__); + AngleParameterName_exposer.def( "__copy__", &__copy__); + AngleParameterName_exposer.def( "__deepcopy__", &__copy__); + AngleParameterName_exposer.def( "clone", &__copy__); AngleParameterName_exposer.def( "__str__", &pvt_get_name); AngleParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/AngleRestraint.pypp.cpp b/wrapper/MM/AngleRestraint.pypp.cpp index 45e37f153..052916bb4 100644 --- a/wrapper/MM/AngleRestraint.pypp.cpp +++ b/wrapper/MM/AngleRestraint.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; SireMM::AngleRestraint __copy__(const SireMM::AngleRestraint &other){ return SireMM::AngleRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -357,9 +359,9 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.staticmethod( "harmonic" ); AngleRestraint_exposer.staticmethod( "theta" ); AngleRestraint_exposer.staticmethod( "typeName" ); - AngleRestraint_exposer.def( "__copy__", &__copy__); - AngleRestraint_exposer.def( "__deepcopy__", &__copy__); - AngleRestraint_exposer.def( "clone", &__copy__); + AngleRestraint_exposer.def( "__copy__", &__copy__); + AngleRestraint_exposer.def( "__deepcopy__", &__copy__); + AngleRestraint_exposer.def( "clone", &__copy__); AngleRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::AngleRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AngleRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::AngleRestraint >, diff --git a/wrapper/MM/AngleSymbols.pypp.cpp b/wrapper/MM/AngleSymbols.pypp.cpp index fe0e656bc..deecfb934 100644 --- a/wrapper/MM/AngleSymbols.pypp.cpp +++ b/wrapper/MM/AngleSymbols.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::AngleSymbols __copy__(const SireMM::AngleSymbols &other){ return SireMM::AngleSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::AngleSymbols&){ return "SireMM::AngleSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -56,9 +58,9 @@ void register_AngleSymbols_class(){ , "Return the symbols representing the angle (theta)" ); } - AngleSymbols_exposer.def( "__copy__", &__copy__); - AngleSymbols_exposer.def( "__deepcopy__", &__copy__); - AngleSymbols_exposer.def( "clone", &__copy__); + AngleSymbols_exposer.def( "__copy__", &__copy__); + AngleSymbols_exposer.def( "__deepcopy__", &__copy__); + AngleSymbols_exposer.def( "clone", &__copy__); AngleSymbols_exposer.def( "__str__", &pvt_get_name); AngleSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/AtomLJs.pypp.cpp b/wrapper/MM/AtomLJs.pypp.cpp index 44b00dc65..977ec7fcd 100644 --- a/wrapper/MM/AtomLJs.pypp.cpp +++ b/wrapper/MM/AtomLJs.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMol::AtomProperty __copy__(const SireMol::AtomProperty &other){ return SireMol::AtomProperty(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -827,9 +829,9 @@ void register_AtomLJs_class(){ } AtomLJs_exposer.staticmethod( "fromVariant" ); AtomLJs_exposer.staticmethod( "typeName" ); - AtomLJs_exposer.def( "__copy__", &__copy__); - AtomLJs_exposer.def( "__deepcopy__", &__copy__); - AtomLJs_exposer.def( "clone", &__copy__); + AtomLJs_exposer.def( "__copy__", &__copy__>); + AtomLJs_exposer.def( "__deepcopy__", &__copy__>); + AtomLJs_exposer.def( "clone", &__copy__>); AtomLJs_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::AtomProperty >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); AtomLJs_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::AtomProperty >, diff --git a/wrapper/MM/BendBendComponent.pypp.cpp b/wrapper/MM/BendBendComponent.pypp.cpp index 3288b5fe8..9415ade51 100644 --- a/wrapper/MM/BendBendComponent.pypp.cpp +++ b/wrapper/MM/BendBendComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::BendBendComponent __copy__(const SireMM::BendBendComponent &other){ return SireMM::BendBendComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_BendBendComponent_class(){ } BendBendComponent_exposer.staticmethod( "typeName" ); - BendBendComponent_exposer.def( "__copy__", &__copy__); - BendBendComponent_exposer.def( "__deepcopy__", &__copy__); - BendBendComponent_exposer.def( "clone", &__copy__); + BendBendComponent_exposer.def( "__copy__", &__copy__); + BendBendComponent_exposer.def( "__deepcopy__", &__copy__); + BendBendComponent_exposer.def( "clone", &__copy__); BendBendComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::BendBendComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); BendBendComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::BendBendComponent >, diff --git a/wrapper/MM/BendBendParameterName.pypp.cpp b/wrapper/MM/BendBendParameterName.pypp.cpp index f8048aa5d..298608a79 100644 --- a/wrapper/MM/BendBendParameterName.pypp.cpp +++ b/wrapper/MM/BendBendParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::BendBendParameterName __copy__(const SireMM::BendBendParameterName &other){ return SireMM::BendBendParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::BendBendParameterName&){ return "SireMM::BendBendParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_BendBendParameterName_class(){ , "" ); } - BendBendParameterName_exposer.def( "__copy__", &__copy__); - BendBendParameterName_exposer.def( "__deepcopy__", &__copy__); - BendBendParameterName_exposer.def( "clone", &__copy__); + BendBendParameterName_exposer.def( "__copy__", &__copy__); + BendBendParameterName_exposer.def( "__deepcopy__", &__copy__); + BendBendParameterName_exposer.def( "clone", &__copy__); BendBendParameterName_exposer.def( "__str__", &pvt_get_name); BendBendParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/BendBendSymbols.pypp.cpp b/wrapper/MM/BendBendSymbols.pypp.cpp index 04754de27..57d536d17 100644 --- a/wrapper/MM/BendBendSymbols.pypp.cpp +++ b/wrapper/MM/BendBendSymbols.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::BendBendSymbols __copy__(const SireMM::BendBendSymbols &other){ return SireMM::BendBendSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::BendBendSymbols&){ return "SireMM::BendBendSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -80,9 +82,9 @@ void register_BendBendSymbols_class(){ , "Return the symbol representing the angle between atoms 3-1-0, theta_\n{310}" ); } - BendBendSymbols_exposer.def( "__copy__", &__copy__); - BendBendSymbols_exposer.def( "__deepcopy__", &__copy__); - BendBendSymbols_exposer.def( "clone", &__copy__); + BendBendSymbols_exposer.def( "__copy__", &__copy__); + BendBendSymbols_exposer.def( "__deepcopy__", &__copy__); + BendBendSymbols_exposer.def( "clone", &__copy__); BendBendSymbols_exposer.def( "__str__", &pvt_get_name); BendBendSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/Bond.pypp.cpp b/wrapper/MM/Bond.pypp.cpp index f4fd7545b..9bd466fea 100644 --- a/wrapper/MM/Bond.pypp.cpp +++ b/wrapper/MM/Bond.pypp.cpp @@ -42,6 +42,8 @@ namespace bp = boost::python; SireMM::Bond __copy__(const SireMM::Bond &other){ return SireMM::Bond(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -459,9 +461,9 @@ void register_Bond_class(){ } Bond_exposer.staticmethod( "typeName" ); - Bond_exposer.def( "__copy__", &__copy__); - Bond_exposer.def( "__deepcopy__", &__copy__); - Bond_exposer.def( "clone", &__copy__); + Bond_exposer.def( "__copy__", &__copy__); + Bond_exposer.def( "__deepcopy__", &__copy__); + Bond_exposer.def( "clone", &__copy__); Bond_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::Bond >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Bond_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::Bond >, diff --git a/wrapper/MM/BondComponent.pypp.cpp b/wrapper/MM/BondComponent.pypp.cpp index 1b6b00c9c..94621c39a 100644 --- a/wrapper/MM/BondComponent.pypp.cpp +++ b/wrapper/MM/BondComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::BondComponent __copy__(const SireMM::BondComponent &other){ return SireMM::BondComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_BondComponent_class(){ } BondComponent_exposer.staticmethod( "typeName" ); - BondComponent_exposer.def( "__copy__", &__copy__); - BondComponent_exposer.def( "__deepcopy__", &__copy__); - BondComponent_exposer.def( "clone", &__copy__); + BondComponent_exposer.def( "__copy__", &__copy__); + BondComponent_exposer.def( "__deepcopy__", &__copy__); + BondComponent_exposer.def( "clone", &__copy__); BondComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::BondComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); BondComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::BondComponent >, diff --git a/wrapper/MM/BondParameterName.pypp.cpp b/wrapper/MM/BondParameterName.pypp.cpp index 19a44a2ab..1ae851160 100644 --- a/wrapper/MM/BondParameterName.pypp.cpp +++ b/wrapper/MM/BondParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::BondParameterName __copy__(const SireMM::BondParameterName &other){ return SireMM::BondParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::BondParameterName&){ return "SireMM::BondParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_BondParameterName_class(){ , "" ); } - BondParameterName_exposer.def( "__copy__", &__copy__); - BondParameterName_exposer.def( "__deepcopy__", &__copy__); - BondParameterName_exposer.def( "clone", &__copy__); + BondParameterName_exposer.def( "__copy__", &__copy__); + BondParameterName_exposer.def( "__deepcopy__", &__copy__); + BondParameterName_exposer.def( "clone", &__copy__); BondParameterName_exposer.def( "__str__", &pvt_get_name); BondParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/BondRestraint.pypp.cpp b/wrapper/MM/BondRestraint.pypp.cpp index c680cfb17..ea5e7fbed 100644 --- a/wrapper/MM/BondRestraint.pypp.cpp +++ b/wrapper/MM/BondRestraint.pypp.cpp @@ -25,6 +25,8 @@ namespace bp = boost::python; SireMM::BondRestraint __copy__(const SireMM::BondRestraint &other){ return SireMM::BondRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -202,9 +204,9 @@ void register_BondRestraint_class(){ } BondRestraint_exposer.staticmethod( "typeName" ); - BondRestraint_exposer.def( "__copy__", &__copy__); - BondRestraint_exposer.def( "__deepcopy__", &__copy__); - BondRestraint_exposer.def( "clone", &__copy__); + BondRestraint_exposer.def( "__copy__", &__copy__); + BondRestraint_exposer.def( "__deepcopy__", &__copy__); + BondRestraint_exposer.def( "clone", &__copy__); BondRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::BondRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); BondRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::BondRestraint >, diff --git a/wrapper/MM/BondRestraints.pypp.cpp b/wrapper/MM/BondRestraints.pypp.cpp index 5bc3ea598..1e3cfbde4 100644 --- a/wrapper/MM/BondRestraints.pypp.cpp +++ b/wrapper/MM/BondRestraints.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; SireMM::BondRestraints __copy__(const SireMM::BondRestraints &other){ return SireMM::BondRestraints(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -296,9 +298,9 @@ void register_BondRestraints_class(){ } BondRestraints_exposer.staticmethod( "typeName" ); - BondRestraints_exposer.def( "__copy__", &__copy__); - BondRestraints_exposer.def( "__deepcopy__", &__copy__); - BondRestraints_exposer.def( "clone", &__copy__); + BondRestraints_exposer.def( "__copy__", &__copy__); + BondRestraints_exposer.def( "__deepcopy__", &__copy__); + BondRestraints_exposer.def( "clone", &__copy__); BondRestraints_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::BondRestraints >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); BondRestraints_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::BondRestraints >, diff --git a/wrapper/MM/BondSymbols.pypp.cpp b/wrapper/MM/BondSymbols.pypp.cpp index b9feb17f3..71815128c 100644 --- a/wrapper/MM/BondSymbols.pypp.cpp +++ b/wrapper/MM/BondSymbols.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::BondSymbols __copy__(const SireMM::BondSymbols &other){ return SireMM::BondSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::BondSymbols&){ return "SireMM::BondSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -56,9 +58,9 @@ void register_BondSymbols_class(){ , "Return the symbol representing the vector along the bond (r)" ); } - BondSymbols_exposer.def( "__copy__", &__copy__); - BondSymbols_exposer.def( "__deepcopy__", &__copy__); - BondSymbols_exposer.def( "clone", &__copy__); + BondSymbols_exposer.def( "__copy__", &__copy__); + BondSymbols_exposer.def( "__deepcopy__", &__copy__); + BondSymbols_exposer.def( "clone", &__copy__); BondSymbols_exposer.def( "__str__", &pvt_get_name); BondSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/BoreschRestraint.pypp.cpp b/wrapper/MM/BoreschRestraint.pypp.cpp index e9bbc0d19..2e1e94b19 100644 --- a/wrapper/MM/BoreschRestraint.pypp.cpp +++ b/wrapper/MM/BoreschRestraint.pypp.cpp @@ -25,6 +25,8 @@ namespace bp = boost::python; SireMM::BoreschRestraint __copy__(const SireMM::BoreschRestraint &other){ return SireMM::BoreschRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -201,9 +203,9 @@ void register_BoreschRestraint_class(){ } BoreschRestraint_exposer.staticmethod( "typeName" ); - BoreschRestraint_exposer.def( "__copy__", &__copy__); - BoreschRestraint_exposer.def( "__deepcopy__", &__copy__); - BoreschRestraint_exposer.def( "clone", &__copy__); + BoreschRestraint_exposer.def( "__copy__", &__copy__); + BoreschRestraint_exposer.def( "__deepcopy__", &__copy__); + BoreschRestraint_exposer.def( "clone", &__copy__); BoreschRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::BoreschRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); BoreschRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::BoreschRestraint >, diff --git a/wrapper/MM/BoreschRestraints.pypp.cpp b/wrapper/MM/BoreschRestraints.pypp.cpp index 9f45de923..09ca8e9ad 100644 --- a/wrapper/MM/BoreschRestraints.pypp.cpp +++ b/wrapper/MM/BoreschRestraints.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; SireMM::BoreschRestraints __copy__(const SireMM::BoreschRestraints &other){ return SireMM::BoreschRestraints(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -224,9 +226,9 @@ void register_BoreschRestraints_class(){ } BoreschRestraints_exposer.staticmethod( "typeName" ); - BoreschRestraints_exposer.def( "__copy__", &__copy__); - BoreschRestraints_exposer.def( "__deepcopy__", &__copy__); - BoreschRestraints_exposer.def( "clone", &__copy__); + BoreschRestraints_exposer.def( "__copy__", &__copy__); + BoreschRestraints_exposer.def( "__deepcopy__", &__copy__); + BoreschRestraints_exposer.def( "clone", &__copy__); BoreschRestraints_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::BoreschRestraints >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); BoreschRestraints_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::BoreschRestraints >, diff --git a/wrapper/MM/CHARMMSwitchingFunction.pypp.cpp b/wrapper/MM/CHARMMSwitchingFunction.pypp.cpp index abd025786..185203bea 100644 --- a/wrapper/MM/CHARMMSwitchingFunction.pypp.cpp +++ b/wrapper/MM/CHARMMSwitchingFunction.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; SireMM::CHARMMSwitchingFunction __copy__(const SireMM::CHARMMSwitchingFunction &other){ return SireMM::CHARMMSwitchingFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -138,9 +140,9 @@ void register_CHARMMSwitchingFunction_class(){ } CHARMMSwitchingFunction_exposer.staticmethod( "typeName" ); - CHARMMSwitchingFunction_exposer.def( "__copy__", &__copy__); - CHARMMSwitchingFunction_exposer.def( "__deepcopy__", &__copy__); - CHARMMSwitchingFunction_exposer.def( "clone", &__copy__); + CHARMMSwitchingFunction_exposer.def( "__copy__", &__copy__); + CHARMMSwitchingFunction_exposer.def( "__deepcopy__", &__copy__); + CHARMMSwitchingFunction_exposer.def( "clone", &__copy__); CHARMMSwitchingFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CHARMMSwitchingFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CHARMMSwitchingFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CHARMMSwitchingFunction >, diff --git a/wrapper/MM/CLJ14Group.pypp.cpp b/wrapper/MM/CLJ14Group.pypp.cpp index 4bf4b90e7..1a8c3c7c1 100644 --- a/wrapper/MM/CLJ14Group.pypp.cpp +++ b/wrapper/MM/CLJ14Group.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; SireMM::CLJ14Group __copy__(const SireMM::CLJ14Group &other){ return SireMM::CLJ14Group(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -378,9 +380,9 @@ void register_CLJ14Group_class(){ } CLJ14Group_exposer.staticmethod( "typeName" ); - CLJ14Group_exposer.def( "__copy__", &__copy__); - CLJ14Group_exposer.def( "__deepcopy__", &__copy__); - CLJ14Group_exposer.def( "clone", &__copy__); + CLJ14Group_exposer.def( "__copy__", &__copy__); + CLJ14Group_exposer.def( "__deepcopy__", &__copy__); + CLJ14Group_exposer.def( "clone", &__copy__); CLJ14Group_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJ14Group >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJ14Group_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJ14Group >, diff --git a/wrapper/MM/CLJAtom.pypp.cpp b/wrapper/MM/CLJAtom.pypp.cpp index 94938ef32..2c15d1f1e 100644 --- a/wrapper/MM/CLJAtom.pypp.cpp +++ b/wrapper/MM/CLJAtom.pypp.cpp @@ -45,6 +45,8 @@ namespace bp = boost::python; SireMM::CLJAtom __copy__(const SireMM::CLJAtom &other){ return SireMM::CLJAtom(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -208,9 +210,9 @@ void register_CLJAtom_class(){ } CLJAtom_exposer.staticmethod( "buildFrom" ); CLJAtom_exposer.staticmethod( "typeName" ); - CLJAtom_exposer.def( "__copy__", &__copy__); - CLJAtom_exposer.def( "__deepcopy__", &__copy__); - CLJAtom_exposer.def( "clone", &__copy__); + CLJAtom_exposer.def( "__copy__", &__copy__); + CLJAtom_exposer.def( "__deepcopy__", &__copy__); + CLJAtom_exposer.def( "clone", &__copy__); CLJAtom_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJAtom >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJAtom_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJAtom >, diff --git a/wrapper/MM/CLJAtoms.pypp.cpp b/wrapper/MM/CLJAtoms.pypp.cpp index b69079ed8..4678aaafe 100644 --- a/wrapper/MM/CLJAtoms.pypp.cpp +++ b/wrapper/MM/CLJAtoms.pypp.cpp @@ -45,6 +45,8 @@ namespace bp = boost::python; SireMM::CLJAtoms __copy__(const SireMM::CLJAtoms &other){ return SireMM::CLJAtoms(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -650,9 +652,9 @@ void register_CLJAtoms_class(){ } CLJAtoms_exposer.staticmethod( "idOfDummy" ); CLJAtoms_exposer.staticmethod( "typeName" ); - CLJAtoms_exposer.def( "__copy__", &__copy__); - CLJAtoms_exposer.def( "__deepcopy__", &__copy__); - CLJAtoms_exposer.def( "clone", &__copy__); + CLJAtoms_exposer.def( "__copy__", &__copy__); + CLJAtoms_exposer.def( "__deepcopy__", &__copy__); + CLJAtoms_exposer.def( "clone", &__copy__); CLJAtoms_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJAtoms >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJAtoms_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJAtoms >, diff --git a/wrapper/MM/CLJBox.pypp.cpp b/wrapper/MM/CLJBox.pypp.cpp index 8e1d1beb8..974f838d3 100644 --- a/wrapper/MM/CLJBox.pypp.cpp +++ b/wrapper/MM/CLJBox.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; SireMM::CLJBox __copy__(const SireMM::CLJBox &other){ return SireMM::CLJBox(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -331,9 +333,9 @@ void register_CLJBox_class(){ } CLJBox_exposer.staticmethod( "typeName" ); - CLJBox_exposer.def( "__copy__", &__copy__); - CLJBox_exposer.def( "__deepcopy__", &__copy__); - CLJBox_exposer.def( "clone", &__copy__); + CLJBox_exposer.def( "__copy__", &__copy__); + CLJBox_exposer.def( "__deepcopy__", &__copy__); + CLJBox_exposer.def( "clone", &__copy__); CLJBox_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJBox >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJBox_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJBox >, diff --git a/wrapper/MM/CLJBoxDistance.pypp.cpp b/wrapper/MM/CLJBoxDistance.pypp.cpp index 1b9476b60..c11a7a398 100644 --- a/wrapper/MM/CLJBoxDistance.pypp.cpp +++ b/wrapper/MM/CLJBoxDistance.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; SireMM::CLJBoxDistance __copy__(const SireMM::CLJBoxDistance &other){ return SireMM::CLJBoxDistance(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -141,9 +143,9 @@ void register_CLJBoxDistance_class(){ } CLJBoxDistance_exposer.staticmethod( "typeName" ); - CLJBoxDistance_exposer.def( "__copy__", &__copy__); - CLJBoxDistance_exposer.def( "__deepcopy__", &__copy__); - CLJBoxDistance_exposer.def( "clone", &__copy__); + CLJBoxDistance_exposer.def( "__copy__", &__copy__); + CLJBoxDistance_exposer.def( "__deepcopy__", &__copy__); + CLJBoxDistance_exposer.def( "clone", &__copy__); CLJBoxDistance_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJBoxDistance >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJBoxDistance_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJBoxDistance >, diff --git a/wrapper/MM/CLJBoxIndex.pypp.cpp b/wrapper/MM/CLJBoxIndex.pypp.cpp index 9f6709450..ff2415b67 100644 --- a/wrapper/MM/CLJBoxIndex.pypp.cpp +++ b/wrapper/MM/CLJBoxIndex.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; SireMM::CLJBoxIndex __copy__(const SireMM::CLJBoxIndex &other){ return SireMM::CLJBoxIndex(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -336,9 +338,9 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.staticmethod( "createWithInverseBoxLength" ); CLJBoxIndex_exposer.staticmethod( "null" ); CLJBoxIndex_exposer.staticmethod( "typeName" ); - CLJBoxIndex_exposer.def( "__copy__", &__copy__); - CLJBoxIndex_exposer.def( "__deepcopy__", &__copy__); - CLJBoxIndex_exposer.def( "clone", &__copy__); + CLJBoxIndex_exposer.def( "__copy__", &__copy__); + CLJBoxIndex_exposer.def( "__deepcopy__", &__copy__); + CLJBoxIndex_exposer.def( "clone", &__copy__); CLJBoxIndex_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJBoxIndex >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJBoxIndex_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJBoxIndex >, diff --git a/wrapper/MM/CLJBoxes.pypp.cpp b/wrapper/MM/CLJBoxes.pypp.cpp index da35c1204..34648c630 100644 --- a/wrapper/MM/CLJBoxes.pypp.cpp +++ b/wrapper/MM/CLJBoxes.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; SireMM::CLJBoxes __copy__(const SireMM::CLJBoxes &other){ return SireMM::CLJBoxes(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -527,9 +529,9 @@ void register_CLJBoxes_class(){ } CLJBoxes_exposer.staticmethod( "getDistances" ); CLJBoxes_exposer.staticmethod( "typeName" ); - CLJBoxes_exposer.def( "__copy__", &__copy__); - CLJBoxes_exposer.def( "__deepcopy__", &__copy__); - CLJBoxes_exposer.def( "clone", &__copy__); + CLJBoxes_exposer.def( "__copy__", &__copy__); + CLJBoxes_exposer.def( "__deepcopy__", &__copy__); + CLJBoxes_exposer.def( "clone", &__copy__); CLJBoxes_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJBoxes >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJBoxes_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJBoxes >, diff --git a/wrapper/MM/CLJCalculator.pypp.cpp b/wrapper/MM/CLJCalculator.pypp.cpp index 02d8c7667..b5e6ff362 100644 --- a/wrapper/MM/CLJCalculator.pypp.cpp +++ b/wrapper/MM/CLJCalculator.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; SireMM::CLJCalculator __copy__(const SireMM::CLJCalculator &other){ return SireMM::CLJCalculator(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -170,9 +172,9 @@ void register_CLJCalculator_class(){ } CLJCalculator_exposer.staticmethod( "typeName" ); - CLJCalculator_exposer.def( "__copy__", &__copy__); - CLJCalculator_exposer.def( "__deepcopy__", &__copy__); - CLJCalculator_exposer.def( "clone", &__copy__); + CLJCalculator_exposer.def( "__copy__", &__copy__); + CLJCalculator_exposer.def( "__deepcopy__", &__copy__); + CLJCalculator_exposer.def( "clone", &__copy__); CLJCalculator_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJCalculator >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJCalculator_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJCalculator >, diff --git a/wrapper/MM/CLJComponent.pypp.cpp b/wrapper/MM/CLJComponent.pypp.cpp index fda2f73c9..27468c4b3 100644 --- a/wrapper/MM/CLJComponent.pypp.cpp +++ b/wrapper/MM/CLJComponent.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; SireMM::CLJComponent __copy__(const SireMM::CLJComponent &other){ return SireMM::CLJComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -130,9 +132,9 @@ void register_CLJComponent_class(){ } CLJComponent_exposer.staticmethod( "typeName" ); - CLJComponent_exposer.def( "__copy__", &__copy__); - CLJComponent_exposer.def( "__deepcopy__", &__copy__); - CLJComponent_exposer.def( "clone", &__copy__); + CLJComponent_exposer.def( "__copy__", &__copy__); + CLJComponent_exposer.def( "__deepcopy__", &__copy__); + CLJComponent_exposer.def( "clone", &__copy__); CLJComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJComponent >, diff --git a/wrapper/MM/CLJDelta.pypp.cpp b/wrapper/MM/CLJDelta.pypp.cpp index 9be4626ec..012e49f5a 100644 --- a/wrapper/MM/CLJDelta.pypp.cpp +++ b/wrapper/MM/CLJDelta.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireMM::CLJDelta __copy__(const SireMM::CLJDelta &other){ return SireMM::CLJDelta(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -280,9 +282,9 @@ void register_CLJDelta_class(){ CLJDelta_exposer.staticmethod( "mergeNew" ); CLJDelta_exposer.staticmethod( "mergeOld" ); CLJDelta_exposer.staticmethod( "typeName" ); - CLJDelta_exposer.def( "__copy__", &__copy__); - CLJDelta_exposer.def( "__deepcopy__", &__copy__); - CLJDelta_exposer.def( "clone", &__copy__); + CLJDelta_exposer.def( "__copy__", &__copy__); + CLJDelta_exposer.def( "__deepcopy__", &__copy__); + CLJDelta_exposer.def( "clone", &__copy__); CLJDelta_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJDelta >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJDelta_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJDelta >, diff --git a/wrapper/MM/CLJExtractor.pypp.cpp b/wrapper/MM/CLJExtractor.pypp.cpp index 2c454d863..91e2e04a2 100644 --- a/wrapper/MM/CLJExtractor.pypp.cpp +++ b/wrapper/MM/CLJExtractor.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; SireMM::CLJExtractor __copy__(const SireMM::CLJExtractor &other){ return SireMM::CLJExtractor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -409,9 +411,9 @@ void register_CLJExtractor_class(){ } CLJExtractor_exposer.staticmethod( "typeName" ); - CLJExtractor_exposer.def( "__copy__", &__copy__); - CLJExtractor_exposer.def( "__deepcopy__", &__copy__); - CLJExtractor_exposer.def( "clone", &__copy__); + CLJExtractor_exposer.def( "__copy__", &__copy__); + CLJExtractor_exposer.def( "__deepcopy__", &__copy__); + CLJExtractor_exposer.def( "clone", &__copy__); CLJExtractor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJExtractor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJExtractor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJExtractor >, diff --git a/wrapper/MM/CLJGrid.pypp.cpp b/wrapper/MM/CLJGrid.pypp.cpp index 7b0246536..988a53c9e 100644 --- a/wrapper/MM/CLJGrid.pypp.cpp +++ b/wrapper/MM/CLJGrid.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::CLJGrid __copy__(const SireMM::CLJGrid &other){ return SireMM::CLJGrid(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -621,9 +623,9 @@ void register_CLJGrid_class(){ } CLJGrid_exposer.staticmethod( "idOfFixedAtom" ); CLJGrid_exposer.staticmethod( "typeName" ); - CLJGrid_exposer.def( "__copy__", &__copy__); - CLJGrid_exposer.def( "__deepcopy__", &__copy__); - CLJGrid_exposer.def( "clone", &__copy__); + CLJGrid_exposer.def( "__copy__", &__copy__); + CLJGrid_exposer.def( "__deepcopy__", &__copy__); + CLJGrid_exposer.def( "clone", &__copy__); CLJGrid_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJGrid >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJGrid_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJGrid >, diff --git a/wrapper/MM/CLJGroup.pypp.cpp b/wrapper/MM/CLJGroup.pypp.cpp index 9680cb2b3..17c1097b0 100644 --- a/wrapper/MM/CLJGroup.pypp.cpp +++ b/wrapper/MM/CLJGroup.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireMM::CLJGroup __copy__(const SireMM::CLJGroup &other){ return SireMM::CLJGroup(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -458,9 +460,9 @@ void register_CLJGroup_class(){ } CLJGroup_exposer.staticmethod( "typeName" ); - CLJGroup_exposer.def( "__copy__", &__copy__); - CLJGroup_exposer.def( "__deepcopy__", &__copy__); - CLJGroup_exposer.def( "clone", &__copy__); + CLJGroup_exposer.def( "__copy__", &__copy__); + CLJGroup_exposer.def( "__deepcopy__", &__copy__); + CLJGroup_exposer.def( "clone", &__copy__); CLJGroup_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJGroup >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJGroup_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJGroup >, diff --git a/wrapper/MM/CLJIntraRFFunction.pypp.cpp b/wrapper/MM/CLJIntraRFFunction.pypp.cpp index 472bb1b4a..274b71f7a 100644 --- a/wrapper/MM/CLJIntraRFFunction.pypp.cpp +++ b/wrapper/MM/CLJIntraRFFunction.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::CLJIntraRFFunction __copy__(const SireMM::CLJIntraRFFunction &other){ return SireMM::CLJIntraRFFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -186,9 +188,9 @@ void register_CLJIntraRFFunction_class(){ } CLJIntraRFFunction_exposer.staticmethod( "defaultRFFunction" ); CLJIntraRFFunction_exposer.staticmethod( "typeName" ); - CLJIntraRFFunction_exposer.def( "__copy__", &__copy__); - CLJIntraRFFunction_exposer.def( "__deepcopy__", &__copy__); - CLJIntraRFFunction_exposer.def( "clone", &__copy__); + CLJIntraRFFunction_exposer.def( "__copy__", &__copy__); + CLJIntraRFFunction_exposer.def( "__deepcopy__", &__copy__); + CLJIntraRFFunction_exposer.def( "clone", &__copy__); CLJIntraRFFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJIntraRFFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJIntraRFFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJIntraRFFunction >, diff --git a/wrapper/MM/CLJIntraShiftFunction.pypp.cpp b/wrapper/MM/CLJIntraShiftFunction.pypp.cpp index 1044ce451..1cd139361 100644 --- a/wrapper/MM/CLJIntraShiftFunction.pypp.cpp +++ b/wrapper/MM/CLJIntraShiftFunction.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMM::CLJIntraShiftFunction __copy__(const SireMM::CLJIntraShiftFunction &other){ return SireMM::CLJIntraShiftFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -108,9 +110,9 @@ void register_CLJIntraShiftFunction_class(){ } CLJIntraShiftFunction_exposer.staticmethod( "defaultShiftFunction" ); CLJIntraShiftFunction_exposer.staticmethod( "typeName" ); - CLJIntraShiftFunction_exposer.def( "__copy__", &__copy__); - CLJIntraShiftFunction_exposer.def( "__deepcopy__", &__copy__); - CLJIntraShiftFunction_exposer.def( "clone", &__copy__); + CLJIntraShiftFunction_exposer.def( "__copy__", &__copy__); + CLJIntraShiftFunction_exposer.def( "__deepcopy__", &__copy__); + CLJIntraShiftFunction_exposer.def( "clone", &__copy__); CLJIntraShiftFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJIntraShiftFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJIntraShiftFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJIntraShiftFunction >, diff --git a/wrapper/MM/CLJNBPairs.pypp.cpp b/wrapper/MM/CLJNBPairs.pypp.cpp index c918920de..bf6577f63 100644 --- a/wrapper/MM/CLJNBPairs.pypp.cpp +++ b/wrapper/MM/CLJNBPairs.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::CLJNBPairs __copy__(const SireMM::CLJNBPairs &other){ return SireMM::CLJNBPairs(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -83,7 +85,7 @@ void register_CLJNBPairs_class(){ "merge" , merge_function_value , ( bp::arg("other"), bp::arg("mapping"), bp::arg("ghost")=::QString( ), bp::arg("map")=SireBase::PropertyMap() ) - , "" ); + , "Merge this property with another property" ); } { //::SireMM::CLJNBPairs::nExcludedAtoms @@ -151,9 +153,9 @@ void register_CLJNBPairs_class(){ } CLJNBPairs_exposer.staticmethod( "typeName" ); - CLJNBPairs_exposer.def( "__copy__", &__copy__); - CLJNBPairs_exposer.def( "__deepcopy__", &__copy__); - CLJNBPairs_exposer.def( "clone", &__copy__); + CLJNBPairs_exposer.def( "__copy__", &__copy__); + CLJNBPairs_exposer.def( "__deepcopy__", &__copy__); + CLJNBPairs_exposer.def( "clone", &__copy__); CLJNBPairs_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJNBPairs >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJNBPairs_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJNBPairs >, diff --git a/wrapper/MM/CLJParameterNames.pypp.cpp b/wrapper/MM/CLJParameterNames.pypp.cpp index b93550b69..b4aba2539 100644 --- a/wrapper/MM/CLJParameterNames.pypp.cpp +++ b/wrapper/MM/CLJParameterNames.pypp.cpp @@ -43,6 +43,8 @@ namespace bp = boost::python; SireMM::CLJParameterNames __copy__(const SireMM::CLJParameterNames &other){ return SireMM::CLJParameterNames(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::CLJParameterNames&){ return "SireMM::CLJParameterNames";} #include "Helpers/release_gil_policy.hpp" @@ -53,9 +55,9 @@ void register_CLJParameterNames_class(){ typedef bp::class_< SireMM::CLJParameterNames, bp::bases< SireMM::LJParameterName, SireMM::ChargeParameterName > > CLJParameterNames_exposer_t; CLJParameterNames_exposer_t CLJParameterNames_exposer = CLJParameterNames_exposer_t( "CLJParameterNames", "This class provides the default name of the properties\nthat contain the charge and LJ parameters", bp::init< >("") ); bp::scope CLJParameterNames_scope( CLJParameterNames_exposer ); - CLJParameterNames_exposer.def( "__copy__", &__copy__); - CLJParameterNames_exposer.def( "__deepcopy__", &__copy__); - CLJParameterNames_exposer.def( "clone", &__copy__); + CLJParameterNames_exposer.def( "__copy__", &__copy__); + CLJParameterNames_exposer.def( "__deepcopy__", &__copy__); + CLJParameterNames_exposer.def( "clone", &__copy__); CLJParameterNames_exposer.def( "__str__", &pvt_get_name); CLJParameterNames_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/CLJParameterNames3D.pypp.cpp b/wrapper/MM/CLJParameterNames3D.pypp.cpp index 24cd8003e..d47c55640 100644 --- a/wrapper/MM/CLJParameterNames3D.pypp.cpp +++ b/wrapper/MM/CLJParameterNames3D.pypp.cpp @@ -43,6 +43,8 @@ namespace bp = boost::python; SireMM::CLJParameterNames3D __copy__(const SireMM::CLJParameterNames3D &other){ return SireMM::CLJParameterNames3D(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::CLJParameterNames3D&){ return "SireMM::CLJParameterNames3D";} #include "Helpers/release_gil_policy.hpp" @@ -53,9 +55,9 @@ void register_CLJParameterNames3D_class(){ typedef bp::class_< SireMM::CLJParameterNames3D, bp::bases< SireMM::CLJParameterNames, SireMM::LJParameterName, SireMM::ChargeParameterName > > CLJParameterNames3D_exposer_t; CLJParameterNames3D_exposer_t CLJParameterNames3D_exposer = CLJParameterNames3D_exposer_t( "CLJParameterNames3D", "This class provides the default name of the properties\nthat contain the charge, LJ and 3D coordinates properties", bp::init< >("") ); bp::scope CLJParameterNames3D_scope( CLJParameterNames3D_exposer ); - CLJParameterNames3D_exposer.def( "__copy__", &__copy__); - CLJParameterNames3D_exposer.def( "__deepcopy__", &__copy__); - CLJParameterNames3D_exposer.def( "clone", &__copy__); + CLJParameterNames3D_exposer.def( "__copy__", &__copy__); + CLJParameterNames3D_exposer.def( "__deepcopy__", &__copy__); + CLJParameterNames3D_exposer.def( "clone", &__copy__); CLJParameterNames3D_exposer.def( "__str__", &pvt_get_name); CLJParameterNames3D_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/CLJProbe.pypp.cpp b/wrapper/MM/CLJProbe.pypp.cpp index 04bc5e992..06baa5a33 100644 --- a/wrapper/MM/CLJProbe.pypp.cpp +++ b/wrapper/MM/CLJProbe.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireMM::CLJProbe __copy__(const SireMM::CLJProbe &other){ return SireMM::CLJProbe(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -100,9 +102,9 @@ void register_CLJProbe_class(){ } CLJProbe_exposer.staticmethod( "typeName" ); - CLJProbe_exposer.def( "__copy__", &__copy__); - CLJProbe_exposer.def( "__deepcopy__", &__copy__); - CLJProbe_exposer.def( "clone", &__copy__); + CLJProbe_exposer.def( "__copy__", &__copy__); + CLJProbe_exposer.def( "__deepcopy__", &__copy__); + CLJProbe_exposer.def( "clone", &__copy__); CLJProbe_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJProbe >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJProbe_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJProbe >, diff --git a/wrapper/MM/CLJRFFunction.pypp.cpp b/wrapper/MM/CLJRFFunction.pypp.cpp index 97bf5289d..c1605c4bf 100644 --- a/wrapper/MM/CLJRFFunction.pypp.cpp +++ b/wrapper/MM/CLJRFFunction.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::CLJRFFunction __copy__(const SireMM::CLJRFFunction &other){ return SireMM::CLJRFFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -210,9 +212,9 @@ void register_CLJRFFunction_class(){ } CLJRFFunction_exposer.staticmethod( "defaultRFFunction" ); CLJRFFunction_exposer.staticmethod( "typeName" ); - CLJRFFunction_exposer.def( "__copy__", &__copy__); - CLJRFFunction_exposer.def( "__deepcopy__", &__copy__); - CLJRFFunction_exposer.def( "clone", &__copy__); + CLJRFFunction_exposer.def( "__copy__", &__copy__); + CLJRFFunction_exposer.def( "__deepcopy__", &__copy__); + CLJRFFunction_exposer.def( "clone", &__copy__); CLJRFFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJRFFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJRFFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJRFFunction >, diff --git a/wrapper/MM/CLJScaleFactor.pypp.cpp b/wrapper/MM/CLJScaleFactor.pypp.cpp index c5f83d9eb..e66756e5c 100644 --- a/wrapper/MM/CLJScaleFactor.pypp.cpp +++ b/wrapper/MM/CLJScaleFactor.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::CLJScaleFactor __copy__(const SireMM::CLJScaleFactor &other){ return SireMM::CLJScaleFactor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -85,9 +87,9 @@ void register_CLJScaleFactor_class(){ } CLJScaleFactor_exposer.staticmethod( "typeName" ); - CLJScaleFactor_exposer.def( "__copy__", &__copy__); - CLJScaleFactor_exposer.def( "__deepcopy__", &__copy__); - CLJScaleFactor_exposer.def( "clone", &__copy__); + CLJScaleFactor_exposer.def( "__copy__", &__copy__); + CLJScaleFactor_exposer.def( "__deepcopy__", &__copy__); + CLJScaleFactor_exposer.def( "clone", &__copy__); CLJScaleFactor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJScaleFactor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJScaleFactor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJScaleFactor >, diff --git a/wrapper/MM/CLJShiftFunction.pypp.cpp b/wrapper/MM/CLJShiftFunction.pypp.cpp index cc21dae29..8cd87291b 100644 --- a/wrapper/MM/CLJShiftFunction.pypp.cpp +++ b/wrapper/MM/CLJShiftFunction.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMM::CLJShiftFunction __copy__(const SireMM::CLJShiftFunction &other){ return SireMM::CLJShiftFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -132,9 +134,9 @@ void register_CLJShiftFunction_class(){ } CLJShiftFunction_exposer.staticmethod( "defaultShiftFunction" ); CLJShiftFunction_exposer.staticmethod( "typeName" ); - CLJShiftFunction_exposer.def( "__copy__", &__copy__); - CLJShiftFunction_exposer.def( "__deepcopy__", &__copy__); - CLJShiftFunction_exposer.def( "clone", &__copy__); + CLJShiftFunction_exposer.def( "__copy__", &__copy__); + CLJShiftFunction_exposer.def( "__deepcopy__", &__copy__); + CLJShiftFunction_exposer.def( "clone", &__copy__); CLJShiftFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJShiftFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJShiftFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJShiftFunction >, diff --git a/wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp b/wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp index 783f2b1be..5fbb00091 100644 --- a/wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::CLJSoftIntraRFFunction __copy__(const SireMM::CLJSoftIntraRFFunction &other){ return SireMM::CLJSoftIntraRFFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -186,9 +188,9 @@ void register_CLJSoftIntraRFFunction_class(){ } CLJSoftIntraRFFunction_exposer.staticmethod( "defaultRFFunction" ); CLJSoftIntraRFFunction_exposer.staticmethod( "typeName" ); - CLJSoftIntraRFFunction_exposer.def( "__copy__", &__copy__); - CLJSoftIntraRFFunction_exposer.def( "__deepcopy__", &__copy__); - CLJSoftIntraRFFunction_exposer.def( "clone", &__copy__); + CLJSoftIntraRFFunction_exposer.def( "__copy__", &__copy__); + CLJSoftIntraRFFunction_exposer.def( "__deepcopy__", &__copy__); + CLJSoftIntraRFFunction_exposer.def( "clone", &__copy__); CLJSoftIntraRFFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJSoftIntraRFFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJSoftIntraRFFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJSoftIntraRFFunction >, diff --git a/wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp b/wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp index 49534fbb8..8cd02ab93 100644 --- a/wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMM::CLJSoftIntraShiftFunction __copy__(const SireMM::CLJSoftIntraShiftFunction &other){ return SireMM::CLJSoftIntraShiftFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -108,9 +110,9 @@ void register_CLJSoftIntraShiftFunction_class(){ } CLJSoftIntraShiftFunction_exposer.staticmethod( "defaultShiftFunction" ); CLJSoftIntraShiftFunction_exposer.staticmethod( "typeName" ); - CLJSoftIntraShiftFunction_exposer.def( "__copy__", &__copy__); - CLJSoftIntraShiftFunction_exposer.def( "__deepcopy__", &__copy__); - CLJSoftIntraShiftFunction_exposer.def( "clone", &__copy__); + CLJSoftIntraShiftFunction_exposer.def( "__copy__", &__copy__); + CLJSoftIntraShiftFunction_exposer.def( "__deepcopy__", &__copy__); + CLJSoftIntraShiftFunction_exposer.def( "clone", &__copy__); CLJSoftIntraShiftFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJSoftIntraShiftFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJSoftIntraShiftFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJSoftIntraShiftFunction >, diff --git a/wrapper/MM/CLJSoftRFFunction.pypp.cpp b/wrapper/MM/CLJSoftRFFunction.pypp.cpp index 21605ad1c..c0461ef4b 100644 --- a/wrapper/MM/CLJSoftRFFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftRFFunction.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::CLJSoftRFFunction __copy__(const SireMM::CLJSoftRFFunction &other){ return SireMM::CLJSoftRFFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -198,9 +200,9 @@ void register_CLJSoftRFFunction_class(){ } CLJSoftRFFunction_exposer.staticmethod( "defaultRFFunction" ); CLJSoftRFFunction_exposer.staticmethod( "typeName" ); - CLJSoftRFFunction_exposer.def( "__copy__", &__copy__); - CLJSoftRFFunction_exposer.def( "__deepcopy__", &__copy__); - CLJSoftRFFunction_exposer.def( "clone", &__copy__); + CLJSoftRFFunction_exposer.def( "__copy__", &__copy__); + CLJSoftRFFunction_exposer.def( "__deepcopy__", &__copy__); + CLJSoftRFFunction_exposer.def( "clone", &__copy__); CLJSoftRFFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJSoftRFFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJSoftRFFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJSoftRFFunction >, diff --git a/wrapper/MM/CLJSoftShiftFunction.pypp.cpp b/wrapper/MM/CLJSoftShiftFunction.pypp.cpp index f561e3ed0..ffcab1e0a 100644 --- a/wrapper/MM/CLJSoftShiftFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftShiftFunction.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMM::CLJSoftShiftFunction __copy__(const SireMM::CLJSoftShiftFunction &other){ return SireMM::CLJSoftShiftFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -120,9 +122,9 @@ void register_CLJSoftShiftFunction_class(){ } CLJSoftShiftFunction_exposer.staticmethod( "defaultShiftFunction" ); CLJSoftShiftFunction_exposer.staticmethod( "typeName" ); - CLJSoftShiftFunction_exposer.def( "__copy__", &__copy__); - CLJSoftShiftFunction_exposer.def( "__deepcopy__", &__copy__); - CLJSoftShiftFunction_exposer.def( "clone", &__copy__); + CLJSoftShiftFunction_exposer.def( "__copy__", &__copy__); + CLJSoftShiftFunction_exposer.def( "__deepcopy__", &__copy__); + CLJSoftShiftFunction_exposer.def( "clone", &__copy__); CLJSoftShiftFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJSoftShiftFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJSoftShiftFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJSoftShiftFunction >, diff --git a/wrapper/MM/CLJWorkspace.pypp.cpp b/wrapper/MM/CLJWorkspace.pypp.cpp index 3cbb6a1bc..a478e200f 100644 --- a/wrapper/MM/CLJWorkspace.pypp.cpp +++ b/wrapper/MM/CLJWorkspace.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; SireMM::CLJWorkspace __copy__(const SireMM::CLJWorkspace &other){ return SireMM::CLJWorkspace(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -351,9 +353,9 @@ void register_CLJWorkspace_class(){ } CLJWorkspace_exposer.staticmethod( "typeName" ); - CLJWorkspace_exposer.def( "__copy__", &__copy__); - CLJWorkspace_exposer.def( "__deepcopy__", &__copy__); - CLJWorkspace_exposer.def( "clone", &__copy__); + CLJWorkspace_exposer.def( "__copy__", &__copy__); + CLJWorkspace_exposer.def( "__deepcopy__", &__copy__); + CLJWorkspace_exposer.def( "clone", &__copy__); CLJWorkspace_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CLJWorkspace >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CLJWorkspace_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CLJWorkspace >, diff --git a/wrapper/MM/ChargeParameterName.pypp.cpp b/wrapper/MM/ChargeParameterName.pypp.cpp index a324d88dc..7932d34ed 100644 --- a/wrapper/MM/ChargeParameterName.pypp.cpp +++ b/wrapper/MM/ChargeParameterName.pypp.cpp @@ -41,6 +41,8 @@ namespace bp = boost::python; SireMM::ChargeParameterName __copy__(const SireMM::ChargeParameterName &other){ return SireMM::ChargeParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::ChargeParameterName&){ return "SireMM::ChargeParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -63,9 +65,9 @@ void register_ChargeParameterName_class(){ , "" ); } - ChargeParameterName_exposer.def( "__copy__", &__copy__); - ChargeParameterName_exposer.def( "__deepcopy__", &__copy__); - ChargeParameterName_exposer.def( "clone", &__copy__); + ChargeParameterName_exposer.def( "__copy__", &__copy__); + ChargeParameterName_exposer.def( "__deepcopy__", &__copy__); + ChargeParameterName_exposer.def( "clone", &__copy__); ChargeParameterName_exposer.def( "__str__", &pvt_get_name); ChargeParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/ChargeParameterName3D.pypp.cpp b/wrapper/MM/ChargeParameterName3D.pypp.cpp index 8db9d1cbf..6ccb96d4c 100644 --- a/wrapper/MM/ChargeParameterName3D.pypp.cpp +++ b/wrapper/MM/ChargeParameterName3D.pypp.cpp @@ -41,6 +41,8 @@ namespace bp = boost::python; SireMM::ChargeParameterName3D __copy__(const SireMM::ChargeParameterName3D &other){ return SireMM::ChargeParameterName3D(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::ChargeParameterName3D&){ return "SireMM::ChargeParameterName3D";} #include "Helpers/release_gil_policy.hpp" @@ -51,9 +53,9 @@ void register_ChargeParameterName3D_class(){ typedef bp::class_< SireMM::ChargeParameterName3D, bp::bases< SireMM::ChargeParameterName > > ChargeParameterName3D_exposer_t; ChargeParameterName3D_exposer_t ChargeParameterName3D_exposer = ChargeParameterName3D_exposer_t( "ChargeParameterName3D", "This class provides the default name of the properties\nthat contain the charge, LJ and 3D coordinates properties", bp::init< >("") ); bp::scope ChargeParameterName3D_scope( ChargeParameterName3D_exposer ); - ChargeParameterName3D_exposer.def( "__copy__", &__copy__); - ChargeParameterName3D_exposer.def( "__deepcopy__", &__copy__); - ChargeParameterName3D_exposer.def( "clone", &__copy__); + ChargeParameterName3D_exposer.def( "__copy__", &__copy__); + ChargeParameterName3D_exposer.def( "__deepcopy__", &__copy__); + ChargeParameterName3D_exposer.def( "clone", &__copy__); ChargeParameterName3D_exposer.def( "__str__", &pvt_get_name); ChargeParameterName3D_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/CoulombComponent.pypp.cpp b/wrapper/MM/CoulombComponent.pypp.cpp index 683f83e5f..965ab6f78 100644 --- a/wrapper/MM/CoulombComponent.pypp.cpp +++ b/wrapper/MM/CoulombComponent.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; SireMM::CoulombComponent __copy__(const SireMM::CoulombComponent &other){ return SireMM::CoulombComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -106,9 +108,9 @@ void register_CoulombComponent_class(){ } CoulombComponent_exposer.staticmethod( "typeName" ); - CoulombComponent_exposer.def( "__copy__", &__copy__); - CoulombComponent_exposer.def( "__deepcopy__", &__copy__); - CoulombComponent_exposer.def( "clone", &__copy__); + CoulombComponent_exposer.def( "__copy__", &__copy__); + CoulombComponent_exposer.def( "__deepcopy__", &__copy__); + CoulombComponent_exposer.def( "clone", &__copy__); CoulombComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CoulombComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CoulombComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CoulombComponent >, diff --git a/wrapper/MM/CoulombNBPairs.pypp.cpp b/wrapper/MM/CoulombNBPairs.pypp.cpp index a80af7324..cf40221c1 100644 --- a/wrapper/MM/CoulombNBPairs.pypp.cpp +++ b/wrapper/MM/CoulombNBPairs.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::CoulombNBPairs __copy__(const SireMM::CoulombNBPairs &other){ return SireMM::CoulombNBPairs(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -76,9 +78,9 @@ void register_CoulombNBPairs_class(){ } CoulombNBPairs_exposer.staticmethod( "typeName" ); - CoulombNBPairs_exposer.def( "__copy__", &__copy__); - CoulombNBPairs_exposer.def( "__deepcopy__", &__copy__); - CoulombNBPairs_exposer.def( "clone", &__copy__); + CoulombNBPairs_exposer.def( "__copy__", &__copy__); + CoulombNBPairs_exposer.def( "__deepcopy__", &__copy__); + CoulombNBPairs_exposer.def( "clone", &__copy__); CoulombNBPairs_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CoulombNBPairs >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CoulombNBPairs_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CoulombNBPairs >, diff --git a/wrapper/MM/CoulombProbe.pypp.cpp b/wrapper/MM/CoulombProbe.pypp.cpp index 2e51a8328..f820958b1 100644 --- a/wrapper/MM/CoulombProbe.pypp.cpp +++ b/wrapper/MM/CoulombProbe.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireMM::CoulombProbe __copy__(const SireMM::CoulombProbe &other){ return SireMM::CoulombProbe(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -85,9 +87,9 @@ void register_CoulombProbe_class(){ } CoulombProbe_exposer.staticmethod( "typeName" ); - CoulombProbe_exposer.def( "__copy__", &__copy__); - CoulombProbe_exposer.def( "__deepcopy__", &__copy__); - CoulombProbe_exposer.def( "clone", &__copy__); + CoulombProbe_exposer.def( "__copy__", &__copy__); + CoulombProbe_exposer.def( "__deepcopy__", &__copy__); + CoulombProbe_exposer.def( "clone", &__copy__); CoulombProbe_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CoulombProbe >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CoulombProbe_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CoulombProbe >, diff --git a/wrapper/MM/CoulombScaleFactor.pypp.cpp b/wrapper/MM/CoulombScaleFactor.pypp.cpp index 299db676a..3072d6dbf 100644 --- a/wrapper/MM/CoulombScaleFactor.pypp.cpp +++ b/wrapper/MM/CoulombScaleFactor.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::CoulombScaleFactor __copy__(const SireMM::CoulombScaleFactor &other){ return SireMM::CoulombScaleFactor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireMM::CoulombScaleFactor&){ return "SireMM::CoulombScaleFactor";} @@ -84,9 +86,9 @@ void register_CoulombScaleFactor_class(){ } CoulombScaleFactor_exposer.staticmethod( "typeName" ); - CoulombScaleFactor_exposer.def( "__copy__", &__copy__); - CoulombScaleFactor_exposer.def( "__deepcopy__", &__copy__); - CoulombScaleFactor_exposer.def( "clone", &__copy__); + CoulombScaleFactor_exposer.def( "__copy__", &__copy__); + CoulombScaleFactor_exposer.def( "__deepcopy__", &__copy__); + CoulombScaleFactor_exposer.def( "clone", &__copy__); CoulombScaleFactor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::CoulombScaleFactor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); CoulombScaleFactor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::CoulombScaleFactor >, diff --git a/wrapper/MM/Dihedral.pypp.cpp b/wrapper/MM/Dihedral.pypp.cpp index abf7cdd74..380f98f90 100644 --- a/wrapper/MM/Dihedral.pypp.cpp +++ b/wrapper/MM/Dihedral.pypp.cpp @@ -42,6 +42,8 @@ namespace bp = boost::python; SireMM::Dihedral __copy__(const SireMM::Dihedral &other){ return SireMM::Dihedral(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -483,9 +485,9 @@ void register_Dihedral_class(){ } Dihedral_exposer.staticmethod( "typeName" ); - Dihedral_exposer.def( "__copy__", &__copy__); - Dihedral_exposer.def( "__deepcopy__", &__copy__); - Dihedral_exposer.def( "clone", &__copy__); + Dihedral_exposer.def( "__copy__", &__copy__); + Dihedral_exposer.def( "__deepcopy__", &__copy__); + Dihedral_exposer.def( "clone", &__copy__); Dihedral_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::Dihedral >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Dihedral_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::Dihedral >, diff --git a/wrapper/MM/DihedralComponent.pypp.cpp b/wrapper/MM/DihedralComponent.pypp.cpp index 537830aca..8d10f067b 100644 --- a/wrapper/MM/DihedralComponent.pypp.cpp +++ b/wrapper/MM/DihedralComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::DihedralComponent __copy__(const SireMM::DihedralComponent &other){ return SireMM::DihedralComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_DihedralComponent_class(){ } 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< ::SireMM::DihedralComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); DihedralComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::DihedralComponent >, diff --git a/wrapper/MM/DihedralParameterName.pypp.cpp b/wrapper/MM/DihedralParameterName.pypp.cpp index 36ddb6c5f..f2eb7e9dc 100644 --- a/wrapper/MM/DihedralParameterName.pypp.cpp +++ b/wrapper/MM/DihedralParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::DihedralParameterName __copy__(const SireMM::DihedralParameterName &other){ return SireMM::DihedralParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::DihedralParameterName&){ return "SireMM::DihedralParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_DihedralParameterName_class(){ , "" ); } - DihedralParameterName_exposer.def( "__copy__", &__copy__); - DihedralParameterName_exposer.def( "__deepcopy__", &__copy__); - DihedralParameterName_exposer.def( "clone", &__copy__); + DihedralParameterName_exposer.def( "__copy__", &__copy__); + DihedralParameterName_exposer.def( "__deepcopy__", &__copy__); + DihedralParameterName_exposer.def( "clone", &__copy__); DihedralParameterName_exposer.def( "__str__", &pvt_get_name); DihedralParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/DihedralRestraint.pypp.cpp b/wrapper/MM/DihedralRestraint.pypp.cpp index e133849e6..65ed2feb1 100644 --- a/wrapper/MM/DihedralRestraint.pypp.cpp +++ b/wrapper/MM/DihedralRestraint.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; SireMM::DihedralRestraint __copy__(const SireMM::DihedralRestraint &other){ return SireMM::DihedralRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -369,9 +371,9 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.staticmethod( "harmonic" ); DihedralRestraint_exposer.staticmethod( "phi" ); DihedralRestraint_exposer.staticmethod( "typeName" ); - DihedralRestraint_exposer.def( "__copy__", &__copy__); - DihedralRestraint_exposer.def( "__deepcopy__", &__copy__); - DihedralRestraint_exposer.def( "clone", &__copy__); + DihedralRestraint_exposer.def( "__copy__", &__copy__); + DihedralRestraint_exposer.def( "__deepcopy__", &__copy__); + DihedralRestraint_exposer.def( "clone", &__copy__); DihedralRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::DihedralRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); DihedralRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::DihedralRestraint >, diff --git a/wrapper/MM/DihedralSymbols.pypp.cpp b/wrapper/MM/DihedralSymbols.pypp.cpp index 9e0259739..3d7fa0d59 100644 --- a/wrapper/MM/DihedralSymbols.pypp.cpp +++ b/wrapper/MM/DihedralSymbols.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::DihedralSymbols __copy__(const SireMM::DihedralSymbols &other){ return SireMM::DihedralSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::DihedralSymbols&){ return "SireMM::DihedralSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -56,9 +58,9 @@ void register_DihedralSymbols_class(){ , "Return the symbol representing the torsion (phi)" ); } - DihedralSymbols_exposer.def( "__copy__", &__copy__); - DihedralSymbols_exposer.def( "__deepcopy__", &__copy__); - DihedralSymbols_exposer.def( "clone", &__copy__); + DihedralSymbols_exposer.def( "__copy__", &__copy__); + DihedralSymbols_exposer.def( "__deepcopy__", &__copy__); + DihedralSymbols_exposer.def( "clone", &__copy__); DihedralSymbols_exposer.def( "__str__", &pvt_get_name); DihedralSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/DistanceRestraint.pypp.cpp b/wrapper/MM/DistanceRestraint.pypp.cpp index 1f59e2873..752ae2b93 100644 --- a/wrapper/MM/DistanceRestraint.pypp.cpp +++ b/wrapper/MM/DistanceRestraint.pypp.cpp @@ -32,6 +32,8 @@ namespace bp = boost::python; SireMM::DistanceRestraint __copy__(const SireMM::DistanceRestraint &other){ return SireMM::DistanceRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -341,9 +343,9 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.staticmethod( "harmonic" ); DistanceRestraint_exposer.staticmethod( "r" ); DistanceRestraint_exposer.staticmethod( "typeName" ); - DistanceRestraint_exposer.def( "__copy__", &__copy__); - DistanceRestraint_exposer.def( "__deepcopy__", &__copy__); - DistanceRestraint_exposer.def( "clone", &__copy__); + DistanceRestraint_exposer.def( "__copy__", &__copy__); + DistanceRestraint_exposer.def( "__deepcopy__", &__copy__); + DistanceRestraint_exposer.def( "clone", &__copy__); DistanceRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::DistanceRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); DistanceRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::DistanceRestraint >, diff --git a/wrapper/MM/DoubleDistanceRestraint.pypp.cpp b/wrapper/MM/DoubleDistanceRestraint.pypp.cpp index 47595c01b..585f63ed8 100644 --- a/wrapper/MM/DoubleDistanceRestraint.pypp.cpp +++ b/wrapper/MM/DoubleDistanceRestraint.pypp.cpp @@ -32,6 +32,8 @@ namespace bp = boost::python; SireMM::DoubleDistanceRestraint __copy__(const SireMM::DoubleDistanceRestraint &other){ return SireMM::DoubleDistanceRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -362,9 +364,9 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.staticmethod( "r01" ); DoubleDistanceRestraint_exposer.staticmethod( "r23" ); DoubleDistanceRestraint_exposer.staticmethod( "typeName" ); - DoubleDistanceRestraint_exposer.def( "__copy__", &__copy__); - DoubleDistanceRestraint_exposer.def( "__deepcopy__", &__copy__); - DoubleDistanceRestraint_exposer.def( "clone", &__copy__); + DoubleDistanceRestraint_exposer.def( "__copy__", &__copy__); + DoubleDistanceRestraint_exposer.def( "__deepcopy__", &__copy__); + DoubleDistanceRestraint_exposer.def( "clone", &__copy__); DoubleDistanceRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::DoubleDistanceRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); DoubleDistanceRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::DoubleDistanceRestraint >, diff --git a/wrapper/MM/ExcludedPairs.pypp.cpp b/wrapper/MM/ExcludedPairs.pypp.cpp index 3b4c4d621..b480d1a38 100644 --- a/wrapper/MM/ExcludedPairs.pypp.cpp +++ b/wrapper/MM/ExcludedPairs.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::ExcludedPairs __copy__(const SireMM::ExcludedPairs &other){ return SireMM::ExcludedPairs(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -199,9 +201,9 @@ void register_ExcludedPairs_class(){ } ExcludedPairs_exposer.staticmethod( "typeName" ); - ExcludedPairs_exposer.def( "__copy__", &__copy__); - ExcludedPairs_exposer.def( "__deepcopy__", &__copy__); - ExcludedPairs_exposer.def( "clone", &__copy__); + ExcludedPairs_exposer.def( "__copy__", &__copy__); + ExcludedPairs_exposer.def( "__deepcopy__", &__copy__); + ExcludedPairs_exposer.def( "clone", &__copy__); ExcludedPairs_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::ExcludedPairs >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ExcludedPairs_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::ExcludedPairs >, diff --git a/wrapper/MM/FourAtomFunction.pypp.cpp b/wrapper/MM/FourAtomFunction.pypp.cpp index 2456677e9..29b950c0c 100644 --- a/wrapper/MM/FourAtomFunction.pypp.cpp +++ b/wrapper/MM/FourAtomFunction.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::FourAtomFunction __copy__(const SireMM::FourAtomFunction &other){ return SireMM::FourAtomFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -123,9 +125,9 @@ void register_FourAtomFunction_class(){ , "Return a string representation" ); } - FourAtomFunction_exposer.def( "__copy__", &__copy__); - FourAtomFunction_exposer.def( "__deepcopy__", &__copy__); - FourAtomFunction_exposer.def( "clone", &__copy__); + FourAtomFunction_exposer.def( "__copy__", &__copy__); + FourAtomFunction_exposer.def( "__deepcopy__", &__copy__); + FourAtomFunction_exposer.def( "clone", &__copy__); FourAtomFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::FourAtomFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); FourAtomFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::FourAtomFunction >, diff --git a/wrapper/MM/FourAtomFunctions.pypp.cpp b/wrapper/MM/FourAtomFunctions.pypp.cpp index ff40dfe7d..ae875205c 100644 --- a/wrapper/MM/FourAtomFunctions.pypp.cpp +++ b/wrapper/MM/FourAtomFunctions.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::FourAtomFunctions __copy__(const SireMM::FourAtomFunctions &other){ return SireMM::FourAtomFunctions(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -446,9 +448,9 @@ void register_FourAtomFunctions_class(){ } FourAtomFunctions_exposer.staticmethod( "typeName" ); - FourAtomFunctions_exposer.def( "__copy__", &__copy__); - FourAtomFunctions_exposer.def( "__deepcopy__", &__copy__); - FourAtomFunctions_exposer.def( "clone", &__copy__); + FourAtomFunctions_exposer.def( "__copy__", &__copy__); + FourAtomFunctions_exposer.def( "__deepcopy__", &__copy__); + FourAtomFunctions_exposer.def( "clone", &__copy__); FourAtomFunctions_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::FourAtomFunctions >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); FourAtomFunctions_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::FourAtomFunctions >, diff --git a/wrapper/MM/FourAtomPerturbation.pypp.cpp b/wrapper/MM/FourAtomPerturbation.pypp.cpp index 2b454fa66..64d0fea73 100644 --- a/wrapper/MM/FourAtomPerturbation.pypp.cpp +++ b/wrapper/MM/FourAtomPerturbation.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::FourAtomPerturbation __copy__(const SireMM::FourAtomPerturbation &other){ return SireMM::FourAtomPerturbation(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -164,9 +166,9 @@ void register_FourAtomPerturbation_class(){ } FourAtomPerturbation_exposer.staticmethod( "typeName" ); - FourAtomPerturbation_exposer.def( "__copy__", &__copy__); - FourAtomPerturbation_exposer.def( "__deepcopy__", &__copy__); - FourAtomPerturbation_exposer.def( "clone", &__copy__); + FourAtomPerturbation_exposer.def( "__copy__", &__copy__); + FourAtomPerturbation_exposer.def( "__deepcopy__", &__copy__); + FourAtomPerturbation_exposer.def( "clone", &__copy__); FourAtomPerturbation_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::FourAtomPerturbation >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); FourAtomPerturbation_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::FourAtomPerturbation >, diff --git a/wrapper/MM/GridFF.pypp.cpp b/wrapper/MM/GridFF.pypp.cpp index ad2bdeb63..01605f874 100644 --- a/wrapper/MM/GridFF.pypp.cpp +++ b/wrapper/MM/GridFF.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::GridFF __copy__(const SireMM::GridFF &other){ return SireMM::GridFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -291,9 +293,9 @@ void register_GridFF_class(){ } GridFF_exposer.staticmethod( "typeName" ); - GridFF_exposer.def( "__copy__", &__copy__); - GridFF_exposer.def( "__deepcopy__", &__copy__); - GridFF_exposer.def( "clone", &__copy__); + GridFF_exposer.def( "__copy__", &__copy__); + GridFF_exposer.def( "__deepcopy__", &__copy__); + GridFF_exposer.def( "clone", &__copy__); GridFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::GridFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GridFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::GridFF >, diff --git a/wrapper/MM/GridFF2.pypp.cpp b/wrapper/MM/GridFF2.pypp.cpp index ad07adb20..07e9b0438 100644 --- a/wrapper/MM/GridFF2.pypp.cpp +++ b/wrapper/MM/GridFF2.pypp.cpp @@ -41,6 +41,8 @@ namespace bp = boost::python; SireMM::GridFF2 __copy__(const SireMM::GridFF2 &other){ return SireMM::GridFF2(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -297,9 +299,9 @@ void register_GridFF2_class(){ } GridFF2_exposer.staticmethod( "typeName" ); - GridFF2_exposer.def( "__copy__", &__copy__); - GridFF2_exposer.def( "__deepcopy__", &__copy__); - GridFF2_exposer.def( "clone", &__copy__); + GridFF2_exposer.def( "__copy__", &__copy__); + GridFF2_exposer.def( "__deepcopy__", &__copy__); + GridFF2_exposer.def( "clone", &__copy__); GridFF2_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::GridFF2 >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GridFF2_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::GridFF2 >, diff --git a/wrapper/MM/GromacsAngle.pypp.cpp b/wrapper/MM/GromacsAngle.pypp.cpp index 9592ba546..7036e338e 100644 --- a/wrapper/MM/GromacsAngle.pypp.cpp +++ b/wrapper/MM/GromacsAngle.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::GromacsAngle __copy__(const SireMM::GromacsAngle &other){ return SireMM::GromacsAngle(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -355,9 +357,9 @@ void register_GromacsAngle_class(){ } GromacsAngle_exposer.staticmethod( "typeName" ); - GromacsAngle_exposer.def( "__copy__", &__copy__); - GromacsAngle_exposer.def( "__deepcopy__", &__copy__); - GromacsAngle_exposer.def( "clone", &__copy__); + GromacsAngle_exposer.def( "__copy__", &__copy__); + GromacsAngle_exposer.def( "__deepcopy__", &__copy__); + GromacsAngle_exposer.def( "clone", &__copy__); GromacsAngle_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::GromacsAngle >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GromacsAngle_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::GromacsAngle >, diff --git a/wrapper/MM/GromacsAtomType.pypp.cpp b/wrapper/MM/GromacsAtomType.pypp.cpp index 3cd7fdf25..2a87ede39 100644 --- a/wrapper/MM/GromacsAtomType.pypp.cpp +++ b/wrapper/MM/GromacsAtomType.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::GromacsAtomType __copy__(const SireMM::GromacsAtomType &other){ return SireMM::GromacsAtomType(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -281,9 +283,9 @@ void register_GromacsAtomType_class(){ } GromacsAtomType_exposer.staticmethod( "toParticleType" ); GromacsAtomType_exposer.staticmethod( "typeName" ); - GromacsAtomType_exposer.def( "__copy__", &__copy__); - GromacsAtomType_exposer.def( "__deepcopy__", &__copy__); - GromacsAtomType_exposer.def( "clone", &__copy__); + GromacsAtomType_exposer.def( "__copy__", &__copy__); + GromacsAtomType_exposer.def( "__deepcopy__", &__copy__); + GromacsAtomType_exposer.def( "clone", &__copy__); GromacsAtomType_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::GromacsAtomType >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GromacsAtomType_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::GromacsAtomType >, diff --git a/wrapper/MM/GromacsBond.pypp.cpp b/wrapper/MM/GromacsBond.pypp.cpp index 5a895a96f..6a792f3f9 100644 --- a/wrapper/MM/GromacsBond.pypp.cpp +++ b/wrapper/MM/GromacsBond.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::GromacsBond __copy__(const SireMM::GromacsBond &other){ return SireMM::GromacsBond(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -304,9 +306,9 @@ void register_GromacsBond_class(){ } GromacsBond_exposer.staticmethod( "typeName" ); - GromacsBond_exposer.def( "__copy__", &__copy__); - GromacsBond_exposer.def( "__deepcopy__", &__copy__); - GromacsBond_exposer.def( "clone", &__copy__); + GromacsBond_exposer.def( "__copy__", &__copy__); + GromacsBond_exposer.def( "__deepcopy__", &__copy__); + GromacsBond_exposer.def( "clone", &__copy__); GromacsBond_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::GromacsBond >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GromacsBond_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::GromacsBond >, diff --git a/wrapper/MM/GromacsDihedral.pypp.cpp b/wrapper/MM/GromacsDihedral.pypp.cpp index f0bd9ce1a..d93d1e524 100644 --- a/wrapper/MM/GromacsDihedral.pypp.cpp +++ b/wrapper/MM/GromacsDihedral.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::GromacsDihedral __copy__(const SireMM::GromacsDihedral &other){ return SireMM::GromacsDihedral(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -358,9 +360,9 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.staticmethod( "construct" ); GromacsDihedral_exposer.staticmethod( "constructImproper" ); GromacsDihedral_exposer.staticmethod( "typeName" ); - GromacsDihedral_exposer.def( "__copy__", &__copy__); - GromacsDihedral_exposer.def( "__deepcopy__", &__copy__); - GromacsDihedral_exposer.def( "clone", &__copy__); + GromacsDihedral_exposer.def( "__copy__", &__copy__); + GromacsDihedral_exposer.def( "__deepcopy__", &__copy__); + GromacsDihedral_exposer.def( "clone", &__copy__); GromacsDihedral_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::GromacsDihedral >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GromacsDihedral_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::GromacsDihedral >, diff --git a/wrapper/MM/GroupInternalParameters.pypp.cpp b/wrapper/MM/GroupInternalParameters.pypp.cpp index 865302bbe..b70f2e4ee 100644 --- a/wrapper/MM/GroupInternalParameters.pypp.cpp +++ b/wrapper/MM/GroupInternalParameters.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMM::GroupInternalParameters __copy__(const SireMM::GroupInternalParameters &other){ return SireMM::GroupInternalParameters(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireMM::GroupInternalParameters&){ return "SireMM::GroupInternalParameters";} @@ -643,9 +645,9 @@ void register_GroupInternalParameters_class(){ , "Return the Urey-Bradley potentials for this group" ); } - GroupInternalParameters_exposer.def( "__copy__", &__copy__); - GroupInternalParameters_exposer.def( "__deepcopy__", &__copy__); - GroupInternalParameters_exposer.def( "clone", &__copy__); + GroupInternalParameters_exposer.def( "__copy__", &__copy__); + GroupInternalParameters_exposer.def( "__deepcopy__", &__copy__); + GroupInternalParameters_exposer.def( "clone", &__copy__); GroupInternalParameters_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::GroupInternalParameters >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); GroupInternalParameters_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::GroupInternalParameters >, diff --git a/wrapper/MM/HarmonicSwitchingFunction.pypp.cpp b/wrapper/MM/HarmonicSwitchingFunction.pypp.cpp index 9ce77c4ad..18e95b56d 100644 --- a/wrapper/MM/HarmonicSwitchingFunction.pypp.cpp +++ b/wrapper/MM/HarmonicSwitchingFunction.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; SireMM::HarmonicSwitchingFunction __copy__(const SireMM::HarmonicSwitchingFunction &other){ return SireMM::HarmonicSwitchingFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -138,9 +140,9 @@ void register_HarmonicSwitchingFunction_class(){ } HarmonicSwitchingFunction_exposer.staticmethod( "typeName" ); - HarmonicSwitchingFunction_exposer.def( "__copy__", &__copy__); - HarmonicSwitchingFunction_exposer.def( "__deepcopy__", &__copy__); - HarmonicSwitchingFunction_exposer.def( "clone", &__copy__); + HarmonicSwitchingFunction_exposer.def( "__copy__", &__copy__); + HarmonicSwitchingFunction_exposer.def( "__deepcopy__", &__copy__); + HarmonicSwitchingFunction_exposer.def( "clone", &__copy__); HarmonicSwitchingFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::HarmonicSwitchingFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); HarmonicSwitchingFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::HarmonicSwitchingFunction >, diff --git a/wrapper/MM/Improper.pypp.cpp b/wrapper/MM/Improper.pypp.cpp index ac555b29e..a303e869e 100644 --- a/wrapper/MM/Improper.pypp.cpp +++ b/wrapper/MM/Improper.pypp.cpp @@ -44,6 +44,8 @@ namespace bp = boost::python; SireMM::Improper __copy__(const SireMM::Improper &other){ return SireMM::Improper(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -535,9 +537,9 @@ void register_Improper_class(){ } Improper_exposer.staticmethod( "typeName" ); - Improper_exposer.def( "__copy__", &__copy__); - Improper_exposer.def( "__deepcopy__", &__copy__); - Improper_exposer.def( "clone", &__copy__); + Improper_exposer.def( "__copy__", &__copy__); + Improper_exposer.def( "__deepcopy__", &__copy__); + Improper_exposer.def( "clone", &__copy__); Improper_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::Improper >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Improper_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::Improper >, diff --git a/wrapper/MM/ImproperComponent.pypp.cpp b/wrapper/MM/ImproperComponent.pypp.cpp index 85b7ffbda..9c7759ffc 100644 --- a/wrapper/MM/ImproperComponent.pypp.cpp +++ b/wrapper/MM/ImproperComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::ImproperComponent __copy__(const SireMM::ImproperComponent &other){ return SireMM::ImproperComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_ImproperComponent_class(){ } ImproperComponent_exposer.staticmethod( "typeName" ); - ImproperComponent_exposer.def( "__copy__", &__copy__); - ImproperComponent_exposer.def( "__deepcopy__", &__copy__); - ImproperComponent_exposer.def( "clone", &__copy__); + ImproperComponent_exposer.def( "__copy__", &__copy__); + ImproperComponent_exposer.def( "__deepcopy__", &__copy__); + ImproperComponent_exposer.def( "clone", &__copy__); ImproperComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::ImproperComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ImproperComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::ImproperComponent >, diff --git a/wrapper/MM/ImproperParameterName.pypp.cpp b/wrapper/MM/ImproperParameterName.pypp.cpp index 186b7e3f9..aa5bd0bab 100644 --- a/wrapper/MM/ImproperParameterName.pypp.cpp +++ b/wrapper/MM/ImproperParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::ImproperParameterName __copy__(const SireMM::ImproperParameterName &other){ return SireMM::ImproperParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::ImproperParameterName&){ return "SireMM::ImproperParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_ImproperParameterName_class(){ , "" ); } - ImproperParameterName_exposer.def( "__copy__", &__copy__); - ImproperParameterName_exposer.def( "__deepcopy__", &__copy__); - ImproperParameterName_exposer.def( "clone", &__copy__); + ImproperParameterName_exposer.def( "__copy__", &__copy__); + ImproperParameterName_exposer.def( "__deepcopy__", &__copy__); + ImproperParameterName_exposer.def( "clone", &__copy__); ImproperParameterName_exposer.def( "__str__", &pvt_get_name); ImproperParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/ImproperSymbols.pypp.cpp b/wrapper/MM/ImproperSymbols.pypp.cpp index 59f6d1c89..874441c73 100644 --- a/wrapper/MM/ImproperSymbols.pypp.cpp +++ b/wrapper/MM/ImproperSymbols.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::ImproperSymbols __copy__(const SireMM::ImproperSymbols &other){ return SireMM::ImproperSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::ImproperSymbols&){ return "SireMM::ImproperSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -68,9 +70,9 @@ void register_ImproperSymbols_class(){ , "Return the symbol representing the angle between the improper\nand the plane formed by atoms 1-3" ); } - ImproperSymbols_exposer.def( "__copy__", &__copy__); - ImproperSymbols_exposer.def( "__deepcopy__", &__copy__); - ImproperSymbols_exposer.def( "clone", &__copy__); + ImproperSymbols_exposer.def( "__copy__", &__copy__); + ImproperSymbols_exposer.def( "__deepcopy__", &__copy__); + ImproperSymbols_exposer.def( "clone", &__copy__); ImproperSymbols_exposer.def( "__str__", &pvt_get_name); ImproperSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/InterCLJFF.pypp.cpp b/wrapper/MM/InterCLJFF.pypp.cpp index 52b082f90..103b690c0 100644 --- a/wrapper/MM/InterCLJFF.pypp.cpp +++ b/wrapper/MM/InterCLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Inter2B3DFF > __copy__(const SireFF::Inter2B3DFF > &other){ return SireFF::Inter2B3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -270,9 +272,9 @@ void register_InterCLJFF_class(){ } InterCLJFF_exposer.staticmethod( "typeName" ); - InterCLJFF_exposer.def( "__copy__", &__copy__); - InterCLJFF_exposer.def( "__deepcopy__", &__copy__); - InterCLJFF_exposer.def( "clone", &__copy__); + InterCLJFF_exposer.def( "__copy__", &__copy__ >>); + InterCLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + InterCLJFF_exposer.def( "clone", &__copy__ >>); InterCLJFF_exposer.def( "__str__", &__str__< ::SireFF::Inter2B3DFF > > ); InterCLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Inter2B3DFF > > ); InterCLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Inter2B3DFF > > ); diff --git a/wrapper/MM/InterCLJFFBase.pypp.cpp b/wrapper/MM/InterCLJFFBase.pypp.cpp index de6b53e3f..8c6d22c64 100644 --- a/wrapper/MM/InterCLJFFBase.pypp.cpp +++ b/wrapper/MM/InterCLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Inter2BFF > __copy__(const SireFF::Inter2BFF > &other){ return SireFF::Inter2BFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_InterCLJFFBase_class(){ } InterCLJFFBase_exposer.staticmethod( "typeName" ); - InterCLJFFBase_exposer.def( "__copy__", &__copy__); - InterCLJFFBase_exposer.def( "__deepcopy__", &__copy__); - InterCLJFFBase_exposer.def( "clone", &__copy__); + InterCLJFFBase_exposer.def( "__copy__", &__copy__ >>); + InterCLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + InterCLJFFBase_exposer.def( "clone", &__copy__ >>); InterCLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Inter2BFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterCLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Inter2BFF > >, diff --git a/wrapper/MM/InterCoulombFF.pypp.cpp b/wrapper/MM/InterCoulombFF.pypp.cpp index 083ed15ec..b26cf2f9e 100644 --- a/wrapper/MM/InterCoulombFF.pypp.cpp +++ b/wrapper/MM/InterCoulombFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Inter2B3DFF > __copy__(const SireFF::Inter2B3DFF > &other){ return SireFF::Inter2B3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -270,9 +272,9 @@ void register_InterCoulombFF_class(){ } InterCoulombFF_exposer.staticmethod( "typeName" ); - InterCoulombFF_exposer.def( "__copy__", &__copy__); - InterCoulombFF_exposer.def( "__deepcopy__", &__copy__); - InterCoulombFF_exposer.def( "clone", &__copy__); + InterCoulombFF_exposer.def( "__copy__", &__copy__ >>); + InterCoulombFF_exposer.def( "__deepcopy__", &__copy__ >>); + InterCoulombFF_exposer.def( "clone", &__copy__ >>); InterCoulombFF_exposer.def( "__str__", &__str__< ::SireFF::Inter2B3DFF > > ); InterCoulombFF_exposer.def( "__repr__", &__str__< ::SireFF::Inter2B3DFF > > ); InterCoulombFF_exposer.def( "__len__", &__len_count< ::SireFF::Inter2B3DFF > > ); diff --git a/wrapper/MM/InterCoulombFFBase.pypp.cpp b/wrapper/MM/InterCoulombFFBase.pypp.cpp index 34e2b0ffe..54ef981e6 100644 --- a/wrapper/MM/InterCoulombFFBase.pypp.cpp +++ b/wrapper/MM/InterCoulombFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Inter2BFF > __copy__(const SireFF::Inter2BFF > &other){ return SireFF::Inter2BFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_InterCoulombFFBase_class(){ } InterCoulombFFBase_exposer.staticmethod( "typeName" ); - InterCoulombFFBase_exposer.def( "__copy__", &__copy__); - InterCoulombFFBase_exposer.def( "__deepcopy__", &__copy__); - InterCoulombFFBase_exposer.def( "clone", &__copy__); + InterCoulombFFBase_exposer.def( "__copy__", &__copy__ >>); + InterCoulombFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + InterCoulombFFBase_exposer.def( "clone", &__copy__ >>); InterCoulombFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Inter2BFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterCoulombFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Inter2BFF > >, diff --git a/wrapper/MM/InterFF.pypp.cpp b/wrapper/MM/InterFF.pypp.cpp index 08aea6060..10720107e 100644 --- a/wrapper/MM/InterFF.pypp.cpp +++ b/wrapper/MM/InterFF.pypp.cpp @@ -54,6 +54,8 @@ namespace bp = boost::python; SireMM::InterFF __copy__(const SireMM::InterFF &other){ return SireMM::InterFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -629,9 +631,9 @@ void register_InterFF_class(){ } InterFF_exposer.staticmethod( "typeName" ); - InterFF_exposer.def( "__copy__", &__copy__); - InterFF_exposer.def( "__deepcopy__", &__copy__); - InterFF_exposer.def( "clone", &__copy__); + InterFF_exposer.def( "__copy__", &__copy__); + InterFF_exposer.def( "__deepcopy__", &__copy__); + InterFF_exposer.def( "clone", &__copy__); InterFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::InterFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::InterFF >, diff --git a/wrapper/MM/InterGroupCLJFF.pypp.cpp b/wrapper/MM/InterGroupCLJFF.pypp.cpp index 4410cdf3e..644c9af1c 100644 --- a/wrapper/MM/InterGroupCLJFF.pypp.cpp +++ b/wrapper/MM/InterGroupCLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Inter2B2G3DFF > __copy__(const SireFF::Inter2B2G3DFF > &other){ return SireFF::Inter2B2G3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_InterGroupCLJFF_class(){ } InterGroupCLJFF_exposer.staticmethod( "typeName" ); - InterGroupCLJFF_exposer.def( "__copy__", &__copy__); - InterGroupCLJFF_exposer.def( "__deepcopy__", &__copy__); - InterGroupCLJFF_exposer.def( "clone", &__copy__); + InterGroupCLJFF_exposer.def( "__copy__", &__copy__ >>); + InterGroupCLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + InterGroupCLJFF_exposer.def( "clone", &__copy__ >>); InterGroupCLJFF_exposer.def( "__str__", &__str__< ::SireFF::Inter2B2G3DFF > > ); InterGroupCLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Inter2B2G3DFF > > ); InterGroupCLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Inter2B2G3DFF > > ); diff --git a/wrapper/MM/InterGroupCLJFFBase.pypp.cpp b/wrapper/MM/InterGroupCLJFFBase.pypp.cpp index 47f0639da..27fce5373 100644 --- a/wrapper/MM/InterGroupCLJFFBase.pypp.cpp +++ b/wrapper/MM/InterGroupCLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Inter2B2GFF > __copy__(const SireFF::Inter2B2GFF > &other){ return SireFF::Inter2B2GFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_InterGroupCLJFFBase_class(){ } InterGroupCLJFFBase_exposer.staticmethod( "typeName" ); - InterGroupCLJFFBase_exposer.def( "__copy__", &__copy__); - InterGroupCLJFFBase_exposer.def( "__deepcopy__", &__copy__); - InterGroupCLJFFBase_exposer.def( "clone", &__copy__); + InterGroupCLJFFBase_exposer.def( "__copy__", &__copy__ >>); + InterGroupCLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + InterGroupCLJFFBase_exposer.def( "clone", &__copy__ >>); InterGroupCLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Inter2B2GFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterGroupCLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Inter2B2GFF > >, diff --git a/wrapper/MM/InterGroupCoulombFF.pypp.cpp b/wrapper/MM/InterGroupCoulombFF.pypp.cpp index bef5e2291..96719d9ad 100644 --- a/wrapper/MM/InterGroupCoulombFF.pypp.cpp +++ b/wrapper/MM/InterGroupCoulombFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Inter2B2G3DFF > __copy__(const SireFF::Inter2B2G3DFF > &other){ return SireFF::Inter2B2G3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_InterGroupCoulombFF_class(){ } InterGroupCoulombFF_exposer.staticmethod( "typeName" ); - InterGroupCoulombFF_exposer.def( "__copy__", &__copy__); - InterGroupCoulombFF_exposer.def( "__deepcopy__", &__copy__); - InterGroupCoulombFF_exposer.def( "clone", &__copy__); + InterGroupCoulombFF_exposer.def( "__copy__", &__copy__ >>); + InterGroupCoulombFF_exposer.def( "__deepcopy__", &__copy__ >>); + InterGroupCoulombFF_exposer.def( "clone", &__copy__ >>); InterGroupCoulombFF_exposer.def( "__str__", &__str__< ::SireFF::Inter2B2G3DFF > > ); InterGroupCoulombFF_exposer.def( "__repr__", &__str__< ::SireFF::Inter2B2G3DFF > > ); InterGroupCoulombFF_exposer.def( "__len__", &__len_count< ::SireFF::Inter2B2G3DFF > > ); diff --git a/wrapper/MM/InterGroupCoulombFFBase.pypp.cpp b/wrapper/MM/InterGroupCoulombFFBase.pypp.cpp index 122ab43ff..3706753b6 100644 --- a/wrapper/MM/InterGroupCoulombFFBase.pypp.cpp +++ b/wrapper/MM/InterGroupCoulombFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Inter2B2GFF > __copy__(const SireFF::Inter2B2GFF > &other){ return SireFF::Inter2B2GFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_InterGroupCoulombFFBase_class(){ } InterGroupCoulombFFBase_exposer.staticmethod( "typeName" ); - InterGroupCoulombFFBase_exposer.def( "__copy__", &__copy__); - InterGroupCoulombFFBase_exposer.def( "__deepcopy__", &__copy__); - InterGroupCoulombFFBase_exposer.def( "clone", &__copy__); + InterGroupCoulombFFBase_exposer.def( "__copy__", &__copy__ >>); + InterGroupCoulombFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + InterGroupCoulombFFBase_exposer.def( "clone", &__copy__ >>); InterGroupCoulombFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Inter2B2GFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterGroupCoulombFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Inter2B2GFF > >, diff --git a/wrapper/MM/InterGroupFF.pypp.cpp b/wrapper/MM/InterGroupFF.pypp.cpp index ca17ca66d..f9d33edc1 100644 --- a/wrapper/MM/InterGroupFF.pypp.cpp +++ b/wrapper/MM/InterGroupFF.pypp.cpp @@ -52,6 +52,8 @@ namespace bp = boost::python; SireMM::InterGroupFF __copy__(const SireMM::InterGroupFF &other){ return SireMM::InterGroupFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -627,9 +629,9 @@ void register_InterGroupFF_class(){ } InterGroupFF_exposer.staticmethod( "typeName" ); - InterGroupFF_exposer.def( "__copy__", &__copy__); - InterGroupFF_exposer.def( "__deepcopy__", &__copy__); - InterGroupFF_exposer.def( "clone", &__copy__); + InterGroupFF_exposer.def( "__copy__", &__copy__); + InterGroupFF_exposer.def( "__deepcopy__", &__copy__); + InterGroupFF_exposer.def( "clone", &__copy__); InterGroupFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::InterGroupFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterGroupFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::InterGroupFF >, diff --git a/wrapper/MM/InterGroupLJFF.pypp.cpp b/wrapper/MM/InterGroupLJFF.pypp.cpp index b9c84d2b0..afc759e82 100644 --- a/wrapper/MM/InterGroupLJFF.pypp.cpp +++ b/wrapper/MM/InterGroupLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Inter2B2G3DFF > __copy__(const SireFF::Inter2B2G3DFF > &other){ return SireFF::Inter2B2G3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_InterGroupLJFF_class(){ } InterGroupLJFF_exposer.staticmethod( "typeName" ); - InterGroupLJFF_exposer.def( "__copy__", &__copy__); - InterGroupLJFF_exposer.def( "__deepcopy__", &__copy__); - InterGroupLJFF_exposer.def( "clone", &__copy__); + InterGroupLJFF_exposer.def( "__copy__", &__copy__ >>); + InterGroupLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + InterGroupLJFF_exposer.def( "clone", &__copy__ >>); InterGroupLJFF_exposer.def( "__str__", &__str__< ::SireFF::Inter2B2G3DFF > > ); InterGroupLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Inter2B2G3DFF > > ); InterGroupLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Inter2B2G3DFF > > ); diff --git a/wrapper/MM/InterGroupLJFFBase.pypp.cpp b/wrapper/MM/InterGroupLJFFBase.pypp.cpp index 78696b9e3..af2a0cecb 100644 --- a/wrapper/MM/InterGroupLJFFBase.pypp.cpp +++ b/wrapper/MM/InterGroupLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Inter2B2GFF > __copy__(const SireFF::Inter2B2GFF > &other){ return SireFF::Inter2B2GFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_InterGroupLJFFBase_class(){ } InterGroupLJFFBase_exposer.staticmethod( "typeName" ); - InterGroupLJFFBase_exposer.def( "__copy__", &__copy__); - InterGroupLJFFBase_exposer.def( "__deepcopy__", &__copy__); - InterGroupLJFFBase_exposer.def( "clone", &__copy__); + InterGroupLJFFBase_exposer.def( "__copy__", &__copy__ >>); + InterGroupLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + InterGroupLJFFBase_exposer.def( "clone", &__copy__ >>); InterGroupLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Inter2B2GFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterGroupLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Inter2B2GFF > >, diff --git a/wrapper/MM/InterGroupSoftCLJFF.pypp.cpp b/wrapper/MM/InterGroupSoftCLJFF.pypp.cpp index 42cb7f5e7..e6d470d78 100644 --- a/wrapper/MM/InterGroupSoftCLJFF.pypp.cpp +++ b/wrapper/MM/InterGroupSoftCLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Inter2B2G3DFF > __copy__(const SireFF::Inter2B2G3DFF > &other){ return SireFF::Inter2B2G3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_InterGroupSoftCLJFF_class(){ } InterGroupSoftCLJFF_exposer.staticmethod( "typeName" ); - InterGroupSoftCLJFF_exposer.def( "__copy__", &__copy__); - InterGroupSoftCLJFF_exposer.def( "__deepcopy__", &__copy__); - InterGroupSoftCLJFF_exposer.def( "clone", &__copy__); + InterGroupSoftCLJFF_exposer.def( "__copy__", &__copy__ >>); + InterGroupSoftCLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + InterGroupSoftCLJFF_exposer.def( "clone", &__copy__ >>); InterGroupSoftCLJFF_exposer.def( "__str__", &__str__< ::SireFF::Inter2B2G3DFF > > ); InterGroupSoftCLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Inter2B2G3DFF > > ); InterGroupSoftCLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Inter2B2G3DFF > > ); diff --git a/wrapper/MM/InterGroupSoftCLJFFBase.pypp.cpp b/wrapper/MM/InterGroupSoftCLJFFBase.pypp.cpp index aaa12628c..125b09618 100644 --- a/wrapper/MM/InterGroupSoftCLJFFBase.pypp.cpp +++ b/wrapper/MM/InterGroupSoftCLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Inter2B2GFF > __copy__(const SireFF::Inter2B2GFF > &other){ return SireFF::Inter2B2GFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_InterGroupSoftCLJFFBase_class(){ } InterGroupSoftCLJFFBase_exposer.staticmethod( "typeName" ); - InterGroupSoftCLJFFBase_exposer.def( "__copy__", &__copy__); - InterGroupSoftCLJFFBase_exposer.def( "__deepcopy__", &__copy__); - InterGroupSoftCLJFFBase_exposer.def( "clone", &__copy__); + InterGroupSoftCLJFFBase_exposer.def( "__copy__", &__copy__ >>); + InterGroupSoftCLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + InterGroupSoftCLJFFBase_exposer.def( "clone", &__copy__ >>); InterGroupSoftCLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Inter2B2GFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterGroupSoftCLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Inter2B2GFF > >, diff --git a/wrapper/MM/InterLJFF.pypp.cpp b/wrapper/MM/InterLJFF.pypp.cpp index 4b4d46c30..93a39986b 100644 --- a/wrapper/MM/InterLJFF.pypp.cpp +++ b/wrapper/MM/InterLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Inter2B3DFF > __copy__(const SireFF::Inter2B3DFF > &other){ return SireFF::Inter2B3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -270,9 +272,9 @@ void register_InterLJFF_class(){ } InterLJFF_exposer.staticmethod( "typeName" ); - InterLJFF_exposer.def( "__copy__", &__copy__); - InterLJFF_exposer.def( "__deepcopy__", &__copy__); - InterLJFF_exposer.def( "clone", &__copy__); + InterLJFF_exposer.def( "__copy__", &__copy__ >>); + InterLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + InterLJFF_exposer.def( "clone", &__copy__ >>); InterLJFF_exposer.def( "__str__", &__str__< ::SireFF::Inter2B3DFF > > ); InterLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Inter2B3DFF > > ); InterLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Inter2B3DFF > > ); diff --git a/wrapper/MM/InterLJFFBase.pypp.cpp b/wrapper/MM/InterLJFFBase.pypp.cpp index 37707906d..ee818f2e5 100644 --- a/wrapper/MM/InterLJFFBase.pypp.cpp +++ b/wrapper/MM/InterLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Inter2BFF > __copy__(const SireFF::Inter2BFF > &other){ return SireFF::Inter2BFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_InterLJFFBase_class(){ } InterLJFFBase_exposer.staticmethod( "typeName" ); - InterLJFFBase_exposer.def( "__copy__", &__copy__); - InterLJFFBase_exposer.def( "__deepcopy__", &__copy__); - InterLJFFBase_exposer.def( "clone", &__copy__); + InterLJFFBase_exposer.def( "__copy__", &__copy__ >>); + InterLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + InterLJFFBase_exposer.def( "clone", &__copy__ >>); InterLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Inter2BFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Inter2BFF > >, diff --git a/wrapper/MM/InterSoftCLJFF.pypp.cpp b/wrapper/MM/InterSoftCLJFF.pypp.cpp index 61e1b67f2..dda8c6948 100644 --- a/wrapper/MM/InterSoftCLJFF.pypp.cpp +++ b/wrapper/MM/InterSoftCLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Inter2B3DFF > __copy__(const SireFF::Inter2B3DFF > &other){ return SireFF::Inter2B3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -270,9 +272,9 @@ void register_InterSoftCLJFF_class(){ } InterSoftCLJFF_exposer.staticmethod( "typeName" ); - InterSoftCLJFF_exposer.def( "__copy__", &__copy__); - InterSoftCLJFF_exposer.def( "__deepcopy__", &__copy__); - InterSoftCLJFF_exposer.def( "clone", &__copy__); + InterSoftCLJFF_exposer.def( "__copy__", &__copy__ >>); + InterSoftCLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + InterSoftCLJFF_exposer.def( "clone", &__copy__ >>); InterSoftCLJFF_exposer.def( "__str__", &__str__< ::SireFF::Inter2B3DFF > > ); InterSoftCLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Inter2B3DFF > > ); InterSoftCLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Inter2B3DFF > > ); diff --git a/wrapper/MM/InterSoftCLJFFBase.pypp.cpp b/wrapper/MM/InterSoftCLJFFBase.pypp.cpp index 59f35125c..0955c7431 100644 --- a/wrapper/MM/InterSoftCLJFFBase.pypp.cpp +++ b/wrapper/MM/InterSoftCLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Inter2BFF > __copy__(const SireFF::Inter2BFF > &other){ return SireFF::Inter2BFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_InterSoftCLJFFBase_class(){ } InterSoftCLJFFBase_exposer.staticmethod( "typeName" ); - InterSoftCLJFFBase_exposer.def( "__copy__", &__copy__); - InterSoftCLJFFBase_exposer.def( "__deepcopy__", &__copy__); - InterSoftCLJFFBase_exposer.def( "clone", &__copy__); + InterSoftCLJFFBase_exposer.def( "__copy__", &__copy__ >>); + InterSoftCLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + InterSoftCLJFFBase_exposer.def( "clone", &__copy__ >>); InterSoftCLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Inter2BFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InterSoftCLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Inter2BFF > >, diff --git a/wrapper/MM/InternalComponent.pypp.cpp b/wrapper/MM/InternalComponent.pypp.cpp index 34433d8ca..b91ef3aee 100644 --- a/wrapper/MM/InternalComponent.pypp.cpp +++ b/wrapper/MM/InternalComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::InternalComponent __copy__(const SireMM::InternalComponent &other){ return SireMM::InternalComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -251,9 +253,9 @@ void register_InternalComponent_class(){ } InternalComponent_exposer.staticmethod( "typeName" ); - InternalComponent_exposer.def( "__copy__", &__copy__); - InternalComponent_exposer.def( "__deepcopy__", &__copy__); - InternalComponent_exposer.def( "clone", &__copy__); + InternalComponent_exposer.def( "__copy__", &__copy__); + InternalComponent_exposer.def( "__deepcopy__", &__copy__); + InternalComponent_exposer.def( "clone", &__copy__); InternalComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::InternalComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InternalComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::InternalComponent >, diff --git a/wrapper/MM/InternalFF.pypp.cpp b/wrapper/MM/InternalFF.pypp.cpp index 09b4a45b5..7c8646c14 100644 --- a/wrapper/MM/InternalFF.pypp.cpp +++ b/wrapper/MM/InternalFF.pypp.cpp @@ -50,6 +50,8 @@ namespace bp = boost::python; SireMM::InternalFF __copy__(const SireMM::InternalFF &other){ return SireMM::InternalFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -511,9 +513,9 @@ void register_InternalFF_class(){ } InternalFF_exposer.staticmethod( "typeName" ); - InternalFF_exposer.def( "__copy__", &__copy__); - InternalFF_exposer.def( "__deepcopy__", &__copy__); - InternalFF_exposer.def( "clone", &__copy__); + InternalFF_exposer.def( "__copy__", &__copy__); + InternalFF_exposer.def( "__deepcopy__", &__copy__); + InternalFF_exposer.def( "clone", &__copy__); InternalFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::InternalFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InternalFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::InternalFF >, diff --git a/wrapper/MM/InternalGroupFF.pypp.cpp b/wrapper/MM/InternalGroupFF.pypp.cpp index b4044f694..49d07307d 100644 --- a/wrapper/MM/InternalGroupFF.pypp.cpp +++ b/wrapper/MM/InternalGroupFF.pypp.cpp @@ -54,6 +54,8 @@ namespace bp = boost::python; SireMM::InternalGroupFF __copy__(const SireMM::InternalGroupFF &other){ return SireMM::InternalGroupFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -490,9 +492,9 @@ void register_InternalGroupFF_class(){ } InternalGroupFF_exposer.staticmethod( "typeName" ); - InternalGroupFF_exposer.def( "__copy__", &__copy__); - InternalGroupFF_exposer.def( "__deepcopy__", &__copy__); - InternalGroupFF_exposer.def( "clone", &__copy__); + InternalGroupFF_exposer.def( "__copy__", &__copy__); + InternalGroupFF_exposer.def( "__deepcopy__", &__copy__); + InternalGroupFF_exposer.def( "clone", &__copy__); InternalGroupFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::InternalGroupFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InternalGroupFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::InternalGroupFF >, diff --git a/wrapper/MM/InternalParameterNames.pypp.cpp b/wrapper/MM/InternalParameterNames.pypp.cpp index 1edfad66a..3a1c47cfb 100644 --- a/wrapper/MM/InternalParameterNames.pypp.cpp +++ b/wrapper/MM/InternalParameterNames.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::InternalParameterNames __copy__(const SireMM::InternalParameterNames &other){ return SireMM::InternalParameterNames(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::InternalParameterNames&){ return "SireMM::InternalParameterNames";} #include "Helpers/release_gil_policy.hpp" @@ -59,9 +61,9 @@ void register_InternalParameterNames_class(){ typedef bp::class_< SireMM::InternalParameterNames, bp::bases< SireMM::StretchBendTorsionParameterName, SireMM::BendBendParameterName, SireMM::StretchBendParameterName, SireMM::StretchStretchParameterName, SireMM::UreyBradleyParameterName, SireMM::ImproperParameterName, SireMM::DihedralParameterName, SireMM::AngleParameterName, SireMM::BondParameterName > > InternalParameterNames_exposer_t; InternalParameterNames_exposer_t InternalParameterNames_exposer = InternalParameterNames_exposer_t( "InternalParameterNames", "This class provides the default name of the properties\nthat contain the bond, angle, dihedral and Urey-Bradley parameters", bp::init< >("") ); bp::scope InternalParameterNames_scope( InternalParameterNames_exposer ); - InternalParameterNames_exposer.def( "__copy__", &__copy__); - InternalParameterNames_exposer.def( "__deepcopy__", &__copy__); - InternalParameterNames_exposer.def( "clone", &__copy__); + InternalParameterNames_exposer.def( "__copy__", &__copy__); + InternalParameterNames_exposer.def( "__deepcopy__", &__copy__); + InternalParameterNames_exposer.def( "clone", &__copy__); InternalParameterNames_exposer.def( "__str__", &pvt_get_name); InternalParameterNames_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/InternalParameterNames3D.pypp.cpp b/wrapper/MM/InternalParameterNames3D.pypp.cpp index d9f73cc21..7558e2898 100644 --- a/wrapper/MM/InternalParameterNames3D.pypp.cpp +++ b/wrapper/MM/InternalParameterNames3D.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::InternalParameterNames3D __copy__(const SireMM::InternalParameterNames3D &other){ return SireMM::InternalParameterNames3D(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::InternalParameterNames3D&){ return "SireMM::InternalParameterNames3D";} #include "Helpers/release_gil_policy.hpp" @@ -59,9 +61,9 @@ void register_InternalParameterNames3D_class(){ typedef bp::class_< SireMM::InternalParameterNames3D, bp::bases< SireMM::InternalParameterNames, SireMM::StretchBendTorsionParameterName, SireMM::BendBendParameterName, SireMM::StretchBendParameterName, SireMM::StretchStretchParameterName, SireMM::UreyBradleyParameterName, SireMM::ImproperParameterName, SireMM::DihedralParameterName, SireMM::AngleParameterName, SireMM::BondParameterName > > InternalParameterNames3D_exposer_t; InternalParameterNames3D_exposer_t InternalParameterNames3D_exposer = InternalParameterNames3D_exposer_t( "InternalParameterNames3D", "This class provides the default name of the properties\nthat contain the internal and 3D coordinates properties", bp::init< >("") ); bp::scope InternalParameterNames3D_scope( InternalParameterNames3D_exposer ); - InternalParameterNames3D_exposer.def( "__copy__", &__copy__); - InternalParameterNames3D_exposer.def( "__deepcopy__", &__copy__); - InternalParameterNames3D_exposer.def( "clone", &__copy__); + InternalParameterNames3D_exposer.def( "__copy__", &__copy__); + InternalParameterNames3D_exposer.def( "__deepcopy__", &__copy__); + InternalParameterNames3D_exposer.def( "clone", &__copy__); InternalParameterNames3D_exposer.def( "__str__", &pvt_get_name); InternalParameterNames3D_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/InternalParameters.pypp.cpp b/wrapper/MM/InternalParameters.pypp.cpp index d084d4d4c..590f2ec58 100644 --- a/wrapper/MM/InternalParameters.pypp.cpp +++ b/wrapper/MM/InternalParameters.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMM::InternalParameters __copy__(const SireMM::InternalParameters &other){ return SireMM::InternalParameters(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireMM::InternalParameters&){ return "SireMM::InternalParameters";} @@ -345,9 +347,9 @@ void register_InternalParameters_class(){ } InternalParameters_exposer.staticmethod( "typeName" ); - InternalParameters_exposer.def( "__copy__", &__copy__); - InternalParameters_exposer.def( "__deepcopy__", &__copy__); - InternalParameters_exposer.def( "clone", &__copy__); + InternalParameters_exposer.def( "__copy__", &__copy__); + InternalParameters_exposer.def( "__deepcopy__", &__copy__); + InternalParameters_exposer.def( "clone", &__copy__); InternalParameters_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::InternalParameters >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InternalParameters_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::InternalParameters >, diff --git a/wrapper/MM/InternalParameters3D.pypp.cpp b/wrapper/MM/InternalParameters3D.pypp.cpp index 08daae968..f69413720 100644 --- a/wrapper/MM/InternalParameters3D.pypp.cpp +++ b/wrapper/MM/InternalParameters3D.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMM::InternalParameters3D __copy__(const SireMM::InternalParameters3D &other){ return SireMM::InternalParameters3D(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireMM::InternalParameters3D&){ return "SireMM::InternalParameters3D";} @@ -188,9 +190,9 @@ void register_InternalParameters3D_class(){ } InternalParameters3D_exposer.staticmethod( "typeName" ); - InternalParameters3D_exposer.def( "__copy__", &__copy__); - InternalParameters3D_exposer.def( "__deepcopy__", &__copy__); - InternalParameters3D_exposer.def( "clone", &__copy__); + InternalParameters3D_exposer.def( "__copy__", &__copy__); + InternalParameters3D_exposer.def( "__deepcopy__", &__copy__); + InternalParameters3D_exposer.def( "clone", &__copy__); InternalParameters3D_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::InternalParameters3D >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); InternalParameters3D_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::InternalParameters3D >, diff --git a/wrapper/MM/InternalSymbols.pypp.cpp b/wrapper/MM/InternalSymbols.pypp.cpp index 949e3bc0c..1ba64a907 100644 --- a/wrapper/MM/InternalSymbols.pypp.cpp +++ b/wrapper/MM/InternalSymbols.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; SireMM::InternalSymbols __copy__(const SireMM::InternalSymbols &other){ return SireMM::InternalSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::InternalSymbols&){ return "SireMM::InternalSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -151,9 +153,9 @@ void register_InternalSymbols_class(){ , "Return all of the symbols used in the Urey-Bradley parameters" ); } - InternalSymbols_exposer.def( "__copy__", &__copy__); - InternalSymbols_exposer.def( "__deepcopy__", &__copy__); - InternalSymbols_exposer.def( "clone", &__copy__); + InternalSymbols_exposer.def( "__copy__", &__copy__); + InternalSymbols_exposer.def( "__deepcopy__", &__copy__); + InternalSymbols_exposer.def( "clone", &__copy__); InternalSymbols_exposer.def( "__str__", &pvt_get_name); InternalSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/Intra14Component.pypp.cpp b/wrapper/MM/Intra14Component.pypp.cpp index 1a51dfacf..e5f4f402c 100644 --- a/wrapper/MM/Intra14Component.pypp.cpp +++ b/wrapper/MM/Intra14Component.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::Intra14Component __copy__(const SireMM::Intra14Component &other){ return SireMM::Intra14Component(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -131,9 +133,9 @@ void register_Intra14Component_class(){ } Intra14Component_exposer.staticmethod( "typeName" ); - Intra14Component_exposer.def( "__copy__", &__copy__); - Intra14Component_exposer.def( "__deepcopy__", &__copy__); - Intra14Component_exposer.def( "clone", &__copy__); + Intra14Component_exposer.def( "__copy__", &__copy__); + Intra14Component_exposer.def( "__deepcopy__", &__copy__); + Intra14Component_exposer.def( "clone", &__copy__); Intra14Component_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::Intra14Component >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Intra14Component_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::Intra14Component >, diff --git a/wrapper/MM/Intra14CoulombComponent.pypp.cpp b/wrapper/MM/Intra14CoulombComponent.pypp.cpp index 410d6eef9..b686bcfd2 100644 --- a/wrapper/MM/Intra14CoulombComponent.pypp.cpp +++ b/wrapper/MM/Intra14CoulombComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::Intra14CoulombComponent __copy__(const SireMM::Intra14CoulombComponent &other){ return SireMM::Intra14CoulombComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_Intra14CoulombComponent_class(){ } Intra14CoulombComponent_exposer.staticmethod( "typeName" ); - Intra14CoulombComponent_exposer.def( "__copy__", &__copy__); - Intra14CoulombComponent_exposer.def( "__deepcopy__", &__copy__); - Intra14CoulombComponent_exposer.def( "clone", &__copy__); + Intra14CoulombComponent_exposer.def( "__copy__", &__copy__); + Intra14CoulombComponent_exposer.def( "__deepcopy__", &__copy__); + Intra14CoulombComponent_exposer.def( "clone", &__copy__); Intra14CoulombComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::Intra14CoulombComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Intra14CoulombComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::Intra14CoulombComponent >, diff --git a/wrapper/MM/Intra14LJComponent.pypp.cpp b/wrapper/MM/Intra14LJComponent.pypp.cpp index 5216f3dbf..128c38718 100644 --- a/wrapper/MM/Intra14LJComponent.pypp.cpp +++ b/wrapper/MM/Intra14LJComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::Intra14LJComponent __copy__(const SireMM::Intra14LJComponent &other){ return SireMM::Intra14LJComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_Intra14LJComponent_class(){ } Intra14LJComponent_exposer.staticmethod( "typeName" ); - Intra14LJComponent_exposer.def( "__copy__", &__copy__); - Intra14LJComponent_exposer.def( "__deepcopy__", &__copy__); - Intra14LJComponent_exposer.def( "clone", &__copy__); + Intra14LJComponent_exposer.def( "__copy__", &__copy__); + Intra14LJComponent_exposer.def( "__deepcopy__", &__copy__); + Intra14LJComponent_exposer.def( "clone", &__copy__); Intra14LJComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::Intra14LJComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); Intra14LJComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::Intra14LJComponent >, diff --git a/wrapper/MM/IntraCLJFF.pypp.cpp b/wrapper/MM/IntraCLJFF.pypp.cpp index 6f12aa84f..dee12dea3 100644 --- a/wrapper/MM/IntraCLJFF.pypp.cpp +++ b/wrapper/MM/IntraCLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Intra2B3DFF > __copy__(const SireFF::Intra2B3DFF > &other){ return SireFF::Intra2B3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_IntraCLJFF_class(){ } IntraCLJFF_exposer.staticmethod( "typeName" ); - IntraCLJFF_exposer.def( "__copy__", &__copy__); - IntraCLJFF_exposer.def( "__deepcopy__", &__copy__); - IntraCLJFF_exposer.def( "clone", &__copy__); + IntraCLJFF_exposer.def( "__copy__", &__copy__ >>); + IntraCLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + IntraCLJFF_exposer.def( "clone", &__copy__ >>); IntraCLJFF_exposer.def( "__str__", &__str__< ::SireFF::Intra2B3DFF > > ); IntraCLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Intra2B3DFF > > ); IntraCLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Intra2B3DFF > > ); diff --git a/wrapper/MM/IntraCLJFFBase.pypp.cpp b/wrapper/MM/IntraCLJFFBase.pypp.cpp index 0201a35e7..def5eddf0 100644 --- a/wrapper/MM/IntraCLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraCLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Intra2BFF > __copy__(const SireFF::Intra2BFF > &other){ return SireFF::Intra2BFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_IntraCLJFFBase_class(){ } IntraCLJFFBase_exposer.staticmethod( "typeName" ); - IntraCLJFFBase_exposer.def( "__copy__", &__copy__); - IntraCLJFFBase_exposer.def( "__deepcopy__", &__copy__); - IntraCLJFFBase_exposer.def( "clone", &__copy__); + IntraCLJFFBase_exposer.def( "__copy__", &__copy__ >>); + IntraCLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + IntraCLJFFBase_exposer.def( "clone", &__copy__ >>); IntraCLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Intra2BFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraCLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Intra2BFF > >, diff --git a/wrapper/MM/IntraCoulombFF.pypp.cpp b/wrapper/MM/IntraCoulombFF.pypp.cpp index 4f48f5197..b291aa559 100644 --- a/wrapper/MM/IntraCoulombFF.pypp.cpp +++ b/wrapper/MM/IntraCoulombFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Intra2B3DFF > __copy__(const SireFF::Intra2B3DFF > &other){ return SireFF::Intra2B3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_IntraCoulombFF_class(){ } IntraCoulombFF_exposer.staticmethod( "typeName" ); - IntraCoulombFF_exposer.def( "__copy__", &__copy__); - IntraCoulombFF_exposer.def( "__deepcopy__", &__copy__); - IntraCoulombFF_exposer.def( "clone", &__copy__); + IntraCoulombFF_exposer.def( "__copy__", &__copy__ >>); + IntraCoulombFF_exposer.def( "__deepcopy__", &__copy__ >>); + IntraCoulombFF_exposer.def( "clone", &__copy__ >>); IntraCoulombFF_exposer.def( "__str__", &__str__< ::SireFF::Intra2B3DFF > > ); IntraCoulombFF_exposer.def( "__repr__", &__str__< ::SireFF::Intra2B3DFF > > ); IntraCoulombFF_exposer.def( "__len__", &__len_count< ::SireFF::Intra2B3DFF > > ); diff --git a/wrapper/MM/IntraCoulombFFBase.pypp.cpp b/wrapper/MM/IntraCoulombFFBase.pypp.cpp index 110439c7a..f727b2ea3 100644 --- a/wrapper/MM/IntraCoulombFFBase.pypp.cpp +++ b/wrapper/MM/IntraCoulombFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Intra2BFF > __copy__(const SireFF::Intra2BFF > &other){ return SireFF::Intra2BFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_IntraCoulombFFBase_class(){ } IntraCoulombFFBase_exposer.staticmethod( "typeName" ); - IntraCoulombFFBase_exposer.def( "__copy__", &__copy__); - IntraCoulombFFBase_exposer.def( "__deepcopy__", &__copy__); - IntraCoulombFFBase_exposer.def( "clone", &__copy__); + IntraCoulombFFBase_exposer.def( "__copy__", &__copy__ >>); + IntraCoulombFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + IntraCoulombFFBase_exposer.def( "clone", &__copy__ >>); IntraCoulombFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Intra2BFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraCoulombFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Intra2BFF > >, diff --git a/wrapper/MM/IntraFF.pypp.cpp b/wrapper/MM/IntraFF.pypp.cpp index b3f37ffc4..746b9cdb0 100644 --- a/wrapper/MM/IntraFF.pypp.cpp +++ b/wrapper/MM/IntraFF.pypp.cpp @@ -52,6 +52,8 @@ namespace bp = boost::python; SireMM::IntraFF __copy__(const SireMM::IntraFF &other){ return SireMM::IntraFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -417,9 +419,9 @@ void register_IntraFF_class(){ } IntraFF_exposer.staticmethod( "typeName" ); - IntraFF_exposer.def( "__copy__", &__copy__); - IntraFF_exposer.def( "__deepcopy__", &__copy__); - IntraFF_exposer.def( "clone", &__copy__); + IntraFF_exposer.def( "__copy__", &__copy__); + IntraFF_exposer.def( "__deepcopy__", &__copy__); + IntraFF_exposer.def( "clone", &__copy__); IntraFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::IntraFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::IntraFF >, diff --git a/wrapper/MM/IntraGroupCLJFF.pypp.cpp b/wrapper/MM/IntraGroupCLJFF.pypp.cpp index 97a0eddc2..788e6d2b4 100644 --- a/wrapper/MM/IntraGroupCLJFF.pypp.cpp +++ b/wrapper/MM/IntraGroupCLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Intra2B2G3DFF > __copy__(const SireFF::Intra2B2G3DFF > &other){ return SireFF::Intra2B2G3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_IntraGroupCLJFF_class(){ } IntraGroupCLJFF_exposer.staticmethod( "typeName" ); - IntraGroupCLJFF_exposer.def( "__copy__", &__copy__); - IntraGroupCLJFF_exposer.def( "__deepcopy__", &__copy__); - IntraGroupCLJFF_exposer.def( "clone", &__copy__); + IntraGroupCLJFF_exposer.def( "__copy__", &__copy__ >>); + IntraGroupCLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + IntraGroupCLJFF_exposer.def( "clone", &__copy__ >>); IntraGroupCLJFF_exposer.def( "__str__", &__str__< ::SireFF::Intra2B2G3DFF > > ); IntraGroupCLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Intra2B2G3DFF > > ); IntraGroupCLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Intra2B2G3DFF > > ); diff --git a/wrapper/MM/IntraGroupCLJFFBase.pypp.cpp b/wrapper/MM/IntraGroupCLJFFBase.pypp.cpp index 89c219106..14a42e154 100644 --- a/wrapper/MM/IntraGroupCLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraGroupCLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Intra2B2GFF > __copy__(const SireFF::Intra2B2GFF > &other){ return SireFF::Intra2B2GFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_IntraGroupCLJFFBase_class(){ } IntraGroupCLJFFBase_exposer.staticmethod( "typeName" ); - IntraGroupCLJFFBase_exposer.def( "__copy__", &__copy__); - IntraGroupCLJFFBase_exposer.def( "__deepcopy__", &__copy__); - IntraGroupCLJFFBase_exposer.def( "clone", &__copy__); + IntraGroupCLJFFBase_exposer.def( "__copy__", &__copy__ >>); + IntraGroupCLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + IntraGroupCLJFFBase_exposer.def( "clone", &__copy__ >>); IntraGroupCLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Intra2B2GFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraGroupCLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Intra2B2GFF > >, diff --git a/wrapper/MM/IntraGroupCoulombFF.pypp.cpp b/wrapper/MM/IntraGroupCoulombFF.pypp.cpp index a40c7dfd3..26deed2ce 100644 --- a/wrapper/MM/IntraGroupCoulombFF.pypp.cpp +++ b/wrapper/MM/IntraGroupCoulombFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Intra2B2G3DFF > __copy__(const SireFF::Intra2B2G3DFF > &other){ return SireFF::Intra2B2G3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_IntraGroupCoulombFF_class(){ } IntraGroupCoulombFF_exposer.staticmethod( "typeName" ); - IntraGroupCoulombFF_exposer.def( "__copy__", &__copy__); - IntraGroupCoulombFF_exposer.def( "__deepcopy__", &__copy__); - IntraGroupCoulombFF_exposer.def( "clone", &__copy__); + IntraGroupCoulombFF_exposer.def( "__copy__", &__copy__ >>); + IntraGroupCoulombFF_exposer.def( "__deepcopy__", &__copy__ >>); + IntraGroupCoulombFF_exposer.def( "clone", &__copy__ >>); IntraGroupCoulombFF_exposer.def( "__str__", &__str__< ::SireFF::Intra2B2G3DFF > > ); IntraGroupCoulombFF_exposer.def( "__repr__", &__str__< ::SireFF::Intra2B2G3DFF > > ); IntraGroupCoulombFF_exposer.def( "__len__", &__len_count< ::SireFF::Intra2B2G3DFF > > ); diff --git a/wrapper/MM/IntraGroupCoulombFFBase.pypp.cpp b/wrapper/MM/IntraGroupCoulombFFBase.pypp.cpp index a677dda73..51a526e33 100644 --- a/wrapper/MM/IntraGroupCoulombFFBase.pypp.cpp +++ b/wrapper/MM/IntraGroupCoulombFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Intra2B2GFF > __copy__(const SireFF::Intra2B2GFF > &other){ return SireFF::Intra2B2GFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_IntraGroupCoulombFFBase_class(){ } IntraGroupCoulombFFBase_exposer.staticmethod( "typeName" ); - IntraGroupCoulombFFBase_exposer.def( "__copy__", &__copy__); - IntraGroupCoulombFFBase_exposer.def( "__deepcopy__", &__copy__); - IntraGroupCoulombFFBase_exposer.def( "clone", &__copy__); + IntraGroupCoulombFFBase_exposer.def( "__copy__", &__copy__ >>); + IntraGroupCoulombFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + IntraGroupCoulombFFBase_exposer.def( "clone", &__copy__ >>); IntraGroupCoulombFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Intra2B2GFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraGroupCoulombFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Intra2B2GFF > >, diff --git a/wrapper/MM/IntraGroupFF.pypp.cpp b/wrapper/MM/IntraGroupFF.pypp.cpp index 55ae07e2b..b304e485e 100644 --- a/wrapper/MM/IntraGroupFF.pypp.cpp +++ b/wrapper/MM/IntraGroupFF.pypp.cpp @@ -52,6 +52,8 @@ namespace bp = boost::python; SireMM::IntraGroupFF __copy__(const SireMM::IntraGroupFF &other){ return SireMM::IntraGroupFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -417,9 +419,9 @@ void register_IntraGroupFF_class(){ } IntraGroupFF_exposer.staticmethod( "typeName" ); - IntraGroupFF_exposer.def( "__copy__", &__copy__); - IntraGroupFF_exposer.def( "__deepcopy__", &__copy__); - IntraGroupFF_exposer.def( "clone", &__copy__); + IntraGroupFF_exposer.def( "__copy__", &__copy__); + IntraGroupFF_exposer.def( "__deepcopy__", &__copy__); + IntraGroupFF_exposer.def( "clone", &__copy__); IntraGroupFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::IntraGroupFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraGroupFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::IntraGroupFF >, diff --git a/wrapper/MM/IntraGroupLJFF.pypp.cpp b/wrapper/MM/IntraGroupLJFF.pypp.cpp index 5b230790a..9d57fc55d 100644 --- a/wrapper/MM/IntraGroupLJFF.pypp.cpp +++ b/wrapper/MM/IntraGroupLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Intra2B2G3DFF > __copy__(const SireFF::Intra2B2G3DFF > &other){ return SireFF::Intra2B2G3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_IntraGroupLJFF_class(){ } IntraGroupLJFF_exposer.staticmethod( "typeName" ); - IntraGroupLJFF_exposer.def( "__copy__", &__copy__); - IntraGroupLJFF_exposer.def( "__deepcopy__", &__copy__); - IntraGroupLJFF_exposer.def( "clone", &__copy__); + IntraGroupLJFF_exposer.def( "__copy__", &__copy__ >>); + IntraGroupLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + IntraGroupLJFF_exposer.def( "clone", &__copy__ >>); IntraGroupLJFF_exposer.def( "__str__", &__str__< ::SireFF::Intra2B2G3DFF > > ); IntraGroupLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Intra2B2G3DFF > > ); IntraGroupLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Intra2B2G3DFF > > ); diff --git a/wrapper/MM/IntraGroupLJFFBase.pypp.cpp b/wrapper/MM/IntraGroupLJFFBase.pypp.cpp index a09391fc1..3fe5023a1 100644 --- a/wrapper/MM/IntraGroupLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraGroupLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Intra2B2GFF > __copy__(const SireFF::Intra2B2GFF > &other){ return SireFF::Intra2B2GFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_IntraGroupLJFFBase_class(){ } IntraGroupLJFFBase_exposer.staticmethod( "typeName" ); - IntraGroupLJFFBase_exposer.def( "__copy__", &__copy__); - IntraGroupLJFFBase_exposer.def( "__deepcopy__", &__copy__); - IntraGroupLJFFBase_exposer.def( "clone", &__copy__); + IntraGroupLJFFBase_exposer.def( "__copy__", &__copy__ >>); + IntraGroupLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + IntraGroupLJFFBase_exposer.def( "clone", &__copy__ >>); IntraGroupLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Intra2B2GFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraGroupLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Intra2B2GFF > >, diff --git a/wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp b/wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp index c94e4e885..d47af10cd 100644 --- a/wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp +++ b/wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Intra2B2G3DFF > __copy__(const SireFF::Intra2B2G3DFF > &other){ return SireFF::Intra2B2G3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_IntraGroupSoftCLJFF_class(){ } IntraGroupSoftCLJFF_exposer.staticmethod( "typeName" ); - IntraGroupSoftCLJFF_exposer.def( "__copy__", &__copy__); - IntraGroupSoftCLJFF_exposer.def( "__deepcopy__", &__copy__); - IntraGroupSoftCLJFF_exposer.def( "clone", &__copy__); + IntraGroupSoftCLJFF_exposer.def( "__copy__", &__copy__ >>); + IntraGroupSoftCLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + IntraGroupSoftCLJFF_exposer.def( "clone", &__copy__ >>); IntraGroupSoftCLJFF_exposer.def( "__str__", &__str__< ::SireFF::Intra2B2G3DFF > > ); IntraGroupSoftCLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Intra2B2G3DFF > > ); IntraGroupSoftCLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Intra2B2G3DFF > > ); diff --git a/wrapper/MM/IntraGroupSoftCLJFFBase.pypp.cpp b/wrapper/MM/IntraGroupSoftCLJFFBase.pypp.cpp index d893546d4..9a59c5988 100644 --- a/wrapper/MM/IntraGroupSoftCLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraGroupSoftCLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Intra2B2GFF > __copy__(const SireFF::Intra2B2GFF > &other){ return SireFF::Intra2B2GFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_IntraGroupSoftCLJFFBase_class(){ } IntraGroupSoftCLJFFBase_exposer.staticmethod( "typeName" ); - IntraGroupSoftCLJFFBase_exposer.def( "__copy__", &__copy__); - IntraGroupSoftCLJFFBase_exposer.def( "__deepcopy__", &__copy__); - IntraGroupSoftCLJFFBase_exposer.def( "clone", &__copy__); + IntraGroupSoftCLJFFBase_exposer.def( "__copy__", &__copy__ >>); + IntraGroupSoftCLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + IntraGroupSoftCLJFFBase_exposer.def( "clone", &__copy__ >>); IntraGroupSoftCLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Intra2B2GFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraGroupSoftCLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Intra2B2GFF > >, diff --git a/wrapper/MM/IntraLJFF.pypp.cpp b/wrapper/MM/IntraLJFF.pypp.cpp index ba11d2313..cf8b5090a 100644 --- a/wrapper/MM/IntraLJFF.pypp.cpp +++ b/wrapper/MM/IntraLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Intra2B3DFF > __copy__(const SireFF::Intra2B3DFF > &other){ return SireFF::Intra2B3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_IntraLJFF_class(){ } IntraLJFF_exposer.staticmethod( "typeName" ); - IntraLJFF_exposer.def( "__copy__", &__copy__); - IntraLJFF_exposer.def( "__deepcopy__", &__copy__); - IntraLJFF_exposer.def( "clone", &__copy__); + IntraLJFF_exposer.def( "__copy__", &__copy__ >>); + IntraLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + IntraLJFF_exposer.def( "clone", &__copy__ >>); IntraLJFF_exposer.def( "__str__", &__str__< ::SireFF::Intra2B3DFF > > ); IntraLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Intra2B3DFF > > ); IntraLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Intra2B3DFF > > ); diff --git a/wrapper/MM/IntraLJFFBase.pypp.cpp b/wrapper/MM/IntraLJFFBase.pypp.cpp index 46856d0c6..c364de7f3 100644 --- a/wrapper/MM/IntraLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Intra2BFF > __copy__(const SireFF::Intra2BFF > &other){ return SireFF::Intra2BFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_IntraLJFFBase_class(){ } IntraLJFFBase_exposer.staticmethod( "typeName" ); - IntraLJFFBase_exposer.def( "__copy__", &__copy__); - IntraLJFFBase_exposer.def( "__deepcopy__", &__copy__); - IntraLJFFBase_exposer.def( "clone", &__copy__); + IntraLJFFBase_exposer.def( "__copy__", &__copy__ >>); + IntraLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + IntraLJFFBase_exposer.def( "clone", &__copy__ >>); IntraLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Intra2BFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Intra2BFF > >, diff --git a/wrapper/MM/IntraSoftCLJFF.pypp.cpp b/wrapper/MM/IntraSoftCLJFF.pypp.cpp index 2204a400e..5356437b2 100644 --- a/wrapper/MM/IntraSoftCLJFF.pypp.cpp +++ b/wrapper/MM/IntraSoftCLJFF.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireFF::Intra2B3DFF > __copy__(const SireFF::Intra2B3DFF > &other){ return SireFF::Intra2B3DFF >(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -257,9 +259,9 @@ void register_IntraSoftCLJFF_class(){ } IntraSoftCLJFF_exposer.staticmethod( "typeName" ); - IntraSoftCLJFF_exposer.def( "__copy__", &__copy__); - IntraSoftCLJFF_exposer.def( "__deepcopy__", &__copy__); - IntraSoftCLJFF_exposer.def( "clone", &__copy__); + IntraSoftCLJFF_exposer.def( "__copy__", &__copy__ >>); + IntraSoftCLJFF_exposer.def( "__deepcopy__", &__copy__ >>); + IntraSoftCLJFF_exposer.def( "clone", &__copy__ >>); IntraSoftCLJFF_exposer.def( "__str__", &__str__< ::SireFF::Intra2B3DFF > > ); IntraSoftCLJFF_exposer.def( "__repr__", &__str__< ::SireFF::Intra2B3DFF > > ); IntraSoftCLJFF_exposer.def( "__len__", &__len_count< ::SireFF::Intra2B3DFF > > ); diff --git a/wrapper/MM/IntraSoftCLJFFBase.pypp.cpp b/wrapper/MM/IntraSoftCLJFFBase.pypp.cpp index ac7889f67..6d994839b 100644 --- a/wrapper/MM/IntraSoftCLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraSoftCLJFFBase.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireFF::Intra2BFF > __copy__(const SireFF::Intra2BFF > &other){ return SireFF::Intra2BFF >(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -158,9 +160,9 @@ void register_IntraSoftCLJFFBase_class(){ } IntraSoftCLJFFBase_exposer.staticmethod( "typeName" ); - IntraSoftCLJFFBase_exposer.def( "__copy__", &__copy__); - IntraSoftCLJFFBase_exposer.def( "__deepcopy__", &__copy__); - IntraSoftCLJFFBase_exposer.def( "clone", &__copy__); + IntraSoftCLJFFBase_exposer.def( "__copy__", &__copy__ >>); + IntraSoftCLJFFBase_exposer.def( "__deepcopy__", &__copy__ >>); + IntraSoftCLJFFBase_exposer.def( "clone", &__copy__ >>); IntraSoftCLJFFBase_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireFF::Intra2BFF > >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); IntraSoftCLJFFBase_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireFF::Intra2BFF > >, diff --git a/wrapper/MM/LJ1264Parameter.pypp.cpp b/wrapper/MM/LJ1264Parameter.pypp.cpp index 9fe0a8c69..c5ac70af3 100644 --- a/wrapper/MM/LJ1264Parameter.pypp.cpp +++ b/wrapper/MM/LJ1264Parameter.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::LJ1264Parameter __copy__(const SireMM::LJ1264Parameter &other){ return SireMM::LJ1264Parameter(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -260,9 +262,9 @@ void register_LJ1264Parameter_class(){ LJ1264Parameter_exposer.staticmethod( "CUnit" ); LJ1264Parameter_exposer.staticmethod( "dummy" ); LJ1264Parameter_exposer.staticmethod( "typeName" ); - LJ1264Parameter_exposer.def( "__copy__", &__copy__); - LJ1264Parameter_exposer.def( "__deepcopy__", &__copy__); - LJ1264Parameter_exposer.def( "clone", &__copy__); + LJ1264Parameter_exposer.def( "__copy__", &__copy__); + LJ1264Parameter_exposer.def( "__deepcopy__", &__copy__); + LJ1264Parameter_exposer.def( "clone", &__copy__); LJ1264Parameter_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJ1264Parameter >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJ1264Parameter_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJ1264Parameter >, diff --git a/wrapper/MM/LJComponent.pypp.cpp b/wrapper/MM/LJComponent.pypp.cpp index bb86a3723..f2775c928 100644 --- a/wrapper/MM/LJComponent.pypp.cpp +++ b/wrapper/MM/LJComponent.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; SireMM::LJComponent __copy__(const SireMM::LJComponent &other){ return SireMM::LJComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -106,9 +108,9 @@ void register_LJComponent_class(){ } LJComponent_exposer.staticmethod( "typeName" ); - LJComponent_exposer.def( "__copy__", &__copy__); - LJComponent_exposer.def( "__deepcopy__", &__copy__); - LJComponent_exposer.def( "clone", &__copy__); + LJComponent_exposer.def( "__copy__", &__copy__); + LJComponent_exposer.def( "__deepcopy__", &__copy__); + LJComponent_exposer.def( "clone", &__copy__); LJComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJComponent >, diff --git a/wrapper/MM/LJException.pypp.cpp b/wrapper/MM/LJException.pypp.cpp index cf1805cc4..30005f7ed 100644 --- a/wrapper/MM/LJException.pypp.cpp +++ b/wrapper/MM/LJException.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; SireMM::LJException __copy__(const SireMM::LJException &other){ return SireMM::LJException(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -147,9 +149,9 @@ void register_LJException_class(){ } LJException_exposer.staticmethod( "typeName" ); - LJException_exposer.def( "__copy__", &__copy__); - LJException_exposer.def( "__deepcopy__", &__copy__); - LJException_exposer.def( "clone", &__copy__); + LJException_exposer.def( "__copy__", &__copy__); + LJException_exposer.def( "__deepcopy__", &__copy__); + LJException_exposer.def( "clone", &__copy__); LJException_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJException >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJException_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJException >, diff --git a/wrapper/MM/LJExceptionID.pypp.cpp b/wrapper/MM/LJExceptionID.pypp.cpp index cc5842269..6faa936b3 100644 --- a/wrapper/MM/LJExceptionID.pypp.cpp +++ b/wrapper/MM/LJExceptionID.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; SireMM::LJExceptionID __copy__(const SireMM::LJExceptionID &other){ return SireMM::LJExceptionID(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -134,9 +136,9 @@ void register_LJExceptionID_class(){ } LJExceptionID_exposer.staticmethod( "generate" ); LJExceptionID_exposer.staticmethod( "typeName" ); - LJExceptionID_exposer.def( "__copy__", &__copy__); - LJExceptionID_exposer.def( "__deepcopy__", &__copy__); - LJExceptionID_exposer.def( "clone", &__copy__); + LJExceptionID_exposer.def( "__copy__", &__copy__); + LJExceptionID_exposer.def( "__deepcopy__", &__copy__); + LJExceptionID_exposer.def( "clone", &__copy__); LJExceptionID_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJExceptionID >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJExceptionID_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJExceptionID >, diff --git a/wrapper/MM/LJNBPairs.pypp.cpp b/wrapper/MM/LJNBPairs.pypp.cpp index 35d645d87..a4e88a009 100644 --- a/wrapper/MM/LJNBPairs.pypp.cpp +++ b/wrapper/MM/LJNBPairs.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::LJNBPairs __copy__(const SireMM::LJNBPairs &other){ return SireMM::LJNBPairs(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -76,9 +78,9 @@ void register_LJNBPairs_class(){ } LJNBPairs_exposer.staticmethod( "typeName" ); - LJNBPairs_exposer.def( "__copy__", &__copy__); - LJNBPairs_exposer.def( "__deepcopy__", &__copy__); - LJNBPairs_exposer.def( "clone", &__copy__); + LJNBPairs_exposer.def( "__copy__", &__copy__); + LJNBPairs_exposer.def( "__deepcopy__", &__copy__); + LJNBPairs_exposer.def( "clone", &__copy__); LJNBPairs_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJNBPairs >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJNBPairs_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJNBPairs >, diff --git a/wrapper/MM/LJParameter.pypp.cpp b/wrapper/MM/LJParameter.pypp.cpp index 4854a2988..7dcef8cb0 100644 --- a/wrapper/MM/LJParameter.pypp.cpp +++ b/wrapper/MM/LJParameter.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::LJParameter __copy__(const SireMM::LJParameter &other){ return SireMM::LJParameter(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -280,9 +282,9 @@ void register_LJParameter_class(){ LJParameter_exposer.staticmethod( "fromRMinAndEpsilon" ); LJParameter_exposer.staticmethod( "fromSigmaAndEpsilon" ); LJParameter_exposer.staticmethod( "typeName" ); - LJParameter_exposer.def( "__copy__", &__copy__); - LJParameter_exposer.def( "__deepcopy__", &__copy__); - LJParameter_exposer.def( "clone", &__copy__); + LJParameter_exposer.def( "__copy__", &__copy__); + LJParameter_exposer.def( "__deepcopy__", &__copy__); + LJParameter_exposer.def( "clone", &__copy__); LJParameter_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJParameter >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJParameter_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJParameter >, diff --git a/wrapper/MM/LJParameterName.pypp.cpp b/wrapper/MM/LJParameterName.pypp.cpp index 3c980d478..ceb899c56 100644 --- a/wrapper/MM/LJParameterName.pypp.cpp +++ b/wrapper/MM/LJParameterName.pypp.cpp @@ -45,6 +45,8 @@ namespace bp = boost::python; SireMM::LJParameterName __copy__(const SireMM::LJParameterName &other){ return SireMM::LJParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::LJParameterName&){ return "SireMM::LJParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -67,9 +69,9 @@ void register_LJParameterName_class(){ , "" ); } - LJParameterName_exposer.def( "__copy__", &__copy__); - LJParameterName_exposer.def( "__deepcopy__", &__copy__); - LJParameterName_exposer.def( "clone", &__copy__); + LJParameterName_exposer.def( "__copy__", &__copy__); + LJParameterName_exposer.def( "__deepcopy__", &__copy__); + LJParameterName_exposer.def( "clone", &__copy__); LJParameterName_exposer.def( "__str__", &pvt_get_name); LJParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/LJParameterName3D.pypp.cpp b/wrapper/MM/LJParameterName3D.pypp.cpp index 5e463fa96..bce566119 100644 --- a/wrapper/MM/LJParameterName3D.pypp.cpp +++ b/wrapper/MM/LJParameterName3D.pypp.cpp @@ -45,6 +45,8 @@ namespace bp = boost::python; SireMM::LJParameterName3D __copy__(const SireMM::LJParameterName3D &other){ return SireMM::LJParameterName3D(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::LJParameterName3D&){ return "SireMM::LJParameterName3D";} #include "Helpers/release_gil_policy.hpp" @@ -55,9 +57,9 @@ void register_LJParameterName3D_class(){ typedef bp::class_< SireMM::LJParameterName3D, bp::bases< SireMM::LJParameterName > > LJParameterName3D_exposer_t; LJParameterName3D_exposer_t LJParameterName3D_exposer = LJParameterName3D_exposer_t( "LJParameterName3D", "This class provides the default name of the properties\nthat contain the LJ and 3D coordinates properties", bp::init< >("") ); bp::scope LJParameterName3D_scope( LJParameterName3D_exposer ); - LJParameterName3D_exposer.def( "__copy__", &__copy__); - LJParameterName3D_exposer.def( "__deepcopy__", &__copy__); - LJParameterName3D_exposer.def( "clone", &__copy__); + LJParameterName3D_exposer.def( "__copy__", &__copy__); + LJParameterName3D_exposer.def( "__deepcopy__", &__copy__); + LJParameterName3D_exposer.def( "clone", &__copy__); LJParameterName3D_exposer.def( "__str__", &pvt_get_name); LJParameterName3D_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/LJPerturbation.pypp.cpp b/wrapper/MM/LJPerturbation.pypp.cpp index 48e353733..c39218299 100644 --- a/wrapper/MM/LJPerturbation.pypp.cpp +++ b/wrapper/MM/LJPerturbation.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; SireMM::LJPerturbation __copy__(const SireMM::LJPerturbation &other){ return SireMM::LJPerturbation(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -267,9 +269,9 @@ void register_LJPerturbation_class(){ } LJPerturbation_exposer.staticmethod( "typeName" ); - LJPerturbation_exposer.def( "__copy__", &__copy__); - LJPerturbation_exposer.def( "__deepcopy__", &__copy__); - LJPerturbation_exposer.def( "clone", &__copy__); + LJPerturbation_exposer.def( "__copy__", &__copy__); + LJPerturbation_exposer.def( "__deepcopy__", &__copy__); + LJPerturbation_exposer.def( "clone", &__copy__); LJPerturbation_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJPerturbation >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJPerturbation_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJPerturbation >, diff --git a/wrapper/MM/LJProbe.pypp.cpp b/wrapper/MM/LJProbe.pypp.cpp index 5a81755cb..9f6f633ca 100644 --- a/wrapper/MM/LJProbe.pypp.cpp +++ b/wrapper/MM/LJProbe.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; SireMM::LJProbe __copy__(const SireMM::LJProbe &other){ return SireMM::LJProbe(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -73,9 +75,9 @@ void register_LJProbe_class(){ } LJProbe_exposer.staticmethod( "typeName" ); - LJProbe_exposer.def( "__copy__", &__copy__); - LJProbe_exposer.def( "__deepcopy__", &__copy__); - LJProbe_exposer.def( "clone", &__copy__); + LJProbe_exposer.def( "__copy__", &__copy__); + LJProbe_exposer.def( "__deepcopy__", &__copy__); + LJProbe_exposer.def( "clone", &__copy__); LJProbe_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJProbe >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJProbe_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJProbe >, diff --git a/wrapper/MM/LJScaleFactor.pypp.cpp b/wrapper/MM/LJScaleFactor.pypp.cpp index 5d7743add..dc63a3679 100644 --- a/wrapper/MM/LJScaleFactor.pypp.cpp +++ b/wrapper/MM/LJScaleFactor.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; SireMM::LJScaleFactor __copy__(const SireMM::LJScaleFactor &other){ return SireMM::LJScaleFactor(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" const char* pvt_get_name(const SireMM::LJScaleFactor&){ return "SireMM::LJScaleFactor";} @@ -84,9 +86,9 @@ void register_LJScaleFactor_class(){ } LJScaleFactor_exposer.staticmethod( "typeName" ); - LJScaleFactor_exposer.def( "__copy__", &__copy__); - LJScaleFactor_exposer.def( "__deepcopy__", &__copy__); - LJScaleFactor_exposer.def( "clone", &__copy__); + LJScaleFactor_exposer.def( "__copy__", &__copy__); + LJScaleFactor_exposer.def( "__deepcopy__", &__copy__); + LJScaleFactor_exposer.def( "clone", &__copy__); LJScaleFactor_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::LJScaleFactor >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); LJScaleFactor_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::LJScaleFactor >, diff --git a/wrapper/MM/MMDetail.pypp.cpp b/wrapper/MM/MMDetail.pypp.cpp index 7b7b37087..5c6a4ef5f 100644 --- a/wrapper/MM/MMDetail.pypp.cpp +++ b/wrapper/MM/MMDetail.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; SireMM::MMDetail __copy__(const SireMM::MMDetail &other){ return SireMM::MMDetail(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -330,9 +332,9 @@ void register_MMDetail_class(){ } MMDetail_exposer.staticmethod( "guessFrom" ); MMDetail_exposer.staticmethod( "typeName" ); - MMDetail_exposer.def( "__copy__", &__copy__); - MMDetail_exposer.def( "__deepcopy__", &__copy__); - MMDetail_exposer.def( "clone", &__copy__); + MMDetail_exposer.def( "__copy__", &__copy__); + MMDetail_exposer.def( "__deepcopy__", &__copy__); + MMDetail_exposer.def( "clone", &__copy__); MMDetail_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::MMDetail >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); MMDetail_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::MMDetail >, diff --git a/wrapper/MM/Mover_Angle_.pypp.cpp b/wrapper/MM/Mover_Angle_.pypp.cpp index 022dfd89f..f4bbc2dfd 100644 --- a/wrapper/MM/Mover_Angle_.pypp.cpp +++ b/wrapper/MM/Mover_Angle_.pypp.cpp @@ -87,6 +87,8 @@ namespace bp = boost::python; SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -478,9 +480,9 @@ void register_Mover_Angle__class(){ } Mover_Angle__exposer.staticmethod( "typeName" ); - Mover_Angle__exposer.def( "__copy__", &__copy__); - Mover_Angle__exposer.def( "__deepcopy__", &__copy__); - Mover_Angle__exposer.def( "clone", &__copy__); + Mover_Angle__exposer.def( "__copy__", &__copy__>); + Mover_Angle__exposer.def( "__deepcopy__", &__copy__>); + Mover_Angle__exposer.def( "clone", &__copy__>); Mover_Angle__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); Mover_Angle__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); Mover_Angle__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); diff --git a/wrapper/MM/Mover_Bond_.pypp.cpp b/wrapper/MM/Mover_Bond_.pypp.cpp index 16c12f527..e839ee37b 100644 --- a/wrapper/MM/Mover_Bond_.pypp.cpp +++ b/wrapper/MM/Mover_Bond_.pypp.cpp @@ -87,6 +87,8 @@ namespace bp = boost::python; SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -478,9 +480,9 @@ void register_Mover_Bond__class(){ } Mover_Bond__exposer.staticmethod( "typeName" ); - Mover_Bond__exposer.def( "__copy__", &__copy__); - Mover_Bond__exposer.def( "__deepcopy__", &__copy__); - Mover_Bond__exposer.def( "clone", &__copy__); + Mover_Bond__exposer.def( "__copy__", &__copy__>); + Mover_Bond__exposer.def( "__deepcopy__", &__copy__>); + Mover_Bond__exposer.def( "clone", &__copy__>); Mover_Bond__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); Mover_Bond__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); Mover_Bond__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); diff --git a/wrapper/MM/Mover_Dihedral_.pypp.cpp b/wrapper/MM/Mover_Dihedral_.pypp.cpp index 3f85c2020..a7a76d031 100644 --- a/wrapper/MM/Mover_Dihedral_.pypp.cpp +++ b/wrapper/MM/Mover_Dihedral_.pypp.cpp @@ -87,6 +87,8 @@ namespace bp = boost::python; SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -478,9 +480,9 @@ void register_Mover_Dihedral__class(){ } Mover_Dihedral__exposer.staticmethod( "typeName" ); - Mover_Dihedral__exposer.def( "__copy__", &__copy__); - Mover_Dihedral__exposer.def( "__deepcopy__", &__copy__); - Mover_Dihedral__exposer.def( "clone", &__copy__); + Mover_Dihedral__exposer.def( "__copy__", &__copy__>); + Mover_Dihedral__exposer.def( "__deepcopy__", &__copy__>); + Mover_Dihedral__exposer.def( "clone", &__copy__>); Mover_Dihedral__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); Mover_Dihedral__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); Mover_Dihedral__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); diff --git a/wrapper/MM/Mover_Improper_.pypp.cpp b/wrapper/MM/Mover_Improper_.pypp.cpp index 842c27e46..babf94157 100644 --- a/wrapper/MM/Mover_Improper_.pypp.cpp +++ b/wrapper/MM/Mover_Improper_.pypp.cpp @@ -89,6 +89,8 @@ namespace bp = boost::python; SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -480,9 +482,9 @@ void register_Mover_Improper__class(){ } Mover_Improper__exposer.staticmethod( "typeName" ); - Mover_Improper__exposer.def( "__copy__", &__copy__); - Mover_Improper__exposer.def( "__deepcopy__", &__copy__); - Mover_Improper__exposer.def( "clone", &__copy__); + Mover_Improper__exposer.def( "__copy__", &__copy__>); + Mover_Improper__exposer.def( "__deepcopy__", &__copy__>); + Mover_Improper__exposer.def( "clone", &__copy__>); Mover_Improper__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); Mover_Improper__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); Mover_Improper__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); diff --git a/wrapper/MM/Mover_SelectorAngle_.pypp.cpp b/wrapper/MM/Mover_SelectorAngle_.pypp.cpp index b1c13727e..1530a7fed 100644 --- a/wrapper/MM/Mover_SelectorAngle_.pypp.cpp +++ b/wrapper/MM/Mover_SelectorAngle_.pypp.cpp @@ -87,6 +87,8 @@ namespace bp = boost::python; SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -478,9 +480,9 @@ void register_Mover_SelectorAngle__class(){ } Mover_SelectorAngle__exposer.staticmethod( "typeName" ); - Mover_SelectorAngle__exposer.def( "__copy__", &__copy__); - Mover_SelectorAngle__exposer.def( "__deepcopy__", &__copy__); - Mover_SelectorAngle__exposer.def( "clone", &__copy__); + Mover_SelectorAngle__exposer.def( "__copy__", &__copy__>); + Mover_SelectorAngle__exposer.def( "__deepcopy__", &__copy__>); + Mover_SelectorAngle__exposer.def( "clone", &__copy__>); Mover_SelectorAngle__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); Mover_SelectorAngle__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); Mover_SelectorAngle__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); diff --git a/wrapper/MM/Mover_SelectorBond_.pypp.cpp b/wrapper/MM/Mover_SelectorBond_.pypp.cpp index a1d736498..ca3b20263 100644 --- a/wrapper/MM/Mover_SelectorBond_.pypp.cpp +++ b/wrapper/MM/Mover_SelectorBond_.pypp.cpp @@ -85,6 +85,8 @@ namespace bp = boost::python; SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -476,9 +478,9 @@ void register_Mover_SelectorBond__class(){ } Mover_SelectorBond__exposer.staticmethod( "typeName" ); - Mover_SelectorBond__exposer.def( "__copy__", &__copy__); - Mover_SelectorBond__exposer.def( "__deepcopy__", &__copy__); - Mover_SelectorBond__exposer.def( "clone", &__copy__); + Mover_SelectorBond__exposer.def( "__copy__", &__copy__>); + Mover_SelectorBond__exposer.def( "__deepcopy__", &__copy__>); + Mover_SelectorBond__exposer.def( "clone", &__copy__>); Mover_SelectorBond__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); Mover_SelectorBond__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); Mover_SelectorBond__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); diff --git a/wrapper/MM/Mover_SelectorDihedral_.pypp.cpp b/wrapper/MM/Mover_SelectorDihedral_.pypp.cpp index da9090ad3..c29eab659 100644 --- a/wrapper/MM/Mover_SelectorDihedral_.pypp.cpp +++ b/wrapper/MM/Mover_SelectorDihedral_.pypp.cpp @@ -85,6 +85,8 @@ namespace bp = boost::python; SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -476,9 +478,9 @@ void register_Mover_SelectorDihedral__class(){ } Mover_SelectorDihedral__exposer.staticmethod( "typeName" ); - Mover_SelectorDihedral__exposer.def( "__copy__", &__copy__); - Mover_SelectorDihedral__exposer.def( "__deepcopy__", &__copy__); - Mover_SelectorDihedral__exposer.def( "clone", &__copy__); + Mover_SelectorDihedral__exposer.def( "__copy__", &__copy__>); + Mover_SelectorDihedral__exposer.def( "__deepcopy__", &__copy__>); + Mover_SelectorDihedral__exposer.def( "clone", &__copy__>); Mover_SelectorDihedral__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); Mover_SelectorDihedral__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); Mover_SelectorDihedral__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); diff --git a/wrapper/MM/Mover_SelectorImproper_.pypp.cpp b/wrapper/MM/Mover_SelectorImproper_.pypp.cpp index 8e7d5b724..55bfe92d5 100644 --- a/wrapper/MM/Mover_SelectorImproper_.pypp.cpp +++ b/wrapper/MM/Mover_SelectorImproper_.pypp.cpp @@ -85,6 +85,8 @@ namespace bp = boost::python; SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } +#include "Helpers/copy.hpp" + #include "Helpers/str.hpp" #include "Helpers/release_gil_policy.hpp" @@ -476,9 +478,9 @@ void register_Mover_SelectorImproper__class(){ } Mover_SelectorImproper__exposer.staticmethod( "typeName" ); - Mover_SelectorImproper__exposer.def( "__copy__", &__copy__); - Mover_SelectorImproper__exposer.def( "__deepcopy__", &__copy__); - Mover_SelectorImproper__exposer.def( "clone", &__copy__); + Mover_SelectorImproper__exposer.def( "__copy__", &__copy__>); + Mover_SelectorImproper__exposer.def( "__deepcopy__", &__copy__>); + Mover_SelectorImproper__exposer.def( "clone", &__copy__>); Mover_SelectorImproper__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); Mover_SelectorImproper__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); Mover_SelectorImproper__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); diff --git a/wrapper/MM/MultiCLJComponent.pypp.cpp b/wrapper/MM/MultiCLJComponent.pypp.cpp index 212d5557e..11862456b 100644 --- a/wrapper/MM/MultiCLJComponent.pypp.cpp +++ b/wrapper/MM/MultiCLJComponent.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; SireMM::MultiCLJComponent __copy__(const SireMM::MultiCLJComponent &other){ return SireMM::MultiCLJComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -325,9 +327,9 @@ void register_MultiCLJComponent_class(){ } MultiCLJComponent_exposer.staticmethod( "typeName" ); - MultiCLJComponent_exposer.def( "__copy__", &__copy__); - MultiCLJComponent_exposer.def( "__deepcopy__", &__copy__); - MultiCLJComponent_exposer.def( "clone", &__copy__); + MultiCLJComponent_exposer.def( "__copy__", &__copy__); + MultiCLJComponent_exposer.def( "__deepcopy__", &__copy__); + MultiCLJComponent_exposer.def( "clone", &__copy__); MultiCLJComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::MultiCLJComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); MultiCLJComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::MultiCLJComponent >, diff --git a/wrapper/MM/NoCutoff.pypp.cpp b/wrapper/MM/NoCutoff.pypp.cpp index a0b00cfd3..20de913c9 100644 --- a/wrapper/MM/NoCutoff.pypp.cpp +++ b/wrapper/MM/NoCutoff.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; SireMM::NoCutoff __copy__(const SireMM::NoCutoff &other){ return SireMM::NoCutoff(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -134,9 +136,9 @@ void register_NoCutoff_class(){ } NoCutoff_exposer.staticmethod( "typeName" ); - NoCutoff_exposer.def( "__copy__", &__copy__); - NoCutoff_exposer.def( "__deepcopy__", &__copy__); - NoCutoff_exposer.def( "clone", &__copy__); + NoCutoff_exposer.def( "__copy__", &__copy__); + NoCutoff_exposer.def( "__deepcopy__", &__copy__); + NoCutoff_exposer.def( "clone", &__copy__); NoCutoff_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::NoCutoff >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); NoCutoff_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::NoCutoff >, diff --git a/wrapper/MM/NullCLJFunction.pypp.cpp b/wrapper/MM/NullCLJFunction.pypp.cpp index e48e94e36..e3ee99fd7 100644 --- a/wrapper/MM/NullCLJFunction.pypp.cpp +++ b/wrapper/MM/NullCLJFunction.pypp.cpp @@ -53,6 +53,8 @@ namespace bp = boost::python; SireMM::NullCLJFunction __copy__(const SireMM::NullCLJFunction &other){ return SireMM::NullCLJFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -106,9 +108,9 @@ void register_NullCLJFunction_class(){ } NullCLJFunction_exposer.staticmethod( "typeName" ); - NullCLJFunction_exposer.def( "__copy__", &__copy__); - NullCLJFunction_exposer.def( "__deepcopy__", &__copy__); - NullCLJFunction_exposer.def( "clone", &__copy__); + NullCLJFunction_exposer.def( "__copy__", &__copy__); + NullCLJFunction_exposer.def( "__deepcopy__", &__copy__); + NullCLJFunction_exposer.def( "clone", &__copy__); NullCLJFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::NullCLJFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); NullCLJFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::NullCLJFunction >, diff --git a/wrapper/MM/NullRestraint.pypp.cpp b/wrapper/MM/NullRestraint.pypp.cpp index 8ea61ddd4..45e130aa8 100644 --- a/wrapper/MM/NullRestraint.pypp.cpp +++ b/wrapper/MM/NullRestraint.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; SireMM::NullRestraint __copy__(const SireMM::NullRestraint &other){ return SireMM::NullRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -340,9 +342,9 @@ void register_NullRestraint_class(){ } NullRestraint_exposer.staticmethod( "typeName" ); - NullRestraint_exposer.def( "__copy__", &__copy__); - NullRestraint_exposer.def( "__deepcopy__", &__copy__); - NullRestraint_exposer.def( "clone", &__copy__); + NullRestraint_exposer.def( "__copy__", &__copy__); + NullRestraint_exposer.def( "__deepcopy__", &__copy__); + NullRestraint_exposer.def( "clone", &__copy__); NullRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::NullRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); NullRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::NullRestraint >, diff --git a/wrapper/MM/PositionalRestraint.pypp.cpp b/wrapper/MM/PositionalRestraint.pypp.cpp index dbae9b973..7e7d58491 100644 --- a/wrapper/MM/PositionalRestraint.pypp.cpp +++ b/wrapper/MM/PositionalRestraint.pypp.cpp @@ -25,6 +25,8 @@ namespace bp = boost::python; SireMM::PositionalRestraint __copy__(const SireMM::PositionalRestraint &other){ return SireMM::PositionalRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -190,9 +192,9 @@ void register_PositionalRestraint_class(){ } PositionalRestraint_exposer.staticmethod( "typeName" ); - PositionalRestraint_exposer.def( "__copy__", &__copy__); - PositionalRestraint_exposer.def( "__deepcopy__", &__copy__); - PositionalRestraint_exposer.def( "clone", &__copy__); + PositionalRestraint_exposer.def( "__copy__", &__copy__); + PositionalRestraint_exposer.def( "__deepcopy__", &__copy__); + PositionalRestraint_exposer.def( "clone", &__copy__); PositionalRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::PositionalRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PositionalRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::PositionalRestraint >, diff --git a/wrapper/MM/PositionalRestraints.pypp.cpp b/wrapper/MM/PositionalRestraints.pypp.cpp index ade356fbb..787f32e66 100644 --- a/wrapper/MM/PositionalRestraints.pypp.cpp +++ b/wrapper/MM/PositionalRestraints.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; SireMM::PositionalRestraints __copy__(const SireMM::PositionalRestraints &other){ return SireMM::PositionalRestraints(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -296,9 +298,9 @@ void register_PositionalRestraints_class(){ } PositionalRestraints_exposer.staticmethod( "typeName" ); - PositionalRestraints_exposer.def( "__copy__", &__copy__); - PositionalRestraints_exposer.def( "__deepcopy__", &__copy__); - PositionalRestraints_exposer.def( "clone", &__copy__); + PositionalRestraints_exposer.def( "__copy__", &__copy__); + PositionalRestraints_exposer.def( "__deepcopy__", &__copy__); + PositionalRestraints_exposer.def( "clone", &__copy__); PositionalRestraints_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::PositionalRestraints >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); PositionalRestraints_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::PositionalRestraints >, diff --git a/wrapper/MM/RestraintComponent.pypp.cpp b/wrapper/MM/RestraintComponent.pypp.cpp index 6abf1e672..1d0cabc40 100644 --- a/wrapper/MM/RestraintComponent.pypp.cpp +++ b/wrapper/MM/RestraintComponent.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; SireMM::RestraintComponent __copy__(const SireMM::RestraintComponent &other){ return SireMM::RestraintComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -106,9 +108,9 @@ void register_RestraintComponent_class(){ } RestraintComponent_exposer.staticmethod( "typeName" ); - RestraintComponent_exposer.def( "__copy__", &__copy__); - RestraintComponent_exposer.def( "__deepcopy__", &__copy__); - RestraintComponent_exposer.def( "clone", &__copy__); + RestraintComponent_exposer.def( "__copy__", &__copy__); + RestraintComponent_exposer.def( "__deepcopy__", &__copy__); + RestraintComponent_exposer.def( "clone", &__copy__); RestraintComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::RestraintComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); RestraintComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::RestraintComponent >, diff --git a/wrapper/MM/RestraintFF.pypp.cpp b/wrapper/MM/RestraintFF.pypp.cpp index 8e6675fae..d3076139a 100644 --- a/wrapper/MM/RestraintFF.pypp.cpp +++ b/wrapper/MM/RestraintFF.pypp.cpp @@ -40,6 +40,8 @@ namespace bp = boost::python; SireMM::RestraintFF __copy__(const SireMM::RestraintFF &other){ return SireMM::RestraintFF(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -517,9 +519,9 @@ void register_RestraintFF_class(){ } RestraintFF_exposer.staticmethod( "typeName" ); - RestraintFF_exposer.def( "__copy__", &__copy__); - RestraintFF_exposer.def( "__deepcopy__", &__copy__); - RestraintFF_exposer.def( "clone", &__copy__); + RestraintFF_exposer.def( "__copy__", &__copy__); + RestraintFF_exposer.def( "__deepcopy__", &__copy__); + RestraintFF_exposer.def( "clone", &__copy__); RestraintFF_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::RestraintFF >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); RestraintFF_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::RestraintFF >, diff --git a/wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp b/wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp index a394439ee..78803ecd2 100644 --- a/wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp +++ b/wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp @@ -43,6 +43,8 @@ namespace bp = boost::python; SireMM::ScaledCLJParameterNames3D __copy__(const SireMM::ScaledCLJParameterNames3D &other){ return SireMM::ScaledCLJParameterNames3D(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::ScaledCLJParameterNames3D&){ return "SireMM::ScaledCLJParameterNames3D";} #include "Helpers/release_gil_policy.hpp" @@ -53,9 +55,9 @@ void register_ScaledCLJParameterNames3D_class(){ typedef bp::class_< SireMM::ScaledCLJParameterNames3D, bp::bases< SireMM::CLJParameterNames3D, SireMM::CLJParameterNames, SireMM::LJParameterName, SireMM::ChargeParameterName > > ScaledCLJParameterNames3D_exposer_t; ScaledCLJParameterNames3D_exposer_t ScaledCLJParameterNames3D_exposer = ScaledCLJParameterNames3D_exposer_t( "ScaledCLJParameterNames3D", "This class provides the default name of the properties\nthat contain the charge, LJ, intramolecular NB scale parameters and\n3D coordinates properties", bp::init< >("") ); bp::scope ScaledCLJParameterNames3D_scope( ScaledCLJParameterNames3D_exposer ); - ScaledCLJParameterNames3D_exposer.def( "__copy__", &__copy__); - ScaledCLJParameterNames3D_exposer.def( "__deepcopy__", &__copy__); - ScaledCLJParameterNames3D_exposer.def( "clone", &__copy__); + ScaledCLJParameterNames3D_exposer.def( "__copy__", &__copy__); + ScaledCLJParameterNames3D_exposer.def( "__deepcopy__", &__copy__); + ScaledCLJParameterNames3D_exposer.def( "clone", &__copy__); ScaledCLJParameterNames3D_exposer.def( "__str__", &pvt_get_name); ScaledCLJParameterNames3D_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/ScaledChargeParameterNames3D.pypp.cpp b/wrapper/MM/ScaledChargeParameterNames3D.pypp.cpp index 8ed635a48..df91591c0 100644 --- a/wrapper/MM/ScaledChargeParameterNames3D.pypp.cpp +++ b/wrapper/MM/ScaledChargeParameterNames3D.pypp.cpp @@ -41,6 +41,8 @@ namespace bp = boost::python; SireMM::ScaledChargeParameterNames3D __copy__(const SireMM::ScaledChargeParameterNames3D &other){ return SireMM::ScaledChargeParameterNames3D(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::ScaledChargeParameterNames3D&){ return "SireMM::ScaledChargeParameterNames3D";} #include "Helpers/release_gil_policy.hpp" @@ -51,9 +53,9 @@ void register_ScaledChargeParameterNames3D_class(){ typedef bp::class_< SireMM::ScaledChargeParameterNames3D, bp::bases< SireMM::ChargeParameterName3D, SireMM::ChargeParameterName > > ScaledChargeParameterNames3D_exposer_t; ScaledChargeParameterNames3D_exposer_t ScaledChargeParameterNames3D_exposer = ScaledChargeParameterNames3D_exposer_t( "ScaledChargeParameterNames3D", "This class provides the default name of the properties\nthat contain the charge and intramolecular NB scale parameters and\n3D coordinates properties", bp::init< >("") ); bp::scope ScaledChargeParameterNames3D_scope( ScaledChargeParameterNames3D_exposer ); - ScaledChargeParameterNames3D_exposer.def( "__copy__", &__copy__); - ScaledChargeParameterNames3D_exposer.def( "__deepcopy__", &__copy__); - ScaledChargeParameterNames3D_exposer.def( "clone", &__copy__); + ScaledChargeParameterNames3D_exposer.def( "__copy__", &__copy__); + ScaledChargeParameterNames3D_exposer.def( "__deepcopy__", &__copy__); + ScaledChargeParameterNames3D_exposer.def( "clone", &__copy__); ScaledChargeParameterNames3D_exposer.def( "__str__", &pvt_get_name); ScaledChargeParameterNames3D_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/ScaledLJParameterNames3D.pypp.cpp b/wrapper/MM/ScaledLJParameterNames3D.pypp.cpp index 7c6716542..73806852b 100644 --- a/wrapper/MM/ScaledLJParameterNames3D.pypp.cpp +++ b/wrapper/MM/ScaledLJParameterNames3D.pypp.cpp @@ -45,6 +45,8 @@ namespace bp = boost::python; SireMM::ScaledLJParameterNames3D __copy__(const SireMM::ScaledLJParameterNames3D &other){ return SireMM::ScaledLJParameterNames3D(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::ScaledLJParameterNames3D&){ return "SireMM::ScaledLJParameterNames3D";} #include "Helpers/release_gil_policy.hpp" @@ -55,9 +57,9 @@ void register_ScaledLJParameterNames3D_class(){ typedef bp::class_< SireMM::ScaledLJParameterNames3D, bp::bases< SireMM::LJParameterName3D, SireMM::LJParameterName > > ScaledLJParameterNames3D_exposer_t; ScaledLJParameterNames3D_exposer_t ScaledLJParameterNames3D_exposer = ScaledLJParameterNames3D_exposer_t( "ScaledLJParameterNames3D", "This class provides the default name of the properties\nthat contain the LJ, intramolecular NB scale parameters and\n3D coordinates properties", bp::init< >("") ); bp::scope ScaledLJParameterNames3D_scope( ScaledLJParameterNames3D_exposer ); - ScaledLJParameterNames3D_exposer.def( "__copy__", &__copy__); - ScaledLJParameterNames3D_exposer.def( "__deepcopy__", &__copy__); - ScaledLJParameterNames3D_exposer.def( "clone", &__copy__); + ScaledLJParameterNames3D_exposer.def( "__copy__", &__copy__); + ScaledLJParameterNames3D_exposer.def( "__deepcopy__", &__copy__); + ScaledLJParameterNames3D_exposer.def( "clone", &__copy__); ScaledLJParameterNames3D_exposer.def( "__str__", &pvt_get_name); ScaledLJParameterNames3D_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/SelectorAngle.pypp.cpp b/wrapper/MM/SelectorAngle.pypp.cpp index 61215fb5e..9d003366b 100644 --- a/wrapper/MM/SelectorAngle.pypp.cpp +++ b/wrapper/MM/SelectorAngle.pypp.cpp @@ -41,6 +41,8 @@ namespace bp = boost::python; SireMM::SelectorAngle __copy__(const SireMM::SelectorAngle &other){ return SireMM::SelectorAngle(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -677,9 +679,9 @@ void register_SelectorAngle_class(){ } SelectorAngle_exposer.staticmethod( "typeName" ); - SelectorAngle_exposer.def( "__copy__", &__copy__); - SelectorAngle_exposer.def( "__deepcopy__", &__copy__); - SelectorAngle_exposer.def( "clone", &__copy__); + SelectorAngle_exposer.def( "__copy__", &__copy__); + SelectorAngle_exposer.def( "__deepcopy__", &__copy__); + SelectorAngle_exposer.def( "clone", &__copy__); SelectorAngle_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorAngle >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SelectorAngle_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorAngle >, diff --git a/wrapper/MM/SelectorBond.pypp.cpp b/wrapper/MM/SelectorBond.pypp.cpp index 311a277e5..600c1235f 100644 --- a/wrapper/MM/SelectorBond.pypp.cpp +++ b/wrapper/MM/SelectorBond.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; SireMM::SelectorBond __copy__(const SireMM::SelectorBond &other){ return SireMM::SelectorBond(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -672,9 +674,9 @@ void register_SelectorBond_class(){ } SelectorBond_exposer.staticmethod( "typeName" ); - SelectorBond_exposer.def( "__copy__", &__copy__); - SelectorBond_exposer.def( "__deepcopy__", &__copy__); - SelectorBond_exposer.def( "clone", &__copy__); + SelectorBond_exposer.def( "__copy__", &__copy__); + SelectorBond_exposer.def( "__deepcopy__", &__copy__); + SelectorBond_exposer.def( "clone", &__copy__); SelectorBond_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorBond >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SelectorBond_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorBond >, diff --git a/wrapper/MM/SelectorDihedral.pypp.cpp b/wrapper/MM/SelectorDihedral.pypp.cpp index af5ad8d40..769d7409c 100644 --- a/wrapper/MM/SelectorDihedral.pypp.cpp +++ b/wrapper/MM/SelectorDihedral.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; SireMM::SelectorDihedral __copy__(const SireMM::SelectorDihedral &other){ return SireMM::SelectorDihedral(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -678,9 +680,9 @@ void register_SelectorDihedral_class(){ } SelectorDihedral_exposer.staticmethod( "typeName" ); - SelectorDihedral_exposer.def( "__copy__", &__copy__); - SelectorDihedral_exposer.def( "__deepcopy__", &__copy__); - SelectorDihedral_exposer.def( "clone", &__copy__); + SelectorDihedral_exposer.def( "__copy__", &__copy__); + SelectorDihedral_exposer.def( "__deepcopy__", &__copy__); + SelectorDihedral_exposer.def( "clone", &__copy__); SelectorDihedral_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorDihedral >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SelectorDihedral_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorDihedral >, diff --git a/wrapper/MM/SelectorImproper.pypp.cpp b/wrapper/MM/SelectorImproper.pypp.cpp index 331a8012d..5e9ea3ed8 100644 --- a/wrapper/MM/SelectorImproper.pypp.cpp +++ b/wrapper/MM/SelectorImproper.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; SireMM::SelectorImproper __copy__(const SireMM::SelectorImproper &other){ return SireMM::SelectorImproper(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -678,9 +680,9 @@ void register_SelectorImproper_class(){ } SelectorImproper_exposer.staticmethod( "typeName" ); - SelectorImproper_exposer.def( "__copy__", &__copy__); - SelectorImproper_exposer.def( "__deepcopy__", &__copy__); - SelectorImproper_exposer.def( "clone", &__copy__); + SelectorImproper_exposer.def( "__copy__", &__copy__); + SelectorImproper_exposer.def( "__deepcopy__", &__copy__); + SelectorImproper_exposer.def( "clone", &__copy__); SelectorImproper_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorImproper >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SelectorImproper_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorImproper >, diff --git a/wrapper/MM/SelectorMAngle.pypp.cpp b/wrapper/MM/SelectorMAngle.pypp.cpp index 70e54ea1b..d3fa06483 100644 --- a/wrapper/MM/SelectorMAngle.pypp.cpp +++ b/wrapper/MM/SelectorMAngle.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; SireMM::SelectorMAngle __copy__(const SireMM::SelectorMAngle &other){ return SireMM::SelectorMAngle(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -1566,9 +1568,9 @@ void register_SelectorMAngle_class(){ } SelectorMAngle_exposer.staticmethod( "typeName" ); - SelectorMAngle_exposer.def( "__copy__", &__copy__); - SelectorMAngle_exposer.def( "__deepcopy__", &__copy__); - SelectorMAngle_exposer.def( "clone", &__copy__); + SelectorMAngle_exposer.def( "__copy__", &__copy__); + SelectorMAngle_exposer.def( "__deepcopy__", &__copy__); + SelectorMAngle_exposer.def( "clone", &__copy__); SelectorMAngle_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorMAngle >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SelectorMAngle_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorMAngle >, diff --git a/wrapper/MM/SelectorMBond.pypp.cpp b/wrapper/MM/SelectorMBond.pypp.cpp index ef4ceb005..6a4b27847 100644 --- a/wrapper/MM/SelectorMBond.pypp.cpp +++ b/wrapper/MM/SelectorMBond.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; SireMM::SelectorMBond __copy__(const SireMM::SelectorMBond &other){ return SireMM::SelectorMBond(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -1565,9 +1567,9 @@ void register_SelectorMBond_class(){ } SelectorMBond_exposer.staticmethod( "typeName" ); - SelectorMBond_exposer.def( "__copy__", &__copy__); - SelectorMBond_exposer.def( "__deepcopy__", &__copy__); - SelectorMBond_exposer.def( "clone", &__copy__); + SelectorMBond_exposer.def( "__copy__", &__copy__); + SelectorMBond_exposer.def( "__deepcopy__", &__copy__); + SelectorMBond_exposer.def( "clone", &__copy__); SelectorMBond_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorMBond >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SelectorMBond_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorMBond >, diff --git a/wrapper/MM/SelectorMDihedral.pypp.cpp b/wrapper/MM/SelectorMDihedral.pypp.cpp index 6b1b024b7..10e356f56 100644 --- a/wrapper/MM/SelectorMDihedral.pypp.cpp +++ b/wrapper/MM/SelectorMDihedral.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; SireMM::SelectorMDihedral __copy__(const SireMM::SelectorMDihedral &other){ return SireMM::SelectorMDihedral(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -1565,9 +1567,9 @@ void register_SelectorMDihedral_class(){ } SelectorMDihedral_exposer.staticmethod( "typeName" ); - SelectorMDihedral_exposer.def( "__copy__", &__copy__); - SelectorMDihedral_exposer.def( "__deepcopy__", &__copy__); - SelectorMDihedral_exposer.def( "clone", &__copy__); + SelectorMDihedral_exposer.def( "__copy__", &__copy__); + SelectorMDihedral_exposer.def( "__deepcopy__", &__copy__); + SelectorMDihedral_exposer.def( "clone", &__copy__); SelectorMDihedral_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorMDihedral >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SelectorMDihedral_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorMDihedral >, diff --git a/wrapper/MM/SelectorMImproper.pypp.cpp b/wrapper/MM/SelectorMImproper.pypp.cpp index 883cb3613..ebce1472a 100644 --- a/wrapper/MM/SelectorMImproper.pypp.cpp +++ b/wrapper/MM/SelectorMImproper.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; SireMM::SelectorMImproper __copy__(const SireMM::SelectorMImproper &other){ return SireMM::SelectorMImproper(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -1567,9 +1569,9 @@ void register_SelectorMImproper_class(){ } SelectorMImproper_exposer.staticmethod( "typeName" ); - SelectorMImproper_exposer.def( "__copy__", &__copy__); - SelectorMImproper_exposer.def( "__deepcopy__", &__copy__); - SelectorMImproper_exposer.def( "clone", &__copy__); + SelectorMImproper_exposer.def( "__copy__", &__copy__); + SelectorMImproper_exposer.def( "__deepcopy__", &__copy__); + SelectorMImproper_exposer.def( "clone", &__copy__); SelectorMImproper_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorMImproper >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SelectorMImproper_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorMImproper >, diff --git a/wrapper/MM/SoftCLJComponent.pypp.cpp b/wrapper/MM/SoftCLJComponent.pypp.cpp index 2bedc3aea..8a107ee10 100644 --- a/wrapper/MM/SoftCLJComponent.pypp.cpp +++ b/wrapper/MM/SoftCLJComponent.pypp.cpp @@ -22,6 +22,8 @@ namespace bp = boost::python; SireMM::SoftCLJComponent __copy__(const SireMM::SoftCLJComponent &other){ return SireMM::SoftCLJComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -227,9 +229,9 @@ void register_SoftCLJComponent_class(){ } SoftCLJComponent_exposer.staticmethod( "nAlphaValues" ); SoftCLJComponent_exposer.staticmethod( "typeName" ); - SoftCLJComponent_exposer.def( "__copy__", &__copy__); - SoftCLJComponent_exposer.def( "__deepcopy__", &__copy__); - SoftCLJComponent_exposer.def( "clone", &__copy__); + SoftCLJComponent_exposer.def( "__copy__", &__copy__); + SoftCLJComponent_exposer.def( "__deepcopy__", &__copy__); + SoftCLJComponent_exposer.def( "clone", &__copy__); SoftCLJComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SoftCLJComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); SoftCLJComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SoftCLJComponent >, diff --git a/wrapper/MM/StretchBendComponent.pypp.cpp b/wrapper/MM/StretchBendComponent.pypp.cpp index e05eaddfb..bc29c6b58 100644 --- a/wrapper/MM/StretchBendComponent.pypp.cpp +++ b/wrapper/MM/StretchBendComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::StretchBendComponent __copy__(const SireMM::StretchBendComponent &other){ return SireMM::StretchBendComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_StretchBendComponent_class(){ } StretchBendComponent_exposer.staticmethod( "typeName" ); - StretchBendComponent_exposer.def( "__copy__", &__copy__); - StretchBendComponent_exposer.def( "__deepcopy__", &__copy__); - StretchBendComponent_exposer.def( "clone", &__copy__); + StretchBendComponent_exposer.def( "__copy__", &__copy__); + StretchBendComponent_exposer.def( "__deepcopy__", &__copy__); + StretchBendComponent_exposer.def( "clone", &__copy__); StretchBendComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::StretchBendComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); StretchBendComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::StretchBendComponent >, diff --git a/wrapper/MM/StretchBendParameterName.pypp.cpp b/wrapper/MM/StretchBendParameterName.pypp.cpp index 5cb0819e1..e0785cae0 100644 --- a/wrapper/MM/StretchBendParameterName.pypp.cpp +++ b/wrapper/MM/StretchBendParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::StretchBendParameterName __copy__(const SireMM::StretchBendParameterName &other){ return SireMM::StretchBendParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::StretchBendParameterName&){ return "SireMM::StretchBendParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_StretchBendParameterName_class(){ , "" ); } - StretchBendParameterName_exposer.def( "__copy__", &__copy__); - StretchBendParameterName_exposer.def( "__deepcopy__", &__copy__); - StretchBendParameterName_exposer.def( "clone", &__copy__); + StretchBendParameterName_exposer.def( "__copy__", &__copy__); + StretchBendParameterName_exposer.def( "__deepcopy__", &__copy__); + StretchBendParameterName_exposer.def( "clone", &__copy__); StretchBendParameterName_exposer.def( "__str__", &pvt_get_name); StretchBendParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/StretchBendSymbols.pypp.cpp b/wrapper/MM/StretchBendSymbols.pypp.cpp index bcaea365d..45b42fdae 100644 --- a/wrapper/MM/StretchBendSymbols.pypp.cpp +++ b/wrapper/MM/StretchBendSymbols.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::StretchBendSymbols __copy__(const SireMM::StretchBendSymbols &other){ return SireMM::StretchBendSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::StretchBendSymbols&){ return "SireMM::StretchBendSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -92,9 +94,9 @@ void register_StretchBendSymbols_class(){ , "Return the symbol representing the angle, theta" ); } - StretchBendSymbols_exposer.def( "__copy__", &__copy__); - StretchBendSymbols_exposer.def( "__deepcopy__", &__copy__); - StretchBendSymbols_exposer.def( "clone", &__copy__); + StretchBendSymbols_exposer.def( "__copy__", &__copy__); + StretchBendSymbols_exposer.def( "__deepcopy__", &__copy__); + StretchBendSymbols_exposer.def( "clone", &__copy__); StretchBendSymbols_exposer.def( "__str__", &pvt_get_name); StretchBendSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/StretchBendTorsionComponent.pypp.cpp b/wrapper/MM/StretchBendTorsionComponent.pypp.cpp index 4003ba51d..4fa6c9d8e 100644 --- a/wrapper/MM/StretchBendTorsionComponent.pypp.cpp +++ b/wrapper/MM/StretchBendTorsionComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::StretchBendTorsionComponent __copy__(const SireMM::StretchBendTorsionComponent &other){ return SireMM::StretchBendTorsionComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_StretchBendTorsionComponent_class(){ } StretchBendTorsionComponent_exposer.staticmethod( "typeName" ); - StretchBendTorsionComponent_exposer.def( "__copy__", &__copy__); - StretchBendTorsionComponent_exposer.def( "__deepcopy__", &__copy__); - StretchBendTorsionComponent_exposer.def( "clone", &__copy__); + StretchBendTorsionComponent_exposer.def( "__copy__", &__copy__); + StretchBendTorsionComponent_exposer.def( "__deepcopy__", &__copy__); + StretchBendTorsionComponent_exposer.def( "clone", &__copy__); StretchBendTorsionComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::StretchBendTorsionComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); StretchBendTorsionComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::StretchBendTorsionComponent >, diff --git a/wrapper/MM/StretchBendTorsionParameterName.pypp.cpp b/wrapper/MM/StretchBendTorsionParameterName.pypp.cpp index d6daaf024..bac7b183e 100644 --- a/wrapper/MM/StretchBendTorsionParameterName.pypp.cpp +++ b/wrapper/MM/StretchBendTorsionParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::StretchBendTorsionParameterName __copy__(const SireMM::StretchBendTorsionParameterName &other){ return SireMM::StretchBendTorsionParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::StretchBendTorsionParameterName&){ return "SireMM::StretchBendTorsionParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_StretchBendTorsionParameterName_class(){ , "" ); } - StretchBendTorsionParameterName_exposer.def( "__copy__", &__copy__); - StretchBendTorsionParameterName_exposer.def( "__deepcopy__", &__copy__); - StretchBendTorsionParameterName_exposer.def( "clone", &__copy__); + StretchBendTorsionParameterName_exposer.def( "__copy__", &__copy__); + StretchBendTorsionParameterName_exposer.def( "__deepcopy__", &__copy__); + StretchBendTorsionParameterName_exposer.def( "clone", &__copy__); StretchBendTorsionParameterName_exposer.def( "__str__", &pvt_get_name); StretchBendTorsionParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/StretchBendTorsionSymbols.pypp.cpp b/wrapper/MM/StretchBendTorsionSymbols.pypp.cpp index c7a6d88d8..af17e6f57 100644 --- a/wrapper/MM/StretchBendTorsionSymbols.pypp.cpp +++ b/wrapper/MM/StretchBendTorsionSymbols.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::StretchBendTorsionSymbols __copy__(const SireMM::StretchBendTorsionSymbols &other){ return SireMM::StretchBendTorsionSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::StretchBendTorsionSymbols&){ return "SireMM::StretchBendTorsionSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -128,9 +130,9 @@ void register_StretchBendTorsionSymbols_class(){ , "Return the symbol representing the angle between atoms 3-2-1, theta_\n{321}" ); } - StretchBendTorsionSymbols_exposer.def( "__copy__", &__copy__); - StretchBendTorsionSymbols_exposer.def( "__deepcopy__", &__copy__); - StretchBendTorsionSymbols_exposer.def( "clone", &__copy__); + StretchBendTorsionSymbols_exposer.def( "__copy__", &__copy__); + StretchBendTorsionSymbols_exposer.def( "__deepcopy__", &__copy__); + StretchBendTorsionSymbols_exposer.def( "clone", &__copy__); StretchBendTorsionSymbols_exposer.def( "__str__", &pvt_get_name); StretchBendTorsionSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/StretchStretchComponent.pypp.cpp b/wrapper/MM/StretchStretchComponent.pypp.cpp index 9b28ea3eb..9450a83a8 100644 --- a/wrapper/MM/StretchStretchComponent.pypp.cpp +++ b/wrapper/MM/StretchStretchComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::StretchStretchComponent __copy__(const SireMM::StretchStretchComponent &other){ return SireMM::StretchStretchComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_StretchStretchComponent_class(){ } StretchStretchComponent_exposer.staticmethod( "typeName" ); - StretchStretchComponent_exposer.def( "__copy__", &__copy__); - StretchStretchComponent_exposer.def( "__deepcopy__", &__copy__); - StretchStretchComponent_exposer.def( "clone", &__copy__); + StretchStretchComponent_exposer.def( "__copy__", &__copy__); + StretchStretchComponent_exposer.def( "__deepcopy__", &__copy__); + StretchStretchComponent_exposer.def( "clone", &__copy__); StretchStretchComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::StretchStretchComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); StretchStretchComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::StretchStretchComponent >, diff --git a/wrapper/MM/StretchStretchParameterName.pypp.cpp b/wrapper/MM/StretchStretchParameterName.pypp.cpp index fa9593ce3..f7b02cb41 100644 --- a/wrapper/MM/StretchStretchParameterName.pypp.cpp +++ b/wrapper/MM/StretchStretchParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::StretchStretchParameterName __copy__(const SireMM::StretchStretchParameterName &other){ return SireMM::StretchStretchParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::StretchStretchParameterName&){ return "SireMM::StretchStretchParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_StretchStretchParameterName_class(){ , "" ); } - StretchStretchParameterName_exposer.def( "__copy__", &__copy__); - StretchStretchParameterName_exposer.def( "__deepcopy__", &__copy__); - StretchStretchParameterName_exposer.def( "clone", &__copy__); + StretchStretchParameterName_exposer.def( "__copy__", &__copy__); + StretchStretchParameterName_exposer.def( "__deepcopy__", &__copy__); + StretchStretchParameterName_exposer.def( "clone", &__copy__); StretchStretchParameterName_exposer.def( "__str__", &pvt_get_name); StretchStretchParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/StretchStretchSymbols.pypp.cpp b/wrapper/MM/StretchStretchSymbols.pypp.cpp index c20c6ad2f..82808bf93 100644 --- a/wrapper/MM/StretchStretchSymbols.pypp.cpp +++ b/wrapper/MM/StretchStretchSymbols.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::StretchStretchSymbols __copy__(const SireMM::StretchStretchSymbols &other){ return SireMM::StretchStretchSymbols(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::StretchStretchSymbols&){ return "SireMM::StretchStretchSymbols";} #include "Helpers/release_gil_policy.hpp" @@ -80,9 +82,9 @@ void register_StretchStretchSymbols_class(){ , "Return the symbol representing the bond length r_\n{21}" ); } - StretchStretchSymbols_exposer.def( "__copy__", &__copy__); - StretchStretchSymbols_exposer.def( "__deepcopy__", &__copy__); - StretchStretchSymbols_exposer.def( "clone", &__copy__); + StretchStretchSymbols_exposer.def( "__copy__", &__copy__); + StretchStretchSymbols_exposer.def( "__deepcopy__", &__copy__); + StretchStretchSymbols_exposer.def( "clone", &__copy__); StretchStretchSymbols_exposer.def( "__str__", &pvt_get_name); StretchStretchSymbols_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/TestFF.pypp.cpp b/wrapper/MM/TestFF.pypp.cpp index 584f22548..5d99d77cd 100644 --- a/wrapper/MM/TestFF.pypp.cpp +++ b/wrapper/MM/TestFF.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; SireMM::TestFF __copy__(const SireMM::TestFF &other){ return SireMM::TestFF(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::TestFF&){ return "SireMM::TestFF";} #include "Helpers/release_gil_policy.hpp" @@ -106,9 +108,9 @@ void register_TestFF_class(){ , "" ); } - TestFF_exposer.def( "__copy__", &__copy__); - TestFF_exposer.def( "__deepcopy__", &__copy__); - TestFF_exposer.def( "clone", &__copy__); + TestFF_exposer.def( "__copy__", &__copy__); + TestFF_exposer.def( "__deepcopy__", &__copy__); + TestFF_exposer.def( "clone", &__copy__); TestFF_exposer.def( "__str__", &pvt_get_name); TestFF_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/MM/ThreeAtomFunction.pypp.cpp b/wrapper/MM/ThreeAtomFunction.pypp.cpp index 96a5d3b2c..9d9edee4b 100644 --- a/wrapper/MM/ThreeAtomFunction.pypp.cpp +++ b/wrapper/MM/ThreeAtomFunction.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::ThreeAtomFunction __copy__(const SireMM::ThreeAtomFunction &other){ return SireMM::ThreeAtomFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -111,9 +113,9 @@ void register_ThreeAtomFunction_class(){ , "Return a string representation" ); } - ThreeAtomFunction_exposer.def( "__copy__", &__copy__); - ThreeAtomFunction_exposer.def( "__deepcopy__", &__copy__); - ThreeAtomFunction_exposer.def( "clone", &__copy__); + ThreeAtomFunction_exposer.def( "__copy__", &__copy__); + ThreeAtomFunction_exposer.def( "__deepcopy__", &__copy__); + ThreeAtomFunction_exposer.def( "clone", &__copy__); ThreeAtomFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::ThreeAtomFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ThreeAtomFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::ThreeAtomFunction >, diff --git a/wrapper/MM/ThreeAtomFunctions.pypp.cpp b/wrapper/MM/ThreeAtomFunctions.pypp.cpp index 5dfeb3e2c..aee2881db 100644 --- a/wrapper/MM/ThreeAtomFunctions.pypp.cpp +++ b/wrapper/MM/ThreeAtomFunctions.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::ThreeAtomFunctions __copy__(const SireMM::ThreeAtomFunctions &other){ return SireMM::ThreeAtomFunctions(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -394,9 +396,9 @@ void register_ThreeAtomFunctions_class(){ } ThreeAtomFunctions_exposer.staticmethod( "typeName" ); - ThreeAtomFunctions_exposer.def( "__copy__", &__copy__); - ThreeAtomFunctions_exposer.def( "__deepcopy__", &__copy__); - ThreeAtomFunctions_exposer.def( "clone", &__copy__); + ThreeAtomFunctions_exposer.def( "__copy__", &__copy__); + ThreeAtomFunctions_exposer.def( "__deepcopy__", &__copy__); + ThreeAtomFunctions_exposer.def( "clone", &__copy__); ThreeAtomFunctions_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::ThreeAtomFunctions >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ThreeAtomFunctions_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::ThreeAtomFunctions >, diff --git a/wrapper/MM/ThreeAtomPerturbation.pypp.cpp b/wrapper/MM/ThreeAtomPerturbation.pypp.cpp index 3ac723697..3a9ab0a1c 100644 --- a/wrapper/MM/ThreeAtomPerturbation.pypp.cpp +++ b/wrapper/MM/ThreeAtomPerturbation.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::ThreeAtomPerturbation __copy__(const SireMM::ThreeAtomPerturbation &other){ return SireMM::ThreeAtomPerturbation(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -152,9 +154,9 @@ void register_ThreeAtomPerturbation_class(){ } ThreeAtomPerturbation_exposer.staticmethod( "typeName" ); - ThreeAtomPerturbation_exposer.def( "__copy__", &__copy__); - ThreeAtomPerturbation_exposer.def( "__deepcopy__", &__copy__); - ThreeAtomPerturbation_exposer.def( "clone", &__copy__); + ThreeAtomPerturbation_exposer.def( "__copy__", &__copy__); + ThreeAtomPerturbation_exposer.def( "__deepcopy__", &__copy__); + ThreeAtomPerturbation_exposer.def( "clone", &__copy__); ThreeAtomPerturbation_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::ThreeAtomPerturbation >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); ThreeAtomPerturbation_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::ThreeAtomPerturbation >, diff --git a/wrapper/MM/TripleDistanceRestraint.pypp.cpp b/wrapper/MM/TripleDistanceRestraint.pypp.cpp index e8e37178f..a61554fd4 100644 --- a/wrapper/MM/TripleDistanceRestraint.pypp.cpp +++ b/wrapper/MM/TripleDistanceRestraint.pypp.cpp @@ -32,6 +32,8 @@ namespace bp = boost::python; SireMM::TripleDistanceRestraint __copy__(const SireMM::TripleDistanceRestraint &other){ return SireMM::TripleDistanceRestraint(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -411,9 +413,9 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.staticmethod( "r23" ); TripleDistanceRestraint_exposer.staticmethod( "r45" ); TripleDistanceRestraint_exposer.staticmethod( "typeName" ); - TripleDistanceRestraint_exposer.def( "__copy__", &__copy__); - TripleDistanceRestraint_exposer.def( "__deepcopy__", &__copy__); - TripleDistanceRestraint_exposer.def( "clone", &__copy__); + TripleDistanceRestraint_exposer.def( "__copy__", &__copy__); + TripleDistanceRestraint_exposer.def( "__deepcopy__", &__copy__); + TripleDistanceRestraint_exposer.def( "clone", &__copy__); TripleDistanceRestraint_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::TripleDistanceRestraint >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); TripleDistanceRestraint_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::TripleDistanceRestraint >, diff --git a/wrapper/MM/TwoAtomFunction.pypp.cpp b/wrapper/MM/TwoAtomFunction.pypp.cpp index a21e15e4d..4c48d652a 100644 --- a/wrapper/MM/TwoAtomFunction.pypp.cpp +++ b/wrapper/MM/TwoAtomFunction.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::TwoAtomFunction __copy__(const SireMM::TwoAtomFunction &other){ return SireMM::TwoAtomFunction(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -99,9 +101,9 @@ void register_TwoAtomFunction_class(){ , "Return a string representation" ); } - TwoAtomFunction_exposer.def( "__copy__", &__copy__); - TwoAtomFunction_exposer.def( "__deepcopy__", &__copy__); - TwoAtomFunction_exposer.def( "clone", &__copy__); + TwoAtomFunction_exposer.def( "__copy__", &__copy__); + TwoAtomFunction_exposer.def( "__deepcopy__", &__copy__); + TwoAtomFunction_exposer.def( "clone", &__copy__); TwoAtomFunction_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::TwoAtomFunction >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); TwoAtomFunction_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::TwoAtomFunction >, diff --git a/wrapper/MM/TwoAtomFunctions.pypp.cpp b/wrapper/MM/TwoAtomFunctions.pypp.cpp index 45c42139c..ae6e351b6 100644 --- a/wrapper/MM/TwoAtomFunctions.pypp.cpp +++ b/wrapper/MM/TwoAtomFunctions.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; SireMM::TwoAtomFunctions __copy__(const SireMM::TwoAtomFunctions &other){ return SireMM::TwoAtomFunctions(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -394,9 +396,9 @@ void register_TwoAtomFunctions_class(){ } TwoAtomFunctions_exposer.staticmethod( "typeName" ); - TwoAtomFunctions_exposer.def( "__copy__", &__copy__); - TwoAtomFunctions_exposer.def( "__deepcopy__", &__copy__); - TwoAtomFunctions_exposer.def( "clone", &__copy__); + TwoAtomFunctions_exposer.def( "__copy__", &__copy__); + TwoAtomFunctions_exposer.def( "__deepcopy__", &__copy__); + TwoAtomFunctions_exposer.def( "clone", &__copy__); TwoAtomFunctions_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::TwoAtomFunctions >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); TwoAtomFunctions_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::TwoAtomFunctions >, diff --git a/wrapper/MM/TwoAtomPerturbation.pypp.cpp b/wrapper/MM/TwoAtomPerturbation.pypp.cpp index e79156068..e0e0b2630 100644 --- a/wrapper/MM/TwoAtomPerturbation.pypp.cpp +++ b/wrapper/MM/TwoAtomPerturbation.pypp.cpp @@ -34,6 +34,8 @@ namespace bp = boost::python; SireMM::TwoAtomPerturbation __copy__(const SireMM::TwoAtomPerturbation &other){ return SireMM::TwoAtomPerturbation(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -140,9 +142,9 @@ void register_TwoAtomPerturbation_class(){ } TwoAtomPerturbation_exposer.staticmethod( "typeName" ); - TwoAtomPerturbation_exposer.def( "__copy__", &__copy__); - TwoAtomPerturbation_exposer.def( "__deepcopy__", &__copy__); - TwoAtomPerturbation_exposer.def( "clone", &__copy__); + TwoAtomPerturbation_exposer.def( "__copy__", &__copy__); + TwoAtomPerturbation_exposer.def( "__deepcopy__", &__copy__); + TwoAtomPerturbation_exposer.def( "clone", &__copy__); TwoAtomPerturbation_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::TwoAtomPerturbation >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); TwoAtomPerturbation_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::TwoAtomPerturbation >, diff --git a/wrapper/MM/UreyBradleyComponent.pypp.cpp b/wrapper/MM/UreyBradleyComponent.pypp.cpp index e1f3f067e..2e2e2d9fc 100644 --- a/wrapper/MM/UreyBradleyComponent.pypp.cpp +++ b/wrapper/MM/UreyBradleyComponent.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; SireMM::UreyBradleyComponent __copy__(const SireMM::UreyBradleyComponent &other){ return SireMM::UreyBradleyComponent(other); } +#include "Helpers/copy.hpp" + #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" @@ -107,9 +109,9 @@ void register_UreyBradleyComponent_class(){ } UreyBradleyComponent_exposer.staticmethod( "typeName" ); - UreyBradleyComponent_exposer.def( "__copy__", &__copy__); - UreyBradleyComponent_exposer.def( "__deepcopy__", &__copy__); - UreyBradleyComponent_exposer.def( "clone", &__copy__); + UreyBradleyComponent_exposer.def( "__copy__", &__copy__); + UreyBradleyComponent_exposer.def( "__deepcopy__", &__copy__); + UreyBradleyComponent_exposer.def( "clone", &__copy__); UreyBradleyComponent_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::UreyBradleyComponent >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); UreyBradleyComponent_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::UreyBradleyComponent >, diff --git a/wrapper/MM/UreyBradleyParameterName.pypp.cpp b/wrapper/MM/UreyBradleyParameterName.pypp.cpp index b2cb09004..21a320049 100644 --- a/wrapper/MM/UreyBradleyParameterName.pypp.cpp +++ b/wrapper/MM/UreyBradleyParameterName.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; SireMM::UreyBradleyParameterName __copy__(const SireMM::UreyBradleyParameterName &other){ return SireMM::UreyBradleyParameterName(other); } +#include "Helpers/copy.hpp" + const char* pvt_get_name(const SireMM::UreyBradleyParameterName&){ return "SireMM::UreyBradleyParameterName";} #include "Helpers/release_gil_policy.hpp" @@ -71,9 +73,9 @@ void register_UreyBradleyParameterName_class(){ , "" ); } - UreyBradleyParameterName_exposer.def( "__copy__", &__copy__); - UreyBradleyParameterName_exposer.def( "__deepcopy__", &__copy__); - UreyBradleyParameterName_exposer.def( "clone", &__copy__); + UreyBradleyParameterName_exposer.def( "__copy__", &__copy__); + UreyBradleyParameterName_exposer.def( "__deepcopy__", &__copy__); + UreyBradleyParameterName_exposer.def( "clone", &__copy__); UreyBradleyParameterName_exposer.def( "__str__", &pvt_get_name); UreyBradleyParameterName_exposer.def( "__repr__", &pvt_get_name); } diff --git a/wrapper/Mol/AtomCoords.pypp.cpp b/wrapper/Mol/AtomCoords.pypp.cpp index b06a0f95b..27140df22 100644 --- a/wrapper/Mol/AtomCoords.pypp.cpp +++ b/wrapper/Mol/AtomCoords.pypp.cpp @@ -7,6 +7,8 @@ namespace bp = boost::python; +#include "SireBase/console.h" + #include "SireBase/quickcopy.hpp" #include "SireBase/slice.h" diff --git a/wrapper/Mol/AtomIdxMapping.pypp.cpp b/wrapper/Mol/AtomIdxMapping.pypp.cpp index 4a4118ace..67f98649a 100644 --- a/wrapper/Mol/AtomIdxMapping.pypp.cpp +++ b/wrapper/Mol/AtomIdxMapping.pypp.cpp @@ -206,6 +206,30 @@ void register_AtomIdxMapping_class(){ , ( bp::arg("include_unmapped")=(bool)(false) ) , "Return the mapping for the atoms that exist in both the reference\n and perturbed states, from the index of the atom in the perturbed\n molecule to the index of the atom in the merged molecule.\n Note - the reference index is the index in the merged molecule.\n\n If include_unmapped is true, then also include atoms that are\n unmapped in either end state. In these cases, the reference index\n will be the index in the merged molecule (so will always be valid)\n and atoms that are unmapped in the perturbed state are not\n included in the returned dictionary.\n" ); + } + { //::SireMol::AtomIdxMapping::mappedCGAtomIdxIn0 + + typedef ::QList< SireMol::CGAtomIdx > ( ::SireMol::AtomIdxMapping::*mappedCGAtomIdxIn0_function_type)( ) const; + mappedCGAtomIdxIn0_function_type mappedCGAtomIdxIn0_function_value( &::SireMol::AtomIdxMapping::mappedCGAtomIdxIn0 ); + + AtomIdxMapping_exposer.def( + "mappedCGAtomIdxIn0" + , mappedCGAtomIdxIn0_function_value + , bp::release_gil_policy() + , "Equivalent of mappedIn0, but return as a CGAtomIdx" ); + + } + { //::SireMol::AtomIdxMapping::mappedCGAtomIdxIn1 + + typedef ::QList< SireMol::CGAtomIdx > ( ::SireMol::AtomIdxMapping::*mappedCGAtomIdxIn1_function_type)( ) const; + mappedCGAtomIdxIn1_function_type mappedCGAtomIdxIn1_function_value( &::SireMol::AtomIdxMapping::mappedCGAtomIdxIn1 ); + + AtomIdxMapping_exposer.def( + "mappedCGAtomIdxIn1" + , mappedCGAtomIdxIn1_function_value + , bp::release_gil_policy() + , "Equivalent of mappedIn1, but return as a CGAtomIdx" ); + } { //::SireMol::AtomIdxMapping::mappedIn0 @@ -374,6 +398,30 @@ void register_AtomIdxMapping_class(){ , bp::release_gil_policy() , "" ); + } + { //::SireMol::AtomIdxMapping::unmappedCGAtomIdxIn0 + + typedef ::QList< SireMol::CGAtomIdx > ( ::SireMol::AtomIdxMapping::*unmappedCGAtomIdxIn0_function_type)( ) const; + unmappedCGAtomIdxIn0_function_type unmappedCGAtomIdxIn0_function_value( &::SireMol::AtomIdxMapping::unmappedCGAtomIdxIn0 ); + + AtomIdxMapping_exposer.def( + "unmappedCGAtomIdxIn0" + , unmappedCGAtomIdxIn0_function_value + , bp::release_gil_policy() + , "Equivalent of unmappedIn0, but return as a CGAtomIdx" ); + + } + { //::SireMol::AtomIdxMapping::unmappedCGAtomIdxIn1 + + typedef ::QList< SireMol::CGAtomIdx > ( ::SireMol::AtomIdxMapping::*unmappedCGAtomIdxIn1_function_type)( ) const; + unmappedCGAtomIdxIn1_function_type unmappedCGAtomIdxIn1_function_value( &::SireMol::AtomIdxMapping::unmappedCGAtomIdxIn1 ); + + AtomIdxMapping_exposer.def( + "unmappedCGAtomIdxIn1" + , unmappedCGAtomIdxIn1_function_value + , bp::release_gil_policy() + , "Equivalent of unmappedIn1, but return as a CGAtomIdx" ); + } { //::SireMol::AtomIdxMapping::unmappedIn0 diff --git a/wrapper/Mol/Trajectory.pypp.cpp b/wrapper/Mol/Trajectory.pypp.cpp index 0921e0e02..13c956fff 100644 --- a/wrapper/Mol/Trajectory.pypp.cpp +++ b/wrapper/Mol/Trajectory.pypp.cpp @@ -58,10 +58,38 @@ void register_Trajectory_class(){ Trajectory_exposer_t Trajectory_exposer = Trajectory_exposer_t( "Trajectory", "This is a molecular property that holds the handle to the\ntrajectory data for that molecule. In addition to the\nhandle, this also holds the index of the first atom\nin the underlying trajectory data (trajectory data is a\nvector of coordinates in atom index order for each molecule)\n", bp::init< >("") ); bp::scope Trajectory_scope( Trajectory_exposer ); Trajectory_exposer.def( bp::init< SireMol::TrajectoryData const & >(( bp::arg("trajectory") ), "") ); + Trajectory_exposer.def( bp::init< SireMol::TrajectoryDataPtr const & >(( bp::arg("trajectory") ), "") ); Trajectory_exposer.def( bp::init< QList< SireBase::SharedPolyPointer< SireMol::TrajectoryData > > const & >(( bp::arg("trajectories") ), "") ); Trajectory_exposer.def( bp::init< SireMol::TrajectoryData const &, int, int >(( bp::arg("trajectory"), bp::arg("start_atom"), bp::arg("natoms") ), "") ); + Trajectory_exposer.def( bp::init< SireMol::TrajectoryDataPtr const &, int, int >(( bp::arg("trajectory"), bp::arg("start_atom"), bp::arg("natoms") ), "") ); Trajectory_exposer.def( bp::init< QList< SireBase::SharedPolyPointer< SireMol::TrajectoryData > > const &, int, int >(( bp::arg("trajectories"), bp::arg("start_atom"), bp::arg("natoms") ), "") ); Trajectory_exposer.def( bp::init< SireMol::Trajectory const & >(( bp::arg("other") ), "") ); + { //::SireMol::Trajectory::append + + typedef void ( ::SireMol::Trajectory::*append_function_type)( ::SireMol::TrajectoryData const & ) ; + append_function_type append_function_value( &::SireMol::Trajectory::append ); + + Trajectory_exposer.def( + "append" + , append_function_value + , ( bp::arg("data") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Trajectory::append + + typedef void ( ::SireMol::Trajectory::*append_function_type)( ::SireMol::TrajectoryDataPtr const & ) ; + append_function_type append_function_value( &::SireMol::Trajectory::append ); + + Trajectory_exposer.def( + "append" + , append_function_value + , ( bp::arg("data") ) + , bp::release_gil_policy() + , "" ); + + } { //::SireMol::Trajectory::appendFrame typedef void ( ::SireMol::Trajectory::*appendFrame_function_type)( ::SireMol::Frame const & ) ; 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 56389b2b7..f798d4e61 100644 --- a/wrapper/System/System.pypp.cpp +++ b/wrapper/System/System.pypp.cpp @@ -60,6 +60,8 @@ namespace bp = boost::python; #include "system.h" +#include "systemtrajectory.h" + #include #include @@ -74,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" @@ -1367,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 @@ -2620,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 >, diff --git a/wrapper/System/_System_free_functions.pypp.cpp b/wrapper/System/_System_free_functions.pypp.cpp index 19a7794de..e2c15b143 100644 --- a/wrapper/System/_System_free_functions.pypp.cpp +++ b/wrapper/System/_System_free_functions.pypp.cpp @@ -721,10 +721,16 @@ namespace bp = boost::python; #include "create_test_molecule.h" +#include "SireMM/cljnbpairs.h" + #include "SireMM/mmdetail.h" #include "SireMol/atomidxmapping.h" +#include "SireMol/bondid.h" + +#include "SireMol/connectivity.h" + #include "SireMol/core.h" #include "SireMol/moleditor.h" diff --git a/wrapper/System/active_headers.h b/wrapper/System/active_headers.h index a532f983f..d40b0bbc7 100644 --- a/wrapper/System/active_headers.h +++ b/wrapper/System/active_headers.h @@ -39,6 +39,7 @@ #include "system.h" #include "systemmonitor.h" #include "systemmonitors.h" +#include "systemtrajectory.h" #include "volmapmonitor.h" #endif diff --git a/wrapper/__init__.py b/wrapper/__init__.py index 5124caf4b..6eec87f6d 100644 --- a/wrapper/__init__.py +++ b/wrapper/__init__.py @@ -85,15 +85,7 @@ def _find_conda(): ) return None - if conda.endswith(".exe"): - m = os.path.join(os.path.dirname(conda), "mamba.exe") - else: - m = os.path.join(os.path.dirname(conda), "mamba") - - if os.path.exists(m): - return m - else: - return conda + return conda def _install_package(name, package_registry, version=None): @@ -143,10 +135,7 @@ def _install_package(name, package_registry, version=None): except Exception: pass - print( - "\nWARNING: Unable to install '%s' from package '%s'\n" - % (name, package) - ) + print("\nWARNING: Unable to install '%s' from package '%s'\n" % (name, package)) def try_import(name, package_registry=_module_to_package, version=None): @@ -187,9 +176,7 @@ def try_import(name, package_registry=_module_to_package, version=None): raise ImportError("Failed to install module %s" % name) -def try_import_from( - name, fromlist, package_registry=_module_to_package, version=None -): +def try_import_from(name, fromlist, package_registry=_module_to_package, version=None): """Try to import from the module called 'name' the passed symbol (or list of symbols) contained in 'fromlist', returning the symbol (or list of symbols). @@ -242,8 +229,7 @@ def try_import_from( return getattr(mod, fromlist[0]) except Exception: raise ImportError( - "Cannot find the symbol '%s' in module '%s'" - % (fromlist[0], name) + "Cannot find the symbol '%s' in module '%s'" % (fromlist[0], name) ) else: ret = []