17 import builtins
as __builtin__
21 strthis =
"proxy of " + self.this.__repr__()
22 except __builtin__.Exception:
24 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
27 def _swig_setattr_nondynamic_instance_variable(set):
28 def set_instance_attr(self, name, value):
30 set(self, name, value)
31 elif name ==
"thisown":
33 elif hasattr(self, name)
and isinstance(getattr(type(self), name), property):
34 set(self, name, value)
36 raise AttributeError(
"You cannot add instance attributes to %s" % self)
37 return set_instance_attr
40 def _swig_setattr_nondynamic_class_variable(set):
41 def set_class_attr(cls, name, value):
42 if hasattr(cls, name)
and not isinstance(getattr(cls, name), property):
45 raise AttributeError(
"You cannot add class attributes to %s" % cls)
49 class _SwigNonDynamicMeta(type):
50 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
51 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
56 class IMP_EXAMPLE_SwigPyIterator(object):
57 r"""Proxy of C++ swig::IMP_EXAMPLE_SwigPyIterator class."""
59 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
61 def __init__(self, *args, **kwargs):
62 raise AttributeError(
"No constructor defined - class is abstract")
64 __swig_destroy__ = _IMP_example.delete_IMP_EXAMPLE_SwigPyIterator
67 r"""value(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
68 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_value(self)
71 r"""incr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator"""
72 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_incr(self, n)
75 r"""decr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator"""
76 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_decr(self, n)
78 def distance(self, x):
79 r"""distance(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t"""
80 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_distance(self, x)
83 r"""equal(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
84 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_equal(self, x)
87 r"""copy(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator"""
88 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_copy(self)
91 r"""__next__(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
92 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___next__(self)
95 r"""previous(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
96 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_previous(self)
99 r"""advance(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
100 return _IMP_example.IMP_EXAMPLE_SwigPyIterator_advance(self, n)
103 r"""__eq__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
104 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___eq__(self, x)
107 r"""__ne__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
108 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___ne__(self, x)
110 def __iadd__(self, n):
111 r"""__iadd__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
112 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___iadd__(self, n)
114 def __isub__(self, n):
115 r"""__isub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
116 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___isub__(self, n)
118 def __add__(self, n):
119 r"""__add__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
120 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___add__(self, n)
122 def __sub__(self, *args):
124 __sub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator
125 __sub__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t
127 return _IMP_example.IMP_EXAMPLE_SwigPyIterator___sub__(self, *args)
132 _IMP_example.IMP_EXAMPLE_SwigPyIterator_swigregister(IMP_EXAMPLE_SwigPyIterator)
139 IMP_DEBUG = _IMP_example.IMP_DEBUG
141 IMP_RELEASE = _IMP_example.IMP_RELEASE
143 IMP_SILENT = _IMP_example.IMP_SILENT
145 IMP_PROGRESS = _IMP_example.IMP_PROGRESS
147 IMP_TERSE = _IMP_example.IMP_TERSE
149 IMP_VERBOSE = _IMP_example.IMP_VERBOSE
151 IMP_MEMORY = _IMP_example.IMP_MEMORY
153 IMP_NONE = _IMP_example.IMP_NONE
155 IMP_USAGE = _IMP_example.IMP_USAGE
157 IMP_INTERNAL = _IMP_example.IMP_INTERNAL
159 IMP_KERNEL_HAS_LOG4CXX = _IMP_example.IMP_KERNEL_HAS_LOG4CXX
161 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_example.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
163 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_example.IMP_COMPILER_HAS_DEBUG_VECTOR
165 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_example.IMP_COMPILER_HAS_RANDOM_SHUFFLE
167 IMP_COMPILER_HAS_THREE_WAY = _IMP_example.IMP_COMPILER_HAS_THREE_WAY
169 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_example.IMP_KERNEL_HAS_BOOST_RANDOM
171 IMP_KERNEL_HAS_NUMPY = _IMP_example.IMP_KERNEL_HAS_NUMPY
173 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_example.IMP_KERNEL_HAS_BOOST_SYSTEM
175 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_example.IMP_KERNEL_HAS_GPERFTOOLS
177 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
179 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
181 IMPKERNEL_SHOW_WARNINGS = _IMP_example.IMPKERNEL_SHOW_WARNINGS
185 class _DirectorObjects:
186 """@internal Simple class to keep references to director objects
187 to prevent premature deletion."""
190 def register(self, obj):
191 """Take a reference to a director object; will only work for
192 refcounted C++ classes"""
193 if hasattr(obj,
'get_ref_count'):
194 self._objects.append(obj)
196 """Only drop our reference and allow cleanup by Python if no other
197 Python references exist (we hold 3 references: one in self._objects,
198 one in x, and one in the argument list for getrefcount) *and* no
199 other C++ references exist (the Python object always holds one)"""
200 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
201 or x.get_ref_count() > 1]
205 def get_object_count(self):
206 """Get number of director objects (useful for testing only)"""
207 return len(self._objects)
208 _director_objects = _DirectorObjects()
210 class _ostream(object):
211 r"""Proxy of C++ std::ostream class."""
213 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
215 def __init__(self, *args, **kwargs):
216 raise AttributeError(
"No constructor defined")
217 __repr__ = _swig_repr
219 def write(self, osa_buf):
220 r"""write(_ostream self, char const * osa_buf)"""
221 return _IMP_example._ostream_write(self, osa_buf)
224 _IMP_example._ostream_swigregister(_ostream)
225 IMP_C_OPEN_BINARY = _IMP_example.IMP_C_OPEN_BINARY
228 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_FILESYSTEM
230 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
232 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_example.IMP_CGAL_HAS_BOOST_RANDOM
234 IMP_CGAL_HAS_NUMPY = _IMP_example.IMP_CGAL_HAS_NUMPY
236 IMPCGAL_SHOW_WARNINGS = _IMP_example.IMPCGAL_SHOW_WARNINGS
239 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_example.IMP_ALGEBRA_HAS_IMP_CGAL
241 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
243 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
245 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_RANDOM
247 IMP_ALGEBRA_HAS_CGAL = _IMP_example.IMP_ALGEBRA_HAS_CGAL
249 IMP_ALGEBRA_HAS_NUMPY = _IMP_example.IMP_ALGEBRA_HAS_NUMPY
251 IMP_ALGEBRA_HAS_ANN = _IMP_example.IMP_ALGEBRA_HAS_ANN
253 IMPALGEBRA_SHOW_WARNINGS = _IMP_example.IMPALGEBRA_SHOW_WARNINGS
256 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_example.IMP_DISPLAY_HAS_IMP_CGAL
258 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
260 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
262 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_example.IMP_DISPLAY_HAS_BOOST_RANDOM
264 IMP_DISPLAY_HAS_CGAL = _IMP_example.IMP_DISPLAY_HAS_CGAL
266 IMP_DISPLAY_HAS_NUMPY = _IMP_example.IMP_DISPLAY_HAS_NUMPY
268 IMPDISPLAY_SHOW_WARNINGS = _IMP_example.IMPDISPLAY_SHOW_WARNINGS
271 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
273 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
275 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
277 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
279 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_CGAL
281 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_example.IMP_SCORE_FUNCTOR_HAS_HDF5
283 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_example.IMP_SCORE_FUNCTOR_HAS_NUMPY
285 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_example.IMPSCOREFUNCTOR_SHOW_WARNINGS
288 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_example.IMP_STATISTICS_HAS_IMP_CGAL
290 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
292 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
294 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_example.IMP_STATISTICS_HAS_BOOST_RANDOM
296 IMP_STATISTICS_HAS_CGAL = _IMP_example.IMP_STATISTICS_HAS_CGAL
298 IMP_STATISTICS_HAS_NUMPY = _IMP_example.IMP_STATISTICS_HAS_NUMPY
300 IMPSTATISTICS_SHOW_WARNINGS = _IMP_example.IMPSTATISTICS_SHOW_WARNINGS
303 IMP_CORE_HAS_IMP_CGAL = _IMP_example.IMP_CORE_HAS_IMP_CGAL
305 IMP_CORE_HAS_IMP_KERNEL = _IMP_example.IMP_CORE_HAS_IMP_KERNEL
307 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_FILESYSTEM
309 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
311 IMP_CORE_HAS_BOOST_RANDOM = _IMP_example.IMP_CORE_HAS_BOOST_RANDOM
313 IMP_CORE_HAS_CGAL = _IMP_example.IMP_CORE_HAS_CGAL
315 IMP_CORE_HAS_HDF5 = _IMP_example.IMP_CORE_HAS_HDF5
317 IMP_CORE_HAS_NUMPY = _IMP_example.IMP_CORE_HAS_NUMPY
319 IMPCORE_SHOW_WARNINGS = _IMP_example.IMPCORE_SHOW_WARNINGS
322 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_example.IMP_CONTAINER_HAS_IMP_ALGEBRA
324 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_example.IMP_CONTAINER_HAS_IMP_CGAL
326 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_example.IMP_CONTAINER_HAS_IMP_DISPLAY
328 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_example.IMP_CONTAINER_HAS_IMP_KERNEL
330 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
332 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
334 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
336 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_example.IMP_CONTAINER_HAS_BOOST_RANDOM
338 IMP_CONTAINER_HAS_CGAL = _IMP_example.IMP_CONTAINER_HAS_CGAL
340 IMP_CONTAINER_HAS_HDF5 = _IMP_example.IMP_CONTAINER_HAS_HDF5
342 IMP_CONTAINER_HAS_NUMPY = _IMP_example.IMP_CONTAINER_HAS_NUMPY
344 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_example.IMP_CONTAINER_HAS_PYTHON_IHM
346 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_example.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
348 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_example.IMP_CONTAINER_HAS_ROBIN_MAP
350 IMPCONTAINER_SHOW_WARNINGS = _IMP_example.IMPCONTAINER_SHOW_WARNINGS
353 IMP_ATOM_HAS_IMP_CGAL = _IMP_example.IMP_ATOM_HAS_IMP_CGAL
355 IMP_ATOM_HAS_IMP_KERNEL = _IMP_example.IMP_ATOM_HAS_IMP_KERNEL
357 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
359 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
361 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_example.IMP_ATOM_HAS_BOOST_RANDOM
363 IMP_ATOM_HAS_BOOST_REGEX = _IMP_example.IMP_ATOM_HAS_BOOST_REGEX
365 IMP_ATOM_HAS_CGAL = _IMP_example.IMP_ATOM_HAS_CGAL
367 IMP_ATOM_HAS_HDF5 = _IMP_example.IMP_ATOM_HAS_HDF5
369 IMP_ATOM_HAS_NUMPY = _IMP_example.IMP_ATOM_HAS_NUMPY
371 IMP_ATOM_HAS_PYTHON_IHM = _IMP_example.IMP_ATOM_HAS_PYTHON_IHM
373 IMPATOM_SHOW_WARNINGS = _IMP_example.IMPATOM_SHOW_WARNINGS
375 IMP_ATOM_TYPE_INDEX = _IMP_example.IMP_ATOM_TYPE_INDEX
377 IMP_RESIDUE_TYPE_INDEX = _IMP_example.IMP_RESIDUE_TYPE_INDEX
379 IMP_HIERARCHY_TYPE_INDEX = _IMP_example.IMP_HIERARCHY_TYPE_INDEX
381 IMP_CHAIN_TYPE_INDEX = _IMP_example.IMP_CHAIN_TYPE_INDEX
384 IMP_EM_HAS_IMP_CGAL = _IMP_example.IMP_EM_HAS_IMP_CGAL
386 IMP_EM_HAS_IMP_CONTAINER = _IMP_example.IMP_EM_HAS_IMP_CONTAINER
388 IMP_EM_HAS_IMP_DISPLAY = _IMP_example.IMP_EM_HAS_IMP_DISPLAY
390 IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EM_HAS_IMP_SCORE_FUNCTOR
392 IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EM_HAS_BOOST_FILESYSTEM
394 IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
396 IMP_EM_HAS_BOOST_RANDOM = _IMP_example.IMP_EM_HAS_BOOST_RANDOM
398 IMP_EM_HAS_BOOST_REGEX = _IMP_example.IMP_EM_HAS_BOOST_REGEX
400 IMP_EM_HAS_CGAL = _IMP_example.IMP_EM_HAS_CGAL
402 IMP_EM_HAS_HDF5 = _IMP_example.IMP_EM_HAS_HDF5
404 IMP_EM_HAS_NUMPY = _IMP_example.IMP_EM_HAS_NUMPY
406 IMP_EM_HAS_PYTHON_IHM = _IMP_example.IMP_EM_HAS_PYTHON_IHM
408 IMPEM_SHOW_WARNINGS = _IMP_example.IMPEM_SHOW_WARNINGS
411 IMP_SAXS_HAS_IMP_CGAL = _IMP_example.IMP_SAXS_HAS_IMP_CGAL
413 IMP_SAXS_HAS_IMP_CONTAINER = _IMP_example.IMP_SAXS_HAS_IMP_CONTAINER
415 IMP_SAXS_HAS_IMP_DISPLAY = _IMP_example.IMP_SAXS_HAS_IMP_DISPLAY
417 IMP_SAXS_HAS_IMP_KERNEL = _IMP_example.IMP_SAXS_HAS_IMP_KERNEL
419 IMP_SAXS_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_SAXS_HAS_IMP_SCORE_FUNCTOR
421 IMP_SAXS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SAXS_HAS_BOOST_FILESYSTEM
423 IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS
425 IMP_SAXS_HAS_BOOST_RANDOM = _IMP_example.IMP_SAXS_HAS_BOOST_RANDOM
427 IMP_SAXS_HAS_BOOST_REGEX = _IMP_example.IMP_SAXS_HAS_BOOST_REGEX
429 IMP_SAXS_HAS_CGAL = _IMP_example.IMP_SAXS_HAS_CGAL
431 IMP_SAXS_HAS_HDF5 = _IMP_example.IMP_SAXS_HAS_HDF5
433 IMP_SAXS_HAS_NUMPY = _IMP_example.IMP_SAXS_HAS_NUMPY
435 IMP_SAXS_HAS_PYTHON_IHM = _IMP_example.IMP_SAXS_HAS_PYTHON_IHM
437 IMPSAXS_SHOW_WARNINGS = _IMP_example.IMPSAXS_SHOW_WARNINGS
440 IMP_ISD_HAS_IMP_CGAL = _IMP_example.IMP_ISD_HAS_IMP_CGAL
442 IMP_ISD_HAS_IMP_DISPLAY = _IMP_example.IMP_ISD_HAS_IMP_DISPLAY
444 IMP_ISD_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ISD_HAS_IMP_SCORE_FUNCTOR
446 IMP_ISD_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ISD_HAS_BOOST_FILESYSTEM
448 IMP_ISD_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ISD_HAS_BOOST_PROGRAMOPTIONS
450 IMP_ISD_HAS_BOOST_RANDOM = _IMP_example.IMP_ISD_HAS_BOOST_RANDOM
452 IMP_ISD_HAS_BOOST_REGEX = _IMP_example.IMP_ISD_HAS_BOOST_REGEX
454 IMP_ISD_HAS_CGAL = _IMP_example.IMP_ISD_HAS_CGAL
456 IMP_ISD_HAS_HDF5 = _IMP_example.IMP_ISD_HAS_HDF5
458 IMP_ISD_HAS_NUMPY = _IMP_example.IMP_ISD_HAS_NUMPY
460 IMP_ISD_HAS_PYTHON_IHM = _IMP_example.IMP_ISD_HAS_PYTHON_IHM
462 IMPISD_SHOW_WARNINGS = _IMP_example.IMPISD_SHOW_WARNINGS
465 IMP_RMF_HAS_IMP_CGAL = _IMP_example.IMP_RMF_HAS_IMP_CGAL
467 IMP_RMF_HAS_IMP_EM = _IMP_example.IMP_RMF_HAS_IMP_EM
469 IMP_RMF_HAS_IMP_SAXS = _IMP_example.IMP_RMF_HAS_IMP_SAXS
471 IMP_RMF_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_RMF_HAS_IMP_SCORE_FUNCTOR
473 IMP_RMF_HAS_IMP_STATISTICS = _IMP_example.IMP_RMF_HAS_IMP_STATISTICS
475 IMP_RMF_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_FILESYSTEM
477 IMP_RMF_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS
479 IMP_RMF_HAS_BOOST_RANDOM = _IMP_example.IMP_RMF_HAS_BOOST_RANDOM
481 IMP_RMF_HAS_BOOST_REGEX = _IMP_example.IMP_RMF_HAS_BOOST_REGEX
483 IMP_RMF_HAS_CGAL = _IMP_example.IMP_RMF_HAS_CGAL
485 IMP_RMF_HAS_HDF5 = _IMP_example.IMP_RMF_HAS_HDF5
487 IMP_RMF_HAS_NUMPY = _IMP_example.IMP_RMF_HAS_NUMPY
489 IMP_RMF_HAS_PYTHON_IHM = _IMP_example.IMP_RMF_HAS_PYTHON_IHM
491 IMPRMF_SHOW_WARNINGS = _IMP_example.IMPRMF_SHOW_WARNINGS
495 IMP_DOMINO_HAS_IMP_ATOM = _IMP_example.IMP_DOMINO_HAS_IMP_ATOM
497 IMP_DOMINO_HAS_IMP_CGAL = _IMP_example.IMP_DOMINO_HAS_IMP_CGAL
499 IMP_DOMINO_HAS_IMP_EM = _IMP_example.IMP_DOMINO_HAS_IMP_EM
501 IMP_DOMINO_HAS_IMP_ISD = _IMP_example.IMP_DOMINO_HAS_IMP_ISD
503 IMP_DOMINO_HAS_IMP_KERNEL = _IMP_example.IMP_DOMINO_HAS_IMP_KERNEL
505 IMP_DOMINO_HAS_IMP_RMF = _IMP_example.IMP_DOMINO_HAS_IMP_RMF
507 IMP_DOMINO_HAS_IMP_SAXS = _IMP_example.IMP_DOMINO_HAS_IMP_SAXS
509 IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR
511 IMP_DOMINO_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_FILESYSTEM
513 IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS
515 IMP_DOMINO_HAS_BOOST_RANDOM = _IMP_example.IMP_DOMINO_HAS_BOOST_RANDOM
517 IMP_DOMINO_HAS_BOOST_REGEX = _IMP_example.IMP_DOMINO_HAS_BOOST_REGEX
519 IMP_DOMINO_HAS_CGAL = _IMP_example.IMP_DOMINO_HAS_CGAL
521 IMP_DOMINO_HAS_HDF5 = _IMP_example.IMP_DOMINO_HAS_HDF5
523 IMP_DOMINO_HAS_NUMPY = _IMP_example.IMP_DOMINO_HAS_NUMPY
525 IMP_DOMINO_HAS_RMF = _IMP_example.IMP_DOMINO_HAS_RMF
527 IMP_DOMINO_HAS_PYTHON_IHM = _IMP_example.IMP_DOMINO_HAS_PYTHON_IHM
529 IMPDOMINO_SHOW_WARNINGS = _IMP_example.IMPDOMINO_SHOW_WARNINGS
533 IMP_EXAMPLE_HAS_IMP_ALGEBRA = _IMP_example.IMP_EXAMPLE_HAS_IMP_ALGEBRA
535 IMP_EXAMPLE_HAS_IMP_CGAL = _IMP_example.IMP_EXAMPLE_HAS_IMP_CGAL
537 IMP_EXAMPLE_HAS_IMP_DISPLAY = _IMP_example.IMP_EXAMPLE_HAS_IMP_DISPLAY
539 IMP_EXAMPLE_HAS_IMP_EM = _IMP_example.IMP_EXAMPLE_HAS_IMP_EM
541 IMP_EXAMPLE_HAS_IMP_ISD = _IMP_example.IMP_EXAMPLE_HAS_IMP_ISD
543 IMP_EXAMPLE_HAS_IMP_KERNEL = _IMP_example.IMP_EXAMPLE_HAS_IMP_KERNEL
545 IMP_EXAMPLE_HAS_IMP_RMF = _IMP_example.IMP_EXAMPLE_HAS_IMP_RMF
547 IMP_EXAMPLE_HAS_IMP_SAXS = _IMP_example.IMP_EXAMPLE_HAS_IMP_SAXS
549 IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR
551 IMP_EXAMPLE_HAS_IMP_STATISTICS = _IMP_example.IMP_EXAMPLE_HAS_IMP_STATISTICS
553 IMP_EXAMPLE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_FILESYSTEM
555 IMP_EXAMPLE_HAS_BOOST_GRAPH = _IMP_example.IMP_EXAMPLE_HAS_BOOST_GRAPH
557 IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS
559 IMP_EXAMPLE_HAS_BOOST_RANDOM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_RANDOM
561 IMP_EXAMPLE_HAS_BOOST_REGEX = _IMP_example.IMP_EXAMPLE_HAS_BOOST_REGEX
563 IMP_EXAMPLE_HAS_CGAL = _IMP_example.IMP_EXAMPLE_HAS_CGAL
565 IMP_EXAMPLE_HAS_HDF5 = _IMP_example.IMP_EXAMPLE_HAS_HDF5
567 IMP_EXAMPLE_HAS_NUMPY = _IMP_example.IMP_EXAMPLE_HAS_NUMPY
569 IMP_EXAMPLE_HAS_RMF = _IMP_example.IMP_EXAMPLE_HAS_RMF
571 IMP_EXAMPLE_HAS_PYTHON_IHM = _IMP_example.IMP_EXAMPLE_HAS_PYTHON_IHM
573 IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY = _IMP_example.IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY
575 IMPEXAMPLE_SHOW_WARNINGS = _IMP_example.IMPEXAMPLE_SHOW_WARNINGS
578 _object_types.append(
"ExampleRestraint")
581 def _object_cast_to_ExampleRestraint(o):
582 r"""_object_cast_to_ExampleRestraint(Object o) -> ExampleRestraint"""
583 return _IMP_example._object_cast_to_ExampleRestraint(o)
585 def ExampleDecorators(l=[]):
586 return [ExampleDecorator(x)
for x
in l]
587 _plural_types.append(
"ExampleDecorators")
590 _value_types.append(
"ExampleDecorator")
593 _object_types.append(
"ExampleUnaryFunction")
596 def _object_cast_to_ExampleUnaryFunction(o):
597 r"""_object_cast_to_ExampleUnaryFunction(Object o) -> ExampleUnaryFunction"""
598 return _IMP_example._object_cast_to_ExampleUnaryFunction(o)
600 _object_types.append(
"ExampleSingletonModifier")
603 def _object_cast_to_ExampleSingletonModifier(o):
604 r"""_object_cast_to_ExampleSingletonModifier(Object o) -> ExampleSingletonModifier"""
605 return _IMP_example._object_cast_to_ExampleSingletonModifier(o)
607 _object_types.append(
"ExamplePairScore")
610 def _object_cast_to_ExamplePairScore(o):
611 r"""_object_cast_to_ExamplePairScore(Object o) -> ExamplePairScore"""
612 return _IMP_example._object_cast_to_ExamplePairScore(o)
614 _object_types.append(
"ExampleSubsetFilterTable")
617 def _object_cast_to_ExampleSubsetFilterTable(o):
618 r"""_object_cast_to_ExampleSubsetFilterTable(Object o) -> ExampleSubsetFilterTable"""
619 return _IMP_example._object_cast_to_ExampleSubsetFilterTable(o)
621 _object_types.append(
"ExampleConstraint")
624 def _object_cast_to_ExampleConstraint(o):
625 r"""_object_cast_to_ExampleConstraint(Object o) -> ExampleConstraint"""
626 return _IMP_example._object_cast_to_ExampleConstraint(o)
628 _object_types.append(
"ExampleObject")
631 def _object_cast_to_ExampleObject(o):
632 r"""_object_cast_to_ExampleObject(Object o) -> ExampleObject"""
633 return _IMP_example._object_cast_to_ExampleObject(o)
635 ExampleTemplateClass3Ds=list
636 _plural_types.append(
"ExampleTemplateClass3Ds")
637 _value_types.append(
"ExampleTemplateClass3D")
640 def create_model_and_particles():
644 IMP.algebra.Vector3D(10,10,10))
645 for i
in range(0,100):
646 p = m.add_particle(
"p")
650 d.set_coordinates_are_optimized(
True)
656 """An example restraint written in Python.
657 This should be functionally equivalent to the C++ ExampleRestraint.
659 def __init__(self, m, p, k):
660 super().__init__(m,
"PythonExampleRestraint%1%")
661 self.p, self.k = p, k
664 """Pure Python implementation of the restraint"""
666 score = .5 * self.k * d.get_z() * d.get_z()
667 if sa.get_derivative_accumulator():
668 deriv = self.k * d.get_z()
669 d.add_to_derivative(2, deriv, sa.get_derivative_accumulator())
673 """Implementation of the restraint using JAX"""
675 def jax_restraint(X, k, pi):
677 return 0.5 * k * xyz[2] * xyz[2]
678 f = functools.partial(jax_restraint, k=self.k, pi=self.p)
679 return self._wrap_jax(f)
682 return [self.
get_model().get_particle(self.p)]
688 """An example PairScore written in Python.
689 This should be functionally equivalent to the C++ ExamplePairScore.
691 def __init__(self, x0, k):
693 self.x0, self.k = x0, k
696 """Pure Python implementation of the score"""
699 diff = (d0.get_coordinates()
700 - d1.get_coordinates()).get_magnitude() - self.x0
701 score = .5 * self.k * diff * diff
704 delta = d0.get_coordinates() - d1.get_coordinates()
705 udelta = delta.get_unit_vector()
707 d0.add_to_derivatives(udelta * dv, da)
708 d1.add_to_derivatives(-udelta * dv, da)
718 """An example UnaryFunction written in Python.
719 This should be functionally equivalent to the C++ ExampleUnaryFunction.
721 def __init__(self, center, k):
723 self.center, self.k = center, k
726 return (self.
evaluate(feature), self.k * (feature - self.center))
729 return .5 * self.k * (feature - self.center) * (feature - self.center)
735 """An example Constraint written in Python.
736 This should be functionally equivalent to the C++ ExampleConstraint.
741 def __init__(self, p):
742 super().__init__(p.get_model(),
"ExampleConstraint%1%")
745 PythonExampleConstraint.k =
IMP.IntKey(
"Constraint key")
746 if not p.has_attribute(self.k):
747 p.add_attribute(self.k, 0)
749 def do_update_attributes(self):
750 self.p.set_value(self.k, self.p.get_value(self.k) + 1)
752 def do_update_derivatives(self, da):
765 """An example SingletonModifier written in Python.
766 This should be functionally equivalent to the C++
767 ExampleSingletonModifier.
770 def __init__(self, bb):
771 super().__init__(
"ExampleSingletonModifier%1%")
778 while d.get_coordinate(i) < self.bb.get_corner(0)[i]:
779 d.set_coordinate(i,d.get_coordinate(i) + \
780 (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
781 while d.get_coordinate(i) > self.bb.get_corner(1)[i]:
782 d.set_coordinate(i,d.get_coordinate(i) - \
783 (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
793 r"""Proxy of C++ IMP::example::ExampleRestraint class."""
795 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
797 def __init__(self, *args):
799 __init__(ExampleRestraint self, Model m, ParticleIndex p, double k) -> ExampleRestraint
800 __init__(ExampleRestraint self) -> ExampleRestraint
802 _IMP_example.ExampleRestraint_swiginit(self, _IMP_example.new_ExampleRestraint(*args))
804 def get_force_constant(self):
805 r"""get_force_constant(ExampleRestraint self) -> double"""
806 return _IMP_example.ExampleRestraint_get_force_constant(self)
809 r"""get_index(ExampleRestraint self) -> ParticleIndex"""
810 return _IMP_example.ExampleRestraint_get_index(self)
812 def do_add_score_and_derivatives(self, sa):
813 r"""do_add_score_and_derivatives(ExampleRestraint self, ScoreAccumulator sa)"""
814 return _IMP_example.ExampleRestraint_do_add_score_and_derivatives(self, sa)
817 r"""do_get_inputs(ExampleRestraint self) -> IMP::ModelObjectsTemp"""
818 return _IMP_example.ExampleRestraint_do_get_inputs(self)
821 r"""get_version_info(ExampleRestraint self) -> VersionInfo"""
822 return _IMP_example.ExampleRestraint_get_version_info(self)
823 __swig_destroy__ = _IMP_example.delete_ExampleRestraint
826 r"""__str__(ExampleRestraint self) -> std::string"""
827 return _IMP_example.ExampleRestraint___str__(self)
830 r"""__repr__(ExampleRestraint self) -> std::string"""
831 return _IMP_example.ExampleRestraint___repr__(self)
835 return _object_cast_to_ExampleRestraint(o)
838 def _get_as_binary(self):
839 r"""_get_as_binary(ExampleRestraint self) -> PyObject *"""
840 return _IMP_example.ExampleRestraint__get_as_binary(self)
842 def _set_from_binary(self, p):
843 r"""_set_from_binary(ExampleRestraint self, PyObject * p)"""
844 return _IMP_example.ExampleRestraint__set_from_binary(self, p)
846 def __getstate__(self):
847 p = self._get_as_binary()
848 if len(self.__dict__) > 1:
849 d = self.__dict__.copy()
854 def __setstate__(self, p):
855 if not hasattr(self,
'this'):
857 if isinstance(p, tuple):
859 self.__dict__.update(d)
860 return self._set_from_binary(p)
864 """Implementation of the restraint using JAX.
865 For a Restraint, we must return a single JAX function which
866 takes a single argument, the JAX Model, and returns its score.
867 The JAX Model (here called `jm`) is a JAX object which contains
868 the same information as the IMP Model, as a simple Python dict.
869 For example, jm['xyz'] is an N x 3 array of XYZ coordinates."""
871 def jax_restraint(jm, k, pi):
876 return 0.5 * k * xyz[2] * xyz[2]
880 f = functools.partial(jax_restraint, k=self.get_force_constant(),
885 return self._wrap_jax(f)
889 _IMP_example.ExampleRestraint_swigregister(ExampleRestraint)
891 r"""Proxy of C++ IMP::example::ExampleDecorator class."""
893 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
895 def get_decorator_name(self):
896 r"""get_decorator_name(ExampleDecorator self) -> std::string"""
897 return _IMP_example.ExampleDecorator_get_decorator_name(self)
899 def set_decorator_name(self, nm):
900 r"""set_decorator_name(ExampleDecorator self, std::string nm)"""
901 return _IMP_example.ExampleDecorator_set_decorator_name(self, nm)
903 def __init__(self, *args):
905 __init__(ExampleDecorator self) -> ExampleDecorator
906 __init__(ExampleDecorator self, Model m, ParticleIndex id) -> ExampleDecorator
907 __init__(ExampleDecorator self, _ParticleAdaptor d) -> ExampleDecorator
909 _IMP_example.ExampleDecorator_swiginit(self, _IMP_example.new_ExampleDecorator(*args))
912 def get_is_setup(*args):
914 get_is_setup(Model m, ParticleIndex pi) -> bool
915 get_is_setup(_ParticleAdaptor p) -> bool
917 return _IMP_example.ExampleDecorator_get_is_setup(*args)
919 def show(self, *args):
920 r"""show(ExampleDecorator self, _ostream out=std::cout)"""
921 return _IMP_example.ExampleDecorator_show(self, *args)
924 def setup_particle(*args):
926 setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
927 setup_particle(_ParticleAdaptor pa, std::string name) -> ExampleDecorator
929 return _IMP_example.ExampleDecorator_setup_particle(*args)
931 def add_attribute(self, *args):
933 add_attribute(ExampleDecorator self, FloatKey k, IMP::Float v, bool opt)
934 add_attribute(ExampleDecorator self, FloatKey a0, IMP::Float a1)
935 add_attribute(ExampleDecorator self, IntKey a0, IMP::Int a1)
936 add_attribute(ExampleDecorator self, FloatsKey a0, IMP::Floats a1)
937 add_attribute(ExampleDecorator self, IntsKey a0, IMP::Ints a1)
938 add_attribute(ExampleDecorator self, StringKey a0, IMP::String a1)
939 add_attribute(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
940 add_attribute(ExampleDecorator self, ObjectKey a0, Object a1)
941 add_attribute(ExampleDecorator self, SparseFloatKey a0, IMP::Float a1)
942 add_attribute(ExampleDecorator self, SparseIntKey a0, IMP::Int a1)
943 add_attribute(ExampleDecorator self, SparseStringKey a0, IMP::String a1)
944 add_attribute(ExampleDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
946 return _IMP_example.ExampleDecorator_add_attribute(self, *args)
948 def get_value(self, *args):
950 get_value(ExampleDecorator self, FloatKey a0) -> IMP::Float
951 get_value(ExampleDecorator self, IntKey a0) -> IMP::Int
952 get_value(ExampleDecorator self, FloatsKey a0) -> IMP::Floats
953 get_value(ExampleDecorator self, IntsKey a0) -> IMP::Ints
954 get_value(ExampleDecorator self, StringKey a0) -> IMP::String
955 get_value(ExampleDecorator self, ParticleIndexKey a0) -> Particle
956 get_value(ExampleDecorator self, ObjectKey a0) -> Object
957 get_value(ExampleDecorator self, SparseFloatKey a0) -> IMP::Float
958 get_value(ExampleDecorator self, SparseIntKey a0) -> IMP::Int
959 get_value(ExampleDecorator self, SparseStringKey a0) -> IMP::String
960 get_value(ExampleDecorator self, SparseParticleIndexKey a0) -> ParticleIndex
962 return _IMP_example.ExampleDecorator_get_value(self, *args)
964 def set_value(self, *args):
966 set_value(ExampleDecorator self, FloatKey a0, IMP::Float a1)
967 set_value(ExampleDecorator self, IntKey a0, IMP::Int a1)
968 set_value(ExampleDecorator self, FloatsKey a0, IMP::Floats a1)
969 set_value(ExampleDecorator self, IntsKey a0, IMP::Ints a1)
970 set_value(ExampleDecorator self, StringKey a0, IMP::String a1)
971 set_value(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
972 set_value(ExampleDecorator self, ObjectKey a0, Object a1)
973 set_value(ExampleDecorator self, SparseFloatKey a0, IMP::Float a1)
974 set_value(ExampleDecorator self, SparseIntKey a0, IMP::Int a1)
975 set_value(ExampleDecorator self, SparseStringKey a0, IMP::String a1)
976 set_value(ExampleDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
978 return _IMP_example.ExampleDecorator_set_value(self, *args)
980 def remove_attribute(self, *args):
982 remove_attribute(ExampleDecorator self, FloatKey a0)
983 remove_attribute(ExampleDecorator self, IntKey a0)
984 remove_attribute(ExampleDecorator self, FloatsKey a0)
985 remove_attribute(ExampleDecorator self, IntsKey a0)
986 remove_attribute(ExampleDecorator self, StringKey a0)
987 remove_attribute(ExampleDecorator self, ParticleIndexKey a0)
988 remove_attribute(ExampleDecorator self, ObjectKey a0)
989 remove_attribute(ExampleDecorator self, SparseFloatKey a0)
990 remove_attribute(ExampleDecorator self, SparseIntKey a0)
991 remove_attribute(ExampleDecorator self, SparseStringKey a0)
992 remove_attribute(ExampleDecorator self, SparseParticleIndexKey a0)
994 return _IMP_example.ExampleDecorator_remove_attribute(self, *args)
996 def has_attribute(self, *args):
998 has_attribute(ExampleDecorator self, FloatKey a0) -> bool
999 has_attribute(ExampleDecorator self, IntKey a0) -> bool
1000 has_attribute(ExampleDecorator self, FloatsKey a0) -> bool
1001 has_attribute(ExampleDecorator self, IntsKey a0) -> bool
1002 has_attribute(ExampleDecorator self, StringKey a0) -> bool
1003 has_attribute(ExampleDecorator self, ParticleIndexKey a0) -> bool
1004 has_attribute(ExampleDecorator self, ObjectKey a0) -> bool
1005 has_attribute(ExampleDecorator self, SparseFloatKey a0) -> bool
1006 has_attribute(ExampleDecorator self, SparseIntKey a0) -> bool
1007 has_attribute(ExampleDecorator self, SparseStringKey a0) -> bool
1008 has_attribute(ExampleDecorator self, SparseParticleIndexKey a0) -> bool
1010 return _IMP_example.ExampleDecorator_has_attribute(self, *args)
1012 def get_derivative(self, a0):
1013 r"""get_derivative(ExampleDecorator self, FloatKey a0) -> double"""
1014 return _IMP_example.ExampleDecorator_get_derivative(self, a0)
1017 r"""get_name(ExampleDecorator self) -> std::string"""
1018 return _IMP_example.ExampleDecorator_get_name(self)
1021 r"""clear_caches(ExampleDecorator self)"""
1022 return _IMP_example.ExampleDecorator_clear_caches(self)
1024 def set_name(self, a0):
1025 r"""set_name(ExampleDecorator self, std::string a0)"""
1026 return _IMP_example.ExampleDecorator_set_name(self, a0)
1029 r"""set_check_level(ExampleDecorator self, IMP::CheckLevel a0)"""
1030 return _IMP_example.ExampleDecorator_set_check_level(self, a0)
1032 def add_to_derivative(self, a0, a1, a2):
1033 r"""add_to_derivative(ExampleDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
1034 return _IMP_example.ExampleDecorator_add_to_derivative(self, a0, a1, a2)
1036 def set_is_optimized(self, a0, a1):
1037 r"""set_is_optimized(ExampleDecorator self, FloatKey a0, bool a1)"""
1038 return _IMP_example.ExampleDecorator_set_is_optimized(self, a0, a1)
1040 def get_is_optimized(self, a0):
1041 r"""get_is_optimized(ExampleDecorator self, FloatKey a0) -> bool"""
1042 return _IMP_example.ExampleDecorator_get_is_optimized(self, a0)
1044 def get_check_level(self):
1045 r"""get_check_level(ExampleDecorator self) -> IMP::CheckLevel"""
1046 return _IMP_example.ExampleDecorator_get_check_level(self)
1048 def __eq__(self, *args):
1050 __eq__(ExampleDecorator self, ExampleDecorator o) -> bool
1051 __eq__(ExampleDecorator self, Particle d) -> bool
1053 return _IMP_example.ExampleDecorator___eq__(self, *args)
1055 def __ne__(self, *args):
1057 __ne__(ExampleDecorator self, ExampleDecorator o) -> bool
1058 __ne__(ExampleDecorator self, Particle d) -> bool
1060 return _IMP_example.ExampleDecorator___ne__(self, *args)
1062 def __le__(self, *args):
1064 __le__(ExampleDecorator self, ExampleDecorator o) -> bool
1065 __le__(ExampleDecorator self, Particle d) -> bool
1067 return _IMP_example.ExampleDecorator___le__(self, *args)
1069 def __lt__(self, *args):
1071 __lt__(ExampleDecorator self, ExampleDecorator o) -> bool
1072 __lt__(ExampleDecorator self, Particle d) -> bool
1074 return _IMP_example.ExampleDecorator___lt__(self, *args)
1076 def __ge__(self, *args):
1078 __ge__(ExampleDecorator self, ExampleDecorator o) -> bool
1079 __ge__(ExampleDecorator self, Particle d) -> bool
1081 return _IMP_example.ExampleDecorator___ge__(self, *args)
1083 def __gt__(self, *args):
1085 __gt__(ExampleDecorator self, ExampleDecorator o) -> bool
1086 __gt__(ExampleDecorator self, Particle d) -> bool
1088 return _IMP_example.ExampleDecorator___gt__(self, *args)
1091 r"""__hash__(ExampleDecorator self) -> std::size_t"""
1092 return _IMP_example.ExampleDecorator___hash__(self)
1095 r"""__str__(ExampleDecorator self) -> std::string"""
1096 return _IMP_example.ExampleDecorator___str__(self)
1099 r"""__repr__(ExampleDecorator self) -> std::string"""
1100 return _IMP_example.ExampleDecorator___repr__(self)
1102 def _get_as_binary(self):
1103 r"""_get_as_binary(ExampleDecorator self) -> PyObject *"""
1104 return _IMP_example.ExampleDecorator__get_as_binary(self)
1106 def _set_from_binary(self, p):
1107 r"""_set_from_binary(ExampleDecorator self, PyObject * p)"""
1108 return _IMP_example.ExampleDecorator__set_from_binary(self, p)
1110 def __getstate__(self):
1111 p = self._get_as_binary()
1112 if len(self.__dict__) > 1:
1113 d = self.__dict__.copy()
1118 def __setstate__(self, p):
1119 if not hasattr(self,
'this'):
1121 if isinstance(p, tuple):
1123 self.__dict__.update(d)
1124 return self._set_from_binary(p)
1126 __swig_destroy__ = _IMP_example.delete_ExampleDecorator
1129 _IMP_example.ExampleDecorator_swigregister(ExampleDecorator)
1131 def __lshift__(out, n):
1132 r"""__lshift__(_ostream out, ExampleDecorator n) -> _ostream"""
1133 return _IMP_example.__lshift__(out, n)
1135 r"""Proxy of C++ IMP::example::ExampleUnaryFunction class."""
1137 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1139 def __init__(self, *args):
1141 __init__(ExampleUnaryFunction self, IMP::Float center, IMP::Float k) -> ExampleUnaryFunction
1142 __init__(ExampleUnaryFunction self) -> ExampleUnaryFunction
1144 _IMP_example.ExampleUnaryFunction_swiginit(self, _IMP_example.new_ExampleUnaryFunction(*args))
1146 def get_center(self):
1147 r"""get_center(ExampleUnaryFunction self) -> IMP::Float"""
1148 return _IMP_example.ExampleUnaryFunction_get_center(self)
1150 def get_force_constant(self):
1151 r"""get_force_constant(ExampleUnaryFunction self) -> IMP::Float"""
1152 return _IMP_example.ExampleUnaryFunction_get_force_constant(self)
1155 r"""get_version_info(ExampleUnaryFunction self) -> VersionInfo"""
1156 return _IMP_example.ExampleUnaryFunction_get_version_info(self)
1157 __swig_destroy__ = _IMP_example.delete_ExampleUnaryFunction
1160 r"""__str__(ExampleUnaryFunction self) -> std::string"""
1161 return _IMP_example.ExampleUnaryFunction___str__(self)
1164 r"""__repr__(ExampleUnaryFunction self) -> std::string"""
1165 return _IMP_example.ExampleUnaryFunction___repr__(self)
1169 return _object_cast_to_ExampleUnaryFunction(o)
1172 def _get_as_binary(self):
1173 r"""_get_as_binary(ExampleUnaryFunction self) -> PyObject *"""
1174 return _IMP_example.ExampleUnaryFunction__get_as_binary(self)
1176 def _set_from_binary(self, p):
1177 r"""_set_from_binary(ExampleUnaryFunction self, PyObject * p)"""
1178 return _IMP_example.ExampleUnaryFunction__set_from_binary(self, p)
1180 def __getstate__(self):
1181 p = self._get_as_binary()
1182 if len(self.__dict__) > 1:
1183 d = self.__dict__.copy()
1188 def __setstate__(self, p):
1189 if not hasattr(self,
'this'):
1191 if isinstance(p, tuple):
1193 self.__dict__.update(d)
1194 return self._set_from_binary(p)
1198 """Implementation of the unary function using JAX.
1199 This takes the feature value to act on, and returns a score.
1200 Unlike an IMP C++ UnaryFunction (which takes a single feature),
1201 the JAX score takes multiple features, as an N-element array,
1202 and should return an N-element array of scores."""
1204 def score(feature, center, k):
1205 return 0.5 * k * (feature - center) ** 2
1206 return functools.partial(score, center=self.get_center(),
1207 k=self.get_force_constant())
1211 _IMP_example.ExampleUnaryFunction_swigregister(ExampleUnaryFunction)
1213 r"""Proxy of C++ IMP::example::ExampleObject class."""
1215 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1217 def __init__(self, *args):
1219 __init__(ExampleObject self, IMP::Floats const & data) -> ExampleObject
1220 __init__(ExampleObject self) -> ExampleObject
1222 _IMP_example.ExampleObject_swiginit(self, _IMP_example.new_ExampleObject(*args))
1224 def get_data(self, i):
1225 r"""get_data(ExampleObject self, unsigned int i) -> double"""
1226 return _IMP_example.ExampleObject_get_data(self, i)
1229 r"""get_version_info(ExampleObject self) -> VersionInfo"""
1230 return _IMP_example.ExampleObject_get_version_info(self)
1231 __swig_destroy__ = _IMP_example.delete_ExampleObject
1234 r"""__str__(ExampleObject self) -> std::string"""
1235 return _IMP_example.ExampleObject___str__(self)
1238 r"""__repr__(ExampleObject self) -> std::string"""
1239 return _IMP_example.ExampleObject___repr__(self)
1243 return _object_cast_to_ExampleObject(o)
1246 def _get_as_binary(self):
1247 r"""_get_as_binary(ExampleObject self) -> PyObject *"""
1248 return _IMP_example.ExampleObject__get_as_binary(self)
1250 def _set_from_binary(self, p):
1251 r"""_set_from_binary(ExampleObject self, PyObject * p)"""
1252 return _IMP_example.ExampleObject__set_from_binary(self, p)
1254 def __getstate__(self):
1255 p = self._get_as_binary()
1256 if len(self.__dict__) > 1:
1257 d = self.__dict__.copy()
1262 def __setstate__(self, p):
1263 if not hasattr(self,
'this'):
1265 if isinstance(p, tuple):
1267 self.__dict__.update(d)
1268 return self._set_from_binary(p)
1272 _IMP_example.ExampleObject_swigregister(ExampleObject)
1274 r"""Proxy of C++ IMP::example::ExampleSingletonModifier class."""
1276 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1278 def __init__(self, *args):
1280 __init__(ExampleSingletonModifier self, BoundingBox3D bb) -> ExampleSingletonModifier
1281 __init__(ExampleSingletonModifier self) -> ExampleSingletonModifier
1283 _IMP_example.ExampleSingletonModifier_swiginit(self, _IMP_example.new_ExampleSingletonModifier(*args))
1285 def get_bounding_box(self):
1286 r"""get_bounding_box(ExampleSingletonModifier self) -> BoundingBox3D"""
1287 return _IMP_example.ExampleSingletonModifier_get_bounding_box(self)
1290 r"""do_get_inputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1291 return _IMP_example.ExampleSingletonModifier_do_get_inputs(self, m, pis)
1294 r"""do_get_outputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1295 return _IMP_example.ExampleSingletonModifier_do_get_outputs(self, m, pis)
1298 r"""get_version_info(ExampleSingletonModifier self) -> VersionInfo"""
1299 return _IMP_example.ExampleSingletonModifier_get_version_info(self)
1300 __swig_destroy__ = _IMP_example.delete_ExampleSingletonModifier
1303 r"""__str__(ExampleSingletonModifier self) -> std::string"""
1304 return _IMP_example.ExampleSingletonModifier___str__(self)
1307 r"""__repr__(ExampleSingletonModifier self) -> std::string"""
1308 return _IMP_example.ExampleSingletonModifier___repr__(self)
1312 return _object_cast_to_ExampleSingletonModifier(o)
1315 def _get_as_binary(self):
1316 r"""_get_as_binary(ExampleSingletonModifier self) -> PyObject *"""
1317 return _IMP_example.ExampleSingletonModifier__get_as_binary(self)
1319 def _set_from_binary(self, p):
1320 r"""_set_from_binary(ExampleSingletonModifier self, PyObject * p)"""
1321 return _IMP_example.ExampleSingletonModifier__set_from_binary(self, p)
1323 def __getstate__(self):
1324 p = self._get_as_binary()
1325 if len(self.__dict__) > 1:
1326 d = self.__dict__.copy()
1331 def __setstate__(self, p):
1332 if not hasattr(self,
'this'):
1334 if isinstance(p, tuple):
1336 self.__dict__.update(d)
1337 return self._set_from_binary(p)
1340 def _get_jax(self, m, indexes):
1341 """Implementation of the modifier using JAX"""
1343 import jax.numpy
as jnp
1344 def apply_func(jm, box):
1345 jm[
'xyz'] = jm[
'xyz'].at[indexes].set(
1346 jnp.mod(jm[
'xyz'][indexes] - box[0], box[1] - box[0]) + box[0])
1348 box = jnp.array([self.get_bounding_box().get_corner(x)
1350 return self._wrap_jax(
1351 functools.partial(apply_func, box=box))
1355 _IMP_example.ExampleSingletonModifier_swigregister(ExampleSingletonModifier)
1357 r"""Proxy of C++ IMP::example::ExamplePairScore class."""
1359 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1361 def __init__(self, *args):
1363 __init__(ExamplePairScore self, double x0, double k) -> ExamplePairScore
1364 __init__(ExamplePairScore self) -> ExamplePairScore
1366 _IMP_example.ExamplePairScore_swiginit(self, _IMP_example.new_ExamplePairScore(*args))
1369 r"""get_mean(ExamplePairScore self) -> double"""
1370 return _IMP_example.ExamplePairScore_get_mean(self)
1372 def get_force_constant(self):
1373 r"""get_force_constant(ExamplePairScore self) -> double"""
1374 return _IMP_example.ExamplePairScore_get_force_constant(self)
1377 r"""do_get_inputs(ExamplePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1378 return _IMP_example.ExamplePairScore_do_get_inputs(self, m, pis)
1380 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
1381 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"""
1382 return _IMP_example.ExamplePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
1384 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
1385 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"""
1386 return _IMP_example.ExamplePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
1388 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
1389 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"""
1390 return _IMP_example.ExamplePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
1392 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
1393 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"""
1394 return _IMP_example.ExamplePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
1397 r"""get_version_info(ExamplePairScore self) -> VersionInfo"""
1398 return _IMP_example.ExamplePairScore_get_version_info(self)
1399 __swig_destroy__ = _IMP_example.delete_ExamplePairScore
1402 r"""__str__(ExamplePairScore self) -> std::string"""
1403 return _IMP_example.ExamplePairScore___str__(self)
1406 r"""__repr__(ExamplePairScore self) -> std::string"""
1407 return _IMP_example.ExamplePairScore___repr__(self)
1411 return _object_cast_to_ExamplePairScore(o)
1414 def _get_as_binary(self):
1415 r"""_get_as_binary(ExamplePairScore self) -> PyObject *"""
1416 return _IMP_example.ExamplePairScore__get_as_binary(self)
1418 def _set_from_binary(self, p):
1419 r"""_set_from_binary(ExamplePairScore self, PyObject * p)"""
1420 return _IMP_example.ExamplePairScore__set_from_binary(self, p)
1422 def __getstate__(self):
1423 p = self._get_as_binary()
1424 if len(self.__dict__) > 1:
1425 d = self.__dict__.copy()
1430 def __setstate__(self, p):
1431 if not hasattr(self,
'this'):
1433 if isinstance(p, tuple):
1435 self.__dict__.update(d)
1436 return self._set_from_binary(p)
1439 def _get_jax(self, m, indexes):
1440 """Implementation of the score using JAX.
1441 A PairScore takes as input the JAX Model, and returns the score
1442 for a given set of particle pair indexes. Unlike an IMP C++
1443 PairScore (which takes a single pair of indexes), the JAX score
1444 takes multiple indexes, as an Nx2 array, and should return an
1445 N-element array of scores."""
1446 import jax.numpy
as jnp
1448 def pair_score(jm, x0, k):
1449 xyzs = jm[
'xyz'][indexes]
1450 diff = jnp.linalg.norm(xyzs[:,0] - xyzs[:,1], axis=1) - x0
1451 return 0.5 * k * diff * diff
1452 f = functools.partial(pair_score, x0=self.get_mean(),
1453 k=self.get_force_constant())
1454 return self._wrap_jax(m, f)
1458 _IMP_example.ExamplePairScore_swigregister(ExamplePairScore)
1460 r"""Proxy of C++ IMP::example::ExampleSubsetFilterTable class."""
1462 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1464 def __init__(self, max_diff, pt):
1465 r"""__init__(ExampleSubsetFilterTable self, unsigned int max_diff, IMP::ParticlesTemp const & pt) -> ExampleSubsetFilterTable"""
1466 _IMP_example.ExampleSubsetFilterTable_swiginit(self, _IMP_example.new_ExampleSubsetFilterTable(max_diff, pt))
1469 r"""get_version_info(ExampleSubsetFilterTable self) -> VersionInfo"""
1470 return _IMP_example.ExampleSubsetFilterTable_get_version_info(self)
1471 __swig_destroy__ = _IMP_example.delete_ExampleSubsetFilterTable
1474 r"""__str__(ExampleSubsetFilterTable self) -> std::string"""
1475 return _IMP_example.ExampleSubsetFilterTable___str__(self)
1478 r"""__repr__(ExampleSubsetFilterTable self) -> std::string"""
1479 return _IMP_example.ExampleSubsetFilterTable___repr__(self)
1483 return _object_cast_to_ExampleSubsetFilterTable(o)
1487 _IMP_example.ExampleSubsetFilterTable_swigregister(ExampleSubsetFilterTable)
1489 r"""Proxy of C++ IMP::example::ExampleConstraint class."""
1491 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1493 def __init__(self, *args):
1495 __init__(ExampleConstraint self, Particle p) -> ExampleConstraint
1496 __init__(ExampleConstraint self) -> ExampleConstraint
1498 _IMP_example.ExampleConstraint_swiginit(self, _IMP_example.new_ExampleConstraint(*args))
1501 r"""get_index(ExampleConstraint self) -> ParticleIndex"""
1502 return _IMP_example.ExampleConstraint_get_index(self)
1505 r"""do_get_inputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1506 return _IMP_example.ExampleConstraint_do_get_inputs(self)
1509 r"""do_get_outputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1510 return _IMP_example.ExampleConstraint_do_get_outputs(self)
1514 r"""get_key() -> IntKey"""
1515 return _IMP_example.ExampleConstraint_get_key()
1518 r"""get_version_info(ExampleConstraint self) -> VersionInfo"""
1519 return _IMP_example.ExampleConstraint_get_version_info(self)
1520 __swig_destroy__ = _IMP_example.delete_ExampleConstraint
1523 r"""__str__(ExampleConstraint self) -> std::string"""
1524 return _IMP_example.ExampleConstraint___str__(self)
1527 r"""__repr__(ExampleConstraint self) -> std::string"""
1528 return _IMP_example.ExampleConstraint___repr__(self)
1532 return _object_cast_to_ExampleConstraint(o)
1535 def _get_as_binary(self):
1536 r"""_get_as_binary(ExampleConstraint self) -> PyObject *"""
1537 return _IMP_example.ExampleConstraint__get_as_binary(self)
1539 def _set_from_binary(self, p):
1540 r"""_set_from_binary(ExampleConstraint self, PyObject * p)"""
1541 return _IMP_example.ExampleConstraint__set_from_binary(self, p)
1543 def __getstate__(self):
1544 p = self._get_as_binary()
1545 if len(self.__dict__) > 1:
1546 d = self.__dict__.copy()
1551 def __setstate__(self, p):
1552 if not hasattr(self,
'this'):
1554 if isinstance(p, tuple):
1556 self.__dict__.update(d)
1557 return self._set_from_binary(p)
1561 """Implementation of the constraint using JAX.
1562 Similar to a Restraint, we must return a single JAX function which
1563 takes as input a JAX Model. However, in this case the function
1564 must return a new JAX Model, with the constraint applied."""
1566 def apply_func(jm, key, index):
1571 jm[key] = jm[key].at[index].add(1)
1573 key = self.get_key()
1574 f = functools.partial(apply_func, key=key.get_string(),
1575 index=self.get_index())
1580 return self._wrap_jax(f, keys=(key,))
1584 _IMP_example.ExampleConstraint_swigregister(ExampleConstraint)
1587 r"""get_number_of_incidences(IMP::ParticlesTemp const & psa, IMP::ParticlesTemp const & psb, double point_distance) -> unsigned int"""
1588 return _IMP_example.get_number_of_incidences(psa, psb, point_distance)
1591 r"""create_chain_restraint(Model m, IMP::ParticleIndexes const & ps, double length_factor, double k, std::string name) -> Restraint"""
1592 return _IMP_example.create_chain_restraint(m, ps, length_factor, k, name)
1595 r"""create_excluded_volume(Model m, IMP::ParticleIndexes const & ps, double k, std::string name) -> Restraint"""
1596 return _IMP_example.create_excluded_volume(m, ps, k, name)
1598 r"""Proxy of C++ IMP::example::ExampleTemplateClassD< 3 > class."""
1600 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1602 def __init__(self, *args):
1604 __init__(ExampleTemplateClass3D self) -> ExampleTemplateClass3D
1605 __init__(ExampleTemplateClass3D self, Vector3D a, Vector3D b) -> ExampleTemplateClass3D
1607 _IMP_example.ExampleTemplateClass3D_swiginit(self, _IMP_example.new_ExampleTemplateClass3D(*args))
1609 def get_point(self, i):
1610 r"""get_point(ExampleTemplateClass3D self, unsigned int i) -> Vector3D"""
1611 return _IMP_example.ExampleTemplateClass3D_get_point(self, i)
1613 def show(self, *args):
1614 r"""show(ExampleTemplateClass3D self, _ostream out=std::cout)"""
1615 return _IMP_example.ExampleTemplateClass3D_show(self, *args)
1618 r"""__str__(ExampleTemplateClass3D self) -> std::string"""
1619 return _IMP_example.ExampleTemplateClass3D___str__(self)
1622 r"""__repr__(ExampleTemplateClass3D self) -> std::string"""
1623 return _IMP_example.ExampleTemplateClass3D___repr__(self)
1624 __swig_destroy__ = _IMP_example.delete_ExampleTemplateClass3D
1627 _IMP_example.ExampleTemplateClass3D_swigregister(ExampleTemplateClass3D)
1629 def get_module_name():
1630 r"""get_module_name() -> std::string const"""
1631 return _IMP_example.get_module_name()
1634 r"""get_module_version() -> std::string const"""
1635 return _IMP_example.get_module_version()
1638 r"""get_example_path(std::string fname) -> std::string"""
1639 return _IMP_example.get_example_path(fname)
1642 r"""get_data_path(std::string fname) -> std::string"""
1643 return _IMP_example.get_data_path(fname)
1645 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.
double get_mean(const cv::Mat &mat, const cvIntMat &mask)
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.
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
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.