14 from sys
import version_info
as _swig_python_version_info
18 import builtins
as __builtin__
24 strthis =
"proxy of " + self.this.__repr__()
25 except __builtin__.Exception:
27 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
30 def _swig_setattr_nondynamic_instance_variable(set):
31 def set_instance_attr(self, name, value):
33 set(self, name, value)
34 elif name ==
"thisown":
36 elif hasattr(self, name)
and isinstance(getattr(type(self), name), property):
37 set(self, name, value)
39 raise AttributeError(
"You cannot add instance attributes to %s" % self)
40 return set_instance_attr
43 def _swig_setattr_nondynamic_class_variable(set):
44 def set_class_attr(cls, name, value):
45 if hasattr(cls, name)
and not isinstance(getattr(cls, name), property):
48 raise AttributeError(
"You cannot add class attributes to %s" % cls)
52 def _swig_add_metaclass(metaclass):
53 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
55 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
59 class _SwigNonDynamicMeta(type):
60 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
61 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
66 class IMP_SYMMETRY_SwigPyIterator(object):
67 r"""Proxy of C++ swig::IMP_SYMMETRY_SwigPyIterator class."""
69 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
71 def __init__(self, *args, **kwargs):
72 raise AttributeError(
"No constructor defined - class is abstract")
74 __swig_destroy__ = _IMP_symmetry.delete_IMP_SYMMETRY_SwigPyIterator
77 r"""value(IMP_SYMMETRY_SwigPyIterator self) -> PyObject *"""
78 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_value(self)
81 r"""incr(IMP_SYMMETRY_SwigPyIterator self, size_t n=1) -> IMP_SYMMETRY_SwigPyIterator"""
82 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_incr(self, n)
85 r"""decr(IMP_SYMMETRY_SwigPyIterator self, size_t n=1) -> IMP_SYMMETRY_SwigPyIterator"""
86 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_decr(self, n)
88 def distance(self, x):
89 r"""distance(IMP_SYMMETRY_SwigPyIterator self, IMP_SYMMETRY_SwigPyIterator x) -> ptrdiff_t"""
90 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_distance(self, x)
93 r"""equal(IMP_SYMMETRY_SwigPyIterator self, IMP_SYMMETRY_SwigPyIterator x) -> bool"""
94 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_equal(self, x)
97 r"""copy(IMP_SYMMETRY_SwigPyIterator self) -> IMP_SYMMETRY_SwigPyIterator"""
98 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_copy(self)
101 r"""next(IMP_SYMMETRY_SwigPyIterator self) -> PyObject *"""
102 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_next(self)
105 r"""__next__(IMP_SYMMETRY_SwigPyIterator self) -> PyObject *"""
106 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator___next__(self)
109 r"""previous(IMP_SYMMETRY_SwigPyIterator self) -> PyObject *"""
110 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_previous(self)
112 def advance(self, n):
113 r"""advance(IMP_SYMMETRY_SwigPyIterator self, ptrdiff_t n) -> IMP_SYMMETRY_SwigPyIterator"""
114 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_advance(self, n)
117 r"""__eq__(IMP_SYMMETRY_SwigPyIterator self, IMP_SYMMETRY_SwigPyIterator x) -> bool"""
118 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator___eq__(self, x)
121 r"""__ne__(IMP_SYMMETRY_SwigPyIterator self, IMP_SYMMETRY_SwigPyIterator x) -> bool"""
122 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator___ne__(self, x)
124 def __iadd__(self, n):
125 r"""__iadd__(IMP_SYMMETRY_SwigPyIterator self, ptrdiff_t n) -> IMP_SYMMETRY_SwigPyIterator"""
126 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator___iadd__(self, n)
128 def __isub__(self, n):
129 r"""__isub__(IMP_SYMMETRY_SwigPyIterator self, ptrdiff_t n) -> IMP_SYMMETRY_SwigPyIterator"""
130 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator___isub__(self, n)
132 def __add__(self, n):
133 r"""__add__(IMP_SYMMETRY_SwigPyIterator self, ptrdiff_t n) -> IMP_SYMMETRY_SwigPyIterator"""
134 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator___add__(self, n)
136 def __sub__(self, *args):
138 __sub__(IMP_SYMMETRY_SwigPyIterator self, ptrdiff_t n) -> IMP_SYMMETRY_SwigPyIterator
139 __sub__(IMP_SYMMETRY_SwigPyIterator self, IMP_SYMMETRY_SwigPyIterator x) -> ptrdiff_t
141 return _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator___sub__(self, *args)
146 _IMP_symmetry.IMP_SYMMETRY_SwigPyIterator_swigregister(IMP_SYMMETRY_SwigPyIterator)
153 IMP_DEBUG = _IMP_symmetry.IMP_DEBUG
155 IMP_RELEASE = _IMP_symmetry.IMP_RELEASE
157 IMP_SILENT = _IMP_symmetry.IMP_SILENT
159 IMP_PROGRESS = _IMP_symmetry.IMP_PROGRESS
161 IMP_TERSE = _IMP_symmetry.IMP_TERSE
163 IMP_VERBOSE = _IMP_symmetry.IMP_VERBOSE
165 IMP_MEMORY = _IMP_symmetry.IMP_MEMORY
167 IMP_NONE = _IMP_symmetry.IMP_NONE
169 IMP_USAGE = _IMP_symmetry.IMP_USAGE
171 IMP_INTERNAL = _IMP_symmetry.IMP_INTERNAL
173 IMP_KERNEL_HAS_LOG4CXX = _IMP_symmetry.IMP_KERNEL_HAS_LOG4CXX
175 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_symmetry.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
177 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_symmetry.IMP_COMPILER_HAS_DEBUG_VECTOR
179 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_symmetry.IMP_COMPILER_HAS_RANDOM_SHUFFLE
181 IMP_COMPILER_HAS_THREE_WAY = _IMP_symmetry.IMP_COMPILER_HAS_THREE_WAY
183 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_symmetry.IMP_KERNEL_HAS_BOOST_RANDOM
185 IMP_KERNEL_HAS_NUMPY = _IMP_symmetry.IMP_KERNEL_HAS_NUMPY
187 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_symmetry.IMP_KERNEL_HAS_GPERFTOOLS
189 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_symmetry.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
191 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_symmetry.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
193 IMPKERNEL_SHOW_WARNINGS = _IMP_symmetry.IMPKERNEL_SHOW_WARNINGS
197 class _DirectorObjects:
198 """@internal Simple class to keep references to director objects
199 to prevent premature deletion."""
202 def register(self, obj):
203 """Take a reference to a director object; will only work for
204 refcounted C++ classes"""
205 if hasattr(obj,
'get_ref_count'):
206 self._objects.append(obj)
208 """Only drop our reference and allow cleanup by Python if no other
209 Python references exist (we hold 3 references: one in self._objects,
210 one in x, and one in the argument list for getrefcount) *and* no
211 other C++ references exist (the Python object always holds one)"""
212 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
213 or x.get_ref_count() > 1]
217 def get_object_count(self):
218 """Get number of director objects (useful for testing only)"""
219 return len(self._objects)
220 _director_objects = _DirectorObjects()
222 class _ostream(object):
223 r"""Proxy of C++ std::ostream class."""
225 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
227 def __init__(self, *args, **kwargs):
228 raise AttributeError(
"No constructor defined")
229 __repr__ = _swig_repr
231 def write(self, osa_buf):
232 r"""write(_ostream self, char const * osa_buf)"""
233 return _IMP_symmetry._ostream_write(self, osa_buf)
236 _IMP_symmetry._ostream_swigregister(_ostream)
237 IMP_C_OPEN_BINARY = _IMP_symmetry.IMP_C_OPEN_BINARY
240 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_symmetry.IMP_CGAL_HAS_BOOST_FILESYSTEM
242 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_symmetry.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
244 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_symmetry.IMP_CGAL_HAS_BOOST_RANDOM
246 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_symmetry.IMP_CGAL_HAS_BOOST_SYSTEM
248 IMP_CGAL_HAS_NUMPY = _IMP_symmetry.IMP_CGAL_HAS_NUMPY
250 IMPCGAL_SHOW_WARNINGS = _IMP_symmetry.IMPCGAL_SHOW_WARNINGS
253 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_symmetry.IMP_ALGEBRA_HAS_IMP_CGAL
255 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_symmetry.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
257 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_symmetry.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
259 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_symmetry.IMP_ALGEBRA_HAS_BOOST_RANDOM
261 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_symmetry.IMP_ALGEBRA_HAS_BOOST_SYSTEM
263 IMP_ALGEBRA_HAS_CGAL = _IMP_symmetry.IMP_ALGEBRA_HAS_CGAL
265 IMP_ALGEBRA_HAS_NUMPY = _IMP_symmetry.IMP_ALGEBRA_HAS_NUMPY
267 IMP_ALGEBRA_HAS_ANN = _IMP_symmetry.IMP_ALGEBRA_HAS_ANN
269 IMPALGEBRA_SHOW_WARNINGS = _IMP_symmetry.IMPALGEBRA_SHOW_WARNINGS
272 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_symmetry.IMP_DISPLAY_HAS_IMP_CGAL
274 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_symmetry.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
276 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_symmetry.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
278 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_symmetry.IMP_DISPLAY_HAS_BOOST_RANDOM
280 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_symmetry.IMP_DISPLAY_HAS_BOOST_SYSTEM
282 IMP_DISPLAY_HAS_CGAL = _IMP_symmetry.IMP_DISPLAY_HAS_CGAL
284 IMP_DISPLAY_HAS_NUMPY = _IMP_symmetry.IMP_DISPLAY_HAS_NUMPY
286 IMPDISPLAY_SHOW_WARNINGS = _IMP_symmetry.IMPDISPLAY_SHOW_WARNINGS
289 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_symmetry.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
291 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_symmetry.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
293 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_symmetry.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
295 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_symmetry.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
297 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_symmetry.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
299 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_symmetry.IMP_SCORE_FUNCTOR_HAS_CGAL
301 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_symmetry.IMP_SCORE_FUNCTOR_HAS_HDF5
303 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_symmetry.IMP_SCORE_FUNCTOR_HAS_NUMPY
305 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_symmetry.IMPSCOREFUNCTOR_SHOW_WARNINGS
308 IMP_CORE_HAS_IMP_CGAL = _IMP_symmetry.IMP_CORE_HAS_IMP_CGAL
310 IMP_CORE_HAS_IMP_KERNEL = _IMP_symmetry.IMP_CORE_HAS_IMP_KERNEL
312 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_symmetry.IMP_CORE_HAS_BOOST_FILESYSTEM
314 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_symmetry.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
316 IMP_CORE_HAS_BOOST_RANDOM = _IMP_symmetry.IMP_CORE_HAS_BOOST_RANDOM
318 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_symmetry.IMP_CORE_HAS_BOOST_SYSTEM
320 IMP_CORE_HAS_CGAL = _IMP_symmetry.IMP_CORE_HAS_CGAL
322 IMP_CORE_HAS_HDF5 = _IMP_symmetry.IMP_CORE_HAS_HDF5
324 IMP_CORE_HAS_NUMPY = _IMP_symmetry.IMP_CORE_HAS_NUMPY
326 IMPCORE_SHOW_WARNINGS = _IMP_symmetry.IMPCORE_SHOW_WARNINGS
329 IMP_SYMMETRY_HAS_IMP_CGAL = _IMP_symmetry.IMP_SYMMETRY_HAS_IMP_CGAL
331 IMP_SYMMETRY_HAS_IMP_DISPLAY = _IMP_symmetry.IMP_SYMMETRY_HAS_IMP_DISPLAY
333 IMP_SYMMETRY_HAS_IMP_KERNEL = _IMP_symmetry.IMP_SYMMETRY_HAS_IMP_KERNEL
335 IMP_SYMMETRY_HAS_IMP_SCORE_FUNCTOR = _IMP_symmetry.IMP_SYMMETRY_HAS_IMP_SCORE_FUNCTOR
337 IMP_SYMMETRY_HAS_BOOST_FILESYSTEM = _IMP_symmetry.IMP_SYMMETRY_HAS_BOOST_FILESYSTEM
339 IMP_SYMMETRY_HAS_BOOST_PROGRAMOPTIONS = _IMP_symmetry.IMP_SYMMETRY_HAS_BOOST_PROGRAMOPTIONS
341 IMP_SYMMETRY_HAS_BOOST_RANDOM = _IMP_symmetry.IMP_SYMMETRY_HAS_BOOST_RANDOM
343 IMP_SYMMETRY_HAS_BOOST_SYSTEM = _IMP_symmetry.IMP_SYMMETRY_HAS_BOOST_SYSTEM
345 IMP_SYMMETRY_HAS_CGAL = _IMP_symmetry.IMP_SYMMETRY_HAS_CGAL
347 IMP_SYMMETRY_HAS_HDF5 = _IMP_symmetry.IMP_SYMMETRY_HAS_HDF5
349 IMP_SYMMETRY_HAS_NUMPY = _IMP_symmetry.IMP_SYMMETRY_HAS_NUMPY
351 IMP_SYMMETRY_HAS_PYTHON_IHM = _IMP_symmetry.IMP_SYMMETRY_HAS_PYTHON_IHM
353 IMPSYMMETRY_SHOW_WARNINGS = _IMP_symmetry.IMPSYMMETRY_SHOW_WARNINGS
356 _object_types.append(
"BallMover")
359 _object_types.append(
"RigidBodyMover")
362 r"""Proxy of C++ IMP::symmetry::BallMover class."""
364 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
366 def __init__(self, p, ps, max_tr, ctrs, trs):
367 r"""__init__(BallMover self, Particle p, IMP::Particles ps, IMP::Float max_tr, IMP::algebra::Vector3Ds ctrs, IMP::algebra::Transformation3Ds trs) -> BallMover"""
368 _IMP_symmetry.BallMover_swiginit(self, _IMP_symmetry.new_BallMover(p, ps, max_tr, ctrs, trs))
370 def get_version_info(self):
371 r"""get_version_info(BallMover self) -> VersionInfo"""
372 return _IMP_symmetry.BallMover_get_version_info(self)
373 __swig_destroy__ = _IMP_symmetry.delete_BallMover
376 r"""__str__(BallMover self) -> std::string"""
377 return _IMP_symmetry.BallMover___str__(self)
380 r"""__repr__(BallMover self) -> std::string"""
381 return _IMP_symmetry.BallMover___repr__(self)
385 return _object_cast_to_BallMover(o)
389 _IMP_symmetry.BallMover_swigregister(BallMover)
391 r"""Proxy of C++ IMP::symmetry::RigidBodyMover class."""
393 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
395 def __init__(self, d, ps, max_tr, max_ang, ctrs, trs):
396 r"""__init__(RigidBodyMover self, RigidBody d, IMP::Particles ps, IMP::Float max_tr, IMP::Float max_ang, IMP::algebra::Vector3Ds ctrs, IMP::algebra::Transformation3Ds trs) -> RigidBodyMover"""
397 _IMP_symmetry.RigidBodyMover_swiginit(self, _IMP_symmetry.new_RigidBodyMover(d, ps, max_tr, max_ang, ctrs, trs))
399 def get_version_info(self):
400 r"""get_version_info(RigidBodyMover self) -> VersionInfo"""
401 return _IMP_symmetry.RigidBodyMover_get_version_info(self)
402 __swig_destroy__ = _IMP_symmetry.delete_RigidBodyMover
405 r"""__str__(RigidBodyMover self) -> std::string"""
406 return _IMP_symmetry.RigidBodyMover___str__(self)
409 r"""__repr__(RigidBodyMover self) -> std::string"""
410 return _IMP_symmetry.RigidBodyMover___repr__(self)
414 return _object_cast_to_RigidBodyMover(o)
418 _IMP_symmetry.RigidBodyMover_swigregister(RigidBodyMover)
421 r"""get_module_version() -> std::string const"""
422 return _IMP_symmetry.get_module_version()
425 r"""get_example_path(std::string fname) -> std::string"""
426 return _IMP_symmetry.get_example_path(fname)
429 r"""get_data_path(std::string fname) -> std::string"""
430 return _IMP_symmetry.get_data_path(fname)
432 from .
import _version_check
def get_data_path
Return the full path to one of this module's data files.
Make CGAL functionality available to IMP.
Composable functors to implement scores via compile-time composition.
def get_example_path
Return the full path to one of this module's example files.
def get_module_version
Return the version of this module, as a string.
A base class for classes which perturb particles.
Basic functionality that is expected to be used by a wide variety of IMP users.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
Output IMP model data in various file formats.