namespace IMP { namespace atom { %warnfilter(403) ForceFieldParameters; } } IMP_SWIG_GRAPH(IMP::atom, HierarchyTree, HierarchyTree, IMP::atom::Hierarchy); IMP_SWIG_BASE_OBJECT(IMP::atom, PDBSelector, PDBSelectors); IMP_SWIG_DECORATOR(IMP::atom, Angle, Angles); IMP_SWIG_DECORATOR(IMP::atom, Atom, Atoms); IMP_SWIG_DECORATOR(IMP::atom, Bond, Bonds); IMP_SWIG_DECORATOR(IMP::atom, Bonded, Bondeds); IMP_SWIG_DECORATOR(IMP::atom, CHARMMAtom, CHARMMAtomList); IMP_SWIG_DECORATOR(IMP::atom, Chain, Chains); IMP_SWIG_DECORATOR(IMP::atom, Charged, Chargeds); IMP_SWIG_DECORATOR(IMP::atom, Diffusion, Diffusions); IMP_SWIG_DECORATOR(IMP::atom, RigidBodyDiffusion, RigidBodyDiffusions); IMP_SWIG_DECORATOR(IMP::atom, Dihedral, Dihedrals); IMP_SWIG_DECORATOR(IMP::atom, Domain, Domains); IMP_SWIG_DECORATOR(IMP::atom, Fragment, Fragments); IMP_SWIG_DECORATOR(IMP::atom, Hierarchy, Hierarchies); IMP_SWIG_DECORATOR(IMP::atom, LennardJones, LennardJonesList); IMP_SWIG_DECORATOR(IMP::atom, Mass, Masses); IMP_SWIG_DECORATOR(IMP::atom, Molecule, Molecules); IMP_SWIG_DECORATOR(IMP::atom, Residue, Residues); IMP_SWIG_DECORATOR(IMP::atom, Copy, Copies); IMP_SWIG_DECORATOR(IMP::atom, SecondaryStructureResidue, SecondaryStructureResidues); IMP_SWIG_BASE_OBJECT(IMP::atom, Simulator, Simulators); IMP_SWIG_DIRECTOR(IMP::atom, PDBSelector); IMP_SWIG_OBJECT(IMP::atom, ATOMPDBSelector, ATOMPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, AllMol2Selector,AllMol2Selectors); IMP_SWIG_OBJECT(IMP::atom, AllPDBSelector, AllPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, AndPDBSelector,AndPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, AngleSingletonScore, AngleSingletonScores); IMP_SWIG_OBJECT(IMP::atom, BondEndpointsRefiner, BondEndpointsRefiners); IMP_SWIG_OBJECT(IMP::atom, BondPairContainer, BondPairContainers); IMP_SWIG_OBJECT(IMP::atom, BondSingletonScore, BondSingletonScores); IMP_SWIG_OBJECT(IMP::atom, BondedPairFilter, BondedPairFilters); IMP_SWIG_OBJECT(IMP::atom, BrownianDynamics, BrownianDynamicsList); IMP_SWIG_OBJECT(IMP::atom, CAlphaPDBSelector, CAlphaPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, CBetaPDBSelector, CBetaPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, CHARMMParameters, CHARMMParametersList); IMP_SWIG_OBJECT(IMP::atom, CHARMMResidueTopology, CHARMMResidueTopologies); IMP_SWIG_OBJECT(IMP::atom, CHARMMSegmentTopology, CHARMMSegmentTopologies); IMP_SWIG_OBJECT(IMP::atom, CHARMMStereochemistryRestraint, CHARMMStereochemistryRestraints); IMP_SWIG_OBJECT(IMP::atom, CHARMMTopology, CHARMMTopologies); IMP_SWIG_OBJECT(IMP::atom, CPDBSelector, CPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, ChainPDBSelector, ChainPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, CoulombPairScore, CoulombPairScores); IMP_SWIG_OBJECT(IMP::atom, CoverBond, CoverBonds); IMP_SWIG_OBJECT(IMP::atom, DihedralSingletonScore, DihedralSingletonScores); IMP_SWIG_OBJECT(IMP::atom, DopePairScore, DopePairScores); IMP_SWIG_OBJECT(IMP::atom, ForceFieldParameters, ForceFieldParametersList); IMP_SWIG_OBJECT(IMP::atom, ForceSwitch, ForceSwitches); IMP_SWIG_OBJECT(IMP::atom, HydrogenPDBSelector,HydrogenPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, ImproperSingletonScore, ImproperSingletonScores); IMP_SWIG_OBJECT(IMP::atom, LennardJonesPairScore, LennardJonesPairScores); IMP_SWIG_OBJECT(IMP::atom, Mol2Selector, Mol2Selectors); IMP_SWIG_OBJECT(IMP::atom, MolecularDynamics, MolecularDynamicsList); IMP_SWIG_OBJECT(IMP::atom, NPDBSelector, NPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, NonAlternativePDBSelector, NonAlternativePDBSelectors); IMP_SWIG_OBJECT(IMP::atom, NonHydrogenMol2Selector, NonHydrogenMol2Selectors); IMP_SWIG_OBJECT(IMP::atom, NonWaterNonHydrogenPDBSelector, NonWaterNonHydrogenPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, NonWaterPDBSelector,NonWaterPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, NotPDBSelector,NotPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, OrPDBSelector,OrPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, PPDBSelector, PPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, ProteinLigandAtomPairScore, ProteinLigandAtomPairScores); IMP_SWIG_OBJECT(IMP::atom, ProteinLigandRestraint, ProteinLigandRestraints); IMP_SWIG_OBJECT(IMP::atom, SameResiduePairFilter, SameResiduePairFilters); IMP_SWIG_OBJECT(IMP::atom, SmoothingFunction, SmoothingFunctions); IMP_SWIG_OBJECT(IMP::atom, StereochemistryPairFilter, StereochemistryPairFilters); IMP_SWIG_OBJECT(IMP::atom, VelocityScalingOptimizerState, VelocityScalingOptimizerStates); IMP_SWIG_OBJECT(IMP::atom, WaterPDBSelector,WaterPDBSelectors); IMP_SWIG_OBJECT(IMP::atom, WritePDBOptimizerState, WritePDBOptimizerStates); IMP_SWIG_VALUE_INSTANCE(IMP::atom, AtomType, AtomType, AtomTypes); IMP_SWIG_VALUE(IMP::atom, CHARMMAtomTopology, CHARMMAtomTopologies); IMP_SWIG_VALUE(IMP::atom, CHARMMBondEndpoint, CHARMMBondEndpoints); IMP_SWIG_VALUE(IMP::atom, CHARMMBondParameters, CHARMMBondParametersList); IMP_SWIG_VALUE(IMP::atom, CHARMMDihedralParameters, CHARMMDihedralParametersList); IMP_SWIG_OBJECT(IMP::atom, CHARMMIdealResidueTopology, CHARMMIdealResidueTopologies); IMP_SWIG_VALUE(IMP::atom, CHARMMInternalCoordinate, CHARMMInternalCoordinates); IMP_SWIG_OBJECT(IMP::atom, CHARMMPatch, CHARMMPatches); IMP_SWIG_OBJECT(IMP::atom, CHARMMResidueTopologyBase, CHARMMResidueTopologyBases); IMP_SWIG_VALUE(IMP::atom, RMSDCalculator, RMSDCalculators); IMP_SWIG_VALUE_INSTANCE(IMP::atom, ResidueType, ResidueType, ResidueTypes); IMP_SWIG_VALUE(IMP::atom, Selection, Selections); IMP_SWIG_OBJECT(IMP::atom, RemoveRigidMotionOptimizerState, RemoveRigidMotionOptimizerStates); IMP_SWIG_OBJECT(IMP::atom, BerendsenThermostatOptimizerState, BerendsenThermostatOptimizerStates); IMP_SWIG_OBJECT(IMP::atom, LangevinThermostatOptimizerState, LangevinThermostatOptimizerStates); IMP_SWIG_OBJECT(IMP::atom, SelectionGeometry, SelectionGeometries); IMP_SWIG_OBJECT(IMP::atom, HierarchyGeometry, HierarchyGeometries); IMP_SWIG_OBJECT(IMP::atom, HierarchiesGeometry, HierarchiesGeometries); IMP_SWIG_OBJECT(IMP::atom, BondGeometry, BondGeometries); IMP_SWIG_OBJECT(IMP::atom, BondsGeometry, BondsGeometries); IMP_SWIG_VALUE_INSTANCE(IMP::atom, CHARMMDihedral, CHARMMConnection, CHARMMDihedrals); IMP_SWIG_VALUE_INSTANCE(IMP::atom, CHARMMBond, CHARMMConnection, CHARMMBonds); IMP_SWIG_VALUE_INSTANCE(IMP::atom, CHARMMAngle, CHARMMConnection, CHARMMAngles); // for some reason this one fails using the generic macro %extend IMP::atom::CHARMMConnection { IMP_SWIG_SHOWSTUFF(CHARMMConnection); } %extend IMP::atom::Selection { %pythoncode %{ def __init__(self, hierarchy=None, hierarchies=None, molecules=None, residue_indexes=None, chains=None, atom_types=None, residue_types=None, domains=None, target_radius=-1, molecule=None, residue_index=None, chain=None, atom_type=None, residue_type=None, terminus=None, domain=None, particle_type=None, particle_types=None, hierarchy_types=None, copy_index=-1, copy_indexes=None): if hierarchy: this = _IMP_atom.new_Selection(hierarchy) try: self.this.append(this) except: self.this = this else: this = _IMP_atom.new_Selection(hierarchies) try: self.this.append(this) except: self.this = this if not molecules: molecules=[] if not residue_indexes: residue_indexes=[] if not chains: chains=[] if not atom_types: atom_types=[] if not residue_types: residue_types=[] if not domains: domains=[] if molecule: molecules.append(molecule) if residue_index: residue_indexes.append(residue_index) if chain: chains.append(chain) if atom_type: atom_types.append(atom_type) if residue_type: residue_types.append(residue_type) if domain: domains.append(domain) if terminus: self.set_terminus(terminus) if not copy_indexes: copy_indexes=[] if copy_index !=-1: copy_indexes.append(copy_index) if not particle_types: particle_types=[] if particle_type: particle_types.append(particle_type) if not hierarchy_types: hierarchy_types=[] presidue_indexes=[] for ri in residue_indexes: if type(ri) == type(()): presidue_indexes= presidue_indexes+ range(ri[0], ri[1]) else: presidue_indexes.append(ri) self.set_molecules(molecules); self.set_chains("".join(chains)); self.set_residue_indexes(presidue_indexes); self.set_atom_types(atom_types); self.set_residue_types(residue_types); self.set_domains(domains); self.set_target_radius(target_radius); self.set_copy_indexes(copy_indexes) self.set_particle_types(particle_types) self.set_hierarchy_types(hierarchy_types) %} } %include "IMP/atom/atom_macros.h" // must be before hierarchy %include "IMP/atom/bond_decorators.h" // it is used as a base class %include "IMP/atom/Hierarchy.h" /* Wrap our own classes */ %include "IMP/atom/angle_decorators.h" %include "IMP/atom/smoothing_functions.h" %include "IMP/atom/AngleSingletonScore.h" %include "IMP/atom/BondEndpointsRefiner.h" %include "IMP/atom/BondPairContainer.h" %include "IMP/atom/BondSingletonScore.h" %include "IMP/atom/DihedralSingletonScore.h" %include "IMP/atom/ImproperSingletonScore.h" %include "IMP/atom/CoverBond.h" %include "IMP/atom/Simulator.h" %include "IMP/atom/BrownianDynamics.h" %include "IMP/atom/Diffusion.h" %include "IMP/atom/Chain.h" %include "IMP/atom/Charged.h" %include "IMP/atom/CoulombPairScore.h" %include "IMP/atom/Domain.h" %include "IMP/atom/LennardJones.h" %include "IMP/atom/LennardJonesPairScore.h" %include "IMP/atom/MolecularDynamics.h" %include "IMP/atom/VelocityScalingOptimizerState.h" %include "IMP/atom/Fragment.h" %include "IMP/atom/StereochemistryPairFilter.h" %include "IMP/atom/Mass.h" %include "IMP/atom/BondedPairFilter.h" %include "IMP/atom/mol2.h" %include "IMP/atom/SecondaryStructureResidue.h" %include "IMP/atom/secondary_structure_reader.h" %template(_ADopeBase) IMP::score_functor::DistancePairScore; %template(_BDopeBase) IMP::score_functor::DistancePairScore< IMP::score_functor::Statistical< IMP::atom::DopeType,false,true,false > >; namespace IMP { namespace atom { %template(_SPSFTB) ::IMP::score_functor::DistancePairScore >; %template(_SPSTF) ::IMP::core::StatisticalPairScore< IMP::atom::ProteinLigandType, true, false>; %template(_SPSFT) ::IMP::core::StatisticalPairScore< IMP::atom::DopeType, false, true>; } } %include "IMP/atom/protein_ligand_score.h" namespace IMP { namespace atom { // swig has random, perplexing issues if these are higher in the file %template(AtomType) ::IMP::Key; %template(ResidueType) ::IMP::Key; } } %include "IMP/atom/element.h" %include "IMP/atom/Atom.h" %include "IMP/atom/Residue.h" %include "IMP/atom/dihedrals.h" %include "IMP/atom/Molecule.h" %include "IMP/atom/Copy.h" %include "IMP/atom/Selection.h" %include "IMP/atom/distance.h" %include "IMP/atom/ForceFieldParameters.h" %include "IMP/atom/charmm_topology.h" %include "IMP/atom/CHARMMAtom.h" %include "IMP/atom/CHARMMParameters.h" %include "IMP/atom/charmm_segment_topology.h" %include "IMP/atom/CHARMMStereochemistryRestraint.h" %include "IMP/atom/force_fields.h" %include "IMP/atom/estimates.h" %include "IMP/atom/hierarchy_tools.h" %include "IMP/atom/DopePairScore.h" %include "IMP/atom/SameResiduePairFilter.h" %include "IMP/atom/RemoveRigidMotionOptimizerState.h" %include "IMP/atom/BerendsenThermostatOptimizerState.h" %include "IMP/atom/LangevinThermostatOptimizerState.h" %include "IMP/atom/pdb.h" %include "IMP/atom/constants.h" namespace IMP { namespace atom { %template(show_molecular_hierarchy) IMP::core::show; %template(CHARMMBond) CHARMMConnection<2>; %template(CHARMMAngle) CHARMMConnection<3>; %template(_get_rmsd_cpp) get_rmsd >, IMP::base::Vector > >; %template(_get_native_overlap_cpp) get_native_overlap >, IMP::base::Vector > >; %template(_get_drmsd_cpp) get_drmsd >, IMP::base::Vector > >; %template(_get_drms_cpp) get_drms >, IMP::base::Vector > >; %template(_get_rigid_bodies_drms_cpp) get_rigid_bodies_drms >, IMP::base::Vector > >; } } %pythoncode %{ def get_rmsd(a, b): va= [IMP.algebra.get_vector(x) for x in a] vb= [IMP.algebra.get_vector(x) for x in b] return _get_rmsd_cpp(va, vb) def get_native_overlap(a, b, d): va= [IMP.algebra.get_vector(x) for x in a] vb= [IMP.algebra.get_vector(x) for x in b] return _get_native_overlap_cpp(va, vb, d) def get_drmsd(a, b): va= [IMP.algebra.get_vector(x) for x in a] vb= [IMP.algebra.get_vector(x) for x in b] return _get_drmsd_cpp(va, vb) def get_drms(a, b): va= [IMP.algebra.get_vector(x) for x in a] vb= [IMP.algebra.get_vector(x) for x in b] return _get_drms_cpp(va, vb) def get_rigid_bodies_drms(a, b, ranges): va= [IMP.algebra.get_vector(x) for x in a] vb= [IMP.algebra.get_vector(x) for x in b] #rs = [IMP.IntRange(r[0],r[1]) for r in ranges] return _get_rigid_bodies_drms_cpp(va, vb, ranges) %}