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_EXAMPLE_SwigPyIterator(object):
67 r"""Proxy of C++ swig::IMP_EXAMPLE_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_example.delete_IMP_EXAMPLE_SwigPyIterator
77 r"""value(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
78 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_value(self)
81 r"""incr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator"""
82 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_incr(self, n)
85 r"""decr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator"""
86 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_decr(self, n)
88 def distance(self, x):
89 r"""distance(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t"""
90 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_distance(self, x)
93 r"""equal(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
94 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_equal(self, x)
97 r"""copy(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator"""
98 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_copy(self)
101 r"""next(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
102 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_next(self)
105 r"""__next__(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
106 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___next__(self)
109 r"""previous(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
110 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_previous(self)
112 def advance(self, n):
113 r"""advance(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
114 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_advance(self, n)
117 r"""__eq__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
118 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___eq__(self, x)
121 r"""__ne__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
122 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___ne__(self, x)
124 def __iadd__(self, n):
125 r"""__iadd__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
126 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___iadd__(self, n)
128 def __isub__(self, n):
129 r"""__isub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
130 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___isub__(self, n)
132 def __add__(self, n):
133 r"""__add__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
134 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___add__(self, n)
136 def __sub__(self, *args):
138 __sub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator
139 __sub__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t
141 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___sub__(self, *args)
146 _IMP_example.IMP_EXAMPLE_SwigPyIterator_swigregister(IMP_EXAMPLE_SwigPyIterator)
153 IMP_DEBUG = _IMP_example.IMP_DEBUG
155 IMP_RELEASE = _IMP_example.IMP_RELEASE
157 IMP_SILENT = _IMP_example.IMP_SILENT
159 IMP_PROGRESS = _IMP_example.IMP_PROGRESS
161 IMP_TERSE = _IMP_example.IMP_TERSE
163 IMP_VERBOSE = _IMP_example.IMP_VERBOSE
165 IMP_MEMORY = _IMP_example.IMP_MEMORY
167 IMP_NONE = _IMP_example.IMP_NONE
169 IMP_USAGE = _IMP_example.IMP_USAGE
171 IMP_INTERNAL = _IMP_example.IMP_INTERNAL
173 IMP_KERNEL_HAS_LOG4CXX = _IMP_example.IMP_KERNEL_HAS_LOG4CXX
175 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_example.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
177 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_example.IMP_COMPILER_HAS_DEBUG_VECTOR
179 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_example.IMP_COMPILER_HAS_RANDOM_SHUFFLE
181 IMP_COMPILER_HAS_THREE_WAY = _IMP_example.IMP_COMPILER_HAS_THREE_WAY
183 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_example.IMP_KERNEL_HAS_BOOST_RANDOM
185 IMP_KERNEL_HAS_NUMPY = _IMP_example.IMP_KERNEL_HAS_NUMPY
187 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_example.IMP_KERNEL_HAS_BOOST_SYSTEM
189 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_example.IMP_KERNEL_HAS_GPERFTOOLS
191 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
193 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
195 IMPKERNEL_SHOW_WARNINGS = _IMP_example.IMPKERNEL_SHOW_WARNINGS
199 class _DirectorObjects:
200 """@internal Simple class to keep references to director objects
201 to prevent premature deletion."""
204 def register(self, obj):
205 """Take a reference to a director object; will only work for
206 refcounted C++ classes"""
207 if hasattr(obj,
'get_ref_count'):
208 self._objects.append(obj)
210 """Only drop our reference and allow cleanup by Python if no other
211 Python references exist (we hold 3 references: one in self._objects,
212 one in x, and one in the argument list for getrefcount) *and* no
213 other C++ references exist (the Python object always holds one)"""
214 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
215 or x.get_ref_count() > 1]
219 def get_object_count(self):
220 """Get number of director objects (useful for testing only)"""
221 return len(self._objects)
222 _director_objects = _DirectorObjects()
224 class _ostream(object):
225 r"""Proxy of C++ std::ostream class."""
227 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
229 def __init__(self, *args, **kwargs):
230 raise AttributeError(
"No constructor defined")
231 __repr__ = _swig_repr
233 def write(self, osa_buf):
234 r"""write(_ostream self, char const * osa_buf)"""
235 return _IMP_example._ostream_write(self, osa_buf)
238 _IMP_example._ostream_swigregister(_ostream)
239 IMP_C_OPEN_BINARY = _IMP_example.IMP_C_OPEN_BINARY
242 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_FILESYSTEM
244 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
246 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_example.IMP_CGAL_HAS_BOOST_RANDOM
248 IMP_CGAL_HAS_NUMPY = _IMP_example.IMP_CGAL_HAS_NUMPY
250 IMPCGAL_SHOW_WARNINGS = _IMP_example.IMPCGAL_SHOW_WARNINGS
253 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_example.IMP_ALGEBRA_HAS_IMP_CGAL
255 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
257 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
259 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_RANDOM
261 IMP_ALGEBRA_HAS_CGAL = _IMP_example.IMP_ALGEBRA_HAS_CGAL
263 IMP_ALGEBRA_HAS_NUMPY = _IMP_example.IMP_ALGEBRA_HAS_NUMPY
265 IMP_ALGEBRA_HAS_ANN = _IMP_example.IMP_ALGEBRA_HAS_ANN
267 IMPALGEBRA_SHOW_WARNINGS = _IMP_example.IMPALGEBRA_SHOW_WARNINGS
270 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_example.IMP_DISPLAY_HAS_IMP_CGAL
272 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
274 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
276 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_example.IMP_DISPLAY_HAS_BOOST_RANDOM
278 IMP_DISPLAY_HAS_CGAL = _IMP_example.IMP_DISPLAY_HAS_CGAL
280 IMP_DISPLAY_HAS_NUMPY = _IMP_example.IMP_DISPLAY_HAS_NUMPY
282 IMPDISPLAY_SHOW_WARNINGS = _IMP_example.IMPDISPLAY_SHOW_WARNINGS
285 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
287 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
289 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
291 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
293 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_CGAL
295 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_example.IMP_SCORE_FUNCTOR_HAS_HDF5
297 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_example.IMP_SCORE_FUNCTOR_HAS_NUMPY
299 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_example.IMPSCOREFUNCTOR_SHOW_WARNINGS
302 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_example.IMP_STATISTICS_HAS_IMP_CGAL
304 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
306 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
308 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_example.IMP_STATISTICS_HAS_BOOST_RANDOM
310 IMP_STATISTICS_HAS_CGAL = _IMP_example.IMP_STATISTICS_HAS_CGAL
312 IMP_STATISTICS_HAS_NUMPY = _IMP_example.IMP_STATISTICS_HAS_NUMPY
314 IMPSTATISTICS_SHOW_WARNINGS = _IMP_example.IMPSTATISTICS_SHOW_WARNINGS
317 IMP_CORE_HAS_IMP_CGAL = _IMP_example.IMP_CORE_HAS_IMP_CGAL
319 IMP_CORE_HAS_IMP_KERNEL = _IMP_example.IMP_CORE_HAS_IMP_KERNEL
321 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_FILESYSTEM
323 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
325 IMP_CORE_HAS_BOOST_RANDOM = _IMP_example.IMP_CORE_HAS_BOOST_RANDOM
327 IMP_CORE_HAS_CGAL = _IMP_example.IMP_CORE_HAS_CGAL
329 IMP_CORE_HAS_HDF5 = _IMP_example.IMP_CORE_HAS_HDF5
331 IMP_CORE_HAS_NUMPY = _IMP_example.IMP_CORE_HAS_NUMPY
333 IMPCORE_SHOW_WARNINGS = _IMP_example.IMPCORE_SHOW_WARNINGS
336 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_example.IMP_CONTAINER_HAS_IMP_ALGEBRA
338 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_example.IMP_CONTAINER_HAS_IMP_CGAL
340 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_example.IMP_CONTAINER_HAS_IMP_DISPLAY
342 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_example.IMP_CONTAINER_HAS_IMP_KERNEL
344 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
346 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
348 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
350 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_example.IMP_CONTAINER_HAS_BOOST_RANDOM
352 IMP_CONTAINER_HAS_CGAL = _IMP_example.IMP_CONTAINER_HAS_CGAL
354 IMP_CONTAINER_HAS_HDF5 = _IMP_example.IMP_CONTAINER_HAS_HDF5
356 IMP_CONTAINER_HAS_NUMPY = _IMP_example.IMP_CONTAINER_HAS_NUMPY
358 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_example.IMP_CONTAINER_HAS_PYTHON_IHM
360 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_example.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
362 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_example.IMP_CONTAINER_HAS_ROBIN_MAP
364 IMPCONTAINER_SHOW_WARNINGS = _IMP_example.IMPCONTAINER_SHOW_WARNINGS
367 IMP_ATOM_HAS_IMP_CGAL = _IMP_example.IMP_ATOM_HAS_IMP_CGAL
369 IMP_ATOM_HAS_IMP_KERNEL = _IMP_example.IMP_ATOM_HAS_IMP_KERNEL
371 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
373 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
375 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_example.IMP_ATOM_HAS_BOOST_RANDOM
377 IMP_ATOM_HAS_BOOST_REGEX = _IMP_example.IMP_ATOM_HAS_BOOST_REGEX
379 IMP_ATOM_HAS_CGAL = _IMP_example.IMP_ATOM_HAS_CGAL
381 IMP_ATOM_HAS_HDF5 = _IMP_example.IMP_ATOM_HAS_HDF5
383 IMP_ATOM_HAS_NUMPY = _IMP_example.IMP_ATOM_HAS_NUMPY
385 IMP_ATOM_HAS_PYTHON_IHM = _IMP_example.IMP_ATOM_HAS_PYTHON_IHM
387 IMPATOM_SHOW_WARNINGS = _IMP_example.IMPATOM_SHOW_WARNINGS
389 IMP_ATOM_TYPE_INDEX = _IMP_example.IMP_ATOM_TYPE_INDEX
391 IMP_RESIDUE_TYPE_INDEX = _IMP_example.IMP_RESIDUE_TYPE_INDEX
393 IMP_HIERARCHY_TYPE_INDEX = _IMP_example.IMP_HIERARCHY_TYPE_INDEX
395 IMP_CHAIN_TYPE_INDEX = _IMP_example.IMP_CHAIN_TYPE_INDEX
398 IMP_EM_HAS_IMP_CGAL = _IMP_example.IMP_EM_HAS_IMP_CGAL
400 IMP_EM_HAS_IMP_CONTAINER = _IMP_example.IMP_EM_HAS_IMP_CONTAINER
402 IMP_EM_HAS_IMP_DISPLAY = _IMP_example.IMP_EM_HAS_IMP_DISPLAY
404 IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EM_HAS_IMP_SCORE_FUNCTOR
406 IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EM_HAS_BOOST_FILESYSTEM
408 IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
410 IMP_EM_HAS_BOOST_RANDOM = _IMP_example.IMP_EM_HAS_BOOST_RANDOM
412 IMP_EM_HAS_BOOST_REGEX = _IMP_example.IMP_EM_HAS_BOOST_REGEX
414 IMP_EM_HAS_CGAL = _IMP_example.IMP_EM_HAS_CGAL
416 IMP_EM_HAS_HDF5 = _IMP_example.IMP_EM_HAS_HDF5
418 IMP_EM_HAS_NUMPY = _IMP_example.IMP_EM_HAS_NUMPY
420 IMP_EM_HAS_PYTHON_IHM = _IMP_example.IMP_EM_HAS_PYTHON_IHM
422 IMPEM_SHOW_WARNINGS = _IMP_example.IMPEM_SHOW_WARNINGS
425 IMP_SAXS_HAS_IMP_CGAL = _IMP_example.IMP_SAXS_HAS_IMP_CGAL
427 IMP_SAXS_HAS_IMP_CONTAINER = _IMP_example.IMP_SAXS_HAS_IMP_CONTAINER
429 IMP_SAXS_HAS_IMP_DISPLAY = _IMP_example.IMP_SAXS_HAS_IMP_DISPLAY
431 IMP_SAXS_HAS_IMP_KERNEL = _IMP_example.IMP_SAXS_HAS_IMP_KERNEL
433 IMP_SAXS_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_SAXS_HAS_IMP_SCORE_FUNCTOR
435 IMP_SAXS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SAXS_HAS_BOOST_FILESYSTEM
437 IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS
439 IMP_SAXS_HAS_BOOST_RANDOM = _IMP_example.IMP_SAXS_HAS_BOOST_RANDOM
441 IMP_SAXS_HAS_BOOST_REGEX = _IMP_example.IMP_SAXS_HAS_BOOST_REGEX
443 IMP_SAXS_HAS_CGAL = _IMP_example.IMP_SAXS_HAS_CGAL
445 IMP_SAXS_HAS_HDF5 = _IMP_example.IMP_SAXS_HAS_HDF5
447 IMP_SAXS_HAS_NUMPY = _IMP_example.IMP_SAXS_HAS_NUMPY
449 IMP_SAXS_HAS_PYTHON_IHM = _IMP_example.IMP_SAXS_HAS_PYTHON_IHM
451 IMPSAXS_SHOW_WARNINGS = _IMP_example.IMPSAXS_SHOW_WARNINGS
454 IMP_ISD_HAS_IMP_CGAL = _IMP_example.IMP_ISD_HAS_IMP_CGAL
456 IMP_ISD_HAS_IMP_DISPLAY = _IMP_example.IMP_ISD_HAS_IMP_DISPLAY
458 IMP_ISD_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ISD_HAS_IMP_SCORE_FUNCTOR
460 IMP_ISD_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ISD_HAS_BOOST_FILESYSTEM
462 IMP_ISD_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ISD_HAS_BOOST_PROGRAMOPTIONS
464 IMP_ISD_HAS_BOOST_RANDOM = _IMP_example.IMP_ISD_HAS_BOOST_RANDOM
466 IMP_ISD_HAS_BOOST_REGEX = _IMP_example.IMP_ISD_HAS_BOOST_REGEX
468 IMP_ISD_HAS_CGAL = _IMP_example.IMP_ISD_HAS_CGAL
470 IMP_ISD_HAS_HDF5 = _IMP_example.IMP_ISD_HAS_HDF5
472 IMP_ISD_HAS_NUMPY = _IMP_example.IMP_ISD_HAS_NUMPY
474 IMP_ISD_HAS_PYTHON_IHM = _IMP_example.IMP_ISD_HAS_PYTHON_IHM
476 IMPISD_SHOW_WARNINGS = _IMP_example.IMPISD_SHOW_WARNINGS
479 IMP_RMF_HAS_IMP_CGAL = _IMP_example.IMP_RMF_HAS_IMP_CGAL
481 IMP_RMF_HAS_IMP_EM = _IMP_example.IMP_RMF_HAS_IMP_EM
483 IMP_RMF_HAS_IMP_SAXS = _IMP_example.IMP_RMF_HAS_IMP_SAXS
485 IMP_RMF_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_RMF_HAS_IMP_SCORE_FUNCTOR
487 IMP_RMF_HAS_IMP_STATISTICS = _IMP_example.IMP_RMF_HAS_IMP_STATISTICS
489 IMP_RMF_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_FILESYSTEM
491 IMP_RMF_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS
493 IMP_RMF_HAS_BOOST_RANDOM = _IMP_example.IMP_RMF_HAS_BOOST_RANDOM
495 IMP_RMF_HAS_BOOST_REGEX = _IMP_example.IMP_RMF_HAS_BOOST_REGEX
497 IMP_RMF_HAS_CGAL = _IMP_example.IMP_RMF_HAS_CGAL
499 IMP_RMF_HAS_HDF5 = _IMP_example.IMP_RMF_HAS_HDF5
501 IMP_RMF_HAS_NUMPY = _IMP_example.IMP_RMF_HAS_NUMPY
503 IMP_RMF_HAS_PYTHON_IHM = _IMP_example.IMP_RMF_HAS_PYTHON_IHM
505 IMPRMF_SHOW_WARNINGS = _IMP_example.IMPRMF_SHOW_WARNINGS
509 IMP_DOMINO_HAS_IMP_ATOM = _IMP_example.IMP_DOMINO_HAS_IMP_ATOM
511 IMP_DOMINO_HAS_IMP_CGAL = _IMP_example.IMP_DOMINO_HAS_IMP_CGAL
513 IMP_DOMINO_HAS_IMP_EM = _IMP_example.IMP_DOMINO_HAS_IMP_EM
515 IMP_DOMINO_HAS_IMP_ISD = _IMP_example.IMP_DOMINO_HAS_IMP_ISD
517 IMP_DOMINO_HAS_IMP_KERNEL = _IMP_example.IMP_DOMINO_HAS_IMP_KERNEL
519 IMP_DOMINO_HAS_IMP_RMF = _IMP_example.IMP_DOMINO_HAS_IMP_RMF
521 IMP_DOMINO_HAS_IMP_SAXS = _IMP_example.IMP_DOMINO_HAS_IMP_SAXS
523 IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR
525 IMP_DOMINO_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_FILESYSTEM
527 IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS
529 IMP_DOMINO_HAS_BOOST_RANDOM = _IMP_example.IMP_DOMINO_HAS_BOOST_RANDOM
531 IMP_DOMINO_HAS_BOOST_REGEX = _IMP_example.IMP_DOMINO_HAS_BOOST_REGEX
533 IMP_DOMINO_HAS_CGAL = _IMP_example.IMP_DOMINO_HAS_CGAL
535 IMP_DOMINO_HAS_HDF5 = _IMP_example.IMP_DOMINO_HAS_HDF5
537 IMP_DOMINO_HAS_NUMPY = _IMP_example.IMP_DOMINO_HAS_NUMPY
539 IMP_DOMINO_HAS_RMF = _IMP_example.IMP_DOMINO_HAS_RMF
541 IMP_DOMINO_HAS_PYTHON_IHM = _IMP_example.IMP_DOMINO_HAS_PYTHON_IHM
543 IMPDOMINO_SHOW_WARNINGS = _IMP_example.IMPDOMINO_SHOW_WARNINGS
547 IMP_EXAMPLE_HAS_IMP_ALGEBRA = _IMP_example.IMP_EXAMPLE_HAS_IMP_ALGEBRA
549 IMP_EXAMPLE_HAS_IMP_CGAL = _IMP_example.IMP_EXAMPLE_HAS_IMP_CGAL
551 IMP_EXAMPLE_HAS_IMP_DISPLAY = _IMP_example.IMP_EXAMPLE_HAS_IMP_DISPLAY
553 IMP_EXAMPLE_HAS_IMP_EM = _IMP_example.IMP_EXAMPLE_HAS_IMP_EM
555 IMP_EXAMPLE_HAS_IMP_ISD = _IMP_example.IMP_EXAMPLE_HAS_IMP_ISD
557 IMP_EXAMPLE_HAS_IMP_KERNEL = _IMP_example.IMP_EXAMPLE_HAS_IMP_KERNEL
559 IMP_EXAMPLE_HAS_IMP_RMF = _IMP_example.IMP_EXAMPLE_HAS_IMP_RMF
561 IMP_EXAMPLE_HAS_IMP_SAXS = _IMP_example.IMP_EXAMPLE_HAS_IMP_SAXS
563 IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR
565 IMP_EXAMPLE_HAS_IMP_STATISTICS = _IMP_example.IMP_EXAMPLE_HAS_IMP_STATISTICS
567 IMP_EXAMPLE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_FILESYSTEM
569 IMP_EXAMPLE_HAS_BOOST_GRAPH = _IMP_example.IMP_EXAMPLE_HAS_BOOST_GRAPH
571 IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS
573 IMP_EXAMPLE_HAS_BOOST_RANDOM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_RANDOM
575 IMP_EXAMPLE_HAS_BOOST_REGEX = _IMP_example.IMP_EXAMPLE_HAS_BOOST_REGEX
577 IMP_EXAMPLE_HAS_CGAL = _IMP_example.IMP_EXAMPLE_HAS_CGAL
579 IMP_EXAMPLE_HAS_HDF5 = _IMP_example.IMP_EXAMPLE_HAS_HDF5
581 IMP_EXAMPLE_HAS_NUMPY = _IMP_example.IMP_EXAMPLE_HAS_NUMPY
583 IMP_EXAMPLE_HAS_RMF = _IMP_example.IMP_EXAMPLE_HAS_RMF
585 IMP_EXAMPLE_HAS_PYTHON_IHM = _IMP_example.IMP_EXAMPLE_HAS_PYTHON_IHM
587 IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY = _IMP_example.IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY
589 IMPEXAMPLE_SHOW_WARNINGS = _IMP_example.IMPEXAMPLE_SHOW_WARNINGS
592 _object_types.append(
"ExampleRestraint")
595 def _object_cast_to_ExampleRestraint(o):
596 r"""_object_cast_to_ExampleRestraint(Object o) -> ExampleRestraint"""
597 return _IMP_example._object_cast_to_ExampleRestraint(o)
599 def ExampleDecorators(l=[]):
600 return [ExampleDecorator(x)
for x
in l]
601 _plural_types.append(
"ExampleDecorators")
604 _value_types.append(
"ExampleDecorator")
607 _object_types.append(
"ExampleUnaryFunction")
610 def _object_cast_to_ExampleUnaryFunction(o):
611 r"""_object_cast_to_ExampleUnaryFunction(Object o) -> ExampleUnaryFunction"""
612 return _IMP_example._object_cast_to_ExampleUnaryFunction(o)
614 _object_types.append(
"ExampleSingletonModifier")
617 def _object_cast_to_ExampleSingletonModifier(o):
618 r"""_object_cast_to_ExampleSingletonModifier(Object o) -> ExampleSingletonModifier"""
619 return _IMP_example._object_cast_to_ExampleSingletonModifier(o)
621 _object_types.append(
"ExamplePairScore")
624 def _object_cast_to_ExamplePairScore(o):
625 r"""_object_cast_to_ExamplePairScore(Object o) -> ExamplePairScore"""
626 return _IMP_example._object_cast_to_ExamplePairScore(o)
628 _object_types.append(
"ExampleSubsetFilterTable")
631 def _object_cast_to_ExampleSubsetFilterTable(o):
632 r"""_object_cast_to_ExampleSubsetFilterTable(Object o) -> ExampleSubsetFilterTable"""
633 return _IMP_example._object_cast_to_ExampleSubsetFilterTable(o)
635 _object_types.append(
"ExampleConstraint")
638 def _object_cast_to_ExampleConstraint(o):
639 r"""_object_cast_to_ExampleConstraint(Object o) -> ExampleConstraint"""
640 return _IMP_example._object_cast_to_ExampleConstraint(o)
642 _object_types.append(
"ExampleObject")
645 def _object_cast_to_ExampleObject(o):
646 r"""_object_cast_to_ExampleObject(Object o) -> ExampleObject"""
647 return _IMP_example._object_cast_to_ExampleObject(o)
649 ExampleTemplateClass3Ds=list
650 _plural_types.append(
"ExampleTemplateClass3Ds")
651 _value_types.append(
"ExampleTemplateClass3D")
654 def create_model_and_particles():
659 for i
in range(0,100):
660 p = m.add_particle(
"p")
664 d.set_coordinates_are_optimized(
True)
670 """An example restraint written in Python.
671 This should be functionally equivalent to the C++ ExampleRestraint.
673 def __init__(self, m, p, k):
674 super().__init__(m,
"PythonExampleRestraint%1%")
675 self.p, self.k = p, k
678 """Pure Python implementation of the restraint"""
680 score = .5 * self.k * d.get_z() * d.get_z()
681 if sa.get_derivative_accumulator():
682 deriv = self.k * d.get_z()
683 d.add_to_derivative(2, deriv, sa.get_derivative_accumulator())
687 """Implementation of the restraint using JAX"""
689 def jax_restraint(X, k, pi):
691 return 0.5 * k * xyz[2] * xyz[2]
692 f = functools.partial(jax_restraint, k=self.k, pi=self.p)
693 return self._wrap_jax(f)
696 return [self.
get_model().get_particle(self.p)]
702 """An example PairScore written in Python.
703 This should be functionally equivalent to the C++ ExamplePairScore.
705 def __init__(self, x0, k):
707 self.x0, self.k = x0, k
710 """Pure Python implementation of the score"""
713 diff = (d0.get_coordinates()
714 - d1.get_coordinates()).get_magnitude() - self.x0
715 score = .5 * self.k * diff * diff
718 delta = d0.get_coordinates() - d1.get_coordinates()
719 udelta = delta.get_unit_vector()
721 d0.add_to_derivatives(udelta * dv, da)
722 d1.add_to_derivatives(-udelta * dv, da)
726 """Implementation of the score using JAX"""
727 import jax.numpy
as jnp
729 def pair_score(X, indexes, x0, k):
730 xyzs = X[
'xyz'][indexes]
731 diff = jnp.linalg.norm(xyzs[:,0] - xyzs[:,1], axis=1) - x0
732 return 0.5 * k * diff * diff
733 f = functools.partial(pair_score, x0=self.x0, k=self.k)
734 return self._wrap_jax(f)
743 """An example UnaryFunction written in Python.
744 This should be functionally equivalent to the C++ ExampleUnaryFunction.
746 def __init__(self, center, k):
748 self.center, self.k = center, k
751 return (self.
evaluate(feature), self.k * (feature - self.center))
754 return .5 * self.k * (feature - self.center) * (feature - self.center)
757 """Implementation of the unary function using JAX"""
759 def score(feature, center, k):
760 return 0.5 * k * (feature - center) ** 2
761 return functools.partial(score, center=self.center, k=self.k)
766 """An example Constraint written in Python.
767 This should be functionally equivalent to the C++ ExampleConstraint.
772 def __init__(self, p):
773 super().__init__(p.get_model(),
"ExampleConstraint%1%")
776 PythonExampleConstraint.k =
IMP.IntKey(
"Constraint key")
777 if not p.has_attribute(self.k):
778 p.add_attribute(self.k, 0)
780 def do_update_attributes(self):
781 self.p.set_value(self.k, self.p.get_value(self.k) + 1)
783 def do_update_derivatives(self, da):
796 """An example SingletonModifier written in Python.
797 This should be functionally equivalent to the C++
798 ExampleSingletonModifier.
801 def __init__(self, bb):
802 super().__init__(
"ExampleSingletonModifier%1%")
809 while d.get_coordinate(i) < self.bb.get_corner(0)[i]:
810 d.set_coordinate(i,d.get_coordinate(i) + \
811 (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
812 while d.get_coordinate(i) > self.bb.get_corner(1)[i]:
813 d.set_coordinate(i,d.get_coordinate(i) - \
814 (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
824 r"""Proxy of C++ IMP::example::ExampleRestraint class."""
826 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
828 def __init__(self, *args):
830 __init__(ExampleRestraint self, Model m, ParticleIndex p, double k) -> ExampleRestraint
831 __init__(ExampleRestraint self) -> ExampleRestraint
833 _IMP_example.ExampleRestraint_swiginit(self, _IMP_example.new_ExampleRestraint(*args))
835 def do_add_score_and_derivatives(self, sa):
836 r"""do_add_score_and_derivatives(ExampleRestraint self, ScoreAccumulator sa)"""
837 return _IMP_example.ExampleRestraint_do_add_score_and_derivatives(self, sa)
840 r"""do_get_inputs(ExampleRestraint self) -> IMP::ModelObjectsTemp"""
841 return _IMP_example.ExampleRestraint_do_get_inputs(self)
844 r"""get_version_info(ExampleRestraint self) -> VersionInfo"""
845 return _IMP_example.ExampleRestraint_get_version_info(self)
846 __swig_destroy__ = _IMP_example.delete_ExampleRestraint
849 r"""__str__(ExampleRestraint self) -> std::string"""
850 return _IMP_example.ExampleRestraint___str__(self)
853 r"""__repr__(ExampleRestraint self) -> std::string"""
854 return _IMP_example.ExampleRestraint___repr__(self)
858 return _object_cast_to_ExampleRestraint(o)
861 def _get_as_binary(self):
862 r"""_get_as_binary(ExampleRestraint self) -> PyObject *"""
863 return _IMP_example.ExampleRestraint__get_as_binary(self)
865 def _set_from_binary(self, p):
866 r"""_set_from_binary(ExampleRestraint self, PyObject * p)"""
867 return _IMP_example.ExampleRestraint__set_from_binary(self, p)
869 def __getstate__(self):
870 p = self._get_as_binary()
871 if len(self.__dict__) > 1:
872 d = self.__dict__.copy()
877 def __setstate__(self, p):
878 if not hasattr(self,
'this'):
880 if isinstance(p, tuple):
882 self.__dict__.update(d)
883 return self._set_from_binary(p)
887 _IMP_example.ExampleRestraint_swigregister(ExampleRestraint)
889 r"""Proxy of C++ IMP::example::ExampleDecorator class."""
891 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
893 def get_decorator_name(self):
894 r"""get_decorator_name(ExampleDecorator self) -> std::string"""
895 return _IMP_example.ExampleDecorator_get_decorator_name(self)
897 def set_decorator_name(self, nm):
898 r"""set_decorator_name(ExampleDecorator self, std::string nm)"""
899 return _IMP_example.ExampleDecorator_set_decorator_name(self, nm)
901 def __init__(self, *args):
903 __init__(ExampleDecorator self) -> ExampleDecorator
904 __init__(ExampleDecorator self, Model m, ParticleIndex id) -> ExampleDecorator
905 __init__(ExampleDecorator self, _ParticleAdaptor d) -> ExampleDecorator
907 _IMP_example.ExampleDecorator_swiginit(self, _IMP_example.new_ExampleDecorator(*args))
910 def get_is_setup(*args):
912 get_is_setup(Model m, ParticleIndex pi) -> bool
913 get_is_setup(_ParticleAdaptor p) -> bool
915 return _IMP_example.ExampleDecorator_get_is_setup(*args)
917 def show(self, *args):
918 r"""show(ExampleDecorator self, _ostream out=std::cout)"""
919 return _IMP_example.ExampleDecorator_show(self, *args)
922 def setup_particle(*args):
924 setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
925 setup_particle(_ParticleAdaptor pa, std::string name) -> ExampleDecorator
927 return _IMP_example.ExampleDecorator_setup_particle(*args)
929 def add_attribute(self, *args):
931 add_attribute(ExampleDecorator self, FloatKey k, IMP::Float v, bool opt)
932 add_attribute(ExampleDecorator self, FloatKey a0, IMP::Float a1)
933 add_attribute(ExampleDecorator self, IntKey a0, IMP::Int a1)
934 add_attribute(ExampleDecorator self, FloatsKey a0, IMP::Floats a1)
935 add_attribute(ExampleDecorator self, IntsKey a0, IMP::Ints a1)
936 add_attribute(ExampleDecorator self, StringKey a0, IMP::String a1)
937 add_attribute(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
938 add_attribute(ExampleDecorator self, ObjectKey a0, Object a1)
939 add_attribute(ExampleDecorator self, SparseFloatKey a0, IMP::Float a1)
940 add_attribute(ExampleDecorator self, SparseIntKey a0, IMP::Int a1)
941 add_attribute(ExampleDecorator self, SparseStringKey a0, IMP::String a1)
942 add_attribute(ExampleDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
944 return _IMP_example.ExampleDecorator_add_attribute(self, *args)
946 def get_value(self, *args):
948 get_value(ExampleDecorator self, FloatKey a0) -> IMP::Float
949 get_value(ExampleDecorator self, IntKey a0) -> IMP::Int
950 get_value(ExampleDecorator self, FloatsKey a0) -> IMP::Floats
951 get_value(ExampleDecorator self, IntsKey a0) -> IMP::Ints
952 get_value(ExampleDecorator self, StringKey a0) -> IMP::String
953 get_value(ExampleDecorator self, ParticleIndexKey a0) -> Particle
954 get_value(ExampleDecorator self, ObjectKey a0) -> Object
955 get_value(ExampleDecorator self, SparseFloatKey a0) -> IMP::Float
956 get_value(ExampleDecorator self, SparseIntKey a0) -> IMP::Int
957 get_value(ExampleDecorator self, SparseStringKey a0) -> IMP::String
958 get_value(ExampleDecorator self, SparseParticleIndexKey a0) -> ParticleIndex
960 return _IMP_example.ExampleDecorator_get_value(self, *args)
962 def set_value(self, *args):
964 set_value(ExampleDecorator self, FloatKey a0, IMP::Float a1)
965 set_value(ExampleDecorator self, IntKey a0, IMP::Int a1)
966 set_value(ExampleDecorator self, FloatsKey a0, IMP::Floats a1)
967 set_value(ExampleDecorator self, IntsKey a0, IMP::Ints a1)
968 set_value(ExampleDecorator self, StringKey a0, IMP::String a1)
969 set_value(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
970 set_value(ExampleDecorator self, ObjectKey a0, Object a1)
971 set_value(ExampleDecorator self, SparseFloatKey a0, IMP::Float a1)
972 set_value(ExampleDecorator self, SparseIntKey a0, IMP::Int a1)
973 set_value(ExampleDecorator self, SparseStringKey a0, IMP::String a1)
974 set_value(ExampleDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
976 return _IMP_example.ExampleDecorator_set_value(self, *args)
978 def remove_attribute(self, *args):
980 remove_attribute(ExampleDecorator self, FloatKey a0)
981 remove_attribute(ExampleDecorator self, IntKey a0)
982 remove_attribute(ExampleDecorator self, FloatsKey a0)
983 remove_attribute(ExampleDecorator self, IntsKey a0)
984 remove_attribute(ExampleDecorator self, StringKey a0)
985 remove_attribute(ExampleDecorator self, ParticleIndexKey a0)
986 remove_attribute(ExampleDecorator self, ObjectKey a0)
987 remove_attribute(ExampleDecorator self, SparseFloatKey a0)
988 remove_attribute(ExampleDecorator self, SparseIntKey a0)
989 remove_attribute(ExampleDecorator self, SparseStringKey a0)
990 remove_attribute(ExampleDecorator self, SparseParticleIndexKey a0)
992 return _IMP_example.ExampleDecorator_remove_attribute(self, *args)
994 def has_attribute(self, *args):
996 has_attribute(ExampleDecorator self, FloatKey a0) -> bool
997 has_attribute(ExampleDecorator self, IntKey a0) -> bool
998 has_attribute(ExampleDecorator self, FloatsKey a0) -> bool
999 has_attribute(ExampleDecorator self, IntsKey a0) -> bool
1000 has_attribute(ExampleDecorator self, StringKey a0) -> bool
1001 has_attribute(ExampleDecorator self, ParticleIndexKey a0) -> bool
1002 has_attribute(ExampleDecorator self, ObjectKey a0) -> bool
1003 has_attribute(ExampleDecorator self, SparseFloatKey a0) -> bool
1004 has_attribute(ExampleDecorator self, SparseIntKey a0) -> bool
1005 has_attribute(ExampleDecorator self, SparseStringKey a0) -> bool
1006 has_attribute(ExampleDecorator self, SparseParticleIndexKey a0) -> bool
1008 return _IMP_example.ExampleDecorator_has_attribute(self, *args)
1010 def get_derivative(self, a0):
1011 r"""get_derivative(ExampleDecorator self, FloatKey a0) -> double"""
1012 return _IMP_example.ExampleDecorator_get_derivative(self, a0)
1015 r"""get_name(ExampleDecorator self) -> std::string"""
1016 return _IMP_example.ExampleDecorator_get_name(self)
1019 r"""clear_caches(ExampleDecorator self)"""
1020 return _IMP_example.ExampleDecorator_clear_caches(self)
1022 def set_name(self, a0):
1023 r"""set_name(ExampleDecorator self, std::string a0)"""
1024 return _IMP_example.ExampleDecorator_set_name(self, a0)
1027 r"""set_check_level(ExampleDecorator self, IMP::CheckLevel a0)"""
1028 return _IMP_example.ExampleDecorator_set_check_level(self, a0)
1030 def add_to_derivative(self, a0, a1, a2):
1031 r"""add_to_derivative(ExampleDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
1032 return _IMP_example.ExampleDecorator_add_to_derivative(self, a0, a1, a2)
1034 def set_is_optimized(self, a0, a1):
1035 r"""set_is_optimized(ExampleDecorator self, FloatKey a0, bool a1)"""
1036 return _IMP_example.ExampleDecorator_set_is_optimized(self, a0, a1)
1038 def get_is_optimized(self, a0):
1039 r"""get_is_optimized(ExampleDecorator self, FloatKey a0) -> bool"""
1040 return _IMP_example.ExampleDecorator_get_is_optimized(self, a0)
1042 def get_check_level(self):
1043 r"""get_check_level(ExampleDecorator self) -> IMP::CheckLevel"""
1044 return _IMP_example.ExampleDecorator_get_check_level(self)
1046 def __eq__(self, *args):
1048 __eq__(ExampleDecorator self, ExampleDecorator o) -> bool
1049 __eq__(ExampleDecorator self, Particle d) -> bool
1051 return _IMP_example.ExampleDecorator___eq__(self, *args)
1053 def __ne__(self, *args):
1055 __ne__(ExampleDecorator self, ExampleDecorator o) -> bool
1056 __ne__(ExampleDecorator self, Particle d) -> bool
1058 return _IMP_example.ExampleDecorator___ne__(self, *args)
1060 def __le__(self, *args):
1062 __le__(ExampleDecorator self, ExampleDecorator o) -> bool
1063 __le__(ExampleDecorator self, Particle d) -> bool
1065 return _IMP_example.ExampleDecorator___le__(self, *args)
1067 def __lt__(self, *args):
1069 __lt__(ExampleDecorator self, ExampleDecorator o) -> bool
1070 __lt__(ExampleDecorator self, Particle d) -> bool
1072 return _IMP_example.ExampleDecorator___lt__(self, *args)
1074 def __ge__(self, *args):
1076 __ge__(ExampleDecorator self, ExampleDecorator o) -> bool
1077 __ge__(ExampleDecorator self, Particle d) -> bool
1079 return _IMP_example.ExampleDecorator___ge__(self, *args)
1081 def __gt__(self, *args):
1083 __gt__(ExampleDecorator self, ExampleDecorator o) -> bool
1084 __gt__(ExampleDecorator self, Particle d) -> bool
1086 return _IMP_example.ExampleDecorator___gt__(self, *args)
1089 r"""__hash__(ExampleDecorator self) -> std::size_t"""
1090 return _IMP_example.ExampleDecorator___hash__(self)
1093 r"""__str__(ExampleDecorator self) -> std::string"""
1094 return _IMP_example.ExampleDecorator___str__(self)
1097 r"""__repr__(ExampleDecorator self) -> std::string"""
1098 return _IMP_example.ExampleDecorator___repr__(self)
1100 def _get_as_binary(self):
1101 r"""_get_as_binary(ExampleDecorator self) -> PyObject *"""
1102 return _IMP_example.ExampleDecorator__get_as_binary(self)
1104 def _set_from_binary(self, p):
1105 r"""_set_from_binary(ExampleDecorator self, PyObject * p)"""
1106 return _IMP_example.ExampleDecorator__set_from_binary(self, p)
1108 def __getstate__(self):
1109 p = self._get_as_binary()
1110 if len(self.__dict__) > 1:
1111 d = self.__dict__.copy()
1116 def __setstate__(self, p):
1117 if not hasattr(self,
'this'):
1119 if isinstance(p, tuple):
1121 self.__dict__.update(d)
1122 return self._set_from_binary(p)
1124 __swig_destroy__ = _IMP_example.delete_ExampleDecorator
1127 _IMP_example.ExampleDecorator_swigregister(ExampleDecorator)
1129 def __lshift__(out, n):
1130 r"""__lshift__(_ostream out, ExampleDecorator n) -> _ostream"""
1131 return _IMP_example.__lshift__(out, n)
1133 r"""Proxy of C++ IMP::example::ExampleUnaryFunction class."""
1135 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1137 def __init__(self, *args):
1139 __init__(ExampleUnaryFunction self, IMP::Float center, IMP::Float k) -> ExampleUnaryFunction
1140 __init__(ExampleUnaryFunction self) -> ExampleUnaryFunction
1142 _IMP_example.ExampleUnaryFunction_swiginit(self, _IMP_example.new_ExampleUnaryFunction(*args))
1145 r"""get_version_info(ExampleUnaryFunction self) -> VersionInfo"""
1146 return _IMP_example.ExampleUnaryFunction_get_version_info(self)
1147 __swig_destroy__ = _IMP_example.delete_ExampleUnaryFunction
1150 r"""__str__(ExampleUnaryFunction self) -> std::string"""
1151 return _IMP_example.ExampleUnaryFunction___str__(self)
1154 r"""__repr__(ExampleUnaryFunction self) -> std::string"""
1155 return _IMP_example.ExampleUnaryFunction___repr__(self)
1159 return _object_cast_to_ExampleUnaryFunction(o)
1162 def _get_as_binary(self):
1163 r"""_get_as_binary(ExampleUnaryFunction self) -> PyObject *"""
1164 return _IMP_example.ExampleUnaryFunction__get_as_binary(self)
1166 def _set_from_binary(self, p):
1167 r"""_set_from_binary(ExampleUnaryFunction self, PyObject * p)"""
1168 return _IMP_example.ExampleUnaryFunction__set_from_binary(self, p)
1170 def __getstate__(self):
1171 p = self._get_as_binary()
1172 if len(self.__dict__) > 1:
1173 d = self.__dict__.copy()
1178 def __setstate__(self, p):
1179 if not hasattr(self,
'this'):
1181 if isinstance(p, tuple):
1183 self.__dict__.update(d)
1184 return self._set_from_binary(p)
1188 _IMP_example.ExampleUnaryFunction_swigregister(ExampleUnaryFunction)
1190 r"""Proxy of C++ IMP::example::ExampleObject class."""
1192 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1194 def __init__(self, *args):
1196 __init__(ExampleObject self, IMP::Floats const & data) -> ExampleObject
1197 __init__(ExampleObject self) -> ExampleObject
1199 _IMP_example.ExampleObject_swiginit(self, _IMP_example.new_ExampleObject(*args))
1201 def get_data(self, i):
1202 r"""get_data(ExampleObject self, unsigned int i) -> double"""
1203 return _IMP_example.ExampleObject_get_data(self, i)
1206 r"""get_version_info(ExampleObject self) -> VersionInfo"""
1207 return _IMP_example.ExampleObject_get_version_info(self)
1208 __swig_destroy__ = _IMP_example.delete_ExampleObject
1211 r"""__str__(ExampleObject self) -> std::string"""
1212 return _IMP_example.ExampleObject___str__(self)
1215 r"""__repr__(ExampleObject self) -> std::string"""
1216 return _IMP_example.ExampleObject___repr__(self)
1220 return _object_cast_to_ExampleObject(o)
1223 def _get_as_binary(self):
1224 r"""_get_as_binary(ExampleObject self) -> PyObject *"""
1225 return _IMP_example.ExampleObject__get_as_binary(self)
1227 def _set_from_binary(self, p):
1228 r"""_set_from_binary(ExampleObject self, PyObject * p)"""
1229 return _IMP_example.ExampleObject__set_from_binary(self, p)
1231 def __getstate__(self):
1232 p = self._get_as_binary()
1233 if len(self.__dict__) > 1:
1234 d = self.__dict__.copy()
1239 def __setstate__(self, p):
1240 if not hasattr(self,
'this'):
1242 if isinstance(p, tuple):
1244 self.__dict__.update(d)
1245 return self._set_from_binary(p)
1249 _IMP_example.ExampleObject_swigregister(ExampleObject)
1251 r"""Proxy of C++ IMP::example::ExampleSingletonModifier class."""
1253 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1255 def __init__(self, *args):
1257 __init__(ExampleSingletonModifier self, BoundingBox3D bb) -> ExampleSingletonModifier
1258 __init__(ExampleSingletonModifier self) -> ExampleSingletonModifier
1260 _IMP_example.ExampleSingletonModifier_swiginit(self, _IMP_example.new_ExampleSingletonModifier(*args))
1263 r"""do_get_inputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1264 return _IMP_example.ExampleSingletonModifier_do_get_inputs(self, m, pis)
1267 r"""do_get_outputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1268 return _IMP_example.ExampleSingletonModifier_do_get_outputs(self, m, pis)
1271 r"""get_version_info(ExampleSingletonModifier self) -> VersionInfo"""
1272 return _IMP_example.ExampleSingletonModifier_get_version_info(self)
1273 __swig_destroy__ = _IMP_example.delete_ExampleSingletonModifier
1276 r"""__str__(ExampleSingletonModifier self) -> std::string"""
1277 return _IMP_example.ExampleSingletonModifier___str__(self)
1280 r"""__repr__(ExampleSingletonModifier self) -> std::string"""
1281 return _IMP_example.ExampleSingletonModifier___repr__(self)
1285 return _object_cast_to_ExampleSingletonModifier(o)
1288 def _get_as_binary(self):
1289 r"""_get_as_binary(ExampleSingletonModifier self) -> PyObject *"""
1290 return _IMP_example.ExampleSingletonModifier__get_as_binary(self)
1292 def _set_from_binary(self, p):
1293 r"""_set_from_binary(ExampleSingletonModifier self, PyObject * p)"""
1294 return _IMP_example.ExampleSingletonModifier__set_from_binary(self, p)
1296 def __getstate__(self):
1297 p = self._get_as_binary()
1298 if len(self.__dict__) > 1:
1299 d = self.__dict__.copy()
1304 def __setstate__(self, p):
1305 if not hasattr(self,
'this'):
1307 if isinstance(p, tuple):
1309 self.__dict__.update(d)
1310 return self._set_from_binary(p)
1314 _IMP_example.ExampleSingletonModifier_swigregister(ExampleSingletonModifier)
1316 r"""Proxy of C++ IMP::example::ExamplePairScore class."""
1318 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1320 def __init__(self, *args):
1322 __init__(ExamplePairScore self, double x0, double k) -> ExamplePairScore
1323 __init__(ExamplePairScore self) -> ExamplePairScore
1325 _IMP_example.ExamplePairScore_swiginit(self, _IMP_example.new_ExamplePairScore(*args))
1328 r"""do_get_inputs(ExamplePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1329 return _IMP_example.ExamplePairScore_do_get_inputs(self, m, pis)
1331 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
1332 r"""evaluate_indexes(ExamplePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
1333 return _IMP_example.ExamplePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
1335 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
1336 r"""evaluate_indexes_scores(ExamplePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, DistBase score, bool all_indexes_checked=False) -> double"""
1337 return _IMP_example.ExamplePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
1339 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
1340 r"""evaluate_indexes_delta(ExamplePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, DistBase score, bool all_indexes_checked=False) -> double"""
1341 return _IMP_example.ExamplePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
1343 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
1344 r"""evaluate_if_good_indexes(ExamplePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
1345 return _IMP_example.ExamplePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
1348 r"""get_version_info(ExamplePairScore self) -> VersionInfo"""
1349 return _IMP_example.ExamplePairScore_get_version_info(self)
1350 __swig_destroy__ = _IMP_example.delete_ExamplePairScore
1353 r"""__str__(ExamplePairScore self) -> std::string"""
1354 return _IMP_example.ExamplePairScore___str__(self)
1357 r"""__repr__(ExamplePairScore self) -> std::string"""
1358 return _IMP_example.ExamplePairScore___repr__(self)
1362 return _object_cast_to_ExamplePairScore(o)
1365 def _get_as_binary(self):
1366 r"""_get_as_binary(ExamplePairScore self) -> PyObject *"""
1367 return _IMP_example.ExamplePairScore__get_as_binary(self)
1369 def _set_from_binary(self, p):
1370 r"""_set_from_binary(ExamplePairScore self, PyObject * p)"""
1371 return _IMP_example.ExamplePairScore__set_from_binary(self, p)
1373 def __getstate__(self):
1374 p = self._get_as_binary()
1375 if len(self.__dict__) > 1:
1376 d = self.__dict__.copy()
1381 def __setstate__(self, p):
1382 if not hasattr(self,
'this'):
1384 if isinstance(p, tuple):
1386 self.__dict__.update(d)
1387 return self._set_from_binary(p)
1391 _IMP_example.ExamplePairScore_swigregister(ExamplePairScore)
1393 r"""Proxy of C++ IMP::example::ExampleSubsetFilterTable class."""
1395 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1397 def __init__(self, max_diff, pt):
1398 r"""__init__(ExampleSubsetFilterTable self, unsigned int max_diff, IMP::ParticlesTemp const & pt) -> ExampleSubsetFilterTable"""
1399 _IMP_example.ExampleSubsetFilterTable_swiginit(self, _IMP_example.new_ExampleSubsetFilterTable(max_diff, pt))
1402 r"""get_version_info(ExampleSubsetFilterTable self) -> VersionInfo"""
1403 return _IMP_example.ExampleSubsetFilterTable_get_version_info(self)
1404 __swig_destroy__ = _IMP_example.delete_ExampleSubsetFilterTable
1407 r"""__str__(ExampleSubsetFilterTable self) -> std::string"""
1408 return _IMP_example.ExampleSubsetFilterTable___str__(self)
1411 r"""__repr__(ExampleSubsetFilterTable self) -> std::string"""
1412 return _IMP_example.ExampleSubsetFilterTable___repr__(self)
1416 return _object_cast_to_ExampleSubsetFilterTable(o)
1420 _IMP_example.ExampleSubsetFilterTable_swigregister(ExampleSubsetFilterTable)
1422 r"""Proxy of C++ IMP::example::ExampleConstraint class."""
1424 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1426 def __init__(self, *args):
1428 __init__(ExampleConstraint self, Particle p) -> ExampleConstraint
1429 __init__(ExampleConstraint self) -> ExampleConstraint
1431 _IMP_example.ExampleConstraint_swiginit(self, _IMP_example.new_ExampleConstraint(*args))
1434 r"""do_get_inputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1435 return _IMP_example.ExampleConstraint_do_get_inputs(self)
1438 r"""do_get_outputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1439 return _IMP_example.ExampleConstraint_do_get_outputs(self)
1443 r"""get_key() -> IntKey"""
1444 return _IMP_example.ExampleConstraint_get_key()
1447 r"""get_version_info(ExampleConstraint self) -> VersionInfo"""
1448 return _IMP_example.ExampleConstraint_get_version_info(self)
1449 __swig_destroy__ = _IMP_example.delete_ExampleConstraint
1452 r"""__str__(ExampleConstraint self) -> std::string"""
1453 return _IMP_example.ExampleConstraint___str__(self)
1456 r"""__repr__(ExampleConstraint self) -> std::string"""
1457 return _IMP_example.ExampleConstraint___repr__(self)
1461 return _object_cast_to_ExampleConstraint(o)
1464 def _get_as_binary(self):
1465 r"""_get_as_binary(ExampleConstraint self) -> PyObject *"""
1466 return _IMP_example.ExampleConstraint__get_as_binary(self)
1468 def _set_from_binary(self, p):
1469 r"""_set_from_binary(ExampleConstraint self, PyObject * p)"""
1470 return _IMP_example.ExampleConstraint__set_from_binary(self, p)
1472 def __getstate__(self):
1473 p = self._get_as_binary()
1474 if len(self.__dict__) > 1:
1475 d = self.__dict__.copy()
1480 def __setstate__(self, p):
1481 if not hasattr(self,
'this'):
1483 if isinstance(p, tuple):
1485 self.__dict__.update(d)
1486 return self._set_from_binary(p)
1490 _IMP_example.ExampleConstraint_swigregister(ExampleConstraint)
1493 r"""get_number_of_incidences(IMP::ParticlesTemp const & psa, IMP::ParticlesTemp const & psb, double point_distance) -> unsigned int"""
1494 return _IMP_example.get_number_of_incidences(psa, psb, point_distance)
1497 r"""create_chain_restraint(Model m, IMP::ParticleIndexes const & ps, double length_factor, double k, std::string name) -> Restraint"""
1498 return _IMP_example.create_chain_restraint(m, ps, length_factor, k, name)
1501 r"""create_excluded_volume(Model m, IMP::ParticleIndexes const & ps, double k, std::string name) -> Restraint"""
1502 return _IMP_example.create_excluded_volume(m, ps, k, name)
1504 r"""Proxy of C++ IMP::example::ExampleTemplateClassD< 3 > class."""
1506 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1508 def __init__(self, *args):
1510 __init__(ExampleTemplateClass3D self) -> ExampleTemplateClass3D
1511 __init__(ExampleTemplateClass3D self, Vector3D a, Vector3D b) -> ExampleTemplateClass3D
1513 _IMP_example.ExampleTemplateClass3D_swiginit(self, _IMP_example.new_ExampleTemplateClass3D(*args))
1515 def get_point(self, i):
1516 r"""get_point(ExampleTemplateClass3D self, unsigned int i) -> Vector3D"""
1517 return _IMP_example.ExampleTemplateClass3D_get_point(self, i)
1519 def show(self, *args):
1520 r"""show(ExampleTemplateClass3D self, _ostream out=std::cout)"""
1521 return _IMP_example.ExampleTemplateClass3D_show(self, *args)
1524 r"""__str__(ExampleTemplateClass3D self) -> std::string"""
1525 return _IMP_example.ExampleTemplateClass3D___str__(self)
1528 r"""__repr__(ExampleTemplateClass3D self) -> std::string"""
1529 return _IMP_example.ExampleTemplateClass3D___repr__(self)
1530 __swig_destroy__ = _IMP_example.delete_ExampleTemplateClass3D
1533 _IMP_example.ExampleTemplateClass3D_swigregister(ExampleTemplateClass3D)
1535 def get_module_name():
1536 r"""get_module_name() -> std::string const"""
1537 return _IMP_example.get_module_name()
1540 r"""get_module_version() -> std::string const"""
1541 return _IMP_example.get_module_version()
1544 r"""get_example_path(std::string fname) -> std::string"""
1545 return _IMP_example.get_example_path(fname)
1548 r"""get_data_path(std::string fname) -> std::string"""
1549 return _IMP_example.get_data_path(fname)
1551 from .
import _version_check
unsigned int get_number_of_incidences(const ParticlesTemp &psa, const ParticlesTemp &psb, double point_distance)
A base class for modifiers of ParticlesTemp.
Abstract class for scoring object(s) of type ParticleIndexPair.
virtual double evaluate(double feature) const
Calculate score with respect to the given feature.
An example PairScore written in Python.
An example SingletonModifier written in Python.
Various classes to hold sets of particles.
static XYZR setup_particle(Model *m, ParticleIndex pi)
An example UnaryFunction written in Python.
Make CGAL functionality available to IMP.
A line segment templated on the dimension.
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
Get the particles from a list of indexes.
virtual void clear_caches()
virtual ModelObjectsTemp do_get_outputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the outputs.
Composable functors to implement scores via compile-time composition.
Restraint * create_excluded_volume(Model *m, const ParticleIndexes &ps, double k, std::string name)
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
Code to compute statistical measures.
Implement a constraint on the Model.
Class for storing model, its restraints, constraints, and particles.
An example simple object which is reference counted.
A simple decorator which adds a name to a particle.
An example Constraint written in Python.
def evaluate_index
Pure Python implementation of the score.
An example singleton modifier.
Common base class for heavy weight IMP objects.
Store a list of ParticleIndexes.
An example restraint written in Python.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
Restrain a particle to be in the x,y plane.
Basic utilities for handling cryo-electron microscopy 3D density maps.
A decorator for a particle with x,y,z coordinates.
Interface to specialized Particle types (e.g. atoms)
virtual ModelObjectsTemp do_get_outputs() const =0
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...
virtual void apply_index(Model *m, ParticleIndex v) const =0
std::string get_module_version()
Return the version of this module, as a string.
virtual VersionInfo get_version_info() const
Get information about the module and version of the object.
virtual DerivativePair evaluate_with_derivative(double feature) const
Calculate score and derivative with respect to the given feature.
def do_add_score_and_derivatives
Pure Python implementation of the restraint.
void set_check_level(CheckLevel l)
Apply a harmonic to the distance between two particles.
Restraint * create_chain_restraint(Model *m, const ParticleIndexes &ps, double length_factor, double k, std::string name)
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Model * get_model() const
A trivial constraint that just increments a counter.
Output IMP model data in various file formats.
Functionality for loading, creating, manipulating and scoring atomic structures.
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
Support for the RMF file format for storing hierarchical molecular data and markup.
Abstract single variable functor class for score functions.
virtual ModelObjectsTemp do_get_inputs() const =0
Divide-and-conquer inferential optimization in discrete space.
Support for small angle X-ray scattering (SAXS) data.
Inferential scoring building on methods developed as part of the Inferential Structure Determination ...
A restraint is a term in an IMP ScoringFunction.