%include "IMP/core/core_macros.h" IMP_SWIG_CONTAINER(IMP::core, IMP::core, MonteCarlo, Mover, mover); IMP_SWIG_OBJECT( IMP::core, AngleRestraint, AngleRestraints); IMP_SWIG_OBJECT( IMP::core, AngleTripletScore, AngleTripletScores); IMP_SWIG_OBJECT( IMP::core, AttributeSingletonScore, AttributeSingletonScores); IMP_SWIG_OBJECT( IMP::core, BallMover, BallMovers); IMP_SWIG_OBJECT( IMP::core, BoundingBox3DSingletonScore, BoundingBox3DSingletonScores); #ifdef IMP_USE_CGAL IMP_SWIG_OBJECT( IMP::core, BoxSweepClosePairsFinder, BoxSweepClosePairsFinders); #endif IMP_SWIG_OBJECT( IMP::core, NearestNeighborsClosePairsFinder, NearestNeighborsClosePairsFinders); IMP_SWIG_OBJECT( IMP::core, CentroidOfRefined, CentroidOfRefineds); IMP_SWIG_OBJECT( IMP::core, ChecksScoreState, ChecksScoreStates); IMP_SWIG_OBJECT( IMP::core, ChildrenRefiner, ChildrenRefiners); IMP_SWIG_OBJECT( IMP::core, ClosePairsFinder, ClosePairsFinders); IMP_SWIG_OBJECT( IMP::core, ClosePairsPairScore, ClosePairsPairScores); IMP_SWIG_OBJECT( IMP::core, ClosedCubicSpline, ClosedCubicSplines); IMP_SWIG_OBJECT( IMP::core, ConnectivityRestraint, ConnectivityRestraints); IMP_SWIG_OBJECT( IMP::core, ConstantRestraint, ConstantRestraints); IMP_SWIG_OBJECT( IMP::core, Cosine, Cosines); IMP_SWIG_OBJECT( IMP::core, CoverRefined, CoverRefineds); IMP_SWIG_OBJECT( IMP::core, DerivativesFromRefined, DerivativesFromRefineds); IMP_SWIG_OBJECT( IMP::core, DerivativesToRefined, DerivativesToRefineds); IMP_SWIG_OBJECT( IMP::core, DiameterRestraint, DiameterRestraints); IMP_SWIG_OBJECT( IMP::core, DihedralRestraint, DihedralRestraints); IMP_SWIG_OBJECT( IMP::core, DistancePairScore, DistancePairScores); IMP_SWIG_OBJECT( IMP::core, DistanceRestraint, DistanceRestraints); IMP_SWIG_OBJECT( IMP::core, DistanceToSingletonScore, DistanceToSingletonScores); IMP_SWIG_OBJECT( IMP::core, ExcludedVolumeRestraint, ExcludedVolumeRestraints); IMP_SWIG_OBJECT( IMP::core, FixedRefiner, FixedRefiners); IMP_SWIG_OBJECT( IMP::core, GridClosePairsFinder, GridClosePairsFinders); IMP_SWIG_OBJECT( IMP::core, Harmonic, Harmonics); IMP_SWIG_OBJECT( IMP::core, HarmonicWell, HarmonicWells); IMP_SWIG_OBJECT( IMP::core, HarmonicLowerBound, HarmonicLowerBounds); IMP_SWIG_OBJECT( IMP::core, HarmonicUpperBound, HarmonicUpperBounds); IMP_SWIG_OBJECT( IMP::core, HarmonicDistancePairScore, HarmonicDistancePairScores); IMP_SWIG_OBJECT( IMP::core, HarmonicSphereDistancePairScore, HarmonicSphereDistancePairScores); IMP_SWIG_OBJECT( IMP::core, IncrementalBallMover, IncrementalBallMovers); IMP_SWIG_OBJECT( IMP::core, LeavesRefiner, LeavesRefiners); IMP_SWIG_OBJECT( IMP::core, Linear, Linears); IMP_SWIG_OBJECT( IMP::core, MonteCarlo, MonteCarlos); IMP_SWIG_OBJECT( IMP::core, NormalMover, NormalMovers); IMP_SWIG_OBJECT( IMP::core, NormalizedSphereDistancePairScore, NormalizedSphereDistancePairScores); IMP_SWIG_OBJECT( IMP::core, OpenCubicSpline, OpenCubicSplines); IMP_SWIG_OBJECT( IMP::core, PairConstraint, PairConstraints); IMP_SWIG_OBJECT( IMP::core, PairRestraint, PairRestraints); IMP_SWIG_OBJECT( IMP::core, QuadConstraint, QuadConstraints); IMP_SWIG_OBJECT( IMP::core, QuadRestraint, QuadRestraints); IMP_SWIG_OBJECT( IMP::core, QuadraticClosePairsFinder, QuadraticClosePairsFinders); IMP_SWIG_OBJECT( IMP::core, RefinedPairsPairScore, RefinedPairsPairScores); IMP_SWIG_OBJECT( IMP::core, RigidBodyDistancePairScore, RigidBodyDistancePairScores); IMP_SWIG_OBJECT( IMP::core, RigidBodyMover, RigidBodyMovers); IMP_SWIG_OBJECT( IMP::core, RigidClosePairsFinder, RigidClosePairsFinders); IMP_SWIG_OBJECT( IMP::core, RigidMembersRefiner, RigidMembersRefiners); IMP_SWIG_OBJECT( IMP::core, SingletonConstraint, SingletonConstraints); IMP_SWIG_OBJECT( IMP::core, SingletonRestraint, SingletonRestraints); IMP_SWIG_OBJECT( IMP::core, SoftSpherePairScore, SoftSpherePairScores); IMP_SWIG_OBJECT( IMP::core, SphereDistancePairScore, SphereDistancePairScores); IMP_SWIG_OBJECT( IMP::core, SphereDistanceToSingletonScore, SphereDistanceToSingletonScores); IMP_SWIG_OBJECT( IMP::core, SteepestDescent, SteepestDescents); IMP_SWIG_OBJECT( IMP::core, TableRefiner, TableRefiners); IMP_SWIG_OBJECT( IMP::core, Transform, Transforms); IMP_SWIG_OBJECT( IMP::core, TransformedDistancePairScore, TransformedDistancePairScores); IMP_SWIG_OBJECT( IMP::core, TripletConstraint, TripletConstraints); IMP_SWIG_OBJECT( IMP::core, TripletRestraint, TripletRestraints); IMP_SWIG_OBJECT( IMP::core, TruncatedHarmonicBound, TruncatedHarmonicBounds); IMP_SWIG_OBJECT( IMP::core, TruncatedHarmonicLowerBound, TruncatedHarmonicLowerBounds); IMP_SWIG_OBJECT( IMP::core, TruncatedHarmonicUpperBound, TruncatedHarmonicUpperBounds); IMP_SWIG_OBJECT( IMP::core, TypedPairScore, TypedPairScores); IMP_SWIG_OBJECT( IMP::core, VolumeRestraint, VolumeRestraints); IMP_SWIG_OBJECT( IMP::core, WeightedSphereDistancePairScore, WeightedSphereDistancePairScores); IMP_SWIG_OBJECT( IMP::core, WriteModelOptimizerState, WriteModelOptimizerStates); IMP_SWIG_OBJECT( IMP::core, Mover, Movers); IMP_SWIG_DECORATOR( IMP::core, XYZ, XYZs); IMP_SWIG_DECORATOR_WITH_TRAITS( IMP::core, XYZR, XYZRs); IMP_SWIG_DECORATOR( IMP::core, RigidBody, RigidBodies); IMP_SWIG_DECORATOR( IMP::core, RigidMember, RigidMembers); IMP_SWIG_DECORATOR( IMP::core, Centroid, Centroids); IMP_SWIG_DECORATOR( IMP::core, Cover, Covers); IMP_SWIG_DECORATOR_WITH_TRAITS( IMP::core, Hierarchy, GenericHierarchies); /* Don't wrap internal classes */ %ignore IMP::core::internal::ChildArrayTraits; /* Wrap our own base classes */ %include "IMP/core/ClosePairsFinder.h" %include "IMP/core/Mover.h" %include "IMP/core/MoverBase.h" %include "IMP/core/XYZ.h" %include "IMP/core/XYZR.h" /* Wrap the final classes */ %include "IMP/core/AngleTripletScore.h" %include "IMP/core/AttributeSingletonScore.h" %include "IMP/core/BallMover.h" %include "IMP/core/IncrementalBallMover.h" %include "IMP/core/BoxSweepClosePairsFinder.h" %include "IMP/core/CentroidOfRefined.h" %include "IMP/core/ChecksScoreState.h" %include "IMP/core/ChildrenRefiner.h" %include "IMP/core/ClosedCubicSpline.h" %include "IMP/core/ClosePairsPairScore.h" %include "IMP/core/ConjugateGradients.h" %include "IMP/core/ConnectivityRestraint.h" %include "IMP/core/ConstantRestraint.h" %include "IMP/core/Cosine.h" %include "IMP/core/CoverRefined.h" %include "IMP/core/DerivativesFromRefined.h" %include "IMP/core/DerivativesToRefined.h" %include "IMP/core/DiameterRestraint.h" %include "IMP/core/Transform.h" %include "IMP/core/DihedralRestraint.h" %include "IMP/core/DistancePairScore.h" %include "IMP/core/DistanceRestraint.h" %include "IMP/core/DistanceToSingletonScore.h" %include "IMP/core/ExcludedVolumeRestraint.h" %include "IMP/core/BoundingBox3DSingletonScore.h" %include "IMP/core/FixedRefiner.h" %include "IMP/core/GridClosePairsFinder.h" %include "IMP/core/Harmonic.h" %include "IMP/core/HarmonicWell.h" %include "IMP/core/HarmonicLowerBound.h" %include "IMP/core/HarmonicUpperBound.h" %inline %{ namespace IMP { namespace core { class HierarchyTraits; } } %} %include "IMP/core/Hierarchy.h" %inline %{ namespace IMP { namespace core { void breadth_first_traversal(Hierarchy d, HierarchyVisitor *f) { std::deque stack; stack.push_back(d); //d.show(std::cerr); do { Hierarchy cur= stack.front(); stack.pop_front(); if (f->operator()(cur)) { //std::cerr << "Visiting particle " << cur.get_particle() << std::endl; for (int i=cur.get_number_of_children()-1; i>=0; --i) { stack.push_back(cur.get_child(i)); } } } while (!stack.empty()); } void depth_first_traversal(Hierarchy d, HierarchyVisitor *f) { std::vector stack; stack.push_back(d); do { Hierarchy cur= stack.back(); stack.pop_back(); if (f->operator()(cur)) { for (int i=cur.get_number_of_children()-1; i>=0; --i) { stack.push_back(cur.get_child(i)); } } } while (!stack.empty()); } } } %} %include "IMP/core/LeavesRefiner.h" %include "IMP/core/Linear.h" %include "IMP/core/MonteCarlo.h" %include "IMP/core/NormalMover.h" %include "IMP/core/OpenCubicSpline.h" %include "IMP/core/QuadraticClosePairsFinder.h" %include "IMP/core/RefinedPairsPairScore.h" %include "IMP/core/rigid_bodies.h" %include "IMP/core/NearestNeighborsClosePairsFinder.h" %include "IMP/core/RigidClosePairsFinder.h" %include "IMP/core/SphereDistancePairScore.h" %include "IMP/core/SteepestDescent.h" %include "IMP/core/TransformedDistancePairScore.h" %include "IMP/core/TypedPairScore.h" %include "IMP/core/RigidBodyDistancePairScore.h" %include "IMP/core/TableRefiner.h" %include "IMP/core/TruncatedHarmonic.h" %include "IMP/core/MCCGSampler.h" %include "IMP/core/PairRestraint.h" %include "IMP/core/SingletonRestraint.h" %include "IMP/core/TripletRestraint.h" %include "IMP/core/QuadRestraint.h" %include "IMP/core/SingletonConstraint.h" %include "IMP/core/PairConstraint.h" %include "IMP/core/TripletConstraint.h" %include "IMP/core/QuadConstraint.h" %include "IMP/core/AngleRestraint.h" %include "IMP/core/RigidBodyMover.h" %include "IMP/core/VolumeRestraint.h" %include "IMP/core/utility.h" %include "IMP/core/WriteModelOptimizerState.h" namespace IMP { namespace core { %template(TruncatedHarmonicLowerBound) ::IMP::core::TruncatedHarmonic; %template(TruncatedHarmonicUpperBound) ::IMP::core::TruncatedHarmonic; %template(TruncatedHarmonicBound) ::IMP::core::TruncatedHarmonic; // swig screws up on scopes, I can't be bothered to fix it //%template(show_named_hierarchy) show<::IMP::core::Name>; } namespace algebra { %template(get_transformation_aligning_first_to_second) get_transformation_aligning_first_to_second > >; %template(get_transformation_aligning_first_to_second) get_transformation_aligning_first_to_second; %template(get_transformation_aligning_first_to_second) get_transformation_aligning_first_to_second< std::vector >, core::XYZsTemp>; } }