00001 /** 00002 * \file ClosePairContainer.h 00003 * \brief Return all pairs from a SingletonContainer 00004 * 00005 * This file is generated by a script (core/tools/make-container). 00006 * Do not edit directly. 00007 * 00008 * Copyright 2007-2010 IMP Inventors. Close rights reserved. 00009 */ 00010 00011 #ifndef IMPCONTAINER_CLOSE_PAIR_CONTAINER_H 00012 #define IMPCONTAINER_CLOSE_PAIR_CONTAINER_H 00013 00014 #include "container_config.h" 00015 #include <IMP/core/internal/CoreClosePairContainer.h> 00016 00017 IMPCONTAINER_BEGIN_NAMESPACE 00018 00019 /** \brief Return all close unordered pairs of particles taken from 00020 the SingletonContainer 00021 00022 This maintains a list of particles whose inter-sphere distance is 00023 smaller than the distance parameter. 00024 00025 In order to do this efficiently the class actually computes all 00026 pairs within distance+slack of one another. As long as the 00027 particles don't move more than the slack amount, the list is still 00028 valid and doesn't need to be recomputed. The container keeps track 00029 internally of how far the particles have moved using a score 00030 state, and is also updated via a score state. 00031 00032 \usesconstraint 00033 00034 Here is a simple example of using this for a nonbonded list 00035 \verbinclude nonbonded_interactions.py 00036 00037 \note This class uses the IMP::core::BoxSweepClosePairsFinder by 00038 default if \ref cgal "CGAL" is available. 00039 00040 \ingroup CGAL 00041 \see CloseBipartitePairContainer 00042 \see ClosePairsFinder 00043 00044 */ 00045 class IMPCONTAINEREXPORT ClosePairContainer : 00046 #if defined(IMP_DOXYGEN) || defined(SWIG) 00047 public PairContainer 00048 #else 00049 public core::internal::CoreClosePairContainer 00050 #endif 00051 { 00052 typedef core::internal::CoreClosePairContainer P; 00053 public: 00054 //! Get the individual particles from the passed SingletonContainer 00055 ClosePairContainer(SingletonContainer *c, double distance, 00056 double slack=1); 00057 //! If the container is empty, you can pass the model explicitly 00058 ClosePairContainer(SingletonContainer *c, Model *m, double distance, 00059 double slack=1); 00060 00061 //! Get the individual particles from the passed SingletonContainer 00062 ClosePairContainer(SingletonContainer *c, double distance, 00063 core::ClosePairsFinder *cpf, 00064 double slack=1); 00065 //! If the container is empty, you can pass the model explicitly 00066 ClosePairContainer(SingletonContainer *c, Model *m, double distance, 00067 core::ClosePairsFinder *cpf, 00068 double slack=1); 00069 #if defined(SWIG) || defined(IMP_DOXYGEN) 00070 /** @name Methods to control the set of filters 00071 00072 PairContainer objects can be used as filters to prevent 00073 the addition of pairs to the containeroutput list. Pairs 00074 which are contained in any container added to this list 00075 will be excluded from the close pairs list. 00076 */ 00077 /**@{*/ 00078 IMP_LIST(public, PairFilter, pair_filter, 00079 PairFilter*, PairFilters); 00080 /**@}*/ 00081 IMP_PAIR_CONTAINER(ClosePairContainer); 00082 #else 00083 IMP_OBJECT(ClosePairContainer); 00084 #endif 00085 }; 00086 00087 00088 IMPCONTAINER_END_NAMESPACE 00089 00090 #endif /* IMPCONTAINER_CLOSE_PAIR_CONTAINER_H */