IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP Namespace Reference

Base functionality and abstract base classes for representation, scoring and sampling. More...

Detailed Description

Base functionality and abstract base classes for representation, scoring and sampling.

utility methods for npctransport

useful enums and constants

Graphs

Graphs in IMP are represented in C++ using the Boost.Graph. All graphs used in IMP are VertexAndEdgeListGraphs, have vertex_name properties, are BidirectionalGraphs if they are directed.

The Boost.Graph interface cannot be easily exported to Python so we instead provide a simple wrapper IMP::PythonDirectedGraph. There are methods to translate the graphs into various common python and other formats (eg graphviz).

Values and Objects (C++ only)

As is conventional in C++, IMP classes are divided into broad, exclusive types

  • Object classes: They inherit from IMP::Object and are always passed by pointer. They are reference counted and so should only be stored using IMP::Pointer (in C++, in Python everything is reference counted). Never allocate these on the stack as very bad things can happen. Objects cannot be duplicated. Equality on objects is defined as identity (eg two different objects are different even if the data they contain is identical).
  • Value classes which are normal data types. They are passed by value (or const&), never by pointer. Equality is defined based on the data stored in the value. Most value types in IMP are always valid, but a few, mostly geometric types (IMP::algebra::Vector3D) are designed for fast, low-level use and are left in an uninitialized state by their default constructor
  • RAII classes control some particular resource. They grab control of a resource when created and then free it when they are destroyed. As a result, they cannot be copied. Non-IMP examples include things like files in python, which are automatically closed when the file object is deleted.

All types in IMP, with a few documented exceptions, can be

  • compared to other objects of the same type
  • output to a C++ stream or printed in python
  • meaningfully put into python dictionaries or C++ hash maps

Google Perf Tools

The google perf tools can be used for cpu and memory profiling of IMP. They can be controlled from the command line in many IMP executables.

Info

Author(s): Daniel Russel, Ben Webb

Maintainer: benmwebb

License: LGPL This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Publications:

* \file npctransport/enums.h

*

#

* Copyright 2007-2022 IMP Inventors. All rights reserved.

autotoc_md117

* \file util.h

*

Simulate an fg and a kap interacting #

* Copyright 2007-2022 IMP Inventors. All rights reserved.

autotoc_md121

Namespaces

namespace  algebra
 General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP modules.
namespace  atom
 Functionality for loading, creating, manipulating and scoring atomic structures.
namespace  bayesianem
 Restraints for handling electron microscopy maps.
namespace  benchmark
 Support for developing and analyzing benchmarks of IMP code.
namespace  bff
 Bayesian Fluorescence Framework.
namespace  cgal
 Make CGAL functionality available to IMP.
namespace  cnmultifit
 Generate cyclic atomic structures using cryo-electron microscopy data.
namespace  container
 Various classes to hold sets of particles.
namespace  core
 Basic functionality that is expected to be used by a wide variety of IMP users.
namespace  display
 Output IMP model data in various file formats.
namespace  domino
 Divide-and-conquer inferential optimization in discrete space.
namespace  em
 Basic utilities for handling cryo-electron microscopy 3D density maps.
namespace  em2d
 Restraints using electron microscopy 2D images (class averages).
namespace  EMageFit
 Build assembly models consistent with EM images (class averages).
namespace  emseqfinder
 Assignment of sequence to backbone fragments traced in a cryo-EM map.
namespace  example
 Example module.
namespace  foxs
 Determine small angle X-ray (SAXS) profiles.
namespace  gsl
 Several general purpose optimizers from the GNU Scientific Library (GSL).
namespace  integrative_docking
 Pairwise docking incorporating additional data.
namespace  isd
 Inferential scoring building on methods developed as part of the Inferential Structure Determination software (ISD).
namespace  jax
 Support for the JAX Python library.
namespace  kinematics
 Functionality for dealing with kinematic mechanical structures.
namespace  kmeans
 Interface to the GPL k-means clustering library.
namespace  misc
 Miscellaneous functionality that is not expected to be used by many IMP users.
namespace  mmcif
 Support for output of models in mmCIF format.
namespace  modeller
 Interface to the Modeller comparative modeling package.
namespace  mpi
 Code that uses the MPI parallel library.
namespace  multi_state
 Functionality for handling multi-state models.
namespace  multifit
 Fitting atomic structures into a cryo-electron microscopy density map.
namespace  npc
 Restraints designed for modeling the Nuclear Pore Complex (NPC).
namespace  npctransport
 Simulation of transport through the Nuclear Pore Complex.
namespace  parallel
 Distribute IMP tasks to multiple processors or machines.
namespace  pepdock
 Initial peptide docking.
namespace  pmi
 Python classes to represent, score, sample and analyze models.
namespace  rmf
 Support for the RMF file format for storing hierarchical molecular data and markup.
namespace  rotamer
 Sampling of sidechain rotamers.
namespace  sampcon
 Sampling exhaustiveness protocol.
namespace  saxs
 Support for small angle X-ray scattering (SAXS) data.
namespace  saxs_merge
 A method for merging SAXS profiles using Gaussian processes.
namespace  score_functor
 Composable functors to implement scores via compile-time composition.
namespace  scratch
 A space to add temporary classes while experimenting without forcing you to create your own module.
namespace  spatiotemporal
 Spatialtemporal scoring in IMP.
namespace  spb
 Classes, functions and executables for modeling of the Spindle Pole Body.
namespace  statistics
 Code to compute statistical measures.
namespace  symmetry
 Support for basic symmetry, such as periodic boundary conditions (PBC).
namespace  test
 Support for running tests of IMP functionality.

Classes

struct  AddBoolFlag
struct  AddFloatFlag
struct  AddIntFlag
struct  AddStringFlag
class  AdvancedFlag
 Use this to add an advanced flag to the program. More...
class  ArgumentParser
 IMP-specific subclass of argparse.ArgumentParser. More...
class  Array
 A class to store a fixed array of same-typed values. More...
class  AttributeOptimizer
 Base class for optimizers that act on individual attributes. More...
class  CommandDispatcher
 Allow command line tools to easily implement multiple commands. More...
class  Configuration
 A class to store a configuration of a model. More...
class  ConfigurationSet
 A class to store a set of configurations of a model. More...
class  Constraint
 Implement a constraint on the Model. More...
class  ConstVector
 Store an array of values of the same type. More...
class  Container
 Abstract class for containers of particles. More...
class  CreateLogContext
 Create a new log context. More...
class  Decorator
 Interface to specialized Particle types (e.g. atoms). More...
class  DerivativeAccumulator
 Class for adding derivatives from restraints to the model. More...
struct  EvaluationState
class  EventException
 An exception that signifies some event occurred. More...
class  Exception
 The general base class for IMP exceptions. More...
class  Flag
class  FloatIndex
 A FloatIndex identifies an optimized attribute in a model. More...
class  GeometricPrimitiveD
 Base class for geometric types. More...
class  Index
 A typed index. More...
class  IndexException
 An exception for a request for an invalid member of a container. More...
class  IndexVector
 Implements a vector tied to a particular index of type Index<Tag>. More...
class  InputAdaptor
 Convenience class to accept multiple input types. More...
struct  InternalException
 A general exception for an internal error in IMP. More...
class  IOException
 An input/output exception. More...
class  JAXWarning
 Warning for incomplete JAX support or different behavior of JAX code. More...
class  Key
 A base class for Keys. More...
class  LRUCache
 Implement a simple least recently used cache. More...
class  Memoizer
 Helper class for writing memoizers. More...
class  Model
 Class for storing model, its restraints, constraints, and particles. More...
class  ModelException
 An exception which is thrown when the Model has attributes with invalid values. More...
class  ModelObject
 Base class for objects in a Model that depend on other objects. More...
class  NonCopyable
 Base class for all objects that cannot be copied. More...
class  Object
 Common base class for heavy weight IMP objects. More...
class  Optimizer
 Base class for all optimizers. More...
class  OptimizerState
 Shared optimizer state that is invoked upon commitment of new coordinates. More...
class  PairContainer
 A shared container for Pairs. More...
class  PairContainerAdaptor
class  PairModifier
 A base class for modifiers of ParticlePairsTemp. More...
class  PairPredicate
 Abstract predicate function. More...
class  PairScore
 Abstract class for scoring object(s) of type ParticleIndexPair. More...
class  Particle
 Class to handle individual particles of a Model object. More...
class  ParticleAdaptor
class  ParticleIndexAdaptor
 Take Decorator, Particle or ParticleIndex. More...
class  ParticleIndexesAdaptor
 Take Decorator, Particle or ParticleIndex. More...
class  ParticleIndexPairsAdaptor
 Take ParticlePairs or ParticleIndexPairs. More...
class  ParticleInputs
 Base class for objects that take particle arguments and read from them. More...
class  ParticleOutputs
 Base class for objects that take particle arguments and modify them. More...
struct  Pointer
 A smart pointer to a reference counted object. More...
struct  PointerMember
 A smart pointer to a ref-counted Object that is a class member. More...
class  PythonDirectedGraph
class  QuadContainer
 A shared container for Quads. More...
class  QuadContainerAdaptor
class  QuadModifier
 A base class for modifiers of ParticleQuadsTemp. More...
class  QuadPredicate
 Abstract predicate function. More...
class  QuadScore
 Abstract class for scoring object(s) of type ParticleIndexQuad. More...
class  RAII
 Temporarily change something; undo the change when this object is destroyed. More...
class  Refiner
 Abstract class to implement hierarchical methods. More...
class  Restraint
 A restraint is a term in an IMP ScoringFunction. More...
class  RestraintInfo
 Report key:value information on restraints. More...
class  RestraintsAdaptor
 Provide a consistent interface for things that take Restraints as arguments. More...
class  RestraintSet
 Object used to hold a set of restraints. More...
class  Sampler
 Base class for all samplers. More...
class  SaveToConfigurationSetOptimizerState
class  ScopedAddCacheAttribute
class  ScopedSetAttribute
class  ScoreAccumulator
 Class for adding up scores during ScoringFunction evaluation. More...
class  ScoreState
 ScoreStates maintain invariants in the Model. More...
class  ScoringFunction
 Represents a scoring function on the model. More...
class  ScoringFunctionAdaptor
class  SetCheckState
 A class to change and restore check state. More...
class  SetLogState
 A class to change and restore log state. More...
class  SetLogTarget
 Temporarily set log target. More...
class  SetNumberOfThreads
class  Showable
 Helper class to aid in output of IMP classes to streams. More...
class  SingletonContainer
 A shared container for Singletons. More...
class  SingletonContainerAdaptor
class  SingletonModifier
 A base class for modifiers of ParticlesTemp. More...
class  SingletonPredicate
 Abstract predicate function. More...
class  SingletonScore
 Abstract class for scoring object(s) of type ParticleIndex. More...
class  SparseSymmetricPairMemoizer
class  TextInput
class  TextOutput
class  TripletContainer
 A shared container for Triplets. More...
class  TripletContainerAdaptor
class  TripletModifier
 A base class for modifiers of ParticleTripletsTemp. More...
class  TripletPredicate
 Abstract predicate function. More...
class  TripletScore
 Abstract class for scoring object(s) of type ParticleIndexTriplet. More...
class  TypeException
 An exception for an invalid type being passed to IMP. More...
class  UnaryFunction
 Abstract single variable functor class for score functions. More...
struct  UncheckedWeakPointer
 A weak pointer to an Object or RefCountedObject. More...
class  Undecorator
class  UsageException
 An exception for an invalid usage of IMP. More...
class  Value
 Base class for a simple primitive-like type. More...
class  ValueException
 An exception for an invalid value being passed to IMP. More...
class  Vector
 A more IMP-like version of the std::vector. More...
class  VectorD
 A Cartesian vector in D-dimensions. More...
class  VersionInfo
 Version and module information for Objects. More...
struct  WarningContext
 Warnings with the same key within the context are only output once. More...
struct  WeakPointer
 Smart pointer to Object-derived classes that does not refcount. More...

Typedefs

typedef IMP::Vector< IMP::Pointer< AttributeOptimizer > > AttributeOptimizers
typedef IMP::Vector< IMP::WeakPointer< AttributeOptimizer > > AttributeOptimizersTemp
typedef IMP::Vector< IMP::Pointer< Configuration > > Configurations
typedef IMP::Vector< IMP::Pointer< ConfigurationSet > > ConfigurationSets
typedef IMP::Vector< IMP::WeakPointer< ConfigurationSet > > ConfigurationSetsTemp
typedef IMP::Vector< IMP::WeakPointer< Configuration > > ConfigurationsTemp
typedef IMP::Vector< IMP::Pointer< Constraint > > Constraints
typedef IMP::Vector< IMP::WeakPointer< Constraint > > ConstraintsTemp
typedef IMP::Vector< IMP::Pointer< Container > > Containers
typedef IMP::Vector< IMP::WeakPointer< Container > > ContainersTemp
typedef boost::graph DependencyGraph
 Directed graph on the interactions between the various objects in the model.
typedef DependencyGraph::EdgeNameMap DependencyGraphConstEdgeName
typedef DependencyGraph::VertexNameMap DependencyGraphConstVertexName
typedef DependencyGraph::edge_descriptor DependencyGraphEdge
typedef boost::graph_traits< DependencyGraph > DependencyGraphTraits
typedef DependencyGraph::vertex_descriptor DependencyGraphVertex
typedef IMP::Vector< DerivativeAccumulator > DerivativeAccumulators
typedef std::pair< double, double > DerivativePair
 A pair representing a function value with its first derivative.
typedef IMP::Vector< DerivativePair > DerivativePairs
typedef IMP::Vector< DerivativePairs > DerivativePairss
typedef IMP::Vector< EvaluationState > EvaluationStates
typedef double Float
 Basic floating-point value (could be float, double...).
typedef IMP::Vector< FloatIndex > FloatIndexes
typedef std::pair< double, double > FloatPair
 A generic pair of floats.
typedef IMP::Vector< FloatPair > FloatPairs
typedef IMP::Vector< FloatPairs > FloatPairss
typedef std::pair< Float, Float > FloatRange
 A pair representing the allowed range for a Float attribute.
typedef IMP::Vector< FloatRange > FloatRanges
typedef IMP::Vector< FloatRanges > FloatRangess
typedef IMP::Vector< Float > Floats
 Standard way to pass a bunch of Float values.
typedef IMP::Vector< Floats > FloatsList
 Standard way to pass a bunch of Floats values.
typedef IMP::Vector< FloatsList > FloatsLists
typedef IMP::Vector< Floats > Floatss
typedef int Int
 Basic integer value.
typedef std::pair< Int, Int > IntPair
typedef IMP::Vector< IntPair > IntPairs
typedef IMP::Vector< IntPairs > IntPairss
typedef std::pair< Int, Int > IntRange
typedef IMP::Vector< IntRange > IntRanges
typedef IMP::Vector< IntRanges > IntRangess
typedef IMP::Vector< Int > Ints
 Standard way to pass a bunch of Int values.
typedef IMP::Vector< Ints > IntsList
 Standard way to pass a bunch of Ints values.
typedef IMP::Vector< IntsList > IntsLists
typedef IMP::Vector< Ints > Intss
typedef IMP::Vector< IMP::Pointer< ModelObject > > ModelObjects
typedef IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
typedef Vector< ModelObjectsTemp > ModelObjectsTemps
typedef IMP::Vector< IMP::Pointer< Model > > Models
typedef IMP::Vector< IMP::WeakPointer< Model > > ModelsTemp
typedef IMP::Vector< IMP::Pointer< Object > > Objects
 A list of objects.
typedef IMP::Vector< IMP::WeakPointer< Object > > ObjectsTemp
typedef IMP::Vector< IMP::Pointer< Optimizer > > Optimizers
typedef IMP::Vector< IMP::Pointer< OptimizerState > > OptimizerStates
typedef IMP::Vector< IMP::WeakPointer< OptimizerState > > OptimizerStatesTemp
typedef IMP::Vector< IMP::WeakPointer< Optimizer > > OptimizersTemp
typedef IMP::Vector< IMP::Pointer< PairContainer > > PairContainers
typedef IMP::Vector< IMP::WeakPointer< PairContainer > > PairContainersTemp
typedef IMP::Vector< IMP::Pointer< PairModifier > > PairModifiers
typedef IMP::Vector< IMP::WeakPointer< PairModifier > > PairModifiersTemp
typedef IMP::Vector< IMP::Pointer< PairPredicate > > PairPredicates
typedef IMP::Vector< IMP::WeakPointer< PairPredicate > > PairPredicatesTemp
typedef IMP::Vector< IMP::Pointer< PairScore > > PairScores
typedef IMP::Vector< IMP::WeakPointer< PairScore > > PairScoresTemp
typedef Index< ParticleIndexTag > ParticleIndex
typedef Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
 A list of particles, each identified by its ParticleIndex.
typedef Array< 2, ParticleIndex > ParticleIndexPair
 An ordered pair of particles, each identified by its ParticleIndex.
typedef IMP::Vector< ParticleIndexPair, std::allocator< ParticleIndexPair > > ParticleIndexPairs
typedef Array< 4, ParticleIndex > ParticleIndexQuad
 An ordered quad of particles, each identified by its ParticleIndex.
typedef IMP::Vector< ParticleIndexQuad, std::allocator< ParticleIndexQuad > > ParticleIndexQuads
typedef Array< 3, ParticleIndex > ParticleIndexTriplet
 An ordered triplet of particles, each identified by its ParticleIndex.
typedef IMP::Vector< ParticleIndexTriplet, std::allocator< ParticleIndexTriplet > > ParticleIndexTriplets
typedef Array< 2, WeakPointer< Particle >, Particle * > ParticlePair
typedef IMP::Vector< ParticlePair > ParticlePairsTemp
typedef Array< 4, WeakPointer< Particle >, Particle * > ParticleQuad
typedef IMP::Vector< ParticleQuad > ParticleQuadsTemp
typedef Vector< Pointer< Particle > > Particles
 A list of reference-counted Particle objects.
typedef Vector< WeakPointer< Particle > > ParticlesTemp
typedef Vector< ParticlesTemp > ParticlesTemps
typedef Array< 3, WeakPointer< Particle >, Particle * > ParticleTriplet
typedef IMP::Vector< ParticleTriplet > ParticleTripletsTemp
typedef IMP::Vector< IMP::Pointer< QuadContainer > > QuadContainers
typedef IMP::Vector< IMP::WeakPointer< QuadContainer > > QuadContainersTemp
typedef IMP::Vector< IMP::Pointer< QuadModifier > > QuadModifiers
typedef IMP::Vector< IMP::WeakPointer< QuadModifier > > QuadModifiersTemp
typedef IMP::Vector< IMP::Pointer< QuadPredicate > > QuadPredicates
typedef IMP::Vector< IMP::WeakPointer< QuadPredicate > > QuadPredicatesTemp
typedef IMP::Vector< IMP::Pointer< QuadScore > > QuadScores
typedef IMP::Vector< IMP::WeakPointer< QuadScore > > QuadScoresTemp
typedef IMP::Vector< IMP::Pointer< Refiner > > Refiners
 a collection of Refiner objects
typedef IMP::Vector< IMP::WeakPointer< Refiner > > RefinersTemp
typedef IMP::Vector< IMP::Pointer< Restraint > > Restraints
typedef IMP::Vector< IMP::Pointer< RestraintSet > > RestraintSets
typedef IMP::Vector< IMP::WeakPointer< RestraintSet > > RestraintSetsTemp
typedef IMP::Vector< IMP::WeakPointer< Restraint > > RestraintsTemp
typedef IMP::Vector< IMP::Pointer< Sampler > > Samplers
typedef IMP::Vector< IMP::WeakPointer< Sampler > > SamplersTemp
typedef ScopedSetAttribute< FloatKey, Float > ScopedSetFloatAttribute
typedef IMP::Vector< ScoreAccumulator > ScoreAccumulators
typedef IMP::Vector< IMP::Pointer< ScoreState > > ScoreStates
typedef IMP::Vector< IMP::WeakPointer< ScoreState > > ScoreStatesTemp
typedef IMP::Vector< IMP::Pointer< ScoringFunction > > ScoringFunctions
typedef IMP::Vector< IMP::WeakPointer< ScoringFunction > > ScoringFunctionsTemp
typedef IMP::Vector< SetCheckState > SetCheckStates
typedef IMP::Vector< SetLogState > SetLogStates
typedef IMP::Vector< IMP::Pointer< SingletonContainer > > SingletonContainers
typedef IMP::Vector< IMP::WeakPointer< SingletonContainer > > SingletonContainersTemp
typedef IMP::Vector< IMP::Pointer< SingletonModifier > > SingletonModifiers
typedef IMP::Vector< IMP::WeakPointer< SingletonModifier > > SingletonModifiersTemp
typedef IMP::Vector< IMP::Pointer< SingletonPredicate > > SingletonPredicates
typedef IMP::Vector< IMP::WeakPointer< SingletonPredicate > > SingletonPredicatesTemp
typedef IMP::Vector< IMP::Pointer< SingletonScore > > SingletonScores
typedef IMP::Vector< IMP::WeakPointer< SingletonScore > > SingletonScoresTemp
typedef std::string String
 Basic string value.
typedef IMP::Vector< String > Strings
 Standard way to pass a bunch of String values.
typedef IMP::Vector< Strings > StringsList
 Standard way to pass a bunch of Strings values.
typedef IMP::Vector< StringsList > StringsLists
typedef IMP::Vector< Strings > Stringss
typedef IMP::Vector< TextInput > TextInputs
typedef IMP::Vector< TextOutput > TextOutputs
typedef IMP::Vector< IMP::Pointer< TripletContainer > > TripletContainers
typedef IMP::Vector< IMP::WeakPointer< TripletContainer > > TripletContainersTemp
typedef IMP::Vector< IMP::Pointer< TripletModifier > > TripletModifiers
typedef IMP::Vector< IMP::WeakPointer< TripletModifier > > TripletModifiersTemp
typedef IMP::Vector< IMP::Pointer< TripletPredicate > > TripletPredicates
typedef IMP::Vector< IMP::WeakPointer< TripletPredicate > > TripletPredicatesTemp
typedef IMP::Vector< IMP::Pointer< TripletScore > > TripletScores
typedef IMP::Vector< IMP::WeakPointer< TripletScore > > TripletScoresTemp
typedef IMP::Vector< IMP::Pointer< UnaryFunction > > UnaryFunctions
typedef IMP::Vector< IMP::WeakPointer< UnaryFunction > > UnaryFunctionsTemp
typedef IMP::Vector< IMP::Pointer< Undecorator > > Undecorators
typedef IMP::Vector< IMP::WeakPointer< Undecorator > > UndecoratorsTemp
typedef VectorD< 1 > Vector1D
typedef Vector< VectorD< 1 > > Vector1Ds
typedef VectorD< 2 > Vector2D
typedef Vector< VectorD< 2 > > Vector2Ds
typedef VectorD< 3 > Vector3D
typedef Vector< VectorD< 3 > > Vector3Ds
typedef VectorD< 4 > Vector4D
typedef Vector< VectorD< 4 > > Vector4Ds
typedef VectorD< 5 > Vector5D
typedef Vector< VectorD< 5 > > Vector5Ds
typedef VectorD< 6 > Vector6D
typedef Vector< VectorD< 6 > > Vector6Ds
typedef VectorD<-1 > VectorKD
typedef Vector< VectorD<-1 > > VectorKDs
typedef IMP::Vector< VersionInfo > VersionInfos

Enumerations

enum  CheckLevel { DEFAULT_CHECK = -1 , NONE = 0 , USAGE = 1 , USAGE_AND_INTERNAL = 2 }
 Specify the level of runtime checks performed. More...
enum  LogLevel {
  DEFAULT = -1 , SILENT = 0 , WARNING = 0 + 1 , PROGRESS = 2 ,
  TERSE = 3 , VERBOSE = 4 , MEMORY = 5
}
 The log levels supported by IMP. More...

Functions

 allow_deprecated (allow=True)
 Context manager to temporarily allow (or disallow) deprecated code.
template<int D>
int compare (const VectorD< D > &a, const VectorD< D > &b)
 lexicographic comparison of two vectors
template<class Before, class After>
Constraint * create_constraint (Before *b, After *a, const typename Before::Argument &t, std::string name=std::string())
template<class Before, class After>
Constraint * create_constraint (Before *b, After *a, const typename Before::Argument &t, std::string name=std::string())
Restraints create_decomposition (const RestraintsTemp &rs)
 Return the decomposition of a list of restraints.
ScoringFunctions create_decomposition (ScoringFunction *sf)
template<class Score>
Restraint * create_restraint (const Score *s, const typename Score::Argument &t, std::string name=std::string())
template<class Score, class Container>
Restraint * create_restraint (const Score *s, Container *t, std::string name=std::string())
template<class Score>
Restraint * create_restraint (Score *s, const typename Score::Argument &t, std::string name=std::string())
template<class Score>
Restraint * create_restraint (Score *s, const typename Score::Argument &t, std::string name=std::string())
template<class RestraintType>
ScoringFunction * create_scoring_function (RestraintType *rs, double weight=1.0, double max=NO_MAX, std::string name=std::string())
 Create a ScoringFunction on a single restraint.
TextOutput create_temporary_file (std::string prefix="imp_temp", std::string suffix="")
 Create a temporary file. The path can be extracted from the TextOutput.
std::string create_temporary_file_name (std::string prefix="imp_temp", std::string suffix="")
 Create a temporary file.
 deprecated_function (version, help_message)
 Python decorator to mark a function as deprecated.
 deprecated_method (version, help_message)
 Python decorator to mark a method as deprecated.
 deprecated_module (version, module, help_message)
 Mark a Python module as deprecated.
 deprecated_object (version, help_message)
 Python decorator to mark a class as deprecated.
std::string get_absolute_path (std::string file)
 Convert a possibly relative path to an absolute path.
template<class Tag>
unsigned int get_as_unsigned_int (Index< Tag > i)
template<int D>
VectorD< D > get_basis_vector_d (unsigned int coordinate)
 Return the basis vector for the given coordinate.
template<>
VectorD<-1 > get_basis_vector_kd (int D, unsigned int coordinate)
 Return a dynamically sized basis vector.
template<int D>
VectorD< D > get_basis_vector_kd (int Di, unsigned int coordinate)
 Return the basis vector for the given coordinate.
std::string get_copyright ()
 Get the IMP copyright notice.
DependencyGraph get_dependency_graph (Model *m)
ParticlesTemp get_dependent_particles (ModelObject *p, const ModelObjectsTemp &all, const DependencyGraph &dg, const DependencyGraphVertexIndex &index)
bool get_deprecation_exceptions ()
 Get whether an exception is thrown when a deprecated method is used.
template<int D>
double get_distance (const VectorD< D > &v1, const VectorD< D > &v2)
 Compute the distance between two vectors.
template<int D>
VectorD< D > get_elementwise_product (const Ints &a, const VectorD< D > &b)
 Return the vector that is the elementwise product of the two.
template<int D>
VectorD< D > get_elementwise_product (const VectorD< D > &a, const VectorD< D > &b)
 Return the vector that is the elementwise product of the two.
ParticleIndexPairs get_indexes (const ParticlePairsTemp &ps)
 Get the indexes from a list of particle pairs.
ParticleIndexes get_indexes (const ParticlesTemp &ps)
 Get the indexes from a list of particles.
template<class Tag>
Index< Tag > get_invalid_index ()
bool get_is_quick_test ()
Strings get_live_object_names ()
 Return the names of all live objects.
Objects get_live_objects ()
 Return pointers to all live objects.
TextOutput get_log_target ()
template<int D>
VectorD< D > get_ones_vector_d (double v=1)
 Return a vector of ones (or another constant).
template<>
VectorD<-1 > get_ones_vector_kd (unsigned int D, double v)
 Return a vector of ones (or another constant).
template<int D>
VectorD< D > get_ones_vector_kd (unsigned int Di, double v=1)
 Return a vector of ones (or another constant).
ParticlesTemp get_particles (Model *m, const ParticleIndexes &ps)
 Get the particles from a list of indexes.
DependencyGraph get_pruned_dependency_graph (Model *m)
double get_random_double_uniform ()
 Return a uniformly distributed double number in range [0..1).
double get_random_double_uniform (double min, double max)
 Return a uniformly distributed double number in range [min..max).
float get_random_float_uniform ()
 Return a uniformly distributed float number in range [0..1).
float get_random_float_uniform (float min, float max)
 Return a uniformly distributed float number in range [min..max).
template<typename RealType>
void get_random_numbers_normal (Vector< RealType > &v, unsigned int n, RealType mean=0.0, RealType stddev=1.0)
 Fill the double array with random normally distributed values.
template<typename RealType>
void get_random_numbers_uniform (Vector< RealType > &v, unsigned int n)
 Fill the float array with random uniformly distributed values.
boost::uint64_t get_random_seed ()
 Return the initial random seed.
std::string get_relative_path (std::string base, std::string relative)
 Return a path to a file relative to another file.
ScoreStatesTemp get_required_score_states (const ModelObjectsTemp &mos, ScoreStatesTemp exclude=ScoreStatesTemp())
 Compute the set of score states required by the passed ModelObjects.
ScoreStatesTemp get_required_score_states (ModelObject *p, const ModelObjectsTemp &all, const DependencyGraph &dg, const DependencyGraphVertexIndex &index)
template<int D>
double get_squared_distance (const VectorD< D > &v1, const VectorD< D > &v2)
 Compute the squared distance between two vectors.
std::string get_unique_name (std::string templ)
 Return a unique name produced from the string.
ScoreStatesTemp get_update_order (ScoreStatesTemp input)
ScoreStatesTemp get_update_order (std::set< ScoreState * > input)
template<class C>
const VectorD< C::DIMENSION > & get_vector_geometry (const C &g)
const algebra::Vector3D & get_vector_geometry (Decorator d)
const algebra::Vector3D & get_vector_geometry (Particle *p)
const algebra::Vector3D & get_vector_geometry (Pointer< Particle > d)
const algebra::Vector3D & get_vector_geometry (WeakPointer< Particle > d)
DependencyGraphVertexIndex get_vertex_index (const DependencyGraph &g)
template<int D>
VectorD< D > get_zero_vector_d ()
 Return a vector of zeros.
template<>
VectorD<-1 > get_zero_vector_kd (int D)
 Return a dynamically sized vector of zeros.
template<int D>
VectorD< D > get_zero_vector_kd (int Di)
 Return a dynamically sized vector of zeros.
void handle_use_deprecated (std::string message)
 Break in this method in gdb to find deprecated uses at runtime.
std::size_t hash_value (bool d)
template<class T, class Allocator>
std::size_t hash_value (const __gnu_debug::vector< T, Allocator > &t)
template<class T>
std::size_t hash_value (const std::set< T > &t)
std::size_t hash_value (const std::string &d)
template<class T>
std::size_t hash_value (const std::vector< T > &t)
template<class T>
std::size_t hash_value (const T &t)
std::size_t hash_value (double d)
std::size_t hash_value (int d)
template<class T>
bool isinf (const T &a)
 Return true if a number is infinite.
template<class T>
bool isnan (const T &a)
 Return true if a number is NaN.
template<class Pred>
internal::PredicateEquals< Pred, true > make_predicate_equal (const Pred *p, Model *m, int value)
 Return a functor that returns true when the predicate has a certain value.
template<class Pred>
internal::PredicateEquals< Pred, false > make_predicate_not_equal (const Pred *p, Model *m, int value)
template<class O>
O * object_cast (Object *o)
 Up (or down) cast an IMP Object-derived class.
template<int D>
VectorD< D > operator* (double s, VectorD< D > o)
std::ostream & operator<< (std::ostream &out, const Showable &s)
template<class Tag, class Container, class T>
void resize_to_fit (Container &v, Index< Tag > i, const T &default_value=T())
void set_deprecation_exceptions (bool tf)
 Toggle whether an exception is thrown when a deprecated method is used.
void set_deprecation_warnings (bool tf)
 Toggle printing of warnings on using deprecated classes.
void set_log_target (TextOutput l)
 Set the target for the log.
void set_show_leaked_objects (bool tf)
 Set whether to complain about objects not being properly cleaned up.
template<class C, class E>
void set_vector_geometry (C &g, const E &v)
void set_vector_geometry (Decorator d, const algebra::Vector3D &v)
void set_vector_geometry (Particle *p, const algebra::Vector3D &v)
void set_vector_geometry (Pointer< Particle > d, const algebra::Vector3D &v)
void set_vector_geometry (WeakPointer< Particle > d, const algebra::Vector3D &v)
void show_as_graphviz (const DependencyGraph &name, TextOutput out)
void show_restraint_hierarchy (ScoringFunctionAdaptor rs, std::ostream &out=std::cout)
 Print the hierarchy of restraints.
template<class A>
void swap (ConstVector< A > &a, ConstVector< A > &b)
void write_help (std::ostream &out=std::cerr)

Variables

const double BAD_SCORE
const double NO_MAX
 Use this value when you want to turn off maximum for restraint evaluation.
RandomNumberGenerator random_number_generator
 A shared non-GPU random number generator.

Attribute Keys

Each type of attribute has an associated type of key. The keys can be constructed from a string. Such construction can be expensive and so the resulting keys should be cached.

typedef Key< 0 > FloatKey
 The type used to identify float attributes in the Particles.
typedef IMP::Vector< FloatKey > FloatKeys
typedef Key< 1 > IntKey
 The type used to identify int attributes in the Particles.
typedef IMP::Vector< IntKey > IntKeys
typedef Key< 2 > StringKey
 The type used to identify string attributes in the Particles.
typedef IMP::Vector< StringKey > StringKeys
typedef Key< 3 > ParticleIndexKey
 The type used to identify a particle attribute in the Particles.
typedef IMP::Vector< ParticleIndexKey > ParticleIndexKeys
typedef Key< 4 > ObjectKey
 The type used to identify an Object attribute.
typedef IMP::Vector< ObjectKey > ObjectKeys
typedef Key< 9 > WeakObjectKey
 The type used to identify a non-ref counted Object attribute.
typedef IMP::Vector< WeakObjectKey > WeakObjectKeys
typedef Key< 5 > IntsKey
 The type used to identify int attributes in the Particles.
typedef IMP::Vector< IntsKey > IntsKeys
typedef Key< 10 > FloatsKey
 The type used to identify float vector attributes in the Particles.
typedef IMP::Vector< FloatsKey > FloatsKeys
typedef Key< 6 > ParticleIndexesKey
 The type used to identify a particle attribute in the Particles.
typedef IMP::Vector< ParticleIndexesKey > ParticleIndexesKeys
typedef Key< 7 > ObjectsKey
 The type used to identify a particle attribute in the Particles.
typedef IMP::Vector< ObjectsKey > ObjectsKeys
typedef Key< 8 > ModelKey
 The type used to identify data stored directly in the model.
typedef IMP::Vector< ModelKey > ModelKeys
typedef Key< 11 > TriggerKey
 The type used to identify changed model properties.
typedef IMP::Vector< TriggerKey > TriggerKeys
typedef Key< 12 > SparseStringKey
 The type used to identify sparse string attributes in the Particles.
typedef IMP::Vector< SparseStringKey > SparseStringKeys
typedef Key< 13 > SparseIntKey
 The type used to identify sparse int attributes in the Particles.
typedef IMP::Vector< SparseIntKey > SparseIntKeys
typedef Key< 14 > SparseFloatKey
 The type used to identify sparse float attributes in the Particles.
typedef IMP::Vector< SparseFloatKey > SparseFloatKeys
typedef Key< 15 > SparseParticleIndexKey
 The type used to identify sparse particle attributes in the Particles.
typedef IMP::Vector< SparseParticleIndexKey > SparseParticleIndexKeys
typedef Key< 16 > Vector3DKey
 The type used to identify 3D vector attributes in the Particles.
typedef IMP::Vector< Vector3DKey > Vector3DKeys
typedef Key< 17 > Vector3DDerivKey
 The type used to identify 3D vector attributes&derivatives in the Particles.
typedef IMP::Vector< Vector3DDerivKey > Vector3DDerivKeys
typedef Key< 18 > Vector4DKey
 The type used to identify 4D vector attributes in the Particles.
typedef IMP::Vector< Vector4DKey > Vector4DKeys
typedef Key< 19 > Vector4DDerivKey
 The type used to identify 4D vector attributes&derivatives in the Particles.
typedef IMP::Vector< Vector4DDerivKey > Vector4DDerivKeys

Error checking and reporting

By default IMP performs a variety of runtime error checks. These can be controlled using the IMP::set_check_level function. Call IMP::set_check_level with IMP::NONE to disable all checks when you are performing your optimization as opposed to testing your code. Make sure you run your code with the level set to at least USAGE before running your final optimization to make sure that IMP is used correctly.

Error handling is provided by IMP/exception.h,

Use the gdbinit file provided in tools to automatically have gdb break when IMP errors are detected.

void set_check_level (CheckLevel tf)
 Control runtime checks in the code.
CheckLevel get_check_level ()
 Get the current audit mode.
void handle_error (const char *msg)

Flags

These methods add support for shared command line flags to IMP. Programs that use this have access to flags declared in modules which allow users to do things like control log level and turn on and off profiling to see what is going on. These functions are Python accessible.

In C++, you can also use the AddFloatFlag, AddStringFlag, AddBoolFlag and AddIntFlag classes to add flags statically.

std::string get_executable_name ()
 Return the name of the current executable.
void setup_from_argv (int argc, char **argv, std::string description)
 Parse the command line flags and return the positional arguments.
Strings setup_from_argv_allowing_unknown (int argc, char **argv, std::string description)
Strings setup_from_argv (int argc, char **argv, std::string description, std::string positional_description, int num_positional)
void setup_from_argv (const Strings &argv, std::string description)
Strings setup_from_argv (const Strings &argv, std::string description, std::string positional_description, int num_positional)
void add_string_flag (std::string name, std::string default_value, std::string description)
std::string get_string_flag (std::string name)
void add_int_flag (std::string name, size_t default_value, std::string description)
size_t get_int_flag (std::string name)
void add_bool_flag (std::string name, std::string description)
bool get_bool_flag (std::string name)
void add_float_flag (std::string name, double default_value, std::string description)
double get_float_flag (std::string name)

Inputs and outputs

These methods recursively find all inputs or outputs of a given type.

If you don't want recursive, use the non input/output variants.

ParticlesTemp get_input_particles (const ModelObjectsTemp &mos)
 Return all the input particles for a given ModelObject.
ContainersTemp get_input_containers (const ModelObjectsTemp &mos)
 Return all the input particles for a given ModelObject.
ParticlesTemp get_output_particles (const ModelObjectsTemp &mos)
 Return all the output particles for a given ModelObject.
ContainersTemp get_output_containers (const ModelObjectsTemp &mos)
 Return all the output particles for a given ModelObject.

Buffer I/O

Write/read the state of the particles to/from a buffer in memory.

Note
Not all particles need to have all the attributes, missing attributes will be skipped. However, the set of attributes must match on the write and read particles.
There is no handling of architectural issues. That is, this is only guaranteed to work if it is read and written on the same operating system and system bit length. We could probably fix this.
both these methods should be considered unstable.
Vector< char > write_particles_to_buffer (const ParticlesTemp &particles, const FloatKeys &keys)
 return a binary buffer with the data
void read_particles_from_buffer (const Vector< char > &buffer, const ParticlesTemp &particles, const FloatKeys &keys)
 load found attributes into the particles

Standard module functions

All IMP modules have a set of standard functions to help get information about the module and about files associated with the module.

std::string get_module_version ()
std::string get_module_name ()
std::string get_data_path (std::string file_name)
 Return the full path to one of this module's data files.
std::string get_example_path (std::string file_name)
 Return the full path to one of this module's example files.

Logging

IMP provides tools for controlling the amount of log output produced and directing it to the terminal or a file. Only log messages tagged with a lower level than the current LogLevel are emitted. In addition to a global log level (get_log_level(), set_log_level()), each IMP::Object has an internal log level (IMP::Object::get_log_level(), IMP::Object::set_log_level()) which is used when executing code on that object.

Logging is provided by IMP/log.h.

People implementing IMP::Object classes should also see IMP_OBJECT_LOG() and IMP::SetLogState.

All logging is disabled when IMP is built using build='fast'.

void add_to_log (LogLevel level, std::string to_write)
 Write a string to the log, for Python.
void set_log_level (LogLevel l)
 Set the current global log level.
void set_log_timer (bool tb)
 Set whether log messages are tagged with the current log time.
void reset_log_timer ()
 Reset the log timer.
LogLevel get_log_level ()
 Get the currently active global log level.

Create a progress bar in the terminal

void set_progress_display (std::string description, unsigned int steps)
 Set up the progress bar with the passed description.
void add_to_progress_display (unsigned int step=1)
 Set the current progress.

Python Only

The following functions are only available in Python.

void show_altgraph (Graph g)
networkx::DiGraph get_networkx_graph (Graph g)
std::string show_graphviz (Graph g)

Gathering restraints

It is sometimes useful to extract all the non-RestraintSet restraints from a hierarchy involving RestraintSets mixed with Restraints.

RestraintsTemp get_restraints (const RestraintsTemp &rs)
template<class It>
RestraintsTemp get_restraints (It b, It e)

Number of threads

Get and set the default number of threads to use in IMP.

unsigned int get_number_of_threads ()
void set_number_of_threads (unsigned int n)

3D Vectors

We provide a specialization of VectorD for 3-space and several additional functions on it.

Vector3D get_vector_product (const Vector3D &p1, const Vector3D &p2)
 Return the vector product (cross product) of two vectors.
Vector3D get_orthogonal_vector (const Vector3D &v)
 Return a vector that is perpendicular to the given vector.
Vector3D get_centroid (const Vector3Ds &ps)
 Return the centroid of a set of vectors.
double get_radius_of_gyration (const Vector3Ds &ps)
 Return the radius of gyration of a set of points.

Norms

We define a number of standard, \(L^p\), norms on VectorD.

  • \(L^1\) is the Manhattan distance, the sum of the components
  • \(L^2\) is the standard Euclidean length
  • \(L^{\inf}\) is the maximum of the components
template<int D>
double get_l2_norm (const VectorD< D > &v)
template<int D>
double get_l1_norm (const VectorD< D > &v)
template<int D>
double get_linf_norm (const VectorD< D > &v)

Typedef Documentation

◆ AttributeOptimizers

A vector of reference-counting object pointers.

Definition at line 132 of file AttributeOptimizer.h.

◆ AttributeOptimizersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
AttributeOptimizer

Definition at line 132 of file AttributeOptimizer.h.

◆ Configurations

A vector of reference-counting object pointers.

Definition at line 81 of file Configuration.h.

◆ ConfigurationSets

A vector of reference-counting object pointers.

Definition at line 46 of file ConfigurationSet.h.

◆ ConfigurationSetsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
ConfigurationSet

Definition at line 46 of file ConfigurationSet.h.

◆ ConfigurationsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Configuration

Definition at line 81 of file Configuration.h.

◆ Constraints

A vector of reference-counting object pointers.

Definition at line 63 of file Constraint.h.

◆ ConstraintsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Constraint

Definition at line 63 of file Constraint.h.

◆ Containers

A vector of reference-counting object pointers.

Definition at line 134 of file base_types.h.

◆ ContainersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Container

Definition at line 134 of file base_types.h.

◆ DependencyGraph

typedef boost::graph IMP::DependencyGraph

Directed graph on the interactions between the various objects in the model.

The vertices are named by the associated Object*. There is an edge from a to b, if a is an input to b. For example, there is an edge from a particle to a restraint if the restraint directly reads the particle.

See Dependencies for more information about dependencies. See Graphs in IMP for more information.

Definition at line 35 of file dependency_graph.h.

◆ DependencyGraphConstEdgeName

typedef DependencyGraph::EdgeNameMap IMP::DependencyGraphConstEdgeName

Definition at line 35 of file dependency_graph.h.

◆ DependencyGraphConstVertexName

typedef DependencyGraph::VertexNameMap IMP::DependencyGraphConstVertexName

Definition at line 35 of file dependency_graph.h.

◆ DependencyGraphEdge

typedef DependencyGraph::edge_descriptor IMP::DependencyGraphEdge

Definition at line 35 of file dependency_graph.h.

◆ DependencyGraphTraits

typedef boost::graph_traits<DependencyGraph> IMP::DependencyGraphTraits

Definition at line 35 of file dependency_graph.h.

◆ DependencyGraphVertex

typedef DependencyGraph::vertex_descriptor IMP::DependencyGraphVertex

Definition at line 35 of file dependency_graph.h.

◆ DerivativeAccumulators

◆ DerivativePair

typedef std::pair<double, double> IMP::DerivativePair

A pair representing a function value with its first derivative.

Definition at line 22 of file types.h.

◆ DerivativePairs

Pass or store a set of DerivativePair.

Definition at line 23 of file types.h.

◆ DerivativePairss

Pass or store a set of DerivativePairs.

Definition at line 23 of file types.h.

◆ EvaluationStates

Pass or store a set of EvaluationState.

Definition at line 43 of file ScoreAccumulator.h.

◆ Float

typedef double IMP::Float

Basic floating-point value (could be float, double...).

Definition at line 19 of file types.h.

◆ FloatIndexes

Pass or store a set of FloatIndex.

Definition at line 53 of file FloatIndex.h.

◆ FloatKey

typedef Key<0> IMP::FloatKey

The type used to identify float attributes in the Particles.

Definition at line 32 of file base_types.h.

◆ FloatKeys

Pass or store a set of FloatKey.

Definition at line 33 of file base_types.h.

◆ FloatPair

typedef std::pair<double, double> IMP::FloatPair

A generic pair of floats.

Definition at line 26 of file types.h.

◆ FloatPairs

Pass or store a set of FloatPair.

Definition at line 27 of file types.h.

◆ FloatPairss

Pass or store a set of FloatPairs.

Definition at line 27 of file types.h.

◆ FloatRange

typedef std::pair<Float, Float> IMP::FloatRange

A pair representing the allowed range for a Float attribute.

Definition at line 30 of file types.h.

◆ FloatRanges

Pass or store a set of FloatRange.

Definition at line 31 of file types.h.

◆ FloatRangess

Pass or store a set of FloatRanges.

Definition at line 31 of file types.h.

◆ Floats

Standard way to pass a bunch of Float values.

Pass or store a set of Float.

Definition at line 46 of file types.h.

◆ FloatsKey

typedef Key<10> IMP::FloatsKey

The type used to identify float vector attributes in the Particles.

Definition at line 60 of file base_types.h.

◆ FloatsKeys

Pass or store a set of FloatsKey.

Definition at line 61 of file base_types.h.

◆ FloatsList

Standard way to pass a bunch of Floats values.

Pass or store a set of Floats.

Definition at line 53 of file types.h.

◆ FloatsLists

Pass or store a set of FloatsList.

Definition at line 53 of file types.h.

◆ Floatss

Pass or store a set of Floats.

Definition at line 46 of file types.h.

◆ Int

typedef int IMP::Int

Basic integer value.

Definition at line 34 of file types.h.

◆ IntKey

typedef Key<1> IMP::IntKey

The type used to identify int attributes in the Particles.

Definition at line 36 of file base_types.h.

◆ IntKeys

Pass or store a set of IntKey.

Definition at line 37 of file base_types.h.

◆ IntPair

typedef std::pair<Int, Int> IMP::IntPair

Definition at line 39 of file types.h.

◆ IntPairs

typedef IMP::Vector<IntPair> IMP::IntPairs

Pass or store a set of IntPair.

Definition at line 40 of file types.h.

◆ IntPairss

Pass or store a set of IntPairs.

Definition at line 40 of file types.h.

◆ IntRange

typedef std::pair<Int, Int> IMP::IntRange

Definition at line 36 of file types.h.

◆ IntRanges

typedef IMP::Vector<IntRange> IMP::IntRanges

Pass or store a set of IntRange.

Definition at line 37 of file types.h.

◆ IntRangess

Pass or store a set of IntRanges.

Definition at line 37 of file types.h.

◆ Ints

Standard way to pass a bunch of Int values.

Pass or store a set of Int.

Definition at line 48 of file types.h.

◆ IntsKey

typedef Key<5> IMP::IntsKey

The type used to identify int attributes in the Particles.

Definition at line 56 of file base_types.h.

◆ IntsKeys

Pass or store a set of IntsKey.

Definition at line 57 of file base_types.h.

◆ IntsList

Standard way to pass a bunch of Ints values.

Pass or store a set of Ints.

Definition at line 55 of file types.h.

◆ IntsLists

Pass or store a set of IntsList.

Definition at line 55 of file types.h.

◆ Intss

Pass or store a set of Ints.

Definition at line 48 of file types.h.

◆ ModelKey

typedef Key<8> IMP::ModelKey

The type used to identify data stored directly in the model.

Definition at line 78 of file base_types.h.

◆ ModelKeys

Pass or store a set of ModelKey.

Definition at line 79 of file base_types.h.

◆ ModelObjects

A vector of reference-counting object pointers.

Definition at line 122 of file base_types.h.

◆ ModelObjectsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
ModelObject

Definition at line 122 of file base_types.h.

◆ ModelObjectsTemps

typedef Vector<ModelObjectsTemp> IMP::ModelObjectsTemps

Definition at line 123 of file base_types.h.

◆ Models

A vector of reference-counting object pointers.

Definition at line 126 of file base_types.h.

◆ ModelsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Model

Definition at line 126 of file base_types.h.

◆ ObjectKey

typedef Key<4> IMP::ObjectKey

The type used to identify an Object attribute.

Definition at line 48 of file base_types.h.

◆ ObjectKeys

Pass or store a set of ObjectKey.

Definition at line 49 of file base_types.h.

◆ Objects

A list of objects.

A vector of reference-counting object pointers.

Definition at line 61 of file types.h.

◆ ObjectsKey

typedef Key<7> IMP::ObjectsKey

The type used to identify a particle attribute in the Particles.

Definition at line 74 of file base_types.h.

◆ ObjectsKeys

Pass or store a set of ObjectsKey.

Definition at line 75 of file base_types.h.

◆ ObjectsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Object

Definition at line 61 of file types.h.

◆ Optimizers

A vector of reference-counting object pointers.

Definition at line 145 of file Optimizer.h.

◆ OptimizerStates

A vector of reference-counting object pointers.

Definition at line 142 of file base_types.h.

◆ OptimizerStatesTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
OptimizerState

Definition at line 142 of file base_types.h.

◆ OptimizersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Optimizer

Definition at line 145 of file Optimizer.h.

◆ PairContainers

A vector of reference-counting object pointers.

Definition at line 146 of file base_types.h.

◆ PairContainersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
PairContainer

Definition at line 146 of file base_types.h.

◆ PairModifiers

A vector of reference-counting object pointers.

Definition at line 173 of file base_types.h.

◆ PairModifiersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
PairModifier

Definition at line 173 of file base_types.h.

◆ PairPredicates

A vector of reference-counting object pointers.

Definition at line 164 of file base_types.h.

◆ PairPredicatesTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
PairPredicate

Definition at line 164 of file base_types.h.

◆ PairScores

A vector of reference-counting object pointers.

Definition at line 155 of file base_types.h.

◆ PairScoresTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
PairScore

Definition at line 155 of file base_types.h.

◆ ParticleIndex

typedef Index<ParticleIndexTag> IMP::ParticleIndex

A unique identifier for a particle within a Model. Use it to identify particles when getting and setting attributes and constructing decorators.

See for example, Model attributes, Decorator, and Model::get_particle().

Examples
atom/dope_and_excluded_volume.cpp, and core/simple.cpp.

Definition at line 196 of file base_types.h.

◆ ParticleIndexes

A list of particles, each identified by its ParticleIndex.

Examples
atom/dope_and_excluded_volume.cpp.

Definition at line 199 of file base_types.h.

◆ ParticleIndexesKey

The type used to identify a particle attribute in the Particles.

Definition at line 64 of file base_types.h.

◆ ParticleIndexesKeys

Pass or store a set of ParticleIndexesKey.

Definition at line 65 of file base_types.h.

◆ ParticleIndexKey

The type used to identify a particle attribute in the Particles.

Definition at line 44 of file base_types.h.

◆ ParticleIndexKeys

Pass or store a set of ParticleIndexKey.

Definition at line 45 of file base_types.h.

◆ ParticleIndexPair

An ordered pair of particles, each identified by its ParticleIndex.

Examples
atom/dope_and_excluded_volume.cpp.

Definition at line 202 of file base_types.h.

◆ ParticleIndexPairs

Pass or store a set of ParticleIndexPair using CUDA unified memory.

Examples
atom/dope_and_excluded_volume.cpp.

Definition at line 208 of file base_types.h.

◆ ParticleIndexQuad

An ordered quad of particles, each identified by its ParticleIndex.

Definition at line 206 of file base_types.h.

◆ ParticleIndexQuads

Pass or store a set of ParticleIndexQuad using CUDA unified memory.

Definition at line 210 of file base_types.h.

◆ ParticleIndexTriplet

An ordered triplet of particles, each identified by its ParticleIndex.

Definition at line 204 of file base_types.h.

◆ ParticleIndexTriplets

Pass or store a set of ParticleIndexTriplet using CUDA unified memory.

Definition at line 209 of file base_types.h.

◆ ParticlePair

An ordered pair of particles.

Definition at line 180 of file base_types.h.

◆ ParticlePairsTemp

Pass or store a set of ParticlePair.

Definition at line 181 of file base_types.h.

◆ ParticleQuad

An ordered quad of particles.

Definition at line 186 of file base_types.h.

◆ ParticleQuadsTemp

Pass or store a set of ParticleQuad.

Definition at line 187 of file base_types.h.

◆ Particles

A list of reference-counted Particle objects.

In most cases it is more efficient to use ParticleIndexes instead.

Definition at line 138 of file base_types.h.

◆ ParticlesTemp

typedef Vector<WeakPointer<Particle> > IMP::ParticlesTemp

Definition at line 139 of file base_types.h.

◆ ParticlesTemps

typedef Vector<ParticlesTemp> IMP::ParticlesTemps

Definition at line 140 of file base_types.h.

◆ ParticleTriplet

An ordered triplet of particles.

Definition at line 183 of file base_types.h.

◆ ParticleTripletsTemp

Pass or store a set of ParticleTriplet.

Definition at line 184 of file base_types.h.

◆ QuadContainers

A vector of reference-counting object pointers.

Definition at line 150 of file base_types.h.

◆ QuadContainersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
QuadContainer

Definition at line 150 of file base_types.h.

◆ QuadModifiers

A vector of reference-counting object pointers.

Definition at line 177 of file base_types.h.

◆ QuadModifiersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
QuadModifier

Definition at line 177 of file base_types.h.

◆ QuadPredicates

A vector of reference-counting object pointers.

Definition at line 168 of file base_types.h.

◆ QuadPredicatesTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
QuadPredicate

Definition at line 168 of file base_types.h.

◆ QuadScores

A vector of reference-counting object pointers.

Definition at line 159 of file base_types.h.

◆ QuadScoresTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
QuadScore

Definition at line 159 of file base_types.h.

◆ Refiners

a collection of Refiner objects

A vector of reference-counting object pointers.

Definition at line 131 of file Refiner.h.

◆ RefinersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Refiner

Definition at line 131 of file Refiner.h.

◆ Restraints

A vector of reference-counting object pointers.

Definition at line 120 of file base_types.h.

◆ RestraintSets

A vector of reference-counting object pointers.

Definition at line 128 of file base_types.h.

◆ RestraintSetsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
RestraintSet

Definition at line 128 of file base_types.h.

◆ RestraintsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Restraint

Definition at line 120 of file base_types.h.

◆ Samplers

A vector of reference-counting object pointers.

Definition at line 64 of file Sampler.h.

◆ SamplersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Sampler

Definition at line 64 of file Sampler.h.

◆ ScopedSetFloatAttribute

typedef ScopedSetAttribute<FloatKey, Float> IMP::ScopedSetFloatAttribute

Definition at line 79 of file scoped.h.

◆ ScoreAccumulators

Pass or store a set of ScoreAccumulator.

Definition at line 144 of file ScoreAccumulator.h.

◆ ScoreStates

A vector of reference-counting object pointers.

Definition at line 130 of file base_types.h.

◆ ScoreStatesTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
ScoreState

Definition at line 130 of file base_types.h.

◆ ScoringFunctions

A vector of reference-counting object pointers.

Definition at line 132 of file base_types.h.

◆ ScoringFunctionsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
ScoringFunction

Definition at line 132 of file base_types.h.

◆ SetCheckStates

Pass or store a set of SetCheckState.

Definition at line 54 of file SetCheckState.h.

◆ SetLogStates

Pass or store a set of SetLogState.

Definition at line 53 of file SetLogState.h.

◆ SingletonContainers

A vector of reference-counting object pointers.

Definition at line 144 of file base_types.h.

◆ SingletonContainersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
SingletonContainer

Definition at line 144 of file base_types.h.

◆ SingletonModifiers

A vector of reference-counting object pointers.

Definition at line 171 of file base_types.h.

◆ SingletonModifiersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
SingletonModifier

Definition at line 171 of file base_types.h.

◆ SingletonPredicates

A vector of reference-counting object pointers.

Definition at line 162 of file base_types.h.

◆ SingletonPredicatesTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
SingletonPredicate

Definition at line 162 of file base_types.h.

◆ SingletonScores

A vector of reference-counting object pointers.

Definition at line 153 of file base_types.h.

◆ SingletonScoresTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
SingletonScore

Definition at line 153 of file base_types.h.

◆ SparseFloatKey

typedef Key<14> IMP::SparseFloatKey

The type used to identify sparse float attributes in the Particles.

Definition at line 94 of file base_types.h.

◆ SparseFloatKeys

Pass or store a set of SparseFloatKey.

Definition at line 95 of file base_types.h.

◆ SparseIntKey

typedef Key<13> IMP::SparseIntKey

The type used to identify sparse int attributes in the Particles.

Definition at line 90 of file base_types.h.

◆ SparseIntKeys

Pass or store a set of SparseIntKey.

Definition at line 91 of file base_types.h.

◆ SparseParticleIndexKey

The type used to identify sparse particle attributes in the Particles.

Definition at line 98 of file base_types.h.

◆ SparseParticleIndexKeys

Pass or store a set of SparseParticleIndexKey.

Definition at line 99 of file base_types.h.

◆ SparseStringKey

The type used to identify sparse string attributes in the Particles.

Definition at line 86 of file base_types.h.

◆ SparseStringKeys

Pass or store a set of SparseStringKey.

Definition at line 87 of file base_types.h.

◆ String

typedef std::string IMP::String

Basic string value.

Definition at line 43 of file types.h.

◆ StringKey

typedef Key<2> IMP::StringKey

The type used to identify string attributes in the Particles.

Definition at line 40 of file base_types.h.

◆ StringKeys

Pass or store a set of StringKey.

Definition at line 41 of file base_types.h.

◆ Strings

Standard way to pass a bunch of String values.

Pass or store a set of String.

Definition at line 50 of file types.h.

◆ StringsList

Standard way to pass a bunch of Strings values.

Pass or store a set of Strings.

Definition at line 57 of file types.h.

◆ StringsLists

Pass or store a set of StringsList.

Definition at line 57 of file types.h.

◆ Stringss

Pass or store a set of Strings.

Definition at line 50 of file types.h.

◆ TextInputs

Pass or store a set of TextInput.

Definition at line 159 of file file.h.

◆ TextOutputs

Pass or store a set of TextOutput.

Definition at line 160 of file file.h.

◆ TriggerKey

typedef Key<11> IMP::TriggerKey

The type used to identify changed model properties.

Definition at line 82 of file base_types.h.

◆ TriggerKeys

Pass or store a set of TriggerKey.

Definition at line 83 of file base_types.h.

◆ TripletContainers

A vector of reference-counting object pointers.

Definition at line 148 of file base_types.h.

◆ TripletContainersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
TripletContainer

Definition at line 148 of file base_types.h.

◆ TripletModifiers

A vector of reference-counting object pointers.

Definition at line 175 of file base_types.h.

◆ TripletModifiersTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
TripletModifier

Definition at line 175 of file base_types.h.

◆ TripletPredicates

A vector of reference-counting object pointers.

Definition at line 166 of file base_types.h.

◆ TripletPredicatesTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
TripletPredicate

Definition at line 166 of file base_types.h.

◆ TripletScores

A vector of reference-counting object pointers.

Definition at line 157 of file base_types.h.

◆ TripletScoresTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
TripletScore

Definition at line 157 of file base_types.h.

◆ UnaryFunctions

A vector of reference-counting object pointers.

Definition at line 65 of file UnaryFunction.h.

◆ UnaryFunctionsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
UnaryFunction

Definition at line 65 of file UnaryFunction.h.

◆ Undecorators

A vector of reference-counting object pointers.

Definition at line 33 of file Undecorator.h.

◆ UndecoratorsTemp

A vector of weak (non reference-counting) pointers to specified objects.

See also
Undecorator

Definition at line 33 of file Undecorator.h.

◆ Vector1D

typedef VectorD<1> IMP::Vector1D

1D vector typedef for swig

Definition at line 399 of file VectorD.h.

◆ Vector1Ds

1D vectors typedef for swig

Definition at line 401 of file VectorD.h.

◆ Vector2D

typedef VectorD<2> IMP::Vector2D

2D vector typedef for swig

Definition at line 403 of file VectorD.h.

◆ Vector2Ds

2D vectors typedef for swig

Definition at line 405 of file VectorD.h.

◆ Vector3D

typedef VectorD<3> IMP::Vector3D

3D vector typedef for swig

Examples
atom/dope_and_excluded_volume.cpp, core/simple.cpp, and grid.cpp.

Definition at line 407 of file VectorD.h.

◆ Vector3DDerivKey

The type used to identify 3D vector attributes&derivatives in the Particles.

Definition at line 106 of file base_types.h.

◆ Vector3DDerivKeys

Pass or store a set of Vector3DDerivKey.

Definition at line 107 of file base_types.h.

◆ Vector3DKey

typedef Key<16> IMP::Vector3DKey

The type used to identify 3D vector attributes in the Particles.

Definition at line 102 of file base_types.h.

◆ Vector3DKeys

Pass or store a set of Vector3DKey.

Definition at line 103 of file base_types.h.

◆ Vector3Ds

3D vectors typedef for swig

Definition at line 409 of file VectorD.h.

◆ Vector4D

typedef VectorD<4> IMP::Vector4D

4D vector typedef for swig

Definition at line 411 of file VectorD.h.

◆ Vector4DDerivKey

The type used to identify 4D vector attributes&derivatives in the Particles.

Definition at line 114 of file base_types.h.

◆ Vector4DDerivKeys

Pass or store a set of Vector4DDerivKey.

Definition at line 115 of file base_types.h.

◆ Vector4DKey

typedef Key<18> IMP::Vector4DKey

The type used to identify 4D vector attributes in the Particles.

Definition at line 110 of file base_types.h.

◆ Vector4DKeys

Pass or store a set of Vector4DKey.

Definition at line 111 of file base_types.h.

◆ Vector4Ds

4D vectors typedef for swig

Definition at line 413 of file VectorD.h.

◆ Vector5D

typedef VectorD<5> IMP::Vector5D

5D vector typedef for swig

Definition at line 415 of file VectorD.h.

◆ Vector5Ds

5D vectors typedef for swig

Definition at line 417 of file VectorD.h.

◆ Vector6D

typedef VectorD<6> IMP::Vector6D

6D vector typedef for swig

Definition at line 419 of file VectorD.h.

◆ Vector6Ds

6D vector typedef for swig

Definition at line 421 of file VectorD.h.

◆ VectorKD

typedef VectorD<-1> IMP::VectorKD

KD vector typedef for swig

Definition at line 423 of file VectorD.h.

◆ VectorKDs

typedef Vector<VectorD<-1> > IMP::VectorKDs

KD vectors typedef for swig

Definition at line 425 of file VectorD.h.

◆ VersionInfos

Pass or store a set of VersionInfo.

Definition at line 54 of file VersionInfo.h.

◆ WeakObjectKey

typedef Key<9> IMP::WeakObjectKey

The type used to identify a non-ref counted Object attribute.

Definition at line 52 of file base_types.h.

◆ WeakObjectKeys

Pass or store a set of WeakObjectKey.

Definition at line 53 of file base_types.h.

Enumeration Type Documentation

◆ CheckLevel

Specify the level of runtime checks performed.

Enumerator
DEFAULT_CHECK 

Use the default check level (eg IMP::Object::set_check_level()).

NONE 

Perform no runtime checks.

USAGE 

Perform checks that IMP is being called correctly.

USAGE_AND_INTERNAL 

Check internal IMP invariants. This is to be used for debugging IMP.

Definition at line 51 of file enums.h.

◆ LogLevel

The log levels supported by IMP.

Enumerator
DEFAULT 

Use to specify that the global log level should be used (eg in IMP::Object::set_log_level())

SILENT 

Do not output any text.

WARNING 

Output only warnings.

PROGRESS 

Output only progress meter style displays and occasional printouts when switching phases of work.

TERSE 

Output a line or two per evaluation call.

VERBOSE 

Produce copious output to allow someone to trace through the computation.

MEMORY 

Log memory allocations and frees.

Definition at line 19 of file enums.h.

Function Documentation

◆ add_bool_flag()

void IMP::add_bool_flag ( std::string name,
std::string description )

For Python use. Default is always false.

Here is the call graph for this function:

◆ add_float_flag()

void IMP::add_float_flag ( std::string name,
double default_value,
std::string description )

For Python use.

Here is the call graph for this function:

◆ add_int_flag()

void IMP::add_int_flag ( std::string name,
size_t default_value,
std::string description )

For Python use.

Here is the call graph for this function:

◆ add_string_flag()

void IMP::add_string_flag ( std::string name,
std::string default_value,
std::string description )

For Python use.

Here is the call graph for this function:

◆ add_to_log()

void IMP::add_to_log ( LogLevel level,
std::string to_write )

Write a string to the log, for Python.

Here is the call graph for this function:

◆ add_to_progress_display()

void IMP::add_to_progress_display ( unsigned int step = 1)

Set the current progress.

When it equals the number of steps, the bar is done.

Here is the call graph for this function:

◆ allow_deprecated()

allow_deprecated ( allow = True)

Context manager to temporarily allow (or disallow) deprecated code.

See also
deprecation support.
Note
This function is only available in Python.

Definition at line 12175 of file __init__.py.

◆ compare()

template<int D>
int IMP::compare ( const VectorD< D > & a,
const VectorD< D > & b )

lexicographic comparison of two vectors

Note that this is not very reliable and probably should not be used.

See also
VectorD

Definition at line 165 of file VectorD.h.

Here is the call graph for this function:

◆ create_constraint() [1/2]

template<class Before, class After>
Constraint * IMP::create_constraint ( Before * b,
After * a,
const typename Before::Argument & t,
std::string name = std::string() )

When programming in C++, you can use generic constraint instead of a SingletonConstraint, PairConstraint, etc. The result is somewhat faster (20% or so).

Definition at line 63 of file generic.h.

◆ create_constraint() [2/2]

template<class Before, class After>
Constraint * IMP::create_constraint ( Before * b,
After * a,
const typename Before::Argument & t,
std::string name = std::string() )

When programming in C++, you can use generic constraint instead of a SingletonConstraint, PairConstraint, etc. The result is somewhat faster (20% or so).

Definition at line 63 of file generic.h.

Here is the call graph for this function:

◆ create_decomposition() [1/2]

Restraints IMP::create_decomposition ( const RestraintsTemp & rs)

Return the decomposition of a list of restraints.

Here is the call graph for this function:

◆ create_decomposition() [2/2]

ScoringFunctions IMP::create_decomposition ( ScoringFunction * sf)

Return a list of ScoringFunction objects where each is as simple as possible and evaluating the sum (and anding the good score bits) is exactly like evaluating the one ScoringFunction.

Here is the call graph for this function:

◆ create_restraint() [1/4]

template<class Score>
Restraint * IMP::create_restraint ( const Score * s,
const typename Score::Argument & t,
std::string name = std::string() )

Definition at line 44 of file generic.h.

◆ create_restraint() [2/4]

template<class Score, class Container>
Restraint * IMP::create_restraint ( const Score * s,
Container * t,
std::string name = std::string() )

Definition at line 53 of file generic.h.

◆ create_restraint() [3/4]

template<class Score>
Restraint * IMP::create_restraint ( Score * s,
const typename Score::Argument & t,
std::string name = std::string() )

A Python version of this is provided, but it produces a slightly less efficient restraint.

Definition at line 36 of file generic.h.

◆ create_restraint() [4/4]

template<class Score>
Restraint * IMP::create_restraint ( Score * s,
const typename Score::Argument & t,
std::string name = std::string() )

When programming in C++, you can use generic restraint instead of a SingletonRestraint, PairRestraint, etc. The result is somewhat faster (20% or so).

Definition at line 36 of file generic.h.

Here is the call graph for this function:

◆ create_scoring_function()

template<class RestraintType>
ScoringFunction * IMP::create_scoring_function ( RestraintType * rs,
double weight = 1.0,
double max = NO_MAX,
std::string name = std::string() )

Create a ScoringFunction on a single restraint.

This can be faster than using a RestraintsScoringFunction.

Definition at line 23 of file generic.h.

Here is the call graph for this function:

◆ create_temporary_file()

TextOutput IMP::create_temporary_file ( std::string prefix = "imp_temp",
std::string suffix = "" )

Create a temporary file. The path can be extracted from the TextOutput.

If suffix is non-empty, there is some small chance of a collision on non-BSD systems as a unique temporary file is first created, and then a file with that suffix appended is created.

Here is the call graph for this function:

◆ create_temporary_file_name()

std::string IMP::create_temporary_file_name ( std::string prefix = "imp_temp",
std::string suffix = "" )

Create a temporary file.

If suffix is non-empty, there is some small chance of a collision on non-BSD systems as a unique temporary file is first created, and then a file with that suffix appended is created.

Here is the call graph for this function:

◆ deprecated_function()

deprecated_function ( version,
help_message )

Python decorator to mark a function as deprecated.

See also
deprecation support.
Note
This function is only available in Python.

Definition at line 12162 of file __init__.py.

◆ deprecated_method()

deprecated_method ( version,
help_message )

Python decorator to mark a method as deprecated.

See also
deprecation support.
Note
This function is only available in Python.

Definition at line 12150 of file __init__.py.

◆ deprecated_module()

deprecated_module ( version,
module,
help_message )

Mark a Python module as deprecated.

Note
The module argument would normally be __name__.
See also
deprecation support.
Note
This function is only available in Python.

Definition at line 12127 of file __init__.py.

◆ deprecated_object()

deprecated_object ( version,
help_message )

Python decorator to mark a class as deprecated.

See also
deprecation support.
Note
This function is only available in Python.

Definition at line 12134 of file __init__.py.

◆ get_absolute_path()

std::string IMP::get_absolute_path ( std::string file)

Convert a possibly relative path to an absolute path.

If the provided path is a relative path, add the current working directory to make it an absolute path.

Note
If the path is already absolute, it is returned unchanged. Paths are not made canonical (symlinks or '..' elements are not removed). On Windows, the path is always returned unchanged.
Here is the call graph for this function:

◆ get_as_unsigned_int()

template<class Tag>
unsigned int IMP::get_as_unsigned_int ( Index< Tag > i)

Definition at line 58 of file Index.h.

◆ get_basis_vector_d()

template<int D>
VectorD< D > IMP::get_basis_vector_d ( unsigned int coordinate)

Return the basis vector for the given coordinate.

Return the unit vector pointing in the direction of the requested coordinate. That is

VectorD< D > get_basis_vector_d(unsigned int coordinate)
Return the basis vector for the given coordinate.
Definition VectorD.h:208
VectorD< 3 > Vector3D
Definition VectorD.h:407
See also
VectorD

Definition at line 208 of file VectorD.h.

Here is the call graph for this function:

◆ get_basis_vector_kd() [1/2]

template<>
VectorD<-1 > IMP::get_basis_vector_kd ( int D,
unsigned int coordinate )

Return a dynamically sized basis vector.

Definition at line 230 of file VectorD.h.

Here is the call graph for this function:

◆ get_basis_vector_kd() [2/2]

template<int D>
VectorD<-1 > IMP::get_basis_vector_kd ( int Di,
unsigned int coordinate )

Return the basis vector for the given coordinate.

Return a dynamically sized basis vector.

Definition at line 222 of file VectorD.h.

Here is the call graph for this function:

◆ get_bool_flag()

bool IMP::get_bool_flag ( std::string name)

For Python use.

Here is the call graph for this function:

◆ get_centroid()

Vector3D IMP::get_centroid ( const Vector3Ds & ps)

Return the centroid of a set of vectors.

See also
Vector3D

Definition at line 67 of file Vector3D.h.

Here is the call graph for this function:

◆ get_check_level()

CheckLevel IMP::get_check_level ( )

Get the current audit mode.

Definition at line 80 of file exception.h.

Here is the call graph for this function:

◆ get_copyright()

std::string IMP::get_copyright ( )

Get the IMP copyright notice.

Here is the call graph for this function:

◆ get_data_path()

std::string IMP::get_data_path ( std::string file_name)

Return the full path to one of this module's data files.

To read the data file "data_library" that was placed in the data directory of this module, do something like

std::ifstream in(IMP::get_data_path("data_library"));
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.

This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh script.

Note
Each module has its own data directory, so be sure to use this function from the correct module.
Here is the call graph for this function:

◆ get_dependency_graph()

DependencyGraph IMP::get_dependency_graph ( Model * m)

The dependency graph captures the interactions between Restraint, ScoreState and Particle objects. The graph has a directed edge if the source of the edge is an input for the target of the edge or the target of the edge is an output for the source. eg, there is an edge connecting a Container to the Restraint which gets its particles from the Container.

See also
get_pruned_dependency_graph()
Here is the call graph for this function:

◆ get_deprecation_exceptions()

bool IMP::get_deprecation_exceptions ( )

Get whether an exception is thrown when a deprecated method is used.

Here is the call graph for this function:

◆ get_distance()

template<int D>
double IMP::get_distance ( const VectorD< D > & v1,
const VectorD< D > & v2 )

Compute the distance between two vectors.

See also
VectorD

Definition at line 195 of file VectorD.h.

Here is the call graph for this function:

◆ get_elementwise_product() [1/2]

template<int D>
VectorD< D > IMP::get_elementwise_product ( const Ints & a,
const VectorD< D > & b )

Return the vector that is the elementwise product of the two.

See also
VectorD

Definition at line 455 of file VectorD.h.

Here is the call graph for this function:

◆ get_elementwise_product() [2/2]

template<int D>
VectorD< D > IMP::get_elementwise_product ( const VectorD< D > & a,
const VectorD< D > & b )

Return the vector that is the elementwise product of the two.

See also
VectorD

Definition at line 443 of file VectorD.h.

Here is the call graph for this function:

◆ get_example_path()

std::string IMP::get_example_path ( std::string file_name)

Return the full path to one of this module's example files.

To read the example file "example_protein.pdb" that was placed in the examples directory of this module, do something like

std::ifstream in(IMP::get_example_path("example_protein.pdb"));
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.

This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh script.

Note
Each module has its own example directory, so be sure to use this function from the correct module.
Here is the call graph for this function:

◆ get_executable_name()

std::string IMP::get_executable_name ( )

Return the name of the current executable.

Here is the call graph for this function:

◆ get_float_flag()

double IMP::get_float_flag ( std::string name)

For Python use.

Here is the call graph for this function:

◆ get_indexes() [1/2]

ParticleIndexPairs IMP::get_indexes ( const ParticlePairsTemp & ps)

Get the indexes from a list of particle pairs.

Here is the call graph for this function:

◆ get_indexes() [2/2]

ParticleIndexes IMP::get_indexes ( const ParticlesTemp & ps)

Get the indexes from a list of particles.

Here is the call graph for this function:

◆ get_input_containers()

ContainersTemp IMP::get_input_containers ( const ModelObjectsTemp & mos)

Return all the input particles for a given ModelObject.

Here is the call graph for this function:

◆ get_input_particles()

ParticlesTemp IMP::get_input_particles ( const ModelObjectsTemp & mos)

Return all the input particles for a given ModelObject.

Here is the call graph for this function:

◆ get_int_flag()

size_t IMP::get_int_flag ( std::string name)

For Python use.

Here is the call graph for this function:

◆ get_invalid_index()

template<class Tag>
Index< Tag > IMP::get_invalid_index ( )

Definition at line 62 of file Index.h.

◆ get_is_quick_test()

bool IMP::get_is_quick_test ( )

Executables can inspect this flag and when it is true, run a shorter, simpler version of their code to just make sure things work.

Definition at line 183 of file flags.h.

Here is the call graph for this function:

◆ get_l1_norm()

template<int D>
double IMP::get_l1_norm ( const VectorD< D > & v)

Definition at line 333 of file VectorD.h.

◆ get_l2_norm()

template<int D>
double IMP::get_l2_norm ( const VectorD< D > & v)

Definition at line 328 of file VectorD.h.

◆ get_linf_norm()

template<int D>
double IMP::get_linf_norm ( const VectorD< D > & v)

Definition at line 342 of file VectorD.h.

◆ get_live_object_names()

Strings IMP::get_live_object_names ( )

Return the names of all live objects.

Use this to check for memory leaks.

Here is the call graph for this function:

◆ get_live_objects()

Objects IMP::get_live_objects ( )

Return pointers to all live objects.

Use this to check for memory leaks.

Here is the call graph for this function:

◆ get_log_level()

LogLevel IMP::get_log_level ( )

Get the currently active global log level.

Note
This may not always match the value passed to set_log_level() as objects can temporarily override the global level while they are evaluating.
See also
set_log_level()
IMP::Object::set_log_level()

Definition at line 92 of file log.h.

Here is the call graph for this function:

◆ get_module_name()

std::string IMP::get_module_name ( )

Definition at line 142 of file kernel_config.h.

◆ get_networkx_graph()

networkx::DiGraph IMP::get_networkx_graph ( Graph g)

Export an IMP graph to a networkx graph. The resulting graph can be analyzed and displayed, although the graph layout algorithms in networkx seem to be quite poor compared to graphviz.

On a Mac, such graphs can be displayed by

import matplotlib
# the engine to be used must be selected before pyplot is imported
matplotlib.use("macosx")
import matplotlib.pyplot as plt
import networkx
networkx.draw_spring(xg)
plt.show()
Here is the call graph for this function:

◆ get_number_of_threads()

unsigned int IMP::get_number_of_threads ( )

Get the current number of threads requested. The default is the number of cores/hardware threads in the machine if there is OpenMP support, or 1 otherwise.

Here is the call graph for this function:

◆ get_ones_vector_d()

template<int D>
VectorD< D > IMP::get_ones_vector_d ( double v = 1)

Return a vector of ones (or another constant).

Definition at line 283 of file VectorD.h.

Here is the call graph for this function:

◆ get_ones_vector_kd() [1/2]

template<>
VectorD<-1 > IMP::get_ones_vector_kd ( unsigned int D,
double v = 1 )

Return a vector of ones (or another constant).

Return a dynamically sized vector of zeros.

Definition at line 303 of file VectorD.h.

Here is the call graph for this function:

◆ get_ones_vector_kd() [2/2]

template<int D>
VectorD<-1 > IMP::get_ones_vector_kd ( unsigned int Di,
double v = 1 )

Return a vector of ones (or another constant).

Return a dynamically sized vector of zeros.

Di must equal D.

Definition at line 295 of file VectorD.h.

Here is the call graph for this function:

◆ get_orthogonal_vector()

Vector3D IMP::get_orthogonal_vector ( const Vector3D & v)

Return a vector that is perpendicular to the given vector.

See also
Vector3D

Definition at line 50 of file Vector3D.h.

Here is the call graph for this function:

◆ get_output_containers()

ContainersTemp IMP::get_output_containers ( const ModelObjectsTemp & mos)

Return all the output particles for a given ModelObject.

Here is the call graph for this function:

◆ get_output_particles()

ParticlesTemp IMP::get_output_particles ( const ModelObjectsTemp & mos)

Return all the output particles for a given ModelObject.

Here is the call graph for this function:

◆ get_particles()

ParticlesTemp IMP::get_particles ( Model * m,
const ParticleIndexes & ps )

Get the particles from a list of indexes.

Here is the call graph for this function:

◆ get_pruned_dependency_graph()

DependencyGraph IMP::get_pruned_dependency_graph ( Model * m)

The pruned dependency graph merges all particles which have the same dependencies to produce a simpler graph.

Here is the call graph for this function:

◆ get_radius_of_gyration()

double IMP::get_radius_of_gyration ( const Vector3Ds & ps)

Return the radius of gyration of a set of points.

See also
IMP::atom::get_radius_of_gyration()

Definition at line 76 of file Vector3D.h.

Here is the call graph for this function:

◆ get_random_double_uniform() [1/2]

double IMP::get_random_double_uniform ( )

Return a uniformly distributed double number in range [0..1).

Note
the random number is retrieved from a cache of random numbers generated using GPU if compiled with CUDA, or from boost without a cache otherwise.

Definition at line 173 of file random_utils.h.

Here is the call graph for this function:

◆ get_random_double_uniform() [2/2]

double IMP::get_random_double_uniform ( double min,
double max )

Return a uniformly distributed double number in range [min..max).

Note
the random number is retrieved from a cache of random numbers generated using GPU if compiled with CUDA, or from boost without a cache otherwise.

Definition at line 194 of file random_utils.h.

Here is the call graph for this function:

◆ get_random_float_uniform() [1/2]

float IMP::get_random_float_uniform ( )

Return a uniformly distributed float number in range [0..1).

Note
the random number is retrieved from a cache of random numbers generated using GPU if compiled with CUDA, or from boost without a cache otherwise.

Definition at line 138 of file random_utils.h.

Here is the call graph for this function:

◆ get_random_float_uniform() [2/2]

float IMP::get_random_float_uniform ( float min,
float max )

Return a uniformly distributed float number in range [min..max).

Note
the random number is retrieved from a cache of random numbers generated using GPU if compiled with CUDA, or from boost without a cache otherwise.

Definition at line 160 of file random_utils.h.

Here is the call graph for this function:

◆ get_random_numbers_normal()

template<typename RealType>
void IMP::get_random_numbers_normal ( Vector< RealType > & v,
unsigned int n,
RealType mean = 0.0,
RealType stddev = 1.0 )

Fill the double array with random normally distributed values.

The pre-allocated array is filled with n double numbers with random normally distributed values with specified mean and standard deviation.

Parameters
vvector array that will be resized to n
nsize of array
meanmean of normal distribution
stddevstandard deviation
Note
Implementation relies on random_number_generator (a boost random number generator), or on the CUDA random number generator if kernel is built with IMP_KERNEL_CUDA_LIB cmake flag. Either is initially seeded with get_random_seed().

Definition at line 47 of file random_utils.h.

Here is the call graph for this function:

◆ get_random_numbers_uniform()

template<typename RealType>
void IMP::get_random_numbers_uniform ( Vector< RealType > & v,
unsigned int n )

Fill the float array with random uniformly distributed values.

Fill a pre-allocated array of n float numbers with random uniformly distributed values in the [0..1) range.

Parameters
vvector array that will be resized to n
nsize of array
Note
Implementation relies on random_number_generator (a boost random number generator), or on the CUDA random number generator if kernel is built with CUDA flag. Either is initially seeded with get_random_seed().

Definition at line 89 of file random_utils.h.

Here is the call graph for this function:

◆ get_random_seed()

boost::uint64_t IMP::get_random_seed ( )

Return the initial random seed.

To set the seed or get random values, see IMP::random_number_generator.

Here is the call graph for this function:

◆ get_relative_path()

std::string IMP::get_relative_path ( std::string base,
std::string relative )

Return a path to a file relative to another file.

For example if base is path/to/config.file and relative is data/image0.jpg then the return value would be path/to/data/image0.jpg. This function should be used when processing configuration files so that the meaning of the configuration file does not change if current working directory changes.

Here is the call graph for this function:

◆ get_required_score_states()

ScoreStatesTemp IMP::get_required_score_states ( const ModelObjectsTemp & mos,
ScoreStatesTemp exclude = ScoreStatesTemp() )

Compute the set of score states required by the passed ModelObjects.

This will compute dependencies if needed.

◆ get_restraints()

template<class It>
RestraintsTemp IMP::get_restraints ( It b,
It e )

Definition at line 140 of file RestraintSet.h.

◆ get_squared_distance()

template<int D>
double IMP::get_squared_distance ( const VectorD< D > & v1,
const VectorD< D > & v2 )

Compute the squared distance between two vectors.

See also
VectorD

Definition at line 187 of file VectorD.h.

Here is the call graph for this function:

◆ get_string_flag()

std::string IMP::get_string_flag ( std::string name)

For Python use.

Here is the call graph for this function:

◆ get_unique_name()

std::string IMP::get_unique_name ( std::string templ)

Return a unique name produced from the string.

This is done by replacing %1% with a sequential number.

Here is the call graph for this function:

◆ get_update_order() [1/2]

ScoreStatesTemp IMP::get_update_order ( ScoreStatesTemp input)

Return an appropriate (topologically sorted) order to update the score states in.

Here is the call graph for this function:

◆ get_update_order() [2/2]

ScoreStatesTemp IMP::get_update_order ( std::set< ScoreState * > input)

Return an appropriate (topologically sorted) order to update the score states in.

Here is the call graph for this function:

◆ get_vector_geometry() [1/5]

template<class C>
const VectorD< C::DIMENSION > & IMP::get_vector_geometry ( const C & g)
See also
VectorD See generic geometry for more information.

Definition at line 430 of file VectorD.h.

Here is the call graph for this function:

◆ get_vector_geometry() [2/5]

const algebra::Vector3D & IMP::get_vector_geometry ( Decorator d)

Definition at line 155 of file XYZ.h.

◆ get_vector_geometry() [3/5]

const algebra::Vector3D & IMP::get_vector_geometry ( Particle * p)

See generic geometry for more information.

Definition at line 147 of file XYZ.h.

Here is the call graph for this function:

◆ get_vector_geometry() [4/5]

const algebra::Vector3D & IMP::get_vector_geometry ( Pointer< Particle > d)

Definition at line 172 of file XYZ.h.

◆ get_vector_geometry() [5/5]

const algebra::Vector3D & IMP::get_vector_geometry ( WeakPointer< Particle > d)

Definition at line 163 of file XYZ.h.

◆ get_vector_product()

Vector3D IMP::get_vector_product ( const Vector3D & p1,
const Vector3D & p2 )

Return the vector product (cross product) of two vectors.

See also
Vector3D

Definition at line 31 of file Vector3D.h.

Here is the call graph for this function:

◆ get_zero_vector_d()

template<int D>
VectorD< D > IMP::get_zero_vector_d ( )

Return a vector of zeros.

Definition at line 251 of file VectorD.h.

Here is the call graph for this function:

◆ get_zero_vector_kd() [1/2]

template<>
VectorD<-1 > IMP::get_zero_vector_kd ( int D)

Return a dynamically sized vector of zeros.

Definition at line 270 of file VectorD.h.

Here is the call graph for this function:

◆ get_zero_vector_kd() [2/2]

template<int D>
VectorD<-1 > IMP::get_zero_vector_kd ( int Di)

Return a dynamically sized vector of zeros.

Definition at line 262 of file VectorD.h.

Here is the call graph for this function:

◆ handle_error()

void IMP::handle_error ( const char * msg)

This function is called whenever IMP detects an error. It can be useful to add a breakpoint in the function when using a debugger.

Here is the call graph for this function:

◆ handle_use_deprecated()

void IMP::handle_use_deprecated ( std::string message)

Break in this method in gdb to find deprecated uses at runtime.

Here is the call graph for this function:

◆ hash_value() [1/8]

std::size_t IMP::hash_value ( bool d)

Definition at line 42 of file hash.h.

◆ hash_value() [2/8]

template<class T, class Allocator>
std::size_t IMP::hash_value ( const __gnu_debug::vector< T, Allocator > & t)

Definition at line 165 of file Vector.h.

◆ hash_value() [3/8]

template<class T>
std::size_t IMP::hash_value ( const std::set< T > & t)

Definition at line 54 of file hash.h.

◆ hash_value() [4/8]

std::size_t IMP::hash_value ( const std::string & d)

Definition at line 43 of file hash.h.

◆ hash_value() [5/8]

template<class T>
std::size_t IMP::hash_value ( const std::vector< T > & t)

Definition at line 49 of file hash.h.

◆ hash_value() [6/8]

template<class T>
std::size_t IMP::hash_value ( const T & t)

Definition at line 37 of file hash.h.

◆ hash_value() [7/8]

std::size_t IMP::hash_value ( double d)

Definition at line 40 of file hash.h.

◆ hash_value() [8/8]

std::size_t IMP::hash_value ( int d)

Definition at line 41 of file hash.h.

◆ isinf()

template<class T>
bool IMP::isinf ( const T & a)

Return true if a number is infinite.

Definition at line 35 of file math.h.

Here is the call graph for this function:

◆ isnan()

template<class T>
bool IMP::isnan ( const T & a)

Return true if a number is NaN.

With certain compiler settings the compiler can optimize out a!=a (and certain Intel chips had issues with it too).

Definition at line 24 of file math.h.

Here is the call graph for this function:

◆ make_predicate_equal()

template<class Pred>
internal::PredicateEquals< Pred, true > IMP::make_predicate_equal ( const Pred * p,
Model * m,
int value )

Return a functor that returns true when the predicate has a certain value.

Definition at line 19 of file functor.h.

Here is the call graph for this function:

◆ make_predicate_not_equal()

template<class Pred>
internal::PredicateEquals< Pred, false > IMP::make_predicate_not_equal ( const Pred * p,
Model * m,
int value )

Return a functor that returns true when the predicate doesn't have a certain value.

Definition at line 28 of file functor.h.

Here is the call graph for this function:

◆ object_cast()

template<class O>
O * IMP::object_cast ( Object * o)

Up (or down) cast an IMP Object-derived class.

If the cast does not succeed a ValueException will be thrown. Use a dynamic_cast if you prefer to have a nullptr returned.

Definition at line 23 of file object_cast.h.

Here is the call graph for this function:

◆ operator*()

template<int D>
VectorD< D > IMP::operator* ( double s,
VectorD< D > o )
See also
VectorD

Definition at line 179 of file VectorD.h.

Here is the call graph for this function:

◆ operator<<()

std::ostream & IMP::operator<< ( std::ostream & out,
const Showable & s )

Definition at line 66 of file Showable.h.

◆ read_particles_from_buffer()

void IMP::read_particles_from_buffer ( const Vector< char > & buffer,
const ParticlesTemp & particles,
const FloatKeys & keys )

load found attributes into the particles

Here is the call graph for this function:

◆ reset_log_timer()

void IMP::reset_log_timer ( )

Reset the log timer.

Here is the call graph for this function:

◆ resize_to_fit()

template<class Tag, class Container, class T>
void IMP::resize_to_fit ( Container & v,
Index< Tag > i,
const T & default_value = T() )

Definition at line 178 of file Index.h.

◆ set_check_level()

void IMP::set_check_level ( CheckLevel tf)

Control runtime checks in the code.

The default level of checks is USAGE for release builds and USAGE_AND_INTERNAL for debug builds.

Definition at line 72 of file exception.h.

Here is the call graph for this function:

◆ set_deprecation_exceptions()

void IMP::set_deprecation_exceptions ( bool tf)

Toggle whether an exception is thrown when a deprecated method is used.

Here is the call graph for this function:

◆ set_deprecation_warnings()

void IMP::set_deprecation_warnings ( bool tf)

Toggle printing of warnings on using deprecated classes.

If set to true (the default) a warning is printed every time a class marked as deprecated is used.

Here is the call graph for this function:

◆ set_log_level()

void IMP::set_log_level ( LogLevel l)

Set the current global log level.

Note
may be overridden by set_log_level of specific objects that inherit from IMP::Object
this global method should not, currently, be used directly during Model::evaluate() calls.
See also
get_log_level()
IMP::Object::set_log_level()
Here is the call graph for this function:

◆ set_log_target()

void IMP::set_log_target ( TextOutput l)

Set the target for the log.

See TextOutput for options. Python users should use SetLogTarget instead.

Here is the call graph for this function:

◆ set_log_timer()

void IMP::set_log_timer ( bool tb)

Set whether log messages are tagged with the current log time.

Here is the call graph for this function:

◆ set_number_of_threads()

void IMP::set_number_of_threads ( unsigned int n)

Set the current number of threads to a number greater or equal to 1. Setting it to 1 disables multithreaded evaluation.

Here is the call graph for this function:

◆ set_progress_display()

void IMP::set_progress_display ( std::string description,
unsigned int steps )

Set up the progress bar with the passed description.

See also
IMP_PROGRESS_DISPLAY().
Here is the call graph for this function:

◆ set_show_leaked_objects()

void IMP::set_show_leaked_objects ( bool tf)

Set whether to complain about objects not being properly cleaned up.

Here is the call graph for this function:

◆ set_vector_geometry() [1/5]

template<class C, class E>
void IMP::set_vector_geometry ( C & g,
const E & v )
See also
VectorD See generic geometry for more information.

Definition at line 435 of file VectorD.h.

Here is the call graph for this function:

◆ set_vector_geometry() [2/5]

void IMP::set_vector_geometry ( Decorator d,
const algebra::Vector3D & v )

See generic geometry for more information.

Definition at line 159 of file XYZ.h.

Here is the call graph for this function:

◆ set_vector_geometry() [3/5]

void IMP::set_vector_geometry ( Particle * p,
const algebra::Vector3D & v )

See generic geometry for more information.

Definition at line 151 of file XYZ.h.

Here is the call graph for this function:

◆ set_vector_geometry() [4/5]

void IMP::set_vector_geometry ( Pointer< Particle > d,
const algebra::Vector3D & v )

See generic geometry for more information.

Definition at line 177 of file XYZ.h.

Here is the call graph for this function:

◆ set_vector_geometry() [5/5]

void IMP::set_vector_geometry ( WeakPointer< Particle > d,
const algebra::Vector3D & v )

See generic geometry for more information.

Definition at line 168 of file XYZ.h.

Here is the call graph for this function:

◆ setup_from_argv() [1/4]

void IMP::setup_from_argv ( const Strings & argv,
std::string description )

Parse the command line flags and return the positional arguments. For Python.

Parameters
[in]argvsys.argv
[in]descriptionA message describing what the program does.
Exceptions
UsageExceptionif a problem with the command line was found.
Here is the call graph for this function:

◆ setup_from_argv() [2/4]

Strings IMP::setup_from_argv ( const Strings & argv,
std::string description,
std::string positional_description,
int num_positional )

Parse the command line flags and return the positional arguments. For Python.

Parameters
[in]argvsys.argv
[in]descriptionA message describing what the program does.
[in]positional_descriptionA message describing the positional arguments, eg "input.pdb output.pdb"
[in]num_positionalA positive integer to require that many positional arguments, or a negative integer to require at least that many.
Exceptions
UsageExceptionif a problem with the command line was found.
Here is the call graph for this function:

◆ setup_from_argv() [3/4]

void IMP::setup_from_argv ( int argc,
char ** argv,
std::string description )

Parse the command line flags and return the positional arguments.

Parameters
[in]argcargc
[in]argvargv
[in]descriptionA message describing what the program does.
Exceptions
UsageExceptionif a problem with the command line was found.
Examples
atom/dope_and_excluded_volume.cpp, core/simple.cpp, flags.cpp, and grid.cpp.
Here is the call graph for this function:

◆ setup_from_argv() [4/4]

Strings IMP::setup_from_argv ( int argc,
char ** argv,
std::string description,
std::string positional_description,
int num_positional )

Parse the command line flags and return the positional arguments.

Parameters
[in]argcargc
[in]argvargv
[in]descriptionA message describing what the program does.
[in]positional_descriptionA message describing the the positional arguments
[in]num_positionalA positive integer to require that many positional arguments, or a negative integer to require at least that many.
Exceptions
UsageExceptionif a problem with the command line was found.
Here is the call graph for this function:

◆ setup_from_argv_allowing_unknown()

Strings IMP::setup_from_argv_allowing_unknown ( int argc,
char ** argv,
std::string description )

Parse the command line flags and return the positional arguments returning unknown flags in a list. Use this version if some arguments are to be parsed by a different system.

Parameters
[in]argcargc
[in]argvargv
[in]descriptionA message describing what the program does.
Exceptions
UsageExceptionif a problem with the command line was found.
Here is the call graph for this function:

◆ show_altgraph()

void IMP::show_altgraph ( Graph g)

Use the Python altgraph package to graphically display a graph. Note that is requires X11 to be running (you can find it in your Utilities folder in MacOS) and the window produced is shockingly retro.

An alternative is to write the graph to a dot file

g.show_graphviz(open("graph.dot", "w"));

then turn it to pdf with dot

dot -Tpdf graph.dot > graph.pdf

and finally view the pdf.

Here is the call graph for this function:

◆ show_graphviz()

std::string IMP::show_graphviz ( Graph g)

Generate a nice pdf of the graph and attempt to open the pdf. The name of the pdf will be returned in case the attempt to open it fails.

Here is the call graph for this function:

◆ show_restraint_hierarchy()

void IMP::show_restraint_hierarchy ( ScoringFunctionAdaptor rs,
std::ostream & out = std::cout )

Print the hierarchy of restraints.

The maximum accepted score (Restraint::get_maximum_score()) and the weight (Restraint::get_weight()) are printed for each restraint.

Here is the call graph for this function:

◆ swap()

template<class A>
void IMP::swap ( ConstVector< A > & a,
ConstVector< A > & b )

Definition at line 143 of file ConstVector.h.

◆ write_help()

void IMP::write_help ( std::ostream & out = std::cerr)

Prints out the help message, useful if you have extra error checking and the flags don't pass it.

Here is the call graph for this function:

◆ write_particles_to_buffer()

Vector< char > IMP::write_particles_to_buffer ( const ParticlesTemp & particles,
const FloatKeys & keys )

return a binary buffer with the data

Here is the call graph for this function:

Variable Documentation

◆ BAD_SCORE

const double IMP::BAD_SCORE
extern

Evaluation can return this value if limits are exceeded and it is a ScoringFunction::evaluate_if_below() or ScoringFunction::evaluate_if_good

◆ NO_MAX

const double IMP::NO_MAX
extern

Use this value when you want to turn off maximum for restraint evaluation.

◆ random_number_generator

RandomNumberGenerator IMP::random_number_generator
extern

A shared non-GPU random number generator.

The random number generator is seeded based on command line specified flag. Otherwise, the default seed is retrieved from among either boost::random_device, /dev/urandom, or the system clock, based on which method is available in this priority order.

To set the seed, call the seed method, which takes a single integer argument. This object is also callable, and returns a new random integer on each call.

This generator can be used by the Boost.Random distributions.