20import 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,)
30def _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
43def _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)
52class _SwigNonDynamicMeta(type):
53 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
54 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
59class IMP_ISD_SwigPyIterator(object):
60 r"""Proxy of C++ swig::IMP_ISD_SwigPyIterator class."""
62 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
64 def __init__(self, *args, **kwargs):
65 raise AttributeError(
"No constructor defined - class is abstract")
67 __swig_destroy__ = _IMP_isd.delete_IMP_ISD_SwigPyIterator
70 r"""value(IMP_ISD_SwigPyIterator self) -> PyObject *"""
71 return _IMP_isd.IMP_ISD_SwigPyIterator_value(self)
74 r"""incr(IMP_ISD_SwigPyIterator self, size_t n=1) -> IMP_ISD_SwigPyIterator"""
75 return _IMP_isd.IMP_ISD_SwigPyIterator_incr(self, n)
78 r"""decr(IMP_ISD_SwigPyIterator self, size_t n=1) -> IMP_ISD_SwigPyIterator"""
79 return _IMP_isd.IMP_ISD_SwigPyIterator_decr(self, n)
81 def distance(self, x):
82 r"""distance(IMP_ISD_SwigPyIterator self, IMP_ISD_SwigPyIterator x) -> ptrdiff_t"""
83 return _IMP_isd.IMP_ISD_SwigPyIterator_distance(self, x)
86 r"""equal(IMP_ISD_SwigPyIterator self, IMP_ISD_SwigPyIterator x) -> bool"""
87 return _IMP_isd.IMP_ISD_SwigPyIterator_equal(self, x)
90 r"""copy(IMP_ISD_SwigPyIterator self) -> IMP_ISD_SwigPyIterator"""
91 return _IMP_isd.IMP_ISD_SwigPyIterator_copy(self)
94 r"""__next__(IMP_ISD_SwigPyIterator self) -> PyObject *"""
95 return _IMP_isd.IMP_ISD_SwigPyIterator___next__(self)
98 r"""previous(IMP_ISD_SwigPyIterator self) -> PyObject *"""
99 return _IMP_isd.IMP_ISD_SwigPyIterator_previous(self)
101 def advance(self, n):
102 r"""advance(IMP_ISD_SwigPyIterator self, ptrdiff_t n) -> IMP_ISD_SwigPyIterator"""
103 return _IMP_isd.IMP_ISD_SwigPyIterator_advance(self, n)
106 r"""__eq__(IMP_ISD_SwigPyIterator self, IMP_ISD_SwigPyIterator x) -> bool"""
107 return _IMP_isd.IMP_ISD_SwigPyIterator___eq__(self, x)
110 r"""__ne__(IMP_ISD_SwigPyIterator self, IMP_ISD_SwigPyIterator x) -> bool"""
111 return _IMP_isd.IMP_ISD_SwigPyIterator___ne__(self, x)
113 def __iadd__(self, n):
114 r"""__iadd__(IMP_ISD_SwigPyIterator self, ptrdiff_t n) -> IMP_ISD_SwigPyIterator"""
115 return _IMP_isd.IMP_ISD_SwigPyIterator___iadd__(self, n)
117 def __isub__(self, n):
118 r"""__isub__(IMP_ISD_SwigPyIterator self, ptrdiff_t n) -> IMP_ISD_SwigPyIterator"""
119 return _IMP_isd.IMP_ISD_SwigPyIterator___isub__(self, n)
121 def __add__(self, n):
122 r"""__add__(IMP_ISD_SwigPyIterator self, ptrdiff_t n) -> IMP_ISD_SwigPyIterator"""
123 return _IMP_isd.IMP_ISD_SwigPyIterator___add__(self, n)
125 def __sub__(self, *args):
127 __sub__(IMP_ISD_SwigPyIterator self, ptrdiff_t n) -> IMP_ISD_SwigPyIterator
128 __sub__(IMP_ISD_SwigPyIterator self, IMP_ISD_SwigPyIterator x) -> ptrdiff_t
130 return _IMP_isd.IMP_ISD_SwigPyIterator___sub__(self, *args)
134# Register IMP_ISD_SwigPyIterator in _IMP_isd:
135_IMP_isd.IMP_ISD_SwigPyIterator_swigregister(IMP_ISD_SwigPyIterator)
142IMP_DEBUG = _IMP_isd.IMP_DEBUG
144IMP_RELEASE = _IMP_isd.IMP_RELEASE
146IMP_SILENT = _IMP_isd.IMP_SILENT
148IMP_PROGRESS = _IMP_isd.IMP_PROGRESS
150IMP_TERSE = _IMP_isd.IMP_TERSE
152IMP_VERBOSE = _IMP_isd.IMP_VERBOSE
154IMP_MEMORY = _IMP_isd.IMP_MEMORY
156IMP_NONE = _IMP_isd.IMP_NONE
158IMP_USAGE = _IMP_isd.IMP_USAGE
160IMP_INTERNAL = _IMP_isd.IMP_INTERNAL
162IMP_KERNEL_HAS_LOG4CXX = _IMP_isd.IMP_KERNEL_HAS_LOG4CXX
164IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_isd.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
166IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_isd.IMP_COMPILER_HAS_DEBUG_VECTOR
168IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_isd.IMP_COMPILER_HAS_RANDOM_SHUFFLE
170IMP_COMPILER_HAS_THREE_WAY = _IMP_isd.IMP_COMPILER_HAS_THREE_WAY
172IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_isd.IMP_KERNEL_HAS_BOOST_RANDOM
174IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_isd.IMP_KERNEL_HAS_BOOST_SYSTEM
176IMP_KERNEL_HAS_GPERFTOOLS = _IMP_isd.IMP_KERNEL_HAS_GPERFTOOLS
178IMP_KERNEL_HAS_NUMPY = _IMP_isd.IMP_KERNEL_HAS_NUMPY
180IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_isd.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
182IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_isd.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
184IMPKERNEL_SHOW_WARNINGS = _IMP_isd.IMPKERNEL_SHOW_WARNINGS
188class _DirectorObjects:
189 """@internal Simple class to keep references to director objects
190 to prevent premature deletion."""
193 def register(self, obj):
194 """Take a reference to a director object; will only work for
195 refcounted C++ classes"""
196 if hasattr(obj, 'get_ref_count'):
197 self._objects.append(obj)
199 """Only drop our reference and allow cleanup by Python if no other
200 Python references exist (we hold 3 references: one in self._objects,
201 one in x, and one in the argument list for getrefcount) *and* no
202 other C++ references exist (the Python object always holds one)"""
203 objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
204 or x.get_ref_count() > 1]
205# Do in two steps so the references are kept until the end of the
206# function (deleting references may trigger a fresh call to this method)
208 def get_object_count(self):
209 """Get number of director objects (useful for testing only)"""
210 return len(self._objects)
211_director_objects = _DirectorObjects()
213class _ostream(object):
214 r"""Proxy of C++ std::ostream class."""
216 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
218 def __init__(self, *args, **kwargs):
219 raise AttributeError("No constructor defined")
220 __repr__ = _swig_repr
222 def write(self, osa_buf):
223 r"""write(_ostream self, char const * osa_buf)"""
224 return _IMP_isd._ostream_write(self, osa_buf)
226# Register _ostream in _IMP_isd:
227_IMP_isd._ostream_swigregister(_ostream)
228IMP_C_OPEN_BINARY = _IMP_isd.IMP_C_OPEN_BINARY
231IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_CGAL_HAS_BOOST_FILESYSTEM
233IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
235IMP_CGAL_HAS_BOOST_RANDOM = _IMP_isd.IMP_CGAL_HAS_BOOST_RANDOM
237IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_isd.IMP_CGAL_HAS_BOOST_SYSTEM
239IMP_CGAL_HAS_GPERFTOOLS = _IMP_isd.IMP_CGAL_HAS_GPERFTOOLS
241IMP_CGAL_HAS_NUMPY = _IMP_isd.IMP_CGAL_HAS_NUMPY
243IMPCGAL_SHOW_WARNINGS = _IMP_isd.IMPCGAL_SHOW_WARNINGS
246IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_isd.IMP_ALGEBRA_HAS_IMP_CGAL
248IMP_ALGEBRA_HAS_ANN = _IMP_isd.IMP_ALGEBRA_HAS_ANN
250IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
252IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
254IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_isd.IMP_ALGEBRA_HAS_BOOST_RANDOM
256IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_isd.IMP_ALGEBRA_HAS_BOOST_SYSTEM
258IMP_ALGEBRA_HAS_CGAL = _IMP_isd.IMP_ALGEBRA_HAS_CGAL
260IMP_ALGEBRA_HAS_GPERFTOOLS = _IMP_isd.IMP_ALGEBRA_HAS_GPERFTOOLS
262IMP_ALGEBRA_HAS_NUMPY = _IMP_isd.IMP_ALGEBRA_HAS_NUMPY
264IMPALGEBRA_SHOW_WARNINGS = _IMP_isd.IMPALGEBRA_SHOW_WARNINGS
267IMP_DISPLAY_HAS_IMP_CGAL = _IMP_isd.IMP_DISPLAY_HAS_IMP_CGAL
269IMP_DISPLAY_HAS_ANN = _IMP_isd.IMP_DISPLAY_HAS_ANN
271IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
273IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
275IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_isd.IMP_DISPLAY_HAS_BOOST_RANDOM
277IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_isd.IMP_DISPLAY_HAS_BOOST_SYSTEM
279IMP_DISPLAY_HAS_CGAL = _IMP_isd.IMP_DISPLAY_HAS_CGAL
281IMP_DISPLAY_HAS_GPERFTOOLS = _IMP_isd.IMP_DISPLAY_HAS_GPERFTOOLS
283IMP_DISPLAY_HAS_NUMPY = _IMP_isd.IMP_DISPLAY_HAS_NUMPY
285IMPDISPLAY_SHOW_WARNINGS = _IMP_isd.IMPDISPLAY_SHOW_WARNINGS
288IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
290IMP_SCORE_FUNCTOR_HAS_ANN = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_ANN
292IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
294IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
296IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
298IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
300IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_CGAL
302IMP_SCORE_FUNCTOR_HAS_GPERFTOOLS = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_GPERFTOOLS
304IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_HDF5
306IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_isd.IMP_SCORE_FUNCTOR_HAS_NUMPY
308IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_isd.IMPSCOREFUNCTOR_SHOW_WARNINGS
310import IMP.score_functor
311IMP_STATISTICS_HAS_IMP_CGAL = _IMP_isd.IMP_STATISTICS_HAS_IMP_CGAL
313IMP_STATISTICS_HAS_ANN = _IMP_isd.IMP_STATISTICS_HAS_ANN
315IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
317IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
319IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_isd.IMP_STATISTICS_HAS_BOOST_RANDOM
321IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_isd.IMP_STATISTICS_HAS_BOOST_SYSTEM
323IMP_STATISTICS_HAS_CGAL = _IMP_isd.IMP_STATISTICS_HAS_CGAL
325IMP_STATISTICS_HAS_GPERFTOOLS = _IMP_isd.IMP_STATISTICS_HAS_GPERFTOOLS
327IMP_STATISTICS_HAS_NUMPY = _IMP_isd.IMP_STATISTICS_HAS_NUMPY
329IMPSTATISTICS_SHOW_WARNINGS = _IMP_isd.IMPSTATISTICS_SHOW_WARNINGS
332IMP_CORE_HAS_IMP_CGAL = _IMP_isd.IMP_CORE_HAS_IMP_CGAL
334IMP_CORE_HAS_IMP_KERNEL = _IMP_isd.IMP_CORE_HAS_IMP_KERNEL
336IMP_CORE_HAS_ANN = _IMP_isd.IMP_CORE_HAS_ANN
338IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_CORE_HAS_BOOST_FILESYSTEM
340IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
342IMP_CORE_HAS_BOOST_RANDOM = _IMP_isd.IMP_CORE_HAS_BOOST_RANDOM
344IMP_CORE_HAS_BOOST_SYSTEM = _IMP_isd.IMP_CORE_HAS_BOOST_SYSTEM
346IMP_CORE_HAS_CGAL = _IMP_isd.IMP_CORE_HAS_CGAL
348IMP_CORE_HAS_GPERFTOOLS = _IMP_isd.IMP_CORE_HAS_GPERFTOOLS
350IMP_CORE_HAS_HDF5 = _IMP_isd.IMP_CORE_HAS_HDF5
352IMP_CORE_HAS_NUMPY = _IMP_isd.IMP_CORE_HAS_NUMPY
354IMPCORE_SHOW_WARNINGS = _IMP_isd.IMPCORE_SHOW_WARNINGS
357IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_isd.IMP_CONTAINER_HAS_IMP_ALGEBRA
359IMP_CONTAINER_HAS_IMP_CGAL = _IMP_isd.IMP_CONTAINER_HAS_IMP_CGAL
361IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_isd.IMP_CONTAINER_HAS_IMP_DISPLAY
363IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_isd.IMP_CONTAINER_HAS_IMP_KERNEL
365IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_isd.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
367IMP_CONTAINER_HAS_ANN = _IMP_isd.IMP_CONTAINER_HAS_ANN
369IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
371IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
373IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_isd.IMP_CONTAINER_HAS_BOOST_RANDOM
375IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_isd.IMP_CONTAINER_HAS_BOOST_SYSTEM
377IMP_CONTAINER_HAS_CGAL = _IMP_isd.IMP_CONTAINER_HAS_CGAL
379IMP_CONTAINER_HAS_GPERFTOOLS = _IMP_isd.IMP_CONTAINER_HAS_GPERFTOOLS
381IMP_CONTAINER_HAS_HDF5 = _IMP_isd.IMP_CONTAINER_HAS_HDF5
383IMP_CONTAINER_HAS_NUMPY = _IMP_isd.IMP_CONTAINER_HAS_NUMPY
385IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_isd.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
387IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_isd.IMP_CONTAINER_HAS_PYTHON_IHM
389IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_isd.IMP_CONTAINER_HAS_ROBIN_MAP
391IMPCONTAINER_SHOW_WARNINGS = _IMP_isd.IMPCONTAINER_SHOW_WARNINGS
394IMP_ATOM_HAS_IMP_CGAL = _IMP_isd.IMP_ATOM_HAS_IMP_CGAL
396IMP_ATOM_HAS_IMP_KERNEL = _IMP_isd.IMP_ATOM_HAS_IMP_KERNEL
398IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_isd.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
400IMP_ATOM_HAS_ANN = _IMP_isd.IMP_ATOM_HAS_ANN
402IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
404IMP_ATOM_HAS_BOOST_RANDOM = _IMP_isd.IMP_ATOM_HAS_BOOST_RANDOM
406IMP_ATOM_HAS_BOOST_REGEX = _IMP_isd.IMP_ATOM_HAS_BOOST_REGEX
408IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_isd.IMP_ATOM_HAS_BOOST_SYSTEM
410IMP_ATOM_HAS_CGAL = _IMP_isd.IMP_ATOM_HAS_CGAL
412IMP_ATOM_HAS_GPERFTOOLS = _IMP_isd.IMP_ATOM_HAS_GPERFTOOLS
414IMP_ATOM_HAS_HDF5 = _IMP_isd.IMP_ATOM_HAS_HDF5
416IMP_ATOM_HAS_NUMPY = _IMP_isd.IMP_ATOM_HAS_NUMPY
418IMP_ATOM_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_isd.IMP_ATOM_HAS_GOOGLE_DENSE_HASH_MAP
420IMP_ATOM_HAS_PYTHON_IHM = _IMP_isd.IMP_ATOM_HAS_PYTHON_IHM
422IMP_ATOM_HAS_ROBIN_MAP = _IMP_isd.IMP_ATOM_HAS_ROBIN_MAP
424IMPATOM_SHOW_WARNINGS = _IMP_isd.IMPATOM_SHOW_WARNINGS
426IMP_ATOM_TYPE_INDEX = _IMP_isd.IMP_ATOM_TYPE_INDEX
428IMP_RESIDUE_TYPE_INDEX = _IMP_isd.IMP_RESIDUE_TYPE_INDEX
430IMP_HIERARCHY_TYPE_INDEX = _IMP_isd.IMP_HIERARCHY_TYPE_INDEX
432IMP_CHAIN_TYPE_INDEX = _IMP_isd.IMP_CHAIN_TYPE_INDEX
435IMP_EM_HAS_IMP_CGAL = _IMP_isd.IMP_EM_HAS_IMP_CGAL
437IMP_EM_HAS_IMP_CONTAINER = _IMP_isd.IMP_EM_HAS_IMP_CONTAINER
439IMP_EM_HAS_IMP_DISPLAY = _IMP_isd.IMP_EM_HAS_IMP_DISPLAY
441IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_isd.IMP_EM_HAS_IMP_SCORE_FUNCTOR
443IMP_EM_HAS_ANN = _IMP_isd.IMP_EM_HAS_ANN
445IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_EM_HAS_BOOST_FILESYSTEM
447IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
449IMP_EM_HAS_BOOST_RANDOM = _IMP_isd.IMP_EM_HAS_BOOST_RANDOM
451IMP_EM_HAS_BOOST_REGEX = _IMP_isd.IMP_EM_HAS_BOOST_REGEX
453IMP_EM_HAS_BOOST_SYSTEM = _IMP_isd.IMP_EM_HAS_BOOST_SYSTEM
455IMP_EM_HAS_CGAL = _IMP_isd.IMP_EM_HAS_CGAL
457IMP_EM_HAS_GPERFTOOLS = _IMP_isd.IMP_EM_HAS_GPERFTOOLS
459IMP_EM_HAS_HDF5 = _IMP_isd.IMP_EM_HAS_HDF5
461IMP_EM_HAS_NUMPY = _IMP_isd.IMP_EM_HAS_NUMPY
463IMP_EM_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_isd.IMP_EM_HAS_GOOGLE_DENSE_HASH_MAP
465IMP_EM_HAS_PYTHON_IHM = _IMP_isd.IMP_EM_HAS_PYTHON_IHM
467IMP_EM_HAS_ROBIN_MAP = _IMP_isd.IMP_EM_HAS_ROBIN_MAP
469IMPEM_SHOW_WARNINGS = _IMP_isd.IMPEM_SHOW_WARNINGS
472IMP_SAXS_HAS_IMP_CGAL = _IMP_isd.IMP_SAXS_HAS_IMP_CGAL
474IMP_SAXS_HAS_IMP_CONTAINER = _IMP_isd.IMP_SAXS_HAS_IMP_CONTAINER
476IMP_SAXS_HAS_IMP_DISPLAY = _IMP_isd.IMP_SAXS_HAS_IMP_DISPLAY
478IMP_SAXS_HAS_IMP_KERNEL = _IMP_isd.IMP_SAXS_HAS_IMP_KERNEL
480IMP_SAXS_HAS_IMP_SCORE_FUNCTOR = _IMP_isd.IMP_SAXS_HAS_IMP_SCORE_FUNCTOR
482IMP_SAXS_HAS_ANN = _IMP_isd.IMP_SAXS_HAS_ANN
484IMP_SAXS_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_SAXS_HAS_BOOST_FILESYSTEM
486IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS
488IMP_SAXS_HAS_BOOST_RANDOM = _IMP_isd.IMP_SAXS_HAS_BOOST_RANDOM
490IMP_SAXS_HAS_BOOST_REGEX = _IMP_isd.IMP_SAXS_HAS_BOOST_REGEX
492IMP_SAXS_HAS_BOOST_SYSTEM = _IMP_isd.IMP_SAXS_HAS_BOOST_SYSTEM
494IMP_SAXS_HAS_CGAL = _IMP_isd.IMP_SAXS_HAS_CGAL
496IMP_SAXS_HAS_GPERFTOOLS = _IMP_isd.IMP_SAXS_HAS_GPERFTOOLS
498IMP_SAXS_HAS_HDF5 = _IMP_isd.IMP_SAXS_HAS_HDF5
500IMP_SAXS_HAS_NUMPY = _IMP_isd.IMP_SAXS_HAS_NUMPY
502IMP_SAXS_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_isd.IMP_SAXS_HAS_GOOGLE_DENSE_HASH_MAP
504IMP_SAXS_HAS_PYTHON_IHM = _IMP_isd.IMP_SAXS_HAS_PYTHON_IHM
506IMP_SAXS_HAS_ROBIN_MAP = _IMP_isd.IMP_SAXS_HAS_ROBIN_MAP
508IMPSAXS_SHOW_WARNINGS = _IMP_isd.IMPSAXS_SHOW_WARNINGS
511IMP_ISD_HAS_IMP_CGAL = _IMP_isd.IMP_ISD_HAS_IMP_CGAL
513IMP_ISD_HAS_IMP_DISPLAY = _IMP_isd.IMP_ISD_HAS_IMP_DISPLAY
515IMP_ISD_HAS_IMP_SCORE_FUNCTOR = _IMP_isd.IMP_ISD_HAS_IMP_SCORE_FUNCTOR
517IMP_ISD_HAS_ANN = _IMP_isd.IMP_ISD_HAS_ANN
519IMP_ISD_HAS_BOOST_FILESYSTEM = _IMP_isd.IMP_ISD_HAS_BOOST_FILESYSTEM
521IMP_ISD_HAS_BOOST_PROGRAMOPTIONS = _IMP_isd.IMP_ISD_HAS_BOOST_PROGRAMOPTIONS
523IMP_ISD_HAS_BOOST_RANDOM = _IMP_isd.IMP_ISD_HAS_BOOST_RANDOM
525IMP_ISD_HAS_BOOST_REGEX = _IMP_isd.IMP_ISD_HAS_BOOST_REGEX
527IMP_ISD_HAS_BOOST_SYSTEM = _IMP_isd.IMP_ISD_HAS_BOOST_SYSTEM
529IMP_ISD_HAS_CGAL = _IMP_isd.IMP_ISD_HAS_CGAL
531IMP_ISD_HAS_GPERFTOOLS = _IMP_isd.IMP_ISD_HAS_GPERFTOOLS
533IMP_ISD_HAS_HDF5 = _IMP_isd.IMP_ISD_HAS_HDF5
535IMP_ISD_HAS_NUMPY = _IMP_isd.IMP_ISD_HAS_NUMPY
537IMP_ISD_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_isd.IMP_ISD_HAS_GOOGLE_DENSE_HASH_MAP
539IMP_ISD_HAS_PYTHON_IHM = _IMP_isd.IMP_ISD_HAS_PYTHON_IHM
541IMP_ISD_HAS_ROBIN_MAP = _IMP_isd.IMP_ISD_HAS_ROBIN_MAP
543IMPISD_SHOW_WARNINGS = _IMP_isd.IMPISD_SHOW_WARNINGS
546_object_types.append("ISDRestraint")
549def _object_cast_to_ISDRestraint(o):
550 r"""_object_cast_to_ISDRestraint(Object o) -> ISDRestraint"""
551 return _IMP_isd._object_cast_to_ISDRestraint(o)
553_object_types.append("CrossLinkMSRestraint")
556def _object_cast_to_CrossLinkMSRestraint(o):
557 r"""_object_cast_to_CrossLinkMSRestraint(Object o) -> CrossLinkMSRestraint"""
558 return _IMP_isd._object_cast_to_CrossLinkMSRestraint(o)
560_object_types.append("ExactCrossLinkMSRestraint")
563def _object_cast_to_ExactCrossLinkMSRestraint(o):
564 r"""_object_cast_to_ExactCrossLinkMSRestraint(Object o) -> ExactCrossLinkMSRestraint"""
565 return _IMP_isd._object_cast_to_ExactCrossLinkMSRestraint(o)
567_object_types.append("LogWrapper")
570def _object_cast_to_LogWrapper(o):
571 r"""_object_cast_to_LogWrapper(Object o) -> LogWrapper"""
572 return _IMP_isd._object_cast_to_LogWrapper(o)
574_object_types.append("UniformPrior")
577def _object_cast_to_UniformPrior(o):
578 r"""_object_cast_to_UniformPrior(Object o) -> UniformPrior"""
579 return _IMP_isd._object_cast_to_UniformPrior(o)
581_object_types.append("JeffreysRestraint")
584def _object_cast_to_JeffreysRestraint(o):
585 r"""_object_cast_to_JeffreysRestraint(Object o) -> JeffreysRestraint"""
586 return _IMP_isd._object_cast_to_JeffreysRestraint(o)
588_object_types.append("NuisanceScoreState")
591def _object_cast_to_NuisanceScoreState(o):
592 r"""_object_cast_to_NuisanceScoreState(Object o) -> NuisanceScoreState"""
593 return _IMP_isd._object_cast_to_NuisanceScoreState(o)
595_object_types.append("NormalSigmaPCRestraint")
598def _object_cast_to_NormalSigmaPCRestraint(o):
599 r"""_object_cast_to_NormalSigmaPCRestraint(Object o) -> NormalSigmaPCRestraint"""
600 return _IMP_isd._object_cast_to_NormalSigmaPCRestraint(o)
602_object_types.append("vonMisesKappaJeffreysRestraint")
605def _object_cast_to_vonMisesKappaJeffreysRestraint(o):
606 r"""_object_cast_to_vonMisesKappaJeffreysRestraint(Object o) -> vonMisesKappaJeffreysRestraint"""
607 return _IMP_isd._object_cast_to_vonMisesKappaJeffreysRestraint(o)
609_object_types.append("vonMisesKappaConjugateRestraint")
612def _object_cast_to_vonMisesKappaConjugateRestraint(o):
613 r"""_object_cast_to_vonMisesKappaConjugateRestraint(Object o) -> vonMisesKappaConjugateRestraint"""
614 return _IMP_isd._object_cast_to_vonMisesKappaConjugateRestraint(o)
616_object_types.append("Distribution")
619def _object_cast_to_Distribution(o):
620 r"""_object_cast_to_Distribution(Object o) -> Distribution"""
621 return _IMP_isd._object_cast_to_Distribution(o)
623_object_types.append("OneDimensionalDistribution")
626def _object_cast_to_OneDimensionalDistribution(o):
627 r"""_object_cast_to_OneDimensionalDistribution(Object o) -> OneDimensionalDistribution"""
628 return _IMP_isd._object_cast_to_OneDimensionalDistribution(o)
630_object_types.append("OneDimensionalSufficientDistribution")
633def _object_cast_to_OneDimensionalSufficientDistribution(o):
634 r"""_object_cast_to_OneDimensionalSufficientDistribution(Object o) -> OneDimensionalSufficientDistribution"""
635 return _IMP_isd._object_cast_to_OneDimensionalSufficientDistribution(o)
637_object_types.append("FNormal")
640def _object_cast_to_FNormal(o):
641 r"""_object_cast_to_FNormal(Object o) -> FNormal"""
642 return _IMP_isd._object_cast_to_FNormal(o)
644_object_types.append("FStudentT")
647def _object_cast_to_FStudentT(o):
648 r"""_object_cast_to_FStudentT(Object o) -> FStudentT"""
649 return _IMP_isd._object_cast_to_FStudentT(o)
651_object_types.append("vonMises")
654def _object_cast_to_vonMises(o):
655 r"""_object_cast_to_vonMises(Object o) -> vonMises"""
656 return _IMP_isd._object_cast_to_vonMises(o)
658_object_types.append("vonMisesSufficient")
661def _object_cast_to_vonMisesSufficient(o):
662 r"""_object_cast_to_vonMisesSufficient(Object o) -> vonMisesSufficient"""
663 return _IMP_isd._object_cast_to_vonMisesSufficient(o)
665_object_types.append("PenalizedComplexityPrior")
668def _object_cast_to_PenalizedComplexityPrior(o):
669 r"""_object_cast_to_PenalizedComplexityPrior(Object o) -> PenalizedComplexityPrior"""
670 return _IMP_isd._object_cast_to_PenalizedComplexityPrior(o)
673 return [Nuisance(x) for x in l]
674_plural_types.append("Nuisances")
677_value_types.append("Nuisance")
681 return [Scale(x) for x in l]
682_plural_types.append("Scales")
685_value_types.append("Scale")
689 return [Switching(x) for x in l]
690_plural_types.append("Switchings")
693_value_types.append("Switching")
696_object_types.append("NOERestraint")
699def _object_cast_to_NOERestraint(o):
700 r"""_object_cast_to_NOERestraint(Object o) -> NOERestraint"""
701 return _IMP_isd._object_cast_to_NOERestraint(o)
704 return [Weight(x) for x in l]
705_plural_types.append("Weights")
708_value_types.append("Weight")
711_object_types.append("GaussianRestraint")
714def _object_cast_to_GaussianRestraint(o):
715 r"""_object_cast_to_GaussianRestraint(Object o) -> GaussianRestraint"""
716 return _IMP_isd._object_cast_to_GaussianRestraint(o)
718_object_types.append("StudentTRestraint")
721def _object_cast_to_StudentTRestraint(o):
722 r"""_object_cast_to_StudentTRestraint(Object o) -> StudentTRestraint"""
723 return _IMP_isd._object_cast_to_StudentTRestraint(o)
725_object_types.append("LognormalRestraint")
728def _object_cast_to_LognormalRestraint(o):
729 r"""_object_cast_to_LognormalRestraint(Object o) -> LognormalRestraint"""
730 return _IMP_isd._object_cast_to_LognormalRestraint(o)
732_object_types.append("LognormalAmbiguousRestraint")
735def _object_cast_to_LognormalAmbiguousRestraint(o):
736 r"""_object_cast_to_LognormalAmbiguousRestraint(Object o) -> LognormalAmbiguousRestraint"""
737 return _IMP_isd._object_cast_to_LognormalAmbiguousRestraint(o)
739_object_types.append("AmbiguousNOERestraint")
742def _object_cast_to_AmbiguousNOERestraint(o):
743 r"""_object_cast_to_AmbiguousNOERestraint(Object o) -> AmbiguousNOERestraint"""
744 return _IMP_isd._object_cast_to_AmbiguousNOERestraint(o)
746_object_types.append("MarginalNOERestraint")
749def _object_cast_to_MarginalNOERestraint(o):
750 r"""_object_cast_to_MarginalNOERestraint(Object o) -> MarginalNOERestraint"""
751 return _IMP_isd._object_cast_to_MarginalNOERestraint(o)
753_object_types.append("MarginalHBondRestraint")
756def _object_cast_to_MarginalHBondRestraint(o):
757 r"""_object_cast_to_MarginalHBondRestraint(Object o) -> MarginalHBondRestraint"""
758 return _IMP_isd._object_cast_to_MarginalHBondRestraint(o)
760_object_types.append("TALOSRestraint")
763def _object_cast_to_TALOSRestraint(o):
764 r"""_object_cast_to_TALOSRestraint(Object o) -> TALOSRestraint"""
765 return _IMP_isd._object_cast_to_TALOSRestraint(o)
767_object_types.append("RepulsiveDistancePairScore")
770def _object_cast_to_RepulsiveDistancePairScore(o):
771 r"""_object_cast_to_RepulsiveDistancePairScore(Object o) -> RepulsiveDistancePairScore"""
772 return _IMP_isd._object_cast_to_RepulsiveDistancePairScore(o)
774_object_types.append("AmbiguousRestraint")
777def _object_cast_to_AmbiguousRestraint(o):
778 r"""_object_cast_to_AmbiguousRestraint(Object o) -> AmbiguousRestraint"""
779 return _IMP_isd._object_cast_to_AmbiguousRestraint(o)
781_object_types.append("UnivariateFunction")
784def _object_cast_to_UnivariateFunction(o):
785 r"""_object_cast_to_UnivariateFunction(Object o) -> UnivariateFunction"""
786 return _IMP_isd._object_cast_to_UnivariateFunction(o)
788_object_types.append("Linear1DFunction")
791def _object_cast_to_Linear1DFunction(o):
792 r"""_object_cast_to_Linear1DFunction(Object o) -> Linear1DFunction"""
793 return _IMP_isd._object_cast_to_Linear1DFunction(o)
795_object_types.append("GeneralizedGuinierPorodFunction")
798def _object_cast_to_GeneralizedGuinierPorodFunction(o):
799 r"""_object_cast_to_GeneralizedGuinierPorodFunction(Object o) -> GeneralizedGuinierPorodFunction"""
800 return _IMP_isd._object_cast_to_GeneralizedGuinierPorodFunction(o)
802_object_types.append("BivariateFunction")
805def _object_cast_to_BivariateFunction(o):
806 r"""_object_cast_to_BivariateFunction(Object o) -> BivariateFunction"""
807 return _IMP_isd._object_cast_to_BivariateFunction(o)
809_object_types.append("Covariance1DFunction")
812def _object_cast_to_Covariance1DFunction(o):
813 r"""_object_cast_to_Covariance1DFunction(Object o) -> Covariance1DFunction"""
814 return _IMP_isd._object_cast_to_Covariance1DFunction(o)
816_object_types.append("GaussianProcessInterpolation")
819def _object_cast_to_GaussianProcessInterpolation(o):
820 r"""_object_cast_to_GaussianProcessInterpolation(Object o) -> GaussianProcessInterpolation"""
821 return _IMP_isd._object_cast_to_GaussianProcessInterpolation(o)
823_object_types.append("GaussianProcessInterpolationRestraint")
826def _object_cast_to_GaussianProcessInterpolationRestraint(o):
827 r"""_object_cast_to_GaussianProcessInterpolationRestraint(Object o) -> GaussianProcessInterpolationRestraint"""
828 return _IMP_isd._object_cast_to_GaussianProcessInterpolationRestraint(o)
830_object_types.append("MolecularDynamics")
833_object_types.append("MolecularDynamicsMover")
836def _object_cast_to_MolecularDynamicsMover(o):
837 r"""_object_cast_to_MolecularDynamicsMover(Object o) -> MolecularDynamicsMover"""
838 return _IMP_isd._object_cast_to_MolecularDynamicsMover(o)
840_object_types.append("HybridMonteCarlo")
843def _object_cast_to_HybridMonteCarlo(o):
844 r"""_object_cast_to_HybridMonteCarlo(Object o) -> HybridMonteCarlo"""
845 return _IMP_isd._object_cast_to_HybridMonteCarlo(o)
847_object_types.append("FretData")
850def _object_cast_to_FretData(o):
851 r"""_object_cast_to_FretData(Object o) -> FretData"""
852 return _IMP_isd._object_cast_to_FretData(o)
854_object_types.append("FretRestraint")
857def _object_cast_to_FretRestraint(o):
858 r"""_object_cast_to_FretRestraint(Object o) -> FretRestraint"""
859 return _IMP_isd._object_cast_to_FretRestraint(o)
861_object_types.append("CrossLinkData")
864def _object_cast_to_CrossLinkData(o):
865 r"""_object_cast_to_CrossLinkData(Object o) -> CrossLinkData"""
866 return _IMP_isd._object_cast_to_CrossLinkData(o)
868_object_types.append("CysteineCrossLinkData")
871def _object_cast_to_CysteineCrossLinkData(o):
872 r"""_object_cast_to_CysteineCrossLinkData(Object o) -> CysteineCrossLinkData"""
873 return _IMP_isd._object_cast_to_CysteineCrossLinkData(o)
875_object_types.append("CysteineCrossLinkRestraint")
878def _object_cast_to_CysteineCrossLinkRestraint(o):
879 r"""_object_cast_to_CysteineCrossLinkRestraint(Object o) -> CysteineCrossLinkRestraint"""
880 return _IMP_isd._object_cast_to_CysteineCrossLinkRestraint(o)
882_object_types.append("WeightMover")
885def _object_cast_to_WeightMover(o):
886 r"""_object_cast_to_WeightMover(Object o) -> WeightMover"""
887 return _IMP_isd._object_cast_to_WeightMover(o)
889_object_types.append("WeightRestraint")
892def _object_cast_to_WeightRestraint(o):
893 r"""_object_cast_to_WeightRestraint(Object o) -> WeightRestraint"""
894 return _IMP_isd._object_cast_to_WeightRestraint(o)
896_object_types.append("AtomicCrossLinkMSRestraint")
899def _object_cast_to_AtomicCrossLinkMSRestraint(o):
900 r"""_object_cast_to_AtomicCrossLinkMSRestraint(Object o) -> AtomicCrossLinkMSRestraint"""
901 return _IMP_isd._object_cast_to_AtomicCrossLinkMSRestraint(o)
903_object_types.append("GaussianEMRestraint")
906def _object_cast_to_GaussianEMRestraint(o):
907 r"""_object_cast_to_GaussianEMRestraint(Object o) -> GaussianEMRestraint"""
908 return _IMP_isd._object_cast_to_GaussianEMRestraint(o)
910_object_types.append("GaussianAnchorEMRestraint")
913def _object_cast_to_GaussianAnchorEMRestraint(o):
914 r"""_object_cast_to_GaussianAnchorEMRestraint(Object o) -> GaussianAnchorEMRestraint"""
915 return _IMP_isd._object_cast_to_GaussianAnchorEMRestraint(o)
917_object_types.append("GammaPrior")
920def _object_cast_to_GammaPrior(o):
921 r"""_object_cast_to_GammaPrior(Object o) -> GammaPrior"""
922 return _IMP_isd._object_cast_to_GammaPrior(o)
924_object_types.append("ResidueProteinProximityRestraint")
927def _object_cast_to_ResidueProteinProximityRestraint(o):
928 r"""_object_cast_to_ResidueProteinProximityRestraint(Object o) -> ResidueProteinProximityRestraint"""
929 return _IMP_isd._object_cast_to_ResidueProteinProximityRestraint(o)
931def create_model_and_particles():
933 sc= IMP.container.ListSingletonContainer(m)
934 b= IMP.algebra.BoundingBox3D(IMP.algebra.Vector3D(0,0,0),
935 IMP.algebra.Vector3D(10,10,10))
936 for i in range(0,100):
939 d=IMP.core.XYZR.setup_particle(p, IMP.algebra.Sphere3D(IMP.algebra.get_random_vector_in(b), 1))
940 d.set_coordinates_are_optimized(True)
943class ISDRestraint(IMP.Restraint):
944 r"""Proxy of C++ IMP::isd::ISDRestraint class."""
946 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
948 def __init__(self, m, name):
949 r"""__init__(ISDRestraint self, Model m, std::string name) -> ISDRestraint"""
950 if self.__class__ == ISDRestraint:
954 _IMP_isd.ISDRestraint_swiginit(self, _IMP_isd.new_ISDRestraint(_self, m, name))
956 if self.__class__ != ISDRestraint:
957 _director_objects.register(self)
962 def get_probability(self):
963 r"""get_probability(ISDRestraint self) -> double"""
964 return _IMP_isd.ISDRestraint_get_probability(self)
966 def unprotected_evaluate(self, accum):
967 r"""unprotected_evaluate(ISDRestraint self, DerivativeAccumulator accum) -> double"""
968 return _IMP_isd.ISDRestraint_unprotected_evaluate(self, accum)
970 def do_get_inputs(self):
971 r"""do_get_inputs(ISDRestraint self) -> IMP::ModelObjectsTemp"""
972 return _IMP_isd.ISDRestraint_do_get_inputs(self)
974 def get_type_name(self):
975 r"""get_type_name(ISDRestraint self) -> std::string"""
976 return _IMP_isd.ISDRestraint_get_type_name(self)
978 def get_version_info(self):
979 r"""get_version_info(ISDRestraint self) -> VersionInfo"""
980 return _IMP_isd.ISDRestraint_get_version_info(self)
981 __swig_destroy__ = _IMP_isd.delete_ISDRestraint
984 r"""__str__(ISDRestraint self) -> std::string"""
985 return _IMP_isd.ISDRestraint___str__(self)
988 r"""__repr__(ISDRestraint self) -> std::string"""
989 return _IMP_isd.ISDRestraint___repr__(self)
993 return _object_cast_to_ISDRestraint(o)
996 def do_show(self, out):
1001 return _object_cast_to_ISDRestraint(o)
1003 def __disown__(self):
1005 _IMP_isd.disown_ISDRestraint(self)
1006 return weakref.proxy(self)
1008 def do_destroy(self):
1009 r"""do_destroy(ISDRestraint self)"""
1010 return _IMP_isd.ISDRestraint_do_destroy(self)
1012 def handle_set_has_required_score_states(self, arg0):
1013 r"""handle_set_has_required_score_states(ISDRestraint self, bool arg0)"""
1014 return _IMP_isd.ISDRestraint_handle_set_has_required_score_states(self, arg0)
1016 def do_get_outputs(self):
1017 r"""do_get_outputs(ISDRestraint self) -> IMP::ModelObjectsTemp"""
1018 return _IMP_isd.ISDRestraint_do_get_outputs(self)
1020 def do_get_interactions(self):
1021 r"""do_get_interactions(ISDRestraint self) -> IMP::ModelObjectsTemps"""
1022 return _IMP_isd.ISDRestraint_do_get_interactions(self)
1024 def do_create_decomposition(self):
1025 r"""do_create_decomposition(ISDRestraint self) -> IMP::Restraints"""
1026 return _IMP_isd.ISDRestraint_do_create_decomposition(self)
1028 def do_create_current_decomposition(self):
1029 r"""do_create_current_decomposition(ISDRestraint self) -> IMP::Restraints"""
1030 return _IMP_isd.ISDRestraint_do_create_current_decomposition(self)
1032 def do_add_score_and_derivatives(self, sa):
1033 r"""do_add_score_and_derivatives(ISDRestraint self, ScoreAccumulator sa)"""
1034 return _IMP_isd.ISDRestraint_do_add_score_and_derivatives(self, sa)
1036 def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis):
1037 r"""do_add_score_and_derivatives_moved(ISDRestraint self, ScoreAccumulator sa, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
1038 return _IMP_isd.ISDRestraint_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis)
1040# Register ISDRestraint in _IMP_isd:
1041_IMP_isd.ISDRestraint_swigregister(ISDRestraint)
1042class CrossLinkMSRestraint(IMP.Restraint):
1043 r"""Proxy of C++ IMP::isd::CrossLinkMSRestraint class."""
1045 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1047 def __init__(self, *args):
1049 __init__(CrossLinkMSRestraint self, Model m, double length, bool get_log_prob=False, std::string name="CrossLinkMSRestraint%1%") -> CrossLinkMSRestraint
1050 __init__(CrossLinkMSRestraint self, Model m, _ParticleIndexAdaptor lengthi, bool get_log_prob=False, std::string name="CrossLinkMSRestraint%1%") -> CrossLinkMSRestraint
1051 __init__(CrossLinkMSRestraint self, Model m, double length, double slope, bool get_log_prob=False, std::string name="CrossLinkMSRestraint%1%") -> CrossLinkMSRestraint
1052 __init__(CrossLinkMSRestraint self) -> CrossLinkMSRestraint
1054 _IMP_isd.CrossLinkMSRestraint_swiginit(self, _IMP_isd.new_CrossLinkMSRestraint(*args))
1056 def set_source_protein1(self, protein1):
1057 r"""set_source_protein1(CrossLinkMSRestraint self, std::string protein1)"""
1058 return _IMP_isd.CrossLinkMSRestraint_set_source_protein1(self, protein1)
1060 def get_source_protein1(self):
1061 r"""get_source_protein1(CrossLinkMSRestraint self) -> std::string"""
1062 return _IMP_isd.CrossLinkMSRestraint_get_source_protein1(self)
1064 def set_source_protein2(self, protein2):
1065 r"""set_source_protein2(CrossLinkMSRestraint self, std::string protein2)"""
1066 return _IMP_isd.CrossLinkMSRestraint_set_source_protein2(self, protein2)
1068 def get_source_protein2(self):
1069 r"""get_source_protein2(CrossLinkMSRestraint self) -> std::string"""
1070 return _IMP_isd.CrossLinkMSRestraint_get_source_protein2(self)
1072 def set_source_residue1(self, residue1):
1073 r"""set_source_residue1(CrossLinkMSRestraint self, int residue1)"""
1074 return _IMP_isd.CrossLinkMSRestraint_set_source_residue1(self, residue1)
1076 def get_source_residue1(self):
1077 r"""get_source_residue1(CrossLinkMSRestraint self) -> int"""
1078 return _IMP_isd.CrossLinkMSRestraint_get_source_residue1(self)
1080 def set_source_residue2(self, residue2):
1081 r"""set_source_residue2(CrossLinkMSRestraint self, int residue2)"""
1082 return _IMP_isd.CrossLinkMSRestraint_set_source_residue2(self, residue2)
1084 def get_source_residue2(self):
1085 r"""get_source_residue2(CrossLinkMSRestraint self) -> int"""
1086 return _IMP_isd.CrossLinkMSRestraint_get_source_residue2(self)
1088 def add_contribution(self, pps, sigmas, psi):
1089 r"""add_contribution(CrossLinkMSRestraint self, IMP::ParticleIndexPair const & pps, IMP::ParticleIndexPair const & sigmas, ParticleIndex psi)"""
1090 return _IMP_isd.CrossLinkMSRestraint_add_contribution(self, pps, sigmas, psi)
1092 def get_probability(self):
1093 r"""get_probability(CrossLinkMSRestraint self) -> double"""
1094 return _IMP_isd.CrossLinkMSRestraint_get_probability(self)
1096 def get_length(self):
1097 r"""get_length(CrossLinkMSRestraint self) -> double"""
1098 return _IMP_isd.CrossLinkMSRestraint_get_length(self)
1100 def get_is_length_variable(self):
1101 r"""get_is_length_variable(CrossLinkMSRestraint self) -> bool"""
1102 return _IMP_isd.CrossLinkMSRestraint_get_is_length_variable(self)
1104 def get_has_slope(self):
1105 r"""get_has_slope(CrossLinkMSRestraint self) -> bool"""
1106 return _IMP_isd.CrossLinkMSRestraint_get_has_slope(self)
1108 def get_slope(self):
1109 r"""get_slope(CrossLinkMSRestraint self) -> double"""
1110 return _IMP_isd.CrossLinkMSRestraint_get_slope(self)
1112 def get_log_prob(self):
1113 r"""get_log_prob(CrossLinkMSRestraint self) -> bool"""
1114 return _IMP_isd.CrossLinkMSRestraint_get_log_prob(self)
1116 def get_contribution_sigma_indexes(self, i):
1117 r"""get_contribution_sigma_indexes(CrossLinkMSRestraint self, int i) -> IMP::ParticleIndexPair"""
1118 return _IMP_isd.CrossLinkMSRestraint_get_contribution_sigma_indexes(self, i)
1120 def get_contribution_psi_index(self, i):
1121 r"""get_contribution_psi_index(CrossLinkMSRestraint self, int i) -> ParticleIndex"""
1122 return _IMP_isd.CrossLinkMSRestraint_get_contribution_psi_index(self, i)
1124 def get_contribution_particle_indexes(self, i):
1125 r"""get_contribution_particle_indexes(CrossLinkMSRestraint self, int i) -> IMP::ParticleIndexPair"""
1126 return _IMP_isd.CrossLinkMSRestraint_get_contribution_particle_indexes(self, i)
1128 def get_number_of_contributions(self):
1129 r"""get_number_of_contributions(CrossLinkMSRestraint self) -> unsigned int"""
1130 return _IMP_isd.CrossLinkMSRestraint_get_number_of_contributions(self)
1132 def do_get_inputs(self):
1133 r"""do_get_inputs(CrossLinkMSRestraint self) -> IMP::ModelObjectsTemp"""
1134 return _IMP_isd.CrossLinkMSRestraint_do_get_inputs(self)
1136 def get_version_info(self):
1137 r"""get_version_info(CrossLinkMSRestraint self) -> VersionInfo"""
1138 return _IMP_isd.CrossLinkMSRestraint_get_version_info(self)
1139 __swig_destroy__ = _IMP_isd.delete_CrossLinkMSRestraint
1142 r"""__str__(CrossLinkMSRestraint self) -> std::string"""
1143 return _IMP_isd.CrossLinkMSRestraint___str__(self)
1146 r"""__repr__(CrossLinkMSRestraint self) -> std::string"""
1147 return _IMP_isd.CrossLinkMSRestraint___repr__(self)
1151 return _object_cast_to_CrossLinkMSRestraint(o)
1154 def _get_as_binary(self):
1155 r"""_get_as_binary(CrossLinkMSRestraint self) -> PyObject *"""
1156 return _IMP_isd.CrossLinkMSRestraint__get_as_binary(self)
1158 def _set_from_binary(self, p):
1159 r"""_set_from_binary(CrossLinkMSRestraint self, PyObject * p)"""
1160 return _IMP_isd.CrossLinkMSRestraint__set_from_binary(self, p)
1162 def __getstate__(self):
1163 p = self._get_as_binary()
1164 if len(self.__dict__) > 1:
1165 d = self.__dict__.copy()
1170 def __setstate__(self, p):
1171 if not hasattr(self, 'this'):
1173 if isinstance(p, tuple):
1175 self.__dict__.update(d)
1176 return self._set_from_binary(p)
1180 def _get_contributions_sigma_numpy(rs):
1181 """Get the particle indexes for all sigma nuisances for all
1182 contributions to the given list of restraints."""
1185 nconts = [r.get_number_of_contributions() for r in rs]
1186 ret = numpy.empty((sum(nconts), 2), int)
1187 i = itertools.count(0)
1188 for (ncont, r) in zip(nconts, rs):
1189 for c in range(ncont):
1190 ret[next(i)] = r.get_contribution_sigma_indexes(c)
1194 def _get_contributions_psi_numpy(rs):
1195 """Get the particle indexes for psi sigma nuisances for all
1196 contributions to the given list of restraints."""
1199 nconts = [r.get_number_of_contributions() for r in rs]
1200 ret = numpy.empty(sum(nconts), int)
1201 i = itertools.count(0)
1202 for (ncont, r) in zip(nconts, rs):
1203 for c in range(ncont):
1204 ret[next(i)] = r.get_contribution_psi_index(c)
1208 def _get_contributions_particles_numpy(rs):
1209 """Get the particle indexes for crosslink endpoints for all
1210 contributions to the given list of restraints."""
1213 nconts = [r.get_number_of_contributions() for r in rs]
1214 ret = numpy.empty((sum(nconts), 2), int)
1215 i = itertools.count(0)
1216 for (ncont, r) in zip(nconts, rs):
1217 for c in range(ncont):
1218 ret[next(i)] = r.get_contribution_particle_indexes(c)
1222 def _get_contributions_segments(rs):
1223 """Map each contribution to the corresponding restraint index,
1224 suitable for use by IMP.isd._jax_util.get_segment_prod()."""
1227 nconts = [r.get_number_of_contributions() for r in rs]
1228 # If every restraint has only a single contribution, skip
1229 # and return None; segment ids aren't needed
1230 if any(n > 1 for n in nconts):
1232 segment = itertools.count(0)
1233 for ncont in nconts:
1234 segs.extend([next(segment)] * ncont)
1235 return numpy.array(segs)
1238 def _get_jax_for_restraints(cls, rs, space):
1239 """Get a JAX function that scores the given list of crosslink
1240 restraints. They must all have the same length, slope and
1241 get_log_prob flag."""
1242 import jax.numpy as jnp
1245 def sphere_cap(r1, r2, d):
1246 short_range = jnp.minimum(4.0 / 3.0 * math.pi * r1 * r1 * r1,
1247 4.0 / 3.0 * math.pi * r2 * r2 * r2)
1248 is_short = d <= jnp.absolute(r1 - r2)
1249 is_long = d >= r1 + r2
1250 # Only evaluate the mid-range expression (which divides by d)
1251 # where it is actually used; otherwise d==0 in the short-range
1252 # branch yields NaN gradients even though the value is unused
1253 safe_d = jnp.where(is_short | is_long, 1., d)
1254 mid_range = ((math.pi / 12 / safe_d * (r1 + r2 - safe_d)
1255 * (r1 + r2 - safe_d)) *
1256 (safe_d * safe_d + 2 * safe_d * r1 - 3 * r1 * r1
1257 + 2 * safe_d * r2 + 6 * r1 * r2 - 3 * r2 * r2))
1258 return jnp.where(is_short, short_range,
1259 jnp.where(is_long, 0., mid_range))
1261 def forward_model(dist, sigmai, sigmaj, length):
1262 voli = 4.0 / 3.0 * math.pi * sigmai * sigmai * sigmai
1263 volj = 4.0 / 3.0 * math.pi * sigmaj * sigmaj * sigmaj
1264 xlvol = (4.0 / 3.0 * math.pi * (length / 2.)
1265 * (length / 2.) * (length / 2.))
1267 close = dist < sigmai + sigmaj
1269 close, jnp.minimum(voli, xlvol),
1270 sphere_cap(sigmai, length / 2.,
1271 jnp.abs(dist - sigmaj - length / 2.)))
1273 close, jnp.minimum(volj, xlvol),
1274 sphere_cap(sigmaj, length / 2.,
1275 jnp.abs(dist - sigmai - length / 2.)))
1277 return fi * fj / voli / volj
1279 return _get_crosslink_jax_for_restraints(rs, space, forward_model)
1281 def _get_jax(self, space):
1282 return self._get_jax_for_restraints([self], space)
1285 def _get_jax_multiple(cls, restraints, space):
1286 return _get_crosslink_jax_multiple(cls, restraints, space)
1289# Register CrossLinkMSRestraint in _IMP_isd:
1290_IMP_isd.CrossLinkMSRestraint_swigregister(CrossLinkMSRestraint)
1291class ExactCrossLinkMSRestraint(IMP.Restraint):
1292 r"""Proxy of C++ IMP::isd::ExactCrossLinkMSRestraint class."""
1294 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1296 def __init__(self, *args):
1298 __init__(ExactCrossLinkMSRestraint self, Model m, double length, bool get_log_prob=False, std::string name="ExactCrossLinkMSRestraint%1%") -> ExactCrossLinkMSRestraint
1299 __init__(ExactCrossLinkMSRestraint self, Model m, _ParticleIndexAdaptor lengthi, bool get_log_prob=False, std::string name="ExactCrossLinkMSRestraint%1%") -> ExactCrossLinkMSRestraint
1300 __init__(ExactCrossLinkMSRestraint self, Model m, double length, double slope, bool get_log_prob=False, std::string name="ExactCrossLinkMSRestraint%1%") -> ExactCrossLinkMSRestraint
1301 __init__(ExactCrossLinkMSRestraint self) -> ExactCrossLinkMSRestraint
1303 _IMP_isd.ExactCrossLinkMSRestraint_swiginit(self, _IMP_isd.new_ExactCrossLinkMSRestraint(*args))
1305 def set_source_protein1(self, protein1):
1306 r"""set_source_protein1(ExactCrossLinkMSRestraint self, std::string protein1)"""
1307 return _IMP_isd.ExactCrossLinkMSRestraint_set_source_protein1(self, protein1)
1309 def get_source_protein1(self):
1310 r"""get_source_protein1(ExactCrossLinkMSRestraint self) -> std::string"""
1311 return _IMP_isd.ExactCrossLinkMSRestraint_get_source_protein1(self)
1313 def set_source_protein2(self, protein2):
1314 r"""set_source_protein2(ExactCrossLinkMSRestraint self, std::string protein2)"""
1315 return _IMP_isd.ExactCrossLinkMSRestraint_set_source_protein2(self, protein2)
1317 def get_source_protein2(self):
1318 r"""get_source_protein2(ExactCrossLinkMSRestraint self) -> std::string"""
1319 return _IMP_isd.ExactCrossLinkMSRestraint_get_source_protein2(self)
1321 def set_source_residue1(self, residue1):
1322 r"""set_source_residue1(ExactCrossLinkMSRestraint self, int residue1)"""
1323 return _IMP_isd.ExactCrossLinkMSRestraint_set_source_residue1(self, residue1)
1325 def get_source_residue1(self):
1326 r"""get_source_residue1(ExactCrossLinkMSRestraint self) -> int"""
1327 return _IMP_isd.ExactCrossLinkMSRestraint_get_source_residue1(self)
1329 def set_source_residue2(self, residue2):
1330 r"""set_source_residue2(ExactCrossLinkMSRestraint self, int residue2)"""
1331 return _IMP_isd.ExactCrossLinkMSRestraint_set_source_residue2(self, residue2)
1333 def get_source_residue2(self):
1334 r"""get_source_residue2(ExactCrossLinkMSRestraint self) -> int"""
1335 return _IMP_isd.ExactCrossLinkMSRestraint_get_source_residue2(self)
1337 def add_contribution(self, pps, sigmas, psi):
1338 r"""add_contribution(ExactCrossLinkMSRestraint self, IMP::ParticleIndexPair const & pps, IMP::ParticleIndexPair const & sigmas, ParticleIndex psi)"""
1339 return _IMP_isd.ExactCrossLinkMSRestraint_add_contribution(self, pps, sigmas, psi)
1341 def get_probability(self):
1342 r"""get_probability(ExactCrossLinkMSRestraint self) -> double"""
1343 return _IMP_isd.ExactCrossLinkMSRestraint_get_probability(self)
1345 def get_length(self):
1346 r"""get_length(ExactCrossLinkMSRestraint self) -> double"""
1347 return _IMP_isd.ExactCrossLinkMSRestraint_get_length(self)
1349 def get_is_length_variable(self):
1350 r"""get_is_length_variable(ExactCrossLinkMSRestraint self) -> bool"""
1351 return _IMP_isd.ExactCrossLinkMSRestraint_get_is_length_variable(self)
1353 def get_has_slope(self):
1354 r"""get_has_slope(ExactCrossLinkMSRestraint self) -> bool"""
1355 return _IMP_isd.ExactCrossLinkMSRestraint_get_has_slope(self)
1357 def get_slope(self):
1358 r"""get_slope(ExactCrossLinkMSRestraint self) -> double"""
1359 return _IMP_isd.ExactCrossLinkMSRestraint_get_slope(self)
1361 def get_log_prob(self):
1362 r"""get_log_prob(ExactCrossLinkMSRestraint self) -> bool"""
1363 return _IMP_isd.ExactCrossLinkMSRestraint_get_log_prob(self)
1365 def get_contribution_sigma_indexes(self, i):
1366 r"""get_contribution_sigma_indexes(ExactCrossLinkMSRestraint self, int i) -> IMP::ParticleIndexPair"""
1367 return _IMP_isd.ExactCrossLinkMSRestraint_get_contribution_sigma_indexes(self, i)
1369 def get_contribution_psi_index(self, i):
1370 r"""get_contribution_psi_index(ExactCrossLinkMSRestraint self, int i) -> ParticleIndex"""
1371 return _IMP_isd.ExactCrossLinkMSRestraint_get_contribution_psi_index(self, i)
1373 def get_contribution_particle_indexes(self, i):
1374 r"""get_contribution_particle_indexes(ExactCrossLinkMSRestraint self, int i) -> IMP::ParticleIndexPair"""
1375 return _IMP_isd.ExactCrossLinkMSRestraint_get_contribution_particle_indexes(self, i)
1377 def get_number_of_contributions(self):
1378 r"""get_number_of_contributions(ExactCrossLinkMSRestraint self) -> unsigned int"""
1379 return _IMP_isd.ExactCrossLinkMSRestraint_get_number_of_contributions(self)
1381 def do_get_inputs(self):
1382 r"""do_get_inputs(ExactCrossLinkMSRestraint self) -> IMP::ModelObjectsTemp"""
1383 return _IMP_isd.ExactCrossLinkMSRestraint_do_get_inputs(self)
1385 def get_version_info(self):
1386 r"""get_version_info(ExactCrossLinkMSRestraint self) -> VersionInfo"""
1387 return _IMP_isd.ExactCrossLinkMSRestraint_get_version_info(self)
1388 __swig_destroy__ = _IMP_isd.delete_ExactCrossLinkMSRestraint
1391 r"""__str__(ExactCrossLinkMSRestraint self) -> std::string"""
1392 return _IMP_isd.ExactCrossLinkMSRestraint___str__(self)
1395 r"""__repr__(ExactCrossLinkMSRestraint self) -> std::string"""
1396 return _IMP_isd.ExactCrossLinkMSRestraint___repr__(self)
1400 return _object_cast_to_ExactCrossLinkMSRestraint(o)
1403 def _get_as_binary(self):
1404 r"""_get_as_binary(ExactCrossLinkMSRestraint self) -> PyObject *"""
1405 return _IMP_isd.ExactCrossLinkMSRestraint__get_as_binary(self)
1407 def _set_from_binary(self, p):
1408 r"""_set_from_binary(ExactCrossLinkMSRestraint self, PyObject * p)"""
1409 return _IMP_isd.ExactCrossLinkMSRestraint__set_from_binary(self, p)
1411 def __getstate__(self):
1412 p = self._get_as_binary()
1413 if len(self.__dict__) > 1:
1414 d = self.__dict__.copy()
1419 def __setstate__(self, p):
1420 if not hasattr(self, 'this'):
1422 if isinstance(p, tuple):
1424 self.__dict__.update(d)
1425 return self._set_from_binary(p)
1429 def _get_jax_for_restraints(cls, rs, space):
1430 """Get a JAX function that scores the given list of crosslink
1431 restraints. They must all have the same length, slope and
1432 get_log_prob flag."""
1433 import jax.numpy as jnp
1436 # 4-point Gauss-Legendre nodes and weights on [-1, 1], as in
1437 # get_forward_model_probability() in ExactCrossLinkMSRestraint.cpp:
1438 # t = +-sqrt(3/7 + (2/7) sqrt(6/5)), w = (18 - sqrt(30)) / 36 and
1439 # t = +-sqrt(3/7 - (2/7) sqrt(6/5)), w = (18 + sqrt(30)) / 36
1440 # (Abramowitz & Stegun 1964, Table 25.4, p. 916).
1441 gl_x = jnp.array([-0.8611363115940526, -0.3399810435848563,
1442 0.3399810435848563, 0.8611363115940526])
1443 gl_w = jnp.array([0.3478548451374538, 0.6521451548625461,
1444 0.6521451548625461, 0.3478548451374538])
1446 def lens_volume(a, b, r):
1447 # Volume of the intersection of two balls of radii a and b
1448 # whose centers are r apart. Only divide by r where the
1449 # mid-range expression is used, so that gradients are finite.
1450 is_long = r >= a + b
1451 is_short = r <= jnp.abs(a - b)
1452 r_safe = jnp.where(is_long | is_short, a + b, r)
1453 rmin = jnp.minimum(a, b)
1454 mid_range = (math.pi * (a + b - r_safe) * (a + b - r_safe)
1455 * (r_safe * r_safe + 2. * r_safe * (a + b)
1456 - 3. * (a - b) * (a - b))
1460 jnp.where(is_short, 4. / 3. * math.pi * rmin * rmin * rmin,
1463 def sphere_area_within(r, dist, length):
1464 # Area of the part of a sphere of radius r, centered at the
1465 # origin, within length of a point at distance dist
1466 mid_range = (math.pi * r * (length * length - (r - dist) ** 2)
1468 outside = (r <= dist - length) | (r >= dist + length)
1469 return jnp.where(r + dist <= length, 4. * math.pi * r * r,
1470 jnp.where(outside, 0., mid_range))
1472 def forward_model(dist, sigmai, sigmaj, length):
1473 # See get_forward_model_probability() in
1474 # ExactCrossLinkMSRestraint.cpp. The integrand is continuous
1475 # in r and zero at the upper limit, so differentiating this
1476 # piecewise quadrature (with its moving breakpoints) gives the
1477 # exact derivatives.
1478 rmax = sigmai + sigmaj
1479 points = jnp.stack([jnp.zeros_like(rmax), rmax,
1480 jnp.abs(sigmai - sigmaj),
1481 jnp.abs(dist - length), dist + length],
1483 points = jnp.sort(jnp.clip(points, 0., rmax[..., None]),
1485 half = 0.5 * (points[..., 1:] - points[..., :-1])
1486 mid = 0.5 * (points[..., 1:] + points[..., :-1])
1487 r = mid[..., None] + half[..., None] * gl_x
1488 integrand = (lens_volume(sigmai[..., None, None],
1489 sigmaj[..., None, None], r)
1490 * sphere_area_within(r, dist[..., None, None],
1492 integral = jnp.sum(half[..., None] * gl_w * integrand,
1494 voli = 4.0 / 3.0 * math.pi * sigmai * sigmai * sigmai
1495 volj = 4.0 / 3.0 * math.pi * sigmaj * sigmaj * sigmaj
1496 return jnp.clip(integral / voli / volj, 0., 1.)
1498 return _get_crosslink_jax_for_restraints(rs, space, forward_model)
1500 def _get_jax(self, space):
1501 return self._get_jax_for_restraints([self], space)
1504 def _get_jax_multiple(cls, restraints, space):
1505 return _get_crosslink_jax_multiple(cls, restraints, space)
1508# Register ExactCrossLinkMSRestraint in _IMP_isd:
1509_IMP_isd.ExactCrossLinkMSRestraint_swigregister(ExactCrossLinkMSRestraint)
1510class LogWrapper(IMP.RestraintSet):
1511 r"""Proxy of C++ IMP::isd::LogWrapper class."""
1513 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1515 def __init__(self, *args):
1517 __init__(LogWrapper self, Model m, double weight, std::string const & name="LogWrapper %1%") -> LogWrapper
1518 __init__(LogWrapper self, Model m, std::string const & name="LogWrapper %1%") -> LogWrapper
1519 __init__(LogWrapper self, IMP::RestraintsTemp const & rs, double weight, std::string const & name="LogWrapper %1%") -> LogWrapper
1520 __init__(LogWrapper self) -> LogWrapper
1522 _IMP_isd.LogWrapper_swiginit(self, _IMP_isd.new_LogWrapper(*args))
1524 def do_add_score_and_derivatives(self, sa):
1525 r"""do_add_score_and_derivatives(LogWrapper self, ScoreAccumulator sa)"""
1526 return _IMP_isd.LogWrapper_do_add_score_and_derivatives(self, sa)
1528 def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis):
1529 r"""do_add_score_and_derivatives_moved(LogWrapper self, ScoreAccumulator sa, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
1530 return _IMP_isd.LogWrapper_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis)
1531 __swig_destroy__ = _IMP_isd.delete_LogWrapper
1534 r"""__str__(LogWrapper self) -> std::string"""
1535 return _IMP_isd.LogWrapper___str__(self)
1538 r"""__repr__(LogWrapper self) -> std::string"""
1539 return _IMP_isd.LogWrapper___repr__(self)
1543 return _object_cast_to_LogWrapper(o)
1546 def _get_as_binary(self):
1547 r"""_get_as_binary(LogWrapper self) -> PyObject *"""
1548 return _IMP_isd.LogWrapper__get_as_binary(self)
1550 def _set_from_binary(self, p):
1551 r"""_set_from_binary(LogWrapper self, PyObject * p)"""
1552 return _IMP_isd.LogWrapper__set_from_binary(self, p)
1554 def __getstate__(self):
1555 p = self._get_as_binary()
1556 if len(self.__dict__) > 1:
1557 d = self.__dict__.copy()
1562 def __setstate__(self, p):
1563 if not hasattr(self, 'this'):
1565 if isinstance(p, tuple):
1567 self.__dict__.update(d)
1568 return self._set_from_binary(p)
1571 def _get_jax(self, space):
1572 import jax.numpy as jnp
1573 import IMP._jax_util
1574 restraints = [r.get_derived_object() for r in self.restraints]
1575 multi_funcs, funcs, keys = IMP._jax_util.get_restraints_jax_funcs_keys(
1578 rets = [f(jm) for f in multi_funcs]
1580 rets.append(jnp.stack([f(jm) for f in funcs], axis=-1))
1581 scores = jnp.concatenate(rets, axis=-1)
1582 return -jnp.sum(jnp.log(scores), axis=-1)
1583 return self._wrap_jax(jax_sf, keys=keys)
1586# Register LogWrapper in _IMP_isd:
1587_IMP_isd.LogWrapper_swigregister(LogWrapper)
1588class UniformPrior(IMP.Restraint):
1589 r"""Proxy of C++ IMP::isd::UniformPrior class."""
1591 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1593 def __init__(self, *args):
1595 __init__(UniformPrior self, Model m, Particle p, double k, double upperb, double lowerb, std::string name="UniformPrior%1%") -> UniformPrior
1596 __init__(UniformPrior self) -> UniformPrior
1598 _IMP_isd.UniformPrior_swiginit(self, _IMP_isd.new_UniformPrior(*args))
1600 def do_get_inputs(self):
1601 r"""do_get_inputs(UniformPrior self) -> IMP::ModelObjectsTemp"""
1602 return _IMP_isd.UniformPrior_do_get_inputs(self)
1604 def get_version_info(self):
1605 r"""get_version_info(UniformPrior self) -> VersionInfo"""
1606 return _IMP_isd.UniformPrior_get_version_info(self)
1607 __swig_destroy__ = _IMP_isd.delete_UniformPrior
1609 def get_probability(self):
1610 r"""get_probability(UniformPrior self) -> double"""
1611 return _IMP_isd.UniformPrior_get_probability(self)
1613 def get_range(self):
1614 r"""get_range(UniformPrior self) -> IMP::FloatRange"""
1615 return _IMP_isd.UniformPrior_get_range(self)
1618 r"""get_k(UniformPrior self) -> double"""
1619 return _IMP_isd.UniformPrior_get_k(self)
1621 def get_index(self):
1622 r"""get_index(UniformPrior self) -> ParticleIndex"""
1623 return _IMP_isd.UniformPrior_get_index(self)
1626 r"""__str__(UniformPrior self) -> std::string"""
1627 return _IMP_isd.UniformPrior___str__(self)
1630 r"""__repr__(UniformPrior self) -> std::string"""
1631 return _IMP_isd.UniformPrior___repr__(self)
1635 return _object_cast_to_UniformPrior(o)
1638 def _get_as_binary(self):
1639 r"""_get_as_binary(UniformPrior self) -> PyObject *"""
1640 return _IMP_isd.UniformPrior__get_as_binary(self)
1642 def _set_from_binary(self, p):
1643 r"""_set_from_binary(UniformPrior self, PyObject * p)"""
1644 return _IMP_isd.UniformPrior__set_from_binary(self, p)
1646 def __getstate__(self):
1647 p = self._get_as_binary()
1648 if len(self.__dict__) > 1:
1649 d = self.__dict__.copy()
1654 def __setstate__(self, p):
1655 if not hasattr(self, 'this'):
1657 if isinstance(p, tuple):
1659 self.__dict__.update(d)
1660 return self._set_from_binary(p)
1663 def _get_jax(self, space):
1664 import jax.numpy as jnp
1665 def score(jm, lb, ub, k, index):
1666 nuisance = jm['nuisance'][index]
1667 return 0.5 * k * (nuisance - jnp.clip(nuisance, lb, ub)) ** 2
1668 rng = self.get_range()
1669 f = functools.partial(score, lb=rng[0], ub=rng[1], k=self.get_k(),
1670 index=self.get_index())
1671 return self._wrap_jax(f, keys=[Scale.get_scale_key()])
1674# Register UniformPrior in _IMP_isd:
1675_IMP_isd.UniformPrior_swigregister(UniformPrior)
1676class Nuisance(IMP.Decorator):
1677 r"""Proxy of C++ IMP::isd::Nuisance class."""
1679 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1681 def __init__(self, *args):
1683 __init__(Nuisance self) -> Nuisance
1684 __init__(Nuisance self, Model m, ParticleIndex id) -> Nuisance
1685 __init__(Nuisance self, _ParticleAdaptor d) -> Nuisance
1687 _IMP_isd.Nuisance_swiginit(self, _IMP_isd.new_Nuisance(*args))
1689 def show(self, *args):
1690 r"""show(Nuisance self, _ostream out=std::cout)"""
1691 return _IMP_isd.Nuisance_show(self, *args)
1694 def setup_particle(*args):
1696 setup_particle(Model m, ParticleIndex pi) -> Nuisance
1697 setup_particle(_ParticleAdaptor pa) -> Nuisance
1698 setup_particle(Model m, ParticleIndex pi, double nuisance) -> Nuisance
1699 setup_particle(_ParticleAdaptor pa, double nuisance) -> Nuisance
1701 return _IMP_isd.Nuisance_setup_particle(*args)
1704 def get_is_setup(*args):
1706 get_is_setup(_ParticleAdaptor p) -> bool
1707 get_is_setup(Model m, ParticleIndex pi) -> bool
1709 return _IMP_isd.Nuisance_get_is_setup(*args)
1712 def get_nuisance_key():
1713 r"""get_nuisance_key() -> FloatKey"""
1714 return _IMP_isd.Nuisance_get_nuisance_key()
1716 def get_nuisance(self):
1717 r"""get_nuisance(Nuisance self) -> IMP::Float"""
1718 return _IMP_isd.Nuisance_get_nuisance(self)
1720 def set_nuisance(self, d):
1721 r"""set_nuisance(Nuisance self, IMP::Float d)"""
1722 return _IMP_isd.Nuisance_set_nuisance(self, d)
1724 def get_has_lower(self):
1725 r"""get_has_lower(Nuisance self) -> bool"""
1726 return _IMP_isd.Nuisance_get_has_lower(self)
1728 def get_has_lower_float(self):
1729 r"""get_has_lower_float(Nuisance self) -> bool"""
1730 return _IMP_isd.Nuisance_get_has_lower_float(self)
1732 def get_has_lower_particle(self):
1733 r"""get_has_lower_particle(Nuisance self) -> bool"""
1734 return _IMP_isd.Nuisance_get_has_lower_particle(self)
1736 def get_lower(self):
1737 r"""get_lower(Nuisance self) -> IMP::Float"""
1738 return _IMP_isd.Nuisance_get_lower(self)
1741 def get_lower_key():
1742 r"""get_lower_key() -> FloatKey"""
1743 return _IMP_isd.Nuisance_get_lower_key()
1746 def get_lower_particle_key():
1747 r"""get_lower_particle_key() -> ParticleIndexKey"""
1748 return _IMP_isd.Nuisance_get_lower_particle_key()
1750 def set_lower(self, *args):
1752 set_lower(Nuisance self, IMP::Float d)
1753 set_lower(Nuisance self, Particle d)
1755 return _IMP_isd.Nuisance_set_lower(self, *args)
1757 def remove_lower(self):
1758 r"""remove_lower(Nuisance self)"""
1759 return _IMP_isd.Nuisance_remove_lower(self)
1761 def get_has_upper(self):
1762 r"""get_has_upper(Nuisance self) -> bool"""
1763 return _IMP_isd.Nuisance_get_has_upper(self)
1765 def get_has_upper_float(self):
1766 r"""get_has_upper_float(Nuisance self) -> bool"""
1767 return _IMP_isd.Nuisance_get_has_upper_float(self)
1769 def get_has_upper_particle(self):
1770 r"""get_has_upper_particle(Nuisance self) -> bool"""
1771 return _IMP_isd.Nuisance_get_has_upper_particle(self)
1773 def get_upper(self):
1774 r"""get_upper(Nuisance self) -> IMP::Float"""
1775 return _IMP_isd.Nuisance_get_upper(self)
1778 def get_upper_key():
1779 r"""get_upper_key() -> FloatKey"""
1780 return _IMP_isd.Nuisance_get_upper_key()
1783 def get_upper_particle_key():
1784 r"""get_upper_particle_key() -> ParticleIndexKey"""
1785 return _IMP_isd.Nuisance_get_upper_particle_key()
1787 def set_upper(self, *args):
1789 set_upper(Nuisance self, IMP::Float d)
1790 set_upper(Nuisance self, Particle d)
1792 return _IMP_isd.Nuisance_set_upper(self, *args)
1794 def remove_upper(self):
1795 r"""remove_upper(Nuisance self)"""
1796 return _IMP_isd.Nuisance_remove_upper(self)
1798 def get_nuisance_derivative(self):
1799 r"""get_nuisance_derivative(Nuisance self) -> IMP::Float"""
1800 return _IMP_isd.Nuisance_get_nuisance_derivative(self)
1802 def add_to_nuisance_derivative(self, d, accum):
1803 r"""add_to_nuisance_derivative(Nuisance self, IMP::Float d, DerivativeAccumulator accum)"""
1804 return _IMP_isd.Nuisance_add_to_nuisance_derivative(self, d, accum)
1806 def get_nuisance_is_optimized(self):
1807 r"""get_nuisance_is_optimized(Nuisance self) -> bool"""
1808 return _IMP_isd.Nuisance_get_nuisance_is_optimized(self)
1810 def set_nuisance_is_optimized(self, val):
1811 r"""set_nuisance_is_optimized(Nuisance self, bool val)"""
1812 return _IMP_isd.Nuisance_set_nuisance_is_optimized(self, val)
1814 def add_attribute(self, *args):
1816 add_attribute(Nuisance self, FloatKey k, IMP::Float v, bool opt)
1817 add_attribute(Nuisance self, FloatKey a0, IMP::Float a1)
1818 add_attribute(Nuisance self, IntKey a0, IMP::Int a1)
1819 add_attribute(Nuisance self, FloatsKey a0, IMP::Floats a1)
1820 add_attribute(Nuisance self, IntsKey a0, IMP::Ints a1)
1821 add_attribute(Nuisance self, StringKey a0, IMP::String a1)
1822 add_attribute(Nuisance self, ParticleIndexKey a0, Particle a1)
1823 add_attribute(Nuisance self, ObjectKey a0, Object a1)
1824 add_attribute(Nuisance self, SparseFloatKey a0, IMP::Float a1)
1825 add_attribute(Nuisance self, SparseIntKey a0, IMP::Int a1)
1826 add_attribute(Nuisance self, SparseStringKey a0, IMP::String a1)
1827 add_attribute(Nuisance self, SparseParticleIndexKey a0, ParticleIndex a1)
1829 return _IMP_isd.Nuisance_add_attribute(self, *args)
1831 def get_value(self, *args):
1833 get_value(Nuisance self, FloatKey a0) -> IMP::Float
1834 get_value(Nuisance self, IntKey a0) -> IMP::Int
1835 get_value(Nuisance self, FloatsKey a0) -> IMP::Floats
1836 get_value(Nuisance self, IntsKey a0) -> IMP::Ints
1837 get_value(Nuisance self, StringKey a0) -> IMP::String
1838 get_value(Nuisance self, ParticleIndexKey a0) -> Particle
1839 get_value(Nuisance self, ObjectKey a0) -> Object
1840 get_value(Nuisance self, SparseFloatKey a0) -> IMP::Float
1841 get_value(Nuisance self, SparseIntKey a0) -> IMP::Int
1842 get_value(Nuisance self, SparseStringKey a0) -> IMP::String
1843 get_value(Nuisance self, SparseParticleIndexKey a0) -> ParticleIndex
1845 return _IMP_isd.Nuisance_get_value(self, *args)
1847 def set_value(self, *args):
1849 set_value(Nuisance self, FloatKey a0, IMP::Float a1)
1850 set_value(Nuisance self, IntKey a0, IMP::Int a1)
1851 set_value(Nuisance self, FloatsKey a0, IMP::Floats a1)
1852 set_value(Nuisance self, IntsKey a0, IMP::Ints a1)
1853 set_value(Nuisance self, StringKey a0, IMP::String a1)
1854 set_value(Nuisance self, ParticleIndexKey a0, Particle a1)
1855 set_value(Nuisance self, ObjectKey a0, Object a1)
1856 set_value(Nuisance self, SparseFloatKey a0, IMP::Float a1)
1857 set_value(Nuisance self, SparseIntKey a0, IMP::Int a1)
1858 set_value(Nuisance self, SparseStringKey a0, IMP::String a1)
1859 set_value(Nuisance self, SparseParticleIndexKey a0, ParticleIndex a1)
1861 return _IMP_isd.Nuisance_set_value(self, *args)
1863 def remove_attribute(self, *args):
1865 remove_attribute(Nuisance self, FloatKey a0)
1866 remove_attribute(Nuisance self, IntKey a0)
1867 remove_attribute(Nuisance self, FloatsKey a0)
1868 remove_attribute(Nuisance self, IntsKey a0)
1869 remove_attribute(Nuisance self, StringKey a0)
1870 remove_attribute(Nuisance self, ParticleIndexKey a0)
1871 remove_attribute(Nuisance self, ObjectKey a0)
1872 remove_attribute(Nuisance self, SparseFloatKey a0)
1873 remove_attribute(Nuisance self, SparseIntKey a0)
1874 remove_attribute(Nuisance self, SparseStringKey a0)
1875 remove_attribute(Nuisance self, SparseParticleIndexKey a0)
1877 return _IMP_isd.Nuisance_remove_attribute(self, *args)
1879 def has_attribute(self, *args):
1881 has_attribute(Nuisance self, FloatKey a0) -> bool
1882 has_attribute(Nuisance self, IntKey a0) -> bool
1883 has_attribute(Nuisance self, FloatsKey a0) -> bool
1884 has_attribute(Nuisance self, IntsKey a0) -> bool
1885 has_attribute(Nuisance self, StringKey a0) -> bool
1886 has_attribute(Nuisance self, ParticleIndexKey a0) -> bool
1887 has_attribute(Nuisance self, ObjectKey a0) -> bool
1888 has_attribute(Nuisance self, SparseFloatKey a0) -> bool
1889 has_attribute(Nuisance self, SparseIntKey a0) -> bool
1890 has_attribute(Nuisance self, SparseStringKey a0) -> bool
1891 has_attribute(Nuisance self, SparseParticleIndexKey a0) -> bool
1893 return _IMP_isd.Nuisance_has_attribute(self, *args)
1895 def get_derivative(self, a0):
1896 r"""get_derivative(Nuisance self, FloatKey a0) -> double"""
1897 return _IMP_isd.Nuisance_get_derivative(self, a0)
1900 r"""get_name(Nuisance self) -> std::string"""
1901 return _IMP_isd.Nuisance_get_name(self)
1903 def clear_caches(self):
1904 r"""clear_caches(Nuisance self)"""
1905 return _IMP_isd.Nuisance_clear_caches(self)
1907 def set_name(self, a0):
1908 r"""set_name(Nuisance self, std::string a0)"""
1909 return _IMP_isd.Nuisance_set_name(self, a0)
1911 def set_check_level(self, a0):
1912 r"""set_check_level(Nuisance self, IMP::CheckLevel a0)"""
1913 return _IMP_isd.Nuisance_set_check_level(self, a0)
1915 def add_to_derivative(self, a0, a1, a2):
1916 r"""add_to_derivative(Nuisance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
1917 return _IMP_isd.Nuisance_add_to_derivative(self, a0, a1, a2)
1919 def set_is_optimized(self, a0, a1):
1920 r"""set_is_optimized(Nuisance self, FloatKey a0, bool a1)"""
1921 return _IMP_isd.Nuisance_set_is_optimized(self, a0, a1)
1923 def get_is_optimized(self, a0):
1924 r"""get_is_optimized(Nuisance self, FloatKey a0) -> bool"""
1925 return _IMP_isd.Nuisance_get_is_optimized(self, a0)
1927 def get_check_level(self):
1928 r"""get_check_level(Nuisance self) -> IMP::CheckLevel"""
1929 return _IMP_isd.Nuisance_get_check_level(self)
1931 def __eq__(self, *args):
1933 __eq__(Nuisance self, Nuisance o) -> bool
1934 __eq__(Nuisance self, Particle d) -> bool
1936 return _IMP_isd.Nuisance___eq__(self, *args)
1938 def __ne__(self, *args):
1940 __ne__(Nuisance self, Nuisance o) -> bool
1941 __ne__(Nuisance self, Particle d) -> bool
1943 return _IMP_isd.Nuisance___ne__(self, *args)
1945 def __le__(self, *args):
1947 __le__(Nuisance self, Nuisance o) -> bool
1948 __le__(Nuisance self, Particle d) -> bool
1950 return _IMP_isd.Nuisance___le__(self, *args)
1952 def __lt__(self, *args):
1954 __lt__(Nuisance self, Nuisance o) -> bool
1955 __lt__(Nuisance self, Particle d) -> bool
1957 return _IMP_isd.Nuisance___lt__(self, *args)
1959 def __ge__(self, *args):
1961 __ge__(Nuisance self, Nuisance o) -> bool
1962 __ge__(Nuisance self, Particle d) -> bool
1964 return _IMP_isd.Nuisance___ge__(self, *args)
1966 def __gt__(self, *args):
1968 __gt__(Nuisance self, Nuisance o) -> bool
1969 __gt__(Nuisance self, Particle d) -> bool
1971 return _IMP_isd.Nuisance___gt__(self, *args)
1974 r"""__hash__(Nuisance self) -> std::size_t"""
1975 return _IMP_isd.Nuisance___hash__(self)
1978 r"""__str__(Nuisance self) -> std::string"""
1979 return _IMP_isd.Nuisance___str__(self)
1982 r"""__repr__(Nuisance self) -> std::string"""
1983 return _IMP_isd.Nuisance___repr__(self)
1985 def _get_as_binary(self):
1986 r"""_get_as_binary(Nuisance self) -> PyObject *"""
1987 return _IMP_isd.Nuisance__get_as_binary(self)
1989 def _set_from_binary(self, p):
1990 r"""_set_from_binary(Nuisance self, PyObject * p)"""
1991 return _IMP_isd.Nuisance__set_from_binary(self, p)
1993 def __getstate__(self):
1994 p = self._get_as_binary()
1995 if len(self.__dict__) > 1:
1996 d = self.__dict__.copy()
2001 def __setstate__(self, p):
2002 if not hasattr(self, 'this'):
2004 if isinstance(p, tuple):
2006 self.__dict__.update(d)
2007 return self._set_from_binary(p)
2009 __swig_destroy__ = _IMP_isd.delete_Nuisance
2011# Register Nuisance in _IMP_isd:
2012_IMP_isd.Nuisance_swigregister(Nuisance)
2013class NuisanceScoreState(IMP.ScoreState):
2014 r"""Proxy of C++ IMP::isd::NuisanceScoreState class."""
2016 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2018 def __init__(self, *args):
2020 __init__(NuisanceScoreState self, Particle p) -> NuisanceScoreState
2021 __init__(NuisanceScoreState self) -> NuisanceScoreState
2023 _IMP_isd.NuisanceScoreState_swiginit(self, _IMP_isd.new_NuisanceScoreState(*args))
2025 def get_index(self):
2026 r"""get_index(NuisanceScoreState self) -> ParticleIndex"""
2027 return _IMP_isd.NuisanceScoreState_get_index(self)
2029 def do_before_evaluate(self):
2030 r"""do_before_evaluate(NuisanceScoreState self)"""
2031 return _IMP_isd.NuisanceScoreState_do_before_evaluate(self)
2033 def do_after_evaluate(self, da):
2034 r"""do_after_evaluate(NuisanceScoreState self, DerivativeAccumulator da)"""
2035 return _IMP_isd.NuisanceScoreState_do_after_evaluate(self, da)
2037 def do_get_inputs(self):
2038 r"""do_get_inputs(NuisanceScoreState self) -> IMP::ModelObjectsTemp"""
2039 return _IMP_isd.NuisanceScoreState_do_get_inputs(self)
2041 def do_get_outputs(self):
2042 r"""do_get_outputs(NuisanceScoreState self) -> IMP::ModelObjectsTemp"""
2043 return _IMP_isd.NuisanceScoreState_do_get_outputs(self)
2045 def get_version_info(self):
2046 r"""get_version_info(NuisanceScoreState self) -> VersionInfo"""
2047 return _IMP_isd.NuisanceScoreState_get_version_info(self)
2048 __swig_destroy__ = _IMP_isd.delete_NuisanceScoreState
2051 r"""__str__(NuisanceScoreState self) -> std::string"""
2052 return _IMP_isd.NuisanceScoreState___str__(self)
2055 r"""__repr__(NuisanceScoreState self) -> std::string"""
2056 return _IMP_isd.NuisanceScoreState___repr__(self)
2060 return _object_cast_to_NuisanceScoreState(o)
2063 def _get_as_binary(self):
2064 r"""_get_as_binary(NuisanceScoreState self) -> PyObject *"""
2065 return _IMP_isd.NuisanceScoreState__get_as_binary(self)
2067 def _set_from_binary(self, p):
2068 r"""_set_from_binary(NuisanceScoreState self, PyObject * p)"""
2069 return _IMP_isd.NuisanceScoreState__set_from_binary(self, p)
2071 def __getstate__(self):
2072 p = self._get_as_binary()
2073 if len(self.__dict__) > 1:
2074 d = self.__dict__.copy()
2079 def __setstate__(self, p):
2080 if not hasattr(self, 'this'):
2082 if isinstance(p, tuple):
2084 self.__dict__.update(d)
2085 return self._set_from_binary(p)
2091 import jax.numpy as jnp
2092 import IMP._jax_util
2093 def apply_func(jm, index, upper_f, upper_p, lower_f, lower_p):
2094 nuisances = jm['nuisance']
2095 up = jm['upper'][index] if upper_f else math.inf
2097 up = jax.lax.min(up, nuisances[jm['p_upper'][index]])
2098 low = jm['lower'][index] if lower_f else -math.inf
2100 low = jax.lax.max(low, nuisances[jm['p_lower'][index]])
2101 jm['nuisance'] = jm['nuisance'].at[index].set(
2102 jnp.clip(nuisances[index], low, up))
2104 p = self.get_index()
2105 m = self.get_model()
2107 upper_f, upper_p = n.get_has_upper_float(), n.get_has_upper_particle()
2108 lower_f, lower_p = n.get_has_lower_float(), n.get_has_lower_particle()
2109 if upper_p or lower_p:
2110 # These particle indexes can change during a simulation, so
2111 # we can't use the default CompactArray for nuisances (which
2112 # statically maps indexes beforehand)
2113 keys = [IMP._jax_util._DenseKey(n.get_nuisance_key())]
2115 keys = [n.get_nuisance_key()]
2117 keys.append(n.get_upper_key())
2119 keys.append(n.get_upper_particle_key())
2121 keys.append(n.get_lower_key())
2123 keys.append(n.get_lower_particle_key())
2124 f = functools.partial(apply_func, index=p, upper_f=upper_f,
2125 upper_p=upper_p, lower_f=lower_f,
2127 return self._wrap_jax(f, keys)
2130# Register NuisanceScoreState in _IMP_isd:
2131_IMP_isd.NuisanceScoreState_swigregister(NuisanceScoreState)
2132class Scale(Nuisance):
2133 r"""Proxy of C++ IMP::isd::Scale class."""
2135 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2137 def __init__(self, *args):
2139 __init__(Scale self) -> Scale
2140 __init__(Scale self, Model m, ParticleIndex id) -> Scale
2141 __init__(Scale self, _ParticleAdaptor d) -> Scale
2143 _IMP_isd.Scale_swiginit(self, _IMP_isd.new_Scale(*args))
2145 def show(self, *args):
2146 r"""show(Scale self, _ostream out=std::cout)"""
2147 return _IMP_isd.Scale_show(self, *args)
2150 def setup_particle(*args):
2152 setup_particle(Model m, ParticleIndex pi) -> Scale
2153 setup_particle(_ParticleAdaptor pa) -> Scale
2154 setup_particle(Model m, ParticleIndex pi, double scale) -> Scale
2155 setup_particle(_ParticleAdaptor pa, double scale) -> Scale
2157 return _IMP_isd.Scale_setup_particle(*args)
2160 def get_is_setup(*args):
2162 get_is_setup(_ParticleAdaptor p) -> bool
2163 get_is_setup(Model m, ParticleIndex pi) -> bool
2165 return _IMP_isd.Scale_get_is_setup(*args)
2167 def get_scale(self):
2168 r"""get_scale(Scale self) -> IMP::Float"""
2169 return _IMP_isd.Scale_get_scale(self)
2171 def set_scale(self, d):
2172 r"""set_scale(Scale self, IMP::Float d)"""
2173 return _IMP_isd.Scale_set_scale(self, d)
2175 def add_to_scale_derivative(self, d, accum):
2176 r"""add_to_scale_derivative(Scale self, IMP::Float d, DerivativeAccumulator accum)"""
2177 return _IMP_isd.Scale_add_to_scale_derivative(self, d, accum)
2179 def get_scale_derivative(self):
2180 r"""get_scale_derivative(Scale self) -> IMP::Float"""
2181 return _IMP_isd.Scale_get_scale_derivative(self)
2184 def get_scale_key():
2185 r"""get_scale_key() -> FloatKey"""
2186 return _IMP_isd.Scale_get_scale_key()
2188 def get_scale_is_optimized(self):
2189 r"""get_scale_is_optimized(Scale self) -> bool"""
2190 return _IMP_isd.Scale_get_scale_is_optimized(self)
2192 def set_scale_is_optimized(self, val):
2193 r"""set_scale_is_optimized(Scale self, bool val)"""
2194 return _IMP_isd.Scale_set_scale_is_optimized(self, val)
2196 def add_attribute(self, *args):
2198 add_attribute(Scale self, FloatKey k, IMP::Float v, bool opt)
2199 add_attribute(Scale self, FloatKey a0, IMP::Float a1)
2200 add_attribute(Scale self, IntKey a0, IMP::Int a1)
2201 add_attribute(Scale self, FloatsKey a0, IMP::Floats a1)
2202 add_attribute(Scale self, IntsKey a0, IMP::Ints a1)
2203 add_attribute(Scale self, StringKey a0, IMP::String a1)
2204 add_attribute(Scale self, ParticleIndexKey a0, Particle a1)
2205 add_attribute(Scale self, ObjectKey a0, Object a1)
2206 add_attribute(Scale self, SparseFloatKey a0, IMP::Float a1)
2207 add_attribute(Scale self, SparseIntKey a0, IMP::Int a1)
2208 add_attribute(Scale self, SparseStringKey a0, IMP::String a1)
2209 add_attribute(Scale self, SparseParticleIndexKey a0, ParticleIndex a1)
2211 return _IMP_isd.Scale_add_attribute(self, *args)
2213 def get_value(self, *args):
2215 get_value(Scale self, FloatKey a0) -> IMP::Float
2216 get_value(Scale self, IntKey a0) -> IMP::Int
2217 get_value(Scale self, FloatsKey a0) -> IMP::Floats
2218 get_value(Scale self, IntsKey a0) -> IMP::Ints
2219 get_value(Scale self, StringKey a0) -> IMP::String
2220 get_value(Scale self, ParticleIndexKey a0) -> Particle
2221 get_value(Scale self, ObjectKey a0) -> Object
2222 get_value(Scale self, SparseFloatKey a0) -> IMP::Float
2223 get_value(Scale self, SparseIntKey a0) -> IMP::Int
2224 get_value(Scale self, SparseStringKey a0) -> IMP::String
2225 get_value(Scale self, SparseParticleIndexKey a0) -> ParticleIndex
2227 return _IMP_isd.Scale_get_value(self, *args)
2229 def set_value(self, *args):
2231 set_value(Scale self, FloatKey a0, IMP::Float a1)
2232 set_value(Scale self, IntKey a0, IMP::Int a1)
2233 set_value(Scale self, FloatsKey a0, IMP::Floats a1)
2234 set_value(Scale self, IntsKey a0, IMP::Ints a1)
2235 set_value(Scale self, StringKey a0, IMP::String a1)
2236 set_value(Scale self, ParticleIndexKey a0, Particle a1)
2237 set_value(Scale self, ObjectKey a0, Object a1)
2238 set_value(Scale self, SparseFloatKey a0, IMP::Float a1)
2239 set_value(Scale self, SparseIntKey a0, IMP::Int a1)
2240 set_value(Scale self, SparseStringKey a0, IMP::String a1)
2241 set_value(Scale self, SparseParticleIndexKey a0, ParticleIndex a1)
2243 return _IMP_isd.Scale_set_value(self, *args)
2245 def remove_attribute(self, *args):
2247 remove_attribute(Scale self, FloatKey a0)
2248 remove_attribute(Scale self, IntKey a0)
2249 remove_attribute(Scale self, FloatsKey a0)
2250 remove_attribute(Scale self, IntsKey a0)
2251 remove_attribute(Scale self, StringKey a0)
2252 remove_attribute(Scale self, ParticleIndexKey a0)
2253 remove_attribute(Scale self, ObjectKey a0)
2254 remove_attribute(Scale self, SparseFloatKey a0)
2255 remove_attribute(Scale self, SparseIntKey a0)
2256 remove_attribute(Scale self, SparseStringKey a0)
2257 remove_attribute(Scale self, SparseParticleIndexKey a0)
2259 return _IMP_isd.Scale_remove_attribute(self, *args)
2261 def has_attribute(self, *args):
2263 has_attribute(Scale self, FloatKey a0) -> bool
2264 has_attribute(Scale self, IntKey a0) -> bool
2265 has_attribute(Scale self, FloatsKey a0) -> bool
2266 has_attribute(Scale self, IntsKey a0) -> bool
2267 has_attribute(Scale self, StringKey a0) -> bool
2268 has_attribute(Scale self, ParticleIndexKey a0) -> bool
2269 has_attribute(Scale self, ObjectKey a0) -> bool
2270 has_attribute(Scale self, SparseFloatKey a0) -> bool
2271 has_attribute(Scale self, SparseIntKey a0) -> bool
2272 has_attribute(Scale self, SparseStringKey a0) -> bool
2273 has_attribute(Scale self, SparseParticleIndexKey a0) -> bool
2275 return _IMP_isd.Scale_has_attribute(self, *args)
2277 def get_derivative(self, a0):
2278 r"""get_derivative(Scale self, FloatKey a0) -> double"""
2279 return _IMP_isd.Scale_get_derivative(self, a0)
2282 r"""get_name(Scale self) -> std::string"""
2283 return _IMP_isd.Scale_get_name(self)
2285 def clear_caches(self):
2286 r"""clear_caches(Scale self)"""
2287 return _IMP_isd.Scale_clear_caches(self)
2289 def set_name(self, a0):
2290 r"""set_name(Scale self, std::string a0)"""
2291 return _IMP_isd.Scale_set_name(self, a0)
2293 def set_check_level(self, a0):
2294 r"""set_check_level(Scale self, IMP::CheckLevel a0)"""
2295 return _IMP_isd.Scale_set_check_level(self, a0)
2297 def add_to_derivative(self, a0, a1, a2):
2298 r"""add_to_derivative(Scale self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2299 return _IMP_isd.Scale_add_to_derivative(self, a0, a1, a2)
2301 def set_is_optimized(self, a0, a1):
2302 r"""set_is_optimized(Scale self, FloatKey a0, bool a1)"""
2303 return _IMP_isd.Scale_set_is_optimized(self, a0, a1)
2305 def get_is_optimized(self, a0):
2306 r"""get_is_optimized(Scale self, FloatKey a0) -> bool"""
2307 return _IMP_isd.Scale_get_is_optimized(self, a0)
2309 def get_check_level(self):
2310 r"""get_check_level(Scale self) -> IMP::CheckLevel"""
2311 return _IMP_isd.Scale_get_check_level(self)
2313 def __eq__(self, *args):
2315 __eq__(Scale self, Scale o) -> bool
2316 __eq__(Scale self, Particle d) -> bool
2318 return _IMP_isd.Scale___eq__(self, *args)
2320 def __ne__(self, *args):
2322 __ne__(Scale self, Scale o) -> bool
2323 __ne__(Scale self, Particle d) -> bool
2325 return _IMP_isd.Scale___ne__(self, *args)
2327 def __le__(self, *args):
2329 __le__(Scale self, Scale o) -> bool
2330 __le__(Scale self, Particle d) -> bool
2332 return _IMP_isd.Scale___le__(self, *args)
2334 def __lt__(self, *args):
2336 __lt__(Scale self, Scale o) -> bool
2337 __lt__(Scale self, Particle d) -> bool
2339 return _IMP_isd.Scale___lt__(self, *args)
2341 def __ge__(self, *args):
2343 __ge__(Scale self, Scale o) -> bool
2344 __ge__(Scale self, Particle d) -> bool
2346 return _IMP_isd.Scale___ge__(self, *args)
2348 def __gt__(self, *args):
2350 __gt__(Scale self, Scale o) -> bool
2351 __gt__(Scale self, Particle d) -> bool
2353 return _IMP_isd.Scale___gt__(self, *args)
2356 r"""__hash__(Scale self) -> std::size_t"""
2357 return _IMP_isd.Scale___hash__(self)
2360 r"""__str__(Scale self) -> std::string"""
2361 return _IMP_isd.Scale___str__(self)
2364 r"""__repr__(Scale self) -> std::string"""
2365 return _IMP_isd.Scale___repr__(self)
2367 def _get_as_binary(self):
2368 r"""_get_as_binary(Scale self) -> PyObject *"""
2369 return _IMP_isd.Scale__get_as_binary(self)
2371 def _set_from_binary(self, p):
2372 r"""_set_from_binary(Scale self, PyObject * p)"""
2373 return _IMP_isd.Scale__set_from_binary(self, p)
2375 def __getstate__(self):
2376 p = self._get_as_binary()
2377 if len(self.__dict__) > 1:
2378 d = self.__dict__.copy()
2383 def __setstate__(self, p):
2384 if not hasattr(self, 'this'):
2386 if isinstance(p, tuple):
2388 self.__dict__.update(d)
2389 return self._set_from_binary(p)
2391 __swig_destroy__ = _IMP_isd.delete_Scale
2393# Register Scale in _IMP_isd:
2394_IMP_isd.Scale_swigregister(Scale)
2395class Switching(Nuisance):
2396 r"""Proxy of C++ IMP::isd::Switching class."""
2398 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2400 def __init__(self, *args):
2402 __init__(Switching self) -> Switching
2403 __init__(Switching self, Model m, ParticleIndex id) -> Switching
2404 __init__(Switching self, _ParticleAdaptor d) -> Switching
2406 _IMP_isd.Switching_swiginit(self, _IMP_isd.new_Switching(*args))
2408 def show(self, *args):
2409 r"""show(Switching self, _ostream out=std::cout)"""
2410 return _IMP_isd.Switching_show(self, *args)
2413 def setup_particle(*args):
2415 setup_particle(Model m, ParticleIndex pi) -> Switching
2416 setup_particle(_ParticleAdaptor pa) -> Switching
2417 setup_particle(Model m, ParticleIndex pi, double switching) -> Switching
2418 setup_particle(_ParticleAdaptor pa, double switching) -> Switching
2420 return _IMP_isd.Switching_setup_particle(*args)
2423 def get_is_setup(*args):
2425 get_is_setup(_ParticleAdaptor p) -> bool
2426 get_is_setup(Model m, ParticleIndex pi) -> bool
2428 return _IMP_isd.Switching_get_is_setup(*args)
2430 def get_switching(self):
2431 r"""get_switching(Switching self) -> IMP::Float"""
2432 return _IMP_isd.Switching_get_switching(self)
2434 def set_switching(self, d):
2435 r"""set_switching(Switching self, IMP::Float d)"""
2436 return _IMP_isd.Switching_set_switching(self, d)
2438 def add_to_switching_derivative(self, d, accum):
2439 r"""add_to_switching_derivative(Switching self, IMP::Float d, DerivativeAccumulator accum)"""
2440 return _IMP_isd.Switching_add_to_switching_derivative(self, d, accum)
2442 def get_switching_derivative(self):
2443 r"""get_switching_derivative(Switching self) -> IMP::Float"""
2444 return _IMP_isd.Switching_get_switching_derivative(self)
2447 def get_switching_key():
2448 r"""get_switching_key() -> FloatKey"""
2449 return _IMP_isd.Switching_get_switching_key()
2451 def get_switching_is_optimized(self):
2452 r"""get_switching_is_optimized(Switching self) -> bool"""
2453 return _IMP_isd.Switching_get_switching_is_optimized(self)
2455 def set_switching_is_optimized(self, val):
2456 r"""set_switching_is_optimized(Switching self, bool val)"""
2457 return _IMP_isd.Switching_set_switching_is_optimized(self, val)
2459 def add_attribute(self, *args):
2461 add_attribute(Switching self, FloatKey k, IMP::Float v, bool opt)
2462 add_attribute(Switching self, FloatKey a0, IMP::Float a1)
2463 add_attribute(Switching self, IntKey a0, IMP::Int a1)
2464 add_attribute(Switching self, FloatsKey a0, IMP::Floats a1)
2465 add_attribute(Switching self, IntsKey a0, IMP::Ints a1)
2466 add_attribute(Switching self, StringKey a0, IMP::String a1)
2467 add_attribute(Switching self, ParticleIndexKey a0, Particle a1)
2468 add_attribute(Switching self, ObjectKey a0, Object a1)
2469 add_attribute(Switching self, SparseFloatKey a0, IMP::Float a1)
2470 add_attribute(Switching self, SparseIntKey a0, IMP::Int a1)
2471 add_attribute(Switching self, SparseStringKey a0, IMP::String a1)
2472 add_attribute(Switching self, SparseParticleIndexKey a0, ParticleIndex a1)
2474 return _IMP_isd.Switching_add_attribute(self, *args)
2476 def get_value(self, *args):
2478 get_value(Switching self, FloatKey a0) -> IMP::Float
2479 get_value(Switching self, IntKey a0) -> IMP::Int
2480 get_value(Switching self, FloatsKey a0) -> IMP::Floats
2481 get_value(Switching self, IntsKey a0) -> IMP::Ints
2482 get_value(Switching self, StringKey a0) -> IMP::String
2483 get_value(Switching self, ParticleIndexKey a0) -> Particle
2484 get_value(Switching self, ObjectKey a0) -> Object
2485 get_value(Switching self, SparseFloatKey a0) -> IMP::Float
2486 get_value(Switching self, SparseIntKey a0) -> IMP::Int
2487 get_value(Switching self, SparseStringKey a0) -> IMP::String
2488 get_value(Switching self, SparseParticleIndexKey a0) -> ParticleIndex
2490 return _IMP_isd.Switching_get_value(self, *args)
2492 def set_value(self, *args):
2494 set_value(Switching self, FloatKey a0, IMP::Float a1)
2495 set_value(Switching self, IntKey a0, IMP::Int a1)
2496 set_value(Switching self, FloatsKey a0, IMP::Floats a1)
2497 set_value(Switching self, IntsKey a0, IMP::Ints a1)
2498 set_value(Switching self, StringKey a0, IMP::String a1)
2499 set_value(Switching self, ParticleIndexKey a0, Particle a1)
2500 set_value(Switching self, ObjectKey a0, Object a1)
2501 set_value(Switching self, SparseFloatKey a0, IMP::Float a1)
2502 set_value(Switching self, SparseIntKey a0, IMP::Int a1)
2503 set_value(Switching self, SparseStringKey a0, IMP::String a1)
2504 set_value(Switching self, SparseParticleIndexKey a0, ParticleIndex a1)
2506 return _IMP_isd.Switching_set_value(self, *args)
2508 def remove_attribute(self, *args):
2510 remove_attribute(Switching self, FloatKey a0)
2511 remove_attribute(Switching self, IntKey a0)
2512 remove_attribute(Switching self, FloatsKey a0)
2513 remove_attribute(Switching self, IntsKey a0)
2514 remove_attribute(Switching self, StringKey a0)
2515 remove_attribute(Switching self, ParticleIndexKey a0)
2516 remove_attribute(Switching self, ObjectKey a0)
2517 remove_attribute(Switching self, SparseFloatKey a0)
2518 remove_attribute(Switching self, SparseIntKey a0)
2519 remove_attribute(Switching self, SparseStringKey a0)
2520 remove_attribute(Switching self, SparseParticleIndexKey a0)
2522 return _IMP_isd.Switching_remove_attribute(self, *args)
2524 def has_attribute(self, *args):
2526 has_attribute(Switching self, FloatKey a0) -> bool
2527 has_attribute(Switching self, IntKey a0) -> bool
2528 has_attribute(Switching self, FloatsKey a0) -> bool
2529 has_attribute(Switching self, IntsKey a0) -> bool
2530 has_attribute(Switching self, StringKey a0) -> bool
2531 has_attribute(Switching self, ParticleIndexKey a0) -> bool
2532 has_attribute(Switching self, ObjectKey a0) -> bool
2533 has_attribute(Switching self, SparseFloatKey a0) -> bool
2534 has_attribute(Switching self, SparseIntKey a0) -> bool
2535 has_attribute(Switching self, SparseStringKey a0) -> bool
2536 has_attribute(Switching self, SparseParticleIndexKey a0) -> bool
2538 return _IMP_isd.Switching_has_attribute(self, *args)
2540 def get_derivative(self, a0):
2541 r"""get_derivative(Switching self, FloatKey a0) -> double"""
2542 return _IMP_isd.Switching_get_derivative(self, a0)
2545 r"""get_name(Switching self) -> std::string"""
2546 return _IMP_isd.Switching_get_name(self)
2548 def clear_caches(self):
2549 r"""clear_caches(Switching self)"""
2550 return _IMP_isd.Switching_clear_caches(self)
2552 def set_name(self, a0):
2553 r"""set_name(Switching self, std::string a0)"""
2554 return _IMP_isd.Switching_set_name(self, a0)
2556 def set_check_level(self, a0):
2557 r"""set_check_level(Switching self, IMP::CheckLevel a0)"""
2558 return _IMP_isd.Switching_set_check_level(self, a0)
2560 def add_to_derivative(self, a0, a1, a2):
2561 r"""add_to_derivative(Switching self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2562 return _IMP_isd.Switching_add_to_derivative(self, a0, a1, a2)
2564 def set_is_optimized(self, a0, a1):
2565 r"""set_is_optimized(Switching self, FloatKey a0, bool a1)"""
2566 return _IMP_isd.Switching_set_is_optimized(self, a0, a1)
2568 def get_is_optimized(self, a0):
2569 r"""get_is_optimized(Switching self, FloatKey a0) -> bool"""
2570 return _IMP_isd.Switching_get_is_optimized(self, a0)
2572 def get_check_level(self):
2573 r"""get_check_level(Switching self) -> IMP::CheckLevel"""
2574 return _IMP_isd.Switching_get_check_level(self)
2576 def __eq__(self, *args):
2578 __eq__(Switching self, Switching o) -> bool
2579 __eq__(Switching self, Particle d) -> bool
2581 return _IMP_isd.Switching___eq__(self, *args)
2583 def __ne__(self, *args):
2585 __ne__(Switching self, Switching o) -> bool
2586 __ne__(Switching self, Particle d) -> bool
2588 return _IMP_isd.Switching___ne__(self, *args)
2590 def __le__(self, *args):
2592 __le__(Switching self, Switching o) -> bool
2593 __le__(Switching self, Particle d) -> bool
2595 return _IMP_isd.Switching___le__(self, *args)
2597 def __lt__(self, *args):
2599 __lt__(Switching self, Switching o) -> bool
2600 __lt__(Switching self, Particle d) -> bool
2602 return _IMP_isd.Switching___lt__(self, *args)
2604 def __ge__(self, *args):
2606 __ge__(Switching self, Switching o) -> bool
2607 __ge__(Switching self, Particle d) -> bool
2609 return _IMP_isd.Switching___ge__(self, *args)
2611 def __gt__(self, *args):
2613 __gt__(Switching self, Switching o) -> bool
2614 __gt__(Switching self, Particle d) -> bool
2616 return _IMP_isd.Switching___gt__(self, *args)
2619 r"""__hash__(Switching self) -> std::size_t"""
2620 return _IMP_isd.Switching___hash__(self)
2623 r"""__str__(Switching self) -> std::string"""
2624 return _IMP_isd.Switching___str__(self)
2627 r"""__repr__(Switching self) -> std::string"""
2628 return _IMP_isd.Switching___repr__(self)
2630 def _get_as_binary(self):
2631 r"""_get_as_binary(Switching self) -> PyObject *"""
2632 return _IMP_isd.Switching__get_as_binary(self)
2634 def _set_from_binary(self, p):
2635 r"""_set_from_binary(Switching self, PyObject * p)"""
2636 return _IMP_isd.Switching__set_from_binary(self, p)
2638 def __getstate__(self):
2639 p = self._get_as_binary()
2640 if len(self.__dict__) > 1:
2641 d = self.__dict__.copy()
2646 def __setstate__(self, p):
2647 if not hasattr(self, 'this'):
2649 if isinstance(p, tuple):
2651 self.__dict__.update(d)
2652 return self._set_from_binary(p)
2654 __swig_destroy__ = _IMP_isd.delete_Switching
2656# Register Switching in _IMP_isd:
2657_IMP_isd.Switching_swigregister(Switching)
2658class Weight(IMP.Decorator):
2659 r"""Proxy of C++ IMP::isd::Weight class."""
2661 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2663 def __init__(self, *args):
2665 __init__(Weight self) -> Weight
2666 __init__(Weight self, Model m, ParticleIndex id) -> Weight
2667 __init__(Weight self, _ParticleAdaptor d) -> Weight
2669 _IMP_isd.Weight_swiginit(self, _IMP_isd.new_Weight(*args))
2671 def show(self, *args):
2672 r"""show(Weight self, _ostream out=std::cout)"""
2673 return _IMP_isd.Weight_show(self, *args)
2676 def setup_particle(*args):
2678 setup_particle(Model m, ParticleIndex pi) -> Weight
2679 setup_particle(_ParticleAdaptor pa) -> Weight
2680 setup_particle(Model m, ParticleIndex pi, IMP::Int nweights) -> Weight
2681 setup_particle(_ParticleAdaptor pa, IMP::Int nweights) -> Weight
2682 setup_particle(Model m, ParticleIndex pi, VectorKD w) -> Weight
2683 setup_particle(_ParticleAdaptor pa, VectorKD w) -> Weight
2685 return _IMP_isd.Weight_setup_particle(*args)
2688 def get_number_of_weights_key():
2689 r"""get_number_of_weights_key() -> IntKey"""
2690 return _IMP_isd.Weight_get_number_of_weights_key()
2693 def get_weight_key(i):
2694 r"""get_weight_key(int i) -> FloatKey"""
2695 return _IMP_isd.Weight_get_weight_key(i)
2697 def get_weight_keys(self):
2698 r"""get_weight_keys(Weight self) -> IMP::FloatKeys"""
2699 return _IMP_isd.Weight_get_weight_keys(self)
2701 def get_weight(self, i):
2702 r"""get_weight(Weight self, int i) -> IMP::Float"""
2703 return _IMP_isd.Weight_get_weight(self, i)
2705 def get_weights(self):
2706 r"""get_weights(Weight self) -> VectorKD"""
2707 return _IMP_isd.Weight_get_weights(self)
2709 def set_weight_lazy(self, i, wi):
2710 r"""set_weight_lazy(Weight self, int i, IMP::Float wi)"""
2711 return _IMP_isd.Weight_set_weight_lazy(self, i, wi)
2713 def set_weights_lazy(self, w):
2714 r"""set_weights_lazy(Weight self, VectorKD w)"""
2715 return _IMP_isd.Weight_set_weights_lazy(self, w)
2717 def set_weights(self, w):
2718 r"""set_weights(Weight self, VectorKD w)"""
2719 return _IMP_isd.Weight_set_weights(self, w)
2721 def get_weights_are_optimized(self):
2722 r"""get_weights_are_optimized(Weight self) -> bool"""
2723 return _IMP_isd.Weight_get_weights_are_optimized(self)
2725 def set_weights_are_optimized(self, tf):
2726 r"""set_weights_are_optimized(Weight self, bool tf)"""
2727 return _IMP_isd.Weight_set_weights_are_optimized(self, tf)
2729 def get_weight_derivative(self, i):
2730 r"""get_weight_derivative(Weight self, int i) -> IMP::Float"""
2731 return _IMP_isd.Weight_get_weight_derivative(self, i)
2733 def get_weights_derivatives(self):
2734 r"""get_weights_derivatives(Weight self) -> VectorKD"""
2735 return _IMP_isd.Weight_get_weights_derivatives(self)
2737 def add_to_weight_derivative(self, i, dwi, da):
2738 r"""add_to_weight_derivative(Weight self, int i, IMP::Float dwi, DerivativeAccumulator da)"""
2739 return _IMP_isd.Weight_add_to_weight_derivative(self, i, dwi, da)
2741 def add_to_weights_derivatives(self, dw, da):
2742 r"""add_to_weights_derivatives(Weight self, VectorKD dw, DerivativeAccumulator da)"""
2743 return _IMP_isd.Weight_add_to_weights_derivatives(self, dw, da)
2745 def add_weight_lazy(self, wi=0):
2746 r"""add_weight_lazy(Weight self, IMP::Float wi=0)"""
2747 return _IMP_isd.Weight_add_weight_lazy(self, wi)
2749 def add_weight(self, wi=0):
2750 r"""add_weight(Weight self, IMP::Float wi=0)"""
2751 return _IMP_isd.Weight_add_weight(self, wi)
2753 def get_number_of_weights(self):
2754 r"""get_number_of_weights(Weight self) -> IMP::Int"""
2755 return _IMP_isd.Weight_get_number_of_weights(self)
2757 def get_unit_simplex(self):
2758 r"""get_unit_simplex(Weight self) -> UnitSimplexKD"""
2759 return _IMP_isd.Weight_get_unit_simplex(self)
2761 def set_number_of_weights_lazy(self, nweights):
2762 r"""set_number_of_weights_lazy(Weight self, IMP::Int nweights)"""
2763 return _IMP_isd.Weight_set_number_of_weights_lazy(self, nweights)
2765 def set_number_of_weights(self, nweights):
2766 r"""set_number_of_weights(Weight self, IMP::Int nweights)"""
2767 return _IMP_isd.Weight_set_number_of_weights(self, nweights)
2770 def get_is_setup(*args):
2772 get_is_setup(_ParticleAdaptor p) -> bool
2773 get_is_setup(Model m, ParticleIndex pi) -> bool
2775 return _IMP_isd.Weight_get_is_setup(*args)
2777 def add_attribute(self, *args):
2779 add_attribute(Weight self, FloatKey k, IMP::Float v, bool opt)
2780 add_attribute(Weight self, FloatKey a0, IMP::Float a1)
2781 add_attribute(Weight self, IntKey a0, IMP::Int a1)
2782 add_attribute(Weight self, FloatsKey a0, IMP::Floats a1)
2783 add_attribute(Weight self, IntsKey a0, IMP::Ints a1)
2784 add_attribute(Weight self, StringKey a0, IMP::String a1)
2785 add_attribute(Weight self, ParticleIndexKey a0, Particle a1)
2786 add_attribute(Weight self, ObjectKey a0, Object a1)
2787 add_attribute(Weight self, SparseFloatKey a0, IMP::Float a1)
2788 add_attribute(Weight self, SparseIntKey a0, IMP::Int a1)
2789 add_attribute(Weight self, SparseStringKey a0, IMP::String a1)
2790 add_attribute(Weight self, SparseParticleIndexKey a0, ParticleIndex a1)
2792 return _IMP_isd.Weight_add_attribute(self, *args)
2794 def get_value(self, *args):
2796 get_value(Weight self, FloatKey a0) -> IMP::Float
2797 get_value(Weight self, IntKey a0) -> IMP::Int
2798 get_value(Weight self, FloatsKey a0) -> IMP::Floats
2799 get_value(Weight self, IntsKey a0) -> IMP::Ints
2800 get_value(Weight self, StringKey a0) -> IMP::String
2801 get_value(Weight self, ParticleIndexKey a0) -> Particle
2802 get_value(Weight self, ObjectKey a0) -> Object
2803 get_value(Weight self, SparseFloatKey a0) -> IMP::Float
2804 get_value(Weight self, SparseIntKey a0) -> IMP::Int
2805 get_value(Weight self, SparseStringKey a0) -> IMP::String
2806 get_value(Weight self, SparseParticleIndexKey a0) -> ParticleIndex
2808 return _IMP_isd.Weight_get_value(self, *args)
2810 def set_value(self, *args):
2812 set_value(Weight self, FloatKey a0, IMP::Float a1)
2813 set_value(Weight self, IntKey a0, IMP::Int a1)
2814 set_value(Weight self, FloatsKey a0, IMP::Floats a1)
2815 set_value(Weight self, IntsKey a0, IMP::Ints a1)
2816 set_value(Weight self, StringKey a0, IMP::String a1)
2817 set_value(Weight self, ParticleIndexKey a0, Particle a1)
2818 set_value(Weight self, ObjectKey a0, Object a1)
2819 set_value(Weight self, SparseFloatKey a0, IMP::Float a1)
2820 set_value(Weight self, SparseIntKey a0, IMP::Int a1)
2821 set_value(Weight self, SparseStringKey a0, IMP::String a1)
2822 set_value(Weight self, SparseParticleIndexKey a0, ParticleIndex a1)
2824 return _IMP_isd.Weight_set_value(self, *args)
2826 def remove_attribute(self, *args):
2828 remove_attribute(Weight self, FloatKey a0)
2829 remove_attribute(Weight self, IntKey a0)
2830 remove_attribute(Weight self, FloatsKey a0)
2831 remove_attribute(Weight self, IntsKey a0)
2832 remove_attribute(Weight self, StringKey a0)
2833 remove_attribute(Weight self, ParticleIndexKey a0)
2834 remove_attribute(Weight self, ObjectKey a0)
2835 remove_attribute(Weight self, SparseFloatKey a0)
2836 remove_attribute(Weight self, SparseIntKey a0)
2837 remove_attribute(Weight self, SparseStringKey a0)
2838 remove_attribute(Weight self, SparseParticleIndexKey a0)
2840 return _IMP_isd.Weight_remove_attribute(self, *args)
2842 def has_attribute(self, *args):
2844 has_attribute(Weight self, FloatKey a0) -> bool
2845 has_attribute(Weight self, IntKey a0) -> bool
2846 has_attribute(Weight self, FloatsKey a0) -> bool
2847 has_attribute(Weight self, IntsKey a0) -> bool
2848 has_attribute(Weight self, StringKey a0) -> bool
2849 has_attribute(Weight self, ParticleIndexKey a0) -> bool
2850 has_attribute(Weight self, ObjectKey a0) -> bool
2851 has_attribute(Weight self, SparseFloatKey a0) -> bool
2852 has_attribute(Weight self, SparseIntKey a0) -> bool
2853 has_attribute(Weight self, SparseStringKey a0) -> bool
2854 has_attribute(Weight self, SparseParticleIndexKey a0) -> bool
2856 return _IMP_isd.Weight_has_attribute(self, *args)
2858 def get_derivative(self, a0):
2859 r"""get_derivative(Weight self, FloatKey a0) -> double"""
2860 return _IMP_isd.Weight_get_derivative(self, a0)
2863 r"""get_name(Weight self) -> std::string"""
2864 return _IMP_isd.Weight_get_name(self)
2866 def clear_caches(self):
2867 r"""clear_caches(Weight self)"""
2868 return _IMP_isd.Weight_clear_caches(self)
2870 def set_name(self, a0):
2871 r"""set_name(Weight self, std::string a0)"""
2872 return _IMP_isd.Weight_set_name(self, a0)
2874 def set_check_level(self, a0):
2875 r"""set_check_level(Weight self, IMP::CheckLevel a0)"""
2876 return _IMP_isd.Weight_set_check_level(self, a0)
2878 def add_to_derivative(self, a0, a1, a2):
2879 r"""add_to_derivative(Weight self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2880 return _IMP_isd.Weight_add_to_derivative(self, a0, a1, a2)
2882 def set_is_optimized(self, a0, a1):
2883 r"""set_is_optimized(Weight self, FloatKey a0, bool a1)"""
2884 return _IMP_isd.Weight_set_is_optimized(self, a0, a1)
2886 def get_is_optimized(self, a0):
2887 r"""get_is_optimized(Weight self, FloatKey a0) -> bool"""
2888 return _IMP_isd.Weight_get_is_optimized(self, a0)
2890 def get_check_level(self):
2891 r"""get_check_level(Weight self) -> IMP::CheckLevel"""
2892 return _IMP_isd.Weight_get_check_level(self)
2894 def __eq__(self, *args):
2896 __eq__(Weight self, Weight o) -> bool
2897 __eq__(Weight self, Particle d) -> bool
2899 return _IMP_isd.Weight___eq__(self, *args)
2901 def __ne__(self, *args):
2903 __ne__(Weight self, Weight o) -> bool
2904 __ne__(Weight self, Particle d) -> bool
2906 return _IMP_isd.Weight___ne__(self, *args)
2908 def __le__(self, *args):
2910 __le__(Weight self, Weight o) -> bool
2911 __le__(Weight self, Particle d) -> bool
2913 return _IMP_isd.Weight___le__(self, *args)
2915 def __lt__(self, *args):
2917 __lt__(Weight self, Weight o) -> bool
2918 __lt__(Weight self, Particle d) -> bool
2920 return _IMP_isd.Weight___lt__(self, *args)
2922 def __ge__(self, *args):
2924 __ge__(Weight self, Weight o) -> bool
2925 __ge__(Weight self, Particle d) -> bool
2927 return _IMP_isd.Weight___ge__(self, *args)
2929 def __gt__(self, *args):
2931 __gt__(Weight self, Weight o) -> bool
2932 __gt__(Weight self, Particle d) -> bool
2934 return _IMP_isd.Weight___gt__(self, *args)
2937 r"""__hash__(Weight self) -> std::size_t"""
2938 return _IMP_isd.Weight___hash__(self)
2941 r"""__str__(Weight self) -> std::string"""
2942 return _IMP_isd.Weight___str__(self)
2945 r"""__repr__(Weight self) -> std::string"""
2946 return _IMP_isd.Weight___repr__(self)
2948 def _get_as_binary(self):
2949 r"""_get_as_binary(Weight self) -> PyObject *"""
2950 return _IMP_isd.Weight__get_as_binary(self)
2952 def _set_from_binary(self, p):
2953 r"""_set_from_binary(Weight self, PyObject * p)"""
2954 return _IMP_isd.Weight__set_from_binary(self, p)
2956 def __getstate__(self):
2957 p = self._get_as_binary()
2958 if len(self.__dict__) > 1:
2959 d = self.__dict__.copy()
2964 def __setstate__(self, p):
2965 if not hasattr(self, 'this'):
2967 if isinstance(p, tuple):
2969 self.__dict__.update(d)
2970 return self._set_from_binary(p)
2972 __swig_destroy__ = _IMP_isd.delete_Weight
2974# Register Weight in _IMP_isd:
2975_IMP_isd.Weight_swigregister(Weight)
2977IMPISD_MAX_WEIGHTS = cvar.IMPISD_MAX_WEIGHTS
2980def __lshift__(*args):
2982 __lshift__(_ostream out, Nuisance n) -> _ostream
2983 __lshift__(_ostream out, Scale n) -> _ostream
2984 __lshift__(_ostream out, Switching n) -> _ostream
2985 __lshift__(_ostream out, Weight n) -> _ostream
2987 return _IMP_isd.__lshift__(*args)
2988class JeffreysRestraint(IMP.Restraint):
2989 r"""Proxy of C++ IMP::isd::JeffreysRestraint class."""
2991 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2993 def __init__(self, *args):
2995 __init__(JeffreysRestraint self, Model m, Particle p) -> JeffreysRestraint
2996 __init__(JeffreysRestraint self) -> JeffreysRestraint
2998 _IMP_isd.JeffreysRestraint_swiginit(self, _IMP_isd.new_JeffreysRestraint(*args))
3000 def do_get_inputs(self):
3001 r"""do_get_inputs(JeffreysRestraint self) -> IMP::ModelObjectsTemp"""
3002 return _IMP_isd.JeffreysRestraint_do_get_inputs(self)
3004 def get_version_info(self):
3005 r"""get_version_info(JeffreysRestraint self) -> VersionInfo"""
3006 return _IMP_isd.JeffreysRestraint_get_version_info(self)
3007 __swig_destroy__ = _IMP_isd.delete_JeffreysRestraint
3009 def get_index(self):
3010 r"""get_index(JeffreysRestraint self) -> ParticleIndex"""
3011 return _IMP_isd.JeffreysRestraint_get_index(self)
3013 def get_probability(self):
3014 r"""get_probability(JeffreysRestraint self) -> double"""
3015 return _IMP_isd.JeffreysRestraint_get_probability(self)
3018 r"""__str__(JeffreysRestraint self) -> std::string"""
3019 return _IMP_isd.JeffreysRestraint___str__(self)
3022 r"""__repr__(JeffreysRestraint self) -> std::string"""
3023 return _IMP_isd.JeffreysRestraint___repr__(self)
3027 return _object_cast_to_JeffreysRestraint(o)
3030 def _get_as_binary(self):
3031 r"""_get_as_binary(JeffreysRestraint self) -> PyObject *"""
3032 return _IMP_isd.JeffreysRestraint__get_as_binary(self)
3034 def _set_from_binary(self, p):
3035 r"""_set_from_binary(JeffreysRestraint self, PyObject * p)"""
3036 return _IMP_isd.JeffreysRestraint__set_from_binary(self, p)
3038 def __getstate__(self):
3039 p = self._get_as_binary()
3040 if len(self.__dict__) > 1:
3041 d = self.__dict__.copy()
3046 def __setstate__(self, p):
3047 if not hasattr(self, 'this'):
3049 if isinstance(p, tuple):
3051 self.__dict__.update(d)
3052 return self._set_from_binary(p)
3055 def _get_jax(self, space):
3056 import jax.numpy as jnp
3057 indexes = jnp.array([self.get_index()])
3059 nuisance = jm['nuisance'][indexes]
3060 return jnp.sum(jnp.log(nuisance))
3061 return self._wrap_jax(score, keys=[Scale.get_scale_key()])
3064# Register JeffreysRestraint in _IMP_isd:
3065_IMP_isd.JeffreysRestraint_swigregister(JeffreysRestraint)
3066class NormalSigmaPCRestraint(IMP.Restraint):
3067 r"""Proxy of C++ IMP::isd::NormalSigmaPCRestraint class."""
3069 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3071 def __init__(self, *args):
3073 __init__(NormalSigmaPCRestraint self, Model m, ParticleIndex spi, double su, double alpha, std::string name="NormalSigmaPCRestraint%1%") -> NormalSigmaPCRestraint
3074 __init__(NormalSigmaPCRestraint self, Scale s, double su, double alpha, std::string name="NormalSigmaPCRestraint%1%") -> NormalSigmaPCRestraint
3076 _IMP_isd.NormalSigmaPCRestraint_swiginit(self, _IMP_isd.new_NormalSigmaPCRestraint(*args))
3078 def get_sigma(self):
3079 r"""get_sigma(NormalSigmaPCRestraint self) -> Scale"""
3080 return _IMP_isd.NormalSigmaPCRestraint_get_sigma(self)
3082 def get_alpha(self):
3083 r"""get_alpha(NormalSigmaPCRestraint self) -> double"""
3084 return _IMP_isd.NormalSigmaPCRestraint_get_alpha(self)
3086 def get_sigma_upper(self):
3087 r"""get_sigma_upper(NormalSigmaPCRestraint self) -> double"""
3088 return _IMP_isd.NormalSigmaPCRestraint_get_sigma_upper(self)
3090 def get_probability(self):
3091 r"""get_probability(NormalSigmaPCRestraint self) -> double"""
3092 return _IMP_isd.NormalSigmaPCRestraint_get_probability(self)
3094 def do_get_inputs(self):
3095 r"""do_get_inputs(NormalSigmaPCRestraint self) -> IMP::ModelObjectsTemp"""
3096 return _IMP_isd.NormalSigmaPCRestraint_do_get_inputs(self)
3098 def get_version_info(self):
3099 r"""get_version_info(NormalSigmaPCRestraint self) -> VersionInfo"""
3100 return _IMP_isd.NormalSigmaPCRestraint_get_version_info(self)
3101 __swig_destroy__ = _IMP_isd.delete_NormalSigmaPCRestraint
3104 r"""__str__(NormalSigmaPCRestraint self) -> std::string"""
3105 return _IMP_isd.NormalSigmaPCRestraint___str__(self)
3108 r"""__repr__(NormalSigmaPCRestraint self) -> std::string"""
3109 return _IMP_isd.NormalSigmaPCRestraint___repr__(self)
3113 return _object_cast_to_NormalSigmaPCRestraint(o)
3116# Register NormalSigmaPCRestraint in _IMP_isd:
3117_IMP_isd.NormalSigmaPCRestraint_swigregister(NormalSigmaPCRestraint)
3118class Distribution(IMP.Object):
3119 r"""Proxy of C++ IMP::isd::Distribution class."""
3121 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3123 def __init__(self, *args):
3124 r"""__init__(Distribution self, std::string name="Distribution %1%") -> Distribution"""
3125 if self.__class__ == Distribution:
3129 _IMP_isd.Distribution_swiginit(self, _IMP_isd.new_Distribution(_self, *args))
3131 if self.__class__ != Distribution:
3132 _director_objects.register(self)
3137 def get_type_name(self):
3138 r"""get_type_name(Distribution self) -> std::string"""
3139 return _IMP_isd.Distribution_get_type_name(self)
3141 def get_version_info(self):
3142 r"""get_version_info(Distribution self) -> VersionInfo"""
3143 return _IMP_isd.Distribution_get_version_info(self)
3144 __swig_destroy__ = _IMP_isd.delete_Distribution
3147 r"""__str__(Distribution self) -> std::string"""
3148 return _IMP_isd.Distribution___str__(self)
3151 r"""__repr__(Distribution self) -> std::string"""
3152 return _IMP_isd.Distribution___repr__(self)
3156 return _object_cast_to_Distribution(o)
3159 def do_show(self, out):
3164 return _object_cast_to_Distribution(o)
3166 def __disown__(self):
3168 _IMP_isd.disown_Distribution(self)
3169 return weakref.proxy(self)
3171 def do_destroy(self):
3172 r"""do_destroy(Distribution self)"""
3173 return _IMP_isd.Distribution_do_destroy(self)
3175# Register Distribution in _IMP_isd:
3176_IMP_isd.Distribution_swigregister(Distribution)
3177class OneDimensionalDistribution(Distribution):
3178 r"""Proxy of C++ IMP::isd::OneDimensionalDistribution class."""
3180 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3182 def do_evaluate(self, *args):
3184 do_evaluate(OneDimensionalDistribution self, double v) -> double
3185 do_evaluate(OneDimensionalDistribution self, IMP::Floats const & vs) -> IMP::Floats
3187 return _IMP_isd.OneDimensionalDistribution_do_evaluate(self, *args)
3189 def do_get_density(self, *args):
3191 do_get_density(OneDimensionalDistribution self, double v) -> double
3192 do_get_density(OneDimensionalDistribution self, IMP::Floats const & vs) -> IMP::Floats
3194 return _IMP_isd.OneDimensionalDistribution_do_get_density(self, *args)
3196 def __init__(self, *args):
3197 r"""__init__(OneDimensionalDistribution self, std::string name="OneDimensionalDistribution %1%") -> OneDimensionalDistribution"""
3198 if self.__class__ == OneDimensionalDistribution:
3202 _IMP_isd.OneDimensionalDistribution_swiginit(self, _IMP_isd.new_OneDimensionalDistribution(_self, *args))
3204 if self.__class__ != OneDimensionalDistribution:
3205 _director_objects.register(self)
3210 def evaluate(self, *args):
3212 evaluate(OneDimensionalDistribution self, double v) -> double
3213 evaluate(OneDimensionalDistribution self, IMP::Floats const & vs) -> IMP::Floats
3215 return _IMP_isd.OneDimensionalDistribution_evaluate(self, *args)
3217 def get_density(self, *args):
3219 get_density(OneDimensionalDistribution self, double v) -> double
3220 get_density(OneDimensionalDistribution self, IMP::Floats const & vs) -> IMP::Floats
3222 return _IMP_isd.OneDimensionalDistribution_get_density(self, *args)
3224 def get_type_name(self):
3225 r"""get_type_name(OneDimensionalDistribution self) -> std::string"""
3226 return _IMP_isd.OneDimensionalDistribution_get_type_name(self)
3228 def get_version_info(self):
3229 r"""get_version_info(OneDimensionalDistribution self) -> VersionInfo"""
3230 return _IMP_isd.OneDimensionalDistribution_get_version_info(self)
3231 __swig_destroy__ = _IMP_isd.delete_OneDimensionalDistribution
3234 r"""__str__(OneDimensionalDistribution self) -> std::string"""
3235 return _IMP_isd.OneDimensionalDistribution___str__(self)
3238 r"""__repr__(OneDimensionalDistribution self) -> std::string"""
3239 return _IMP_isd.OneDimensionalDistribution___repr__(self)
3243 return _object_cast_to_OneDimensionalDistribution(o)
3246 def do_show(self, out):
3251 return _object_cast_to_OneDimensionalDistribution(o)
3253 def __disown__(self):
3255 _IMP_isd.disown_OneDimensionalDistribution(self)
3256 return weakref.proxy(self)
3258 def do_destroy(self):
3259 r"""do_destroy(OneDimensionalDistribution self)"""
3260 return _IMP_isd.OneDimensionalDistribution_do_destroy(self)
3262# Register OneDimensionalDistribution in _IMP_isd:
3263_IMP_isd.OneDimensionalDistribution_swigregister(OneDimensionalDistribution)
3264class OneDimensionalSufficientDistribution(Distribution):
3265 r"""Proxy of C++ IMP::isd::OneDimensionalSufficientDistribution class."""
3267 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3269 def do_update_sufficient_statistics(self, vs):
3270 r"""do_update_sufficient_statistics(OneDimensionalSufficientDistribution self, IMP::Floats vs)"""
3271 return _IMP_isd.OneDimensionalSufficientDistribution_do_update_sufficient_statistics(self, vs)
3273 def do_get_sufficient_statistics(self):
3274 r"""do_get_sufficient_statistics(OneDimensionalSufficientDistribution self) -> IMP::Floats"""
3275 return _IMP_isd.OneDimensionalSufficientDistribution_do_get_sufficient_statistics(self)
3277 def do_evaluate(self):
3278 r"""do_evaluate(OneDimensionalSufficientDistribution self) -> double"""
3279 return _IMP_isd.OneDimensionalSufficientDistribution_do_evaluate(self)
3281 def do_get_density(self):
3282 r"""do_get_density(OneDimensionalSufficientDistribution self) -> double"""
3283 return _IMP_isd.OneDimensionalSufficientDistribution_do_get_density(self)
3285 def __init__(self, *args):
3286 r"""__init__(OneDimensionalSufficientDistribution self, std::string name="OneDimensionalSufficientDistribution %1%") -> OneDimensionalSufficientDistribution"""
3287 if self.__class__ == OneDimensionalSufficientDistribution:
3291 _IMP_isd.OneDimensionalSufficientDistribution_swiginit(self, _IMP_isd.new_OneDimensionalSufficientDistribution(_self, *args))
3293 if self.__class__ != OneDimensionalSufficientDistribution:
3294 _director_objects.register(self)
3299 def update_sufficient_statistics(self, vs):
3300 r"""update_sufficient_statistics(OneDimensionalSufficientDistribution self, IMP::Floats vs)"""
3301 return _IMP_isd.OneDimensionalSufficientDistribution_update_sufficient_statistics(self, vs)
3303 def get_sufficient_statistics(self):
3304 r"""get_sufficient_statistics(OneDimensionalSufficientDistribution self) -> IMP::Floats"""
3305 return _IMP_isd.OneDimensionalSufficientDistribution_get_sufficient_statistics(self)
3308 r"""evaluate(OneDimensionalSufficientDistribution self) -> double"""
3309 return _IMP_isd.OneDimensionalSufficientDistribution_evaluate(self)
3311 def get_density(self):
3312 r"""get_density(OneDimensionalSufficientDistribution self) -> double"""
3313 return _IMP_isd.OneDimensionalSufficientDistribution_get_density(self)
3315 def get_type_name(self):
3316 r"""get_type_name(OneDimensionalSufficientDistribution self) -> std::string"""
3317 return _IMP_isd.OneDimensionalSufficientDistribution_get_type_name(self)
3319 def get_version_info(self):
3320 r"""get_version_info(OneDimensionalSufficientDistribution self) -> VersionInfo"""
3321 return _IMP_isd.OneDimensionalSufficientDistribution_get_version_info(self)
3322 __swig_destroy__ = _IMP_isd.delete_OneDimensionalSufficientDistribution
3325 r"""__str__(OneDimensionalSufficientDistribution self) -> std::string"""
3326 return _IMP_isd.OneDimensionalSufficientDistribution___str__(self)
3329 r"""__repr__(OneDimensionalSufficientDistribution self) -> std::string"""
3330 return _IMP_isd.OneDimensionalSufficientDistribution___repr__(self)
3334 return _object_cast_to_OneDimensionalSufficientDistribution(o)
3337 def do_show(self, out):
3342 return _object_cast_to_OneDimensionalSufficientDistribution(o)
3344 def __disown__(self):
3346 _IMP_isd.disown_OneDimensionalSufficientDistribution(self)
3347 return weakref.proxy(self)
3349 def do_destroy(self):
3350 r"""do_destroy(OneDimensionalSufficientDistribution self)"""
3351 return _IMP_isd.OneDimensionalSufficientDistribution_do_destroy(self)
3353# Register OneDimensionalSufficientDistribution in _IMP_isd:
3354_IMP_isd.OneDimensionalSufficientDistribution_swigregister(OneDimensionalSufficientDistribution)
3355class FNormal(OneDimensionalSufficientDistribution):
3356 r"""Proxy of C++ IMP::isd::FNormal class."""
3358 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3360 def __init__(self, FA, JA, FM, sigma):
3361 r"""__init__(FNormal self, double FA, double JA, double FM, double sigma) -> FNormal"""
3362 _IMP_isd.FNormal_swiginit(self, _IMP_isd.new_FNormal(FA, JA, FM, sigma))
3364 def update_sufficient_statistics(self, FA):
3365 r"""update_sufficient_statistics(FNormal self, double FA)"""
3366 return _IMP_isd.FNormal_update_sufficient_statistics(self, FA)
3368 def do_update_sufficient_statistics(self, data):
3369 r"""do_update_sufficient_statistics(FNormal self, IMP::Floats data)"""
3370 return _IMP_isd.FNormal_do_update_sufficient_statistics(self, data)
3372 def do_get_sufficient_statistics(self):
3373 r"""do_get_sufficient_statistics(FNormal self) -> IMP::Floats"""
3374 return _IMP_isd.FNormal_do_get_sufficient_statistics(self)
3376 def do_evaluate(self):
3377 r"""do_evaluate(FNormal self) -> double"""
3378 return _IMP_isd.FNormal_do_evaluate(self)
3380 def evaluate_derivative_FA(self):
3381 r"""evaluate_derivative_FA(FNormal self) -> double"""
3382 return _IMP_isd.FNormal_evaluate_derivative_FA(self)
3384 def evaluate_derivative_JA(self):
3385 r"""evaluate_derivative_JA(FNormal self) -> double"""
3386 return _IMP_isd.FNormal_evaluate_derivative_JA(self)
3388 def evaluate_derivative_FM(self):
3389 r"""evaluate_derivative_FM(FNormal self) -> double"""
3390 return _IMP_isd.FNormal_evaluate_derivative_FM(self)
3392 def evaluate_derivative_sigma(self):
3393 r"""evaluate_derivative_sigma(FNormal self) -> double"""
3394 return _IMP_isd.FNormal_evaluate_derivative_sigma(self)
3396 def do_get_density(self):
3397 r"""do_get_density(FNormal self) -> double"""
3398 return _IMP_isd.FNormal_do_get_density(self)
3400 def set_FA(self, f):
3401 r"""set_FA(FNormal self, double f)"""
3402 return _IMP_isd.FNormal_set_FA(self, f)
3404 def set_JA(self, f):
3405 r"""set_JA(FNormal self, double f)"""
3406 return _IMP_isd.FNormal_set_JA(self, f)
3408 def set_FM(self, f):
3409 r"""set_FM(FNormal self, double f)"""
3410 return _IMP_isd.FNormal_set_FM(self, f)
3412 def set_sigma(self, f):
3413 r"""set_sigma(FNormal self, double f)"""
3414 return _IMP_isd.FNormal_set_sigma(self, f)
3415 __swig_destroy__ = _IMP_isd.delete_FNormal
3418 r"""__str__(FNormal self) -> std::string"""
3419 return _IMP_isd.FNormal___str__(self)
3422 r"""__repr__(FNormal self) -> std::string"""
3423 return _IMP_isd.FNormal___repr__(self)
3427 return _object_cast_to_FNormal(o)
3430# Register FNormal in _IMP_isd:
3431_IMP_isd.FNormal_swigregister(FNormal)
3432class FStudentT(OneDimensionalSufficientDistribution):
3433 r"""Proxy of C++ IMP::isd::FStudentT class."""
3435 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3437 def __init__(self, *args):
3439 __init__(FStudentT self, IMP::Floats FXs, IMP::Floats JXs, double FM, double sigma, double nu, std::string name="FStudentT %1%") -> FStudentT
3440 __init__(FStudentT self, double sumFX, double sumFX2, unsigned int N, double LogJX, double FM, double sigma, double nu, std::string name="FStudentT %1%") -> FStudentT
3442 _IMP_isd.FStudentT_swiginit(self, _IMP_isd.new_FStudentT(*args))
3444 def update_sufficient_statistics(self, FXs, JXs):
3445 r"""update_sufficient_statistics(FStudentT self, IMP::Floats FXs, IMP::Floats JXs)"""
3446 return _IMP_isd.FStudentT_update_sufficient_statistics(self, FXs, JXs)
3448 def evaluate_derivative_Fx(self, Fx):
3449 r"""evaluate_derivative_Fx(FStudentT self, double Fx) -> double"""
3450 return _IMP_isd.FStudentT_evaluate_derivative_Fx(self, Fx)
3452 def evaluate_derivative_FX(self, FXs):
3453 r"""evaluate_derivative_FX(FStudentT self, IMP::Floats const FXs) -> IMP::Floats"""
3454 return _IMP_isd.FStudentT_evaluate_derivative_FX(self, FXs)
3456 def evaluate_derivative_LogJX(self):
3457 r"""evaluate_derivative_LogJX(FStudentT self) -> double"""
3458 return _IMP_isd.FStudentT_evaluate_derivative_LogJX(self)
3460 def evaluate_derivative_FM(self):
3461 r"""evaluate_derivative_FM(FStudentT self) -> double"""
3462 return _IMP_isd.FStudentT_evaluate_derivative_FM(self)
3464 def evaluate_derivative_sigma(self):
3465 r"""evaluate_derivative_sigma(FStudentT self) -> double"""
3466 return _IMP_isd.FStudentT_evaluate_derivative_sigma(self)
3468 def evaluate_derivative_nu(self):
3469 r"""evaluate_derivative_nu(FStudentT self) -> double"""
3470 return _IMP_isd.FStudentT_evaluate_derivative_nu(self)
3472 def update_cached_values(self):
3473 r"""update_cached_values(FStudentT self)"""
3474 return _IMP_isd.FStudentT_update_cached_values(self)
3476 def set_sumFX(self, v):
3477 r"""set_sumFX(FStudentT self, double v)"""
3478 return _IMP_isd.FStudentT_set_sumFX(self, v)
3480 def set_sumFX2(self, v):
3481 r"""set_sumFX2(FStudentT self, double v)"""
3482 return _IMP_isd.FStudentT_set_sumFX2(self, v)
3485 r"""set_N(FStudentT self, unsigned int v)"""
3486 return _IMP_isd.FStudentT_set_N(self, v)
3488 def set_LogJX(self, v):
3489 r"""set_LogJX(FStudentT self, double v)"""
3490 return _IMP_isd.FStudentT_set_LogJX(self, v)
3492 def set_FM(self, v):
3493 r"""set_FM(FStudentT self, double v)"""
3494 return _IMP_isd.FStudentT_set_FM(self, v)
3496 def set_sigma(self, v):
3497 r"""set_sigma(FStudentT self, double v)"""
3498 return _IMP_isd.FStudentT_set_sigma(self, v)
3500 def set_nu(self, v):
3501 r"""set_nu(FStudentT self, double v)"""
3502 return _IMP_isd.FStudentT_set_nu(self, v)
3504 def get_sumFX(self):
3505 r"""get_sumFX(FStudentT self) -> double"""
3506 return _IMP_isd.FStudentT_get_sumFX(self)
3508 def get_sumFX2(self):
3509 r"""get_sumFX2(FStudentT self) -> double"""
3510 return _IMP_isd.FStudentT_get_sumFX2(self)
3513 r"""get_N(FStudentT self) -> unsigned int"""
3514 return _IMP_isd.FStudentT_get_N(self)
3516 def get_LogJX(self):
3517 r"""get_LogJX(FStudentT self) -> double"""
3518 return _IMP_isd.FStudentT_get_LogJX(self)
3521 r"""get_FM(FStudentT self) -> double"""
3522 return _IMP_isd.FStudentT_get_FM(self)
3524 def get_sigma(self):
3525 r"""get_sigma(FStudentT self) -> double"""
3526 return _IMP_isd.FStudentT_get_sigma(self)
3529 r"""get_nu(FStudentT self) -> double"""
3530 return _IMP_isd.FStudentT_get_nu(self)
3531 __swig_destroy__ = _IMP_isd.delete_FStudentT
3534 r"""__str__(FStudentT self) -> std::string"""
3535 return _IMP_isd.FStudentT___str__(self)
3538 r"""__repr__(FStudentT self) -> std::string"""
3539 return _IMP_isd.FStudentT___repr__(self)
3543 return _object_cast_to_FStudentT(o)
3546# Register FStudentT in _IMP_isd:
3547_IMP_isd.FStudentT_swigregister(FStudentT)
3548class vonMises(IMP.Object):
3549 r"""Proxy of C++ IMP::isd::vonMises class."""
3551 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3553 def __init__(self, x, mu, kappa):
3554 r"""__init__(vonMises self, double x, double mu, double kappa) -> vonMises"""
3555 _IMP_isd.vonMises_swiginit(self, _IMP_isd.new_vonMises(x, mu, kappa))
3558 r"""evaluate(vonMises self) -> double"""
3559 return _IMP_isd.vonMises_evaluate(self)
3561 def evaluate_derivative_x(self):
3562 r"""evaluate_derivative_x(vonMises self) -> double"""
3563 return _IMP_isd.vonMises_evaluate_derivative_x(self)
3565 def evaluate_derivative_mu(self):
3566 r"""evaluate_derivative_mu(vonMises self) -> double"""
3567 return _IMP_isd.vonMises_evaluate_derivative_mu(self)
3569 def evaluate_derivative_kappa(self):
3570 r"""evaluate_derivative_kappa(vonMises self) -> double"""
3571 return _IMP_isd.vonMises_evaluate_derivative_kappa(self)
3574 r"""density(vonMises self) -> double"""
3575 return _IMP_isd.vonMises_density(self)
3578 r"""set_x(vonMises self, double x)"""
3579 return _IMP_isd.vonMises_set_x(self, x)
3581 def set_mu(self, mu):
3582 r"""set_mu(vonMises self, double mu)"""
3583 return _IMP_isd.vonMises_set_mu(self, mu)
3585 def set_kappa(self, kappa):
3586 r"""set_kappa(vonMises self, double kappa)"""
3587 return _IMP_isd.vonMises_set_kappa(self, kappa)
3589 def get_version_info(self):
3590 r"""get_version_info(vonMises self) -> VersionInfo"""
3591 return _IMP_isd.vonMises_get_version_info(self)
3592 __swig_destroy__ = _IMP_isd.delete_vonMises
3595 r"""__str__(vonMises self) -> std::string"""
3596 return _IMP_isd.vonMises___str__(self)
3599 r"""__repr__(vonMises self) -> std::string"""
3600 return _IMP_isd.vonMises___repr__(self)
3604 return _object_cast_to_vonMises(o)
3607# Register vonMises in _IMP_isd:
3608_IMP_isd.vonMises_swigregister(vonMises)
3609class vonMisesSufficient(IMP.Object):
3610 r"""Proxy of C++ IMP::isd::vonMisesSufficient class."""
3612 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3614 def __init__(self, *args):
3616 __init__(vonMisesSufficient self, double chi, unsigned int N, double R0, double chiexp, double kappa) -> vonMisesSufficient
3617 __init__(vonMisesSufficient self, double chi, IMP::Floats obs, double kappa) -> vonMisesSufficient
3619 _IMP_isd.vonMisesSufficient_swiginit(self, _IMP_isd.new_vonMisesSufficient(*args))
3622 r"""evaluate(vonMisesSufficient self) -> double"""
3623 return _IMP_isd.vonMisesSufficient_evaluate(self)
3625 def evaluate_derivative_x(self):
3626 r"""evaluate_derivative_x(vonMisesSufficient self) -> double"""
3627 return _IMP_isd.vonMisesSufficient_evaluate_derivative_x(self)
3629 def evaluate_derivative_kappa(self):
3630 r"""evaluate_derivative_kappa(vonMisesSufficient self) -> double"""
3631 return _IMP_isd.vonMisesSufficient_evaluate_derivative_kappa(self)
3634 r"""density(vonMisesSufficient self) -> double"""
3635 return _IMP_isd.vonMisesSufficient_density(self)
3638 r"""get_x(vonMisesSufficient self) -> double"""
3639 return _IMP_isd.vonMisesSufficient_get_x(self)
3642 r"""get_R0(vonMisesSufficient self) -> double"""
3643 return _IMP_isd.vonMisesSufficient_get_R0(self)
3645 def get_chiexp(self):
3646 r"""get_chiexp(vonMisesSufficient self) -> double"""
3647 return _IMP_isd.vonMisesSufficient_get_chiexp(self)
3650 r"""get_N(vonMisesSufficient self) -> double"""
3651 return _IMP_isd.vonMisesSufficient_get_N(self)
3653 def get_kappa(self):
3654 r"""get_kappa(vonMisesSufficient self) -> double"""
3655 return _IMP_isd.vonMisesSufficient_get_kappa(self)
3658 r"""set_x(vonMisesSufficient self, double x)"""
3659 return _IMP_isd.vonMisesSufficient_set_x(self, x)
3661 def set_R0(self, R0):
3662 r"""set_R0(vonMisesSufficient self, double R0)"""
3663 return _IMP_isd.vonMisesSufficient_set_R0(self, R0)
3665 def set_chiexp(self, chiexp):
3666 r"""set_chiexp(vonMisesSufficient self, double chiexp)"""
3667 return _IMP_isd.vonMisesSufficient_set_chiexp(self, chiexp)
3670 r"""set_N(vonMisesSufficient self, unsigned int N)"""
3671 return _IMP_isd.vonMisesSufficient_set_N(self, N)
3673 def set_kappa(self, kappa):
3674 r"""set_kappa(vonMisesSufficient self, double kappa)"""
3675 return _IMP_isd.vonMisesSufficient_set_kappa(self, kappa)
3678 def get_sufficient_statistics(data):
3679 r"""get_sufficient_statistics(IMP::Floats data) -> IMP::Floats"""
3680 return _IMP_isd.vonMisesSufficient_get_sufficient_statistics(data)
3682 def get_version_info(self):
3683 r"""get_version_info(vonMisesSufficient self) -> VersionInfo"""
3684 return _IMP_isd.vonMisesSufficient_get_version_info(self)
3685 __swig_destroy__ = _IMP_isd.delete_vonMisesSufficient
3688 r"""__str__(vonMisesSufficient self) -> std::string"""
3689 return _IMP_isd.vonMisesSufficient___str__(self)
3692 r"""__repr__(vonMisesSufficient self) -> std::string"""
3693 return _IMP_isd.vonMisesSufficient___repr__(self)
3697 return _object_cast_to_vonMisesSufficient(o)
3700# Register vonMisesSufficient in _IMP_isd:
3701_IMP_isd.vonMisesSufficient_swigregister(vonMisesSufficient)
3702class PenalizedComplexityPrior(OneDimensionalSufficientDistribution):
3703 r"""Proxy of C++ IMP::isd::PenalizedComplexityPrior class."""
3705 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3707 def __init__(self, *args):
3708 r"""__init__(PenalizedComplexityPrior self, double Dxi, double Jxi, double alpha, std::string name="PenalizedComplexityPrior %1%") -> PenalizedComplexityPrior"""
3709 _IMP_isd.PenalizedComplexityPrior_swiginit(self, _IMP_isd.new_PenalizedComplexityPrior(*args))
3711 def update_sufficient_statistics(self, Dxis, Jxis):
3712 r"""update_sufficient_statistics(PenalizedComplexityPrior self, IMP::Floats Dxis, IMP::Floats Jxis)"""
3713 return _IMP_isd.PenalizedComplexityPrior_update_sufficient_statistics(self, Dxis, Jxis)
3715 def evaluate_derivative_Dxi(self):
3716 r"""evaluate_derivative_Dxi(PenalizedComplexityPrior self) -> double"""
3717 return _IMP_isd.PenalizedComplexityPrior_evaluate_derivative_Dxi(self)
3719 def evaluate_derivative_Jxi(self):
3720 r"""evaluate_derivative_Jxi(PenalizedComplexityPrior self) -> double"""
3721 return _IMP_isd.PenalizedComplexityPrior_evaluate_derivative_Jxi(self)
3723 def evaluate_derivative_alpha(self):
3724 r"""evaluate_derivative_alpha(PenalizedComplexityPrior self) -> double"""
3725 return _IMP_isd.PenalizedComplexityPrior_evaluate_derivative_alpha(self)
3727 def evaluate_derivative_xi(self, JJxi):
3728 r"""evaluate_derivative_xi(PenalizedComplexityPrior self, double JJxi) -> double"""
3729 return _IMP_isd.PenalizedComplexityPrior_evaluate_derivative_xi(self, JJxi)
3731 def set_Dxi(self, v):
3732 r"""set_Dxi(PenalizedComplexityPrior self, double v)"""
3733 return _IMP_isd.PenalizedComplexityPrior_set_Dxi(self, v)
3735 def set_Jxi(self, v):
3736 r"""set_Jxi(PenalizedComplexityPrior self, double v)"""
3737 return _IMP_isd.PenalizedComplexityPrior_set_Jxi(self, v)
3739 def set_alpha(self, v):
3740 r"""set_alpha(PenalizedComplexityPrior self, double v)"""
3741 return _IMP_isd.PenalizedComplexityPrior_set_alpha(self, v)
3744 r"""get_Dxi(PenalizedComplexityPrior self) -> double"""
3745 return _IMP_isd.PenalizedComplexityPrior_get_Dxi(self)
3748 r"""get_Jxi(PenalizedComplexityPrior self) -> double"""
3749 return _IMP_isd.PenalizedComplexityPrior_get_Jxi(self)
3751 def get_alpha(self):
3752 r"""get_alpha(PenalizedComplexityPrior self) -> double"""
3753 return _IMP_isd.PenalizedComplexityPrior_get_alpha(self)
3754 __swig_destroy__ = _IMP_isd.delete_PenalizedComplexityPrior
3757 r"""__str__(PenalizedComplexityPrior self) -> std::string"""
3758 return _IMP_isd.PenalizedComplexityPrior___str__(self)
3761 r"""__repr__(PenalizedComplexityPrior self) -> std::string"""
3762 return _IMP_isd.PenalizedComplexityPrior___repr__(self)
3766 return _object_cast_to_PenalizedComplexityPrior(o)
3769# Register PenalizedComplexityPrior in _IMP_isd:
3770_IMP_isd.PenalizedComplexityPrior_swigregister(PenalizedComplexityPrior)
3771class vonMisesKappaJeffreysRestraint(IMP.Restraint):
3772 r"""Proxy of C++ IMP::isd::vonMisesKappaJeffreysRestraint class."""
3774 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3776 def __init__(self, m, kappa):
3777 r"""__init__(vonMisesKappaJeffreysRestraint self, Model m, Particle kappa) -> vonMisesKappaJeffreysRestraint"""
3778 _IMP_isd.vonMisesKappaJeffreysRestraint_swiginit(self, _IMP_isd.new_vonMisesKappaJeffreysRestraint(m, kappa))
3780 def do_get_inputs(self):
3781 r"""do_get_inputs(vonMisesKappaJeffreysRestraint self) -> IMP::ModelObjectsTemp"""
3782 return _IMP_isd.vonMisesKappaJeffreysRestraint_do_get_inputs(self)
3784 def get_version_info(self):
3785 r"""get_version_info(vonMisesKappaJeffreysRestraint self) -> VersionInfo"""
3786 return _IMP_isd.vonMisesKappaJeffreysRestraint_get_version_info(self)
3787 __swig_destroy__ = _IMP_isd.delete_vonMisesKappaJeffreysRestraint
3789 def get_probability(self):
3790 r"""get_probability(vonMisesKappaJeffreysRestraint self) -> double"""
3791 return _IMP_isd.vonMisesKappaJeffreysRestraint_get_probability(self)
3794 r"""__str__(vonMisesKappaJeffreysRestraint self) -> std::string"""
3795 return _IMP_isd.vonMisesKappaJeffreysRestraint___str__(self)
3798 r"""__repr__(vonMisesKappaJeffreysRestraint self) -> std::string"""
3799 return _IMP_isd.vonMisesKappaJeffreysRestraint___repr__(self)
3803 return _object_cast_to_vonMisesKappaJeffreysRestraint(o)
3806# Register vonMisesKappaJeffreysRestraint in _IMP_isd:
3807_IMP_isd.vonMisesKappaJeffreysRestraint_swigregister(vonMisesKappaJeffreysRestraint)
3808class vonMisesKappaConjugateRestraint(IMP.Restraint):
3809 r"""Proxy of C++ IMP::isd::vonMisesKappaConjugateRestraint class."""
3811 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3813 def __init__(self, m, kappa, c=10.0, R0=0.0):
3814 r"""__init__(vonMisesKappaConjugateRestraint self, Model m, Particle kappa, double c=10.0, double R0=0.0) -> vonMisesKappaConjugateRestraint"""
3815 _IMP_isd.vonMisesKappaConjugateRestraint_swiginit(self, _IMP_isd.new_vonMisesKappaConjugateRestraint(m, kappa, c, R0))
3817 def do_get_inputs(self):
3818 r"""do_get_inputs(vonMisesKappaConjugateRestraint self) -> IMP::ModelObjectsTemp"""
3819 return _IMP_isd.vonMisesKappaConjugateRestraint_do_get_inputs(self)
3821 def get_version_info(self):
3822 r"""get_version_info(vonMisesKappaConjugateRestraint self) -> VersionInfo"""
3823 return _IMP_isd.vonMisesKappaConjugateRestraint_get_version_info(self)
3824 __swig_destroy__ = _IMP_isd.delete_vonMisesKappaConjugateRestraint
3826 def get_probability(self):
3827 r"""get_probability(vonMisesKappaConjugateRestraint self) -> double"""
3828 return _IMP_isd.vonMisesKappaConjugateRestraint_get_probability(self)
3831 r"""__str__(vonMisesKappaConjugateRestraint self) -> std::string"""
3832 return _IMP_isd.vonMisesKappaConjugateRestraint___str__(self)
3835 r"""__repr__(vonMisesKappaConjugateRestraint self) -> std::string"""
3836 return _IMP_isd.vonMisesKappaConjugateRestraint___repr__(self)
3840 return _object_cast_to_vonMisesKappaConjugateRestraint(o)
3843# Register vonMisesKappaConjugateRestraint in _IMP_isd:
3844_IMP_isd.vonMisesKappaConjugateRestraint_swigregister(vonMisesKappaConjugateRestraint)
3845class NOERestraint(IMP.Restraint):
3846 r"""Proxy of C++ IMP::isd::NOERestraint class."""
3848 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3850 def __init__(self, m, p0, p1, sigma, gamma, Iexp):
3851 r"""__init__(NOERestraint self, Model m, Particle p0, Particle p1, Particle sigma, Particle gamma, double Iexp) -> NOERestraint"""
3852 _IMP_isd.NOERestraint_swiginit(self, _IMP_isd.new_NOERestraint(m, p0, p1, sigma, gamma, Iexp))
3854 def get_probability(self):
3855 r"""get_probability(NOERestraint self) -> double"""
3856 return _IMP_isd.NOERestraint_get_probability(self)
3859 r"""get_chi(NOERestraint self) -> double"""
3860 return _IMP_isd.NOERestraint_get_chi(self)
3862 def do_get_inputs(self):
3863 r"""do_get_inputs(NOERestraint self) -> IMP::ModelObjectsTemp"""
3864 return _IMP_isd.NOERestraint_do_get_inputs(self)
3866 def get_version_info(self):
3867 r"""get_version_info(NOERestraint self) -> VersionInfo"""
3868 return _IMP_isd.NOERestraint_get_version_info(self)
3869 __swig_destroy__ = _IMP_isd.delete_NOERestraint
3872 r"""__str__(NOERestraint self) -> std::string"""
3873 return _IMP_isd.NOERestraint___str__(self)
3876 r"""__repr__(NOERestraint self) -> std::string"""
3877 return _IMP_isd.NOERestraint___repr__(self)
3881 return _object_cast_to_NOERestraint(o)
3884# Register NOERestraint in _IMP_isd:
3885_IMP_isd.NOERestraint_swigregister(NOERestraint)
3886class GaussianRestraint(IMP.Restraint):
3887 r"""Proxy of C++ IMP::isd::GaussianRestraint class."""
3889 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3891 def __init__(self, *args):
3893 __init__(GaussianRestraint self, Particle x, Particle mu, Particle sigma) -> GaussianRestraint
3894 __init__(GaussianRestraint self, double x, Particle mu, Particle sigma) -> GaussianRestraint
3895 __init__(GaussianRestraint self, Particle x, double mu, Particle sigma) -> GaussianRestraint
3896 __init__(GaussianRestraint self, Particle x, Particle mu, double sigma) -> GaussianRestraint
3897 __init__(GaussianRestraint self, double x, double mu, Particle sigma) -> GaussianRestraint
3898 __init__(GaussianRestraint self, Particle x, double mu, double sigma) -> GaussianRestraint
3899 __init__(GaussianRestraint self, double x, Particle mu, double sigma) -> GaussianRestraint
3901 _IMP_isd.GaussianRestraint_swiginit(self, _IMP_isd.new_GaussianRestraint(*args))
3903 def get_probability(self):
3904 r"""get_probability(GaussianRestraint self) -> double"""
3905 return _IMP_isd.GaussianRestraint_get_probability(self)
3908 r"""get_chi(GaussianRestraint self) -> double"""
3909 return _IMP_isd.GaussianRestraint_get_chi(self)
3911 def do_get_inputs(self):
3912 r"""do_get_inputs(GaussianRestraint self) -> IMP::ModelObjectsTemp"""
3913 return _IMP_isd.GaussianRestraint_do_get_inputs(self)
3915 def get_version_info(self):
3916 r"""get_version_info(GaussianRestraint self) -> VersionInfo"""
3917 return _IMP_isd.GaussianRestraint_get_version_info(self)
3918 __swig_destroy__ = _IMP_isd.delete_GaussianRestraint
3921 r"""__str__(GaussianRestraint self) -> std::string"""
3922 return _IMP_isd.GaussianRestraint___str__(self)
3925 r"""__repr__(GaussianRestraint self) -> std::string"""
3926 return _IMP_isd.GaussianRestraint___repr__(self)
3930 return _object_cast_to_GaussianRestraint(o)
3933# Register GaussianRestraint in _IMP_isd:
3934_IMP_isd.GaussianRestraint_swigregister(GaussianRestraint)
3935class StudentTRestraint(IMP.Restraint):
3936 r"""Proxy of C++ IMP::isd::StudentTRestraint class."""
3938 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3940 def __init__(self, *args):
3942 __init__(StudentTRestraint self, Model m, _ParticleIndexAdaptor x, _ParticleIndexAdaptor mu, _ParticleIndexAdaptor sigma, _ParticleIndexAdaptor nu) -> StudentTRestraint
3943 __init__(StudentTRestraint self, Model m, _ParticleIndexAdaptor x, double mu, _ParticleIndexAdaptor sigma, _ParticleIndexAdaptor nu) -> StudentTRestraint
3944 __init__(StudentTRestraint self, Model m, _ParticleIndexAdaptor x, _ParticleIndexAdaptor mu, double sigma, _ParticleIndexAdaptor nu) -> StudentTRestraint
3945 __init__(StudentTRestraint self, Model m, _ParticleIndexAdaptor x, _ParticleIndexAdaptor mu, _ParticleIndexAdaptor sigma, double nu) -> StudentTRestraint
3946 __init__(StudentTRestraint self, Model m, _ParticleIndexAdaptor x, double mu, double sigma, _ParticleIndexAdaptor nu) -> StudentTRestraint
3947 __init__(StudentTRestraint self, Model m, _ParticleIndexAdaptor x, double mu, _ParticleIndexAdaptor sigma, double nu) -> StudentTRestraint
3948 __init__(StudentTRestraint self, Model m, _ParticleIndexAdaptor x, _ParticleIndexAdaptor mu, double sigma, double nu) -> StudentTRestraint
3949 __init__(StudentTRestraint self, Model m, _ParticleIndexAdaptor x, double mu, double sigma, double nu) -> StudentTRestraint
3950 __init__(StudentTRestraint self, Model m, double x, _ParticleIndexAdaptor mu, _ParticleIndexAdaptor sigma, _ParticleIndexAdaptor nu) -> StudentTRestraint
3951 __init__(StudentTRestraint self, Model m, double x, double mu, _ParticleIndexAdaptor sigma, _ParticleIndexAdaptor nu) -> StudentTRestraint
3952 __init__(StudentTRestraint self, Model m, double x, _ParticleIndexAdaptor mu, double sigma, _ParticleIndexAdaptor nu) -> StudentTRestraint
3953 __init__(StudentTRestraint self, Model m, double x, _ParticleIndexAdaptor mu, _ParticleIndexAdaptor sigma, double nu) -> StudentTRestraint
3954 __init__(StudentTRestraint self, Model m, double x, double mu, double sigma, _ParticleIndexAdaptor nu) -> StudentTRestraint
3955 __init__(StudentTRestraint self, Model m, double x, double mu, _ParticleIndexAdaptor sigma, double nu) -> StudentTRestraint
3956 __init__(StudentTRestraint self, Model m, double x, _ParticleIndexAdaptor mu, double sigma, double nu) -> StudentTRestraint
3958 _IMP_isd.StudentTRestraint_swiginit(self, _IMP_isd.new_StudentTRestraint(*args))
3960 def get_probability(self):
3961 r"""get_probability(StudentTRestraint self) -> double"""
3962 return _IMP_isd.StudentTRestraint_get_probability(self)
3964 def do_get_inputs(self):
3965 r"""do_get_inputs(StudentTRestraint self) -> IMP::ModelObjectsTemp"""
3966 return _IMP_isd.StudentTRestraint_do_get_inputs(self)
3968 def get_version_info(self):
3969 r"""get_version_info(StudentTRestraint self) -> VersionInfo"""
3970 return _IMP_isd.StudentTRestraint_get_version_info(self)
3971 __swig_destroy__ = _IMP_isd.delete_StudentTRestraint
3974 r"""__str__(StudentTRestraint self) -> std::string"""
3975 return _IMP_isd.StudentTRestraint___str__(self)
3978 r"""__repr__(StudentTRestraint self) -> std::string"""
3979 return _IMP_isd.StudentTRestraint___repr__(self)
3983 return _object_cast_to_StudentTRestraint(o)
3986# Register StudentTRestraint in _IMP_isd:
3987_IMP_isd.StudentTRestraint_swigregister(StudentTRestraint)
3988class LognormalRestraint(IMP.Restraint):
3989 r"""Proxy of C++ IMP::isd::LognormalRestraint class."""
3991 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3993 def __init__(self, *args):
3995 __init__(LognormalRestraint self, Particle x, Particle mu, Particle sigma) -> LognormalRestraint
3996 __init__(LognormalRestraint self, double x, Particle mu, Particle sigma) -> LognormalRestraint
3997 __init__(LognormalRestraint self, Particle x, double mu, Particle sigma) -> LognormalRestraint
3998 __init__(LognormalRestraint self, Particle x, Particle mu, double sigma) -> LognormalRestraint
3999 __init__(LognormalRestraint self, double x, double mu, Particle sigma) -> LognormalRestraint
4000 __init__(LognormalRestraint self, Particle x, double mu, double sigma) -> LognormalRestraint
4001 __init__(LognormalRestraint self, double x, Particle mu, double sigma) -> LognormalRestraint
4003 _IMP_isd.LognormalRestraint_swiginit(self, _IMP_isd.new_LognormalRestraint(*args))
4005 def get_probability(self):
4006 r"""get_probability(LognormalRestraint self) -> double"""
4007 return _IMP_isd.LognormalRestraint_get_probability(self)
4010 r"""get_chi(LognormalRestraint self) -> double"""
4011 return _IMP_isd.LognormalRestraint_get_chi(self)
4013 def do_get_inputs(self):
4014 r"""do_get_inputs(LognormalRestraint self) -> IMP::ModelObjectsTemp"""
4015 return _IMP_isd.LognormalRestraint_do_get_inputs(self)
4017 def get_version_info(self):
4018 r"""get_version_info(LognormalRestraint self) -> VersionInfo"""
4019 return _IMP_isd.LognormalRestraint_get_version_info(self)
4020 __swig_destroy__ = _IMP_isd.delete_LognormalRestraint
4023 r"""__str__(LognormalRestraint self) -> std::string"""
4024 return _IMP_isd.LognormalRestraint___str__(self)
4027 r"""__repr__(LognormalRestraint self) -> std::string"""
4028 return _IMP_isd.LognormalRestraint___repr__(self)
4032 return _object_cast_to_LognormalRestraint(o)
4035# Register LognormalRestraint in _IMP_isd:
4036_IMP_isd.LognormalRestraint_swigregister(LognormalRestraint)
4037class LognormalAmbiguousRestraint(IMP.Restraint):
4038 r"""Proxy of C++ IMP::isd::LognormalAmbiguousRestraint class."""
4040 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4042 def __init__(self, p1, p2, ki, sigmaG):
4043 r"""__init__(LognormalAmbiguousRestraint self, Particle p1, Particle p2, Particle ki, Particle sigmaG) -> LognormalAmbiguousRestraint"""
4044 _IMP_isd.LognormalAmbiguousRestraint_swiginit(self, _IMP_isd.new_LognormalAmbiguousRestraint(p1, p2, ki, sigmaG))
4046 def add_contribution(self, lexp, omega):
4047 r"""add_contribution(LognormalAmbiguousRestraint self, double lexp, Particle omega)"""
4048 return _IMP_isd.LognormalAmbiguousRestraint_add_contribution(self, lexp, omega)
4050 def get_number_of_contributions(self):
4051 r"""get_number_of_contributions(LognormalAmbiguousRestraint self) -> unsigned int"""
4052 return _IMP_isd.LognormalAmbiguousRestraint_get_number_of_contributions(self)
4054 def draw_k_from_posterior(self, kt):
4055 r"""draw_k_from_posterior(LognormalAmbiguousRestraint self, double kt)"""
4056 return _IMP_isd.LognormalAmbiguousRestraint_draw_k_from_posterior(self, kt)
4058 def get_probability(self):
4059 r"""get_probability(LognormalAmbiguousRestraint self) -> double"""
4060 return _IMP_isd.LognormalAmbiguousRestraint_get_probability(self)
4062 def do_get_inputs(self):
4063 r"""do_get_inputs(LognormalAmbiguousRestraint self) -> IMP::ModelObjectsTemp"""
4064 return _IMP_isd.LognormalAmbiguousRestraint_do_get_inputs(self)
4066 def get_version_info(self):
4067 r"""get_version_info(LognormalAmbiguousRestraint self) -> VersionInfo"""
4068 return _IMP_isd.LognormalAmbiguousRestraint_get_version_info(self)
4069 __swig_destroy__ = _IMP_isd.delete_LognormalAmbiguousRestraint
4072 r"""__str__(LognormalAmbiguousRestraint self) -> std::string"""
4073 return _IMP_isd.LognormalAmbiguousRestraint___str__(self)
4076 r"""__repr__(LognormalAmbiguousRestraint self) -> std::string"""
4077 return _IMP_isd.LognormalAmbiguousRestraint___repr__(self)
4081 return _object_cast_to_LognormalAmbiguousRestraint(o)
4084# Register LognormalAmbiguousRestraint in _IMP_isd:
4085_IMP_isd.LognormalAmbiguousRestraint_swigregister(LognormalAmbiguousRestraint)
4086class AmbiguousNOERestraint(IMP.Restraint):
4087 r"""Proxy of C++ IMP::isd::AmbiguousNOERestraint class."""
4089 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4091 def __init__(self, *args):
4093 __init__(AmbiguousNOERestraint self, Model m, PairContainer pc, _ParticleIndexAdaptor sigma, _ParticleIndexAdaptor gamma, double Iexp) -> AmbiguousNOERestraint
4094 __init__(AmbiguousNOERestraint self) -> AmbiguousNOERestraint
4096 _IMP_isd.AmbiguousNOERestraint_swiginit(self, _IMP_isd.new_AmbiguousNOERestraint(*args))
4098 def get_probability(self):
4099 r"""get_probability(AmbiguousNOERestraint self) -> double"""
4100 return _IMP_isd.AmbiguousNOERestraint_get_probability(self)
4103 r"""get_chi(AmbiguousNOERestraint self) -> double"""
4104 return _IMP_isd.AmbiguousNOERestraint_get_chi(self)
4106 def do_get_inputs(self):
4107 r"""do_get_inputs(AmbiguousNOERestraint self) -> IMP::ModelObjectsTemp"""
4108 return _IMP_isd.AmbiguousNOERestraint_do_get_inputs(self)
4110 def get_version_info(self):
4111 r"""get_version_info(AmbiguousNOERestraint self) -> VersionInfo"""
4112 return _IMP_isd.AmbiguousNOERestraint_get_version_info(self)
4113 __swig_destroy__ = _IMP_isd.delete_AmbiguousNOERestraint
4116 r"""__str__(AmbiguousNOERestraint self) -> std::string"""
4117 return _IMP_isd.AmbiguousNOERestraint___str__(self)
4120 r"""__repr__(AmbiguousNOERestraint self) -> std::string"""
4121 return _IMP_isd.AmbiguousNOERestraint___repr__(self)
4125 return _object_cast_to_AmbiguousNOERestraint(o)
4128 def _get_as_binary(self):
4129 r"""_get_as_binary(AmbiguousNOERestraint self) -> PyObject *"""
4130 return _IMP_isd.AmbiguousNOERestraint__get_as_binary(self)
4132 def _set_from_binary(self, p):
4133 r"""_set_from_binary(AmbiguousNOERestraint self, PyObject * p)"""
4134 return _IMP_isd.AmbiguousNOERestraint__set_from_binary(self, p)
4136 def __getstate__(self):
4137 p = self._get_as_binary()
4138 if len(self.__dict__) > 1:
4139 d = self.__dict__.copy()
4144 def __setstate__(self, p):
4145 if not hasattr(self, 'this'):
4147 if isinstance(p, tuple):
4149 self.__dict__.update(d)
4150 return self._set_from_binary(p)
4153# Register AmbiguousNOERestraint in _IMP_isd:
4154_IMP_isd.AmbiguousNOERestraint_swigregister(AmbiguousNOERestraint)
4155class MarginalNOERestraint(IMP.Restraint):
4156 r"""Proxy of C++ IMP::isd::MarginalNOERestraint class."""
4158 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4160 def __init__(self, m):
4161 r"""__init__(MarginalNOERestraint self, Model m) -> MarginalNOERestraint"""
4162 _IMP_isd.MarginalNOERestraint_swiginit(self, _IMP_isd.new_MarginalNOERestraint(m))
4164 def add_contribution(self, *args):
4166 add_contribution(MarginalNOERestraint self, Particle p1, Particle p2, double Iexp)
4167 add_contribution(MarginalNOERestraint self, PairContainer pc, double Iexp)
4169 return _IMP_isd.MarginalNOERestraint_add_contribution(self, *args)
4171 def get_log_gammahat(self):
4172 r"""get_log_gammahat(MarginalNOERestraint self) -> double"""
4173 return _IMP_isd.MarginalNOERestraint_get_log_gammahat(self)
4176 r"""get_SS(MarginalNOERestraint self) -> double"""
4177 return _IMP_isd.MarginalNOERestraint_get_SS(self)
4179 def get_number_of_contributions(self):
4180 r"""get_number_of_contributions(MarginalNOERestraint self) -> unsigned int"""
4181 return _IMP_isd.MarginalNOERestraint_get_number_of_contributions(self)
4183 def get_probability(self):
4184 r"""get_probability(MarginalNOERestraint self) -> double"""
4185 return _IMP_isd.MarginalNOERestraint_get_probability(self)
4187 def do_get_inputs(self):
4188 r"""do_get_inputs(MarginalNOERestraint self) -> IMP::ModelObjectsTemp"""
4189 return _IMP_isd.MarginalNOERestraint_do_get_inputs(self)
4191 def get_version_info(self):
4192 r"""get_version_info(MarginalNOERestraint self) -> VersionInfo"""
4193 return _IMP_isd.MarginalNOERestraint_get_version_info(self)
4194 __swig_destroy__ = _IMP_isd.delete_MarginalNOERestraint
4197 r"""__str__(MarginalNOERestraint self) -> std::string"""
4198 return _IMP_isd.MarginalNOERestraint___str__(self)
4201 r"""__repr__(MarginalNOERestraint self) -> std::string"""
4202 return _IMP_isd.MarginalNOERestraint___repr__(self)
4206 return _object_cast_to_MarginalNOERestraint(o)
4209# Register MarginalNOERestraint in _IMP_isd:
4210_IMP_isd.MarginalNOERestraint_swigregister(MarginalNOERestraint)
4211class MarginalHBondRestraint(IMP.Restraint):
4212 r"""Proxy of C++ IMP::isd::MarginalHBondRestraint class."""
4214 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4216 def __init__(self, m):
4217 r"""__init__(MarginalHBondRestraint self, Model m) -> MarginalHBondRestraint"""
4218 _IMP_isd.MarginalHBondRestraint_swiginit(self, _IMP_isd.new_MarginalHBondRestraint(m))
4220 def add_contribution(self, *args):
4222 add_contribution(MarginalHBondRestraint self, Particle p1, Particle p2, double Iexp)
4223 add_contribution(MarginalHBondRestraint self, PairContainer pc, double Iexp)
4225 return _IMP_isd.MarginalHBondRestraint_add_contribution(self, *args)
4227 def get_logsquares(self):
4228 r"""get_logsquares(MarginalHBondRestraint self) -> double"""
4229 return _IMP_isd.MarginalHBondRestraint_get_logsquares(self)
4231 def get_number_of_contributions(self):
4232 r"""get_number_of_contributions(MarginalHBondRestraint self) -> unsigned int"""
4233 return _IMP_isd.MarginalHBondRestraint_get_number_of_contributions(self)
4235 def get_probability(self):
4236 r"""get_probability(MarginalHBondRestraint self) -> double"""
4237 return _IMP_isd.MarginalHBondRestraint_get_probability(self)
4239 def do_get_inputs(self):
4240 r"""do_get_inputs(MarginalHBondRestraint self) -> IMP::ModelObjectsTemp"""
4241 return _IMP_isd.MarginalHBondRestraint_do_get_inputs(self)
4243 def get_version_info(self):
4244 r"""get_version_info(MarginalHBondRestraint self) -> VersionInfo"""
4245 return _IMP_isd.MarginalHBondRestraint_get_version_info(self)
4246 __swig_destroy__ = _IMP_isd.delete_MarginalHBondRestraint
4249 r"""__str__(MarginalHBondRestraint self) -> std::string"""
4250 return _IMP_isd.MarginalHBondRestraint___str__(self)
4253 r"""__repr__(MarginalHBondRestraint self) -> std::string"""
4254 return _IMP_isd.MarginalHBondRestraint___repr__(self)
4258 return _object_cast_to_MarginalHBondRestraint(o)
4261# Register MarginalHBondRestraint in _IMP_isd:
4262_IMP_isd.MarginalHBondRestraint_swigregister(MarginalHBondRestraint)
4263class TALOSRestraint(IMP.Restraint):
4264 r"""Proxy of C++ IMP::isd::TALOSRestraint class."""
4266 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4268 def __init__(self, *args):
4270 __init__(TALOSRestraint self, Model m, IMP::Particles p, IMP::Floats data, Particle kappa) -> TALOSRestraint
4271 __init__(TALOSRestraint self, Model m, Particle p1, Particle p2, Particle p3, Particle p4, IMP::Floats data, Particle kappa) -> TALOSRestraint
4272 __init__(TALOSRestraint self, Model m, IMP::Particles p, unsigned int N, double R0, double chiexp, Particle kappa) -> TALOSRestraint
4273 __init__(TALOSRestraint self, Model m, Particle p1, Particle p2, Particle p3, Particle p4, unsigned int N, double R0, double chiexp, Particle kappa) -> TALOSRestraint
4275 _IMP_isd.TALOSRestraint_swiginit(self, _IMP_isd.new_TALOSRestraint(*args))
4277 def get_probability(self):
4278 r"""get_probability(TALOSRestraint self) -> double"""
4279 return _IMP_isd.TALOSRestraint_get_probability(self)
4282 r"""get_R0(TALOSRestraint self) -> double"""
4283 return _IMP_isd.TALOSRestraint_get_R0(self)
4285 def get_chiexp(self):
4286 r"""get_chiexp(TALOSRestraint self) -> double"""
4287 return _IMP_isd.TALOSRestraint_get_chiexp(self)
4289 def do_get_inputs(self):
4290 r"""do_get_inputs(TALOSRestraint self) -> IMP::ModelObjectsTemp"""
4291 return _IMP_isd.TALOSRestraint_do_get_inputs(self)
4293 def get_version_info(self):
4294 r"""get_version_info(TALOSRestraint self) -> VersionInfo"""
4295 return _IMP_isd.TALOSRestraint_get_version_info(self)
4296 __swig_destroy__ = _IMP_isd.delete_TALOSRestraint
4299 r"""__str__(TALOSRestraint self) -> std::string"""
4300 return _IMP_isd.TALOSRestraint___str__(self)
4303 r"""__repr__(TALOSRestraint self) -> std::string"""
4304 return _IMP_isd.TALOSRestraint___repr__(self)
4308 return _object_cast_to_TALOSRestraint(o)
4311# Register TALOSRestraint in _IMP_isd:
4312_IMP_isd.TALOSRestraint_swigregister(TALOSRestraint)
4313class RepulsiveDistancePairScore(IMP.PairScore):
4314 r"""Proxy of C++ IMP::isd::RepulsiveDistancePairScore class."""
4316 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4318 def __init__(self, d0, k):
4319 r"""__init__(RepulsiveDistancePairScore self, double d0, double k) -> RepulsiveDistancePairScore"""
4320 _IMP_isd.RepulsiveDistancePairScore_swiginit(self, _IMP_isd.new_RepulsiveDistancePairScore(d0, k))
4322 def get_rest_length(self):
4323 r"""get_rest_length(RepulsiveDistancePairScore self) -> double"""
4324 return _IMP_isd.RepulsiveDistancePairScore_get_rest_length(self)
4326 def get_stiffness(self):
4327 r"""get_stiffness(RepulsiveDistancePairScore self) -> double"""
4328 return _IMP_isd.RepulsiveDistancePairScore_get_stiffness(self)
4330 def do_get_inputs(self, m, pis):
4331 r"""do_get_inputs(RepulsiveDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4332 return _IMP_isd.RepulsiveDistancePairScore_do_get_inputs(self, m, pis)
4334 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
4335 r"""evaluate_indexes(RepulsiveDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
4336 return _IMP_isd.RepulsiveDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
4338 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
4339 r"""evaluate_indexes_scores(RepulsiveDistancePairScore 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"""
4340 return _IMP_isd.RepulsiveDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
4342 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
4343 r"""evaluate_indexes_delta(RepulsiveDistancePairScore 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"""
4344 return _IMP_isd.RepulsiveDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
4346 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
4347 r"""evaluate_if_good_indexes(RepulsiveDistancePairScore 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"""
4348 return _IMP_isd.RepulsiveDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
4350 def get_version_info(self):
4351 r"""get_version_info(RepulsiveDistancePairScore self) -> VersionInfo"""
4352 return _IMP_isd.RepulsiveDistancePairScore_get_version_info(self)
4353 __swig_destroy__ = _IMP_isd.delete_RepulsiveDistancePairScore
4356 r"""__str__(RepulsiveDistancePairScore self) -> std::string"""
4357 return _IMP_isd.RepulsiveDistancePairScore___str__(self)
4360 r"""__repr__(RepulsiveDistancePairScore self) -> std::string"""
4361 return _IMP_isd.RepulsiveDistancePairScore___repr__(self)
4365 return _object_cast_to_RepulsiveDistancePairScore(o)
4368# Register RepulsiveDistancePairScore in _IMP_isd:
4369_IMP_isd.RepulsiveDistancePairScore_swigregister(RepulsiveDistancePairScore)
4370class AmbiguousRestraint(IMP.Restraint):
4371 r"""Proxy of C++ IMP::isd::AmbiguousRestraint class."""
4373 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4375 def __init__(self, *args):
4377 __init__(AmbiguousRestraint self, Model m, int d, Restraint r0, Restraint r1) -> AmbiguousRestraint
4378 __init__(AmbiguousRestraint self, Model m, int d, IMP::Restraints rs) -> AmbiguousRestraint
4379 __init__(AmbiguousRestraint self) -> AmbiguousRestraint
4381 _IMP_isd.AmbiguousRestraint_swiginit(self, _IMP_isd.new_AmbiguousRestraint(*args))
4383 def get_probability(self):
4384 r"""get_probability(AmbiguousRestraint self) -> double"""
4385 return _IMP_isd.AmbiguousRestraint_get_probability(self)
4387 def do_get_inputs(self):
4388 r"""do_get_inputs(AmbiguousRestraint self) -> IMP::ModelObjectsTemp"""
4389 return _IMP_isd.AmbiguousRestraint_do_get_inputs(self)
4391 def get_version_info(self):
4392 r"""get_version_info(AmbiguousRestraint self) -> VersionInfo"""
4393 return _IMP_isd.AmbiguousRestraint_get_version_info(self)
4394 __swig_destroy__ = _IMP_isd.delete_AmbiguousRestraint
4397 r"""__str__(AmbiguousRestraint self) -> std::string"""
4398 return _IMP_isd.AmbiguousRestraint___str__(self)
4401 r"""__repr__(AmbiguousRestraint self) -> std::string"""
4402 return _IMP_isd.AmbiguousRestraint___repr__(self)
4406 return _object_cast_to_AmbiguousRestraint(o)
4409 def _get_as_binary(self):
4410 r"""_get_as_binary(AmbiguousRestraint self) -> PyObject *"""
4411 return _IMP_isd.AmbiguousRestraint__get_as_binary(self)
4413 def _set_from_binary(self, p):
4414 r"""_set_from_binary(AmbiguousRestraint self, PyObject * p)"""
4415 return _IMP_isd.AmbiguousRestraint__set_from_binary(self, p)
4417 def __getstate__(self):
4418 p = self._get_as_binary()
4419 if len(self.__dict__) > 1:
4420 d = self.__dict__.copy()
4425 def __setstate__(self, p):
4426 if not hasattr(self, 'this'):
4428 if isinstance(p, tuple):
4430 self.__dict__.update(d)
4431 return self._set_from_binary(p)
4434# Register AmbiguousRestraint in _IMP_isd:
4435_IMP_isd.AmbiguousRestraint_swigregister(AmbiguousRestraint)
4436IMP_ISD_UNIVARIATE_FUNCTIONS_MINIMUM = _IMP_isd.IMP_ISD_UNIVARIATE_FUNCTIONS_MINIMUM
4438class UnivariateFunction(IMP.Object):
4439 r"""Proxy of C++ IMP::isd::UnivariateFunction class."""
4441 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4443 def __init__(self, *args, **kwargs):
4444 raise AttributeError("No constructor defined - class is abstract")
4446 def __call__(self, *args):
4448 __call__(UnivariateFunction self, IMP::Floats const & x) -> IMP::Floats
4449 __call__(UnivariateFunction self, IMP::FloatsList const & xlist) -> Eigen::VectorXd
4450 __call__(UnivariateFunction self, IMP::FloatsList const & xlist, bool stupid) -> IMP::FloatsList
4452 return _IMP_isd.UnivariateFunction___call__(self, *args)
4454 def has_changed(self):
4455 r"""has_changed(UnivariateFunction self) -> bool"""
4456 return _IMP_isd.UnivariateFunction_has_changed(self)
4459 r"""update(UnivariateFunction self)"""
4460 return _IMP_isd.UnivariateFunction_update(self)
4462 def add_to_derivatives(self, x, accum):
4463 r"""add_to_derivatives(UnivariateFunction self, IMP::Floats const & x, DerivativeAccumulator accum)"""
4464 return _IMP_isd.UnivariateFunction_add_to_derivatives(self, x, accum)
4466 def add_to_particle_derivative(self, particle_no, value, accum):
4467 r"""add_to_particle_derivative(UnivariateFunction self, unsigned int particle_no, double value, DerivativeAccumulator accum)"""
4468 return _IMP_isd.UnivariateFunction_add_to_particle_derivative(self, particle_no, value, accum)
4470 def get_derivative_vector(self, particle_no, xlist):
4471 r"""get_derivative_vector(UnivariateFunction self, unsigned int particle_no, IMP::FloatsList const & xlist) -> Eigen::VectorXd"""
4472 return _IMP_isd.UnivariateFunction_get_derivative_vector(self, particle_no, xlist)
4474 def get_derivative_matrix(self, xlist, stupid):
4475 r"""get_derivative_matrix(UnivariateFunction self, IMP::FloatsList const & xlist, bool stupid) -> IMP::FloatsList"""
4476 return _IMP_isd.UnivariateFunction_get_derivative_matrix(self, xlist, stupid)
4478 def get_second_derivative_vector(self, *args):
4480 get_second_derivative_vector(UnivariateFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist) -> Eigen::VectorXd
4481 get_second_derivative_vector(UnivariateFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist, bool stupid) -> IMP::FloatsList
4483 return _IMP_isd.UnivariateFunction_get_second_derivative_vector(self, *args)
4485 def get_ndims_x(self):
4486 r"""get_ndims_x(UnivariateFunction self) -> unsigned int"""
4487 return _IMP_isd.UnivariateFunction_get_ndims_x(self)
4489 def get_ndims_y(self):
4490 r"""get_ndims_y(UnivariateFunction self) -> unsigned int"""
4491 return _IMP_isd.UnivariateFunction_get_ndims_y(self)
4493 def get_number_of_particles(self):
4494 r"""get_number_of_particles(UnivariateFunction self) -> unsigned int"""
4495 return _IMP_isd.UnivariateFunction_get_number_of_particles(self)
4497 def get_particle_is_optimized(self, particle_no):
4498 r"""get_particle_is_optimized(UnivariateFunction self, unsigned int particle_no) -> bool"""
4499 return _IMP_isd.UnivariateFunction_get_particle_is_optimized(self, particle_no)
4501 def get_number_of_optimized_particles(self):
4502 r"""get_number_of_optimized_particles(UnivariateFunction self) -> unsigned int"""
4503 return _IMP_isd.UnivariateFunction_get_number_of_optimized_particles(self)
4505 def get_inputs(self):
4506 r"""get_inputs(UnivariateFunction self) -> IMP::ModelObjectsTemp"""
4507 return _IMP_isd.UnivariateFunction_get_inputs(self)
4508 __swig_destroy__ = _IMP_isd.delete_UnivariateFunction
4511 r"""__str__(UnivariateFunction self) -> std::string"""
4512 return _IMP_isd.UnivariateFunction___str__(self)
4515 r"""__repr__(UnivariateFunction self) -> std::string"""
4516 return _IMP_isd.UnivariateFunction___repr__(self)
4520 return _object_cast_to_UnivariateFunction(o)
4523# Register UnivariateFunction in _IMP_isd:
4524_IMP_isd.UnivariateFunction_swigregister(UnivariateFunction)
4525class Linear1DFunction(UnivariateFunction):
4526 r"""Proxy of C++ IMP::isd::Linear1DFunction class."""
4528 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4530 def __init__(self, a, b):
4531 r"""__init__(Linear1DFunction self, Particle a, Particle b) -> Linear1DFunction"""
4532 _IMP_isd.Linear1DFunction_swiginit(self, _IMP_isd.new_Linear1DFunction(a, b))
4534 def __call__(self, *args):
4536 __call__(Linear1DFunction self, IMP::Floats const & x) -> IMP::Floats
4537 __call__(Linear1DFunction self, IMP::FloatsList const & xlist) -> Eigen::VectorXd
4538 __call__(Linear1DFunction self, IMP::FloatsList const & xlist, bool arg3) -> IMP::FloatsList
4540 return _IMP_isd.Linear1DFunction___call__(self, *args)
4542 def get_second_derivative_vector(self, *args):
4544 get_second_derivative_vector(Linear1DFunction self, unsigned int arg2, unsigned int arg3, IMP::FloatsList const & xlist) -> Eigen::VectorXd
4545 get_second_derivative_vector(Linear1DFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist, bool arg5) -> IMP::FloatsList
4547 return _IMP_isd.Linear1DFunction_get_second_derivative_vector(self, *args)
4549 def get_version_info(self):
4550 r"""get_version_info(Linear1DFunction self) -> VersionInfo"""
4551 return _IMP_isd.Linear1DFunction_get_version_info(self)
4552 __swig_destroy__ = _IMP_isd.delete_Linear1DFunction
4555 r"""__str__(Linear1DFunction self) -> std::string"""
4556 return _IMP_isd.Linear1DFunction___str__(self)
4559 r"""__repr__(Linear1DFunction self) -> std::string"""
4560 return _IMP_isd.Linear1DFunction___repr__(self)
4564 return _object_cast_to_Linear1DFunction(o)
4567# Register Linear1DFunction in _IMP_isd:
4568_IMP_isd.Linear1DFunction_swigregister(Linear1DFunction)
4569class GeneralizedGuinierPorodFunction(UnivariateFunction):
4570 r"""Proxy of C++ IMP::isd::GeneralizedGuinierPorodFunction class."""
4572 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4574 def __init__(self, G, Rg, d, s, A):
4575 r"""__init__(GeneralizedGuinierPorodFunction self, Particle G, Particle Rg, Particle d, Particle s, Particle A) -> GeneralizedGuinierPorodFunction"""
4576 _IMP_isd.GeneralizedGuinierPorodFunction_swiginit(self, _IMP_isd.new_GeneralizedGuinierPorodFunction(G, Rg, d, s, A))
4578 def __call__(self, *args):
4580 __call__(GeneralizedGuinierPorodFunction self, IMP::Floats const & x) -> IMP::Floats
4581 __call__(GeneralizedGuinierPorodFunction self, IMP::FloatsList const & xlist) -> Eigen::VectorXd
4582 __call__(GeneralizedGuinierPorodFunction self, IMP::FloatsList const & xlist, bool arg3) -> IMP::FloatsList
4584 return _IMP_isd.GeneralizedGuinierPorodFunction___call__(self, *args)
4586 def get_second_derivative_vector(self, *args):
4588 get_second_derivative_vector(GeneralizedGuinierPorodFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist) -> Eigen::VectorXd
4589 get_second_derivative_vector(GeneralizedGuinierPorodFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist, bool arg5) -> IMP::FloatsList
4591 return _IMP_isd.GeneralizedGuinierPorodFunction_get_second_derivative_vector(self, *args)
4593 def get_version_info(self):
4594 r"""get_version_info(GeneralizedGuinierPorodFunction self) -> VersionInfo"""
4595 return _IMP_isd.GeneralizedGuinierPorodFunction_get_version_info(self)
4596 __swig_destroy__ = _IMP_isd.delete_GeneralizedGuinierPorodFunction
4599 r"""__str__(GeneralizedGuinierPorodFunction self) -> std::string"""
4600 return _IMP_isd.GeneralizedGuinierPorodFunction___str__(self)
4603 r"""__repr__(GeneralizedGuinierPorodFunction self) -> std::string"""
4604 return _IMP_isd.GeneralizedGuinierPorodFunction___repr__(self)
4608 return _object_cast_to_GeneralizedGuinierPorodFunction(o)
4611# Register GeneralizedGuinierPorodFunction in _IMP_isd:
4612_IMP_isd.GeneralizedGuinierPorodFunction_swigregister(GeneralizedGuinierPorodFunction)
4613IMP_ISD_BIVARIATE_FUNCTIONS_MINIMUM = _IMP_isd.IMP_ISD_BIVARIATE_FUNCTIONS_MINIMUM
4615class BivariateFunction(IMP.Object):
4616 r"""Proxy of C++ IMP::isd::BivariateFunction class."""
4618 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4620 def __init__(self, *args, **kwargs):
4621 raise AttributeError("No constructor defined - class is abstract")
4623 def __call__(self, *args):
4625 __call__(BivariateFunction self, IMP::Floats const & x1, IMP::Floats const & x2) -> IMP::Floats
4626 __call__(BivariateFunction self, IMP::FloatsList const & xlist) -> Eigen::MatrixXd
4627 __call__(BivariateFunction self, IMP::FloatsList const & xlist, bool stupid) -> IMP::FloatsList
4629 return _IMP_isd.BivariateFunction___call__(self, *args)
4631 def has_changed(self):
4632 r"""has_changed(BivariateFunction self) -> bool"""
4633 return _IMP_isd.BivariateFunction_has_changed(self)
4636 r"""update(BivariateFunction self)"""
4637 return _IMP_isd.BivariateFunction_update(self)
4639 def add_to_derivatives(self, x1, x2, accum):
4640 r"""add_to_derivatives(BivariateFunction self, IMP::Floats const & x1, IMP::Floats const & x2, DerivativeAccumulator accum)"""
4641 return _IMP_isd.BivariateFunction_add_to_derivatives(self, x1, x2, accum)
4643 def add_to_particle_derivative(self, particle_no, value, accum):
4644 r"""add_to_particle_derivative(BivariateFunction self, unsigned int particle_no, double value, DerivativeAccumulator accum)"""
4645 return _IMP_isd.BivariateFunction_add_to_particle_derivative(self, particle_no, value, accum)
4647 def get_derivative_matrix(self, *args):
4649 get_derivative_matrix(BivariateFunction self, unsigned int particle_no, IMP::FloatsList const & xlist) -> Eigen::MatrixXd
4650 get_derivative_matrix(BivariateFunction self, unsigned int particle_no, IMP::FloatsList const & xlist, bool stupid) -> IMP::FloatsList
4652 return _IMP_isd.BivariateFunction_get_derivative_matrix(self, *args)
4654 def get_second_derivative_matrix(self, *args):
4656 get_second_derivative_matrix(BivariateFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist) -> Eigen::MatrixXd
4657 get_second_derivative_matrix(BivariateFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist, bool stupid) -> IMP::FloatsList
4659 return _IMP_isd.BivariateFunction_get_second_derivative_matrix(self, *args)
4661 def get_ndims_x1(self):
4662 r"""get_ndims_x1(BivariateFunction self) -> unsigned int"""
4663 return _IMP_isd.BivariateFunction_get_ndims_x1(self)
4665 def get_ndims_x2(self):
4666 r"""get_ndims_x2(BivariateFunction self) -> unsigned int"""
4667 return _IMP_isd.BivariateFunction_get_ndims_x2(self)
4669 def get_ndims_y(self):
4670 r"""get_ndims_y(BivariateFunction self) -> unsigned int"""
4671 return _IMP_isd.BivariateFunction_get_ndims_y(self)
4673 def get_number_of_particles(self):
4674 r"""get_number_of_particles(BivariateFunction self) -> unsigned int"""
4675 return _IMP_isd.BivariateFunction_get_number_of_particles(self)
4677 def get_particle_is_optimized(self, particle_no):
4678 r"""get_particle_is_optimized(BivariateFunction self, unsigned int particle_no) -> bool"""
4679 return _IMP_isd.BivariateFunction_get_particle_is_optimized(self, particle_no)
4681 def get_number_of_optimized_particles(self):
4682 r"""get_number_of_optimized_particles(BivariateFunction self) -> unsigned int"""
4683 return _IMP_isd.BivariateFunction_get_number_of_optimized_particles(self)
4685 def get_inputs(self):
4686 r"""get_inputs(BivariateFunction self) -> IMP::ModelObjectsTemp"""
4687 return _IMP_isd.BivariateFunction_get_inputs(self)
4688 __swig_destroy__ = _IMP_isd.delete_BivariateFunction
4691 r"""__str__(BivariateFunction self) -> std::string"""
4692 return _IMP_isd.BivariateFunction___str__(self)
4695 r"""__repr__(BivariateFunction self) -> std::string"""
4696 return _IMP_isd.BivariateFunction___repr__(self)
4700 return _object_cast_to_BivariateFunction(o)
4703# Register BivariateFunction in _IMP_isd:
4704_IMP_isd.BivariateFunction_swigregister(BivariateFunction)
4705class Covariance1DFunction(BivariateFunction):
4706 r"""Proxy of C++ IMP::isd::Covariance1DFunction class."""
4708 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4710 def __init__(self, tau, ilambda, alpha=2.0, jitter=0.0, cutoff=1e-7):
4711 r"""__init__(Covariance1DFunction self, Particle tau, Particle ilambda, double alpha=2.0, double jitter=0.0, double cutoff=1e-7) -> Covariance1DFunction"""
4712 _IMP_isd.Covariance1DFunction_swiginit(self, _IMP_isd.new_Covariance1DFunction(tau, ilambda, alpha, jitter, cutoff))
4714 def __call__(self, *args):
4716 __call__(Covariance1DFunction self, IMP::Floats const & x1, IMP::Floats const & x2) -> IMP::Floats
4717 __call__(Covariance1DFunction self, IMP::FloatsList const & xlist) -> Eigen::MatrixXd
4718 __call__(Covariance1DFunction self, IMP::FloatsList const & xlist, bool arg3) -> IMP::FloatsList
4720 return _IMP_isd.Covariance1DFunction___call__(self, *args)
4722 def get_derivative_matrix(self, *args):
4724 get_derivative_matrix(Covariance1DFunction self, unsigned int particle_no, IMP::FloatsList const & xlist) -> Eigen::MatrixXd
4725 get_derivative_matrix(Covariance1DFunction self, unsigned int particle_no, IMP::FloatsList const & xlist, bool arg4) -> IMP::FloatsList
4727 return _IMP_isd.Covariance1DFunction_get_derivative_matrix(self, *args)
4729 def get_second_derivative_matrix(self, *args):
4731 get_second_derivative_matrix(Covariance1DFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist) -> Eigen::MatrixXd
4732 get_second_derivative_matrix(Covariance1DFunction self, unsigned int particle_a, unsigned int particle_b, IMP::FloatsList const & xlist, bool arg5) -> IMP::FloatsList
4734 return _IMP_isd.Covariance1DFunction_get_second_derivative_matrix(self, *args)
4736 def get_version_info(self):
4737 r"""get_version_info(Covariance1DFunction self) -> VersionInfo"""
4738 return _IMP_isd.Covariance1DFunction_get_version_info(self)
4739 __swig_destroy__ = _IMP_isd.delete_Covariance1DFunction
4742 r"""__str__(Covariance1DFunction self) -> std::string"""
4743 return _IMP_isd.Covariance1DFunction___str__(self)
4746 r"""__repr__(Covariance1DFunction self) -> std::string"""
4747 return _IMP_isd.Covariance1DFunction___repr__(self)
4751 return _object_cast_to_Covariance1DFunction(o)
4754# Register Covariance1DFunction in _IMP_isd:
4755_IMP_isd.Covariance1DFunction_swigregister(Covariance1DFunction)
4756class GaussianProcessInterpolation(IMP.Object):
4757 r"""Proxy of C++ IMP::isd::GaussianProcessInterpolation class."""
4759 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4761 def __init__(self, x, sample_mean, sample_std, n_obs, mean_function, covariance_function, sigma, sparse_cutoff=1e-7):
4762 r"""__init__(GaussianProcessInterpolation self, IMP::FloatsList x, IMP::Floats sample_mean, IMP::Floats sample_std, unsigned int n_obs, UnivariateFunction mean_function, BivariateFunction covariance_function, Particle sigma, double sparse_cutoff=1e-7) -> GaussianProcessInterpolation"""
4763 _IMP_isd.GaussianProcessInterpolation_swiginit(self, _IMP_isd.new_GaussianProcessInterpolation(x, sample_mean, sample_std, n_obs, mean_function, covariance_function, sigma, sparse_cutoff))
4765 def get_posterior_mean(self, x):
4766 r"""get_posterior_mean(GaussianProcessInterpolation self, IMP::Floats x) -> double"""
4767 return _IMP_isd.GaussianProcessInterpolation_get_posterior_mean(self, x)
4769 def get_posterior_covariance(self, x1, x2):
4770 r"""get_posterior_covariance(GaussianProcessInterpolation self, IMP::Floats x1, IMP::Floats x2) -> double"""
4771 return _IMP_isd.GaussianProcessInterpolation_get_posterior_covariance(self, x1, x2)
4773 def get_posterior_covariance_matrix(self, x, arg3):
4774 r"""get_posterior_covariance_matrix(GaussianProcessInterpolation self, IMP::FloatsList x, bool arg3) -> IMP::FloatsList"""
4775 return _IMP_isd.GaussianProcessInterpolation_get_posterior_covariance_matrix(self, x, arg3)
4777 def get_posterior_covariance_derivative(self, x, arg3):
4778 r"""get_posterior_covariance_derivative(GaussianProcessInterpolation self, IMP::Floats x, bool arg3) -> IMP::Floats"""
4779 return _IMP_isd.GaussianProcessInterpolation_get_posterior_covariance_derivative(self, x, arg3)
4781 def get_posterior_covariance_hessian(self, x, arg3):
4782 r"""get_posterior_covariance_hessian(GaussianProcessInterpolation self, IMP::Floats x, bool arg3) -> IMP::FloatsList"""
4783 return _IMP_isd.GaussianProcessInterpolation_get_posterior_covariance_hessian(self, x, arg3)
4785 def get_inputs(self):
4786 r"""get_inputs(GaussianProcessInterpolation self) -> IMP::ModelObjectsTemp"""
4787 return _IMP_isd.GaussianProcessInterpolation_get_inputs(self)
4789 def force_mean_update(self):
4790 r"""force_mean_update(GaussianProcessInterpolation self)"""
4791 return _IMP_isd.GaussianProcessInterpolation_force_mean_update(self)
4793 def force_covariance_update(self):
4794 r"""force_covariance_update(GaussianProcessInterpolation self)"""
4795 return _IMP_isd.GaussianProcessInterpolation_force_covariance_update(self)
4797 def get_number_of_m_particles(self):
4798 r"""get_number_of_m_particles(GaussianProcessInterpolation self) -> unsigned int"""
4799 return _IMP_isd.GaussianProcessInterpolation_get_number_of_m_particles(self)
4801 def get_m_particle_is_optimized(self, i):
4802 r"""get_m_particle_is_optimized(GaussianProcessInterpolation self, unsigned int i) -> bool"""
4803 return _IMP_isd.GaussianProcessInterpolation_get_m_particle_is_optimized(self, i)
4805 def get_number_of_Omega_particles(self):
4806 r"""get_number_of_Omega_particles(GaussianProcessInterpolation self) -> unsigned int"""
4807 return _IMP_isd.GaussianProcessInterpolation_get_number_of_Omega_particles(self)
4809 def get_Omega_particle_is_optimized(self, i):
4810 r"""get_Omega_particle_is_optimized(GaussianProcessInterpolation self, unsigned int i) -> bool"""
4811 return _IMP_isd.GaussianProcessInterpolation_get_Omega_particle_is_optimized(self, i)
4813 def get_data_abscissa(self):
4814 r"""get_data_abscissa(GaussianProcessInterpolation self) -> IMP::FloatsList"""
4815 return _IMP_isd.GaussianProcessInterpolation_get_data_abscissa(self)
4817 def get_data_mean(self):
4818 r"""get_data_mean(GaussianProcessInterpolation self) -> IMP::Floats"""
4819 return _IMP_isd.GaussianProcessInterpolation_get_data_mean(self)
4821 def get_data_variance(self):
4822 r"""get_data_variance(GaussianProcessInterpolation self) -> IMP::FloatsList"""
4823 return _IMP_isd.GaussianProcessInterpolation_get_data_variance(self)
4825 def get_version_info(self):
4826 r"""get_version_info(GaussianProcessInterpolation self) -> VersionInfo"""
4827 return _IMP_isd.GaussianProcessInterpolation_get_version_info(self)
4828 __swig_destroy__ = _IMP_isd.delete_GaussianProcessInterpolation
4831 r"""__str__(GaussianProcessInterpolation self) -> std::string"""
4832 return _IMP_isd.GaussianProcessInterpolation___str__(self)
4835 r"""__repr__(GaussianProcessInterpolation self) -> std::string"""
4836 return _IMP_isd.GaussianProcessInterpolation___repr__(self)
4840 return _object_cast_to_GaussianProcessInterpolation(o)
4843# Register GaussianProcessInterpolation in _IMP_isd:
4844_IMP_isd.GaussianProcessInterpolation_swigregister(GaussianProcessInterpolation)
4845class GaussianProcessInterpolationRestraint(IMP.Restraint):
4846 r"""Proxy of C++ IMP::isd::GaussianProcessInterpolationRestraint class."""
4848 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4850 def __init__(self, m, gpi):
4851 r"""__init__(GaussianProcessInterpolationRestraint self, Model m, GaussianProcessInterpolation gpi) -> GaussianProcessInterpolationRestraint"""
4852 _IMP_isd.GaussianProcessInterpolationRestraint_swiginit(self, _IMP_isd.new_GaussianProcessInterpolationRestraint(m, gpi))
4854 def get_probability(self):
4855 r"""get_probability(GaussianProcessInterpolationRestraint self) -> double"""
4856 return _IMP_isd.GaussianProcessInterpolationRestraint_get_probability(self)
4858 def set_use_cg(self, use, tol):
4859 r"""set_use_cg(GaussianProcessInterpolationRestraint self, bool use, double tol)"""
4860 return _IMP_isd.GaussianProcessInterpolationRestraint_set_use_cg(self, use, tol)
4862 def get_minus_log_normalization(self):
4863 r"""get_minus_log_normalization(GaussianProcessInterpolationRestraint self) -> double"""
4864 return _IMP_isd.GaussianProcessInterpolationRestraint_get_minus_log_normalization(self)
4866 def get_minus_exponent(self):
4867 r"""get_minus_exponent(GaussianProcessInterpolationRestraint self) -> double"""
4868 return _IMP_isd.GaussianProcessInterpolationRestraint_get_minus_exponent(self)
4870 def get_logdet_hessian(self):
4871 r"""get_logdet_hessian(GaussianProcessInterpolationRestraint self) -> double"""
4872 return _IMP_isd.GaussianProcessInterpolationRestraint_get_logdet_hessian(self)
4874 def get_hessian(self, *args):
4876 get_hessian(GaussianProcessInterpolationRestraint self) -> Eigen::MatrixXd
4877 get_hessian(GaussianProcessInterpolationRestraint self, bool unused) -> IMP::FloatsList
4879 return _IMP_isd.GaussianProcessInterpolationRestraint_get_hessian(self, *args)
4881 def do_get_inputs(self):
4882 r"""do_get_inputs(GaussianProcessInterpolationRestraint self) -> IMP::ModelObjectsTemp"""
4883 return _IMP_isd.GaussianProcessInterpolationRestraint_do_get_inputs(self)
4885 def get_version_info(self):
4886 r"""get_version_info(GaussianProcessInterpolationRestraint self) -> VersionInfo"""
4887 return _IMP_isd.GaussianProcessInterpolationRestraint_get_version_info(self)
4888 __swig_destroy__ = _IMP_isd.delete_GaussianProcessInterpolationRestraint
4891 r"""__str__(GaussianProcessInterpolationRestraint self) -> std::string"""
4892 return _IMP_isd.GaussianProcessInterpolationRestraint___str__(self)
4895 r"""__repr__(GaussianProcessInterpolationRestraint self) -> std::string"""
4896 return _IMP_isd.GaussianProcessInterpolationRestraint___repr__(self)
4900 return _object_cast_to_GaussianProcessInterpolationRestraint(o)
4903# Register GaussianProcessInterpolationRestraint in _IMP_isd:
4904_IMP_isd.GaussianProcessInterpolationRestraint_swigregister(GaussianProcessInterpolationRestraint)
4905class MolecularDynamics(IMP.atom.MolecularDynamics):
4906 r"""Proxy of C++ IMP::isd::MolecularDynamics class."""
4908 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4910 def __init__(self, m=None):
4911 r"""__init__(MolecularDynamics self, Model m=None) -> MolecularDynamics"""
4912 _IMP_isd.MolecularDynamics_swiginit(self, _IMP_isd.new_MolecularDynamics(m))
4915 r"""__str__(MolecularDynamics self) -> std::string"""
4916 return _IMP_isd.MolecularDynamics___str__(self)
4919 r"""__repr__(MolecularDynamics self) -> std::string"""
4920 return _IMP_isd.MolecularDynamics___repr__(self)
4924 return _object_cast_to_MolecularDynamics(o)
4926 __swig_destroy__ = _IMP_isd.delete_MolecularDynamics
4928# Register MolecularDynamics in _IMP_isd:
4929_IMP_isd.MolecularDynamics_swigregister(MolecularDynamics)
4930class MolecularDynamicsMover(IMP.core.MonteCarloMover):
4931 r"""Proxy of C++ IMP::isd::MolecularDynamicsMover class."""
4933 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4935 def __init__(self, m, nsteps=100, timestep=1.):
4936 r"""__init__(MolecularDynamicsMover self, Model m, unsigned int nsteps=100, IMP::Float timestep=1.) -> MolecularDynamicsMover"""
4937 _IMP_isd.MolecularDynamicsMover_swiginit(self, _IMP_isd.new_MolecularDynamicsMover(m, nsteps, timestep))
4940 r"""get_md(MolecularDynamicsMover self) -> MolecularDynamics"""
4941 return _IMP_isd.MolecularDynamicsMover_get_md(self)
4943 def get_number_of_md_steps(self):
4944 r"""get_number_of_md_steps(MolecularDynamicsMover self) -> unsigned int"""
4945 return _IMP_isd.MolecularDynamicsMover_get_number_of_md_steps(self)
4947 def set_number_of_md_steps(self, nsteps):
4948 r"""set_number_of_md_steps(MolecularDynamicsMover self, unsigned int nsteps)"""
4949 return _IMP_isd.MolecularDynamicsMover_set_number_of_md_steps(self, nsteps)
4951 def get_version_info(self):
4952 r"""get_version_info(MolecularDynamicsMover self) -> VersionInfo"""
4953 return _IMP_isd.MolecularDynamicsMover_get_version_info(self)
4954 __swig_destroy__ = _IMP_isd.delete_MolecularDynamicsMover
4957 r"""__str__(MolecularDynamicsMover self) -> std::string"""
4958 return _IMP_isd.MolecularDynamicsMover___str__(self)
4961 r"""__repr__(MolecularDynamicsMover self) -> std::string"""
4962 return _IMP_isd.MolecularDynamicsMover___repr__(self)
4966 return _object_cast_to_MolecularDynamicsMover(o)
4969# Register MolecularDynamicsMover in _IMP_isd:
4970_IMP_isd.MolecularDynamicsMover_swigregister(MolecularDynamicsMover)
4971class HybridMonteCarlo(IMP.core.MonteCarlo):
4972 r"""Proxy of C++ IMP::isd::HybridMonteCarlo class."""
4974 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4976 def __init__(self, m, kT=1.0, steps=100, timestep=1.0, persistence=1):
4977 r"""__init__(HybridMonteCarlo self, Model m, IMP::Float kT=1.0, unsigned int steps=100, IMP::Float timestep=1.0, unsigned int persistence=1) -> HybridMonteCarlo"""
4978 _IMP_isd.HybridMonteCarlo_swiginit(self, _IMP_isd.new_HybridMonteCarlo(m, kT, steps, timestep, persistence))
4980 def get_kinetic_energy(self):
4981 r"""get_kinetic_energy(HybridMonteCarlo self) -> IMP::Float"""
4982 return _IMP_isd.HybridMonteCarlo_get_kinetic_energy(self)
4984 def get_potential_energy(self):
4985 r"""get_potential_energy(HybridMonteCarlo self) -> IMP::Float"""
4986 return _IMP_isd.HybridMonteCarlo_get_potential_energy(self)
4988 def get_total_energy(self):
4989 r"""get_total_energy(HybridMonteCarlo self) -> IMP::Float"""
4990 return _IMP_isd.HybridMonteCarlo_get_total_energy(self)
4992 def set_timestep(self, ts):
4993 r"""set_timestep(HybridMonteCarlo self, IMP::Float ts)"""
4994 return _IMP_isd.HybridMonteCarlo_set_timestep(self, ts)
4996 def get_timestep(self):
4997 r"""get_timestep(HybridMonteCarlo self) -> double"""
4998 return _IMP_isd.HybridMonteCarlo_get_timestep(self)
5000 def set_number_of_md_steps(self, nsteps):
5001 r"""set_number_of_md_steps(HybridMonteCarlo self, unsigned int nsteps)"""
5002 return _IMP_isd.HybridMonteCarlo_set_number_of_md_steps(self, nsteps)
5004 def get_number_of_md_steps(self):
5005 r"""get_number_of_md_steps(HybridMonteCarlo self) -> unsigned int"""
5006 return _IMP_isd.HybridMonteCarlo_get_number_of_md_steps(self)
5008 def set_persistence(self, persistence=1):
5009 r"""set_persistence(HybridMonteCarlo self, unsigned int persistence=1)"""
5010 return _IMP_isd.HybridMonteCarlo_set_persistence(self, persistence)
5012 def get_persistence(self):
5013 r"""get_persistence(HybridMonteCarlo self) -> unsigned int"""
5014 return _IMP_isd.HybridMonteCarlo_get_persistence(self)
5017 r"""get_md(HybridMonteCarlo self) -> MolecularDynamics"""
5018 return _IMP_isd.HybridMonteCarlo_get_md(self)
5020 def do_evaluate(self, arg2, arg3):
5021 r"""do_evaluate(HybridMonteCarlo self, IMP::ParticleIndexes const & arg2, bool arg3) -> double"""
5022 return _IMP_isd.HybridMonteCarlo_do_evaluate(self, arg2, arg3)
5025 r"""do_step(HybridMonteCarlo self)"""
5026 return _IMP_isd.HybridMonteCarlo_do_step(self)
5027 __swig_destroy__ = _IMP_isd.delete_HybridMonteCarlo
5030 r"""__str__(HybridMonteCarlo self) -> std::string"""
5031 return _IMP_isd.HybridMonteCarlo___str__(self)
5034 r"""__repr__(HybridMonteCarlo self) -> std::string"""
5035 return _IMP_isd.HybridMonteCarlo___repr__(self)
5039 return _object_cast_to_HybridMonteCarlo(o)
5042# Register HybridMonteCarlo in _IMP_isd:
5043_IMP_isd.HybridMonteCarlo_swigregister(HybridMonteCarlo)
5044class FretData(IMP.Object):
5045 r"""Proxy of C++ IMP::isd::FretData class."""
5047 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5049 def __init__(self, *args):
5051 __init__(FretData self, IMP::Floats d_term, IMP::Floats d_center, IMP::Floats d_int, IMP::Floats s_grid, IMP::Float R0, IMP::Float Rmin, IMP::Float Rmax, bool do_limit=True) -> FretData
5052 __init__(FretData self) -> FretData
5054 _IMP_isd.FretData_swiginit(self, _IMP_isd.new_FretData(*args))
5056 def get_closest(self, vec, value):
5057 r"""get_closest(FretData self, DistBase vec, double value) -> int"""
5058 return _IMP_isd.FretData_get_closest(self, vec, value)
5060 def get_probability(self, distn, dist, sigma):
5061 r"""get_probability(FretData self, IMP::Float distn, IMP::Float dist, IMP::Float sigma) -> IMP::Float"""
5062 return _IMP_isd.FretData_get_probability(self, distn, dist, sigma)
5064 def get_kernel(self, dist, R0):
5065 r"""get_kernel(FretData self, IMP::Float dist, IMP::Float R0) -> IMP::Float"""
5066 return _IMP_isd.FretData_get_kernel(self, dist, R0)
5068 def get_marginal_element(self, d_term, d_center, sigma):
5069 r"""get_marginal_element(FretData self, IMP::Float d_term, IMP::Float d_center, IMP::Float sigma) -> IMP::FloatPair"""
5070 return _IMP_isd.FretData_get_marginal_element(self, d_term, d_center, sigma)
5072 def get_version_info(self):
5073 r"""get_version_info(FretData self) -> VersionInfo"""
5074 return _IMP_isd.FretData_get_version_info(self)
5075 __swig_destroy__ = _IMP_isd.delete_FretData
5078 r"""__str__(FretData self) -> std::string"""
5079 return _IMP_isd.FretData___str__(self)
5082 r"""__repr__(FretData self) -> std::string"""
5083 return _IMP_isd.FretData___repr__(self)
5087 return _object_cast_to_FretData(o)
5090 def _get_as_binary(self):
5091 r"""_get_as_binary(FretData self) -> PyObject *"""
5092 return _IMP_isd.FretData__get_as_binary(self)
5094 def _set_from_binary(self, p):
5095 r"""_set_from_binary(FretData self, PyObject * p)"""
5096 return _IMP_isd.FretData__set_from_binary(self, p)
5098 def __getstate__(self):
5099 p = self._get_as_binary()
5100 if len(self.__dict__) > 1:
5101 d = self.__dict__.copy()
5106 def __setstate__(self, p):
5107 if not hasattr(self, 'this'):
5109 if isinstance(p, tuple):
5111 self.__dict__.update(d)
5112 return self._set_from_binary(p)
5115# Register FretData in _IMP_isd:
5116_IMP_isd.FretData_swigregister(FretData)
5117class FretRestraint(IMP.Restraint):
5118 r"""Proxy of C++ IMP::isd::FretRestraint class."""
5120 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5122 def __init__(self, *args):
5124 __init__(FretRestraint self, IMP::ParticlesTemp pd, IMP::ParticlesTemp pa, Particle kda, Particle Ida, Particle R0, Particle sigma0, Particle Pbl, double fexp, double m_d=1.0, double m_a=1.0) -> FretRestraint
5125 __init__(FretRestraint self, Particle kda, Particle Ida, Particle sumFi, Particle sigma0, Particle Pbl, double fexp) -> FretRestraint
5126 __init__(FretRestraint self, Particle prd, Vector3D GMMterd, IMP::algebra::Vector3Ds GMMctrd, IMP::Floats GMMwd, IMP::Floats GMMsigd, Particle pra, Vector3D GMMtera, IMP::algebra::Vector3Ds GMMctra, IMP::Floats GMMwa, IMP::Floats GMMsiga, Particle kda, Particle Ida, Particle sigma0, Particle Pbl, FretData data, double fexp) -> FretRestraint
5127 __init__(FretRestraint self) -> FretRestraint
5129 _IMP_isd.FretRestraint_swiginit(self, _IMP_isd.new_FretRestraint(*args))
5131 def get_sumFi(self):
5132 r"""get_sumFi(FretRestraint self) -> double"""
5133 return _IMP_isd.FretRestraint_get_sumFi(self)
5135 def get_average_sigma(self, fmod):
5136 r"""get_average_sigma(FretRestraint self, double fmod) -> double"""
5137 return _IMP_isd.FretRestraint_get_average_sigma(self, fmod)
5139 def get_standard_error(self):
5140 r"""get_standard_error(FretRestraint self) -> double"""
5141 return _IMP_isd.FretRestraint_get_standard_error(self)
5143 def get_model_fretr(self):
5144 r"""get_model_fretr(FretRestraint self) -> double"""
5145 return _IMP_isd.FretRestraint_get_model_fretr(self)
5147 def get_probability(self):
5148 r"""get_probability(FretRestraint self) -> double"""
5149 return _IMP_isd.FretRestraint_get_probability(self)
5151 def get_experimental_value(self):
5152 r"""get_experimental_value(FretRestraint self) -> double"""
5153 return _IMP_isd.FretRestraint_get_experimental_value(self)
5155 def set_experimental_value(self, fexp):
5156 r"""set_experimental_value(FretRestraint self, double fexp)"""
5157 return _IMP_isd.FretRestraint_set_experimental_value(self, fexp)
5159 def do_get_inputs(self):
5160 r"""do_get_inputs(FretRestraint self) -> IMP::ModelObjectsTemp"""
5161 return _IMP_isd.FretRestraint_do_get_inputs(self)
5163 def get_version_info(self):
5164 r"""get_version_info(FretRestraint self) -> VersionInfo"""
5165 return _IMP_isd.FretRestraint_get_version_info(self)
5166 __swig_destroy__ = _IMP_isd.delete_FretRestraint
5169 r"""__str__(FretRestraint self) -> std::string"""
5170 return _IMP_isd.FretRestraint___str__(self)
5173 r"""__repr__(FretRestraint self) -> std::string"""
5174 return _IMP_isd.FretRestraint___repr__(self)
5178 return _object_cast_to_FretRestraint(o)
5181 def _get_as_binary(self):
5182 r"""_get_as_binary(FretRestraint self) -> PyObject *"""
5183 return _IMP_isd.FretRestraint__get_as_binary(self)
5185 def _set_from_binary(self, p):
5186 r"""_set_from_binary(FretRestraint self, PyObject * p)"""
5187 return _IMP_isd.FretRestraint__set_from_binary(self, p)
5189 def __getstate__(self):
5190 p = self._get_as_binary()
5191 if len(self.__dict__) > 1:
5192 d = self.__dict__.copy()
5197 def __setstate__(self, p):
5198 if not hasattr(self, 'this'):
5200 if isinstance(p, tuple):
5202 self.__dict__.update(d)
5203 return self._set_from_binary(p)
5206# Register FretRestraint in _IMP_isd:
5207_IMP_isd.FretRestraint_swigregister(FretRestraint)
5208class CysteineCrossLinkData(IMP.Object):
5209 r"""Proxy of C++ IMP::isd::CysteineCrossLinkData class."""
5211 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5213 def __init__(self, *args):
5215 __init__(CysteineCrossLinkData self, double fexp, IMP::Floats fmod_grid, IMP::Floats omega_grid, IMP::Floats omega0_grid, int prior_type=3) -> CysteineCrossLinkData
5216 __init__(CysteineCrossLinkData self) -> CysteineCrossLinkData
5218 _IMP_isd.CysteineCrossLinkData_swiginit(self, _IMP_isd.new_CysteineCrossLinkData(*args))
5220 def get_closest(self, vec, value):
5221 r"""get_closest(CysteineCrossLinkData self, DistBase vec, double value) -> int"""
5222 return _IMP_isd.CysteineCrossLinkData_get_closest(self, vec, value)
5224 def get_omegas(self, fmods, omega0):
5225 r"""get_omegas(CysteineCrossLinkData self, IMP::Floats fmods, double omega0) -> IMP::Floats"""
5226 return _IMP_isd.CysteineCrossLinkData_get_omegas(self, fmods, omega0)
5228 def get_nonmarginal_elements(self, fexp, fmods, omega):
5229 r"""get_nonmarginal_elements(CysteineCrossLinkData self, double fexp, IMP::Floats fmods, double omega) -> IMP::Floats"""
5230 return _IMP_isd.CysteineCrossLinkData_get_nonmarginal_elements(self, fexp, fmods, omega)
5232 def get_marginal_elements(self, fmods, omega0):
5233 r"""get_marginal_elements(CysteineCrossLinkData self, IMP::Floats fmods, double omega0) -> IMP::Floats"""
5234 return _IMP_isd.CysteineCrossLinkData_get_marginal_elements(self, fmods, omega0)
5236 def get_omega(self, fmod, omega0):
5237 r"""get_omega(CysteineCrossLinkData self, double fmod, double omega0) -> double"""
5238 return _IMP_isd.CysteineCrossLinkData_get_omega(self, fmod, omega0)
5240 def get_standard_deviation(self, fmod, omega0):
5241 r"""get_standard_deviation(CysteineCrossLinkData self, double fmod, double omega0) -> double"""
5242 return _IMP_isd.CysteineCrossLinkData_get_standard_deviation(self, fmod, omega0)
5244 def get_nonmarginal_element(self, fexp, fmod, omega):
5245 r"""get_nonmarginal_element(CysteineCrossLinkData self, double fexp, double fmod, double omega) -> double"""
5246 return _IMP_isd.CysteineCrossLinkData_get_nonmarginal_element(self, fexp, fmod, omega)
5248 def get_marginal_element(self, fmod, omega0):
5249 r"""get_marginal_element(CysteineCrossLinkData self, double fmod, double omega0) -> double"""
5250 return _IMP_isd.CysteineCrossLinkData_get_marginal_element(self, fmod, omega0)
5252 def get_version_info(self):
5253 r"""get_version_info(CysteineCrossLinkData self) -> VersionInfo"""
5254 return _IMP_isd.CysteineCrossLinkData_get_version_info(self)
5255 __swig_destroy__ = _IMP_isd.delete_CysteineCrossLinkData
5258 r"""__str__(CysteineCrossLinkData self) -> std::string"""
5259 return _IMP_isd.CysteineCrossLinkData___str__(self)
5262 r"""__repr__(CysteineCrossLinkData self) -> std::string"""
5263 return _IMP_isd.CysteineCrossLinkData___repr__(self)
5267 return _object_cast_to_CysteineCrossLinkData(o)
5270 def _get_as_binary(self):
5271 r"""_get_as_binary(CysteineCrossLinkData self) -> PyObject *"""
5272 return _IMP_isd.CysteineCrossLinkData__get_as_binary(self)
5274 def _set_from_binary(self, p):
5275 r"""_set_from_binary(CysteineCrossLinkData self, PyObject * p)"""
5276 return _IMP_isd.CysteineCrossLinkData__set_from_binary(self, p)
5278 def __getstate__(self):
5279 p = self._get_as_binary()
5280 if len(self.__dict__) > 1:
5281 d = self.__dict__.copy()
5286 def __setstate__(self, p):
5287 if not hasattr(self, 'this'):
5289 if isinstance(p, tuple):
5291 self.__dict__.update(d)
5292 return self._set_from_binary(p)
5295# Register CysteineCrossLinkData in _IMP_isd:
5296_IMP_isd.CysteineCrossLinkData_swigregister(CysteineCrossLinkData)
5297class CrossLinkData(IMP.Object):
5298 r"""Proxy of C++ IMP::isd::CrossLinkData class."""
5300 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5302 def __init__(self, *args):
5304 __init__(CrossLinkData self, IMP::Floats dist_grid, IMP::Floats omega_grid, IMP::Floats sigma_grid, double lexp_, double don=std::numeric_limits< double >::max(), double doff=std::numeric_limits< double >::max(), int prior_type=0) -> CrossLinkData
5305 __init__(CrossLinkData self, IMP::Floats dist_grid, IMP::Floats omega_grid, IMP::Floats sigma_grid, IMP::Floats pot_x_grid, IMP::Floats pot_value_grid, double don=std::numeric_limits< double >::max(), double doff=std::numeric_limits< double >::max(), int prior_type=0) -> CrossLinkData
5306 __init__(CrossLinkData self) -> CrossLinkData
5308 _IMP_isd.CrossLinkData_swiginit(self, _IMP_isd.new_CrossLinkData(*args))
5310 def get_closest(self, vec, value):
5311 r"""get_closest(CrossLinkData self, DistBase vec, double value) -> int"""
5312 return _IMP_isd.CrossLinkData_get_closest(self, vec, value)
5314 def get_omegas(self, sigma, dists):
5315 r"""get_omegas(CrossLinkData self, double sigma, IMP::Floats dists) -> IMP::Floats"""
5316 return _IMP_isd.CrossLinkData_get_omegas(self, sigma, dists)
5318 def get_omega_prior(self, omega, omega0):
5319 r"""get_omega_prior(CrossLinkData self, double omega, double omega0) -> double"""
5320 return _IMP_isd.CrossLinkData_get_omega_prior(self, omega, omega0)
5322 def get_nonmarginal_elements(self, sigmai, dists):
5323 r"""get_nonmarginal_elements(CrossLinkData self, double sigmai, IMP::Floats dists) -> IMP::Floats"""
5324 return _IMP_isd.CrossLinkData_get_nonmarginal_elements(self, sigmai, dists)
5326 def get_marginal_elements(self, sigma, dists):
5327 r"""get_marginal_elements(CrossLinkData self, double sigma, IMP::Floats dists) -> IMP::Floats"""
5328 return _IMP_isd.CrossLinkData_get_marginal_elements(self, sigma, dists)
5330 def get_marginal_maximum(self, *args):
5332 get_marginal_maximum(CrossLinkData self, double sigma) -> double
5333 get_marginal_maximum(CrossLinkData self) -> double
5335 return _IMP_isd.CrossLinkData_get_marginal_maximum(self, *args)
5337 def get_version_info(self):
5338 r"""get_version_info(CrossLinkData self) -> VersionInfo"""
5339 return _IMP_isd.CrossLinkData_get_version_info(self)
5340 __swig_destroy__ = _IMP_isd.delete_CrossLinkData
5343 r"""__str__(CrossLinkData self) -> std::string"""
5344 return _IMP_isd.CrossLinkData___str__(self)
5347 r"""__repr__(CrossLinkData self) -> std::string"""
5348 return _IMP_isd.CrossLinkData___repr__(self)
5352 return _object_cast_to_CrossLinkData(o)
5355 def _get_as_binary(self):
5356 r"""_get_as_binary(CrossLinkData self) -> PyObject *"""
5357 return _IMP_isd.CrossLinkData__get_as_binary(self)
5359 def _set_from_binary(self, p):
5360 r"""_set_from_binary(CrossLinkData self, PyObject * p)"""
5361 return _IMP_isd.CrossLinkData__set_from_binary(self, p)
5363 def __getstate__(self):
5364 p = self._get_as_binary()
5365 if len(self.__dict__) > 1:
5366 d = self.__dict__.copy()
5371 def __setstate__(self, p):
5372 if not hasattr(self, 'this'):
5374 if isinstance(p, tuple):
5376 self.__dict__.update(d)
5377 return self._set_from_binary(p)
5380# Register CrossLinkData in _IMP_isd:
5381_IMP_isd.CrossLinkData_swigregister(CrossLinkData)
5382class CysteineCrossLinkRestraint(IMP.Restraint):
5383 r"""Proxy of C++ IMP::isd::CysteineCrossLinkRestraint class."""
5385 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5387 def __init__(self, *args):
5389 __init__(CysteineCrossLinkRestraint self, Model m, _ParticleIndexAdaptor beta, _ParticleIndexAdaptor sigma, _ParticleIndexAdaptor epsilon, _ParticleIndexAdaptor weight, CrossLinkData data, double fexp) -> CysteineCrossLinkRestraint
5390 __init__(CysteineCrossLinkRestraint self, Model m, _ParticleIndexAdaptor beta, _ParticleIndexAdaptor sigma, _ParticleIndexAdaptor epsilon, _ParticleIndexAdaptor weight, CrossLinkData data, CysteineCrossLinkData ccldata) -> CysteineCrossLinkRestraint
5391 __init__(CysteineCrossLinkRestraint self) -> CysteineCrossLinkRestraint
5393 _IMP_isd.CysteineCrossLinkRestraint_swiginit(self, _IMP_isd.new_CysteineCrossLinkRestraint(*args))
5395 def get_probability(self):
5396 r"""get_probability(CysteineCrossLinkRestraint self) -> double"""
5397 return _IMP_isd.CysteineCrossLinkRestraint_get_probability(self)
5399 def get_standard_error(self):
5400 r"""get_standard_error(CysteineCrossLinkRestraint self) -> double"""
5401 return _IMP_isd.CysteineCrossLinkRestraint_get_standard_error(self)
5403 def get_frequencies(self):
5404 r"""get_frequencies(CysteineCrossLinkRestraint self) -> IMP::Floats"""
5405 return _IMP_isd.CysteineCrossLinkRestraint_get_frequencies(self)
5407 def get_model_frequency(self):
5408 r"""get_model_frequency(CysteineCrossLinkRestraint self) -> double"""
5409 return _IMP_isd.CysteineCrossLinkRestraint_get_model_frequency(self)
5411 def get_distances(self):
5412 r"""get_distances(CysteineCrossLinkRestraint self) -> IMP::Floats"""
5413 return _IMP_isd.CysteineCrossLinkRestraint_get_distances(self)
5415 def get_truncated_normalization(self, mean, sigma):
5416 r"""get_truncated_normalization(CysteineCrossLinkRestraint self, double mean, double sigma) -> double"""
5417 return _IMP_isd.CysteineCrossLinkRestraint_get_truncated_normalization(self, mean, sigma)
5419 def get_normal_pdf(self, mean, sigma, x):
5420 r"""get_normal_pdf(CysteineCrossLinkRestraint self, double mean, double sigma, double x) -> double"""
5421 return _IMP_isd.CysteineCrossLinkRestraint_get_normal_pdf(self, mean, sigma, x)
5423 def add_contribution(self, *args):
5425 add_contribution(CysteineCrossLinkRestraint self, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2)
5426 add_contribution(CysteineCrossLinkRestraint self, IMP::ParticleIndexes p1, IMP::ParticleIndexes p2)
5428 return _IMP_isd.CysteineCrossLinkRestraint_add_contribution(self, *args)
5430 def get_CB_coordinates(self, ps):
5431 r"""get_CB_coordinates(CysteineCrossLinkRestraint self, IMP::ParticleIndexes const & ps) -> Vector3D"""
5432 return _IMP_isd.CysteineCrossLinkRestraint_get_CB_coordinates(self, ps)
5434 def get_number_of_contributions(self):
5435 r"""get_number_of_contributions(CysteineCrossLinkRestraint self) -> unsigned int"""
5436 return _IMP_isd.CysteineCrossLinkRestraint_get_number_of_contributions(self)
5438 def do_get_inputs(self):
5439 r"""do_get_inputs(CysteineCrossLinkRestraint self) -> IMP::ModelObjectsTemp"""
5440 return _IMP_isd.CysteineCrossLinkRestraint_do_get_inputs(self)
5442 def get_version_info(self):
5443 r"""get_version_info(CysteineCrossLinkRestraint self) -> VersionInfo"""
5444 return _IMP_isd.CysteineCrossLinkRestraint_get_version_info(self)
5445 __swig_destroy__ = _IMP_isd.delete_CysteineCrossLinkRestraint
5448 r"""__str__(CysteineCrossLinkRestraint self) -> std::string"""
5449 return _IMP_isd.CysteineCrossLinkRestraint___str__(self)
5452 r"""__repr__(CysteineCrossLinkRestraint self) -> std::string"""
5453 return _IMP_isd.CysteineCrossLinkRestraint___repr__(self)
5457 return _object_cast_to_CysteineCrossLinkRestraint(o)
5460 def _get_as_binary(self):
5461 r"""_get_as_binary(CysteineCrossLinkRestraint self) -> PyObject *"""
5462 return _IMP_isd.CysteineCrossLinkRestraint__get_as_binary(self)
5464 def _set_from_binary(self, p):
5465 r"""_set_from_binary(CysteineCrossLinkRestraint self, PyObject * p)"""
5466 return _IMP_isd.CysteineCrossLinkRestraint__set_from_binary(self, p)
5468 def __getstate__(self):
5469 p = self._get_as_binary()
5470 if len(self.__dict__) > 1:
5471 d = self.__dict__.copy()
5476 def __setstate__(self, p):
5477 if not hasattr(self, 'this'):
5479 if isinstance(p, tuple):
5481 self.__dict__.update(d)
5482 return self._set_from_binary(p)
5485# Register CysteineCrossLinkRestraint in _IMP_isd:
5486_IMP_isd.CysteineCrossLinkRestraint_swigregister(CysteineCrossLinkRestraint)
5487class WeightMover(IMP.core.MonteCarloMover):
5488 r"""Proxy of C++ IMP::isd::WeightMover class."""
5490 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5492 def __init__(self, w, radius):
5493 r"""__init__(WeightMover self, Particle w, IMP::Float radius) -> WeightMover"""
5494 _IMP_isd.WeightMover_swiginit(self, _IMP_isd.new_WeightMover(w, radius))
5496 def set_radius(self, radius):
5497 r"""set_radius(WeightMover self, IMP::Float radius)"""
5498 return _IMP_isd.WeightMover_set_radius(self, radius)
5500 def get_radius(self):
5501 r"""get_radius(WeightMover self) -> IMP::Float"""
5502 return _IMP_isd.WeightMover_get_radius(self)
5504 def get_version_info(self):
5505 r"""get_version_info(WeightMover self) -> VersionInfo"""
5506 return _IMP_isd.WeightMover_get_version_info(self)
5507 __swig_destroy__ = _IMP_isd.delete_WeightMover
5510 r"""__str__(WeightMover self) -> std::string"""
5511 return _IMP_isd.WeightMover___str__(self)
5514 r"""__repr__(WeightMover self) -> std::string"""
5515 return _IMP_isd.WeightMover___repr__(self)
5519 return _object_cast_to_WeightMover(o)
5522# Register WeightMover in _IMP_isd:
5523_IMP_isd.WeightMover_swigregister(WeightMover)
5524class WeightRestraint(IMP.Restraint):
5525 r"""Proxy of C++ IMP::isd::WeightRestraint class."""
5527 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5529 def __init__(self, w, wmin, wmax, kappa):
5530 r"""__init__(WeightRestraint self, Particle w, IMP::Float wmin, IMP::Float wmax, IMP::Float kappa) -> WeightRestraint"""
5531 _IMP_isd.WeightRestraint_swiginit(self, _IMP_isd.new_WeightRestraint(w, wmin, wmax, kappa))
5533 def do_get_inputs(self):
5534 r"""do_get_inputs(WeightRestraint self) -> IMP::ModelObjectsTemp"""
5535 return _IMP_isd.WeightRestraint_do_get_inputs(self)
5537 def get_version_info(self):
5538 r"""get_version_info(WeightRestraint self) -> VersionInfo"""
5539 return _IMP_isd.WeightRestraint_get_version_info(self)
5540 __swig_destroy__ = _IMP_isd.delete_WeightRestraint
5543 r"""__str__(WeightRestraint self) -> std::string"""
5544 return _IMP_isd.WeightRestraint___str__(self)
5547 r"""__repr__(WeightRestraint self) -> std::string"""
5548 return _IMP_isd.WeightRestraint___repr__(self)
5552 return _object_cast_to_WeightRestraint(o)
5555# Register WeightRestraint in _IMP_isd:
5556_IMP_isd.WeightRestraint_swigregister(WeightRestraint)
5557class AtomicCrossLinkMSRestraint(IMP.Restraint):
5558 r"""Proxy of C++ IMP::isd::AtomicCrossLinkMSRestraint class."""
5560 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5562 def __init__(self, *args):
5564 __init__(AtomicCrossLinkMSRestraint self, Model m, double length, ParticleIndex psi, IMP::Float slope=0.0, bool part_of_log_score=False, std::string name="AtomicCrossLinkMSRestraint%1%") -> AtomicCrossLinkMSRestraint
5565 __init__(AtomicCrossLinkMSRestraint self) -> AtomicCrossLinkMSRestraint
5567 _IMP_isd.AtomicCrossLinkMSRestraint_swiginit(self, _IMP_isd.new_AtomicCrossLinkMSRestraint(*args))
5569 def add_contribution(self, ppi, sigmas):
5570 r"""add_contribution(AtomicCrossLinkMSRestraint self, IMP::ParticleIndexPair const & ppi, IMP::ParticleIndexPair const & sigmas)"""
5571 return _IMP_isd.AtomicCrossLinkMSRestraint_add_contribution(self, ppi, sigmas)
5573 def evaluate_for_contributions(self, c, accum):
5574 r"""evaluate_for_contributions(AtomicCrossLinkMSRestraint self, IMP::Ints c, DerivativeAccumulator accum) -> IMP::Float"""
5575 return _IMP_isd.AtomicCrossLinkMSRestraint_evaluate_for_contributions(self, c, accum)
5577 def get_number_of_contributions(self):
5578 r"""get_number_of_contributions(AtomicCrossLinkMSRestraint self) -> unsigned int"""
5579 return _IMP_isd.AtomicCrossLinkMSRestraint_get_number_of_contributions(self)
5581 def get_contribution(self, i):
5582 r"""get_contribution(AtomicCrossLinkMSRestraint self, int i) -> IMP::ParticleIndexPair"""
5583 return _IMP_isd.AtomicCrossLinkMSRestraint_get_contribution(self, i)
5585 def get_contribution_sigmas(self, i):
5586 r"""get_contribution_sigmas(AtomicCrossLinkMSRestraint self, int i) -> IMP::ParticleIndexPair"""
5587 return _IMP_isd.AtomicCrossLinkMSRestraint_get_contribution_sigmas(self, i)
5590 r"""get_psi(AtomicCrossLinkMSRestraint self) -> ParticleIndex"""
5591 return _IMP_isd.AtomicCrossLinkMSRestraint_get_psi(self)
5593 def do_get_inputs(self):
5594 r"""do_get_inputs(AtomicCrossLinkMSRestraint self) -> IMP::ModelObjectsTemp"""
5595 return _IMP_isd.AtomicCrossLinkMSRestraint_do_get_inputs(self)
5597 def show(self, out):
5598 r"""show(AtomicCrossLinkMSRestraint self, _ostream out)"""
5599 return _IMP_isd.AtomicCrossLinkMSRestraint_show(self, out)
5601 def set_slope(self, slope):
5602 r"""set_slope(AtomicCrossLinkMSRestraint self, IMP::Float slope)"""
5603 return _IMP_isd.AtomicCrossLinkMSRestraint_set_slope(self, slope)
5605 def set_part_of_log_score(self, hey):
5606 r"""set_part_of_log_score(AtomicCrossLinkMSRestraint self, bool hey)"""
5607 return _IMP_isd.AtomicCrossLinkMSRestraint_set_part_of_log_score(self, hey)
5609 def get_version_info(self):
5610 r"""get_version_info(AtomicCrossLinkMSRestraint self) -> VersionInfo"""
5611 return _IMP_isd.AtomicCrossLinkMSRestraint_get_version_info(self)
5612 __swig_destroy__ = _IMP_isd.delete_AtomicCrossLinkMSRestraint
5615 r"""__str__(AtomicCrossLinkMSRestraint self) -> std::string"""
5616 return _IMP_isd.AtomicCrossLinkMSRestraint___str__(self)
5619 r"""__repr__(AtomicCrossLinkMSRestraint self) -> std::string"""
5620 return _IMP_isd.AtomicCrossLinkMSRestraint___repr__(self)
5624 return _object_cast_to_AtomicCrossLinkMSRestraint(o)
5627 def _get_as_binary(self):
5628 r"""_get_as_binary(AtomicCrossLinkMSRestraint self) -> PyObject *"""
5629 return _IMP_isd.AtomicCrossLinkMSRestraint__get_as_binary(self)
5631 def _set_from_binary(self, p):
5632 r"""_set_from_binary(AtomicCrossLinkMSRestraint self, PyObject * p)"""
5633 return _IMP_isd.AtomicCrossLinkMSRestraint__set_from_binary(self, p)
5635 def __getstate__(self):
5636 p = self._get_as_binary()
5637 if len(self.__dict__) > 1:
5638 d = self.__dict__.copy()
5643 def __setstate__(self, p):
5644 if not hasattr(self, 'this'):
5646 if isinstance(p, tuple):
5648 self.__dict__.update(d)
5649 return self._set_from_binary(p)
5652# Register AtomicCrossLinkMSRestraint in _IMP_isd:
5653_IMP_isd.AtomicCrossLinkMSRestraint_swigregister(AtomicCrossLinkMSRestraint)
5654class GaussianEMRestraint(IMP.Restraint):
5655 r"""Proxy of C++ IMP::isd::GaussianEMRestraint class."""
5657 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5659 def __init__(self, *args):
5661 __init__(GaussianEMRestraint self, Model mdl, IMP::ParticleIndexes model_ps, IMP::ParticleIndexes density_ps, ParticleIndex global_sigma, IMP::Float model_cutoff_dist, IMP::Float density_cutoff_dist, IMP::Float slope, bool update_model=True, bool backbone_slope=False, bool local=False, std::string name="GaussianEMRestraint%1%") -> GaussianEMRestraint
5662 __init__(GaussianEMRestraint self) -> GaussianEMRestraint
5664 _IMP_isd.GaussianEMRestraint_swiginit(self, _IMP_isd.new_GaussianEMRestraint(*args))
5666 def get_probability(self):
5667 r"""get_probability(GaussianEMRestraint self) -> double"""
5668 return _IMP_isd.GaussianEMRestraint_get_probability(self)
5670 def get_cross_correlation_coefficient(self):
5671 r"""get_cross_correlation_coefficient(GaussianEMRestraint self) -> double"""
5672 return _IMP_isd.GaussianEMRestraint_get_cross_correlation_coefficient(self)
5674 def set_density_filename(self, density_fn):
5675 r"""set_density_filename(GaussianEMRestraint self, std::string density_fn)"""
5676 return _IMP_isd.GaussianEMRestraint_set_density_filename(self, density_fn)
5678 def compute_initial_scores(self):
5679 r"""compute_initial_scores(GaussianEMRestraint self)"""
5680 return _IMP_isd.GaussianEMRestraint_compute_initial_scores(self)
5682 def set_slope(self, s):
5683 r"""set_slope(GaussianEMRestraint self, IMP::Float s)"""
5684 return _IMP_isd.GaussianEMRestraint_set_slope(self, s)
5686 def get_slope(self):
5687 r"""get_slope(GaussianEMRestraint self) -> IMP::Float"""
5688 return _IMP_isd.GaussianEMRestraint_get_slope(self)
5690 def get_model_particle_indexes(self):
5691 r"""get_model_particle_indexes(GaussianEMRestraint self) -> IMP::ParticleIndexes"""
5692 return _IMP_isd.GaussianEMRestraint_get_model_particle_indexes(self)
5694 def get_density_particle_indexes(self):
5695 r"""get_density_particle_indexes(GaussianEMRestraint self) -> IMP::ParticleIndexes"""
5696 return _IMP_isd.GaussianEMRestraint_get_density_particle_indexes(self)
5698 def get_slope_particle_indexes(self):
5699 r"""get_slope_particle_indexes(GaussianEMRestraint self) -> IMP::ParticleIndexes"""
5700 return _IMP_isd.GaussianEMRestraint_get_slope_particle_indexes(self)
5702 def get_model_cutoff_distance(self):
5703 r"""get_model_cutoff_distance(GaussianEMRestraint self) -> double"""
5704 return _IMP_isd.GaussianEMRestraint_get_model_cutoff_distance(self)
5706 def get_density_cutoff_distance(self):
5707 r"""get_density_cutoff_distance(GaussianEMRestraint self) -> double"""
5708 return _IMP_isd.GaussianEMRestraint_get_density_cutoff_distance(self)
5710 def get_is_local(self):
5711 r"""get_is_local(GaussianEMRestraint self) -> bool"""
5712 return _IMP_isd.GaussianEMRestraint_get_is_local(self)
5714 def get_density_density_score(self):
5715 r"""get_density_density_score(GaussianEMRestraint self) -> double"""
5716 return _IMP_isd.GaussianEMRestraint_get_density_density_score(self)
5718 def get_model_self_score(self):
5719 r"""get_model_self_score(GaussianEMRestraint self) -> double"""
5720 return _IMP_isd.GaussianEMRestraint_get_model_self_score(self)
5722 def do_get_inputs(self):
5723 r"""do_get_inputs(GaussianEMRestraint self) -> IMP::ModelObjectsTemp"""
5724 return _IMP_isd.GaussianEMRestraint_do_get_inputs(self)
5726 def show(self, out):
5727 r"""show(GaussianEMRestraint self, _ostream out)"""
5728 return _IMP_isd.GaussianEMRestraint_show(self, out)
5730 def get_version_info(self):
5731 r"""get_version_info(GaussianEMRestraint self) -> VersionInfo"""
5732 return _IMP_isd.GaussianEMRestraint_get_version_info(self)
5733 __swig_destroy__ = _IMP_isd.delete_GaussianEMRestraint
5736 r"""__str__(GaussianEMRestraint self) -> std::string"""
5737 return _IMP_isd.GaussianEMRestraint___str__(self)
5740 r"""__repr__(GaussianEMRestraint self) -> std::string"""
5741 return _IMP_isd.GaussianEMRestraint___repr__(self)
5745 return _object_cast_to_GaussianEMRestraint(o)
5748 def _get_as_binary(self):
5749 r"""_get_as_binary(GaussianEMRestraint self) -> PyObject *"""
5750 return _IMP_isd.GaussianEMRestraint__get_as_binary(self)
5752 def _set_from_binary(self, p):
5753 r"""_set_from_binary(GaussianEMRestraint self, PyObject * p)"""
5754 return _IMP_isd.GaussianEMRestraint__set_from_binary(self, p)
5756 def __getstate__(self):
5757 p = self._get_as_binary()
5758 if len(self.__dict__) > 1:
5759 d = self.__dict__.copy()
5764 def __setstate__(self, p):
5765 if not hasattr(self, 'this'):
5767 if isinstance(p, tuple):
5769 self.__dict__.update(d)
5770 return self._set_from_binary(p)
5773 def _get_jax(self, space):
5774 """Get a JAX implementation of this restraint.
5776 Unlike the C++ implementation, which uses close pair containers
5777 (which may contain some pairs up to the cutoff plus twice the
5778 slack), every model-model and model-density pair is considered
5779 here, and only those whose sphere distance is less than the
5780 cutoff are scored. Model Gaussian covariances are calculated
5781 from the current orientation of each Gaussian, so the score
5782 can also be differentiated with respect to orientation. Masses,
5783 variances, and density Gaussian covariances are assumed to
5786 Periodic boundary conditions are not supported, since EM
5787 density maps are not periodic."""
5790 import jax.numpy as jnp
5794 import IMP.core._jax_rigid
5795 from IMP.algebra.jax import _quaternion_to_rotation_matrix
5796 from IMP.isd._jax_util import get_gaussian_overlap
5798 if space is not IMP.jax.FreeSpace:
5799 raise NotImplementedError(
5800 "GaussianEMRestraint does not support periodic boundaries")
5802 m = self.get_model()
5804 def get_indexes(pis):
5805 return np.array([int(p) for p in pis], dtype=int)
5807 model_pis = self.get_model_particle_indexes()
5808 density_pis = self.get_density_particle_indexes()
5809 model_ps = get_indexes(model_pis)
5810 density_ps = get_indexes(density_pis)
5811 slope_ps = get_indexes(self.get_slope_particle_indexes())
5812 model_mass = np.array([IMP.atom.Mass(m, p).get_mass()
5813 for p in model_pis])
5814 density_mass = np.array([IMP.atom.Mass(m, p).get_mass()
5815 for p in density_pis])
5816 model_var = np.array([IMP.core.Gaussian(m, p).get_variances()
5817 for p in model_pis])
5818 density_covar = np.array(
5819 [np.asarray(IMP.core.Gaussian(m, p).get_global_covariance())
5820 for p in density_pis])
5821 # Each Gaussian is also a RigidBody; get the index into the
5822 # array of rigid body quaternions for each model Gaussian
5823 rb_from_particle = {
5824 int(p): i for (i, p) in enumerate(
5825 IMP.core._jax_rigid._get_rigid_body_indexes(m))}
5826 model_rbs = np.array([rb_from_particle[p] for p in model_ps],
5828 md_mass = model_mass[:, np.newaxis] * density_mass[np.newaxis, :]
5829 # Only score each model-model pair once (the score is doubled
5830 # below). These pairs never change, so use static indexes rather
5831 # than a mask so that only the needed overlaps are calculated.
5832 mm_i, mm_j = np.triu_indices(len(model_ps), k=1)
5833 mm_mass = model_mass[mm_i] * model_mass[mm_j]
5834 model_cutoff = self.get_model_cutoff_distance()
5835 density_cutoff = self.get_density_cutoff_distance()
5836 slope = self.get_slope()
5837 self_mm_score = self.get_model_self_score()
5838 local = self.get_is_local()
5840 # Precalculate all density-density overlaps; only those for
5841 # density particles near the model are used during scoring
5842 dxyz = np.array([IMP.core.XYZ(m, p).get_coordinates()
5843 for p in density_pis])
5844 dd_matrix = get_gaussian_overlap(
5845 dxyz[np.newaxis, :] - dxyz[:, np.newaxis],
5846 density_covar[:, np.newaxis] + density_covar[np.newaxis, :],
5847 density_mass[:, np.newaxis] * density_mass[np.newaxis, :],
5850 dd_score = self.get_density_density_score()
5852 def get_close_mask(dist, r1, r2, cutoff):
5853 """Get pairs whose sphere distance is less than cutoff"""
5854 return dist - r1[:, jnp.newaxis] - r2[jnp.newaxis, :] < cutoff
5856 def get_model_covariances(jm):
5857 quat = jm['rigid_bodies'].quaternion[model_rbs]
5858 # Note that this "rotation matrix" is the transpose of that
5859 # used in C++ (it is used to transform row vectors), so the
5860 # global covariance R diag(var) R^T is M^T diag(var) M
5861 rot = jax.vmap(_quaternion_to_rotation_matrix)(quat)
5862 return jnp.einsum('nji,nj,njk->nik', rot, model_var, rot)
5868 xd = xyz[density_ps]
5869 rm = radius[model_ps]
5870 rd = radius[density_ps]
5871 cm = get_model_covariances(jm)
5873 # Model-density overlap
5874 v_md = space.displacement(
5875 xd[jnp.newaxis, :] - xm[:, jnp.newaxis])
5876 ov_md = get_gaussian_overlap(
5877 v_md, cm[:, jnp.newaxis] + density_covar[jnp.newaxis, :],
5879 md_mask = get_close_mask(space.distance(v_md), rm, rd,
5881 md_score = jnp.sum(jnp.where(md_mask, ov_md, 0.))
5883 # Model-model overlap
5884 v_mm = space.displacement(xm[mm_j] - xm[mm_i])
5885 ov_mm = get_gaussian_overlap(v_mm, cm[mm_i] + cm[mm_j], mm_mass)
5886 mm_mask = (space.distance(v_mm) - rm[mm_i] - rm[mm_j]
5888 mm_score = self_mm_score + 2. * jnp.sum(
5889 jnp.where(mm_mask, ov_mm, 0.))
5891 # Density-density overlap
5893 # Only consider density particles near the model
5894 local_dens = jnp.any(md_mask, axis=0)
5895 dd = jnp.sum(jnp.where(
5896 local_dens[:, jnp.newaxis] & local_dens[jnp.newaxis, :],
5901 score = -jnp.log(2. * md_score / (mm_score + dd))
5903 # Clamp the distance so that the gradient is not NaN for
5904 # coincident model and density particles
5905 dist = space.distance(
5906 xyz[slope_ps][:, jnp.newaxis] - xd[jnp.newaxis, :],
5908 score = score + slope * jnp.sum(dist)
5911 return self._wrap_jax(jax_score, keys=['rigid_bodies'])
5914# Register GaussianEMRestraint in _IMP_isd:
5915_IMP_isd.GaussianEMRestraint_swigregister(GaussianEMRestraint)
5916class GaussianAnchorEMRestraint(ISDRestraint):
5917 r"""Proxy of C++ IMP::isd::GaussianAnchorEMRestraint class."""
5919 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5921 def __init__(self, *args):
5922 r"""__init__(GaussianAnchorEMRestraint self, IMP::ParticlesTemp model_ps, IMP::Floats model_sigs, IMP::Floats model_weights, IMP::ParticlesTemp density_ps, IMP::Floats density_sigs, IMP::Floats density_weights, Particle global_sigma, IMP::Float cutoff_dist, bool rigid, bool tabexp, std::string name="GaussianAnchorEMRestraint%1%") -> GaussianAnchorEMRestraint"""
5923 _IMP_isd.GaussianAnchorEMRestraint_swiginit(self, _IMP_isd.new_GaussianAnchorEMRestraint(*args))
5925 def get_density_particles(self):
5926 r"""get_density_particles(GaussianAnchorEMRestraint self) -> IMP::ParticlesTemp"""
5927 return _IMP_isd.GaussianAnchorEMRestraint_get_density_particles(self)
5928 __swig_destroy__ = _IMP_isd.delete_GaussianAnchorEMRestraint
5931 r"""__str__(GaussianAnchorEMRestraint self) -> std::string"""
5932 return _IMP_isd.GaussianAnchorEMRestraint___str__(self)
5935 r"""__repr__(GaussianAnchorEMRestraint self) -> std::string"""
5936 return _IMP_isd.GaussianAnchorEMRestraint___repr__(self)
5940 return _object_cast_to_GaussianAnchorEMRestraint(o)
5943# Register GaussianAnchorEMRestraint in _IMP_isd:
5944_IMP_isd.GaussianAnchorEMRestraint_swigregister(GaussianAnchorEMRestraint)
5945class GammaPrior(IMP.Restraint):
5946 r"""Proxy of C++ IMP::isd::GammaPrior class."""
5948 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5950 def __init__(self, *args):
5951 r"""__init__(GammaPrior self, Model m, Particle p, IMP::Float k, IMP::Float theta, std::string name="GammaPrior%1%") -> GammaPrior"""
5952 _IMP_isd.GammaPrior_swiginit(self, _IMP_isd.new_GammaPrior(*args))
5954 def evaluate_at(self, val):
5955 r"""evaluate_at(GammaPrior self, IMP::Float val) -> double"""
5956 return _IMP_isd.GammaPrior_evaluate_at(self, val)
5958 def do_get_inputs(self):
5959 r"""do_get_inputs(GammaPrior self) -> IMP::ModelObjectsTemp"""
5960 return _IMP_isd.GammaPrior_do_get_inputs(self)
5962 def get_version_info(self):
5963 r"""get_version_info(GammaPrior self) -> VersionInfo"""
5964 return _IMP_isd.GammaPrior_get_version_info(self)
5965 __swig_destroy__ = _IMP_isd.delete_GammaPrior
5967 def get_probability(self):
5968 r"""get_probability(GammaPrior self) -> double"""
5969 return _IMP_isd.GammaPrior_get_probability(self)
5972 r"""__str__(GammaPrior self) -> std::string"""
5973 return _IMP_isd.GammaPrior___str__(self)
5976 r"""__repr__(GammaPrior self) -> std::string"""
5977 return _IMP_isd.GammaPrior___repr__(self)
5981 return _object_cast_to_GammaPrior(o)
5984# Register GammaPrior in _IMP_isd:
5985_IMP_isd.GammaPrior_swigregister(GammaPrior)
5987def sample_points_from_density(dmap_orig, npoints, threshold=0.0):
5988 r"""sample_points_from_density(DensityMap dmap_orig, int npoints, IMP::Float threshold=0.0) -> IMP::FloatsList"""
5989 return _IMP_isd.sample_points_from_density(dmap_orig, npoints, threshold)
5990class ResidueProteinProximityRestraint(IMP.Restraint):
5991 r"""Proxy of C++ IMP::isd::ResidueProteinProximityRestraint class."""
5993 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5995 def __init__(self, *args):
5996 r"""__init__(ResidueProteinProximityRestraint self, Model m, double cutoff=6.0, double sigma=3.0, double xi=0.5, bool part_of_log_score=False, std::string name="ResidueProteinProximityRestraint_%1%") -> ResidueProteinProximityRestraint"""
5997 _IMP_isd.ResidueProteinProximityRestraint_swiginit(self, _IMP_isd.new_ResidueProteinProximityRestraint(*args))
5999 def add_pairs_container(self, pc):
6000 r"""add_pairs_container(ResidueProteinProximityRestraint self, PairContainer pc)"""
6001 return _IMP_isd.ResidueProteinProximityRestraint_add_pairs_container(self, pc)
6003 def add_contribution_particles(self, ppis1, ppis2):
6004 r"""add_contribution_particles(ResidueProteinProximityRestraint self, IMP::ParticleIndexes const ppis1, IMP::ParticleIndexes const ppis2)"""
6005 return _IMP_isd.ResidueProteinProximityRestraint_add_contribution_particles(self, ppis1, ppis2)
6007 def evaluate_for_contributions(self, c):
6008 r"""evaluate_for_contributions(ResidueProteinProximityRestraint self, IMP::Ints c) -> double"""
6009 return _IMP_isd.ResidueProteinProximityRestraint_evaluate_for_contributions(self, c)
6011 def get_number_of_contributions(self):
6012 r"""get_number_of_contributions(ResidueProteinProximityRestraint self) -> unsigned int"""
6013 return _IMP_isd.ResidueProteinProximityRestraint_get_number_of_contributions(self)
6015 def set_sigma(self, sigma):
6016 r"""set_sigma(ResidueProteinProximityRestraint self, double sigma)"""
6017 return _IMP_isd.ResidueProteinProximityRestraint_set_sigma(self, sigma)
6019 def set_cutoff(self, cutoff):
6020 r"""set_cutoff(ResidueProteinProximityRestraint self, double cutoff)"""
6021 return _IMP_isd.ResidueProteinProximityRestraint_set_cutoff(self, cutoff)
6023 def set_max_score(self, max_score):
6024 r"""set_max_score(ResidueProteinProximityRestraint self, double max_score)"""
6025 return _IMP_isd.ResidueProteinProximityRestraint_set_max_score(self, max_score)
6027 def set_yi(self, yi):
6028 r"""set_yi(ResidueProteinProximityRestraint self, double yi)"""
6029 return _IMP_isd.ResidueProteinProximityRestraint_set_yi(self, yi)
6031 def set_interpolation_factor(self, interpolation_factor):
6032 r"""set_interpolation_factor(ResidueProteinProximityRestraint self, double interpolation_factor)"""
6033 return _IMP_isd.ResidueProteinProximityRestraint_set_interpolation_factor(self, interpolation_factor)
6035 def set_part_of_log_score(self, hey):
6036 r"""set_part_of_log_score(ResidueProteinProximityRestraint self, bool hey)"""
6037 return _IMP_isd.ResidueProteinProximityRestraint_set_part_of_log_score(self, hey)
6039 def do_get_inputs(self):
6040 r"""do_get_inputs(ResidueProteinProximityRestraint self) -> IMP::ModelObjectsTemp"""
6041 return _IMP_isd.ResidueProteinProximityRestraint_do_get_inputs(self)
6043 def get_version_info(self):
6044 r"""get_version_info(ResidueProteinProximityRestraint self) -> VersionInfo"""
6045 return _IMP_isd.ResidueProteinProximityRestraint_get_version_info(self)
6046 __swig_destroy__ = _IMP_isd.delete_ResidueProteinProximityRestraint
6049 r"""__str__(ResidueProteinProximityRestraint self) -> std::string"""
6050 return _IMP_isd.ResidueProteinProximityRestraint___str__(self)
6053 r"""__repr__(ResidueProteinProximityRestraint self) -> std::string"""
6054 return _IMP_isd.ResidueProteinProximityRestraint___repr__(self)
6058 return _object_cast_to_ResidueProteinProximityRestraint(o)
6061# Register ResidueProteinProximityRestraint in _IMP_isd:
6062_IMP_isd.ResidueProteinProximityRestraint_swigregister(ResidueProteinProximityRestraint)
6064def _get_crosslink_jax_for_restraints(rs, space, forward_model):
6065 """Get a JAX function that scores the given list of crosslink
6066 restraints (CrossLinkMSRestraint or ExactCrossLinkMSRestraint),
6067 using the given forward model. They must all have the same length,
6068 slope and get_log_prob flag."""
6069 import jax.numpy as jnp
6071 def get_probability(xyz, r, scale, ps, sigma, psi, length,
6072 slope, segment_prod):
6073# If the residues are assigned to the same particle-domain
6074# get the distance as if the residue positions were randomly
6075# taken from within the sphere representing the domain
6076# Lund O, Protein Eng. 1997 Nov;10(11):1241-8.
6077# Let the space clamp the distance, so that the gradient is
6078# zero, rather than NaN, for coincident points and for
6079# same-particle contributions (which don't use the distance)
6081 ps[:, 0] == ps[:, 1], 36.0 / 35.0 * r[ps[:, 0]],
6082 space.distance(xyz[ps[:, 0]] - xyz[ps[:, 1]],
6084 dist = jnp.maximum(dist, 0.0001)
6086 sigmai = scale[sigma[:, 0]]
6087 sigmaj = scale[sigma[:, 1]]
6089 pofr = forward_model(dist, sigmai, sigmaj, length)
6090 term = psi * (1.0 - pofr) + pofr * (1.0 - psi)
6091 if slope is not None:
6092 prior = jnp.exp(-slope * dist)
6094 onemprob = 1.0 - term
6096 if segment_prod is None:
6097# If only one contribution to each restraint, we are done
6098 return 1.0 - onemprob
6100# Otherwise, take the product of all contributions to each
6102 return 1.0 - segment_prod(onemprob.T).T
6105 if r.get_is_length_variable():
6106 raise NotImplementedError("Only implemented for fixed-length")
6107 sigma = CrossLinkMSRestraint._get_contributions_sigma_numpy(rs)
6108 psi = CrossLinkMSRestraint._get_contributions_psi_numpy(rs)
6109 pis = CrossLinkMSRestraint._get_contributions_particles_numpy(rs)
6110 segments = CrossLinkMSRestraint._get_contributions_segments(rs)
6111 if segments is None:
6114# jax.ops.segment_prod is not differentiable, so use our own
6115 from IMP.isd._jax_util import get_segment_prod
6116 segment_prod = get_segment_prod(segments, len(rs))
6117 get_log_prob = rs[0].get_log_prob()
6118 length = rs[0].get_length()
6119 slope = rs[0].get_slope() if rs[0].get_has_slope() else None
6121 def jax_restraint(X):
6122 prob = get_probability(X['xyz'], X['r'], X['nuisance'], pis,
6123 sigma, psi, length, slope, segment_prod)
6125 return -jnp.log(prob)
6129# Note that we don't weight the restraint anywhere. This matches
6130# the behavior of the C++ restraint.
6131 return rs[0]._wrap_jax_multiple(rs[0], jax_restraint,
6132 keys=[Scale.get_scale_key()])
6135def _get_crosslink_jax_multiple(cls, restraints, space):
6136 """Get JAX functions for all restraints of type cls in the list"""
6137 import IMP._jax_util
6138# Get all groups of crosslink restraints that have the same length
6139# and slope (to 4 decimal places) and get_log_prob flag
6142 return ("%.4f" % r.get_length(),
6143 "%.4f" % r.get_slope() if r.get_has_slope() else None,
6145 groups, ungrouped = IMP._jax_util.get_grouped_restraints(
6148 return ([cls._get_jax_for_restraints(g, space) for g in groups],
6152def get_module_name():
6153 r"""get_module_name() -> std::string const"""
6154 return _IMP_isd.get_module_name()
6156def get_module_version():
6157 r"""get_module_version() -> std::string const"""
6158 return _IMP_isd.get_module_version()
6160def get_example_path(fname):
6161 r"""get_example_path(std::string fname) -> std::string"""
6162 return _IMP_isd.get_example_path(fname)
6164def get_data_path(fname):
6165 r"""get_data_path(std::string fname) -> std::string"""
6166 return _IMP_isd.get_data_path(fname)
6168from . import _version_check
6169_version_check.check_version(get_module_version())
6170__version__ = get_module_version()