/* Tell swig how to treat various types when moving them to and from python. Among other things, they tell swig how to convert collections of C++ objects (eg ExampleRestraints) into python lists and back. IMP_SWIG_OBJECT, IMP_SWIG_VALUE and IMP_SWIG_DECORATOR lines need to appear before any %include lines as well as any inline C++ code (or at least any such code which uses the types in question). */ IMP_SWIG_OBJECT(IMP::isd, ISDRestraint, ISDRestraints); IMP_SWIG_OBJECT(IMP::isd, JeffreysRestraint, JeffreysRestraints); IMP_SWIG_OBJECT(IMP::isd, SlidingPriorRestraint, SlidingPriorRestraints); IMP_SWIG_OBJECT(IMP::isd, vonMisesKappaJeffreysRestraint, vonMisesKappaJeffreysRestraints); IMP_SWIG_OBJECT(IMP::isd, vonMisesKappaConjugateRestraint, vonMisesKappaConjugateRestraints); IMP_SWIG_OBJECT(IMP::isd, FNormal, FNormals); IMP_SWIG_OBJECT(IMP::isd, vonMises, vonMisess); IMP_SWIG_OBJECT(IMP::isd, vonMisesSufficient, vonMisesSufficients); IMP_SWIG_DECORATOR(IMP::isd, Nuisance, Nuisances); IMP_SWIG_DECORATOR(IMP::isd, Scale, Scales); IMP_SWIG_DECORATOR(IMP::isd, Switching, Switchings); IMP_SWIG_OBJECT(IMP::isd, NOERestraint, NOERestraints); IMP_SWIG_OBJECT(IMP::isd, GaussianRestraint, GaussianRestraints); IMP_SWIG_OBJECT(IMP::isd, LognormalRestraint, LognormalRestraints); IMP_SWIG_OBJECT(IMP::isd, AmbiguousNOERestraint, AmbigousNOERestraints); IMP_SWIG_OBJECT(IMP::isd, MarginalNOERestraint, AmbigousNOERestraints); IMP_SWIG_OBJECT(IMP::isd, MarginalHBondRestraint, AmbigousHBondRestraints); IMP_SWIG_OBJECT(IMP::isd, TALOSRestraint, TALOSRestraints); IMP_SWIG_OBJECT(IMP::isd, LogicalORRestraint, LogicalORRestraints); IMP_SWIG_OBJECT(IMP::isd, NuisanceRangeModifier, NuisanceRangeModifiers); IMP_SWIG_OBJECT(IMP::isd, MaintainScaleOrderConstraint, MaintainScaleOrderConstraints); IMP_SWIG_OBJECT(IMP::isd, RepulsiveDistancePairScore, RepulsiveDistancePairScores); IMP_SWIG_OBJECT(IMP::isd, AmbiguousRestraint, AmbiguousRestraints); IMP_SWIG_OBJECT(IMP::isd, UnivariateFunction, UnivariateFunctions); IMP_SWIG_OBJECT(IMP::isd, Linear1DFunction, Linear1DFunctions); IMP_SWIG_OBJECT(IMP::isd, GeneralizedGuinierPorodFunction, GeneralizedGuinierPorodFunctions); IMP_SWIG_OBJECT(IMP::isd, BivariateFunction, BivariateFunctions); IMP_SWIG_OBJECT(IMP::isd, Covariance1DFunction, Covariance1DFunctions); IMP_SWIG_OBJECT(IMP::isd, GaussianProcessInterpolation, GaussianProcessInterpolations); IMP_SWIG_OBJECT(IMP::isd, GaussianProcessInterpolationRestraint, GaussianProcessInterpolationRestraints); #ifdef IMP_ISD_USE_CHOLMOD IMP_SWIG_OBJECT(IMP::isd, GaussianProcessInterpolationSparse, GaussianProcessInterpolationSparses); IMP_SWIG_OBJECT(IMP::isd, GaussianProcessInterpolationRestraintSparse, GaussianProcessInterpolationRestraintSparses); #endif %warnfilter(302); IMP_SWIG_OBJECT(IMP::isd, MolecularDynamics, MolecularDynamicss); IMP_SWIG_OBJECT(IMP::isd, MolecularDynamicsMover, MolecularDynamicsMovers); IMP_SWIG_OBJECT(IMP::isd, HybridMonteCarlo, HybridMonteCarlos); /* One can add python methods to your module by putting code in %pythoncode blocks This function can be called as IMP.isds.say_hello(). */ %pythoncode %{ def create_model_and_particles(): m= IMP.Model() sc= IMP.container.ListSingletonContainer(m) b= IMP.algebra.BoundingBox3D(IMP.algebra.Vector3D(0,0,0), IMP.algebra.Vector3D(10,10,10)) for i in range(0,100): p= IMP.Particle(m) sc.add_particle(p) d=IMP.core.XYZR.setup_particle(p, IMP.algebra.Sphere3D(IMP.algebra.get_random_vector_in(b), 1)) d.set_coordinates_are_optimized(True) return (m, sc) %} /* Wrap our own classes. Each header in the module should be listed here with a %include line.*/ %include "IMP/isd/ISDRestraint.h" %include "IMP/isd/Nuisance.h" %include "IMP/isd/Scale.h" %include "IMP/isd/Switching.h" %include "IMP/isd/NuisanceRangeModifier.h" %include "IMP/isd/MaintainScaleOrderConstraint.h" %include "IMP/isd/JeffreysRestraint.h" %include "IMP/isd/SlidingPriorRestraint.h" %include "IMP/isd/FNormal.h" %include "IMP/isd/vonMises.h" %include "IMP/isd/vonMisesSufficient.h" %include "IMP/isd/vonMisesKappaJeffreysRestraint.h" %include "IMP/isd/vonMisesKappaConjugateRestraint.h" %include "IMP/isd/NOERestraint.h" %include "IMP/isd/GaussianRestraint.h" %include "IMP/isd/LognormalRestraint.h" %include "IMP/isd/AmbiguousNOERestraint.h" %include "IMP/isd/MarginalNOERestraint.h" %include "IMP/isd/MarginalHBondRestraint.h" %include "IMP/isd/TALOSRestraint.h" %include "IMP/isd/LogicalORRestraint.h" %include "IMP/isd/RepulsiveDistancePairScore.h" %include "IMP/isd/AmbiguousRestraint.h" %include "IMP/isd/univariate_functions.h" %include "IMP/isd/bivariate_functions.h" %include "IMP/isd/GaussianProcessInterpolation.h" %include "IMP/isd/GaussianProcessInterpolationRestraint.h" #ifdef IMP_ISD_USE_CHOLMOD %include "IMP/isd/GaussianProcessInterpolationSparse.h" %include "IMP/isd/GaussianProcessInterpolationRestraintSparse.h" #endif %include "IMP/isd/MolecularDynamics.h" %include "IMP/isd/MolecularDynamicsMover.h" %include "IMP/isd/HybridMonteCarlo.h" namespace IMP { namespace atom { /* Python doesn't natively support C++ templates, so you have to manually choose which template parameters you want to intantiate a template with. */ } }