IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
core/__init__.py
1# This file was automatically generated by SWIG (https://www.swig.org).
2# Version 4.5.1
3#
4# Do not make changes to this file unless you know what you are doing - modify
5# the SWIG interface file instead.
6
7
8# This wrapper is part of IMP,
9# Copyright 2007-2026 IMP Inventors. All rights reserved.
10
11
12
13import functools
14
15
16
17import typing
18import _IMP_core
19
20import builtins as __builtin__
21
22def _swig_repr(self):
23 try:
24 strthis = "proxy of " + self.this.__repr__()
25 except __builtin__.Exception:
26 strthis = ""
27 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
28
29
30def _swig_setattr_nondynamic_instance_variable(set):
31 def set_instance_attr(self, name, value):
32 if name == "this":
33 set(self, name, value)
34 elif name == "thisown":
35 self.this.own(value)
36 elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
37 set(self, name, value)
38 else:
39 raise AttributeError("You cannot add instance attributes to %s" % self)
40 return set_instance_attr
41
42
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):
46 set(cls, name, value)
47 else:
48 raise AttributeError("You cannot add class attributes to %s" % cls)
49 return set_class_attr
50
51
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__)
55
56
57import weakref
58
59class IMP_CORE_SwigPyIterator(object):
60 r"""Proxy of C++ swig::IMP_CORE_SwigPyIterator class."""
61
62 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
63
64 def __init__(self, *args, **kwargs):
65 raise AttributeError("No constructor defined - class is abstract")
66 __repr__ = _swig_repr
67 __swig_destroy__ = _IMP_core.delete_IMP_CORE_SwigPyIterator
68
69 def value(self):
70 r"""value(IMP_CORE_SwigPyIterator self) -> PyObject *"""
71 return _IMP_core.IMP_CORE_SwigPyIterator_value(self)
72
73 def incr(self, n=1):
74 r"""incr(IMP_CORE_SwigPyIterator self, size_t n=1) -> IMP_CORE_SwigPyIterator"""
75 return _IMP_core.IMP_CORE_SwigPyIterator_incr(self, n)
76
77 def decr(self, n=1):
78 r"""decr(IMP_CORE_SwigPyIterator self, size_t n=1) -> IMP_CORE_SwigPyIterator"""
79 return _IMP_core.IMP_CORE_SwigPyIterator_decr(self, n)
80
81 def distance(self, x):
82 r"""distance(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> ptrdiff_t"""
83 return _IMP_core.IMP_CORE_SwigPyIterator_distance(self, x)
84
85 def equal(self, x):
86 r"""equal(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> bool"""
87 return _IMP_core.IMP_CORE_SwigPyIterator_equal(self, x)
88
89 def copy(self):
90 r"""copy(IMP_CORE_SwigPyIterator self) -> IMP_CORE_SwigPyIterator"""
91 return _IMP_core.IMP_CORE_SwigPyIterator_copy(self)
92
93 def __next__(self):
94 r"""__next__(IMP_CORE_SwigPyIterator self) -> PyObject *"""
95 return _IMP_core.IMP_CORE_SwigPyIterator___next__(self)
96
97 def previous(self):
98 r"""previous(IMP_CORE_SwigPyIterator self) -> PyObject *"""
99 return _IMP_core.IMP_CORE_SwigPyIterator_previous(self)
100
101 def advance(self, n):
102 r"""advance(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator"""
103 return _IMP_core.IMP_CORE_SwigPyIterator_advance(self, n)
104
105 def __eq__(self, x):
106 r"""__eq__(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> bool"""
107 return _IMP_core.IMP_CORE_SwigPyIterator___eq__(self, x)
108
109 def __ne__(self, x):
110 r"""__ne__(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> bool"""
111 return _IMP_core.IMP_CORE_SwigPyIterator___ne__(self, x)
112
113 def __iadd__(self, n):
114 r"""__iadd__(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator"""
115 return _IMP_core.IMP_CORE_SwigPyIterator___iadd__(self, n)
116
117 def __isub__(self, n):
118 r"""__isub__(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator"""
119 return _IMP_core.IMP_CORE_SwigPyIterator___isub__(self, n)
120
121 def __add__(self, n):
122 r"""__add__(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator"""
123 return _IMP_core.IMP_CORE_SwigPyIterator___add__(self, n)
124
125 def __sub__(self, *args):
126 r"""
127 __sub__(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator
128 __sub__(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> ptrdiff_t
129 """
130 return _IMP_core.IMP_CORE_SwigPyIterator___sub__(self, *args)
131 def __iter__(self):
132 return self
133
134# Register IMP_CORE_SwigPyIterator in _IMP_core:
135_IMP_core.IMP_CORE_SwigPyIterator_swigregister(IMP_CORE_SwigPyIterator)
136
137_value_types=[]
138_object_types=[]
139_raii_types=[]
140_plural_types=[]
141
142IMP_DEBUG = _IMP_core.IMP_DEBUG
143
144IMP_RELEASE = _IMP_core.IMP_RELEASE
145
146IMP_SILENT = _IMP_core.IMP_SILENT
147
148IMP_PROGRESS = _IMP_core.IMP_PROGRESS
149
150IMP_TERSE = _IMP_core.IMP_TERSE
151
152IMP_VERBOSE = _IMP_core.IMP_VERBOSE
153
154IMP_MEMORY = _IMP_core.IMP_MEMORY
155
156IMP_NONE = _IMP_core.IMP_NONE
157
158IMP_USAGE = _IMP_core.IMP_USAGE
159
160IMP_INTERNAL = _IMP_core.IMP_INTERNAL
161
162IMP_KERNEL_HAS_LOG4CXX = _IMP_core.IMP_KERNEL_HAS_LOG4CXX
163
164IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_core.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
165
166IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_core.IMP_COMPILER_HAS_DEBUG_VECTOR
167
168IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_core.IMP_COMPILER_HAS_RANDOM_SHUFFLE
169
170IMP_COMPILER_HAS_THREE_WAY = _IMP_core.IMP_COMPILER_HAS_THREE_WAY
171
172IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_core.IMP_KERNEL_HAS_BOOST_RANDOM
173
174IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_core.IMP_KERNEL_HAS_BOOST_SYSTEM
175
176IMP_KERNEL_HAS_GPERFTOOLS = _IMP_core.IMP_KERNEL_HAS_GPERFTOOLS
177
178IMP_KERNEL_HAS_NUMPY = _IMP_core.IMP_KERNEL_HAS_NUMPY
179
180IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_core.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
181
182IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_core.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
183
184IMPKERNEL_SHOW_WARNINGS = _IMP_core.IMPKERNEL_SHOW_WARNINGS
185
186
187import sys
188class _DirectorObjects:
189 """@internal Simple class to keep references to director objects
190 to prevent premature deletion."""
191 def __init__(self):
192 self._objects = []
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)
198 def cleanup(self):
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)
207 self._objects = objs
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()
212
213class _ostream(object):
214 r"""Proxy of C++ std::ostream class."""
215
216 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
217
218 def __init__(self, *args, **kwargs):
219 raise AttributeError("No constructor defined")
220 __repr__ = _swig_repr
221
222 def write(self, osa_buf):
223 r"""write(_ostream self, char const * osa_buf)"""
224 return _IMP_core._ostream_write(self, osa_buf)
225
226# Register _ostream in _IMP_core:
227_IMP_core._ostream_swigregister(_ostream)
228IMP_C_OPEN_BINARY = _IMP_core.IMP_C_OPEN_BINARY
229
230import IMP
231IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_CGAL_HAS_BOOST_FILESYSTEM
232
233IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
234
235IMP_CGAL_HAS_BOOST_RANDOM = _IMP_core.IMP_CGAL_HAS_BOOST_RANDOM
236
237IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_core.IMP_CGAL_HAS_BOOST_SYSTEM
238
239IMP_CGAL_HAS_GPERFTOOLS = _IMP_core.IMP_CGAL_HAS_GPERFTOOLS
240
241IMP_CGAL_HAS_NUMPY = _IMP_core.IMP_CGAL_HAS_NUMPY
242
243IMPCGAL_SHOW_WARNINGS = _IMP_core.IMPCGAL_SHOW_WARNINGS
244
245import IMP.cgal
246IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_core.IMP_ALGEBRA_HAS_IMP_CGAL
247
248IMP_ALGEBRA_HAS_ANN = _IMP_core.IMP_ALGEBRA_HAS_ANN
249
250IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
251
252IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
253
254IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_core.IMP_ALGEBRA_HAS_BOOST_RANDOM
255
256IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_core.IMP_ALGEBRA_HAS_BOOST_SYSTEM
257
258IMP_ALGEBRA_HAS_CGAL = _IMP_core.IMP_ALGEBRA_HAS_CGAL
259
260IMP_ALGEBRA_HAS_GPERFTOOLS = _IMP_core.IMP_ALGEBRA_HAS_GPERFTOOLS
261
262IMP_ALGEBRA_HAS_NUMPY = _IMP_core.IMP_ALGEBRA_HAS_NUMPY
263
264IMPALGEBRA_SHOW_WARNINGS = _IMP_core.IMPALGEBRA_SHOW_WARNINGS
265
266import IMP.algebra
267IMP_DISPLAY_HAS_IMP_CGAL = _IMP_core.IMP_DISPLAY_HAS_IMP_CGAL
268
269IMP_DISPLAY_HAS_ANN = _IMP_core.IMP_DISPLAY_HAS_ANN
270
271IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
272
273IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
274
275IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_core.IMP_DISPLAY_HAS_BOOST_RANDOM
276
277IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_core.IMP_DISPLAY_HAS_BOOST_SYSTEM
278
279IMP_DISPLAY_HAS_CGAL = _IMP_core.IMP_DISPLAY_HAS_CGAL
280
281IMP_DISPLAY_HAS_GPERFTOOLS = _IMP_core.IMP_DISPLAY_HAS_GPERFTOOLS
282
283IMP_DISPLAY_HAS_NUMPY = _IMP_core.IMP_DISPLAY_HAS_NUMPY
284
285IMPDISPLAY_SHOW_WARNINGS = _IMP_core.IMPDISPLAY_SHOW_WARNINGS
286
287import IMP.display
288IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_core.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
289
290IMP_SCORE_FUNCTOR_HAS_ANN = _IMP_core.IMP_SCORE_FUNCTOR_HAS_ANN
291
292IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
293
294IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
295
296IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
297
298IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
299
300IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_core.IMP_SCORE_FUNCTOR_HAS_CGAL
301
302IMP_SCORE_FUNCTOR_HAS_GPERFTOOLS = _IMP_core.IMP_SCORE_FUNCTOR_HAS_GPERFTOOLS
303
304IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_core.IMP_SCORE_FUNCTOR_HAS_HDF5
305
306IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_core.IMP_SCORE_FUNCTOR_HAS_NUMPY
307
308IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_core.IMPSCOREFUNCTOR_SHOW_WARNINGS
309
310import IMP.score_functor
311IMP_CORE_HAS_IMP_CGAL = _IMP_core.IMP_CORE_HAS_IMP_CGAL
312
313IMP_CORE_HAS_IMP_KERNEL = _IMP_core.IMP_CORE_HAS_IMP_KERNEL
314
315IMP_CORE_HAS_ANN = _IMP_core.IMP_CORE_HAS_ANN
316
317IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_CORE_HAS_BOOST_FILESYSTEM
318
319IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
320
321IMP_CORE_HAS_BOOST_RANDOM = _IMP_core.IMP_CORE_HAS_BOOST_RANDOM
322
323IMP_CORE_HAS_BOOST_SYSTEM = _IMP_core.IMP_CORE_HAS_BOOST_SYSTEM
324
325IMP_CORE_HAS_CGAL = _IMP_core.IMP_CORE_HAS_CGAL
326
327IMP_CORE_HAS_GPERFTOOLS = _IMP_core.IMP_CORE_HAS_GPERFTOOLS
328
329IMP_CORE_HAS_HDF5 = _IMP_core.IMP_CORE_HAS_HDF5
330
331IMP_CORE_HAS_NUMPY = _IMP_core.IMP_CORE_HAS_NUMPY
332
333IMPCORE_SHOW_WARNINGS = _IMP_core.IMPCORE_SHOW_WARNINGS
334
335class _OpenCubicSplineBase(IMP.UnaryFunction):
336 r"""Proxy of C++ IMP::score_functor::ScoreUnaryFunction< IMP::score_functor::OpenCubicSpline > class."""
337
338 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
339 __repr__ = _swig_repr
340
341 def __init__(self, *args):
342 r"""__init__(_OpenCubicSplineBase self, IMP::score_functor::OpenCubicSpline const & score, std::string name="UnaryFunction%1%") -> _OpenCubicSplineBase"""
343 _IMP_core._OpenCubicSplineBase_swiginit(self, _IMP_core.new__OpenCubicSplineBase(*args))
344
345 def get_version_info(self):
346 r"""get_version_info(_OpenCubicSplineBase self) -> VersionInfo"""
347 return _IMP_core._OpenCubicSplineBase_get_version_info(self)
348 __swig_destroy__ = _IMP_core.delete__OpenCubicSplineBase
349
350# Register _OpenCubicSplineBase in _IMP_core:
351_IMP_core._OpenCubicSplineBase_swigregister(_OpenCubicSplineBase)
352
353_object_types.append("MonteCarloMover")
354
355
356def _object_cast_to_MonteCarloMover(o):
357 r"""_object_cast_to_MonteCarloMover(Object o) -> MonteCarloMover"""
358 return _IMP_core._object_cast_to_MonteCarloMover(o)
359
360MonteCarloMoverResults=list
361_plural_types.append("MonteCarloMoverResults")
362_value_types.append("MonteCarloMoverResult")
363
364
365_object_types.append("AngleRestraint")
366
367
368def _object_cast_to_AngleRestraint(o):
369 r"""_object_cast_to_AngleRestraint(Object o) -> AngleRestraint"""
370 return _IMP_core._object_cast_to_AngleRestraint(o)
371
372_object_types.append("AngleTripletScore")
373
374
375def _object_cast_to_AngleTripletScore(o):
376 r"""_object_cast_to_AngleTripletScore(Object o) -> AngleTripletScore"""
377 return _IMP_core._object_cast_to_AngleTripletScore(o)
378
379_object_types.append("DihedralQuadScore")
380
381
382def _object_cast_to_DihedralQuadScore(o):
383 r"""_object_cast_to_DihedralQuadScore(Object o) -> DihedralQuadScore"""
384 return _IMP_core._object_cast_to_DihedralQuadScore(o)
385
386_object_types.append("AttributeSingletonScore")
387
388
389def _object_cast_to_AttributeSingletonScore(o):
390 r"""_object_cast_to_AttributeSingletonScore(Object o) -> AttributeSingletonScore"""
391 return _IMP_core._object_cast_to_AttributeSingletonScore(o)
392
393_object_types.append("BallMover")
394
395
396def _object_cast_to_BallMover(o):
397 r"""_object_cast_to_BallMover(Object o) -> BallMover"""
398 return _IMP_core._object_cast_to_BallMover(o)
399
400_object_types.append("SerialMover")
401
402
403def _object_cast_to_SerialMover(o):
404 r"""_object_cast_to_SerialMover(Object o) -> SerialMover"""
405 return _IMP_core._object_cast_to_SerialMover(o)
406
407_object_types.append("SubsetMover")
408
409
410def _object_cast_to_SubsetMover(o):
411 r"""_object_cast_to_SubsetMover(Object o) -> SubsetMover"""
412 return _IMP_core._object_cast_to_SubsetMover(o)
413
414_object_types.append("DirectionMover")
415
416
417def _object_cast_to_DirectionMover(o):
418 r"""_object_cast_to_DirectionMover(Object o) -> DirectionMover"""
419 return _IMP_core._object_cast_to_DirectionMover(o)
420
421_object_types.append("SurfaceMover")
422
423
424def _object_cast_to_SurfaceMover(o):
425 r"""_object_cast_to_SurfaceMover(Object o) -> SurfaceMover"""
426 return _IMP_core._object_cast_to_SurfaceMover(o)
427
428_object_types.append("BoundingBox3DSingletonScore")
429
430
431def _object_cast_to_BoundingBox3DSingletonScore(o):
432 r"""_object_cast_to_BoundingBox3DSingletonScore(Object o) -> BoundingBox3DSingletonScore"""
433 return _IMP_core._object_cast_to_BoundingBox3DSingletonScore(o)
434
435_object_types.append("BoundingSphere3DSingletonScore")
436
437
438def _object_cast_to_BoundingSphere3DSingletonScore(o):
439 r"""_object_cast_to_BoundingSphere3DSingletonScore(Object o) -> BoundingSphere3DSingletonScore"""
440 return _IMP_core._object_cast_to_BoundingSphere3DSingletonScore(o)
441
442_object_types.append("BoxSweepClosePairsFinder")
443
444
445def _object_cast_to_BoxSweepClosePairsFinder(o):
446 r"""_object_cast_to_BoxSweepClosePairsFinder(Object o) -> BoxSweepClosePairsFinder"""
447 return _IMP_core._object_cast_to_BoxSweepClosePairsFinder(o)
448
449_object_types.append("NearestNeighborsClosePairsFinder")
450
451
452def _object_cast_to_NearestNeighborsClosePairsFinder(o):
453 r"""_object_cast_to_NearestNeighborsClosePairsFinder(Object o) -> NearestNeighborsClosePairsFinder"""
454 return _IMP_core._object_cast_to_NearestNeighborsClosePairsFinder(o)
455
456_object_types.append("CentroidOfRefined")
457
458
459def _object_cast_to_CentroidOfRefined(o):
460 r"""_object_cast_to_CentroidOfRefined(Object o) -> CentroidOfRefined"""
461 return _IMP_core._object_cast_to_CentroidOfRefined(o)
462
463_object_types.append("ChecksScoreState")
464
465
466def _object_cast_to_ChecksScoreState(o):
467 r"""_object_cast_to_ChecksScoreState(Object o) -> ChecksScoreState"""
468 return _IMP_core._object_cast_to_ChecksScoreState(o)
469
470_object_types.append("ChildrenRefiner")
471
472
473def _object_cast_to_ChildrenRefiner(o):
474 r"""_object_cast_to_ChildrenRefiner(Object o) -> ChildrenRefiner"""
475 return _IMP_core._object_cast_to_ChildrenRefiner(o)
476
477_object_types.append("ClosePairsFinder")
478
479
480def _object_cast_to_ClosePairsFinder(o):
481 r"""_object_cast_to_ClosePairsFinder(Object o) -> ClosePairsFinder"""
482 return _IMP_core._object_cast_to_ClosePairsFinder(o)
483
484_object_types.append("ClosePairsPairScore")
485
486
487def _object_cast_to_ClosePairsPairScore(o):
488 r"""_object_cast_to_ClosePairsPairScore(Object o) -> ClosePairsPairScore"""
489 return _IMP_core._object_cast_to_ClosePairsPairScore(o)
490
491_object_types.append("ClosedCubicSpline")
492
493
494def _object_cast_to_ClosedCubicSpline(o):
495 r"""_object_cast_to_ClosedCubicSpline(Object o) -> ClosedCubicSpline"""
496 return _IMP_core._object_cast_to_ClosedCubicSpline(o)
497
498_object_types.append("ConjugateGradients")
499
500
501def _object_cast_to_ConjugateGradients(o):
502 r"""_object_cast_to_ConjugateGradients(Object o) -> ConjugateGradients"""
503 return _IMP_core._object_cast_to_ConjugateGradients(o)
504
505_object_types.append("ConnectivityRestraint")
506
507
508def _object_cast_to_ConnectivityRestraint(o):
509 r"""_object_cast_to_ConnectivityRestraint(Object o) -> ConnectivityRestraint"""
510 return _IMP_core._object_cast_to_ConnectivityRestraint(o)
511
512_object_types.append("ConstantRestraint")
513
514
515def _object_cast_to_ConstantRestraint(o):
516 r"""_object_cast_to_ConstantRestraint(Object o) -> ConstantRestraint"""
517 return _IMP_core._object_cast_to_ConstantRestraint(o)
518
519_object_types.append("Cosine")
520
521
522def _object_cast_to_Cosine(o):
523 r"""_object_cast_to_Cosine(Object o) -> Cosine"""
524 return _IMP_core._object_cast_to_Cosine(o)
525
526_object_types.append("CoverRefined")
527
528
529def _object_cast_to_CoverRefined(o):
530 r"""_object_cast_to_CoverRefined(Object o) -> CoverRefined"""
531 return _IMP_core._object_cast_to_CoverRefined(o)
532
533_object_types.append("DerivativesFromRefined")
534
535
536def _object_cast_to_DerivativesFromRefined(o):
537 r"""_object_cast_to_DerivativesFromRefined(Object o) -> DerivativesFromRefined"""
538 return _IMP_core._object_cast_to_DerivativesFromRefined(o)
539
540_object_types.append("DerivativesToRefined")
541
542
543def _object_cast_to_DerivativesToRefined(o):
544 r"""_object_cast_to_DerivativesToRefined(Object o) -> DerivativesToRefined"""
545 return _IMP_core._object_cast_to_DerivativesToRefined(o)
546
547_object_types.append("WeightedDerivativesToRefined")
548
549
550def _object_cast_to_WeightedDerivativesToRefined(o):
551 r"""_object_cast_to_WeightedDerivativesToRefined(Object o) -> IMP::core::WeightedDerivativesToRefined *"""
552 return _IMP_core._object_cast_to_WeightedDerivativesToRefined(o)
553
554_object_types.append("DiameterRestraint")
555
556
557def _object_cast_to_DiameterRestraint(o):
558 r"""_object_cast_to_DiameterRestraint(Object o) -> DiameterRestraint"""
559 return _IMP_core._object_cast_to_DiameterRestraint(o)
560
561_object_types.append("DihedralRestraint")
562
563
564def _object_cast_to_DihedralRestraint(o):
565 r"""_object_cast_to_DihedralRestraint(Object o) -> DihedralRestraint"""
566 return _IMP_core._object_cast_to_DihedralRestraint(o)
567
568_object_types.append("DistanceRestraint")
569
570
571def _object_cast_to_DistanceRestraint(o):
572 r"""_object_cast_to_DistanceRestraint(Object o) -> DistanceRestraint"""
573 return _IMP_core._object_cast_to_DistanceRestraint(o)
574
575_object_types.append("DistanceToSingletonScore")
576
577
578def _object_cast_to_DistanceToSingletonScore(o):
579 r"""_object_cast_to_DistanceToSingletonScore(Object o) -> DistanceToSingletonScore"""
580 return _IMP_core._object_cast_to_DistanceToSingletonScore(o)
581
582_object_types.append("ExcludedVolumeRestraint")
583
584
585def _object_cast_to_ExcludedVolumeRestraint(o):
586 r"""_object_cast_to_ExcludedVolumeRestraint(Object o) -> ExcludedVolumeRestraint"""
587 return _IMP_core._object_cast_to_ExcludedVolumeRestraint(o)
588
589_object_types.append("FixedRefiner")
590
591
592def _object_cast_to_FixedRefiner(o):
593 r"""_object_cast_to_FixedRefiner(Object o) -> FixedRefiner"""
594 return _IMP_core._object_cast_to_FixedRefiner(o)
595
596_object_types.append("GridClosePairsFinder")
597
598
599def _object_cast_to_GridClosePairsFinder(o):
600 r"""_object_cast_to_GridClosePairsFinder(Object o) -> GridClosePairsFinder"""
601 return _IMP_core._object_cast_to_GridClosePairsFinder(o)
602
603_object_types.append("Harmonic")
604
605
606def _object_cast_to_Harmonic(o):
607 r"""_object_cast_to_Harmonic(Object o) -> Harmonic"""
608 return _IMP_core._object_cast_to_Harmonic(o)
609
610_object_types.append("HarmonicWell")
611
612
613def _object_cast_to_HarmonicWell(o):
614 r"""_object_cast_to_HarmonicWell(Object o) -> HarmonicWell"""
615 return _IMP_core._object_cast_to_HarmonicWell(o)
616
617_object_types.append("HarmonicLowerBound")
618
619
620def _object_cast_to_HarmonicLowerBound(o):
621 r"""_object_cast_to_HarmonicLowerBound(Object o) -> HarmonicLowerBound"""
622 return _IMP_core._object_cast_to_HarmonicLowerBound(o)
623
624_object_types.append("HarmonicUpperBound")
625
626
627def _object_cast_to_HarmonicUpperBound(o):
628 r"""_object_cast_to_HarmonicUpperBound(Object o) -> HarmonicUpperBound"""
629 return _IMP_core._object_cast_to_HarmonicUpperBound(o)
630
631_object_types.append("HarmonicSphereDistancePairScore")
632
633
634def _object_cast_to_HarmonicSphereDistancePairScore(o):
635 r"""_object_cast_to_HarmonicSphereDistancePairScore(Object o) -> HarmonicSphereDistancePairScore"""
636 return _IMP_core._object_cast_to_HarmonicSphereDistancePairScore(o)
637
638_object_types.append("HarmonicUpperBoundSphereDistancePairScore")
639
640
641def _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o):
642 r"""_object_cast_to_HarmonicUpperBoundSphereDistancePairScore(Object o) -> HarmonicUpperBoundSphereDistancePairScore"""
643 return _IMP_core._object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
644
645_object_types.append("HarmonicUpperBoundSphereDiameterPairScore")
646
647
648def _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o):
649 r"""_object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(Object o) -> HarmonicUpperBoundSphereDiameterPairScore"""
650 return _IMP_core._object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
651
652_object_types.append("HarmonicSurfaceDistancePairScore")
653
654
655def _object_cast_to_HarmonicSurfaceDistancePairScore(o):
656 r"""_object_cast_to_HarmonicSurfaceDistancePairScore(Object o) -> HarmonicSurfaceDistancePairScore"""
657 return _IMP_core._object_cast_to_HarmonicSurfaceDistancePairScore(o)
658
659_object_types.append("HarmonicSurfaceHeightPairScore")
660
661
662def _object_cast_to_HarmonicSurfaceHeightPairScore(o):
663 r"""_object_cast_to_HarmonicSurfaceHeightPairScore(Object o) -> HarmonicSurfaceHeightPairScore"""
664 return _IMP_core._object_cast_to_HarmonicSurfaceHeightPairScore(o)
665
666_object_types.append("HarmonicSurfaceDepthPairScore")
667
668
669def _object_cast_to_HarmonicSurfaceDepthPairScore(o):
670 r"""_object_cast_to_HarmonicSurfaceDepthPairScore(Object o) -> HarmonicSurfaceDepthPairScore"""
671 return _IMP_core._object_cast_to_HarmonicSurfaceDepthPairScore(o)
672
673_object_types.append("WeightedSum")
674
675
676def _object_cast_to_WeightedSum(o):
677 r"""_object_cast_to_WeightedSum(Object o) -> WeightedSum"""
678 return _IMP_core._object_cast_to_WeightedSum(o)
679
680_object_types.append("WeightedSumOfExponential")
681
682
683def _object_cast_to_WeightedSumOfExponential(o):
684 r"""_object_cast_to_WeightedSumOfExponential(Object o) -> WeightedSumOfExponential"""
685 return _IMP_core._object_cast_to_WeightedSumOfExponential(o)
686
687_object_types.append("KClosePairsPairScore")
688
689
690def _object_cast_to_KClosePairsPairScore(o):
691 r"""_object_cast_to_KClosePairsPairScore(Object o) -> KClosePairsPairScore"""
692 return _IMP_core._object_cast_to_KClosePairsPairScore(o)
693
694_object_types.append("LeavesRefiner")
695
696
697def _object_cast_to_LeavesRefiner(o):
698 r"""_object_cast_to_LeavesRefiner(Object o) -> LeavesRefiner"""
699 return _IMP_core._object_cast_to_LeavesRefiner(o)
700
701_object_types.append("Linear")
702
703
704def _object_cast_to_Linear(o):
705 r"""_object_cast_to_Linear(Object o) -> Linear"""
706 return _IMP_core._object_cast_to_Linear(o)
707
708_object_types.append("LogNormalMover")
709
710
711def _object_cast_to_LogNormalMover(o):
712 r"""_object_cast_to_LogNormalMover(Object o) -> LogNormalMover"""
713 return _IMP_core._object_cast_to_LogNormalMover(o)
714
715_object_types.append("MCCGSampler")
716
717
718def _object_cast_to_MCCGSampler(o):
719 r"""_object_cast_to_MCCGSampler(Object o) -> MCCGSampler"""
720 return _IMP_core._object_cast_to_MCCGSampler(o)
721
722_object_types.append("MonteCarlo")
723
724
725def _object_cast_to_MonteCarlo(o):
726 r"""_object_cast_to_MonteCarlo(Object o) -> MonteCarlo"""
727 return _IMP_core._object_cast_to_MonteCarlo(o)
728
729_object_types.append("MonteCarloWithLocalOptimization")
730
731
732def _object_cast_to_MonteCarloWithLocalOptimization(o):
733 r"""_object_cast_to_MonteCarloWithLocalOptimization(Object o) -> MonteCarloWithLocalOptimization"""
734 return _IMP_core._object_cast_to_MonteCarloWithLocalOptimization(o)
735
736_object_types.append("MonteCarloWithBasinHopping")
737
738
739def _object_cast_to_MonteCarloWithBasinHopping(o):
740 r"""_object_cast_to_MonteCarloWithBasinHopping(Object o) -> MonteCarloWithBasinHopping"""
741 return _IMP_core._object_cast_to_MonteCarloWithBasinHopping(o)
742
743_object_types.append("MSConnectivityRestraint")
744
745
746def _object_cast_to_MSConnectivityRestraint(o):
747 r"""_object_cast_to_MSConnectivityRestraint(Object o) -> MSConnectivityRestraint"""
748 return _IMP_core._object_cast_to_MSConnectivityRestraint(o)
749
750_object_types.append("NeighborsTable")
751
752
753def _object_cast_to_NeighborsTable(o):
754 r"""_object_cast_to_NeighborsTable(Object o) -> NeighborsTable"""
755 return _IMP_core._object_cast_to_NeighborsTable(o)
756
757_object_types.append("NormalMover")
758
759
760def _object_cast_to_NormalMover(o):
761 r"""_object_cast_to_NormalMover(Object o) -> NormalMover"""
762 return _IMP_core._object_cast_to_NormalMover(o)
763
764_object_types.append("NormalizedSphereDistancePairScore")
765
766
767def _object_cast_to_NormalizedSphereDistancePairScore(o):
768 r"""_object_cast_to_NormalizedSphereDistancePairScore(Object o) -> NormalizedSphereDistancePairScore"""
769 return _IMP_core._object_cast_to_NormalizedSphereDistancePairScore(o)
770
771_object_types.append("OpenCubicSpline")
772
773
774def _object_cast_to_OpenCubicSpline(o):
775 r"""_object_cast_to_OpenCubicSpline(Object o) -> OpenCubicSpline"""
776 return _IMP_core._object_cast_to_OpenCubicSpline(o)
777
778_object_types.append("PairConstraint")
779
780
781def _object_cast_to_PairConstraint(o):
782 r"""_object_cast_to_PairConstraint(Object o) -> PairConstraint"""
783 return _IMP_core._object_cast_to_PairConstraint(o)
784
785_object_types.append("PairRestraint")
786
787
788def _object_cast_to_PairRestraint(o):
789 r"""_object_cast_to_PairRestraint(Object o) -> PairRestraint"""
790 return _IMP_core._object_cast_to_PairRestraint(o)
791
792_object_types.append("QuadConstraint")
793
794
795def _object_cast_to_QuadConstraint(o):
796 r"""_object_cast_to_QuadConstraint(Object o) -> QuadConstraint"""
797 return _IMP_core._object_cast_to_QuadConstraint(o)
798
799_object_types.append("QuadRestraint")
800
801
802def _object_cast_to_QuadRestraint(o):
803 r"""_object_cast_to_QuadRestraint(Object o) -> QuadRestraint"""
804 return _IMP_core._object_cast_to_QuadRestraint(o)
805
806_object_types.append("QuadraticClosePairsFinder")
807
808
809def _object_cast_to_QuadraticClosePairsFinder(o):
810 r"""_object_cast_to_QuadraticClosePairsFinder(Object o) -> QuadraticClosePairsFinder"""
811 return _IMP_core._object_cast_to_QuadraticClosePairsFinder(o)
812
813_object_types.append("RefinedPairsPairScore")
814
815
816def _object_cast_to_RefinedPairsPairScore(o):
817 r"""_object_cast_to_RefinedPairsPairScore(Object o) -> RefinedPairsPairScore"""
818 return _IMP_core._object_cast_to_RefinedPairsPairScore(o)
819
820_object_types.append("RestraintsScoringFunction")
821
822
823def _object_cast_to_RestraintsScoringFunction(o):
824 r"""_object_cast_to_RestraintsScoringFunction(Object o) -> RestraintsScoringFunction"""
825 return _IMP_core._object_cast_to_RestraintsScoringFunction(o)
826
827_object_types.append("RigidBodyDistancePairScore")
828
829
830def _object_cast_to_RigidBodyDistancePairScore(o):
831 r"""_object_cast_to_RigidBodyDistancePairScore(Object o) -> RigidBodyDistancePairScore"""
832 return _IMP_core._object_cast_to_RigidBodyDistancePairScore(o)
833
834_object_types.append("RigidBodyAnglePairScore")
835
836
837def _object_cast_to_RigidBodyAnglePairScore(o):
838 r"""_object_cast_to_RigidBodyAnglePairScore(Object o) -> RigidBodyAnglePairScore"""
839 return _IMP_core._object_cast_to_RigidBodyAnglePairScore(o)
840
841_object_types.append("RigidBodyMover")
842
843
844def _object_cast_to_RigidBodyMover(o):
845 r"""_object_cast_to_RigidBodyMover(Object o) -> RigidBodyMover"""
846 return _IMP_core._object_cast_to_RigidBodyMover(o)
847
848_object_types.append("RigidBodyTunneler")
849
850
851def _object_cast_to_RigidBodyTunneler(o):
852 r"""_object_cast_to_RigidBodyTunneler(Object o) -> RigidBodyTunneler"""
853 return _IMP_core._object_cast_to_RigidBodyTunneler(o)
854
855_object_types.append("RigidBodyUmbrella")
856
857
858def _object_cast_to_RigidBodyUmbrella(o):
859 r"""_object_cast_to_RigidBodyUmbrella(Object o) -> RigidBodyUmbrella"""
860 return _IMP_core._object_cast_to_RigidBodyUmbrella(o)
861
862_object_types.append("_UpdateRigidBodyMembers")
863
864
865def _object_cast_to__UpdateRigidBodyMembers(o):
866 r"""_object_cast_to__UpdateRigidBodyMembers(Object o) -> _UpdateRigidBodyMembers"""
867 return _IMP_core._object_cast_to__UpdateRigidBodyMembers(o)
868
869_object_types.append("_AccumulateRigidBodyDerivatives")
870
871
872def _object_cast_to__AccumulateRigidBodyDerivatives(o):
873 r"""_object_cast_to__AccumulateRigidBodyDerivatives(Object o) -> _AccumulateRigidBodyDerivatives"""
874 return _IMP_core._object_cast_to__AccumulateRigidBodyDerivatives(o)
875
876_object_types.append("_RigidBodyNormalizeConstraint")
877
878
879def _object_cast_to__RigidBodyNormalizeConstraint(o):
880 r"""_object_cast_to__RigidBodyNormalizeConstraint(Object o) -> _RigidBodyNormalizeConstraint"""
881 return _IMP_core._object_cast_to__RigidBodyNormalizeConstraint(o)
882
883_object_types.append("_NormalizeRotation")
884
885
886def _object_cast_to__NormalizeRotation(o):
887 r"""_object_cast_to__NormalizeRotation(Object o) -> _NormalizeRotation"""
888 return _IMP_core._object_cast_to__NormalizeRotation(o)
889
890_object_types.append("_RigidBodyPositionConstraint")
891
892
893def _object_cast_to__RigidBodyPositionConstraint(o):
894 r"""_object_cast_to__RigidBodyPositionConstraint(Object o) -> _RigidBodyPositionConstraint"""
895 return _IMP_core._object_cast_to__RigidBodyPositionConstraint(o)
896
897_object_types.append("RigidClosePairsFinder")
898
899
900def _object_cast_to_RigidClosePairsFinder(o):
901 r"""_object_cast_to_RigidClosePairsFinder(Object o) -> RigidClosePairsFinder"""
902 return _IMP_core._object_cast_to_RigidClosePairsFinder(o)
903
904_object_types.append("RigidMembersRefiner")
905
906
907def _object_cast_to_RigidMembersRefiner(o):
908 r"""_object_cast_to_RigidMembersRefiner(Object o) -> RigidMembersRefiner"""
909 return _IMP_core._object_cast_to_RigidMembersRefiner(o)
910
911_object_types.append("SingletonConstraint")
912
913
914def _object_cast_to_SingletonConstraint(o):
915 r"""_object_cast_to_SingletonConstraint(Object o) -> SingletonConstraint"""
916 return _IMP_core._object_cast_to_SingletonConstraint(o)
917
918_object_types.append("SingletonRestraint")
919
920
921def _object_cast_to_SingletonRestraint(o):
922 r"""_object_cast_to_SingletonRestraint(Object o) -> SingletonRestraint"""
923 return _IMP_core._object_cast_to_SingletonRestraint(o)
924
925_object_types.append("SoftSpherePairScore")
926
927
928def _object_cast_to_SoftSpherePairScore(o):
929 r"""_object_cast_to_SoftSpherePairScore(Object o) -> SoftSpherePairScore"""
930 return _IMP_core._object_cast_to_SoftSpherePairScore(o)
931
932_object_types.append("_SphereDistancePairScore")
933
934
935def _object_cast_to__SphereDistancePairScore(o):
936 r"""_object_cast_to__SphereDistancePairScore(Object o) -> _SphereDistancePairScore"""
937 return _IMP_core._object_cast_to__SphereDistancePairScore(o)
938
939_object_types.append("SphereDistanceToSingletonScore")
940
941
942def _object_cast_to_SphereDistanceToSingletonScore(o):
943 r"""_object_cast_to_SphereDistanceToSingletonScore(Object o) -> SphereDistanceToSingletonScore"""
944 return _IMP_core._object_cast_to_SphereDistanceToSingletonScore(o)
945
946_object_types.append("SoftSubSurfacePairScore")
947
948
949def _object_cast_to_SoftSubSurfacePairScore(o):
950 r"""_object_cast_to_SoftSubSurfacePairScore(Object o) -> SoftSubSurfacePairScore"""
951 return _IMP_core._object_cast_to_SoftSubSurfacePairScore(o)
952
953_object_types.append("SoftSuperSurfacePairScore")
954
955
956def _object_cast_to_SoftSuperSurfacePairScore(o):
957 r"""_object_cast_to_SoftSuperSurfacePairScore(Object o) -> SoftSuperSurfacePairScore"""
958 return _IMP_core._object_cast_to_SoftSuperSurfacePairScore(o)
959
960_object_types.append("SurfaceDistancePairScore")
961
962
963def _object_cast_to_SurfaceDistancePairScore(o):
964 r"""_object_cast_to_SurfaceDistancePairScore(Object o) -> SurfaceDistancePairScore"""
965 return _IMP_core._object_cast_to_SurfaceDistancePairScore(o)
966
967_object_types.append("SurfaceHeightPairScore")
968
969
970def _object_cast_to_SurfaceHeightPairScore(o):
971 r"""_object_cast_to_SurfaceHeightPairScore(Object o) -> SurfaceHeightPairScore"""
972 return _IMP_core._object_cast_to_SurfaceHeightPairScore(o)
973
974_object_types.append("SurfaceDepthPairScore")
975
976
977def _object_cast_to_SurfaceDepthPairScore(o):
978 r"""_object_cast_to_SurfaceDepthPairScore(Object o) -> SurfaceDepthPairScore"""
979 return _IMP_core._object_cast_to_SurfaceDepthPairScore(o)
980
981_object_types.append("SurfaceTetheredChain")
982
983
984def _object_cast_to_SurfaceTetheredChain(o):
985 r"""_object_cast_to_SurfaceTetheredChain(Object o) -> SurfaceTetheredChain"""
986 return _IMP_core._object_cast_to_SurfaceTetheredChain(o)
987
988_object_types.append("SurfaceSymmetryConstraint")
989
990
991def _object_cast_to_SurfaceSymmetryConstraint(o):
992 r"""_object_cast_to_SurfaceSymmetryConstraint(Object o) -> SurfaceSymmetryConstraint"""
993 return _IMP_core._object_cast_to_SurfaceSymmetryConstraint(o)
994
995_object_types.append("SteepestDescent")
996
997
998def _object_cast_to_SteepestDescent(o):
999 r"""_object_cast_to_SteepestDescent(Object o) -> SteepestDescent"""
1000 return _IMP_core._object_cast_to_SteepestDescent(o)
1001
1002_object_types.append("TableRefiner")
1003
1004
1005def _object_cast_to_TableRefiner(o):
1006 r"""_object_cast_to_TableRefiner(Object o) -> TableRefiner"""
1007 return _IMP_core._object_cast_to_TableRefiner(o)
1008
1009_object_types.append("Transform")
1010
1011
1012def _object_cast_to_Transform(o):
1013 r"""_object_cast_to_Transform(Object o) -> Transform"""
1014 return _IMP_core._object_cast_to_Transform(o)
1015
1016_object_types.append("TransformationAndReflectionSymmetry")
1017
1018
1019def _object_cast_to_TransformationAndReflectionSymmetry(o):
1020 r"""_object_cast_to_TransformationAndReflectionSymmetry(Object o) -> TransformationAndReflectionSymmetry"""
1021 return _IMP_core._object_cast_to_TransformationAndReflectionSymmetry(o)
1022
1023_object_types.append("TransformationSymmetry")
1024
1025
1026def _object_cast_to_TransformationSymmetry(o):
1027 r"""_object_cast_to_TransformationSymmetry(Object o) -> TransformationSymmetry"""
1028 return _IMP_core._object_cast_to_TransformationSymmetry(o)
1029
1030_object_types.append("TransformationSymmetryMover")
1031
1032
1033def _object_cast_to_TransformationSymmetryMover(o):
1034 r"""_object_cast_to_TransformationSymmetryMover(Object o) -> TransformationSymmetryMover"""
1035 return _IMP_core._object_cast_to_TransformationSymmetryMover(o)
1036
1037_object_types.append("TransformedDistancePairScore")
1038
1039
1040def _object_cast_to_TransformedDistancePairScore(o):
1041 r"""_object_cast_to_TransformedDistancePairScore(Object o) -> TransformedDistancePairScore"""
1042 return _IMP_core._object_cast_to_TransformedDistancePairScore(o)
1043
1044_object_types.append("TripletConstraint")
1045
1046
1047def _object_cast_to_TripletConstraint(o):
1048 r"""_object_cast_to_TripletConstraint(Object o) -> TripletConstraint"""
1049 return _IMP_core._object_cast_to_TripletConstraint(o)
1050
1051_object_types.append("TripletRestraint")
1052
1053
1054def _object_cast_to_TripletRestraint(o):
1055 r"""_object_cast_to_TripletRestraint(Object o) -> TripletRestraint"""
1056 return _IMP_core._object_cast_to_TripletRestraint(o)
1057
1058_object_types.append("TypedPairScore")
1059
1060
1061def _object_cast_to_TypedPairScore(o):
1062 r"""_object_cast_to_TypedPairScore(Object o) -> TypedPairScore"""
1063 return _IMP_core._object_cast_to_TypedPairScore(o)
1064
1065_object_types.append("VolumeRestraint")
1066
1067
1068def _object_cast_to_VolumeRestraint(o):
1069 r"""_object_cast_to_VolumeRestraint(Object o) -> VolumeRestraint"""
1070 return _IMP_core._object_cast_to_VolumeRestraint(o)
1071
1072_object_types.append("WeightedSphereDistancePairScore")
1073
1074
1075def _object_cast_to_WeightedSphereDistancePairScore(o):
1076 r"""_object_cast_to_WeightedSphereDistancePairScore(Object o) -> WeightedSphereDistancePairScore"""
1077 return _IMP_core._object_cast_to_WeightedSphereDistancePairScore(o)
1078
1079_object_types.append("MoveStatisticsScoreState")
1080
1081
1082def _object_cast_to_MoveStatisticsScoreState(o):
1083 r"""_object_cast_to_MoveStatisticsScoreState(Object o) -> MoveStatisticsScoreState"""
1084 return _IMP_core._object_cast_to_MoveStatisticsScoreState(o)
1085
1086_object_types.append("MinimumRestraint")
1087
1088
1089def _object_cast_to_MinimumRestraint(o):
1090 r"""_object_cast_to_MinimumRestraint(Object o) -> MinimumRestraint"""
1091 return _IMP_core._object_cast_to_MinimumRestraint(o)
1092
1093_object_types.append("WriteRestraintScoresOptimizerState")
1094
1095
1096def _object_cast_to_WriteRestraintScoresOptimizerState(o):
1097 r"""_object_cast_to_WriteRestraintScoresOptimizerState(Object o) -> WriteRestraintScoresOptimizerState"""
1098 return _IMP_core._object_cast_to_WriteRestraintScoresOptimizerState(o)
1099
1100_object_types.append("LateralSurfaceConstraint")
1101
1102
1103def _object_cast_to_LateralSurfaceConstraint(o):
1104 r"""_object_cast_to_LateralSurfaceConstraint(Object o) -> LateralSurfaceConstraint"""
1105 return _IMP_core._object_cast_to_LateralSurfaceConstraint(o)
1106
1107_object_types.append("ConstantSingletonPredicate")
1108
1109
1110def _object_cast_to_ConstantSingletonPredicate(o):
1111 r"""_object_cast_to_ConstantSingletonPredicate(Object o) -> ConstantSingletonPredicate"""
1112 return _IMP_core._object_cast_to_ConstantSingletonPredicate(o)
1113
1114_object_types.append("ConstantPairPredicate")
1115
1116
1117def _object_cast_to_ConstantPairPredicate(o):
1118 r"""_object_cast_to_ConstantPairPredicate(Object o) -> ConstantPairPredicate"""
1119 return _IMP_core._object_cast_to_ConstantPairPredicate(o)
1120
1121_object_types.append("ConstantTripletPredicate")
1122
1123
1124def _object_cast_to_ConstantTripletPredicate(o):
1125 r"""_object_cast_to_ConstantTripletPredicate(Object o) -> ConstantTripletPredicate"""
1126 return _IMP_core._object_cast_to_ConstantTripletPredicate(o)
1127
1128_object_types.append("ConstantQuadPredicate")
1129
1130
1131def _object_cast_to_ConstantQuadPredicate(o):
1132 r"""_object_cast_to_ConstantQuadPredicate(Object o) -> ConstantQuadPredicate"""
1133 return _IMP_core._object_cast_to_ConstantQuadPredicate(o)
1134
1135_object_types.append("CoinFlipSingletonPredicate")
1136
1137
1138def _object_cast_to_CoinFlipSingletonPredicate(o):
1139 r"""_object_cast_to_CoinFlipSingletonPredicate(Object o) -> CoinFlipSingletonPredicate"""
1140 return _IMP_core._object_cast_to_CoinFlipSingletonPredicate(o)
1141
1142_object_types.append("CoinFlipPairPredicate")
1143
1144
1145def _object_cast_to_CoinFlipPairPredicate(o):
1146 r"""_object_cast_to_CoinFlipPairPredicate(Object o) -> CoinFlipPairPredicate"""
1147 return _IMP_core._object_cast_to_CoinFlipPairPredicate(o)
1148
1149_object_types.append("CoinFlipTripletPredicate")
1150
1151
1152def _object_cast_to_CoinFlipTripletPredicate(o):
1153 r"""_object_cast_to_CoinFlipTripletPredicate(Object o) -> CoinFlipTripletPredicate"""
1154 return _IMP_core._object_cast_to_CoinFlipTripletPredicate(o)
1155
1156_object_types.append("CoinFlipQuadPredicate")
1157
1158
1159def _object_cast_to_CoinFlipQuadPredicate(o):
1160 r"""_object_cast_to_CoinFlipQuadPredicate(Object o) -> CoinFlipQuadPredicate"""
1161 return _IMP_core._object_cast_to_CoinFlipQuadPredicate(o)
1162
1163_object_types.append("UnorderedTypeSingletonPredicate")
1164
1165
1166def _object_cast_to_UnorderedTypeSingletonPredicate(o):
1167 r"""_object_cast_to_UnorderedTypeSingletonPredicate(Object o) -> UnorderedTypeSingletonPredicate"""
1168 return _IMP_core._object_cast_to_UnorderedTypeSingletonPredicate(o)
1169
1170_object_types.append("UnorderedTypePairPredicate")
1171
1172
1173def _object_cast_to_UnorderedTypePairPredicate(o):
1174 r"""_object_cast_to_UnorderedTypePairPredicate(Object o) -> UnorderedTypePairPredicate"""
1175 return _IMP_core._object_cast_to_UnorderedTypePairPredicate(o)
1176
1177_object_types.append("UnorderedTypeTripletPredicate")
1178
1179
1180def _object_cast_to_UnorderedTypeTripletPredicate(o):
1181 r"""_object_cast_to_UnorderedTypeTripletPredicate(Object o) -> UnorderedTypeTripletPredicate"""
1182 return _IMP_core._object_cast_to_UnorderedTypeTripletPredicate(o)
1183
1184_object_types.append("UnorderedTypeQuadPredicate")
1185
1186
1187def _object_cast_to_UnorderedTypeQuadPredicate(o):
1188 r"""_object_cast_to_UnorderedTypeQuadPredicate(Object o) -> UnorderedTypeQuadPredicate"""
1189 return _IMP_core._object_cast_to_UnorderedTypeQuadPredicate(o)
1190
1191_object_types.append("OrderedTypeSingletonPredicate")
1192
1193
1194def _object_cast_to_OrderedTypeSingletonPredicate(o):
1195 r"""_object_cast_to_OrderedTypeSingletonPredicate(Object o) -> OrderedTypeSingletonPredicate"""
1196 return _IMP_core._object_cast_to_OrderedTypeSingletonPredicate(o)
1197
1198_object_types.append("OrderedTypePairPredicate")
1199
1200
1201def _object_cast_to_OrderedTypePairPredicate(o):
1202 r"""_object_cast_to_OrderedTypePairPredicate(Object o) -> OrderedTypePairPredicate"""
1203 return _IMP_core._object_cast_to_OrderedTypePairPredicate(o)
1204
1205_object_types.append("OrderedTypeTripletPredicate")
1206
1207
1208def _object_cast_to_OrderedTypeTripletPredicate(o):
1209 r"""_object_cast_to_OrderedTypeTripletPredicate(Object o) -> OrderedTypeTripletPredicate"""
1210 return _IMP_core._object_cast_to_OrderedTypeTripletPredicate(o)
1211
1212_object_types.append("OrderedTypeQuadPredicate")
1213
1214
1215def _object_cast_to_OrderedTypeQuadPredicate(o):
1216 r"""_object_cast_to_OrderedTypeQuadPredicate(Object o) -> OrderedTypeQuadPredicate"""
1217 return _IMP_core._object_cast_to_OrderedTypeQuadPredicate(o)
1218
1219_object_types.append("AllSameSingletonPredicate")
1220
1221
1222def _object_cast_to_AllSameSingletonPredicate(o):
1223 r"""_object_cast_to_AllSameSingletonPredicate(Object o) -> AllSameSingletonPredicate"""
1224 return _IMP_core._object_cast_to_AllSameSingletonPredicate(o)
1225
1226_object_types.append("AllSamePairPredicate")
1227
1228
1229def _object_cast_to_AllSamePairPredicate(o):
1230 r"""_object_cast_to_AllSamePairPredicate(Object o) -> AllSamePairPredicate"""
1231 return _IMP_core._object_cast_to_AllSamePairPredicate(o)
1232
1233_object_types.append("AllSameTripletPredicate")
1234
1235
1236def _object_cast_to_AllSameTripletPredicate(o):
1237 r"""_object_cast_to_AllSameTripletPredicate(Object o) -> AllSameTripletPredicate"""
1238 return _IMP_core._object_cast_to_AllSameTripletPredicate(o)
1239
1240_object_types.append("AllSameQuadPredicate")
1241
1242
1243def _object_cast_to_AllSameQuadPredicate(o):
1244 r"""_object_cast_to_AllSameQuadPredicate(Object o) -> AllSameQuadPredicate"""
1245 return _IMP_core._object_cast_to_AllSameQuadPredicate(o)
1246
1247def XYZs(l=[]):
1248 return [XYZ(x) for x in l]
1249_plural_types.append("XYZs")
1250
1251
1252_value_types.append("XYZ")
1253
1254
1255def XYZRs(l=[]):
1256 return [XYZR(x) for x in l]
1257_plural_types.append("XYZRs")
1258
1259
1260_value_types.append("XYZR")
1261
1262
1263def RigidBodies(l=[]):
1264 return [RigidBody(x) for x in l]
1265_plural_types.append("RigidBodies")
1266
1267
1268_value_types.append("RigidBody")
1269
1270
1271def RigidBodyMembers(l=[]):
1272 return [RigidBodyMember(x) for x in l]
1273_plural_types.append("RigidBodyMembers")
1274
1275
1276_value_types.append("RigidBodyMember")
1277
1278
1279def RigidMembers(l=[]):
1280 return [RigidMember(x) for x in l]
1281_plural_types.append("RigidMembers")
1282
1283
1284_value_types.append("RigidMember")
1285
1286
1287def NonRigidMembers(l=[]):
1288 return [NonRigidMember(x) for x in l]
1289_plural_types.append("NonRigidMembers")
1290
1291
1292_value_types.append("NonRigidMember")
1293
1294
1295def Centroids(l=[]):
1296 return [Centroid(x) for x in l]
1297_plural_types.append("Centroids")
1298
1299
1300_value_types.append("Centroid")
1301
1302
1303def Covers(l=[]):
1304 return [Cover(x) for x in l]
1305_plural_types.append("Covers")
1306
1307
1308_value_types.append("Cover")
1309
1310
1311def References(l=[]):
1312 return [Reference(x) for x in l]
1313_plural_types.append("References")
1314
1315
1316_value_types.append("Reference")
1317
1318
1319ParticleTypes=list
1320_plural_types.append("ParticleTypes")
1321_value_types.append("ParticleType")
1322
1323
1324def Typeds(l=[]):
1325 return [Typed(x) for x in l]
1326_plural_types.append("Typeds")
1327
1328
1329_value_types.append("Typed")
1330
1331
1332def GenericHierarchies(l=[]):
1333 return [Hierarchy(x) for x in l]
1334_plural_types.append("GenericHierarchies")
1335
1336
1337_value_types.append("Hierarchy")
1338
1339
1340def Gaussians(l=[]):
1341 return [Gaussian(x) for x in l]
1342_plural_types.append("Gaussians")
1343
1344
1345_value_types.append("Gaussian")
1346
1347
1348def Directions(l=[]):
1349 return [Direction(x) for x in l]
1350_plural_types.append("Directions")
1351
1352
1353_value_types.append("Direction")
1354
1355
1356def DirectionAngles(l=[]):
1357 return [DirectionAngle(x) for x in l]
1358_plural_types.append("DirectionAngles")
1359
1360
1361_value_types.append("DirectionAngle")
1362
1363
1364def Surfaces(l=[]):
1365 return [Surface(x) for x in l]
1366_plural_types.append("Surfaces")
1367
1368
1369_value_types.append("Surface")
1370
1371
1372def Provenances(l=[]):
1373 return [Provenance(x) for x in l]
1374_plural_types.append("Provenances")
1375
1376
1377_value_types.append("Provenance")
1378
1379
1380def StructureProvenances(l=[]):
1381 return [StructureProvenance(x) for x in l]
1382_plural_types.append("StructureProvenances")
1383
1384
1385_value_types.append("StructureProvenance")
1386
1387
1388def SampleProvenances(l=[]):
1389 return [SampleProvenance(x) for x in l]
1390_plural_types.append("SampleProvenances")
1391
1392
1393_value_types.append("SampleProvenance")
1394
1395
1396def ClusterProvenances(l=[]):
1397 return [ClusterProvenance(x) for x in l]
1398_plural_types.append("ClusterProvenances")
1399
1400
1401_value_types.append("ClusterProvenance")
1402
1403
1404def CombineProvenances(l=[]):
1405 return [CombineProvenance(x) for x in l]
1406_plural_types.append("CombineProvenances")
1407
1408
1409_value_types.append("CombineProvenance")
1410
1411
1412def FilterProvenances(l=[]):
1413 return [FilterProvenance(x) for x in l]
1414_plural_types.append("FilterProvenances")
1415
1416
1417_value_types.append("FilterProvenance")
1418
1419
1420def ScriptProvenances(l=[]):
1421 return [ScriptProvenance(x) for x in l]
1422_plural_types.append("ScriptProvenances")
1423
1424
1425_value_types.append("ScriptProvenance")
1426
1427
1428def SoftwareProvenances(l=[]):
1429 return [SoftwareProvenance(x) for x in l]
1430_plural_types.append("SoftwareProvenances")
1431
1432
1433_value_types.append("SoftwareProvenance")
1434
1435
1436def Provenanceds(l=[]):
1437 return [Provenanced(x) for x in l]
1438_plural_types.append("Provenanceds")
1439
1440
1441_value_types.append("Provenanced")
1442
1443
1444HierarchyCounters=list
1445_plural_types.append("HierarchyCounters")
1446_value_types.append("HierarchyCounter")
1447
1448
1449HierarchyTraitsList=list
1450_plural_types.append("HierarchyTraitsList")
1451_value_types.append("HierarchyTraits")
1452
1453
1454_object_types.append("TruncatedHarmonicBound")
1455
1456
1457def _object_cast_to_TruncatedHarmonicBound(o):
1458 r"""_object_cast_to_TruncatedHarmonicBound(Object o) -> TruncatedHarmonicBound"""
1459 return _IMP_core._object_cast_to_TruncatedHarmonicBound(o)
1460
1461_object_types.append("TruncatedHarmonicLowerBound")
1462
1463
1464def _object_cast_to_TruncatedHarmonicLowerBound(o):
1465 r"""_object_cast_to_TruncatedHarmonicLowerBound(Object o) -> TruncatedHarmonicLowerBound"""
1466 return _IMP_core._object_cast_to_TruncatedHarmonicLowerBound(o)
1467
1468_object_types.append("TruncatedHarmonicUpperBound")
1469
1470
1471def _object_cast_to_TruncatedHarmonicUpperBound(o):
1472 r"""_object_cast_to_TruncatedHarmonicUpperBound(Object o) -> TruncatedHarmonicUpperBound"""
1473 return _IMP_core._object_cast_to_TruncatedHarmonicUpperBound(o)
1474
1475_object_types.append("HarmonicDistancePairScore")
1476
1477
1478def _object_cast_to_HarmonicDistancePairScore(o):
1479 r"""_object_cast_to_HarmonicDistancePairScore(Object o) -> HarmonicDistancePairScore"""
1480 return _IMP_core._object_cast_to_HarmonicDistancePairScore(o)
1481
1482_object_types.append("DistancePairScore")
1483
1484
1485def _object_cast_to_DistancePairScore(o):
1486 r"""_object_cast_to_DistancePairScore(Object o) -> DistancePairScore"""
1487 return _IMP_core._object_cast_to_DistancePairScore(o)
1488
1489_object_types.append("XYZRGeometry")
1490
1491
1492def _object_cast_to_XYZRGeometry(o):
1493 r"""_object_cast_to_XYZRGeometry(Object o) -> XYZRGeometry"""
1494 return _IMP_core._object_cast_to_XYZRGeometry(o)
1495
1496_object_types.append("XYZRsGeometry")
1497
1498
1499def _object_cast_to_XYZRsGeometry(o):
1500 r"""_object_cast_to_XYZRsGeometry(Object o) -> XYZRsGeometry"""
1501 return _IMP_core._object_cast_to_XYZRsGeometry(o)
1502
1503_object_types.append("XYZDerivativeGeometry")
1504
1505
1506def _object_cast_to_XYZDerivativeGeometry(o):
1507 r"""_object_cast_to_XYZDerivativeGeometry(Object o) -> XYZDerivativeGeometry"""
1508 return _IMP_core._object_cast_to_XYZDerivativeGeometry(o)
1509
1510_object_types.append("XYZDerivativesGeometry")
1511
1512
1513def _object_cast_to_XYZDerivativesGeometry(o):
1514 r"""_object_cast_to_XYZDerivativesGeometry(Object o) -> XYZDerivativesGeometry"""
1515 return _IMP_core._object_cast_to_XYZDerivativesGeometry(o)
1516
1517_object_types.append("RigidBodyDerivativeGeometry")
1518
1519
1520def _object_cast_to_RigidBodyDerivativeGeometry(o):
1521 r"""_object_cast_to_RigidBodyDerivativeGeometry(Object o) -> RigidBodyDerivativeGeometry"""
1522 return _IMP_core._object_cast_to_RigidBodyDerivativeGeometry(o)
1523
1524_object_types.append("RigidBodyDerivativesGeometry")
1525
1526
1527def _object_cast_to_RigidBodyDerivativesGeometry(o):
1528 r"""_object_cast_to_RigidBodyDerivativesGeometry(Object o) -> RigidBodyDerivativesGeometry"""
1529 return _IMP_core._object_cast_to_RigidBodyDerivativesGeometry(o)
1530
1531_object_types.append("RigidBodyHierarchyGeometry")
1532
1533
1534def _object_cast_to_RigidBodyHierarchyGeometry(o):
1535 r"""_object_cast_to_RigidBodyHierarchyGeometry(Object o) -> RigidBodyHierarchyGeometry"""
1536 return _IMP_core._object_cast_to_RigidBodyHierarchyGeometry(o)
1537
1538_object_types.append("RigidBodyFrameGeometry")
1539
1540
1541def _object_cast_to_RigidBodyFrameGeometry(o):
1542 r"""_object_cast_to_RigidBodyFrameGeometry(Object o) -> RigidBodyFrameGeometry"""
1543 return _IMP_core._object_cast_to_RigidBodyFrameGeometry(o)
1544
1545_object_types.append("RigidBodyFramesGeometry")
1546
1547
1548def _object_cast_to_RigidBodyFramesGeometry(o):
1549 r"""_object_cast_to_RigidBodyFramesGeometry(Object o) -> RigidBodyFramesGeometry"""
1550 return _IMP_core._object_cast_to_RigidBodyFramesGeometry(o)
1551
1552_object_types.append("RigidBodyTorque")
1553
1554
1555def _object_cast_to_RigidBodyTorque(o):
1556 r"""_object_cast_to_RigidBodyTorque(Object o) -> RigidBodyTorque"""
1557 return _IMP_core._object_cast_to_RigidBodyTorque(o)
1558
1559_object_types.append("EdgePairGeometry")
1560
1561
1562def _object_cast_to_EdgePairGeometry(o):
1563 r"""_object_cast_to_EdgePairGeometry(Object o) -> EdgePairGeometry"""
1564 return _IMP_core._object_cast_to_EdgePairGeometry(o)
1565
1566_object_types.append("EdgePairsGeometry")
1567
1568
1569def _object_cast_to_EdgePairsGeometry(o):
1570 r"""_object_cast_to_EdgePairsGeometry(Object o) -> EdgePairsGeometry"""
1571 return _IMP_core._object_cast_to_EdgePairsGeometry(o)
1572
1573_object_types.append("SurfaceGeometry")
1574
1575
1576def _object_cast_to_SurfaceGeometry(o):
1577 r"""_object_cast_to_SurfaceGeometry(Object o) -> SurfaceGeometry"""
1578 return _IMP_core._object_cast_to_SurfaceGeometry(o)
1579
1580_object_types.append("SurfaceGeometryConstraint")
1581
1582
1583def _object_cast_to_SurfaceGeometryConstraint(o):
1584 r"""_object_cast_to_SurfaceGeometryConstraint(Object o) -> SurfaceGeometryConstraint"""
1585 return _IMP_core._object_cast_to_SurfaceGeometryConstraint(o)
1586
1587_object_types.append("AttributeSingletonPredicate")
1588
1589
1590def _object_cast_to_AttributeSingletonPredicate(o):
1591 r"""_object_cast_to_AttributeSingletonPredicate(Object o) -> AttributeSingletonPredicate"""
1592 return _IMP_core._object_cast_to_AttributeSingletonPredicate(o)
1593
1594_object_types.append("InBoundingBox3DSingletonPredicate")
1595
1596
1597def _object_cast_to_InBoundingBox3DSingletonPredicate(o):
1598 r"""_object_cast_to_InBoundingBox3DSingletonPredicate(Object o) -> InBoundingBox3DSingletonPredicate"""
1599 return _IMP_core._object_cast_to_InBoundingBox3DSingletonPredicate(o)
1600
1601_object_types.append("IsCollisionPairPredicate")
1602
1603
1604def _object_cast_to_IsCollisionPairPredicate(o):
1605 r"""_object_cast_to_IsCollisionPairPredicate(Object o) -> IsCollisionPairPredicate"""
1606 return _IMP_core._object_cast_to_IsCollisionPairPredicate(o)
1607
1608BinormalTermList=list
1609_plural_types.append("BinormalTermList")
1610_value_types.append("BinormalTerm")
1611
1612
1613_object_types.append("MultipleBinormalRestraint")
1614
1615
1616def _object_cast_to_MultipleBinormalRestraint(o):
1617 r"""_object_cast_to_MultipleBinormalRestraint(Object o) -> MultipleBinormalRestraint"""
1618 return _IMP_core._object_cast_to_MultipleBinormalRestraint(o)
1619class ClosePairsFinder(IMP._ParticleInputs, IMP.Object):
1620 r"""Proxy of C++ IMP::core::ClosePairsFinder class."""
1621
1622 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1623
1624 def __init__(self, *args, **kwargs):
1625 raise AttributeError("No constructor defined - class is abstract")
1626 __swig_destroy__ = _IMP_core.delete_ClosePairsFinder
1627
1628 def get_close_pairs(self, *args):
1629 r"""
1630 get_close_pairs(ClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
1631 get_close_pairs(ClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
1632 get_close_pairs(ClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
1633 get_close_pairs(ClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
1634 """
1635 return _IMP_core.ClosePairsFinder_get_close_pairs(self, *args)
1636
1637 def set_distance(self, d):
1638 r"""set_distance(ClosePairsFinder self, double d)"""
1639 return _IMP_core.ClosePairsFinder_set_distance(self, d)
1640
1641 def get_distance(self):
1642 r"""get_distance(ClosePairsFinder self) -> double"""
1643 return _IMP_core.ClosePairsFinder_get_distance(self)
1644 def __get_pair_filters(self): return IMP._list_util.VarList(getdimfunc=self.get_number_of_pair_filters, getfunc=self.get_pair_filter, erasefunc=self.erase_pair_filter, appendfunc=self.add_pair_filter, extendfunc=self.add_pair_filters, clearfunc=self.clear_pair_filters, indexfunc=self._python_index_pair_filter)
1645 def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
1646 def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
1647 pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
1648
1649 def remove_pair_filter(self, d):
1650 r"""remove_pair_filter(ClosePairsFinder self, PairPredicate d)"""
1651 return _IMP_core.ClosePairsFinder_remove_pair_filter(self, d)
1652
1653 def _python_index_pair_filter(self, d, start, stop):
1654 r"""_python_index_pair_filter(ClosePairsFinder self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
1655 return _IMP_core.ClosePairsFinder__python_index_pair_filter(self, d, start, stop)
1656
1657 def remove_pair_filters(self, d):
1658 r"""remove_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & d)"""
1659 return _IMP_core.ClosePairsFinder_remove_pair_filters(self, d)
1660
1661 def set_pair_filters(self, ps):
1662 r"""set_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & ps)"""
1663 return _IMP_core.ClosePairsFinder_set_pair_filters(self, ps)
1664
1665 def set_pair_filters_order(self, objs):
1666 r"""set_pair_filters_order(ClosePairsFinder self, IMP::PairPredicates const & objs)"""
1667 return _IMP_core.ClosePairsFinder_set_pair_filters_order(self, objs)
1668
1669 def add_pair_filter(self, obj):
1670 r"""add_pair_filter(ClosePairsFinder self, PairPredicate obj) -> unsigned int"""
1671 return _IMP_core.ClosePairsFinder_add_pair_filter(self, obj)
1672
1673 def add_pair_filters(self, objs):
1674 r"""add_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & objs)"""
1675 return _IMP_core.ClosePairsFinder_add_pair_filters(self, objs)
1676
1677 def clear_pair_filters(self):
1678 r"""clear_pair_filters(ClosePairsFinder self)"""
1679 return _IMP_core.ClosePairsFinder_clear_pair_filters(self)
1680
1681 def get_number_of_pair_filters(self):
1682 r"""get_number_of_pair_filters(ClosePairsFinder self) -> unsigned int"""
1683 return _IMP_core.ClosePairsFinder_get_number_of_pair_filters(self)
1684
1685 def get_has_pair_filters(self):
1686 r"""get_has_pair_filters(ClosePairsFinder self) -> bool"""
1687 return _IMP_core.ClosePairsFinder_get_has_pair_filters(self)
1688
1689 def get_pair_filter(self, i):
1690 r"""get_pair_filter(ClosePairsFinder self, unsigned int i) -> PairPredicate"""
1691 return _IMP_core.ClosePairsFinder_get_pair_filter(self, i)
1692
1693 def get_pair_filters(self):
1694 r"""get_pair_filters(ClosePairsFinder self) -> IMP::PairPredicates"""
1695 return _IMP_core.ClosePairsFinder_get_pair_filters(self)
1696
1697 def erase_pair_filter(self, i):
1698 r"""erase_pair_filter(ClosePairsFinder self, unsigned int i)"""
1699 return _IMP_core.ClosePairsFinder_erase_pair_filter(self, i)
1700
1701 def reserve_pair_filters(self, sz):
1702 r"""reserve_pair_filters(ClosePairsFinder self, unsigned int sz)"""
1703 return _IMP_core.ClosePairsFinder_reserve_pair_filters(self, sz)
1704
1705 def __str__(self):
1706 r"""__str__(ClosePairsFinder self) -> std::string"""
1707 return _IMP_core.ClosePairsFinder___str__(self)
1708
1709 def __repr__(self):
1710 r"""__repr__(ClosePairsFinder self) -> std::string"""
1711 return _IMP_core.ClosePairsFinder___repr__(self)
1712
1713 @staticmethod
1714 def get_from(o):
1715 return _object_cast_to_ClosePairsFinder(o)
1716
1717
1718# Register ClosePairsFinder in _IMP_core:
1719_IMP_core.ClosePairsFinder_swigregister(ClosePairsFinder)
1720class MonteCarloMoverResult(IMP._Value):
1721 r"""Proxy of C++ IMP::core::MonteCarloMoverResult class."""
1722
1723 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1724
1725 def __init__(self, *args):
1726 r"""__init__(MonteCarloMoverResult self, IMP::ParticleIndexes i0=IMP::ParticleIndexes(), double i1=double()) -> MonteCarloMoverResult"""
1727 _IMP_core.MonteCarloMoverResult_swiginit(self, _IMP_core.new_MonteCarloMoverResult(*args))
1728
1729 def __hash__(self):
1730 r"""__hash__(MonteCarloMoverResult self) -> std::size_t"""
1731 return _IMP_core.MonteCarloMoverResult___hash__(self)
1732
1733 def show(self, *args):
1734 r"""show(MonteCarloMoverResult self, _ostream out=std::cout)"""
1735 return _IMP_core.MonteCarloMoverResult_show(self, *args)
1736
1737 def __eq__(self, o):
1738 r"""__eq__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1739 return _IMP_core.MonteCarloMoverResult___eq__(self, o)
1740
1741 def __ne__(self, o):
1742 r"""__ne__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1743 return _IMP_core.MonteCarloMoverResult___ne__(self, o)
1744
1745 def __lt__(self, o):
1746 r"""__lt__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1747 return _IMP_core.MonteCarloMoverResult___lt__(self, o)
1748
1749 def __gt__(self, o):
1750 r"""__gt__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1751 return _IMP_core.MonteCarloMoverResult___gt__(self, o)
1752
1753 def __ge__(self, o):
1754 r"""__ge__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1755 return _IMP_core.MonteCarloMoverResult___ge__(self, o)
1756
1757 def __le__(self, o):
1758 r"""__le__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1759 return _IMP_core.MonteCarloMoverResult___le__(self, o)
1760
1761 def get_moved_particles(self):
1762 r"""get_moved_particles(MonteCarloMoverResult self) -> IMP::ParticleIndexes const &"""
1763 return _IMP_core.MonteCarloMoverResult_get_moved_particles(self)
1764
1765 def set_moved_particles(self, v):
1766 r"""set_moved_particles(MonteCarloMoverResult self, IMP::ParticleIndexes const & v)"""
1767 return _IMP_core.MonteCarloMoverResult_set_moved_particles(self, v)
1768
1769 def get_proposal_ratio(self):
1770 r"""get_proposal_ratio(MonteCarloMoverResult self) -> double const &"""
1771 return _IMP_core.MonteCarloMoverResult_get_proposal_ratio(self)
1772
1773 def set_proposal_ratio(self, v):
1774 r"""set_proposal_ratio(MonteCarloMoverResult self, double const & v)"""
1775 return _IMP_core.MonteCarloMoverResult_set_proposal_ratio(self, v)
1776
1777 def __str__(self):
1778 r"""__str__(MonteCarloMoverResult self) -> std::string"""
1779 return _IMP_core.MonteCarloMoverResult___str__(self)
1780
1781 def __repr__(self):
1782 r"""__repr__(MonteCarloMoverResult self) -> std::string"""
1783 return _IMP_core.MonteCarloMoverResult___repr__(self)
1784 __swig_destroy__ = _IMP_core.delete_MonteCarloMoverResult
1785
1786# Register MonteCarloMoverResult in _IMP_core:
1787_IMP_core.MonteCarloMoverResult_swigregister(MonteCarloMoverResult)
1788class MonteCarloMover(IMP.ModelObject):
1789 r"""Proxy of C++ IMP::core::MonteCarloMover class."""
1790
1791 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1792
1793 def __init__(self, *args):
1794 r"""
1795 __init__(MonteCarloMover self, Model m, std::string name) -> MonteCarloMover
1796 __init__(MonteCarloMover self) -> MonteCarloMover
1797 """
1798 if self.__class__ == MonteCarloMover:
1799 _self = None
1800 else:
1801 _self = self
1802 _IMP_core.MonteCarloMover_swiginit(self, _IMP_core.new_MonteCarloMover(_self, *args))
1803
1804 if self.__class__ != MonteCarloMover:
1805 _director_objects.register(self)
1806
1807
1808
1809
1810 def propose(self):
1811 r"""propose(MonteCarloMover self) -> MonteCarloMoverResult"""
1812 return _IMP_core.MonteCarloMover_propose(self)
1813
1814 def reject(self):
1815 r"""reject(MonteCarloMover self)"""
1816 return _IMP_core.MonteCarloMover_reject(self)
1817
1818 def accept(self):
1819 r"""accept(MonteCarloMover self)"""
1820 return _IMP_core.MonteCarloMover_accept(self)
1821
1822 def get_number_of_proposed(self):
1823 r"""get_number_of_proposed(MonteCarloMover self) -> unsigned int"""
1824 return _IMP_core.MonteCarloMover_get_number_of_proposed(self)
1825
1826 def get_number_of_accepted(self):
1827 r"""get_number_of_accepted(MonteCarloMover self) -> unsigned int"""
1828 return _IMP_core.MonteCarloMover_get_number_of_accepted(self)
1829
1830 def reset_statistics(self):
1831 r"""reset_statistics(MonteCarloMover self)"""
1832 return _IMP_core.MonteCarloMover_reset_statistics(self)
1833
1834 def add_to_statistics(self, num_proposed, num_rejected):
1835 r"""add_to_statistics(MonteCarloMover self, unsigned int num_proposed, unsigned int num_rejected)"""
1836 return _IMP_core.MonteCarloMover_add_to_statistics(self, num_proposed, num_rejected)
1837
1838 def do_propose(self):
1839 r"""do_propose(MonteCarloMover self) -> MonteCarloMoverResult"""
1840 return _IMP_core.MonteCarloMover_do_propose(self)
1841
1842 def do_reject(self):
1843 r"""do_reject(MonteCarloMover self)"""
1844 return _IMP_core.MonteCarloMover_do_reject(self)
1845
1846 def do_accept(self):
1847 r"""do_accept(MonteCarloMover self)"""
1848 return _IMP_core.MonteCarloMover_do_accept(self)
1849
1850 def do_get_outputs(self):
1851 r"""do_get_outputs(MonteCarloMover self) -> IMP::ModelObjectsTemp"""
1852 return _IMP_core.MonteCarloMover_do_get_outputs(self)
1853
1854 def __str__(self):
1855 r"""__str__(MonteCarloMover self) -> std::string"""
1856 return _IMP_core.MonteCarloMover___str__(self)
1857
1858 def __repr__(self):
1859 r"""__repr__(MonteCarloMover self) -> std::string"""
1860 return _IMP_core.MonteCarloMover___repr__(self)
1861
1862 @staticmethod
1863 def get_from(o):
1864 return _object_cast_to_MonteCarloMover(o)
1865
1866
1867 def do_show(self, out):
1868 pass
1869
1870 @staticmethod
1871 def get_from(o):
1872 return _object_cast_to_MonteCarloMover(o)
1873
1874
1875 def _get_jax(self, space):
1876 """Return a JAX implementation of this mover.
1877 Implement this method in a MonteCarloMover subclass to provide
1878 equivalent functionality using [JAX](https://docs.jax.dev/).
1879 See _wrap_jax for more information.
1880
1881 @param space The space in which the mover operates
1882 (e.g. a periodic box). See IMP._jax_util.Space.
1883 """
1884 raise NotImplementedError(f"No JAX implementation for {self}")
1885
1886 def _wrap_jax(self, init_func, propose_func, accept_func=None,
1887 sync_func=None, reset_stats_func=None, keys=None):
1888 """Create the return value for _get_jax.
1889 Use this method in _get_jax() to wrap the JAX functions
1890 with other mover-specific information.
1891
1892 @param init_func a JAX function which is used to initialize this
1893 mover. It is called with a single argument, a fresh JAX
1894 random key, and should return a persistent state object.
1895 This object may be the key itself, or any other Python object
1896 that JAX understands.
1897 @param propose_func a JAX function which is called with the current
1898 JAX Model and the mover's persistent state object.
1899 It should return a new JAX Model with the move applied,
1900 a new persistent state, and the proposal ratio. If the move
1901 is rejected then the new JAX Model will be discarded.
1902 However, the mover's persistent state is updated for both
1903 accepted and rejected moves.
1904 @param accept_func if provided, a JAX function which is called
1905 after each accepted Monte Carlo move, with the persistent
1906 state object. It should return a new persistent state.
1907 @param sync_func If provided, a Python function which is called
1908 at the end of a Monte Carlo sampling run to sync mover
1909 data back to IMP. It is called with the persistent state
1910 and the IMP Mover object.
1911 @param reset_stats_func If provided, a JAX function which is called
1912 at the beginning of a Monte Carlo run to reset this mover's
1913 statistics. It is called with the persistent state object and
1914 should return a new state.
1915 @param keys If given, a set of IMP::Key objects describing Model
1916 attributes (other than xyz and radius) that are altered
1917 by this mover.
1918 """
1919 from IMP.core._jax_util import JAXMoverInfo
1920 return JAXMoverInfo(init_func, propose_func, accept_func, sync_func,
1921 reset_stats_func, keys)
1922
1923 __swig_destroy__ = _IMP_core.delete_MonteCarloMover
1924 def __disown__(self):
1925 self.this.disown()
1926 _IMP_core.disown_MonteCarloMover(self)
1927 return weakref.proxy(self)
1928
1929 def do_destroy(self):
1930 r"""do_destroy(MonteCarloMover self)"""
1931 return _IMP_core.MonteCarloMover_do_destroy(self)
1932
1933 def handle_set_has_required_score_states(self, arg0):
1934 r"""handle_set_has_required_score_states(MonteCarloMover self, bool arg0)"""
1935 return _IMP_core.MonteCarloMover_handle_set_has_required_score_states(self, arg0)
1936
1937 def do_get_inputs(self):
1938 r"""do_get_inputs(MonteCarloMover self) -> IMP::ModelObjectsTemp"""
1939 return _IMP_core.MonteCarloMover_do_get_inputs(self)
1940
1941 def do_get_interactions(self):
1942 r"""do_get_interactions(MonteCarloMover self) -> IMP::ModelObjectsTemps"""
1943 return _IMP_core.MonteCarloMover_do_get_interactions(self)
1944
1945# Register MonteCarloMover in _IMP_core:
1946_IMP_core.MonteCarloMover_swigregister(MonteCarloMover)
1947class XYZ(IMP.Decorator):
1948 r"""Proxy of C++ IMP::core::XYZ class."""
1949
1950 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1951
1952 @staticmethod
1953 def get_coordinate_key(i):
1954 r"""get_coordinate_key(unsigned int i) -> FloatKey"""
1955 return _IMP_core.XYZ_get_coordinate_key(i)
1956
1957 def __init__(self, *args):
1958 r"""
1959 __init__(XYZ self) -> XYZ
1960 __init__(XYZ self, Model m, ParticleIndex id) -> XYZ
1961 __init__(XYZ self, _ParticleAdaptor d) -> XYZ
1962 """
1963 _IMP_core.XYZ_swiginit(self, _IMP_core.new_XYZ(*args))
1964
1965 def show(self, *args):
1966 r"""show(XYZ self, _ostream out=std::cout)"""
1967 return _IMP_core.XYZ_show(self, *args)
1968
1969 @staticmethod
1970 def setup_particle(*args):
1971 r"""
1972 setup_particle(Model m, ParticleIndex pi) -> XYZ
1973 setup_particle(_ParticleAdaptor pa) -> XYZ
1974 setup_particle(Model m, ParticleIndex pi, Vector3D v) -> XYZ
1975 setup_particle(_ParticleAdaptor pa, Vector3D v) -> XYZ
1976 """
1977 return _IMP_core.XYZ_setup_particle(*args)
1978
1979 def get_x(self):
1980 r"""get_x(XYZ self) -> IMP::Float"""
1981 return _IMP_core.XYZ_get_x(self)
1982
1983 def set_x(self, t):
1984 r"""set_x(XYZ self, IMP::Float t)"""
1985 return _IMP_core.XYZ_set_x(self, t)
1986
1987 def get_y(self):
1988 r"""get_y(XYZ self) -> IMP::Float"""
1989 return _IMP_core.XYZ_get_y(self)
1990
1991 def set_y(self, t):
1992 r"""set_y(XYZ self, IMP::Float t)"""
1993 return _IMP_core.XYZ_set_y(self, t)
1994
1995 def get_z(self):
1996 r"""get_z(XYZ self) -> IMP::Float"""
1997 return _IMP_core.XYZ_get_z(self)
1998
1999 def set_z(self, t):
2000 r"""set_z(XYZ self, IMP::Float t)"""
2001 return _IMP_core.XYZ_set_z(self, t)
2002
2003 def set_coordinate(self, i, v):
2004 r"""set_coordinate(XYZ self, unsigned int i, IMP::Float v)"""
2005 return _IMP_core.XYZ_set_coordinate(self, i, v)
2006
2007 def set_coordinates(self, v):
2008 r"""set_coordinates(XYZ self, Vector3D v)"""
2009 return _IMP_core.XYZ_set_coordinates(self, v)
2010
2011 def get_coordinate(self, i):
2012 r"""get_coordinate(XYZ self, int i) -> IMP::Float"""
2013 return _IMP_core.XYZ_get_coordinate(self, i)
2014
2015 def add_to_derivatives(self, v, d):
2016 r"""add_to_derivatives(XYZ self, Vector3D v, DerivativeAccumulator d)"""
2017 return _IMP_core.XYZ_add_to_derivatives(self, v, d)
2018
2019 def get_coordinates_are_optimized(self):
2020 r"""get_coordinates_are_optimized(XYZ self) -> bool"""
2021 return _IMP_core.XYZ_get_coordinates_are_optimized(self)
2022
2023 def set_coordinates_are_optimized(self, tf):
2024 r"""set_coordinates_are_optimized(XYZ self, bool tf)"""
2025 return _IMP_core.XYZ_set_coordinates_are_optimized(self, tf)
2026
2027 def get_vector_to(self, b):
2028 r"""get_vector_to(XYZ self, XYZ b) -> Vector3D"""
2029 return _IMP_core.XYZ_get_vector_to(self, b)
2030
2031 def get_coordinates(self):
2032 r"""get_coordinates(XYZ self) -> Vector3D"""
2033 return _IMP_core.XYZ_get_coordinates(self)
2034
2035 def get_derivatives(self):
2036 r"""get_derivatives(XYZ self) -> Vector3D"""
2037 return _IMP_core.XYZ_get_derivatives(self)
2038
2039 @staticmethod
2040 def get_is_setup(*args):
2041 r"""
2042 get_is_setup(_ParticleAdaptor p) -> bool
2043 get_is_setup(Model m, ParticleIndex pi) -> bool
2044 """
2045 return _IMP_core.XYZ_get_is_setup(*args)
2046
2047 @staticmethod
2048 def get_xyz_keys():
2049 r"""get_xyz_keys() -> IMP::FloatKeys const &"""
2050 return _IMP_core.XYZ_get_xyz_keys()
2051
2052 def add_attribute(self, *args):
2053 r"""
2054 add_attribute(XYZ self, FloatKey k, IMP::Float v, bool opt)
2055 add_attribute(XYZ self, FloatKey a0, IMP::Float a1)
2056 add_attribute(XYZ self, IntKey a0, IMP::Int a1)
2057 add_attribute(XYZ self, FloatsKey a0, IMP::Floats a1)
2058 add_attribute(XYZ self, IntsKey a0, IMP::Ints a1)
2059 add_attribute(XYZ self, StringKey a0, IMP::String a1)
2060 add_attribute(XYZ self, ParticleIndexKey a0, Particle a1)
2061 add_attribute(XYZ self, ObjectKey a0, Object a1)
2062 add_attribute(XYZ self, SparseFloatKey a0, IMP::Float a1)
2063 add_attribute(XYZ self, SparseIntKey a0, IMP::Int a1)
2064 add_attribute(XYZ self, SparseStringKey a0, IMP::String a1)
2065 add_attribute(XYZ self, SparseParticleIndexKey a0, ParticleIndex a1)
2066 """
2067 return _IMP_core.XYZ_add_attribute(self, *args)
2068
2069 def get_value(self, *args):
2070 r"""
2071 get_value(XYZ self, FloatKey a0) -> IMP::Float
2072 get_value(XYZ self, IntKey a0) -> IMP::Int
2073 get_value(XYZ self, FloatsKey a0) -> IMP::Floats
2074 get_value(XYZ self, IntsKey a0) -> IMP::Ints
2075 get_value(XYZ self, StringKey a0) -> IMP::String
2076 get_value(XYZ self, ParticleIndexKey a0) -> Particle
2077 get_value(XYZ self, ObjectKey a0) -> Object
2078 get_value(XYZ self, SparseFloatKey a0) -> IMP::Float
2079 get_value(XYZ self, SparseIntKey a0) -> IMP::Int
2080 get_value(XYZ self, SparseStringKey a0) -> IMP::String
2081 get_value(XYZ self, SparseParticleIndexKey a0) -> ParticleIndex
2082 """
2083 return _IMP_core.XYZ_get_value(self, *args)
2084
2085 def set_value(self, *args):
2086 r"""
2087 set_value(XYZ self, FloatKey a0, IMP::Float a1)
2088 set_value(XYZ self, IntKey a0, IMP::Int a1)
2089 set_value(XYZ self, FloatsKey a0, IMP::Floats a1)
2090 set_value(XYZ self, IntsKey a0, IMP::Ints a1)
2091 set_value(XYZ self, StringKey a0, IMP::String a1)
2092 set_value(XYZ self, ParticleIndexKey a0, Particle a1)
2093 set_value(XYZ self, ObjectKey a0, Object a1)
2094 set_value(XYZ self, SparseFloatKey a0, IMP::Float a1)
2095 set_value(XYZ self, SparseIntKey a0, IMP::Int a1)
2096 set_value(XYZ self, SparseStringKey a0, IMP::String a1)
2097 set_value(XYZ self, SparseParticleIndexKey a0, ParticleIndex a1)
2098 """
2099 return _IMP_core.XYZ_set_value(self, *args)
2100
2101 def remove_attribute(self, *args):
2102 r"""
2103 remove_attribute(XYZ self, FloatKey a0)
2104 remove_attribute(XYZ self, IntKey a0)
2105 remove_attribute(XYZ self, FloatsKey a0)
2106 remove_attribute(XYZ self, IntsKey a0)
2107 remove_attribute(XYZ self, StringKey a0)
2108 remove_attribute(XYZ self, ParticleIndexKey a0)
2109 remove_attribute(XYZ self, ObjectKey a0)
2110 remove_attribute(XYZ self, SparseFloatKey a0)
2111 remove_attribute(XYZ self, SparseIntKey a0)
2112 remove_attribute(XYZ self, SparseStringKey a0)
2113 remove_attribute(XYZ self, SparseParticleIndexKey a0)
2114 """
2115 return _IMP_core.XYZ_remove_attribute(self, *args)
2116
2117 def has_attribute(self, *args):
2118 r"""
2119 has_attribute(XYZ self, FloatKey a0) -> bool
2120 has_attribute(XYZ self, IntKey a0) -> bool
2121 has_attribute(XYZ self, FloatsKey a0) -> bool
2122 has_attribute(XYZ self, IntsKey a0) -> bool
2123 has_attribute(XYZ self, StringKey a0) -> bool
2124 has_attribute(XYZ self, ParticleIndexKey a0) -> bool
2125 has_attribute(XYZ self, ObjectKey a0) -> bool
2126 has_attribute(XYZ self, SparseFloatKey a0) -> bool
2127 has_attribute(XYZ self, SparseIntKey a0) -> bool
2128 has_attribute(XYZ self, SparseStringKey a0) -> bool
2129 has_attribute(XYZ self, SparseParticleIndexKey a0) -> bool
2130 """
2131 return _IMP_core.XYZ_has_attribute(self, *args)
2132
2133 def get_derivative(self, *args):
2134 r"""
2135 get_derivative(XYZ self, int i) -> IMP::Float
2136 get_derivative(XYZ self, FloatKey a0) -> double
2137 """
2138 return _IMP_core.XYZ_get_derivative(self, *args)
2139
2140 def get_name(self):
2141 r"""get_name(XYZ self) -> std::string"""
2142 return _IMP_core.XYZ_get_name(self)
2143
2144 def clear_caches(self):
2145 r"""clear_caches(XYZ self)"""
2146 return _IMP_core.XYZ_clear_caches(self)
2147
2148 def set_name(self, a0):
2149 r"""set_name(XYZ self, std::string a0)"""
2150 return _IMP_core.XYZ_set_name(self, a0)
2151
2152 def set_check_level(self, a0):
2153 r"""set_check_level(XYZ self, IMP::CheckLevel a0)"""
2154 return _IMP_core.XYZ_set_check_level(self, a0)
2155
2156 def add_to_derivative(self, *args):
2157 r"""
2158 add_to_derivative(XYZ self, int i, IMP::Float v, DerivativeAccumulator d)
2159 add_to_derivative(XYZ self, FloatKey a0, double a1, DerivativeAccumulator a2)
2160 """
2161 return _IMP_core.XYZ_add_to_derivative(self, *args)
2162
2163 def set_is_optimized(self, a0, a1):
2164 r"""set_is_optimized(XYZ self, FloatKey a0, bool a1)"""
2165 return _IMP_core.XYZ_set_is_optimized(self, a0, a1)
2166
2167 def get_is_optimized(self, a0):
2168 r"""get_is_optimized(XYZ self, FloatKey a0) -> bool"""
2169 return _IMP_core.XYZ_get_is_optimized(self, a0)
2170
2171 def get_check_level(self):
2172 r"""get_check_level(XYZ self) -> IMP::CheckLevel"""
2173 return _IMP_core.XYZ_get_check_level(self)
2174
2175 def __eq__(self, *args):
2176 r"""
2177 __eq__(XYZ self, XYZ o) -> bool
2178 __eq__(XYZ self, Particle d) -> bool
2179 """
2180 return _IMP_core.XYZ___eq__(self, *args)
2181
2182 def __ne__(self, *args):
2183 r"""
2184 __ne__(XYZ self, XYZ o) -> bool
2185 __ne__(XYZ self, Particle d) -> bool
2186 """
2187 return _IMP_core.XYZ___ne__(self, *args)
2188
2189 def __le__(self, *args):
2190 r"""
2191 __le__(XYZ self, XYZ o) -> bool
2192 __le__(XYZ self, Particle d) -> bool
2193 """
2194 return _IMP_core.XYZ___le__(self, *args)
2195
2196 def __lt__(self, *args):
2197 r"""
2198 __lt__(XYZ self, XYZ o) -> bool
2199 __lt__(XYZ self, Particle d) -> bool
2200 """
2201 return _IMP_core.XYZ___lt__(self, *args)
2202
2203 def __ge__(self, *args):
2204 r"""
2205 __ge__(XYZ self, XYZ o) -> bool
2206 __ge__(XYZ self, Particle d) -> bool
2207 """
2208 return _IMP_core.XYZ___ge__(self, *args)
2209
2210 def __gt__(self, *args):
2211 r"""
2212 __gt__(XYZ self, XYZ o) -> bool
2213 __gt__(XYZ self, Particle d) -> bool
2214 """
2215 return _IMP_core.XYZ___gt__(self, *args)
2216
2217 def __hash__(self):
2218 r"""__hash__(XYZ self) -> std::size_t"""
2219 return _IMP_core.XYZ___hash__(self)
2220
2221 def __str__(self):
2222 r"""__str__(XYZ self) -> std::string"""
2223 return _IMP_core.XYZ___str__(self)
2224
2225 def __repr__(self):
2226 r"""__repr__(XYZ self) -> std::string"""
2227 return _IMP_core.XYZ___repr__(self)
2228
2229 def _get_as_binary(self):
2230 r"""_get_as_binary(XYZ self) -> PyObject *"""
2231 return _IMP_core.XYZ__get_as_binary(self)
2232
2233 def _set_from_binary(self, p):
2234 r"""_set_from_binary(XYZ self, PyObject * p)"""
2235 return _IMP_core.XYZ__set_from_binary(self, p)
2236
2237 def __getstate__(self):
2238 p = self._get_as_binary()
2239 if len(self.__dict__) > 1:
2240 d = self.__dict__.copy()
2241 del d['this']
2242 p = (d, p)
2243 return p
2244
2245 def __setstate__(self, p):
2246 if not hasattr(self, 'this'):
2247 self.__init__()
2248 if isinstance(p, tuple):
2249 d, p = p
2250 self.__dict__.update(d)
2251 return self._set_from_binary(p)
2252
2253 __swig_destroy__ = _IMP_core.delete_XYZ
2254
2255# Register XYZ in _IMP_core:
2256_IMP_core.XYZ_swigregister(XYZ)
2257
2258def set_vector_geometry(d, v):
2259 r"""set_vector_geometry(XYZ d, Vector3D v)"""
2260 return _IMP_core.set_vector_geometry(d, v)
2261
2262def get_vector_geometry(d):
2263 r"""get_vector_geometry(XYZ d) -> Vector3D"""
2264 return _IMP_core.get_vector_geometry(d)
2265
2266def get_dihedral(a, b, c, d):
2267 r"""get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d) -> double"""
2268 return _IMP_core.get_dihedral(a, b, c, d)
2269class XYZR(XYZ):
2270 r"""Proxy of C++ IMP::core::XYZR class."""
2271
2272 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2273
2274 def __init__(self, *args):
2275 r"""
2276 __init__(XYZR self) -> XYZR
2277 __init__(XYZR self, Model m, ParticleIndex id) -> XYZR
2278 __init__(XYZR self, _ParticleAdaptor d) -> XYZR
2279 """
2280 _IMP_core.XYZR_swiginit(self, _IMP_core.new_XYZR(*args))
2281
2282 def show(self, *args):
2283 r"""show(XYZR self, _ostream out=std::cout)"""
2284 return _IMP_core.XYZR_show(self, *args)
2285
2286 @staticmethod
2287 def setup_particle(*args):
2288 r"""
2289 setup_particle(Model m, ParticleIndex pi) -> XYZR
2290 setup_particle(_ParticleAdaptor pa) -> XYZR
2291 setup_particle(Model m, ParticleIndex pi, IMP::Float radius) -> XYZR
2292 setup_particle(_ParticleAdaptor pa, IMP::Float radius) -> XYZR
2293 setup_particle(Model m, ParticleIndex pi, Sphere3D ball) -> XYZR
2294 setup_particle(_ParticleAdaptor pa, Sphere3D ball) -> XYZR
2295 """
2296 return _IMP_core.XYZR_setup_particle(*args)
2297
2298 @staticmethod
2299 def get_is_setup(*args):
2300 r"""
2301 get_is_setup(_ParticleAdaptor p) -> bool
2302 get_is_setup(Model m, ParticleIndex pi) -> bool
2303 """
2304 return _IMP_core.XYZR_get_is_setup(*args)
2305
2306 def get_radius(self):
2307 r"""get_radius(XYZR self) -> double"""
2308 return _IMP_core.XYZR_get_radius(self)
2309
2310 def set_radius(self, r):
2311 r"""set_radius(XYZR self, double r)"""
2312 return _IMP_core.XYZR_set_radius(self, r)
2313
2314 def get_sphere(self):
2315 r"""get_sphere(XYZR self) -> Sphere3D"""
2316 return _IMP_core.XYZR_get_sphere(self)
2317
2318 def set_sphere(self, s):
2319 r"""set_sphere(XYZR self, Sphere3D s)"""
2320 return _IMP_core.XYZR_set_sphere(self, s)
2321
2322 @staticmethod
2323 def get_radius_key():
2324 r"""get_radius_key() -> FloatKey"""
2325 return _IMP_core.XYZR_get_radius_key()
2326
2327 def add_to_radius_derivative(self, v, d):
2328 r"""add_to_radius_derivative(XYZR self, double v, DerivativeAccumulator d)"""
2329 return _IMP_core.XYZR_add_to_radius_derivative(self, v, d)
2330
2331 def add_attribute(self, *args):
2332 r"""
2333 add_attribute(XYZR self, FloatKey k, IMP::Float v, bool opt)
2334 add_attribute(XYZR self, FloatKey a0, IMP::Float a1)
2335 add_attribute(XYZR self, IntKey a0, IMP::Int a1)
2336 add_attribute(XYZR self, FloatsKey a0, IMP::Floats a1)
2337 add_attribute(XYZR self, IntsKey a0, IMP::Ints a1)
2338 add_attribute(XYZR self, StringKey a0, IMP::String a1)
2339 add_attribute(XYZR self, ParticleIndexKey a0, Particle a1)
2340 add_attribute(XYZR self, ObjectKey a0, Object a1)
2341 add_attribute(XYZR self, SparseFloatKey a0, IMP::Float a1)
2342 add_attribute(XYZR self, SparseIntKey a0, IMP::Int a1)
2343 add_attribute(XYZR self, SparseStringKey a0, IMP::String a1)
2344 add_attribute(XYZR self, SparseParticleIndexKey a0, ParticleIndex a1)
2345 """
2346 return _IMP_core.XYZR_add_attribute(self, *args)
2347
2348 def get_value(self, *args):
2349 r"""
2350 get_value(XYZR self, FloatKey a0) -> IMP::Float
2351 get_value(XYZR self, IntKey a0) -> IMP::Int
2352 get_value(XYZR self, FloatsKey a0) -> IMP::Floats
2353 get_value(XYZR self, IntsKey a0) -> IMP::Ints
2354 get_value(XYZR self, StringKey a0) -> IMP::String
2355 get_value(XYZR self, ParticleIndexKey a0) -> Particle
2356 get_value(XYZR self, ObjectKey a0) -> Object
2357 get_value(XYZR self, SparseFloatKey a0) -> IMP::Float
2358 get_value(XYZR self, SparseIntKey a0) -> IMP::Int
2359 get_value(XYZR self, SparseStringKey a0) -> IMP::String
2360 get_value(XYZR self, SparseParticleIndexKey a0) -> ParticleIndex
2361 """
2362 return _IMP_core.XYZR_get_value(self, *args)
2363
2364 def set_value(self, *args):
2365 r"""
2366 set_value(XYZR self, FloatKey a0, IMP::Float a1)
2367 set_value(XYZR self, IntKey a0, IMP::Int a1)
2368 set_value(XYZR self, FloatsKey a0, IMP::Floats a1)
2369 set_value(XYZR self, IntsKey a0, IMP::Ints a1)
2370 set_value(XYZR self, StringKey a0, IMP::String a1)
2371 set_value(XYZR self, ParticleIndexKey a0, Particle a1)
2372 set_value(XYZR self, ObjectKey a0, Object a1)
2373 set_value(XYZR self, SparseFloatKey a0, IMP::Float a1)
2374 set_value(XYZR self, SparseIntKey a0, IMP::Int a1)
2375 set_value(XYZR self, SparseStringKey a0, IMP::String a1)
2376 set_value(XYZR self, SparseParticleIndexKey a0, ParticleIndex a1)
2377 """
2378 return _IMP_core.XYZR_set_value(self, *args)
2379
2380 def remove_attribute(self, *args):
2381 r"""
2382 remove_attribute(XYZR self, FloatKey a0)
2383 remove_attribute(XYZR self, IntKey a0)
2384 remove_attribute(XYZR self, FloatsKey a0)
2385 remove_attribute(XYZR self, IntsKey a0)
2386 remove_attribute(XYZR self, StringKey a0)
2387 remove_attribute(XYZR self, ParticleIndexKey a0)
2388 remove_attribute(XYZR self, ObjectKey a0)
2389 remove_attribute(XYZR self, SparseFloatKey a0)
2390 remove_attribute(XYZR self, SparseIntKey a0)
2391 remove_attribute(XYZR self, SparseStringKey a0)
2392 remove_attribute(XYZR self, SparseParticleIndexKey a0)
2393 """
2394 return _IMP_core.XYZR_remove_attribute(self, *args)
2395
2396 def has_attribute(self, *args):
2397 r"""
2398 has_attribute(XYZR self, FloatKey a0) -> bool
2399 has_attribute(XYZR self, IntKey a0) -> bool
2400 has_attribute(XYZR self, FloatsKey a0) -> bool
2401 has_attribute(XYZR self, IntsKey a0) -> bool
2402 has_attribute(XYZR self, StringKey a0) -> bool
2403 has_attribute(XYZR self, ParticleIndexKey a0) -> bool
2404 has_attribute(XYZR self, ObjectKey a0) -> bool
2405 has_attribute(XYZR self, SparseFloatKey a0) -> bool
2406 has_attribute(XYZR self, SparseIntKey a0) -> bool
2407 has_attribute(XYZR self, SparseStringKey a0) -> bool
2408 has_attribute(XYZR self, SparseParticleIndexKey a0) -> bool
2409 """
2410 return _IMP_core.XYZR_has_attribute(self, *args)
2411
2412 def get_derivative(self, a0):
2413 r"""get_derivative(XYZR self, FloatKey a0) -> double"""
2414 return _IMP_core.XYZR_get_derivative(self, a0)
2415
2416 def get_name(self):
2417 r"""get_name(XYZR self) -> std::string"""
2418 return _IMP_core.XYZR_get_name(self)
2419
2420 def clear_caches(self):
2421 r"""clear_caches(XYZR self)"""
2422 return _IMP_core.XYZR_clear_caches(self)
2423
2424 def set_name(self, a0):
2425 r"""set_name(XYZR self, std::string a0)"""
2426 return _IMP_core.XYZR_set_name(self, a0)
2427
2428 def set_check_level(self, a0):
2429 r"""set_check_level(XYZR self, IMP::CheckLevel a0)"""
2430 return _IMP_core.XYZR_set_check_level(self, a0)
2431
2432 def add_to_derivative(self, a0, a1, a2):
2433 r"""add_to_derivative(XYZR self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2434 return _IMP_core.XYZR_add_to_derivative(self, a0, a1, a2)
2435
2436 def set_is_optimized(self, a0, a1):
2437 r"""set_is_optimized(XYZR self, FloatKey a0, bool a1)"""
2438 return _IMP_core.XYZR_set_is_optimized(self, a0, a1)
2439
2440 def get_is_optimized(self, a0):
2441 r"""get_is_optimized(XYZR self, FloatKey a0) -> bool"""
2442 return _IMP_core.XYZR_get_is_optimized(self, a0)
2443
2444 def get_check_level(self):
2445 r"""get_check_level(XYZR self) -> IMP::CheckLevel"""
2446 return _IMP_core.XYZR_get_check_level(self)
2447
2448 def __eq__(self, *args):
2449 r"""
2450 __eq__(XYZR self, XYZR o) -> bool
2451 __eq__(XYZR self, Particle d) -> bool
2452 """
2453 return _IMP_core.XYZR___eq__(self, *args)
2454
2455 def __ne__(self, *args):
2456 r"""
2457 __ne__(XYZR self, XYZR o) -> bool
2458 __ne__(XYZR self, Particle d) -> bool
2459 """
2460 return _IMP_core.XYZR___ne__(self, *args)
2461
2462 def __le__(self, *args):
2463 r"""
2464 __le__(XYZR self, XYZR o) -> bool
2465 __le__(XYZR self, Particle d) -> bool
2466 """
2467 return _IMP_core.XYZR___le__(self, *args)
2468
2469 def __lt__(self, *args):
2470 r"""
2471 __lt__(XYZR self, XYZR o) -> bool
2472 __lt__(XYZR self, Particle d) -> bool
2473 """
2474 return _IMP_core.XYZR___lt__(self, *args)
2475
2476 def __ge__(self, *args):
2477 r"""
2478 __ge__(XYZR self, XYZR o) -> bool
2479 __ge__(XYZR self, Particle d) -> bool
2480 """
2481 return _IMP_core.XYZR___ge__(self, *args)
2482
2483 def __gt__(self, *args):
2484 r"""
2485 __gt__(XYZR self, XYZR o) -> bool
2486 __gt__(XYZR self, Particle d) -> bool
2487 """
2488 return _IMP_core.XYZR___gt__(self, *args)
2489
2490 def __hash__(self):
2491 r"""__hash__(XYZR self) -> std::size_t"""
2492 return _IMP_core.XYZR___hash__(self)
2493
2494 def __str__(self):
2495 r"""__str__(XYZR self) -> std::string"""
2496 return _IMP_core.XYZR___str__(self)
2497
2498 def __repr__(self):
2499 r"""__repr__(XYZR self) -> std::string"""
2500 return _IMP_core.XYZR___repr__(self)
2501
2502 def _get_as_binary(self):
2503 r"""_get_as_binary(XYZR self) -> PyObject *"""
2504 return _IMP_core.XYZR__get_as_binary(self)
2505
2506 def _set_from_binary(self, p):
2507 r"""_set_from_binary(XYZR self, PyObject * p)"""
2508 return _IMP_core.XYZR__set_from_binary(self, p)
2509
2510 def __getstate__(self):
2511 p = self._get_as_binary()
2512 if len(self.__dict__) > 1:
2513 d = self.__dict__.copy()
2514 del d['this']
2515 p = (d, p)
2516 return p
2517
2518 def __setstate__(self, p):
2519 if not hasattr(self, 'this'):
2520 self.__init__()
2521 if isinstance(p, tuple):
2522 d, p = p
2523 self.__dict__.update(d)
2524 return self._set_from_binary(p)
2525
2526 __swig_destroy__ = _IMP_core.delete_XYZR
2527
2528# Register XYZR in _IMP_core:
2529_IMP_core.XYZR_swigregister(XYZR)
2530
2531def set_enclosing_sphere(b, v, slack=0):
2532 r"""set_enclosing_sphere(XYZR b, IMP::core::XYZs const & v, double slack=0)"""
2533 return _IMP_core.set_enclosing_sphere(b, v, slack)
2534
2535def set_enclosing_radius(b, v):
2536 r"""set_enclosing_radius(XYZR b, IMP::core::XYZs const & v)"""
2537 return _IMP_core.set_enclosing_radius(b, v)
2538
2539def get_enclosing_sphere(v):
2540 r"""get_enclosing_sphere(IMP::core::XYZs const & v) -> Sphere3D"""
2541 return _IMP_core.get_enclosing_sphere(v)
2542
2543def create_xyzr_particles(m, num, radius, box_side=10):
2544 r"""create_xyzr_particles(Model m, unsigned int num, IMP::Float radius, IMP::Float box_side=10) -> IMP::core::XYZRs"""
2545 return _IMP_core.create_xyzr_particles(m, num, radius, box_side)
2546class XYZRGeometry(IMP.display.SingletonGeometry):
2547 r"""Proxy of C++ IMP::core::XYZRGeometry class."""
2548
2549 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2550
2551 def __init__(self, *args):
2552 r"""
2553 __init__(XYZRGeometry self, Particle p) -> XYZRGeometry
2554 __init__(XYZRGeometry self, XYZR d) -> XYZRGeometry
2555 """
2556 _IMP_core.XYZRGeometry_swiginit(self, _IMP_core.new_XYZRGeometry(*args))
2557
2558 def get_version_info(self):
2559 r"""get_version_info(XYZRGeometry self) -> VersionInfo"""
2560 return _IMP_core.XYZRGeometry_get_version_info(self)
2561 __swig_destroy__ = _IMP_core.delete_XYZRGeometry
2562
2563 def __str__(self):
2564 r"""__str__(XYZRGeometry self) -> std::string"""
2565 return _IMP_core.XYZRGeometry___str__(self)
2566
2567 def __repr__(self):
2568 r"""__repr__(XYZRGeometry self) -> std::string"""
2569 return _IMP_core.XYZRGeometry___repr__(self)
2570
2571 @staticmethod
2572 def get_from(o):
2573 return _object_cast_to_XYZRGeometry(o)
2574
2575
2576# Register XYZRGeometry in _IMP_core:
2577_IMP_core.XYZRGeometry_swigregister(XYZRGeometry)
2578class XYZRsGeometry(IMP.display.SingletonsGeometry):
2579 r"""Proxy of C++ IMP::core::XYZRsGeometry class."""
2580
2581 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2582
2583 def __init__(self, sc):
2584 r"""__init__(XYZRsGeometry self, SingletonContainer sc) -> XYZRsGeometry"""
2585 _IMP_core.XYZRsGeometry_swiginit(self, _IMP_core.new_XYZRsGeometry(sc))
2586
2587 def get_version_info(self):
2588 r"""get_version_info(XYZRsGeometry self) -> VersionInfo"""
2589 return _IMP_core.XYZRsGeometry_get_version_info(self)
2590 __swig_destroy__ = _IMP_core.delete_XYZRsGeometry
2591
2592 def __str__(self):
2593 r"""__str__(XYZRsGeometry self) -> std::string"""
2594 return _IMP_core.XYZRsGeometry___str__(self)
2595
2596 def __repr__(self):
2597 r"""__repr__(XYZRsGeometry self) -> std::string"""
2598 return _IMP_core.XYZRsGeometry___repr__(self)
2599
2600 @staticmethod
2601 def get_from(o):
2602 return _object_cast_to_XYZRsGeometry(o)
2603
2604
2605# Register XYZRsGeometry in _IMP_core:
2606_IMP_core.XYZRsGeometry_swigregister(XYZRsGeometry)
2607class XYZDerivativeGeometry(IMP.display.SingletonGeometry):
2608 r"""Proxy of C++ IMP::core::XYZDerivativeGeometry class."""
2609
2610 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2611
2612 def __init__(self, *args):
2613 r"""
2614 __init__(XYZDerivativeGeometry self, Particle p) -> XYZDerivativeGeometry
2615 __init__(XYZDerivativeGeometry self, XYZ d) -> XYZDerivativeGeometry
2616 """
2617 _IMP_core.XYZDerivativeGeometry_swiginit(self, _IMP_core.new_XYZDerivativeGeometry(*args))
2618
2619 def get_version_info(self):
2620 r"""get_version_info(XYZDerivativeGeometry self) -> VersionInfo"""
2621 return _IMP_core.XYZDerivativeGeometry_get_version_info(self)
2622 __swig_destroy__ = _IMP_core.delete_XYZDerivativeGeometry
2623
2624 def __str__(self):
2625 r"""__str__(XYZDerivativeGeometry self) -> std::string"""
2626 return _IMP_core.XYZDerivativeGeometry___str__(self)
2627
2628 def __repr__(self):
2629 r"""__repr__(XYZDerivativeGeometry self) -> std::string"""
2630 return _IMP_core.XYZDerivativeGeometry___repr__(self)
2631
2632 @staticmethod
2633 def get_from(o):
2634 return _object_cast_to_XYZDerivativeGeometry(o)
2635
2636
2637# Register XYZDerivativeGeometry in _IMP_core:
2638_IMP_core.XYZDerivativeGeometry_swigregister(XYZDerivativeGeometry)
2639class XYZDerivativesGeometry(IMP.display.SingletonsGeometry):
2640 r"""Proxy of C++ IMP::core::XYZDerivativesGeometry class."""
2641
2642 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2643
2644 def __init__(self, sc):
2645 r"""__init__(XYZDerivativesGeometry self, SingletonContainer sc) -> XYZDerivativesGeometry"""
2646 _IMP_core.XYZDerivativesGeometry_swiginit(self, _IMP_core.new_XYZDerivativesGeometry(sc))
2647
2648 def get_version_info(self):
2649 r"""get_version_info(XYZDerivativesGeometry self) -> VersionInfo"""
2650 return _IMP_core.XYZDerivativesGeometry_get_version_info(self)
2651 __swig_destroy__ = _IMP_core.delete_XYZDerivativesGeometry
2652
2653 def __str__(self):
2654 r"""__str__(XYZDerivativesGeometry self) -> std::string"""
2655 return _IMP_core.XYZDerivativesGeometry___str__(self)
2656
2657 def __repr__(self):
2658 r"""__repr__(XYZDerivativesGeometry self) -> std::string"""
2659 return _IMP_core.XYZDerivativesGeometry___repr__(self)
2660
2661 @staticmethod
2662 def get_from(o):
2663 return _object_cast_to_XYZDerivativesGeometry(o)
2664
2665
2666# Register XYZDerivativesGeometry in _IMP_core:
2667_IMP_core.XYZDerivativesGeometry_swigregister(XYZDerivativesGeometry)
2668class EdgePairGeometry(IMP.display.PairGeometry):
2669 r"""Proxy of C++ IMP::core::EdgePairGeometry class."""
2670
2671 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2672
2673 def __init__(self, pp):
2674 r"""__init__(EdgePairGeometry self, IMP::ParticlePair const & pp) -> EdgePairGeometry"""
2675 _IMP_core.EdgePairGeometry_swiginit(self, _IMP_core.new_EdgePairGeometry(pp))
2676
2677 def get_version_info(self):
2678 r"""get_version_info(EdgePairGeometry self) -> VersionInfo"""
2679 return _IMP_core.EdgePairGeometry_get_version_info(self)
2680 __swig_destroy__ = _IMP_core.delete_EdgePairGeometry
2681
2682 def __str__(self):
2683 r"""__str__(EdgePairGeometry self) -> std::string"""
2684 return _IMP_core.EdgePairGeometry___str__(self)
2685
2686 def __repr__(self):
2687 r"""__repr__(EdgePairGeometry self) -> std::string"""
2688 return _IMP_core.EdgePairGeometry___repr__(self)
2689
2690 @staticmethod
2691 def get_from(o):
2692 return _object_cast_to_EdgePairGeometry(o)
2693
2694
2695# Register EdgePairGeometry in _IMP_core:
2696_IMP_core.EdgePairGeometry_swigregister(EdgePairGeometry)
2697class EdgePairsGeometry(IMP.display.PairsGeometry):
2698 r"""Proxy of C++ IMP::core::EdgePairsGeometry class."""
2699
2700 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2701
2702 def __init__(self, sc):
2703 r"""__init__(EdgePairsGeometry self, PairContainer sc) -> EdgePairsGeometry"""
2704 _IMP_core.EdgePairsGeometry_swiginit(self, _IMP_core.new_EdgePairsGeometry(sc))
2705
2706 def get_version_info(self):
2707 r"""get_version_info(EdgePairsGeometry self) -> VersionInfo"""
2708 return _IMP_core.EdgePairsGeometry_get_version_info(self)
2709 __swig_destroy__ = _IMP_core.delete_EdgePairsGeometry
2710
2711 def __str__(self):
2712 r"""__str__(EdgePairsGeometry self) -> std::string"""
2713 return _IMP_core.EdgePairsGeometry___str__(self)
2714
2715 def __repr__(self):
2716 r"""__repr__(EdgePairsGeometry self) -> std::string"""
2717 return _IMP_core.EdgePairsGeometry___repr__(self)
2718
2719 @staticmethod
2720 def get_from(o):
2721 return _object_cast_to_EdgePairsGeometry(o)
2722
2723
2724# Register EdgePairsGeometry in _IMP_core:
2725_IMP_core.EdgePairsGeometry_swigregister(EdgePairsGeometry)
2726class Direction(IMP.Decorator):
2727 r"""Proxy of C++ IMP::core::Direction class."""
2728
2729 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2730
2731 @staticmethod
2732 def do_setup_particle(m, pi, v):
2733 r"""do_setup_particle(Model m, ParticleIndex pi, Vector3D v)"""
2734 return _IMP_core.Direction_do_setup_particle(m, pi, v)
2735
2736 def __init__(self, *args):
2737 r"""
2738 __init__(Direction self) -> Direction
2739 __init__(Direction self, Model m, ParticleIndex id) -> Direction
2740 __init__(Direction self, _ParticleAdaptor d) -> Direction
2741 """
2742 _IMP_core.Direction_swiginit(self, _IMP_core.new_Direction(*args))
2743
2744 def show(self, *args):
2745 r"""show(Direction self, _ostream out=std::cout)"""
2746 return _IMP_core.Direction_show(self, *args)
2747
2748 @staticmethod
2749 def setup_particle(*args):
2750 r"""
2751 setup_particle(Model m, ParticleIndex pi, Vector3D v) -> Direction
2752 setup_particle(_ParticleAdaptor pa, Vector3D v) -> Direction
2753 """
2754 return _IMP_core.Direction_setup_particle(*args)
2755
2756 @staticmethod
2757 def get_is_setup(*args):
2758 r"""
2759 get_is_setup(_ParticleAdaptor p) -> bool
2760 get_is_setup(Model m, ParticleIndex pi) -> bool
2761 """
2762 return _IMP_core.Direction_get_is_setup(*args)
2763
2764 @staticmethod
2765 def get_direction_key(i):
2766 r"""get_direction_key(unsigned int i) -> FloatKey"""
2767 return _IMP_core.Direction_get_direction_key(i)
2768
2769 def get_direction_derivative(self, i):
2770 r"""get_direction_derivative(Direction self, int i) -> IMP::Float"""
2771 return _IMP_core.Direction_get_direction_derivative(self, i)
2772
2773 def get_direction_derivatives(self):
2774 r"""get_direction_derivatives(Direction self) -> Vector3D"""
2775 return _IMP_core.Direction_get_direction_derivatives(self)
2776
2777 def add_to_direction_derivative(self, i, v, d):
2778 r"""add_to_direction_derivative(Direction self, int i, IMP::Float v, DerivativeAccumulator d)"""
2779 return _IMP_core.Direction_add_to_direction_derivative(self, i, v, d)
2780
2781 def add_to_direction_derivatives(self, v, d):
2782 r"""add_to_direction_derivatives(Direction self, Vector3D v, DerivativeAccumulator d)"""
2783 return _IMP_core.Direction_add_to_direction_derivatives(self, v, d)
2784
2785 def get_direction_is_optimized(self):
2786 r"""get_direction_is_optimized(Direction self) -> bool"""
2787 return _IMP_core.Direction_get_direction_is_optimized(self)
2788
2789 def set_direction_is_optimized(self, tf):
2790 r"""set_direction_is_optimized(Direction self, bool tf)"""
2791 return _IMP_core.Direction_set_direction_is_optimized(self, tf)
2792
2793 def get_direction(self):
2794 r"""get_direction(Direction self) -> Vector3D"""
2795 return _IMP_core.Direction_get_direction(self)
2796
2797 def set_direction(self, v):
2798 r"""set_direction(Direction self, Vector3D v)"""
2799 return _IMP_core.Direction_set_direction(self, v)
2800
2801 def reflect(self):
2802 r"""reflect(Direction self)"""
2803 return _IMP_core.Direction_reflect(self)
2804
2805 def add_attribute(self, *args):
2806 r"""
2807 add_attribute(Direction self, FloatKey k, IMP::Float v, bool opt)
2808 add_attribute(Direction self, FloatKey a0, IMP::Float a1)
2809 add_attribute(Direction self, IntKey a0, IMP::Int a1)
2810 add_attribute(Direction self, FloatsKey a0, IMP::Floats a1)
2811 add_attribute(Direction self, IntsKey a0, IMP::Ints a1)
2812 add_attribute(Direction self, StringKey a0, IMP::String a1)
2813 add_attribute(Direction self, ParticleIndexKey a0, Particle a1)
2814 add_attribute(Direction self, ObjectKey a0, Object a1)
2815 add_attribute(Direction self, SparseFloatKey a0, IMP::Float a1)
2816 add_attribute(Direction self, SparseIntKey a0, IMP::Int a1)
2817 add_attribute(Direction self, SparseStringKey a0, IMP::String a1)
2818 add_attribute(Direction self, SparseParticleIndexKey a0, ParticleIndex a1)
2819 """
2820 return _IMP_core.Direction_add_attribute(self, *args)
2821
2822 def get_value(self, *args):
2823 r"""
2824 get_value(Direction self, FloatKey a0) -> IMP::Float
2825 get_value(Direction self, IntKey a0) -> IMP::Int
2826 get_value(Direction self, FloatsKey a0) -> IMP::Floats
2827 get_value(Direction self, IntsKey a0) -> IMP::Ints
2828 get_value(Direction self, StringKey a0) -> IMP::String
2829 get_value(Direction self, ParticleIndexKey a0) -> Particle
2830 get_value(Direction self, ObjectKey a0) -> Object
2831 get_value(Direction self, SparseFloatKey a0) -> IMP::Float
2832 get_value(Direction self, SparseIntKey a0) -> IMP::Int
2833 get_value(Direction self, SparseStringKey a0) -> IMP::String
2834 get_value(Direction self, SparseParticleIndexKey a0) -> ParticleIndex
2835 """
2836 return _IMP_core.Direction_get_value(self, *args)
2837
2838 def set_value(self, *args):
2839 r"""
2840 set_value(Direction self, FloatKey a0, IMP::Float a1)
2841 set_value(Direction self, IntKey a0, IMP::Int a1)
2842 set_value(Direction self, FloatsKey a0, IMP::Floats a1)
2843 set_value(Direction self, IntsKey a0, IMP::Ints a1)
2844 set_value(Direction self, StringKey a0, IMP::String a1)
2845 set_value(Direction self, ParticleIndexKey a0, Particle a1)
2846 set_value(Direction self, ObjectKey a0, Object a1)
2847 set_value(Direction self, SparseFloatKey a0, IMP::Float a1)
2848 set_value(Direction self, SparseIntKey a0, IMP::Int a1)
2849 set_value(Direction self, SparseStringKey a0, IMP::String a1)
2850 set_value(Direction self, SparseParticleIndexKey a0, ParticleIndex a1)
2851 """
2852 return _IMP_core.Direction_set_value(self, *args)
2853
2854 def remove_attribute(self, *args):
2855 r"""
2856 remove_attribute(Direction self, FloatKey a0)
2857 remove_attribute(Direction self, IntKey a0)
2858 remove_attribute(Direction self, FloatsKey a0)
2859 remove_attribute(Direction self, IntsKey a0)
2860 remove_attribute(Direction self, StringKey a0)
2861 remove_attribute(Direction self, ParticleIndexKey a0)
2862 remove_attribute(Direction self, ObjectKey a0)
2863 remove_attribute(Direction self, SparseFloatKey a0)
2864 remove_attribute(Direction self, SparseIntKey a0)
2865 remove_attribute(Direction self, SparseStringKey a0)
2866 remove_attribute(Direction self, SparseParticleIndexKey a0)
2867 """
2868 return _IMP_core.Direction_remove_attribute(self, *args)
2869
2870 def has_attribute(self, *args):
2871 r"""
2872 has_attribute(Direction self, FloatKey a0) -> bool
2873 has_attribute(Direction self, IntKey a0) -> bool
2874 has_attribute(Direction self, FloatsKey a0) -> bool
2875 has_attribute(Direction self, IntsKey a0) -> bool
2876 has_attribute(Direction self, StringKey a0) -> bool
2877 has_attribute(Direction self, ParticleIndexKey a0) -> bool
2878 has_attribute(Direction self, ObjectKey a0) -> bool
2879 has_attribute(Direction self, SparseFloatKey a0) -> bool
2880 has_attribute(Direction self, SparseIntKey a0) -> bool
2881 has_attribute(Direction self, SparseStringKey a0) -> bool
2882 has_attribute(Direction self, SparseParticleIndexKey a0) -> bool
2883 """
2884 return _IMP_core.Direction_has_attribute(self, *args)
2885
2886 def get_derivative(self, a0):
2887 r"""get_derivative(Direction self, FloatKey a0) -> double"""
2888 return _IMP_core.Direction_get_derivative(self, a0)
2889
2890 def get_name(self):
2891 r"""get_name(Direction self) -> std::string"""
2892 return _IMP_core.Direction_get_name(self)
2893
2894 def clear_caches(self):
2895 r"""clear_caches(Direction self)"""
2896 return _IMP_core.Direction_clear_caches(self)
2897
2898 def set_name(self, a0):
2899 r"""set_name(Direction self, std::string a0)"""
2900 return _IMP_core.Direction_set_name(self, a0)
2901
2902 def set_check_level(self, a0):
2903 r"""set_check_level(Direction self, IMP::CheckLevel a0)"""
2904 return _IMP_core.Direction_set_check_level(self, a0)
2905
2906 def add_to_derivative(self, a0, a1, a2):
2907 r"""add_to_derivative(Direction self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2908 return _IMP_core.Direction_add_to_derivative(self, a0, a1, a2)
2909
2910 def set_is_optimized(self, a0, a1):
2911 r"""set_is_optimized(Direction self, FloatKey a0, bool a1)"""
2912 return _IMP_core.Direction_set_is_optimized(self, a0, a1)
2913
2914 def get_is_optimized(self, a0):
2915 r"""get_is_optimized(Direction self, FloatKey a0) -> bool"""
2916 return _IMP_core.Direction_get_is_optimized(self, a0)
2917
2918 def get_check_level(self):
2919 r"""get_check_level(Direction self) -> IMP::CheckLevel"""
2920 return _IMP_core.Direction_get_check_level(self)
2921
2922 def __eq__(self, *args):
2923 r"""
2924 __eq__(Direction self, Direction o) -> bool
2925 __eq__(Direction self, Particle d) -> bool
2926 """
2927 return _IMP_core.Direction___eq__(self, *args)
2928
2929 def __ne__(self, *args):
2930 r"""
2931 __ne__(Direction self, Direction o) -> bool
2932 __ne__(Direction self, Particle d) -> bool
2933 """
2934 return _IMP_core.Direction___ne__(self, *args)
2935
2936 def __le__(self, *args):
2937 r"""
2938 __le__(Direction self, Direction o) -> bool
2939 __le__(Direction self, Particle d) -> bool
2940 """
2941 return _IMP_core.Direction___le__(self, *args)
2942
2943 def __lt__(self, *args):
2944 r"""
2945 __lt__(Direction self, Direction o) -> bool
2946 __lt__(Direction self, Particle d) -> bool
2947 """
2948 return _IMP_core.Direction___lt__(self, *args)
2949
2950 def __ge__(self, *args):
2951 r"""
2952 __ge__(Direction self, Direction o) -> bool
2953 __ge__(Direction self, Particle d) -> bool
2954 """
2955 return _IMP_core.Direction___ge__(self, *args)
2956
2957 def __gt__(self, *args):
2958 r"""
2959 __gt__(Direction self, Direction o) -> bool
2960 __gt__(Direction self, Particle d) -> bool
2961 """
2962 return _IMP_core.Direction___gt__(self, *args)
2963
2964 def __hash__(self):
2965 r"""__hash__(Direction self) -> std::size_t"""
2966 return _IMP_core.Direction___hash__(self)
2967
2968 def __str__(self):
2969 r"""__str__(Direction self) -> std::string"""
2970 return _IMP_core.Direction___str__(self)
2971
2972 def __repr__(self):
2973 r"""__repr__(Direction self) -> std::string"""
2974 return _IMP_core.Direction___repr__(self)
2975
2976 def _get_as_binary(self):
2977 r"""_get_as_binary(Direction self) -> PyObject *"""
2978 return _IMP_core.Direction__get_as_binary(self)
2979
2980 def _set_from_binary(self, p):
2981 r"""_set_from_binary(Direction self, PyObject * p)"""
2982 return _IMP_core.Direction__set_from_binary(self, p)
2983
2984 def __getstate__(self):
2985 p = self._get_as_binary()
2986 if len(self.__dict__) > 1:
2987 d = self.__dict__.copy()
2988 del d['this']
2989 p = (d, p)
2990 return p
2991
2992 def __setstate__(self, p):
2993 if not hasattr(self, 'this'):
2994 self.__init__()
2995 if isinstance(p, tuple):
2996 d, p = p
2997 self.__dict__.update(d)
2998 return self._set_from_binary(p)
2999
3000 __swig_destroy__ = _IMP_core.delete_Direction
3001
3002# Register Direction in _IMP_core:
3003_IMP_core.Direction_swigregister(Direction)
3004
3005def get_angle(a, b):
3006 r"""get_angle(Direction a, Direction b) -> double"""
3007 return _IMP_core.get_angle(a, b)
3008class DirectionAngle(IMP.Decorator):
3009 r"""Proxy of C++ IMP::core::DirectionAngle class."""
3010
3011 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3012
3013 def __init__(self, *args):
3014 r"""
3015 __init__(DirectionAngle self) -> DirectionAngle
3016 __init__(DirectionAngle self, Model m, ParticleIndex id) -> DirectionAngle
3017 __init__(DirectionAngle self, _ParticleAdaptor d) -> DirectionAngle
3018 """
3019 _IMP_core.DirectionAngle_swiginit(self, _IMP_core.new_DirectionAngle(*args))
3020
3021 def show(self, *args):
3022 r"""show(DirectionAngle self, _ostream out=std::cout)"""
3023 return _IMP_core.DirectionAngle_show(self, *args)
3024
3025 @staticmethod
3026 def setup_particle(*args):
3027 r"""
3028 setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexPair ds) -> DirectionAngle
3029 setup_particle(_ParticleAdaptor pa, IMP::ParticleIndexPair ds) -> DirectionAngle
3030 setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor d0, _ParticleIndexAdaptor d1) -> DirectionAngle
3031 setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor d0, _ParticleIndexAdaptor d1) -> DirectionAngle
3032 """
3033 return _IMP_core.DirectionAngle_setup_particle(*args)
3034
3035 @staticmethod
3036 def get_is_setup(*args):
3037 r"""
3038 get_is_setup(_ParticleAdaptor p) -> bool
3039 get_is_setup(Model m, ParticleIndex pi) -> bool
3040 """
3041 return _IMP_core.DirectionAngle_get_is_setup(*args)
3042
3043 @staticmethod
3044 def get_angle_key():
3045 r"""get_angle_key() -> FloatKey"""
3046 return _IMP_core.DirectionAngle_get_angle_key()
3047
3048 @staticmethod
3049 def get_particle_key(i):
3050 r"""get_particle_key(unsigned int i) -> ParticleIndexKey"""
3051 return _IMP_core.DirectionAngle_get_particle_key(i)
3052
3053 def get_particle(self, *args):
3054 r"""
3055 get_particle(DirectionAngle self, unsigned int i) -> Particle
3056 get_particle(DirectionAngle self) -> Particle
3057 """
3058 return _IMP_core.DirectionAngle_get_particle(self, *args)
3059
3060 def get_particle_index(self, *args):
3061 r"""
3062 get_particle_index(DirectionAngle self, unsigned int i) -> ParticleIndex
3063 get_particle_index(DirectionAngle self) -> ParticleIndex
3064 """
3065 return _IMP_core.DirectionAngle_get_particle_index(self, *args)
3066
3067 def get_angle(self):
3068 r"""get_angle(DirectionAngle self) -> IMP::Float"""
3069 return _IMP_core.DirectionAngle_get_angle(self)
3070
3071 def get_angle_derivative(self):
3072 r"""get_angle_derivative(DirectionAngle self) -> IMP::Float"""
3073 return _IMP_core.DirectionAngle_get_angle_derivative(self)
3074
3075 def add_to_angle_derivative(self, v, d):
3076 r"""add_to_angle_derivative(DirectionAngle self, IMP::Float v, DerivativeAccumulator d)"""
3077 return _IMP_core.DirectionAngle_add_to_angle_derivative(self, v, d)
3078
3079 def add_attribute(self, *args):
3080 r"""
3081 add_attribute(DirectionAngle self, FloatKey k, IMP::Float v, bool opt)
3082 add_attribute(DirectionAngle self, FloatKey a0, IMP::Float a1)
3083 add_attribute(DirectionAngle self, IntKey a0, IMP::Int a1)
3084 add_attribute(DirectionAngle self, FloatsKey a0, IMP::Floats a1)
3085 add_attribute(DirectionAngle self, IntsKey a0, IMP::Ints a1)
3086 add_attribute(DirectionAngle self, StringKey a0, IMP::String a1)
3087 add_attribute(DirectionAngle self, ParticleIndexKey a0, Particle a1)
3088 add_attribute(DirectionAngle self, ObjectKey a0, Object a1)
3089 add_attribute(DirectionAngle self, SparseFloatKey a0, IMP::Float a1)
3090 add_attribute(DirectionAngle self, SparseIntKey a0, IMP::Int a1)
3091 add_attribute(DirectionAngle self, SparseStringKey a0, IMP::String a1)
3092 add_attribute(DirectionAngle self, SparseParticleIndexKey a0, ParticleIndex a1)
3093 """
3094 return _IMP_core.DirectionAngle_add_attribute(self, *args)
3095
3096 def get_value(self, *args):
3097 r"""
3098 get_value(DirectionAngle self, FloatKey a0) -> IMP::Float
3099 get_value(DirectionAngle self, IntKey a0) -> IMP::Int
3100 get_value(DirectionAngle self, FloatsKey a0) -> IMP::Floats
3101 get_value(DirectionAngle self, IntsKey a0) -> IMP::Ints
3102 get_value(DirectionAngle self, StringKey a0) -> IMP::String
3103 get_value(DirectionAngle self, ParticleIndexKey a0) -> Particle
3104 get_value(DirectionAngle self, ObjectKey a0) -> Object
3105 get_value(DirectionAngle self, SparseFloatKey a0) -> IMP::Float
3106 get_value(DirectionAngle self, SparseIntKey a0) -> IMP::Int
3107 get_value(DirectionAngle self, SparseStringKey a0) -> IMP::String
3108 get_value(DirectionAngle self, SparseParticleIndexKey a0) -> ParticleIndex
3109 """
3110 return _IMP_core.DirectionAngle_get_value(self, *args)
3111
3112 def set_value(self, *args):
3113 r"""
3114 set_value(DirectionAngle self, FloatKey a0, IMP::Float a1)
3115 set_value(DirectionAngle self, IntKey a0, IMP::Int a1)
3116 set_value(DirectionAngle self, FloatsKey a0, IMP::Floats a1)
3117 set_value(DirectionAngle self, IntsKey a0, IMP::Ints a1)
3118 set_value(DirectionAngle self, StringKey a0, IMP::String a1)
3119 set_value(DirectionAngle self, ParticleIndexKey a0, Particle a1)
3120 set_value(DirectionAngle self, ObjectKey a0, Object a1)
3121 set_value(DirectionAngle self, SparseFloatKey a0, IMP::Float a1)
3122 set_value(DirectionAngle self, SparseIntKey a0, IMP::Int a1)
3123 set_value(DirectionAngle self, SparseStringKey a0, IMP::String a1)
3124 set_value(DirectionAngle self, SparseParticleIndexKey a0, ParticleIndex a1)
3125 """
3126 return _IMP_core.DirectionAngle_set_value(self, *args)
3127
3128 def remove_attribute(self, *args):
3129 r"""
3130 remove_attribute(DirectionAngle self, FloatKey a0)
3131 remove_attribute(DirectionAngle self, IntKey a0)
3132 remove_attribute(DirectionAngle self, FloatsKey a0)
3133 remove_attribute(DirectionAngle self, IntsKey a0)
3134 remove_attribute(DirectionAngle self, StringKey a0)
3135 remove_attribute(DirectionAngle self, ParticleIndexKey a0)
3136 remove_attribute(DirectionAngle self, ObjectKey a0)
3137 remove_attribute(DirectionAngle self, SparseFloatKey a0)
3138 remove_attribute(DirectionAngle self, SparseIntKey a0)
3139 remove_attribute(DirectionAngle self, SparseStringKey a0)
3140 remove_attribute(DirectionAngle self, SparseParticleIndexKey a0)
3141 """
3142 return _IMP_core.DirectionAngle_remove_attribute(self, *args)
3143
3144 def has_attribute(self, *args):
3145 r"""
3146 has_attribute(DirectionAngle self, FloatKey a0) -> bool
3147 has_attribute(DirectionAngle self, IntKey a0) -> bool
3148 has_attribute(DirectionAngle self, FloatsKey a0) -> bool
3149 has_attribute(DirectionAngle self, IntsKey a0) -> bool
3150 has_attribute(DirectionAngle self, StringKey a0) -> bool
3151 has_attribute(DirectionAngle self, ParticleIndexKey a0) -> bool
3152 has_attribute(DirectionAngle self, ObjectKey a0) -> bool
3153 has_attribute(DirectionAngle self, SparseFloatKey a0) -> bool
3154 has_attribute(DirectionAngle self, SparseIntKey a0) -> bool
3155 has_attribute(DirectionAngle self, SparseStringKey a0) -> bool
3156 has_attribute(DirectionAngle self, SparseParticleIndexKey a0) -> bool
3157 """
3158 return _IMP_core.DirectionAngle_has_attribute(self, *args)
3159
3160 def get_derivative(self, a0):
3161 r"""get_derivative(DirectionAngle self, FloatKey a0) -> double"""
3162 return _IMP_core.DirectionAngle_get_derivative(self, a0)
3163
3164 def get_name(self):
3165 r"""get_name(DirectionAngle self) -> std::string"""
3166 return _IMP_core.DirectionAngle_get_name(self)
3167
3168 def clear_caches(self):
3169 r"""clear_caches(DirectionAngle self)"""
3170 return _IMP_core.DirectionAngle_clear_caches(self)
3171
3172 def set_name(self, a0):
3173 r"""set_name(DirectionAngle self, std::string a0)"""
3174 return _IMP_core.DirectionAngle_set_name(self, a0)
3175
3176 def set_check_level(self, a0):
3177 r"""set_check_level(DirectionAngle self, IMP::CheckLevel a0)"""
3178 return _IMP_core.DirectionAngle_set_check_level(self, a0)
3179
3180 def add_to_derivative(self, a0, a1, a2):
3181 r"""add_to_derivative(DirectionAngle self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
3182 return _IMP_core.DirectionAngle_add_to_derivative(self, a0, a1, a2)
3183
3184 def set_is_optimized(self, a0, a1):
3185 r"""set_is_optimized(DirectionAngle self, FloatKey a0, bool a1)"""
3186 return _IMP_core.DirectionAngle_set_is_optimized(self, a0, a1)
3187
3188 def get_is_optimized(self, a0):
3189 r"""get_is_optimized(DirectionAngle self, FloatKey a0) -> bool"""
3190 return _IMP_core.DirectionAngle_get_is_optimized(self, a0)
3191
3192 def get_check_level(self):
3193 r"""get_check_level(DirectionAngle self) -> IMP::CheckLevel"""
3194 return _IMP_core.DirectionAngle_get_check_level(self)
3195
3196 def __eq__(self, *args):
3197 r"""
3198 __eq__(DirectionAngle self, DirectionAngle o) -> bool
3199 __eq__(DirectionAngle self, Particle d) -> bool
3200 """
3201 return _IMP_core.DirectionAngle___eq__(self, *args)
3202
3203 def __ne__(self, *args):
3204 r"""
3205 __ne__(DirectionAngle self, DirectionAngle o) -> bool
3206 __ne__(DirectionAngle self, Particle d) -> bool
3207 """
3208 return _IMP_core.DirectionAngle___ne__(self, *args)
3209
3210 def __le__(self, *args):
3211 r"""
3212 __le__(DirectionAngle self, DirectionAngle o) -> bool
3213 __le__(DirectionAngle self, Particle d) -> bool
3214 """
3215 return _IMP_core.DirectionAngle___le__(self, *args)
3216
3217 def __lt__(self, *args):
3218 r"""
3219 __lt__(DirectionAngle self, DirectionAngle o) -> bool
3220 __lt__(DirectionAngle self, Particle d) -> bool
3221 """
3222 return _IMP_core.DirectionAngle___lt__(self, *args)
3223
3224 def __ge__(self, *args):
3225 r"""
3226 __ge__(DirectionAngle self, DirectionAngle o) -> bool
3227 __ge__(DirectionAngle self, Particle d) -> bool
3228 """
3229 return _IMP_core.DirectionAngle___ge__(self, *args)
3230
3231 def __gt__(self, *args):
3232 r"""
3233 __gt__(DirectionAngle self, DirectionAngle o) -> bool
3234 __gt__(DirectionAngle self, Particle d) -> bool
3235 """
3236 return _IMP_core.DirectionAngle___gt__(self, *args)
3237
3238 def __hash__(self):
3239 r"""__hash__(DirectionAngle self) -> std::size_t"""
3240 return _IMP_core.DirectionAngle___hash__(self)
3241
3242 def __str__(self):
3243 r"""__str__(DirectionAngle self) -> std::string"""
3244 return _IMP_core.DirectionAngle___str__(self)
3245
3246 def __repr__(self):
3247 r"""__repr__(DirectionAngle self) -> std::string"""
3248 return _IMP_core.DirectionAngle___repr__(self)
3249
3250 def _get_as_binary(self):
3251 r"""_get_as_binary(DirectionAngle self) -> PyObject *"""
3252 return _IMP_core.DirectionAngle__get_as_binary(self)
3253
3254 def _set_from_binary(self, p):
3255 r"""_set_from_binary(DirectionAngle self, PyObject * p)"""
3256 return _IMP_core.DirectionAngle__set_from_binary(self, p)
3257
3258 def __getstate__(self):
3259 p = self._get_as_binary()
3260 if len(self.__dict__) > 1:
3261 d = self.__dict__.copy()
3262 del d['this']
3263 p = (d, p)
3264 return p
3265
3266 def __setstate__(self, p):
3267 if not hasattr(self, 'this'):
3268 self.__init__()
3269 if isinstance(p, tuple):
3270 d, p = p
3271 self.__dict__.update(d)
3272 return self._set_from_binary(p)
3273
3274 __swig_destroy__ = _IMP_core.delete_DirectionAngle
3275
3276# Register DirectionAngle in _IMP_core:
3277_IMP_core.DirectionAngle_swigregister(DirectionAngle)
3278class Surface(XYZ):
3279 r"""Proxy of C++ IMP::core::Surface class."""
3280
3281 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3282
3283 @staticmethod
3284 def do_setup_particle(*args):
3285 r"""
3286 do_setup_particle(Model m, ParticleIndex pi, Vector3D center=IMP::Vector3D(0, 0, 0), Vector3D normal=IMP::Vector3D(0, 0, 1))
3287 do_setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf)
3288 """
3289 return _IMP_core.Surface_do_setup_particle(*args)
3290
3291 def __init__(self, *args):
3292 r"""
3293 __init__(Surface self) -> Surface
3294 __init__(Surface self, Model m, ParticleIndex id) -> Surface
3295 __init__(Surface self, _ParticleAdaptor d) -> Surface
3296 """
3297 _IMP_core.Surface_swiginit(self, _IMP_core.new_Surface(*args))
3298
3299 def show(self, *args):
3300 r"""show(Surface self, _ostream out=std::cout)"""
3301 return _IMP_core.Surface_show(self, *args)
3302
3303 @staticmethod
3304 def setup_particle(*args):
3305 r"""
3306 setup_particle(Model m, ParticleIndex pi) -> Surface
3307 setup_particle(_ParticleAdaptor pa) -> Surface
3308 setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> Surface
3309 setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> Surface
3310 setup_particle(Model m, ParticleIndex pi, Vector3D center) -> Surface
3311 setup_particle(_ParticleAdaptor pa, Vector3D center) -> Surface
3312 setup_particle(Model m, ParticleIndex pi, Vector3D center, Vector3D normal) -> Surface
3313 setup_particle(_ParticleAdaptor pa, Vector3D center, Vector3D normal) -> Surface
3314 """
3315 return _IMP_core.Surface_setup_particle(*args)
3316
3317 def get_normal_x(self):
3318 r"""get_normal_x(Surface self) -> IMP::Float"""
3319 return _IMP_core.Surface_get_normal_x(self)
3320
3321 def set_normal_x(self, t):
3322 r"""set_normal_x(Surface self, IMP::Float t)"""
3323 return _IMP_core.Surface_set_normal_x(self, t)
3324
3325 def get_normal_y(self):
3326 r"""get_normal_y(Surface self) -> IMP::Float"""
3327 return _IMP_core.Surface_get_normal_y(self)
3328
3329 def set_normal_y(self, t):
3330 r"""set_normal_y(Surface self, IMP::Float t)"""
3331 return _IMP_core.Surface_set_normal_y(self, t)
3332
3333 def get_normal_z(self):
3334 r"""get_normal_z(Surface self) -> IMP::Float"""
3335 return _IMP_core.Surface_get_normal_z(self)
3336
3337 def set_normal_z(self, t):
3338 r"""set_normal_z(Surface self, IMP::Float t)"""
3339 return _IMP_core.Surface_set_normal_z(self, t)
3340
3341 @staticmethod
3342 def get_is_setup(*args):
3343 r"""
3344 get_is_setup(_ParticleAdaptor p) -> bool
3345 get_is_setup(Model m, ParticleIndex pi) -> bool
3346 """
3347 return _IMP_core.Surface_get_is_setup(*args)
3348
3349 @staticmethod
3350 def get_normal_key(i):
3351 r"""get_normal_key(unsigned int i) -> FloatKey"""
3352 return _IMP_core.Surface_get_normal_key(i)
3353
3354 def get_normal_derivative(self, i):
3355 r"""get_normal_derivative(Surface self, int i) -> IMP::Float"""
3356 return _IMP_core.Surface_get_normal_derivative(self, i)
3357
3358 def get_normal_derivatives(self):
3359 r"""get_normal_derivatives(Surface self) -> Vector3D"""
3360 return _IMP_core.Surface_get_normal_derivatives(self)
3361
3362 def add_to_normal_derivative(self, i, v, d):
3363 r"""add_to_normal_derivative(Surface self, int i, IMP::Float v, DerivativeAccumulator d)"""
3364 return _IMP_core.Surface_add_to_normal_derivative(self, i, v, d)
3365
3366 def add_to_normal_derivatives(self, v, d):
3367 r"""add_to_normal_derivatives(Surface self, Vector3D v, DerivativeAccumulator d)"""
3368 return _IMP_core.Surface_add_to_normal_derivatives(self, v, d)
3369
3370 def get_normal_is_optimized(self):
3371 r"""get_normal_is_optimized(Surface self) -> bool"""
3372 return _IMP_core.Surface_get_normal_is_optimized(self)
3373
3374 def set_normal_is_optimized(self, tf):
3375 r"""set_normal_is_optimized(Surface self, bool tf)"""
3376 return _IMP_core.Surface_set_normal_is_optimized(self, tf)
3377
3378 def get_normal(self):
3379 r"""get_normal(Surface self) -> Vector3D"""
3380 return _IMP_core.Surface_get_normal(self)
3381
3382 def set_normal(self, normal):
3383 r"""set_normal(Surface self, Vector3D normal)"""
3384 return _IMP_core.Surface_set_normal(self, normal)
3385
3386 def reflect(self):
3387 r"""reflect(Surface self)"""
3388 return _IMP_core.Surface_reflect(self)
3389
3390 def get_height(self, v):
3391 r"""get_height(Surface self, Vector3D v) -> double"""
3392 return _IMP_core.Surface_get_height(self, v)
3393
3394 def get_depth(self, v):
3395 r"""get_depth(Surface self, Vector3D v) -> double"""
3396 return _IMP_core.Surface_get_depth(self, v)
3397
3398 def get_distance_to(self, v):
3399 r"""get_distance_to(Surface self, Vector3D v) -> double"""
3400 return _IMP_core.Surface_get_distance_to(self, v)
3401
3402 def get_distance_to_center(self, v):
3403 r"""get_distance_to_center(Surface self, Vector3D v) -> double"""
3404 return _IMP_core.Surface_get_distance_to_center(self, v)
3405
3406 def set_reference_frame(self, rf):
3407 r"""set_reference_frame(Surface self, ReferenceFrame3D rf)"""
3408 return _IMP_core.Surface_set_reference_frame(self, rf)
3409
3410 def get_reference_frame(self):
3411 r"""get_reference_frame(Surface self) -> ReferenceFrame3D"""
3412 return _IMP_core.Surface_get_reference_frame(self)
3413
3414 def get_plane(self):
3415 r"""get_plane(Surface self) -> Plane3D"""
3416 return _IMP_core.Surface_get_plane(self)
3417
3418 def add_attribute(self, *args):
3419 r"""
3420 add_attribute(Surface self, FloatKey k, IMP::Float v, bool opt)
3421 add_attribute(Surface self, FloatKey a0, IMP::Float a1)
3422 add_attribute(Surface self, IntKey a0, IMP::Int a1)
3423 add_attribute(Surface self, FloatsKey a0, IMP::Floats a1)
3424 add_attribute(Surface self, IntsKey a0, IMP::Ints a1)
3425 add_attribute(Surface self, StringKey a0, IMP::String a1)
3426 add_attribute(Surface self, ParticleIndexKey a0, Particle a1)
3427 add_attribute(Surface self, ObjectKey a0, Object a1)
3428 add_attribute(Surface self, SparseFloatKey a0, IMP::Float a1)
3429 add_attribute(Surface self, SparseIntKey a0, IMP::Int a1)
3430 add_attribute(Surface self, SparseStringKey a0, IMP::String a1)
3431 add_attribute(Surface self, SparseParticleIndexKey a0, ParticleIndex a1)
3432 """
3433 return _IMP_core.Surface_add_attribute(self, *args)
3434
3435 def get_value(self, *args):
3436 r"""
3437 get_value(Surface self, FloatKey a0) -> IMP::Float
3438 get_value(Surface self, IntKey a0) -> IMP::Int
3439 get_value(Surface self, FloatsKey a0) -> IMP::Floats
3440 get_value(Surface self, IntsKey a0) -> IMP::Ints
3441 get_value(Surface self, StringKey a0) -> IMP::String
3442 get_value(Surface self, ParticleIndexKey a0) -> Particle
3443 get_value(Surface self, ObjectKey a0) -> Object
3444 get_value(Surface self, SparseFloatKey a0) -> IMP::Float
3445 get_value(Surface self, SparseIntKey a0) -> IMP::Int
3446 get_value(Surface self, SparseStringKey a0) -> IMP::String
3447 get_value(Surface self, SparseParticleIndexKey a0) -> ParticleIndex
3448 """
3449 return _IMP_core.Surface_get_value(self, *args)
3450
3451 def set_value(self, *args):
3452 r"""
3453 set_value(Surface self, FloatKey a0, IMP::Float a1)
3454 set_value(Surface self, IntKey a0, IMP::Int a1)
3455 set_value(Surface self, FloatsKey a0, IMP::Floats a1)
3456 set_value(Surface self, IntsKey a0, IMP::Ints a1)
3457 set_value(Surface self, StringKey a0, IMP::String a1)
3458 set_value(Surface self, ParticleIndexKey a0, Particle a1)
3459 set_value(Surface self, ObjectKey a0, Object a1)
3460 set_value(Surface self, SparseFloatKey a0, IMP::Float a1)
3461 set_value(Surface self, SparseIntKey a0, IMP::Int a1)
3462 set_value(Surface self, SparseStringKey a0, IMP::String a1)
3463 set_value(Surface self, SparseParticleIndexKey a0, ParticleIndex a1)
3464 """
3465 return _IMP_core.Surface_set_value(self, *args)
3466
3467 def remove_attribute(self, *args):
3468 r"""
3469 remove_attribute(Surface self, FloatKey a0)
3470 remove_attribute(Surface self, IntKey a0)
3471 remove_attribute(Surface self, FloatsKey a0)
3472 remove_attribute(Surface self, IntsKey a0)
3473 remove_attribute(Surface self, StringKey a0)
3474 remove_attribute(Surface self, ParticleIndexKey a0)
3475 remove_attribute(Surface self, ObjectKey a0)
3476 remove_attribute(Surface self, SparseFloatKey a0)
3477 remove_attribute(Surface self, SparseIntKey a0)
3478 remove_attribute(Surface self, SparseStringKey a0)
3479 remove_attribute(Surface self, SparseParticleIndexKey a0)
3480 """
3481 return _IMP_core.Surface_remove_attribute(self, *args)
3482
3483 def has_attribute(self, *args):
3484 r"""
3485 has_attribute(Surface self, FloatKey a0) -> bool
3486 has_attribute(Surface self, IntKey a0) -> bool
3487 has_attribute(Surface self, FloatsKey a0) -> bool
3488 has_attribute(Surface self, IntsKey a0) -> bool
3489 has_attribute(Surface self, StringKey a0) -> bool
3490 has_attribute(Surface self, ParticleIndexKey a0) -> bool
3491 has_attribute(Surface self, ObjectKey a0) -> bool
3492 has_attribute(Surface self, SparseFloatKey a0) -> bool
3493 has_attribute(Surface self, SparseIntKey a0) -> bool
3494 has_attribute(Surface self, SparseStringKey a0) -> bool
3495 has_attribute(Surface self, SparseParticleIndexKey a0) -> bool
3496 """
3497 return _IMP_core.Surface_has_attribute(self, *args)
3498
3499 def get_derivative(self, a0):
3500 r"""get_derivative(Surface self, FloatKey a0) -> double"""
3501 return _IMP_core.Surface_get_derivative(self, a0)
3502
3503 def get_name(self):
3504 r"""get_name(Surface self) -> std::string"""
3505 return _IMP_core.Surface_get_name(self)
3506
3507 def clear_caches(self):
3508 r"""clear_caches(Surface self)"""
3509 return _IMP_core.Surface_clear_caches(self)
3510
3511 def set_name(self, a0):
3512 r"""set_name(Surface self, std::string a0)"""
3513 return _IMP_core.Surface_set_name(self, a0)
3514
3515 def set_check_level(self, a0):
3516 r"""set_check_level(Surface self, IMP::CheckLevel a0)"""
3517 return _IMP_core.Surface_set_check_level(self, a0)
3518
3519 def add_to_derivative(self, a0, a1, a2):
3520 r"""add_to_derivative(Surface self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
3521 return _IMP_core.Surface_add_to_derivative(self, a0, a1, a2)
3522
3523 def set_is_optimized(self, a0, a1):
3524 r"""set_is_optimized(Surface self, FloatKey a0, bool a1)"""
3525 return _IMP_core.Surface_set_is_optimized(self, a0, a1)
3526
3527 def get_is_optimized(self, a0):
3528 r"""get_is_optimized(Surface self, FloatKey a0) -> bool"""
3529 return _IMP_core.Surface_get_is_optimized(self, a0)
3530
3531 def get_check_level(self):
3532 r"""get_check_level(Surface self) -> IMP::CheckLevel"""
3533 return _IMP_core.Surface_get_check_level(self)
3534
3535 def __eq__(self, *args):
3536 r"""
3537 __eq__(Surface self, Surface o) -> bool
3538 __eq__(Surface self, Particle d) -> bool
3539 """
3540 return _IMP_core.Surface___eq__(self, *args)
3541
3542 def __ne__(self, *args):
3543 r"""
3544 __ne__(Surface self, Surface o) -> bool
3545 __ne__(Surface self, Particle d) -> bool
3546 """
3547 return _IMP_core.Surface___ne__(self, *args)
3548
3549 def __le__(self, *args):
3550 r"""
3551 __le__(Surface self, Surface o) -> bool
3552 __le__(Surface self, Particle d) -> bool
3553 """
3554 return _IMP_core.Surface___le__(self, *args)
3555
3556 def __lt__(self, *args):
3557 r"""
3558 __lt__(Surface self, Surface o) -> bool
3559 __lt__(Surface self, Particle d) -> bool
3560 """
3561 return _IMP_core.Surface___lt__(self, *args)
3562
3563 def __ge__(self, *args):
3564 r"""
3565 __ge__(Surface self, Surface o) -> bool
3566 __ge__(Surface self, Particle d) -> bool
3567 """
3568 return _IMP_core.Surface___ge__(self, *args)
3569
3570 def __gt__(self, *args):
3571 r"""
3572 __gt__(Surface self, Surface o) -> bool
3573 __gt__(Surface self, Particle d) -> bool
3574 """
3575 return _IMP_core.Surface___gt__(self, *args)
3576
3577 def __hash__(self):
3578 r"""__hash__(Surface self) -> std::size_t"""
3579 return _IMP_core.Surface___hash__(self)
3580
3581 def __str__(self):
3582 r"""__str__(Surface self) -> std::string"""
3583 return _IMP_core.Surface___str__(self)
3584
3585 def __repr__(self):
3586 r"""__repr__(Surface self) -> std::string"""
3587 return _IMP_core.Surface___repr__(self)
3588
3589 def _get_as_binary(self):
3590 r"""_get_as_binary(Surface self) -> PyObject *"""
3591 return _IMP_core.Surface__get_as_binary(self)
3592
3593 def _set_from_binary(self, p):
3594 r"""_set_from_binary(Surface self, PyObject * p)"""
3595 return _IMP_core.Surface__set_from_binary(self, p)
3596
3597 def __getstate__(self):
3598 p = self._get_as_binary()
3599 if len(self.__dict__) > 1:
3600 d = self.__dict__.copy()
3601 del d['this']
3602 p = (d, p)
3603 return p
3604
3605 def __setstate__(self, p):
3606 if not hasattr(self, 'this'):
3607 self.__init__()
3608 if isinstance(p, tuple):
3609 d, p = p
3610 self.__dict__.update(d)
3611 return self._set_from_binary(p)
3612
3613 __swig_destroy__ = _IMP_core.delete_Surface
3614
3615# Register Surface in _IMP_core:
3616_IMP_core.Surface_swigregister(Surface)
3617
3618def get_height(*args):
3619 r"""
3620 get_height(Surface s, XYZR d) -> double
3621 get_height(Surface s, XYZ d) -> double
3622 """
3623 return _IMP_core.get_height(*args)
3624
3625def get_depth(*args):
3626 r"""
3627 get_depth(Surface s, XYZR d) -> double
3628 get_depth(Surface s, XYZ d) -> double
3629 """
3630 return _IMP_core.get_depth(*args)
3631
3632def get_distance(*args):
3633 r"""
3634 get_distance(XYZ a, XYZ b) -> double
3635 get_distance(XYZR a, XYZR b) -> double
3636 get_distance(Surface s, XYZR d) -> double
3637 get_distance(Surface s, XYZ d) -> double
3638 """
3639 return _IMP_core.get_distance(*args)
3640class SurfaceGeometry(IMP.display.Geometry):
3641 r"""Proxy of C++ IMP::core::SurfaceGeometry class."""
3642
3643 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3644
3645 def __init__(self, *args):
3646 r"""
3647 __init__(SurfaceGeometry self, std::string n="SurfaceGeometry") -> SurfaceGeometry
3648 __init__(SurfaceGeometry self, Surface s, std::string const n="SurfaceGeometry") -> SurfaceGeometry
3649 __init__(SurfaceGeometry self, Surface s, Color c, std::string n="SurfaceGeometry") -> SurfaceGeometry
3650 """
3651 _IMP_core.SurfaceGeometry_swiginit(self, _IMP_core.new_SurfaceGeometry(*args))
3652
3653 def get_geometry(self):
3654 r"""get_geometry(SurfaceGeometry self) -> Surface"""
3655 return _IMP_core.SurfaceGeometry_get_geometry(self)
3656
3657 def set_geometry(self, s):
3658 r"""set_geometry(SurfaceGeometry self, Surface s)"""
3659 return _IMP_core.SurfaceGeometry_set_geometry(self, s)
3660
3661 def get_version_info(self):
3662 r"""get_version_info(SurfaceGeometry self) -> VersionInfo"""
3663 return _IMP_core.SurfaceGeometry_get_version_info(self)
3664 __swig_destroy__ = _IMP_core.delete_SurfaceGeometry
3665
3666 def __str__(self):
3667 r"""__str__(SurfaceGeometry self) -> std::string"""
3668 return _IMP_core.SurfaceGeometry___str__(self)
3669
3670 def __repr__(self):
3671 r"""__repr__(SurfaceGeometry self) -> std::string"""
3672 return _IMP_core.SurfaceGeometry___repr__(self)
3673
3674 @staticmethod
3675 def get_from(o):
3676 return _object_cast_to_SurfaceGeometry(o)
3677
3678
3679# Register SurfaceGeometry in _IMP_core:
3680_IMP_core.SurfaceGeometry_swigregister(SurfaceGeometry)
3681
3682def create_geometry(*args):
3683 r"""create_geometry(Surface s, std::string name=std::string("SurfaceGeometry%1%")) -> SurfaceGeometry"""
3684 return _IMP_core.create_geometry(*args)
3685class SurfaceGeometryConstraint(IMP.Constraint):
3686 r"""Proxy of C++ IMP::core::SurfaceGeometryConstraint class."""
3687
3688 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3689
3690 def __init__(self, s, g):
3691 r"""__init__(SurfaceGeometryConstraint self, Surface s, SurfaceGeometry g) -> SurfaceGeometryConstraint"""
3692 _IMP_core.SurfaceGeometryConstraint_swiginit(self, _IMP_core.new_SurfaceGeometryConstraint(s, g))
3693
3694 def get_surface(self):
3695 r"""get_surface(SurfaceGeometryConstraint self) -> Surface"""
3696 return _IMP_core.SurfaceGeometryConstraint_get_surface(self)
3697
3698 def get_geometry(self):
3699 r"""get_geometry(SurfaceGeometryConstraint self) -> SurfaceGeometry"""
3700 return _IMP_core.SurfaceGeometryConstraint_get_geometry(self)
3701
3702 def do_get_inputs(self):
3703 r"""do_get_inputs(SurfaceGeometryConstraint self) -> IMP::ModelObjectsTemp"""
3704 return _IMP_core.SurfaceGeometryConstraint_do_get_inputs(self)
3705
3706 def do_get_outputs(self):
3707 r"""do_get_outputs(SurfaceGeometryConstraint self) -> IMP::ModelObjectsTemp"""
3708 return _IMP_core.SurfaceGeometryConstraint_do_get_outputs(self)
3709
3710 def get_version_info(self):
3711 r"""get_version_info(SurfaceGeometryConstraint self) -> VersionInfo"""
3712 return _IMP_core.SurfaceGeometryConstraint_get_version_info(self)
3713 __swig_destroy__ = _IMP_core.delete_SurfaceGeometryConstraint
3714
3715 def __str__(self):
3716 r"""__str__(SurfaceGeometryConstraint self) -> std::string"""
3717 return _IMP_core.SurfaceGeometryConstraint___str__(self)
3718
3719 def __repr__(self):
3720 r"""__repr__(SurfaceGeometryConstraint self) -> std::string"""
3721 return _IMP_core.SurfaceGeometryConstraint___repr__(self)
3722
3723 @staticmethod
3724 def get_from(o):
3725 return _object_cast_to_SurfaceGeometryConstraint(o)
3726
3727
3728# Register SurfaceGeometryConstraint in _IMP_core:
3729_IMP_core.SurfaceGeometryConstraint_swigregister(SurfaceGeometryConstraint)
3730
3731def get_constrained_surface_geometry(*args):
3732 r"""get_constrained_surface_geometry(Surface s, std::string name="SurfaceGeometry%1%") -> SurfaceGeometry"""
3733 return _IMP_core.get_constrained_surface_geometry(*args)
3734class LateralSurfaceConstraint(IMP.Constraint):
3735 r"""Proxy of C++ IMP::core::LateralSurfaceConstraint class."""
3736
3737 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3738
3739 def __init__(self, s, d):
3740 r"""__init__(LateralSurfaceConstraint self, Surface s, XYZ d) -> LateralSurfaceConstraint"""
3741 _IMP_core.LateralSurfaceConstraint_swiginit(self, _IMP_core.new_LateralSurfaceConstraint(s, d))
3742
3743 def do_get_inputs(self):
3744 r"""do_get_inputs(LateralSurfaceConstraint self) -> IMP::ModelObjectsTemp"""
3745 return _IMP_core.LateralSurfaceConstraint_do_get_inputs(self)
3746
3747 def do_get_outputs(self):
3748 r"""do_get_outputs(LateralSurfaceConstraint self) -> IMP::ModelObjectsTemp"""
3749 return _IMP_core.LateralSurfaceConstraint_do_get_outputs(self)
3750
3751 def get_version_info(self):
3752 r"""get_version_info(LateralSurfaceConstraint self) -> VersionInfo"""
3753 return _IMP_core.LateralSurfaceConstraint_get_version_info(self)
3754 __swig_destroy__ = _IMP_core.delete_LateralSurfaceConstraint
3755
3756 def __str__(self):
3757 r"""__str__(LateralSurfaceConstraint self) -> std::string"""
3758 return _IMP_core.LateralSurfaceConstraint___str__(self)
3759
3760 def __repr__(self):
3761 r"""__repr__(LateralSurfaceConstraint self) -> std::string"""
3762 return _IMP_core.LateralSurfaceConstraint___repr__(self)
3763
3764 @staticmethod
3765 def get_from(o):
3766 return _object_cast_to_LateralSurfaceConstraint(o)
3767
3768
3769# Register LateralSurfaceConstraint in _IMP_core:
3770_IMP_core.LateralSurfaceConstraint_swigregister(LateralSurfaceConstraint)
3771class AngleTripletScore(IMP.TripletScore):
3772 r"""Proxy of C++ IMP::core::AngleTripletScore class."""
3773
3774 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3775
3776 def __init__(self, *args):
3777 r"""
3778 __init__(AngleTripletScore self, UnaryFunction f) -> AngleTripletScore
3779 __init__(AngleTripletScore self) -> AngleTripletScore
3780 """
3781 _IMP_core.AngleTripletScore_swiginit(self, _IMP_core.new_AngleTripletScore(*args))
3782
3783 def do_get_inputs(self, m, pis):
3784 r"""do_get_inputs(AngleTripletScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3785 return _IMP_core.AngleTripletScore_do_get_inputs(self, m, pis)
3786
3787 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
3788 r"""evaluate_indexes(AngleTripletScore self, Model m, IMP::ParticleIndexTriplets const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
3789 return _IMP_core.AngleTripletScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
3790
3791 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
3792 r"""evaluate_indexes_scores(AngleTripletScore self, Model m, IMP::ParticleIndexTriplets const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
3793 return _IMP_core.AngleTripletScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
3794
3795 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
3796 r"""evaluate_indexes_delta(AngleTripletScore self, Model m, IMP::ParticleIndexTriplets const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
3797 return _IMP_core.AngleTripletScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
3798
3799 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
3800 r"""evaluate_if_good_indexes(AngleTripletScore self, Model m, IMP::ParticleIndexTriplets const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
3801 return _IMP_core.AngleTripletScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
3802
3803 def get_version_info(self):
3804 r"""get_version_info(AngleTripletScore self) -> VersionInfo"""
3805 return _IMP_core.AngleTripletScore_get_version_info(self)
3806 __swig_destroy__ = _IMP_core.delete_AngleTripletScore
3807
3808 def __str__(self):
3809 r"""__str__(AngleTripletScore self) -> std::string"""
3810 return _IMP_core.AngleTripletScore___str__(self)
3811
3812 def __repr__(self):
3813 r"""__repr__(AngleTripletScore self) -> std::string"""
3814 return _IMP_core.AngleTripletScore___repr__(self)
3815
3816 @staticmethod
3817 def get_from(o):
3818 return _object_cast_to_AngleTripletScore(o)
3819
3820
3821 def _get_as_binary(self):
3822 r"""_get_as_binary(AngleTripletScore self) -> PyObject *"""
3823 return _IMP_core.AngleTripletScore__get_as_binary(self)
3824
3825 def _set_from_binary(self, p):
3826 r"""_set_from_binary(AngleTripletScore self, PyObject * p)"""
3827 return _IMP_core.AngleTripletScore__set_from_binary(self, p)
3828
3829 def __getstate__(self):
3830 p = self._get_as_binary()
3831 if len(self.__dict__) > 1:
3832 d = self.__dict__.copy()
3833 del d['this']
3834 p = (d, p)
3835 return p
3836
3837 def __setstate__(self, p):
3838 if not hasattr(self, 'this'):
3839 self.__init__()
3840 if isinstance(p, tuple):
3841 d, p = p
3842 self.__dict__.update(d)
3843 return self._set_from_binary(p)
3844
3845
3846# Register AngleTripletScore in _IMP_core:
3847_IMP_core.AngleTripletScore_swigregister(AngleTripletScore)
3848class DihedralQuadScore(IMP.QuadScore):
3849 r"""Proxy of C++ IMP::core::DihedralQuadScore class."""
3850
3851 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3852
3853 def __init__(self, *args):
3854 r"""
3855 __init__(DihedralQuadScore self, UnaryFunction f) -> DihedralQuadScore
3856 __init__(DihedralQuadScore self) -> DihedralQuadScore
3857 """
3858 _IMP_core.DihedralQuadScore_swiginit(self, _IMP_core.new_DihedralQuadScore(*args))
3859
3860 def do_get_inputs(self, m, pis):
3861 r"""do_get_inputs(DihedralQuadScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3862 return _IMP_core.DihedralQuadScore_do_get_inputs(self, m, pis)
3863
3864 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
3865 r"""evaluate_indexes(DihedralQuadScore self, Model m, IMP::ParticleIndexQuads const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
3866 return _IMP_core.DihedralQuadScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
3867
3868 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
3869 r"""evaluate_indexes_scores(DihedralQuadScore self, Model m, IMP::ParticleIndexQuads const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
3870 return _IMP_core.DihedralQuadScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
3871
3872 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
3873 r"""evaluate_indexes_delta(DihedralQuadScore self, Model m, IMP::ParticleIndexQuads const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
3874 return _IMP_core.DihedralQuadScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
3875
3876 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
3877 r"""evaluate_if_good_indexes(DihedralQuadScore self, Model m, IMP::ParticleIndexQuads const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
3878 return _IMP_core.DihedralQuadScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
3879
3880 def get_version_info(self):
3881 r"""get_version_info(DihedralQuadScore self) -> VersionInfo"""
3882 return _IMP_core.DihedralQuadScore_get_version_info(self)
3883 __swig_destroy__ = _IMP_core.delete_DihedralQuadScore
3884
3885 def __str__(self):
3886 r"""__str__(DihedralQuadScore self) -> std::string"""
3887 return _IMP_core.DihedralQuadScore___str__(self)
3888
3889 def __repr__(self):
3890 r"""__repr__(DihedralQuadScore self) -> std::string"""
3891 return _IMP_core.DihedralQuadScore___repr__(self)
3892
3893 @staticmethod
3894 def get_from(o):
3895 return _object_cast_to_DihedralQuadScore(o)
3896
3897
3898 def _get_as_binary(self):
3899 r"""_get_as_binary(DihedralQuadScore self) -> PyObject *"""
3900 return _IMP_core.DihedralQuadScore__get_as_binary(self)
3901
3902 def _set_from_binary(self, p):
3903 r"""_set_from_binary(DihedralQuadScore self, PyObject * p)"""
3904 return _IMP_core.DihedralQuadScore__set_from_binary(self, p)
3905
3906 def __getstate__(self):
3907 p = self._get_as_binary()
3908 if len(self.__dict__) > 1:
3909 d = self.__dict__.copy()
3910 del d['this']
3911 p = (d, p)
3912 return p
3913
3914 def __setstate__(self, p):
3915 if not hasattr(self, 'this'):
3916 self.__init__()
3917 if isinstance(p, tuple):
3918 d, p = p
3919 self.__dict__.update(d)
3920 return self._set_from_binary(p)
3921
3922
3923# Register DihedralQuadScore in _IMP_core:
3924_IMP_core.DihedralQuadScore_swigregister(DihedralQuadScore)
3925class BallMover(MonteCarloMover):
3926 r"""Proxy of C++ IMP::core::BallMover class."""
3927
3928 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3929
3930 def __init__(self, *args):
3931 r"""
3932 __init__(BallMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double radius) -> BallMover
3933 __init__(BallMover self, Model m, ParticleIndex pi, double radius) -> BallMover
3934 __init__(BallMover self, Model m, IMP::ParticleIndexes const & pis, IMP::FloatKeys const & vars, IMP::Float radius) -> BallMover
3935 __init__(BallMover self, Model m, IMP::ParticleIndexes const & pis, IMP::Float radius) -> BallMover
3936 __init__(BallMover self) -> BallMover
3937 """
3938 _IMP_core.BallMover_swiginit(self, _IMP_core.new_BallMover(*args))
3939
3940 def set_radius(self, radius):
3941 r"""set_radius(BallMover self, IMP::Float radius)"""
3942 return _IMP_core.BallMover_set_radius(self, radius)
3943
3944 def get_radius(self):
3945 r"""get_radius(BallMover self) -> IMP::Float"""
3946 return _IMP_core.BallMover_get_radius(self)
3947
3948 def get_indexes(self):
3949 r"""get_indexes(BallMover self) -> IMP::ParticleIndexes"""
3950 return _IMP_core.BallMover_get_indexes(self)
3951
3952 def get_keys(self):
3953 r"""get_keys(BallMover self) -> IMP::FloatKeys"""
3954 return _IMP_core.BallMover_get_keys(self)
3955
3956 def get_version_info(self):
3957 r"""get_version_info(BallMover self) -> VersionInfo"""
3958 return _IMP_core.BallMover_get_version_info(self)
3959 __swig_destroy__ = _IMP_core.delete_BallMover
3960
3961 def __str__(self):
3962 r"""__str__(BallMover self) -> std::string"""
3963 return _IMP_core.BallMover___str__(self)
3964
3965 def __repr__(self):
3966 r"""__repr__(BallMover self) -> std::string"""
3967 return _IMP_core.BallMover___repr__(self)
3968
3969 @staticmethod
3970 def get_from(o):
3971 return _object_cast_to_BallMover(o)
3972
3973
3974 def _get_as_binary(self):
3975 r"""_get_as_binary(BallMover self) -> PyObject *"""
3976 return _IMP_core.BallMover__get_as_binary(self)
3977
3978 def _set_from_binary(self, p):
3979 r"""_set_from_binary(BallMover self, PyObject * p)"""
3980 return _IMP_core.BallMover__set_from_binary(self, p)
3981
3982 def __getstate__(self):
3983 p = self._get_as_binary()
3984 if len(self.__dict__) > 1:
3985 d = self.__dict__.copy()
3986 del d['this']
3987 p = (d, p)
3988 return p
3989
3990 def __setstate__(self, p):
3991 if not hasattr(self, 'this'):
3992 self.__init__()
3993 if isinstance(p, tuple):
3994 d, p = p
3995 self.__dict__.update(d)
3996 return self._set_from_binary(p)
3997
3998
3999 def _get_jax(self, space):
4000 import jax.random
4001 from IMP.algebra.jax import get_random_vector_in_3d_sphere
4002 indexes = self.get_indexes()
4003 keys = frozenset(self.get_keys())
4004 if keys == frozenset(IMP.core.XYZ.get_xyz_keys()):
4005 intcoord = False
4006 elif keys == frozenset(
4007 IMP.core.RigidBodyMember.get_internal_coordinate_keys()):
4008 intcoord = True
4009 else:
4010 raise NotImplementedError(
4011 "Only works for XYZ or internal coordinates")
4012 radius = self.get_radius()
4013
4014 def init_func(key):
4015 return key
4016
4017 def propose_func(jm, key):
4018 key, subkey = jax.random.split(key)
4019 if intcoord:
4020 rbs = jm['rigid_bodies']
4021 val = rbs.intcoord
4022 else:
4023 val = jm['xyz']
4024 v = get_random_vector_in_3d_sphere(
4025 subkey, radius, shape=val.shape[:-2] + (1,))
4026 if intcoord:
4027 rbs.intcoord = space.shift_indexes(val, indexes, v)
4028 else:
4029 jm['xyz'] = space.shift_indexes(val, indexes, v)
4030 return jm, key, 1.0
4031 return self._wrap_jax(init_func, propose_func,
4032 keys=['rigid_bodies'] if intcoord else None)
4033
4034
4035# Register BallMover in _IMP_core:
4036_IMP_core.BallMover_swigregister(BallMover)
4037class SerialMover(MonteCarloMover):
4038 r"""Proxy of C++ IMP::core::SerialMover class."""
4039
4040 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4041
4042 def __init__(self, *args):
4043 r"""
4044 __init__(SerialMover self, IMP::core::MonteCarloMoversTemp const & mvs) -> SerialMover
4045 __init__(SerialMover self) -> SerialMover
4046 """
4047 _IMP_core.SerialMover_swiginit(self, _IMP_core.new_SerialMover(*args))
4048
4049 def get_movers(self):
4050 r"""get_movers(SerialMover self) -> IMP::core::MonteCarloMovers const &"""
4051 return _IMP_core.SerialMover_get_movers(self)
4052
4053 def get_version_info(self):
4054 r"""get_version_info(SerialMover self) -> VersionInfo"""
4055 return _IMP_core.SerialMover_get_version_info(self)
4056 __swig_destroy__ = _IMP_core.delete_SerialMover
4057
4058 def __str__(self):
4059 r"""__str__(SerialMover self) -> std::string"""
4060 return _IMP_core.SerialMover___str__(self)
4061
4062 def __repr__(self):
4063 r"""__repr__(SerialMover self) -> std::string"""
4064 return _IMP_core.SerialMover___repr__(self)
4065
4066 @staticmethod
4067 def get_from(o):
4068 return _object_cast_to_SerialMover(o)
4069
4070
4071 def _get_as_binary(self):
4072 r"""_get_as_binary(SerialMover self) -> PyObject *"""
4073 return _IMP_core.SerialMover__get_as_binary(self)
4074
4075 def _set_from_binary(self, p):
4076 r"""_set_from_binary(SerialMover self, PyObject * p)"""
4077 return _IMP_core.SerialMover__set_from_binary(self, p)
4078
4079 def __getstate__(self):
4080 p = self._get_as_binary()
4081 if len(self.__dict__) > 1:
4082 d = self.__dict__.copy()
4083 del d['this']
4084 p = (d, p)
4085 return p
4086
4087 def __setstate__(self, p):
4088 if not hasattr(self, 'this'):
4089 self.__init__()
4090 if isinstance(p, tuple):
4091 d, p = p
4092 self.__dict__.update(d)
4093 return self._set_from_binary(p)
4094
4095
4096 def _get_jax(self, space):
4097 import jax.random
4098 import jax.lax
4099 import jax.numpy as jnp
4100 from IMP.core._jax_util import _SerialMover
4101 movers = [m.get_derived_object()._get_jax(space)
4102 for m in self.get_movers()]
4103
4104 def sub_propose_func(jm, sms, i):
4105 """Call the propose_func of the ith mover"""
4106 jm, sms.mover_state[i], ratio = movers[i].propose_func(
4107 jm, sms.mover_state[i])
4108 sms.proposed_mover_steps = sms.proposed_mover_steps.at[i].add(1)
4109 return jm, sms, ratio
4110
4111 sub_propose_funcs = [functools.partial(sub_propose_func, i=i)
4112 for i in range(len(movers))]
4113
4114 def init_func(key):
4115 # Initialize all movers and store their state in ours
4116 mover_state = []
4117 for m in movers:
4118 key, subkey = jax.random.split(key)
4119 mover_state.append(m.init_func(subkey))
4120 return _SerialMover(
4121 imov=-1, mover_state=mover_state,
4122 proposed_mover_steps=jnp.zeros(len(movers), dtype=int),
4123 accepted_mover_steps=jnp.zeros(len(movers), dtype=int))
4124
4125 def reset_stats_func(sms):
4126 sms.mover_state = [m.reset_stats_func(ms)
4127 if m.reset_stats_func else ms
4128 for (m, ms) in zip(movers, sms.mover_state)]
4129 sms.proposed_mover_steps = jnp.zeros(len(movers), dtype=int)
4130 sms.accepted_mover_steps = jnp.zeros(len(movers), dtype=int)
4131 return sms
4132
4133 def propose_func(jm, sms):
4134 sms.imov = jnp.mod(sms.imov + 1, len(movers))
4135 return jax.lax.switch(sms.imov, sub_propose_funcs, jm, sms)
4136
4137 def accept_func(sms):
4138 # Update statistics for the chosen mover
4139 sms.accepted_mover_steps = \
4140 sms.accepted_mover_steps.at[sms.imov].add(1)
4141 return sms
4142
4143 def sync_func(imp_mover, sms):
4144 # Copy submover statistics back to IMP Movers
4145 for i, mover in enumerate(imp_mover.get_movers()):
4146 mover.add_to_statistics(
4147 sms.proposed_mover_steps[i],
4148 sms.proposed_mover_steps[i] - sms.accepted_mover_steps[i])
4149
4150 return self._wrap_jax(
4151 init_func, propose_func, accept_func, sync_func,
4152 reset_stats_func=reset_stats_func,
4153 keys=frozenset(x for m in movers for x in m._keys))
4154
4155
4156# Register SerialMover in _IMP_core:
4157_IMP_core.SerialMover_swigregister(SerialMover)
4158class SubsetMover(MonteCarloMover):
4159 r"""Proxy of C++ IMP::core::SubsetMover class."""
4160
4161 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4162
4163 def __init__(self, *args):
4164 r"""
4165 __init__(SubsetMover self, IMP::core::MonteCarloMoversTemp const & mvs, unsigned int n) -> SubsetMover
4166 __init__(SubsetMover self) -> SubsetMover
4167 """
4168 _IMP_core.SubsetMover_swiginit(self, _IMP_core.new_SubsetMover(*args))
4169
4170 def get_movers(self):
4171 r"""get_movers(SubsetMover self) -> IMP::core::MonteCarloMovers const &"""
4172 return _IMP_core.SubsetMover_get_movers(self)
4173
4174 def get_subset_size(self):
4175 r"""get_subset_size(SubsetMover self) -> unsigned int"""
4176 return _IMP_core.SubsetMover_get_subset_size(self)
4177
4178 def get_version_info(self):
4179 r"""get_version_info(SubsetMover self) -> VersionInfo"""
4180 return _IMP_core.SubsetMover_get_version_info(self)
4181 __swig_destroy__ = _IMP_core.delete_SubsetMover
4182
4183 def __str__(self):
4184 r"""__str__(SubsetMover self) -> std::string"""
4185 return _IMP_core.SubsetMover___str__(self)
4186
4187 def __repr__(self):
4188 r"""__repr__(SubsetMover self) -> std::string"""
4189 return _IMP_core.SubsetMover___repr__(self)
4190
4191 @staticmethod
4192 def get_from(o):
4193 return _object_cast_to_SubsetMover(o)
4194
4195
4196 def _get_as_binary(self):
4197 r"""_get_as_binary(SubsetMover self) -> PyObject *"""
4198 return _IMP_core.SubsetMover__get_as_binary(self)
4199
4200 def _set_from_binary(self, p):
4201 r"""_set_from_binary(SubsetMover self, PyObject * p)"""
4202 return _IMP_core.SubsetMover__set_from_binary(self, p)
4203
4204 def __getstate__(self):
4205 p = self._get_as_binary()
4206 if len(self.__dict__) > 1:
4207 d = self.__dict__.copy()
4208 del d['this']
4209 p = (d, p)
4210 return p
4211
4212 def __setstate__(self, p):
4213 if not hasattr(self, 'this'):
4214 self.__init__()
4215 if isinstance(p, tuple):
4216 d, p = p
4217 self.__dict__.update(d)
4218 return self._set_from_binary(p)
4219
4220
4221# Register SubsetMover in _IMP_core:
4222_IMP_core.SubsetMover_swigregister(SubsetMover)
4223class DirectionMover(MonteCarloMover):
4224 r"""Proxy of C++ IMP::core::DirectionMover class."""
4225
4226 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4227
4228 def __init__(self, *args):
4229 r"""
4230 __init__(DirectionMover self, Model m, ParticleIndex pi, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4231 __init__(DirectionMover self, Direction d, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4232 __init__(DirectionMover self) -> DirectionMover
4233 """
4234 _IMP_core.DirectionMover_swiginit(self, _IMP_core.new_DirectionMover(*args))
4235
4236 def set_maximum_rotation(self, mr):
4237 r"""set_maximum_rotation(DirectionMover self, IMP::Float mr)"""
4238 return _IMP_core.DirectionMover_set_maximum_rotation(self, mr)
4239
4240 def set_reflect_probability(self, rp):
4241 r"""set_reflect_probability(DirectionMover self, IMP::Float rp)"""
4242 return _IMP_core.DirectionMover_set_reflect_probability(self, rp)
4243
4244 def get_maximum_rotation(self):
4245 r"""get_maximum_rotation(DirectionMover self) -> IMP::Float"""
4246 return _IMP_core.DirectionMover_get_maximum_rotation(self)
4247
4248 def get_reflect_probability(self):
4249 r"""get_reflect_probability(DirectionMover self) -> IMP::Float"""
4250 return _IMP_core.DirectionMover_get_reflect_probability(self)
4251
4252 def get_direction(self):
4253 r"""get_direction(DirectionMover self) -> Direction"""
4254 return _IMP_core.DirectionMover_get_direction(self)
4255
4256 def get_version_info(self):
4257 r"""get_version_info(DirectionMover self) -> VersionInfo"""
4258 return _IMP_core.DirectionMover_get_version_info(self)
4259 __swig_destroy__ = _IMP_core.delete_DirectionMover
4260
4261 def __str__(self):
4262 r"""__str__(DirectionMover self) -> std::string"""
4263 return _IMP_core.DirectionMover___str__(self)
4264
4265 def __repr__(self):
4266 r"""__repr__(DirectionMover self) -> std::string"""
4267 return _IMP_core.DirectionMover___repr__(self)
4268
4269 @staticmethod
4270 def get_from(o):
4271 return _object_cast_to_DirectionMover(o)
4272
4273
4274 def _get_as_binary(self):
4275 r"""_get_as_binary(DirectionMover self) -> PyObject *"""
4276 return _IMP_core.DirectionMover__get_as_binary(self)
4277
4278 def _set_from_binary(self, p):
4279 r"""_set_from_binary(DirectionMover self, PyObject * p)"""
4280 return _IMP_core.DirectionMover__set_from_binary(self, p)
4281
4282 def __getstate__(self):
4283 p = self._get_as_binary()
4284 if len(self.__dict__) > 1:
4285 d = self.__dict__.copy()
4286 del d['this']
4287 p = (d, p)
4288 return p
4289
4290 def __setstate__(self, p):
4291 if not hasattr(self, 'this'):
4292 self.__init__()
4293 if isinstance(p, tuple):
4294 d, p = p
4295 self.__dict__.update(d)
4296 return self._set_from_binary(p)
4297
4298
4299# Register DirectionMover in _IMP_core:
4300_IMP_core.DirectionMover_swigregister(DirectionMover)
4301class SurfaceMover(MonteCarloMover):
4302 r"""Proxy of C++ IMP::core::SurfaceMover class."""
4303
4304 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4305
4306 def __init__(self, *args):
4307 r"""
4308 __init__(SurfaceMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4309 __init__(SurfaceMover self, Surface s, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4310 __init__(SurfaceMover self) -> SurfaceMover
4311 """
4312 _IMP_core.SurfaceMover_swiginit(self, _IMP_core.new_SurfaceMover(*args))
4313
4314 def set_maximum_translation(self, mt):
4315 r"""set_maximum_translation(SurfaceMover self, IMP::Float mt)"""
4316 return _IMP_core.SurfaceMover_set_maximum_translation(self, mt)
4317
4318 def set_maximum_rotation(self, mr):
4319 r"""set_maximum_rotation(SurfaceMover self, IMP::Float mr)"""
4320 return _IMP_core.SurfaceMover_set_maximum_rotation(self, mr)
4321
4322 def set_reflect_probability(self, rp):
4323 r"""set_reflect_probability(SurfaceMover self, IMP::Float rp)"""
4324 return _IMP_core.SurfaceMover_set_reflect_probability(self, rp)
4325
4326 def get_maximum_translation(self):
4327 r"""get_maximum_translation(SurfaceMover self) -> IMP::Float"""
4328 return _IMP_core.SurfaceMover_get_maximum_translation(self)
4329
4330 def get_maximum_rotation(self):
4331 r"""get_maximum_rotation(SurfaceMover self) -> IMP::Float"""
4332 return _IMP_core.SurfaceMover_get_maximum_rotation(self)
4333
4334 def get_reflect_probability(self):
4335 r"""get_reflect_probability(SurfaceMover self) -> IMP::Float"""
4336 return _IMP_core.SurfaceMover_get_reflect_probability(self)
4337
4338 def get_surface(self):
4339 r"""get_surface(SurfaceMover self) -> Surface"""
4340 return _IMP_core.SurfaceMover_get_surface(self)
4341
4342 def get_version_info(self):
4343 r"""get_version_info(SurfaceMover self) -> VersionInfo"""
4344 return _IMP_core.SurfaceMover_get_version_info(self)
4345 __swig_destroy__ = _IMP_core.delete_SurfaceMover
4346
4347 def __str__(self):
4348 r"""__str__(SurfaceMover self) -> std::string"""
4349 return _IMP_core.SurfaceMover___str__(self)
4350
4351 def __repr__(self):
4352 r"""__repr__(SurfaceMover self) -> std::string"""
4353 return _IMP_core.SurfaceMover___repr__(self)
4354
4355 @staticmethod
4356 def get_from(o):
4357 return _object_cast_to_SurfaceMover(o)
4358
4359
4360 def _get_as_binary(self):
4361 r"""_get_as_binary(SurfaceMover self) -> PyObject *"""
4362 return _IMP_core.SurfaceMover__get_as_binary(self)
4363
4364 def _set_from_binary(self, p):
4365 r"""_set_from_binary(SurfaceMover self, PyObject * p)"""
4366 return _IMP_core.SurfaceMover__set_from_binary(self, p)
4367
4368 def __getstate__(self):
4369 p = self._get_as_binary()
4370 if len(self.__dict__) > 1:
4371 d = self.__dict__.copy()
4372 del d['this']
4373 p = (d, p)
4374 return p
4375
4376 def __setstate__(self, p):
4377 if not hasattr(self, 'this'):
4378 self.__init__()
4379 if isinstance(p, tuple):
4380 d, p = p
4381 self.__dict__.update(d)
4382 return self._set_from_binary(p)
4383
4384
4385# Register SurfaceMover in _IMP_core:
4386_IMP_core.SurfaceMover_swigregister(SurfaceMover)
4387class BoxSweepClosePairsFinder(ClosePairsFinder):
4388 r"""Proxy of C++ IMP::core::BoxSweepClosePairsFinder class."""
4389
4390 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4391
4392 def __init__(self):
4393 r"""__init__(BoxSweepClosePairsFinder self) -> BoxSweepClosePairsFinder"""
4394 _IMP_core.BoxSweepClosePairsFinder_swiginit(self, _IMP_core.new_BoxSweepClosePairsFinder())
4395
4396 def get_close_pairs(self, *args):
4397 r"""
4398 get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4399 get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4400 get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
4401 get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
4402 """
4403 return _IMP_core.BoxSweepClosePairsFinder_get_close_pairs(self, *args)
4404
4405 def do_get_inputs(self, m, pis):
4406 r"""do_get_inputs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4407 return _IMP_core.BoxSweepClosePairsFinder_do_get_inputs(self, m, pis)
4408
4409 def get_version_info(self):
4410 r"""get_version_info(BoxSweepClosePairsFinder self) -> VersionInfo"""
4411 return _IMP_core.BoxSweepClosePairsFinder_get_version_info(self)
4412 __swig_destroy__ = _IMP_core.delete_BoxSweepClosePairsFinder
4413
4414 def __str__(self):
4415 r"""__str__(BoxSweepClosePairsFinder self) -> std::string"""
4416 return _IMP_core.BoxSweepClosePairsFinder___str__(self)
4417
4418 def __repr__(self):
4419 r"""__repr__(BoxSweepClosePairsFinder self) -> std::string"""
4420 return _IMP_core.BoxSweepClosePairsFinder___repr__(self)
4421
4422 @staticmethod
4423 def get_from(o):
4424 return _object_cast_to_BoxSweepClosePairsFinder(o)
4425
4426
4427# Register BoxSweepClosePairsFinder in _IMP_core:
4428_IMP_core.BoxSweepClosePairsFinder_swigregister(BoxSweepClosePairsFinder)
4429class CentroidOfRefined(IMP.SingletonModifier):
4430 r"""Proxy of C++ IMP::core::CentroidOfRefined class."""
4431
4432 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4433
4434 def __init__(self, *args):
4435 r"""
4436 __init__(CentroidOfRefined self, Refiner r, FloatKey weight=IMP::FloatKey(), IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> CentroidOfRefined
4437 __init__(CentroidOfRefined self) -> CentroidOfRefined
4438 """
4439 _IMP_core.CentroidOfRefined_swiginit(self, _IMP_core.new_CentroidOfRefined(*args))
4440
4441 def get_refiner(self):
4442 r"""get_refiner(CentroidOfRefined self) -> Refiner"""
4443 return _IMP_core.CentroidOfRefined_get_refiner(self)
4444
4445 def get_weight(self):
4446 r"""get_weight(CentroidOfRefined self) -> FloatKey"""
4447 return _IMP_core.CentroidOfRefined_get_weight(self)
4448
4449 def get_keys(self):
4450 r"""get_keys(CentroidOfRefined self) -> IMP::FloatKeys"""
4451 return _IMP_core.CentroidOfRefined_get_keys(self)
4452
4453 def get_is_weight_null(self):
4454 r"""get_is_weight_null(CentroidOfRefined self) -> bool"""
4455 return _IMP_core.CentroidOfRefined_get_is_weight_null(self)
4456
4457 def do_get_inputs(self, m, pis):
4458 r"""do_get_inputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4459 return _IMP_core.CentroidOfRefined_do_get_inputs(self, m, pis)
4460
4461 def do_get_outputs(self, m, pis):
4462 r"""do_get_outputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4463 return _IMP_core.CentroidOfRefined_do_get_outputs(self, m, pis)
4464
4465 def get_version_info(self):
4466 r"""get_version_info(CentroidOfRefined self) -> VersionInfo"""
4467 return _IMP_core.CentroidOfRefined_get_version_info(self)
4468 __swig_destroy__ = _IMP_core.delete_CentroidOfRefined
4469
4470 def __str__(self):
4471 r"""__str__(CentroidOfRefined self) -> std::string"""
4472 return _IMP_core.CentroidOfRefined___str__(self)
4473
4474 def __repr__(self):
4475 r"""__repr__(CentroidOfRefined self) -> std::string"""
4476 return _IMP_core.CentroidOfRefined___repr__(self)
4477
4478 @staticmethod
4479 def get_from(o):
4480 return _object_cast_to_CentroidOfRefined(o)
4481
4482
4483 def _get_as_binary(self):
4484 r"""_get_as_binary(CentroidOfRefined self) -> PyObject *"""
4485 return _IMP_core.CentroidOfRefined__get_as_binary(self)
4486
4487 def _set_from_binary(self, p):
4488 r"""_set_from_binary(CentroidOfRefined self, PyObject * p)"""
4489 return _IMP_core.CentroidOfRefined__set_from_binary(self, p)
4490
4491 def __getstate__(self):
4492 p = self._get_as_binary()
4493 if len(self.__dict__) > 1:
4494 d = self.__dict__.copy()
4495 del d['this']
4496 p = (d, p)
4497 return p
4498
4499 def __setstate__(self, p):
4500 if not hasattr(self, 'this'):
4501 self.__init__()
4502 if isinstance(p, tuple):
4503 d, p = p
4504 self.__dict__.update(d)
4505 return self._set_from_binary(p)
4506
4507
4508 def _get_jax(self, m, indexes):
4509 import jax.numpy as jnp
4510 refined = [
4511 self.get_refiner().get_refined_indexes(m, IMP.ParticleIndex(index))
4512 for index in indexes]
4513
4514 def apply_func_unweighted(jm):
4515 for ind, ref in zip(indexes, refined):
4516 xyz = jm['xyz']
4517 jm['xyz'] = xyz.at[ind].set(jnp.average(xyz[ref], axis=0))
4518 return jm
4519
4520 def apply_func_weighted(jm, weight_key):
4521 for ind, ref in zip(indexes, refined):
4522 xyz = jm['xyz']
4523 weights = jm[weight_key][ref]
4524 jm['xyz'] = xyz.at[ind].set(
4525 jnp.average(xyz[ref], axis=0, weights=weights))
4526 return jm
4527
4528 keys = frozenset(self.get_keys())
4529 if keys != frozenset(IMP.core.XYZ.get_xyz_keys()):
4530 raise NotImplementedError("Only works for XYZ")
4531
4532 if self.get_is_weight_null():
4533 return self._wrap_jax(apply_func_unweighted)
4534 else:
4535 weight_key = self.get_weight()
4536 return self._wrap_jax(
4537 functools.partial(apply_func_weighted,
4538 weight_key=weight_key.get_string()),
4539 keys=(weight_key,))
4540
4541
4542# Register CentroidOfRefined in _IMP_core:
4543_IMP_core.CentroidOfRefined_swigregister(CentroidOfRefined)
4544class Centroid(XYZ):
4545 r"""Proxy of C++ IMP::core::Centroid class."""
4546
4547 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4548
4549 def get_constraint(self):
4550 r"""get_constraint(Centroid self) -> Constraint"""
4551 return _IMP_core.Centroid_get_constraint(self)
4552
4553 def __init__(self, *args):
4554 r"""
4555 __init__(Centroid self) -> Centroid
4556 __init__(Centroid self, Model m, ParticleIndex id) -> Centroid
4557 __init__(Centroid self, _ParticleAdaptor d) -> Centroid
4558 """
4559 _IMP_core.Centroid_swiginit(self, _IMP_core.new_Centroid(*args))
4560
4561 def show(self, *args):
4562 r"""show(Centroid self, _ostream out=std::cout)"""
4563 return _IMP_core.Centroid_show(self, *args)
4564
4565 @staticmethod
4566 def setup_particle(*args):
4567 r"""
4568 setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Centroid
4569 setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Centroid
4570 setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Centroid
4571 setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Centroid
4572 """
4573 return _IMP_core.Centroid_setup_particle(*args)
4574
4575 @staticmethod
4576 def get_is_setup(*args):
4577 r"""
4578 get_is_setup(_ParticleAdaptor p) -> bool
4579 get_is_setup(Model m, ParticleIndex pi) -> bool
4580 """
4581 return _IMP_core.Centroid_get_is_setup(*args)
4582
4583 def add_attribute(self, *args):
4584 r"""
4585 add_attribute(Centroid self, FloatKey k, IMP::Float v, bool opt)
4586 add_attribute(Centroid self, FloatKey a0, IMP::Float a1)
4587 add_attribute(Centroid self, IntKey a0, IMP::Int a1)
4588 add_attribute(Centroid self, FloatsKey a0, IMP::Floats a1)
4589 add_attribute(Centroid self, IntsKey a0, IMP::Ints a1)
4590 add_attribute(Centroid self, StringKey a0, IMP::String a1)
4591 add_attribute(Centroid self, ParticleIndexKey a0, Particle a1)
4592 add_attribute(Centroid self, ObjectKey a0, Object a1)
4593 add_attribute(Centroid self, SparseFloatKey a0, IMP::Float a1)
4594 add_attribute(Centroid self, SparseIntKey a0, IMP::Int a1)
4595 add_attribute(Centroid self, SparseStringKey a0, IMP::String a1)
4596 add_attribute(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4597 """
4598 return _IMP_core.Centroid_add_attribute(self, *args)
4599
4600 def get_value(self, *args):
4601 r"""
4602 get_value(Centroid self, FloatKey a0) -> IMP::Float
4603 get_value(Centroid self, IntKey a0) -> IMP::Int
4604 get_value(Centroid self, FloatsKey a0) -> IMP::Floats
4605 get_value(Centroid self, IntsKey a0) -> IMP::Ints
4606 get_value(Centroid self, StringKey a0) -> IMP::String
4607 get_value(Centroid self, ParticleIndexKey a0) -> Particle
4608 get_value(Centroid self, ObjectKey a0) -> Object
4609 get_value(Centroid self, SparseFloatKey a0) -> IMP::Float
4610 get_value(Centroid self, SparseIntKey a0) -> IMP::Int
4611 get_value(Centroid self, SparseStringKey a0) -> IMP::String
4612 get_value(Centroid self, SparseParticleIndexKey a0) -> ParticleIndex
4613 """
4614 return _IMP_core.Centroid_get_value(self, *args)
4615
4616 def set_value(self, *args):
4617 r"""
4618 set_value(Centroid self, FloatKey a0, IMP::Float a1)
4619 set_value(Centroid self, IntKey a0, IMP::Int a1)
4620 set_value(Centroid self, FloatsKey a0, IMP::Floats a1)
4621 set_value(Centroid self, IntsKey a0, IMP::Ints a1)
4622 set_value(Centroid self, StringKey a0, IMP::String a1)
4623 set_value(Centroid self, ParticleIndexKey a0, Particle a1)
4624 set_value(Centroid self, ObjectKey a0, Object a1)
4625 set_value(Centroid self, SparseFloatKey a0, IMP::Float a1)
4626 set_value(Centroid self, SparseIntKey a0, IMP::Int a1)
4627 set_value(Centroid self, SparseStringKey a0, IMP::String a1)
4628 set_value(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4629 """
4630 return _IMP_core.Centroid_set_value(self, *args)
4631
4632 def remove_attribute(self, *args):
4633 r"""
4634 remove_attribute(Centroid self, FloatKey a0)
4635 remove_attribute(Centroid self, IntKey a0)
4636 remove_attribute(Centroid self, FloatsKey a0)
4637 remove_attribute(Centroid self, IntsKey a0)
4638 remove_attribute(Centroid self, StringKey a0)
4639 remove_attribute(Centroid self, ParticleIndexKey a0)
4640 remove_attribute(Centroid self, ObjectKey a0)
4641 remove_attribute(Centroid self, SparseFloatKey a0)
4642 remove_attribute(Centroid self, SparseIntKey a0)
4643 remove_attribute(Centroid self, SparseStringKey a0)
4644 remove_attribute(Centroid self, SparseParticleIndexKey a0)
4645 """
4646 return _IMP_core.Centroid_remove_attribute(self, *args)
4647
4648 def has_attribute(self, *args):
4649 r"""
4650 has_attribute(Centroid self, FloatKey a0) -> bool
4651 has_attribute(Centroid self, IntKey a0) -> bool
4652 has_attribute(Centroid self, FloatsKey a0) -> bool
4653 has_attribute(Centroid self, IntsKey a0) -> bool
4654 has_attribute(Centroid self, StringKey a0) -> bool
4655 has_attribute(Centroid self, ParticleIndexKey a0) -> bool
4656 has_attribute(Centroid self, ObjectKey a0) -> bool
4657 has_attribute(Centroid self, SparseFloatKey a0) -> bool
4658 has_attribute(Centroid self, SparseIntKey a0) -> bool
4659 has_attribute(Centroid self, SparseStringKey a0) -> bool
4660 has_attribute(Centroid self, SparseParticleIndexKey a0) -> bool
4661 """
4662 return _IMP_core.Centroid_has_attribute(self, *args)
4663
4664 def get_derivative(self, a0):
4665 r"""get_derivative(Centroid self, FloatKey a0) -> double"""
4666 return _IMP_core.Centroid_get_derivative(self, a0)
4667
4668 def get_name(self):
4669 r"""get_name(Centroid self) -> std::string"""
4670 return _IMP_core.Centroid_get_name(self)
4671
4672 def clear_caches(self):
4673 r"""clear_caches(Centroid self)"""
4674 return _IMP_core.Centroid_clear_caches(self)
4675
4676 def set_name(self, a0):
4677 r"""set_name(Centroid self, std::string a0)"""
4678 return _IMP_core.Centroid_set_name(self, a0)
4679
4680 def set_check_level(self, a0):
4681 r"""set_check_level(Centroid self, IMP::CheckLevel a0)"""
4682 return _IMP_core.Centroid_set_check_level(self, a0)
4683
4684 def add_to_derivative(self, a0, a1, a2):
4685 r"""add_to_derivative(Centroid self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
4686 return _IMP_core.Centroid_add_to_derivative(self, a0, a1, a2)
4687
4688 def set_is_optimized(self, a0, a1):
4689 r"""set_is_optimized(Centroid self, FloatKey a0, bool a1)"""
4690 return _IMP_core.Centroid_set_is_optimized(self, a0, a1)
4691
4692 def get_is_optimized(self, a0):
4693 r"""get_is_optimized(Centroid self, FloatKey a0) -> bool"""
4694 return _IMP_core.Centroid_get_is_optimized(self, a0)
4695
4696 def get_check_level(self):
4697 r"""get_check_level(Centroid self) -> IMP::CheckLevel"""
4698 return _IMP_core.Centroid_get_check_level(self)
4699
4700 def __eq__(self, *args):
4701 r"""
4702 __eq__(Centroid self, Centroid o) -> bool
4703 __eq__(Centroid self, Particle d) -> bool
4704 """
4705 return _IMP_core.Centroid___eq__(self, *args)
4706
4707 def __ne__(self, *args):
4708 r"""
4709 __ne__(Centroid self, Centroid o) -> bool
4710 __ne__(Centroid self, Particle d) -> bool
4711 """
4712 return _IMP_core.Centroid___ne__(self, *args)
4713
4714 def __le__(self, *args):
4715 r"""
4716 __le__(Centroid self, Centroid o) -> bool
4717 __le__(Centroid self, Particle d) -> bool
4718 """
4719 return _IMP_core.Centroid___le__(self, *args)
4720
4721 def __lt__(self, *args):
4722 r"""
4723 __lt__(Centroid self, Centroid o) -> bool
4724 __lt__(Centroid self, Particle d) -> bool
4725 """
4726 return _IMP_core.Centroid___lt__(self, *args)
4727
4728 def __ge__(self, *args):
4729 r"""
4730 __ge__(Centroid self, Centroid o) -> bool
4731 __ge__(Centroid self, Particle d) -> bool
4732 """
4733 return _IMP_core.Centroid___ge__(self, *args)
4734
4735 def __gt__(self, *args):
4736 r"""
4737 __gt__(Centroid self, Centroid o) -> bool
4738 __gt__(Centroid self, Particle d) -> bool
4739 """
4740 return _IMP_core.Centroid___gt__(self, *args)
4741
4742 def __hash__(self):
4743 r"""__hash__(Centroid self) -> std::size_t"""
4744 return _IMP_core.Centroid___hash__(self)
4745
4746 def __str__(self):
4747 r"""__str__(Centroid self) -> std::string"""
4748 return _IMP_core.Centroid___str__(self)
4749
4750 def __repr__(self):
4751 r"""__repr__(Centroid self) -> std::string"""
4752 return _IMP_core.Centroid___repr__(self)
4753
4754 def _get_as_binary(self):
4755 r"""_get_as_binary(Centroid self) -> PyObject *"""
4756 return _IMP_core.Centroid__get_as_binary(self)
4757
4758 def _set_from_binary(self, p):
4759 r"""_set_from_binary(Centroid self, PyObject * p)"""
4760 return _IMP_core.Centroid__set_from_binary(self, p)
4761
4762 def __getstate__(self):
4763 p = self._get_as_binary()
4764 if len(self.__dict__) > 1:
4765 d = self.__dict__.copy()
4766 del d['this']
4767 p = (d, p)
4768 return p
4769
4770 def __setstate__(self, p):
4771 if not hasattr(self, 'this'):
4772 self.__init__()
4773 if isinstance(p, tuple):
4774 d, p = p
4775 self.__dict__.update(d)
4776 return self._set_from_binary(p)
4777
4778 __swig_destroy__ = _IMP_core.delete_Centroid
4779
4780# Register Centroid in _IMP_core:
4781_IMP_core.Centroid_swigregister(Centroid)
4782class ChecksScoreState(IMP.ScoreState):
4783 r"""Proxy of C++ IMP::core::ChecksScoreState class."""
4784
4785 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4786
4787 def __init__(self, *args):
4788 r"""
4789 __init__(ChecksScoreState self, Model m, double probability) -> ChecksScoreState
4790 __init__(ChecksScoreState self) -> ChecksScoreState
4791 """
4792 _IMP_core.ChecksScoreState_swiginit(self, _IMP_core.new_ChecksScoreState(*args))
4793
4794 def get_number_of_checked(self):
4795 r"""get_number_of_checked(ChecksScoreState self) -> unsigned int"""
4796 return _IMP_core.ChecksScoreState_get_number_of_checked(self)
4797
4798 def do_before_evaluate(self):
4799 r"""do_before_evaluate(ChecksScoreState self)"""
4800 return _IMP_core.ChecksScoreState_do_before_evaluate(self)
4801
4802 def do_after_evaluate(self, da):
4803 r"""do_after_evaluate(ChecksScoreState self, DerivativeAccumulator da)"""
4804 return _IMP_core.ChecksScoreState_do_after_evaluate(self, da)
4805
4806 def do_get_outputs(self):
4807 r"""do_get_outputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4808 return _IMP_core.ChecksScoreState_do_get_outputs(self)
4809
4810 def do_get_inputs(self):
4811 r"""do_get_inputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4812 return _IMP_core.ChecksScoreState_do_get_inputs(self)
4813
4814 def get_version_info(self):
4815 r"""get_version_info(ChecksScoreState self) -> VersionInfo"""
4816 return _IMP_core.ChecksScoreState_get_version_info(self)
4817 __swig_destroy__ = _IMP_core.delete_ChecksScoreState
4818
4819 def __str__(self):
4820 r"""__str__(ChecksScoreState self) -> std::string"""
4821 return _IMP_core.ChecksScoreState___str__(self)
4822
4823 def __repr__(self):
4824 r"""__repr__(ChecksScoreState self) -> std::string"""
4825 return _IMP_core.ChecksScoreState___repr__(self)
4826
4827 @staticmethod
4828 def get_from(o):
4829 return _object_cast_to_ChecksScoreState(o)
4830
4831
4832 def _get_as_binary(self):
4833 r"""_get_as_binary(ChecksScoreState self) -> PyObject *"""
4834 return _IMP_core.ChecksScoreState__get_as_binary(self)
4835
4836 def _set_from_binary(self, p):
4837 r"""_set_from_binary(ChecksScoreState self, PyObject * p)"""
4838 return _IMP_core.ChecksScoreState__set_from_binary(self, p)
4839
4840 def __getstate__(self):
4841 p = self._get_as_binary()
4842 if len(self.__dict__) > 1:
4843 d = self.__dict__.copy()
4844 del d['this']
4845 p = (d, p)
4846 return p
4847
4848 def __setstate__(self, p):
4849 if not hasattr(self, 'this'):
4850 self.__init__()
4851 if isinstance(p, tuple):
4852 d, p = p
4853 self.__dict__.update(d)
4854 return self._set_from_binary(p)
4855
4856
4857# Register ChecksScoreState in _IMP_core:
4858_IMP_core.ChecksScoreState_swigregister(ChecksScoreState)
4859class ChildrenRefiner(IMP.Refiner):
4860 r"""Proxy of C++ IMP::core::ChildrenRefiner class."""
4861
4862 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4863
4864 def __init__(self, tr):
4865 r"""__init__(ChildrenRefiner self, HierarchyTraits tr) -> ChildrenRefiner"""
4866 _IMP_core.ChildrenRefiner_swiginit(self, _IMP_core.new_ChildrenRefiner(tr))
4867
4868 def do_get_inputs(self, m, pis):
4869 r"""do_get_inputs(ChildrenRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4870 return _IMP_core.ChildrenRefiner_do_get_inputs(self, m, pis)
4871
4872 def get_version_info(self):
4873 r"""get_version_info(ChildrenRefiner self) -> VersionInfo"""
4874 return _IMP_core.ChildrenRefiner_get_version_info(self)
4875 __swig_destroy__ = _IMP_core.delete_ChildrenRefiner
4876
4877 def __str__(self):
4878 r"""__str__(ChildrenRefiner self) -> std::string"""
4879 return _IMP_core.ChildrenRefiner___str__(self)
4880
4881 def __repr__(self):
4882 r"""__repr__(ChildrenRefiner self) -> std::string"""
4883 return _IMP_core.ChildrenRefiner___repr__(self)
4884
4885 @staticmethod
4886 def get_from(o):
4887 return _object_cast_to_ChildrenRefiner(o)
4888
4889
4890# Register ChildrenRefiner in _IMP_core:
4891_IMP_core.ChildrenRefiner_swigregister(ChildrenRefiner)
4892class ClosedCubicSpline(IMP.UnaryFunction):
4893 r"""Proxy of C++ IMP::core::ClosedCubicSpline class."""
4894
4895 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4896
4897 def __init__(self, values, minrange, spacing):
4898 r"""__init__(ClosedCubicSpline self, IMP::Floats const & values, double minrange, double spacing) -> ClosedCubicSpline"""
4899 _IMP_core.ClosedCubicSpline_swiginit(self, _IMP_core.new_ClosedCubicSpline(values, minrange, spacing))
4900
4901 def get_version_info(self):
4902 r"""get_version_info(ClosedCubicSpline self) -> VersionInfo"""
4903 return _IMP_core.ClosedCubicSpline_get_version_info(self)
4904 __swig_destroy__ = _IMP_core.delete_ClosedCubicSpline
4905
4906 def do_show(self, out):
4907 r"""do_show(ClosedCubicSpline self, _ostream out)"""
4908 return _IMP_core.ClosedCubicSpline_do_show(self, out)
4909
4910 def get_minrange(self):
4911 r"""get_minrange(ClosedCubicSpline self) -> IMP::Float"""
4912 return _IMP_core.ClosedCubicSpline_get_minrange(self)
4913
4914 def get_spacing(self):
4915 r"""get_spacing(ClosedCubicSpline self) -> IMP::Float"""
4916 return _IMP_core.ClosedCubicSpline_get_spacing(self)
4917
4918 def get_values(self):
4919 r"""get_values(ClosedCubicSpline self) -> IMP::Floats"""
4920 return _IMP_core.ClosedCubicSpline_get_values(self)
4921
4922 def get_second_derivatives(self):
4923 r"""get_second_derivatives(ClosedCubicSpline self) -> IMP::Floats"""
4924 return _IMP_core.ClosedCubicSpline_get_second_derivatives(self)
4925
4926 def __str__(self):
4927 r"""__str__(ClosedCubicSpline self) -> std::string"""
4928 return _IMP_core.ClosedCubicSpline___str__(self)
4929
4930 def __repr__(self):
4931 r"""__repr__(ClosedCubicSpline self) -> std::string"""
4932 return _IMP_core.ClosedCubicSpline___repr__(self)
4933
4934 @staticmethod
4935 def get_from(o):
4936 return _object_cast_to_ClosedCubicSpline(o)
4937
4938
4939 def _get_jax(self):
4940 import jax.numpy as jnp
4941 from IMP.core._jax_util import _spline
4942 def score(feature, minrange, spacing, values, second_derivs):
4943 # determine bin index and thus the cubic fragment to use:
4944 lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
4945 # enforce periodicity - wrap around from n to 0
4946 highbin = jnp.remainder(lowbin + 1, len(values))
4947 return _spline(feature, minrange, lowbin, highbin, spacing,
4948 values, second_derivs)
4949 return functools.partial(
4950 score, minrange=self.get_minrange(),
4951 spacing=self.get_spacing(), values=jnp.asarray(self.get_values()),
4952 second_derivs=jnp.asarray(self.get_second_derivatives()))
4953
4954
4955# Register ClosedCubicSpline in _IMP_core:
4956_IMP_core.ClosedCubicSpline_swigregister(ClosedCubicSpline)
4957class KClosePairsPairScore(IMP.PairScore):
4958 r"""Proxy of C++ IMP::core::KClosePairsPairScore class."""
4959
4960 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4961
4962 def __init__(self, f, r, k=1):
4963 r"""__init__(KClosePairsPairScore self, PairScore f, Refiner r, int k=1) -> KClosePairsPairScore"""
4964 _IMP_core.KClosePairsPairScore_swiginit(self, _IMP_core.new_KClosePairsPairScore(f, r, k))
4965
4966 def get_close_pairs(self, pp):
4967 r"""get_close_pairs(KClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
4968 return _IMP_core.KClosePairsPairScore_get_close_pairs(self, pp)
4969
4970 def create_current_decomposition(self, m, vt):
4971 r"""create_current_decomposition(KClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
4972 return _IMP_core.KClosePairsPairScore_create_current_decomposition(self, m, vt)
4973
4974 def do_get_inputs(self, m, pis):
4975 r"""do_get_inputs(KClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4976 return _IMP_core.KClosePairsPairScore_do_get_inputs(self, m, pis)
4977
4978 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
4979 r"""evaluate_indexes(KClosePairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
4980 return _IMP_core.KClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
4981
4982 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
4983 r"""evaluate_indexes_scores(KClosePairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
4984 return _IMP_core.KClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
4985
4986 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
4987 r"""evaluate_indexes_delta(KClosePairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
4988 return _IMP_core.KClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
4989
4990 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
4991 r"""evaluate_if_good_indexes(KClosePairsPairScore 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"""
4992 return _IMP_core.KClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
4993
4994 def get_version_info(self):
4995 r"""get_version_info(KClosePairsPairScore self) -> VersionInfo"""
4996 return _IMP_core.KClosePairsPairScore_get_version_info(self)
4997 __swig_destroy__ = _IMP_core.delete_KClosePairsPairScore
4998
4999 def __str__(self):
5000 r"""__str__(KClosePairsPairScore self) -> std::string"""
5001 return _IMP_core.KClosePairsPairScore___str__(self)
5002
5003 def __repr__(self):
5004 r"""__repr__(KClosePairsPairScore self) -> std::string"""
5005 return _IMP_core.KClosePairsPairScore___repr__(self)
5006
5007 @staticmethod
5008 def get_from(o):
5009 return _object_cast_to_KClosePairsPairScore(o)
5010
5011
5012# Register KClosePairsPairScore in _IMP_core:
5013_IMP_core.KClosePairsPairScore_swigregister(KClosePairsPairScore)
5014class ClosePairsPairScore(IMP.PairScore):
5015 r"""Proxy of C++ IMP::core::ClosePairsPairScore class."""
5016
5017 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5018
5019 def __init__(self, f, r, max_distance):
5020 r"""__init__(ClosePairsPairScore self, PairScore f, Refiner r, IMP::Float max_distance) -> ClosePairsPairScore"""
5021 _IMP_core.ClosePairsPairScore_swiginit(self, _IMP_core.new_ClosePairsPairScore(f, r, max_distance))
5022
5023 def get_close_pairs(self, pp):
5024 r"""get_close_pairs(ClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
5025 return _IMP_core.ClosePairsPairScore_get_close_pairs(self, pp)
5026
5027 def create_current_decomposition(self, m, vt):
5028 r"""create_current_decomposition(ClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
5029 return _IMP_core.ClosePairsPairScore_create_current_decomposition(self, m, vt)
5030
5031 def do_get_inputs(self, m, pis):
5032 r"""do_get_inputs(ClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5033 return _IMP_core.ClosePairsPairScore_do_get_inputs(self, m, pis)
5034
5035 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
5036 r"""evaluate_indexes(ClosePairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
5037 return _IMP_core.ClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
5038
5039 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
5040 r"""evaluate_indexes_scores(ClosePairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
5041 return _IMP_core.ClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
5042
5043 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
5044 r"""evaluate_indexes_delta(ClosePairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
5045 return _IMP_core.ClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
5046
5047 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
5048 r"""evaluate_if_good_indexes(ClosePairsPairScore 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"""
5049 return _IMP_core.ClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
5050
5051 def get_version_info(self):
5052 r"""get_version_info(ClosePairsPairScore self) -> VersionInfo"""
5053 return _IMP_core.ClosePairsPairScore_get_version_info(self)
5054 __swig_destroy__ = _IMP_core.delete_ClosePairsPairScore
5055
5056 def __str__(self):
5057 r"""__str__(ClosePairsPairScore self) -> std::string"""
5058 return _IMP_core.ClosePairsPairScore___str__(self)
5059
5060 def __repr__(self):
5061 r"""__repr__(ClosePairsPairScore self) -> std::string"""
5062 return _IMP_core.ClosePairsPairScore___repr__(self)
5063
5064 @staticmethod
5065 def get_from(o):
5066 return _object_cast_to_ClosePairsPairScore(o)
5067
5068
5069# Register ClosePairsPairScore in _IMP_core:
5070_IMP_core.ClosePairsPairScore_swigregister(ClosePairsPairScore)
5071class ConjugateGradients(IMP.AttributeOptimizer):
5072 r"""Proxy of C++ IMP::core::ConjugateGradients class."""
5073
5074 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5075
5076 def __init__(self, *args):
5077 r"""
5078 __init__(ConjugateGradients self, Model m, std::string name="ConjugateGradients%1%") -> ConjugateGradients
5079 __init__(ConjugateGradients self) -> ConjugateGradients
5080 """
5081 _IMP_core.ConjugateGradients_swiginit(self, _IMP_core.new_ConjugateGradients(*args))
5082
5083 def set_gradient_threshold(self, t):
5084 r"""set_gradient_threshold(ConjugateGradients self, IMP::Float t)"""
5085 return _IMP_core.ConjugateGradients_set_gradient_threshold(self, t)
5086
5087 def get_gradient_threshold(self):
5088 r"""get_gradient_threshold(ConjugateGradients self) -> IMP::Float"""
5089 return _IMP_core.ConjugateGradients_get_gradient_threshold(self)
5090
5091 def set_max_change(self, t):
5092 r"""set_max_change(ConjugateGradients self, IMP::Float t)"""
5093 return _IMP_core.ConjugateGradients_set_max_change(self, t)
5094
5095 def get_max_change(self):
5096 r"""get_max_change(ConjugateGradients self) -> IMP::Float"""
5097 return _IMP_core.ConjugateGradients_get_max_change(self)
5098
5099 def do_optimize(self, max_steps):
5100 r"""do_optimize(ConjugateGradients self, unsigned int max_steps) -> IMP::Float"""
5101 return _IMP_core.ConjugateGradients_do_optimize(self, max_steps)
5102
5103 def get_version_info(self):
5104 r"""get_version_info(ConjugateGradients self) -> VersionInfo"""
5105 return _IMP_core.ConjugateGradients_get_version_info(self)
5106 __swig_destroy__ = _IMP_core.delete_ConjugateGradients
5107
5108 def __str__(self):
5109 r"""__str__(ConjugateGradients self) -> std::string"""
5110 return _IMP_core.ConjugateGradients___str__(self)
5111
5112 def __repr__(self):
5113 r"""__repr__(ConjugateGradients self) -> std::string"""
5114 return _IMP_core.ConjugateGradients___repr__(self)
5115
5116 @staticmethod
5117 def get_from(o):
5118 return _object_cast_to_ConjugateGradients(o)
5119
5120
5121 def _get_as_binary(self):
5122 r"""_get_as_binary(ConjugateGradients self) -> PyObject *"""
5123 return _IMP_core.ConjugateGradients__get_as_binary(self)
5124
5125 def _set_from_binary(self, p):
5126 r"""_set_from_binary(ConjugateGradients self, PyObject * p)"""
5127 return _IMP_core.ConjugateGradients__set_from_binary(self, p)
5128
5129 def __getstate__(self):
5130 p = self._get_as_binary()
5131 if len(self.__dict__) > 1:
5132 d = self.__dict__.copy()
5133 del d['this']
5134 p = (d, p)
5135 return p
5136
5137 def __setstate__(self, p):
5138 if not hasattr(self, 'this'):
5139 self.__init__()
5140 if isinstance(p, tuple):
5141 d, p = p
5142 self.__dict__.update(d)
5143 return self._set_from_binary(p)
5144
5145
5146 def _get_jax(self, space=None):
5147 from IMP.core._jax_minimize import _CGJAXInfo
5148 return _CGJAXInfo(self, space)
5149
5150 def _get_jax_optimizer(self, max_steps, space=None):
5151 from IMP.core._jax_minimize import _CGJAXOptimizer
5152 return _CGJAXOptimizer(self, max_steps, space)
5153
5154 def _optimize_jax(self, max_steps, space=None):
5155 opt = self._get_jax_optimizer(max_steps, space=space)
5156 score, cg_state = opt.optimize(opt.get_initial_state())
5157 return score
5158
5159
5160# Register ConjugateGradients in _IMP_core:
5161_IMP_core.ConjugateGradients_swigregister(ConjugateGradients)
5162class ConnectivityRestraint(IMP.Restraint):
5163 r"""Proxy of C++ IMP::core::ConnectivityRestraint class."""
5164
5165 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5166
5167 def __init__(self, ps, sc):
5168 r"""__init__(ConnectivityRestraint self, PairScore ps, _SingletonContainerAdaptor sc) -> ConnectivityRestraint"""
5169 _IMP_core.ConnectivityRestraint_swiginit(self, _IMP_core.new_ConnectivityRestraint(ps, sc))
5170
5171 def get_connected_index_pairs(self):
5172 r"""get_connected_index_pairs(ConnectivityRestraint self) -> IMP::ParticleIndexPairs"""
5173 return _IMP_core.ConnectivityRestraint_get_connected_index_pairs(self)
5174
5175 def get_pair_score(self):
5176 r"""get_pair_score(ConnectivityRestraint self) -> PairScore"""
5177 return _IMP_core.ConnectivityRestraint_get_pair_score(self)
5178
5179 def do_create_current_decomposition(self):
5180 r"""do_create_current_decomposition(ConnectivityRestraint self) -> IMP::Restraints"""
5181 return _IMP_core.ConnectivityRestraint_do_create_current_decomposition(self)
5182
5183 def do_get_inputs(self):
5184 r"""do_get_inputs(ConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
5185 return _IMP_core.ConnectivityRestraint_do_get_inputs(self)
5186
5187 def get_version_info(self):
5188 r"""get_version_info(ConnectivityRestraint self) -> VersionInfo"""
5189 return _IMP_core.ConnectivityRestraint_get_version_info(self)
5190 __swig_destroy__ = _IMP_core.delete_ConnectivityRestraint
5191
5192 def __str__(self):
5193 r"""__str__(ConnectivityRestraint self) -> std::string"""
5194 return _IMP_core.ConnectivityRestraint___str__(self)
5195
5196 def __repr__(self):
5197 r"""__repr__(ConnectivityRestraint self) -> std::string"""
5198 return _IMP_core.ConnectivityRestraint___repr__(self)
5199
5200 @staticmethod
5201 def get_from(o):
5202 return _object_cast_to_ConnectivityRestraint(o)
5203
5204
5205# Register ConnectivityRestraint in _IMP_core:
5206_IMP_core.ConnectivityRestraint_swigregister(ConnectivityRestraint)
5207class ConstantRestraint(IMP.Restraint):
5208 r"""Proxy of C++ IMP::core::ConstantRestraint class."""
5209
5210 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5211
5212 def __init__(self, *args):
5213 r"""
5214 __init__(ConstantRestraint self, Model m, IMP::Float v) -> ConstantRestraint
5215 __init__(ConstantRestraint self) -> ConstantRestraint
5216 """
5217 _IMP_core.ConstantRestraint_swiginit(self, _IMP_core.new_ConstantRestraint(*args))
5218
5219 def do_get_inputs(self):
5220 r"""do_get_inputs(ConstantRestraint self) -> IMP::ModelObjectsTemp"""
5221 return _IMP_core.ConstantRestraint_do_get_inputs(self)
5222
5223 def get_version_info(self):
5224 r"""get_version_info(ConstantRestraint self) -> VersionInfo"""
5225 return _IMP_core.ConstantRestraint_get_version_info(self)
5226 __swig_destroy__ = _IMP_core.delete_ConstantRestraint
5227
5228 def __str__(self):
5229 r"""__str__(ConstantRestraint self) -> std::string"""
5230 return _IMP_core.ConstantRestraint___str__(self)
5231
5232 def __repr__(self):
5233 r"""__repr__(ConstantRestraint self) -> std::string"""
5234 return _IMP_core.ConstantRestraint___repr__(self)
5235
5236 @staticmethod
5237 def get_from(o):
5238 return _object_cast_to_ConstantRestraint(o)
5239
5240
5241 def _get_as_binary(self):
5242 r"""_get_as_binary(ConstantRestraint self) -> PyObject *"""
5243 return _IMP_core.ConstantRestraint__get_as_binary(self)
5244
5245 def _set_from_binary(self, p):
5246 r"""_set_from_binary(ConstantRestraint self, PyObject * p)"""
5247 return _IMP_core.ConstantRestraint__set_from_binary(self, p)
5248
5249 def __getstate__(self):
5250 p = self._get_as_binary()
5251 if len(self.__dict__) > 1:
5252 d = self.__dict__.copy()
5253 del d['this']
5254 p = (d, p)
5255 return p
5256
5257 def __setstate__(self, p):
5258 if not hasattr(self, 'this'):
5259 self.__init__()
5260 if isinstance(p, tuple):
5261 d, p = p
5262 self.__dict__.update(d)
5263 return self._set_from_binary(p)
5264
5265
5266# Register ConstantRestraint in _IMP_core:
5267_IMP_core.ConstantRestraint_swigregister(ConstantRestraint)
5268class Cosine(IMP.UnaryFunction):
5269 r"""Proxy of C++ IMP::core::Cosine class."""
5270
5271 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5272
5273 def __init__(self, *args):
5274 r"""
5275 __init__(Cosine self, IMP::Float force_constant, int periodicity, IMP::Float phase) -> Cosine
5276 __init__(Cosine self) -> Cosine
5277 """
5278 _IMP_core.Cosine_swiginit(self, _IMP_core.new_Cosine(*args))
5279
5280 def get_force_constant(self):
5281 r"""get_force_constant(Cosine self) -> IMP::Float"""
5282 return _IMP_core.Cosine_get_force_constant(self)
5283
5284 def get_periodicity(self):
5285 r"""get_periodicity(Cosine self) -> int"""
5286 return _IMP_core.Cosine_get_periodicity(self)
5287
5288 def get_phase(self):
5289 r"""get_phase(Cosine self) -> IMP::Float"""
5290 return _IMP_core.Cosine_get_phase(self)
5291
5292 def get_version_info(self):
5293 r"""get_version_info(Cosine self) -> VersionInfo"""
5294 return _IMP_core.Cosine_get_version_info(self)
5295 __swig_destroy__ = _IMP_core.delete_Cosine
5296
5297 def do_show(self, out):
5298 r"""do_show(Cosine self, _ostream out)"""
5299 return _IMP_core.Cosine_do_show(self, out)
5300
5301 def __str__(self):
5302 r"""__str__(Cosine self) -> std::string"""
5303 return _IMP_core.Cosine___str__(self)
5304
5305 def __repr__(self):
5306 r"""__repr__(Cosine self) -> std::string"""
5307 return _IMP_core.Cosine___repr__(self)
5308
5309 @staticmethod
5310 def get_from(o):
5311 return _object_cast_to_Cosine(o)
5312
5313
5314 def _get_as_binary(self):
5315 r"""_get_as_binary(Cosine self) -> PyObject *"""
5316 return _IMP_core.Cosine__get_as_binary(self)
5317
5318 def _set_from_binary(self, p):
5319 r"""_set_from_binary(Cosine self, PyObject * p)"""
5320 return _IMP_core.Cosine__set_from_binary(self, p)
5321
5322 def __getstate__(self):
5323 p = self._get_as_binary()
5324 if len(self.__dict__) > 1:
5325 d = self.__dict__.copy()
5326 del d['this']
5327 p = (d, p)
5328 return p
5329
5330 def __setstate__(self, p):
5331 if not hasattr(self, 'this'):
5332 self.__init__()
5333 if isinstance(p, tuple):
5334 d, p = p
5335 self.__dict__.update(d)
5336 return self._set_from_binary(p)
5337
5338
5339 def _get_jax(self):
5340 import jax.numpy as jnp
5341 def score(val, k, period, phase):
5342 return jnp.abs(k) - k * jnp.cos(period * val + phase)
5343 return functools.partial(score, k=self.get_force_constant(),
5344 period=self.get_periodicity(),
5345 phase=self.get_phase())
5346
5347
5348# Register Cosine in _IMP_core:
5349_IMP_core.Cosine_swigregister(Cosine)
5350class CoverRefined(IMP.SingletonModifier):
5351 r"""Proxy of C++ IMP::core::CoverRefined class."""
5352
5353 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5354
5355 def __init__(self, ref, slack=0):
5356 r"""__init__(CoverRefined self, Refiner ref, IMP::Float slack=0) -> CoverRefined"""
5357 _IMP_core.CoverRefined_swiginit(self, _IMP_core.new_CoverRefined(ref, slack))
5358
5359 def set_slack(self, slack):
5360 r"""set_slack(CoverRefined self, IMP::Float slack)"""
5361 return _IMP_core.CoverRefined_set_slack(self, slack)
5362
5363 def do_get_inputs(self, m, pis):
5364 r"""do_get_inputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5365 return _IMP_core.CoverRefined_do_get_inputs(self, m, pis)
5366
5367 def do_get_outputs(self, m, pis):
5368 r"""do_get_outputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5369 return _IMP_core.CoverRefined_do_get_outputs(self, m, pis)
5370
5371 def get_version_info(self):
5372 r"""get_version_info(CoverRefined self) -> VersionInfo"""
5373 return _IMP_core.CoverRefined_get_version_info(self)
5374 __swig_destroy__ = _IMP_core.delete_CoverRefined
5375
5376 def __str__(self):
5377 r"""__str__(CoverRefined self) -> std::string"""
5378 return _IMP_core.CoverRefined___str__(self)
5379
5380 def __repr__(self):
5381 r"""__repr__(CoverRefined self) -> std::string"""
5382 return _IMP_core.CoverRefined___repr__(self)
5383
5384 @staticmethod
5385 def get_from(o):
5386 return _object_cast_to_CoverRefined(o)
5387
5388
5389# Register CoverRefined in _IMP_core:
5390_IMP_core.CoverRefined_swigregister(CoverRefined)
5391class Cover(XYZR):
5392 r"""Proxy of C++ IMP::core::Cover class."""
5393
5394 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5395
5396 def get_constraint(self):
5397 r"""get_constraint(Cover self) -> Constraint"""
5398 return _IMP_core.Cover_get_constraint(self)
5399
5400 def __init__(self, *args):
5401 r"""
5402 __init__(Cover self) -> Cover
5403 __init__(Cover self, Model m, ParticleIndex id) -> Cover
5404 __init__(Cover self, _ParticleAdaptor d) -> Cover
5405 """
5406 _IMP_core.Cover_swiginit(self, _IMP_core.new_Cover(*args))
5407
5408 def show(self, *args):
5409 r"""show(Cover self, _ostream out=std::cout)"""
5410 return _IMP_core.Cover_show(self, *args)
5411
5412 @staticmethod
5413 def setup_particle(*args):
5414 r"""
5415 setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Cover
5416 setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Cover
5417 setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Cover
5418 setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Cover
5419 """
5420 return _IMP_core.Cover_setup_particle(*args)
5421
5422 @staticmethod
5423 def get_is_setup(*args):
5424 r"""
5425 get_is_setup(_ParticleAdaptor p) -> bool
5426 get_is_setup(Model m, ParticleIndex pi) -> bool
5427 """
5428 return _IMP_core.Cover_get_is_setup(*args)
5429
5430 def add_attribute(self, *args):
5431 r"""
5432 add_attribute(Cover self, FloatKey k, IMP::Float v, bool opt)
5433 add_attribute(Cover self, FloatKey a0, IMP::Float a1)
5434 add_attribute(Cover self, IntKey a0, IMP::Int a1)
5435 add_attribute(Cover self, FloatsKey a0, IMP::Floats a1)
5436 add_attribute(Cover self, IntsKey a0, IMP::Ints a1)
5437 add_attribute(Cover self, StringKey a0, IMP::String a1)
5438 add_attribute(Cover self, ParticleIndexKey a0, Particle a1)
5439 add_attribute(Cover self, ObjectKey a0, Object a1)
5440 add_attribute(Cover self, SparseFloatKey a0, IMP::Float a1)
5441 add_attribute(Cover self, SparseIntKey a0, IMP::Int a1)
5442 add_attribute(Cover self, SparseStringKey a0, IMP::String a1)
5443 add_attribute(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5444 """
5445 return _IMP_core.Cover_add_attribute(self, *args)
5446
5447 def get_value(self, *args):
5448 r"""
5449 get_value(Cover self, FloatKey a0) -> IMP::Float
5450 get_value(Cover self, IntKey a0) -> IMP::Int
5451 get_value(Cover self, FloatsKey a0) -> IMP::Floats
5452 get_value(Cover self, IntsKey a0) -> IMP::Ints
5453 get_value(Cover self, StringKey a0) -> IMP::String
5454 get_value(Cover self, ParticleIndexKey a0) -> Particle
5455 get_value(Cover self, ObjectKey a0) -> Object
5456 get_value(Cover self, SparseFloatKey a0) -> IMP::Float
5457 get_value(Cover self, SparseIntKey a0) -> IMP::Int
5458 get_value(Cover self, SparseStringKey a0) -> IMP::String
5459 get_value(Cover self, SparseParticleIndexKey a0) -> ParticleIndex
5460 """
5461 return _IMP_core.Cover_get_value(self, *args)
5462
5463 def set_value(self, *args):
5464 r"""
5465 set_value(Cover self, FloatKey a0, IMP::Float a1)
5466 set_value(Cover self, IntKey a0, IMP::Int a1)
5467 set_value(Cover self, FloatsKey a0, IMP::Floats a1)
5468 set_value(Cover self, IntsKey a0, IMP::Ints a1)
5469 set_value(Cover self, StringKey a0, IMP::String a1)
5470 set_value(Cover self, ParticleIndexKey a0, Particle a1)
5471 set_value(Cover self, ObjectKey a0, Object a1)
5472 set_value(Cover self, SparseFloatKey a0, IMP::Float a1)
5473 set_value(Cover self, SparseIntKey a0, IMP::Int a1)
5474 set_value(Cover self, SparseStringKey a0, IMP::String a1)
5475 set_value(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5476 """
5477 return _IMP_core.Cover_set_value(self, *args)
5478
5479 def remove_attribute(self, *args):
5480 r"""
5481 remove_attribute(Cover self, FloatKey a0)
5482 remove_attribute(Cover self, IntKey a0)
5483 remove_attribute(Cover self, FloatsKey a0)
5484 remove_attribute(Cover self, IntsKey a0)
5485 remove_attribute(Cover self, StringKey a0)
5486 remove_attribute(Cover self, ParticleIndexKey a0)
5487 remove_attribute(Cover self, ObjectKey a0)
5488 remove_attribute(Cover self, SparseFloatKey a0)
5489 remove_attribute(Cover self, SparseIntKey a0)
5490 remove_attribute(Cover self, SparseStringKey a0)
5491 remove_attribute(Cover self, SparseParticleIndexKey a0)
5492 """
5493 return _IMP_core.Cover_remove_attribute(self, *args)
5494
5495 def has_attribute(self, *args):
5496 r"""
5497 has_attribute(Cover self, FloatKey a0) -> bool
5498 has_attribute(Cover self, IntKey a0) -> bool
5499 has_attribute(Cover self, FloatsKey a0) -> bool
5500 has_attribute(Cover self, IntsKey a0) -> bool
5501 has_attribute(Cover self, StringKey a0) -> bool
5502 has_attribute(Cover self, ParticleIndexKey a0) -> bool
5503 has_attribute(Cover self, ObjectKey a0) -> bool
5504 has_attribute(Cover self, SparseFloatKey a0) -> bool
5505 has_attribute(Cover self, SparseIntKey a0) -> bool
5506 has_attribute(Cover self, SparseStringKey a0) -> bool
5507 has_attribute(Cover self, SparseParticleIndexKey a0) -> bool
5508 """
5509 return _IMP_core.Cover_has_attribute(self, *args)
5510
5511 def get_derivative(self, a0):
5512 r"""get_derivative(Cover self, FloatKey a0) -> double"""
5513 return _IMP_core.Cover_get_derivative(self, a0)
5514
5515 def get_name(self):
5516 r"""get_name(Cover self) -> std::string"""
5517 return _IMP_core.Cover_get_name(self)
5518
5519 def clear_caches(self):
5520 r"""clear_caches(Cover self)"""
5521 return _IMP_core.Cover_clear_caches(self)
5522
5523 def set_name(self, a0):
5524 r"""set_name(Cover self, std::string a0)"""
5525 return _IMP_core.Cover_set_name(self, a0)
5526
5527 def set_check_level(self, a0):
5528 r"""set_check_level(Cover self, IMP::CheckLevel a0)"""
5529 return _IMP_core.Cover_set_check_level(self, a0)
5530
5531 def add_to_derivative(self, a0, a1, a2):
5532 r"""add_to_derivative(Cover self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5533 return _IMP_core.Cover_add_to_derivative(self, a0, a1, a2)
5534
5535 def set_is_optimized(self, a0, a1):
5536 r"""set_is_optimized(Cover self, FloatKey a0, bool a1)"""
5537 return _IMP_core.Cover_set_is_optimized(self, a0, a1)
5538
5539 def get_is_optimized(self, a0):
5540 r"""get_is_optimized(Cover self, FloatKey a0) -> bool"""
5541 return _IMP_core.Cover_get_is_optimized(self, a0)
5542
5543 def get_check_level(self):
5544 r"""get_check_level(Cover self) -> IMP::CheckLevel"""
5545 return _IMP_core.Cover_get_check_level(self)
5546
5547 def __eq__(self, *args):
5548 r"""
5549 __eq__(Cover self, Cover o) -> bool
5550 __eq__(Cover self, Particle d) -> bool
5551 """
5552 return _IMP_core.Cover___eq__(self, *args)
5553
5554 def __ne__(self, *args):
5555 r"""
5556 __ne__(Cover self, Cover o) -> bool
5557 __ne__(Cover self, Particle d) -> bool
5558 """
5559 return _IMP_core.Cover___ne__(self, *args)
5560
5561 def __le__(self, *args):
5562 r"""
5563 __le__(Cover self, Cover o) -> bool
5564 __le__(Cover self, Particle d) -> bool
5565 """
5566 return _IMP_core.Cover___le__(self, *args)
5567
5568 def __lt__(self, *args):
5569 r"""
5570 __lt__(Cover self, Cover o) -> bool
5571 __lt__(Cover self, Particle d) -> bool
5572 """
5573 return _IMP_core.Cover___lt__(self, *args)
5574
5575 def __ge__(self, *args):
5576 r"""
5577 __ge__(Cover self, Cover o) -> bool
5578 __ge__(Cover self, Particle d) -> bool
5579 """
5580 return _IMP_core.Cover___ge__(self, *args)
5581
5582 def __gt__(self, *args):
5583 r"""
5584 __gt__(Cover self, Cover o) -> bool
5585 __gt__(Cover self, Particle d) -> bool
5586 """
5587 return _IMP_core.Cover___gt__(self, *args)
5588
5589 def __hash__(self):
5590 r"""__hash__(Cover self) -> std::size_t"""
5591 return _IMP_core.Cover___hash__(self)
5592
5593 def __str__(self):
5594 r"""__str__(Cover self) -> std::string"""
5595 return _IMP_core.Cover___str__(self)
5596
5597 def __repr__(self):
5598 r"""__repr__(Cover self) -> std::string"""
5599 return _IMP_core.Cover___repr__(self)
5600
5601 def _get_as_binary(self):
5602 r"""_get_as_binary(Cover self) -> PyObject *"""
5603 return _IMP_core.Cover__get_as_binary(self)
5604
5605 def _set_from_binary(self, p):
5606 r"""_set_from_binary(Cover self, PyObject * p)"""
5607 return _IMP_core.Cover__set_from_binary(self, p)
5608
5609 def __getstate__(self):
5610 p = self._get_as_binary()
5611 if len(self.__dict__) > 1:
5612 d = self.__dict__.copy()
5613 del d['this']
5614 p = (d, p)
5615 return p
5616
5617 def __setstate__(self, p):
5618 if not hasattr(self, 'this'):
5619 self.__init__()
5620 if isinstance(p, tuple):
5621 d, p = p
5622 self.__dict__.update(d)
5623 return self._set_from_binary(p)
5624
5625 __swig_destroy__ = _IMP_core.delete_Cover
5626
5627# Register Cover in _IMP_core:
5628_IMP_core.Cover_swigregister(Cover)
5629class DerivativesFromRefined(IMP.SingletonModifier):
5630 r"""Proxy of C++ IMP::core::DerivativesFromRefined class."""
5631
5632 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5633
5634 def __init__(self, *args):
5635 r"""__init__(DerivativesFromRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesFromRefined"""
5636 _IMP_core.DerivativesFromRefined_swiginit(self, _IMP_core.new_DerivativesFromRefined(*args))
5637
5638 def do_get_inputs(self, m, pis):
5639 r"""do_get_inputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5640 return _IMP_core.DerivativesFromRefined_do_get_inputs(self, m, pis)
5641
5642 def do_get_outputs(self, m, pis):
5643 r"""do_get_outputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5644 return _IMP_core.DerivativesFromRefined_do_get_outputs(self, m, pis)
5645
5646 def get_version_info(self):
5647 r"""get_version_info(DerivativesFromRefined self) -> VersionInfo"""
5648 return _IMP_core.DerivativesFromRefined_get_version_info(self)
5649 __swig_destroy__ = _IMP_core.delete_DerivativesFromRefined
5650
5651 def __str__(self):
5652 r"""__str__(DerivativesFromRefined self) -> std::string"""
5653 return _IMP_core.DerivativesFromRefined___str__(self)
5654
5655 def __repr__(self):
5656 r"""__repr__(DerivativesFromRefined self) -> std::string"""
5657 return _IMP_core.DerivativesFromRefined___repr__(self)
5658
5659 @staticmethod
5660 def get_from(o):
5661 return _object_cast_to_DerivativesFromRefined(o)
5662
5663
5664# Register DerivativesFromRefined in _IMP_core:
5665_IMP_core.DerivativesFromRefined_swigregister(DerivativesFromRefined)
5666class DerivativesToRefined(IMP.SingletonModifier):
5667 r"""Proxy of C++ IMP::core::DerivativesToRefined class."""
5668
5669 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5670
5671 def __init__(self, *args):
5672 r"""
5673 __init__(DerivativesToRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesToRefined
5674 __init__(DerivativesToRefined self) -> DerivativesToRefined
5675 """
5676 _IMP_core.DerivativesToRefined_swiginit(self, _IMP_core.new_DerivativesToRefined(*args))
5677
5678 def do_get_inputs(self, m, pis):
5679 r"""do_get_inputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5680 return _IMP_core.DerivativesToRefined_do_get_inputs(self, m, pis)
5681
5682 def do_get_outputs(self, m, pis):
5683 r"""do_get_outputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5684 return _IMP_core.DerivativesToRefined_do_get_outputs(self, m, pis)
5685
5686 def get_version_info(self):
5687 r"""get_version_info(DerivativesToRefined self) -> VersionInfo"""
5688 return _IMP_core.DerivativesToRefined_get_version_info(self)
5689 __swig_destroy__ = _IMP_core.delete_DerivativesToRefined
5690
5691 def __str__(self):
5692 r"""__str__(DerivativesToRefined self) -> std::string"""
5693 return _IMP_core.DerivativesToRefined___str__(self)
5694
5695 def __repr__(self):
5696 r"""__repr__(DerivativesToRefined self) -> std::string"""
5697 return _IMP_core.DerivativesToRefined___repr__(self)
5698
5699 @staticmethod
5700 def get_from(o):
5701 return _object_cast_to_DerivativesToRefined(o)
5702
5703
5704 def _get_as_binary(self):
5705 r"""_get_as_binary(DerivativesToRefined self) -> PyObject *"""
5706 return _IMP_core.DerivativesToRefined__get_as_binary(self)
5707
5708 def _set_from_binary(self, p):
5709 r"""_set_from_binary(DerivativesToRefined self, PyObject * p)"""
5710 return _IMP_core.DerivativesToRefined__set_from_binary(self, p)
5711
5712 def __getstate__(self):
5713 p = self._get_as_binary()
5714 if len(self.__dict__) > 1:
5715 d = self.__dict__.copy()
5716 del d['this']
5717 p = (d, p)
5718 return p
5719
5720 def __setstate__(self, p):
5721 if not hasattr(self, 'this'):
5722 self.__init__()
5723 if isinstance(p, tuple):
5724 d, p = p
5725 self.__dict__.update(d)
5726 return self._set_from_binary(p)
5727
5728
5729# Register DerivativesToRefined in _IMP_core:
5730_IMP_core.DerivativesToRefined_swigregister(DerivativesToRefined)
5731class DiameterRestraint(IMP.Restraint):
5732 r"""Proxy of C++ IMP::core::DiameterRestraint class."""
5733
5734 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5735
5736 def __init__(self, f, sc, diameter):
5737 r"""__init__(DiameterRestraint self, UnaryFunction f, SingletonContainer sc, IMP::Float diameter) -> DiameterRestraint"""
5738 _IMP_core.DiameterRestraint_swiginit(self, _IMP_core.new_DiameterRestraint(f, sc, diameter))
5739
5740 def do_get_inputs(self):
5741 r"""do_get_inputs(DiameterRestraint self) -> IMP::ModelObjectsTemp"""
5742 return _IMP_core.DiameterRestraint_do_get_inputs(self)
5743
5744 def get_version_info(self):
5745 r"""get_version_info(DiameterRestraint self) -> VersionInfo"""
5746 return _IMP_core.DiameterRestraint_get_version_info(self)
5747 __swig_destroy__ = _IMP_core.delete_DiameterRestraint
5748
5749 def do_create_decomposition(self):
5750 r"""do_create_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5751 return _IMP_core.DiameterRestraint_do_create_decomposition(self)
5752
5753 def do_create_current_decomposition(self):
5754 r"""do_create_current_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5755 return _IMP_core.DiameterRestraint_do_create_current_decomposition(self)
5756
5757 def __str__(self):
5758 r"""__str__(DiameterRestraint self) -> std::string"""
5759 return _IMP_core.DiameterRestraint___str__(self)
5760
5761 def __repr__(self):
5762 r"""__repr__(DiameterRestraint self) -> std::string"""
5763 return _IMP_core.DiameterRestraint___repr__(self)
5764
5765 @staticmethod
5766 def get_from(o):
5767 return _object_cast_to_DiameterRestraint(o)
5768
5769
5770# Register DiameterRestraint in _IMP_core:
5771_IMP_core.DiameterRestraint_swigregister(DiameterRestraint)
5772class Transform(IMP.SingletonModifier):
5773 r"""Proxy of C++ IMP::core::Transform class."""
5774
5775 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5776
5777 def __init__(self, *args):
5778 r"""
5779 __init__(Transform self, Transformation3D t, bool ignore_non_xyz=False) -> Transform
5780 __init__(Transform self) -> Transform
5781 """
5782 _IMP_core.Transform_swiginit(self, _IMP_core.new_Transform(*args))
5783
5784 def do_get_inputs(self, m, pis):
5785 r"""do_get_inputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5786 return _IMP_core.Transform_do_get_inputs(self, m, pis)
5787
5788 def do_get_outputs(self, m, pis):
5789 r"""do_get_outputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5790 return _IMP_core.Transform_do_get_outputs(self, m, pis)
5791
5792 def get_version_info(self):
5793 r"""get_version_info(Transform self) -> VersionInfo"""
5794 return _IMP_core.Transform_get_version_info(self)
5795 __swig_destroy__ = _IMP_core.delete_Transform
5796
5797 def __str__(self):
5798 r"""__str__(Transform self) -> std::string"""
5799 return _IMP_core.Transform___str__(self)
5800
5801 def __repr__(self):
5802 r"""__repr__(Transform self) -> std::string"""
5803 return _IMP_core.Transform___repr__(self)
5804
5805 @staticmethod
5806 def get_from(o):
5807 return _object_cast_to_Transform(o)
5808
5809
5810 def _get_as_binary(self):
5811 r"""_get_as_binary(Transform self) -> PyObject *"""
5812 return _IMP_core.Transform__get_as_binary(self)
5813
5814 def _set_from_binary(self, p):
5815 r"""_set_from_binary(Transform self, PyObject * p)"""
5816 return _IMP_core.Transform__set_from_binary(self, p)
5817
5818 def __getstate__(self):
5819 p = self._get_as_binary()
5820 if len(self.__dict__) > 1:
5821 d = self.__dict__.copy()
5822 del d['this']
5823 p = (d, p)
5824 return p
5825
5826 def __setstate__(self, p):
5827 if not hasattr(self, 'this'):
5828 self.__init__()
5829 if isinstance(p, tuple):
5830 d, p = p
5831 self.__dict__.update(d)
5832 return self._set_from_binary(p)
5833
5834
5835# Register Transform in _IMP_core:
5836_IMP_core.Transform_swigregister(Transform)
5837class Reference(IMP.Decorator):
5838 r"""Proxy of C++ IMP::core::Reference class."""
5839
5840 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5841
5842 def __init__(self, *args):
5843 r"""
5844 __init__(Reference self) -> Reference
5845 __init__(Reference self, Model m, ParticleIndex id) -> Reference
5846 __init__(Reference self, _ParticleAdaptor d) -> Reference
5847 """
5848 _IMP_core.Reference_swiginit(self, _IMP_core.new_Reference(*args))
5849
5850 def show(self, *args):
5851 r"""show(Reference self, _ostream out=std::cout)"""
5852 return _IMP_core.Reference_show(self, *args)
5853
5854 @staticmethod
5855 def setup_particle(*args):
5856 r"""
5857 setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor reference) -> Reference
5858 setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor reference) -> Reference
5859 """
5860 return _IMP_core.Reference_setup_particle(*args)
5861
5862 def get_reference_particle(self):
5863 r"""get_reference_particle(Reference self) -> Particle"""
5864 return _IMP_core.Reference_get_reference_particle(self)
5865
5866 @staticmethod
5867 def get_is_setup(*args):
5868 r"""
5869 get_is_setup(_ParticleAdaptor p) -> bool
5870 get_is_setup(Model m, ParticleIndex pi) -> bool
5871 """
5872 return _IMP_core.Reference_get_is_setup(*args)
5873
5874 @staticmethod
5875 def get_reference_key():
5876 r"""get_reference_key() -> ParticleIndexKey"""
5877 return _IMP_core.Reference_get_reference_key()
5878
5879 def add_attribute(self, *args):
5880 r"""
5881 add_attribute(Reference self, FloatKey k, IMP::Float v, bool opt)
5882 add_attribute(Reference self, FloatKey a0, IMP::Float a1)
5883 add_attribute(Reference self, IntKey a0, IMP::Int a1)
5884 add_attribute(Reference self, FloatsKey a0, IMP::Floats a1)
5885 add_attribute(Reference self, IntsKey a0, IMP::Ints a1)
5886 add_attribute(Reference self, StringKey a0, IMP::String a1)
5887 add_attribute(Reference self, ParticleIndexKey a0, Particle a1)
5888 add_attribute(Reference self, ObjectKey a0, Object a1)
5889 add_attribute(Reference self, SparseFloatKey a0, IMP::Float a1)
5890 add_attribute(Reference self, SparseIntKey a0, IMP::Int a1)
5891 add_attribute(Reference self, SparseStringKey a0, IMP::String a1)
5892 add_attribute(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5893 """
5894 return _IMP_core.Reference_add_attribute(self, *args)
5895
5896 def get_value(self, *args):
5897 r"""
5898 get_value(Reference self, FloatKey a0) -> IMP::Float
5899 get_value(Reference self, IntKey a0) -> IMP::Int
5900 get_value(Reference self, FloatsKey a0) -> IMP::Floats
5901 get_value(Reference self, IntsKey a0) -> IMP::Ints
5902 get_value(Reference self, StringKey a0) -> IMP::String
5903 get_value(Reference self, ParticleIndexKey a0) -> Particle
5904 get_value(Reference self, ObjectKey a0) -> Object
5905 get_value(Reference self, SparseFloatKey a0) -> IMP::Float
5906 get_value(Reference self, SparseIntKey a0) -> IMP::Int
5907 get_value(Reference self, SparseStringKey a0) -> IMP::String
5908 get_value(Reference self, SparseParticleIndexKey a0) -> ParticleIndex
5909 """
5910 return _IMP_core.Reference_get_value(self, *args)
5911
5912 def set_value(self, *args):
5913 r"""
5914 set_value(Reference self, FloatKey a0, IMP::Float a1)
5915 set_value(Reference self, IntKey a0, IMP::Int a1)
5916 set_value(Reference self, FloatsKey a0, IMP::Floats a1)
5917 set_value(Reference self, IntsKey a0, IMP::Ints a1)
5918 set_value(Reference self, StringKey a0, IMP::String a1)
5919 set_value(Reference self, ParticleIndexKey a0, Particle a1)
5920 set_value(Reference self, ObjectKey a0, Object a1)
5921 set_value(Reference self, SparseFloatKey a0, IMP::Float a1)
5922 set_value(Reference self, SparseIntKey a0, IMP::Int a1)
5923 set_value(Reference self, SparseStringKey a0, IMP::String a1)
5924 set_value(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5925 """
5926 return _IMP_core.Reference_set_value(self, *args)
5927
5928 def remove_attribute(self, *args):
5929 r"""
5930 remove_attribute(Reference self, FloatKey a0)
5931 remove_attribute(Reference self, IntKey a0)
5932 remove_attribute(Reference self, FloatsKey a0)
5933 remove_attribute(Reference self, IntsKey a0)
5934 remove_attribute(Reference self, StringKey a0)
5935 remove_attribute(Reference self, ParticleIndexKey a0)
5936 remove_attribute(Reference self, ObjectKey a0)
5937 remove_attribute(Reference self, SparseFloatKey a0)
5938 remove_attribute(Reference self, SparseIntKey a0)
5939 remove_attribute(Reference self, SparseStringKey a0)
5940 remove_attribute(Reference self, SparseParticleIndexKey a0)
5941 """
5942 return _IMP_core.Reference_remove_attribute(self, *args)
5943
5944 def has_attribute(self, *args):
5945 r"""
5946 has_attribute(Reference self, FloatKey a0) -> bool
5947 has_attribute(Reference self, IntKey a0) -> bool
5948 has_attribute(Reference self, FloatsKey a0) -> bool
5949 has_attribute(Reference self, IntsKey a0) -> bool
5950 has_attribute(Reference self, StringKey a0) -> bool
5951 has_attribute(Reference self, ParticleIndexKey a0) -> bool
5952 has_attribute(Reference self, ObjectKey a0) -> bool
5953 has_attribute(Reference self, SparseFloatKey a0) -> bool
5954 has_attribute(Reference self, SparseIntKey a0) -> bool
5955 has_attribute(Reference self, SparseStringKey a0) -> bool
5956 has_attribute(Reference self, SparseParticleIndexKey a0) -> bool
5957 """
5958 return _IMP_core.Reference_has_attribute(self, *args)
5959
5960 def get_derivative(self, a0):
5961 r"""get_derivative(Reference self, FloatKey a0) -> double"""
5962 return _IMP_core.Reference_get_derivative(self, a0)
5963
5964 def get_name(self):
5965 r"""get_name(Reference self) -> std::string"""
5966 return _IMP_core.Reference_get_name(self)
5967
5968 def clear_caches(self):
5969 r"""clear_caches(Reference self)"""
5970 return _IMP_core.Reference_clear_caches(self)
5971
5972 def set_name(self, a0):
5973 r"""set_name(Reference self, std::string a0)"""
5974 return _IMP_core.Reference_set_name(self, a0)
5975
5976 def set_check_level(self, a0):
5977 r"""set_check_level(Reference self, IMP::CheckLevel a0)"""
5978 return _IMP_core.Reference_set_check_level(self, a0)
5979
5980 def add_to_derivative(self, a0, a1, a2):
5981 r"""add_to_derivative(Reference self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5982 return _IMP_core.Reference_add_to_derivative(self, a0, a1, a2)
5983
5984 def set_is_optimized(self, a0, a1):
5985 r"""set_is_optimized(Reference self, FloatKey a0, bool a1)"""
5986 return _IMP_core.Reference_set_is_optimized(self, a0, a1)
5987
5988 def get_is_optimized(self, a0):
5989 r"""get_is_optimized(Reference self, FloatKey a0) -> bool"""
5990 return _IMP_core.Reference_get_is_optimized(self, a0)
5991
5992 def get_check_level(self):
5993 r"""get_check_level(Reference self) -> IMP::CheckLevel"""
5994 return _IMP_core.Reference_get_check_level(self)
5995
5996 def __eq__(self, *args):
5997 r"""
5998 __eq__(Reference self, Reference o) -> bool
5999 __eq__(Reference self, Particle d) -> bool
6000 """
6001 return _IMP_core.Reference___eq__(self, *args)
6002
6003 def __ne__(self, *args):
6004 r"""
6005 __ne__(Reference self, Reference o) -> bool
6006 __ne__(Reference self, Particle d) -> bool
6007 """
6008 return _IMP_core.Reference___ne__(self, *args)
6009
6010 def __le__(self, *args):
6011 r"""
6012 __le__(Reference self, Reference o) -> bool
6013 __le__(Reference self, Particle d) -> bool
6014 """
6015 return _IMP_core.Reference___le__(self, *args)
6016
6017 def __lt__(self, *args):
6018 r"""
6019 __lt__(Reference self, Reference o) -> bool
6020 __lt__(Reference self, Particle d) -> bool
6021 """
6022 return _IMP_core.Reference___lt__(self, *args)
6023
6024 def __ge__(self, *args):
6025 r"""
6026 __ge__(Reference self, Reference o) -> bool
6027 __ge__(Reference self, Particle d) -> bool
6028 """
6029 return _IMP_core.Reference___ge__(self, *args)
6030
6031 def __gt__(self, *args):
6032 r"""
6033 __gt__(Reference self, Reference o) -> bool
6034 __gt__(Reference self, Particle d) -> bool
6035 """
6036 return _IMP_core.Reference___gt__(self, *args)
6037
6038 def __hash__(self):
6039 r"""__hash__(Reference self) -> std::size_t"""
6040 return _IMP_core.Reference___hash__(self)
6041
6042 def __str__(self):
6043 r"""__str__(Reference self) -> std::string"""
6044 return _IMP_core.Reference___str__(self)
6045
6046 def __repr__(self):
6047 r"""__repr__(Reference self) -> std::string"""
6048 return _IMP_core.Reference___repr__(self)
6049
6050 def _get_as_binary(self):
6051 r"""_get_as_binary(Reference self) -> PyObject *"""
6052 return _IMP_core.Reference__get_as_binary(self)
6053
6054 def _set_from_binary(self, p):
6055 r"""_set_from_binary(Reference self, PyObject * p)"""
6056 return _IMP_core.Reference__set_from_binary(self, p)
6057
6058 def __getstate__(self):
6059 p = self._get_as_binary()
6060 if len(self.__dict__) > 1:
6061 d = self.__dict__.copy()
6062 del d['this']
6063 p = (d, p)
6064 return p
6065
6066 def __setstate__(self, p):
6067 if not hasattr(self, 'this'):
6068 self.__init__()
6069 if isinstance(p, tuple):
6070 d, p = p
6071 self.__dict__.update(d)
6072 return self._set_from_binary(p)
6073
6074 __swig_destroy__ = _IMP_core.delete_Reference
6075
6076# Register Reference in _IMP_core:
6077_IMP_core.Reference_swigregister(Reference)
6078class TransformationAndReflectionSymmetry(IMP.SingletonModifier):
6079 r"""Proxy of C++ IMP::core::TransformationAndReflectionSymmetry class."""
6080
6081 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6082
6083 def __init__(self, t, r):
6084 r"""__init__(TransformationAndReflectionSymmetry self, Transformation3D t, Reflection3D r) -> TransformationAndReflectionSymmetry"""
6085 _IMP_core.TransformationAndReflectionSymmetry_swiginit(self, _IMP_core.new_TransformationAndReflectionSymmetry(t, r))
6086
6087 def do_get_inputs(self, m, pis):
6088 r"""do_get_inputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6089 return _IMP_core.TransformationAndReflectionSymmetry_do_get_inputs(self, m, pis)
6090
6091 def do_get_outputs(self, m, pis):
6092 r"""do_get_outputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6093 return _IMP_core.TransformationAndReflectionSymmetry_do_get_outputs(self, m, pis)
6094
6095 def get_version_info(self):
6096 r"""get_version_info(TransformationAndReflectionSymmetry self) -> VersionInfo"""
6097 return _IMP_core.TransformationAndReflectionSymmetry_get_version_info(self)
6098 __swig_destroy__ = _IMP_core.delete_TransformationAndReflectionSymmetry
6099
6100 def __str__(self):
6101 r"""__str__(TransformationAndReflectionSymmetry self) -> std::string"""
6102 return _IMP_core.TransformationAndReflectionSymmetry___str__(self)
6103
6104 def __repr__(self):
6105 r"""__repr__(TransformationAndReflectionSymmetry self) -> std::string"""
6106 return _IMP_core.TransformationAndReflectionSymmetry___repr__(self)
6107
6108 @staticmethod
6109 def get_from(o):
6110 return _object_cast_to_TransformationAndReflectionSymmetry(o)
6111
6112
6113# Register TransformationAndReflectionSymmetry in _IMP_core:
6114_IMP_core.TransformationAndReflectionSymmetry_swigregister(TransformationAndReflectionSymmetry)
6115class TransformationSymmetry(IMP.SingletonModifier):
6116 r"""Proxy of C++ IMP::core::TransformationSymmetry class."""
6117
6118 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6119
6120 def __init__(self, *args):
6121 r"""
6122 __init__(TransformationSymmetry self, Transformation3D t) -> TransformationSymmetry
6123 __init__(TransformationSymmetry self, ParticleIndex rb_pi) -> TransformationSymmetry
6124 """
6125 _IMP_core.TransformationSymmetry_swiginit(self, _IMP_core.new_TransformationSymmetry(*args))
6126
6127 def get_transformation(self):
6128 r"""get_transformation(TransformationSymmetry self) -> Transformation3D"""
6129 return _IMP_core.TransformationSymmetry_get_transformation(self)
6130
6131 def set_transformation(self, t):
6132 r"""set_transformation(TransformationSymmetry self, Transformation3D t)"""
6133 return _IMP_core.TransformationSymmetry_set_transformation(self, t)
6134
6135 def do_get_inputs(self, m, pis):
6136 r"""do_get_inputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6137 return _IMP_core.TransformationSymmetry_do_get_inputs(self, m, pis)
6138
6139 def do_get_outputs(self, m, pis):
6140 r"""do_get_outputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6141 return _IMP_core.TransformationSymmetry_do_get_outputs(self, m, pis)
6142
6143 def get_version_info(self):
6144 r"""get_version_info(TransformationSymmetry self) -> VersionInfo"""
6145 return _IMP_core.TransformationSymmetry_get_version_info(self)
6146 __swig_destroy__ = _IMP_core.delete_TransformationSymmetry
6147
6148 def __str__(self):
6149 r"""__str__(TransformationSymmetry self) -> std::string"""
6150 return _IMP_core.TransformationSymmetry___str__(self)
6151
6152 def __repr__(self):
6153 r"""__repr__(TransformationSymmetry self) -> std::string"""
6154 return _IMP_core.TransformationSymmetry___repr__(self)
6155
6156 @staticmethod
6157 def get_from(o):
6158 return _object_cast_to_TransformationSymmetry(o)
6159
6160
6161# Register TransformationSymmetry in _IMP_core:
6162_IMP_core.TransformationSymmetry_swigregister(TransformationSymmetry)
6163class TransformationSymmetryMover(MonteCarloMover):
6164 r"""Proxy of C++ IMP::core::TransformationSymmetryMover class."""
6165
6166 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6167
6168 def __init__(self, m, symm, pivot, max_translation, max_rotation):
6169 r"""__init__(TransformationSymmetryMover self, Model m, TransformationSymmetry symm, ParticleIndex pivot, IMP::Float max_translation, IMP::Float max_rotation) -> TransformationSymmetryMover"""
6170 _IMP_core.TransformationSymmetryMover_swiginit(self, _IMP_core.new_TransformationSymmetryMover(m, symm, pivot, max_translation, max_rotation))
6171
6172 def set_maximum_translation(self, mt):
6173 r"""set_maximum_translation(TransformationSymmetryMover self, IMP::Float mt)"""
6174 return _IMP_core.TransformationSymmetryMover_set_maximum_translation(self, mt)
6175
6176 def set_maximum_rotation(self, mr):
6177 r"""set_maximum_rotation(TransformationSymmetryMover self, IMP::Float mr)"""
6178 return _IMP_core.TransformationSymmetryMover_set_maximum_rotation(self, mr)
6179
6180 def get_maximum_translation(self):
6181 r"""get_maximum_translation(TransformationSymmetryMover self) -> IMP::Float"""
6182 return _IMP_core.TransformationSymmetryMover_get_maximum_translation(self)
6183
6184 def get_maximum_rotation(self):
6185 r"""get_maximum_rotation(TransformationSymmetryMover self) -> IMP::Float"""
6186 return _IMP_core.TransformationSymmetryMover_get_maximum_rotation(self)
6187
6188 def get_version_info(self):
6189 r"""get_version_info(TransformationSymmetryMover self) -> VersionInfo"""
6190 return _IMP_core.TransformationSymmetryMover_get_version_info(self)
6191 __swig_destroy__ = _IMP_core.delete_TransformationSymmetryMover
6192
6193 def __str__(self):
6194 r"""__str__(TransformationSymmetryMover self) -> std::string"""
6195 return _IMP_core.TransformationSymmetryMover___str__(self)
6196
6197 def __repr__(self):
6198 r"""__repr__(TransformationSymmetryMover self) -> std::string"""
6199 return _IMP_core.TransformationSymmetryMover___repr__(self)
6200
6201 @staticmethod
6202 def get_from(o):
6203 return _object_cast_to_TransformationSymmetryMover(o)
6204
6205
6206# Register TransformationSymmetryMover in _IMP_core:
6207_IMP_core.TransformationSymmetryMover_swigregister(TransformationSymmetryMover)
6208class DistancePairScore(IMP.PairScore):
6209 r"""Proxy of C++ IMP::core::DistancePairScore class."""
6210
6211 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6212
6213 def __init__(self, *args):
6214 r"""
6215 __init__(DistancePairScore self, UnaryFunction uf, std::string name="DistancePairScore%1%") -> DistancePairScore
6216 __init__(DistancePairScore self) -> DistancePairScore
6217 """
6218 _IMP_core.DistancePairScore_swiginit(self, _IMP_core.new_DistancePairScore(*args))
6219
6220 def do_get_inputs(self, m, pis):
6221 r"""do_get_inputs(DistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6222 return _IMP_core.DistancePairScore_do_get_inputs(self, m, pis)
6223
6224 def get_score_functor(self, *args):
6225 r"""
6226 get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6227 get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6228 """
6229 return _IMP_core.DistancePairScore_get_score_functor(self, *args)
6230
6231 def get_version_info(self):
6232 r"""get_version_info(DistancePairScore self) -> VersionInfo"""
6233 return _IMP_core.DistancePairScore_get_version_info(self)
6234 __swig_destroy__ = _IMP_core.delete_DistancePairScore
6235
6236 def __str__(self):
6237 r"""__str__(DistancePairScore self) -> std::string"""
6238 return _IMP_core.DistancePairScore___str__(self)
6239
6240 def __repr__(self):
6241 r"""__repr__(DistancePairScore self) -> std::string"""
6242 return _IMP_core.DistancePairScore___repr__(self)
6243
6244 @staticmethod
6245 def get_from(o):
6246 return _object_cast_to_DistancePairScore(o)
6247
6248
6249 def _get_as_binary(self):
6250 r"""_get_as_binary(DistancePairScore self) -> PyObject *"""
6251 return _IMP_core.DistancePairScore__get_as_binary(self)
6252
6253 def _set_from_binary(self, p):
6254 r"""_set_from_binary(DistancePairScore self, PyObject * p)"""
6255 return _IMP_core.DistancePairScore__set_from_binary(self, p)
6256
6257 def __getstate__(self):
6258 p = self._get_as_binary()
6259 if len(self.__dict__) > 1:
6260 d = self.__dict__.copy()
6261 del d['this']
6262 p = (d, p)
6263 return p
6264
6265 def __setstate__(self, p):
6266 if not hasattr(self, 'this'):
6267 self.__init__()
6268 if isinstance(p, tuple):
6269 d, p = p
6270 self.__dict__.update(d)
6271 return self._set_from_binary(p)
6272
6273
6274 def _get_jax(self, m, indexes, space):
6275 import jax.numpy as jnp
6276 def jax_score(jm, uf):
6277 xyzs = jm['xyz'][indexes]
6278 diff = xyzs[:,0] - xyzs[:,1]
6279 drs = space.distance(diff)
6280 return uf(drs)
6281 sfnc = self.get_score_functor()
6282 uf = sfnc.get_unary_function().get_derived_object()
6283 f = functools.partial(jax_score, uf=uf._get_jax())
6284 return self._wrap_jax(m, f)
6285
6286
6287# Register DistancePairScore in _IMP_core:
6288_IMP_core.DistancePairScore_swigregister(DistancePairScore)
6289class HarmonicDistancePairScore(IMP.PairScore):
6290 r"""Proxy of C++ IMP::core::HarmonicDistancePairScore class."""
6291
6292 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6293
6294 def __init__(self, *args):
6295 r"""
6296 __init__(HarmonicDistancePairScore self, double x0, double k, std::string name="HarmonicDistancePairScore%1%") -> HarmonicDistancePairScore
6297 __init__(HarmonicDistancePairScore self) -> HarmonicDistancePairScore
6298 """
6299 _IMP_core.HarmonicDistancePairScore_swiginit(self, _IMP_core.new_HarmonicDistancePairScore(*args))
6300
6301 def do_get_inputs(self, m, pis):
6302 r"""do_get_inputs(HarmonicDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6303 return _IMP_core.HarmonicDistancePairScore_do_get_inputs(self, m, pis)
6304
6305 def get_score_functor(self, *args):
6306 r"""
6307 get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore
6308 get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore const &
6309 """
6310 return _IMP_core.HarmonicDistancePairScore_get_score_functor(self, *args)
6311
6312 def get_x0(self):
6313 r"""get_x0(HarmonicDistancePairScore self) -> double"""
6314 return _IMP_core.HarmonicDistancePairScore_get_x0(self)
6315
6316 def get_k(self):
6317 r"""get_k(HarmonicDistancePairScore self) -> double"""
6318 return _IMP_core.HarmonicDistancePairScore_get_k(self)
6319
6320 def get_version_info(self):
6321 r"""get_version_info(HarmonicDistancePairScore self) -> VersionInfo"""
6322 return _IMP_core.HarmonicDistancePairScore_get_version_info(self)
6323 __swig_destroy__ = _IMP_core.delete_HarmonicDistancePairScore
6324
6325 def __str__(self):
6326 r"""__str__(HarmonicDistancePairScore self) -> std::string"""
6327 return _IMP_core.HarmonicDistancePairScore___str__(self)
6328
6329 def __repr__(self):
6330 r"""__repr__(HarmonicDistancePairScore self) -> std::string"""
6331 return _IMP_core.HarmonicDistancePairScore___repr__(self)
6332
6333 @staticmethod
6334 def get_from(o):
6335 return _object_cast_to_HarmonicDistancePairScore(o)
6336
6337
6338 def _get_as_binary(self):
6339 r"""_get_as_binary(HarmonicDistancePairScore self) -> PyObject *"""
6340 return _IMP_core.HarmonicDistancePairScore__get_as_binary(self)
6341
6342 def _set_from_binary(self, p):
6343 r"""_set_from_binary(HarmonicDistancePairScore self, PyObject * p)"""
6344 return _IMP_core.HarmonicDistancePairScore__set_from_binary(self, p)
6345
6346 def __getstate__(self):
6347 p = self._get_as_binary()
6348 if len(self.__dict__) > 1:
6349 d = self.__dict__.copy()
6350 del d['this']
6351 p = (d, p)
6352 return p
6353
6354 def __setstate__(self, p):
6355 if not hasattr(self, 'this'):
6356 self.__init__()
6357 if isinstance(p, tuple):
6358 d, p = p
6359 self.__dict__.update(d)
6360 return self._set_from_binary(p)
6361
6362
6363 def _get_jax(self, m, indexes, space):
6364 import jax.numpy as jnp
6365 def jax_harmonic_distance_pair_score(jm, d, k):
6366 xyzs = jm['xyz'][indexes]
6367 diff = xyzs[:,0] - xyzs[:,1]
6368 drs = space.distance(diff)
6369 return 0.5 * k * (d - drs)**2
6370 f = functools.partial(jax_harmonic_distance_pair_score,
6371 d=self.get_x0(), k=self.get_k())
6372 return self._wrap_jax(m, f)
6373
6374
6375# Register HarmonicDistancePairScore in _IMP_core:
6376_IMP_core.HarmonicDistancePairScore_swigregister(HarmonicDistancePairScore)
6377class DistanceRestraint(IMP.Restraint):
6378 r"""Proxy of C++ IMP::core::DistanceRestraint class."""
6379
6380 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6381
6382 def __init__(self, *args):
6383 r"""
6384 __init__(DistanceRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor a, _ParticleIndexAdaptor b, std::string name="DistanceRestraint %1%") -> DistanceRestraint
6385 __init__(DistanceRestraint self) -> DistanceRestraint
6386 """
6387 _IMP_core.DistanceRestraint_swiginit(self, _IMP_core.new_DistanceRestraint(*args))
6388
6389 def get_score_object(self):
6390 r"""get_score_object(DistanceRestraint self) -> DistancePairScore"""
6391 return _IMP_core.DistanceRestraint_get_score_object(self)
6392
6393 def get_index(self):
6394 r"""get_index(DistanceRestraint self) -> IMP::core::DistancePairScore::IndexArgument"""
6395 return _IMP_core.DistanceRestraint_get_index(self)
6396
6397 def get_version_info(self):
6398 r"""get_version_info(DistanceRestraint self) -> VersionInfo"""
6399 return _IMP_core.DistanceRestraint_get_version_info(self)
6400 __swig_destroy__ = _IMP_core.delete_DistanceRestraint
6401
6402 def __str__(self):
6403 r"""__str__(DistanceRestraint self) -> std::string"""
6404 return _IMP_core.DistanceRestraint___str__(self)
6405
6406 def __repr__(self):
6407 r"""__repr__(DistanceRestraint self) -> std::string"""
6408 return _IMP_core.DistanceRestraint___repr__(self)
6409
6410 @staticmethod
6411 def get_from(o):
6412 return _object_cast_to_DistanceRestraint(o)
6413
6414
6415 def _get_as_binary(self):
6416 r"""_get_as_binary(DistanceRestraint self) -> PyObject *"""
6417 return _IMP_core.DistanceRestraint__get_as_binary(self)
6418
6419 def _set_from_binary(self, p):
6420 r"""_set_from_binary(DistanceRestraint self, PyObject * p)"""
6421 return _IMP_core.DistanceRestraint__set_from_binary(self, p)
6422
6423 def __getstate__(self):
6424 p = self._get_as_binary()
6425 if len(self.__dict__) > 1:
6426 d = self.__dict__.copy()
6427 del d['this']
6428 p = (d, p)
6429 return p
6430
6431 def __setstate__(self, p):
6432 if not hasattr(self, 'this'):
6433 self.__init__()
6434 if isinstance(p, tuple):
6435 d, p = p
6436 self.__dict__.update(d)
6437 return self._set_from_binary(p)
6438
6439
6440 def _get_jax(self, space):
6441 import jax.numpy as jnp
6442 import IMP._jax_util
6443 ps = self.get_score_object()
6444 indexes = jnp.array([self.get_index()])
6445 ji = ps._get_jax(self.get_model(), indexes, space=space)
6446 def score(jm):
6447 return jnp.sum(ji.score_func(jm), axis=-1)
6448 return self._wrap_jax(score)
6449
6450
6451# Register DistanceRestraint in _IMP_core:
6452_IMP_core.DistanceRestraint_swigregister(DistanceRestraint)
6453class SphereDistanceToSingletonScore(IMP.SingletonScore):
6454 r"""Proxy of C++ IMP::core::SphereDistanceToSingletonScore class."""
6455
6456 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6457
6458 def __init__(self, f, pt):
6459 r"""__init__(SphereDistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> SphereDistanceToSingletonScore"""
6460 _IMP_core.SphereDistanceToSingletonScore_swiginit(self, _IMP_core.new_SphereDistanceToSingletonScore(f, pt))
6461
6462 def do_get_inputs(self, m, pis):
6463 r"""do_get_inputs(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6464 return _IMP_core.SphereDistanceToSingletonScore_do_get_inputs(self, m, pis)
6465
6466 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
6467 r"""evaluate_indexes(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
6468 return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
6469
6470 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
6471 r"""evaluate_indexes_scores(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
6472 return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
6473
6474 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
6475 r"""evaluate_indexes_delta(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
6476 return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
6477
6478 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
6479 r"""evaluate_if_good_indexes(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
6480 return _IMP_core.SphereDistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
6481
6482 def get_version_info(self):
6483 r"""get_version_info(SphereDistanceToSingletonScore self) -> VersionInfo"""
6484 return _IMP_core.SphereDistanceToSingletonScore_get_version_info(self)
6485 __swig_destroy__ = _IMP_core.delete_SphereDistanceToSingletonScore
6486
6487 def __str__(self):
6488 r"""__str__(SphereDistanceToSingletonScore self) -> std::string"""
6489 return _IMP_core.SphereDistanceToSingletonScore___str__(self)
6490
6491 def __repr__(self):
6492 r"""__repr__(SphereDistanceToSingletonScore self) -> std::string"""
6493 return _IMP_core.SphereDistanceToSingletonScore___repr__(self)
6494
6495 @staticmethod
6496 def get_from(o):
6497 return _object_cast_to_SphereDistanceToSingletonScore(o)
6498
6499
6500# Register SphereDistanceToSingletonScore in _IMP_core:
6501_IMP_core.SphereDistanceToSingletonScore_swigregister(SphereDistanceToSingletonScore)
6502class ExcludedVolumeRestraint(IMP.Restraint):
6503 r"""Proxy of C++ IMP::core::ExcludedVolumeRestraint class."""
6504
6505 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6506
6507 def __init__(self, *args):
6508 r"""__init__(ExcludedVolumeRestraint self, _SingletonContainerAdaptor sc, double k=1, double slack=10, std::string name="ExcludedVolumeRestraint%1%") -> ExcludedVolumeRestraint"""
6509 _IMP_core.ExcludedVolumeRestraint_swiginit(self, _IMP_core.new_ExcludedVolumeRestraint(*args))
6510
6511 def get_score_object(self):
6512 r"""get_score_object(ExcludedVolumeRestraint self) -> SoftSpherePairScore"""
6513 return _IMP_core.ExcludedVolumeRestraint_get_score_object(self)
6514
6515 def get_container(self):
6516 r"""get_container(ExcludedVolumeRestraint self) -> SingletonContainer"""
6517 return _IMP_core.ExcludedVolumeRestraint_get_container(self)
6518
6519 def do_get_inputs(self):
6520 r"""do_get_inputs(ExcludedVolumeRestraint self) -> IMP::ModelObjectsTemp"""
6521 return _IMP_core.ExcludedVolumeRestraint_do_get_inputs(self)
6522
6523 def get_version_info(self):
6524 r"""get_version_info(ExcludedVolumeRestraint self) -> VersionInfo"""
6525 return _IMP_core.ExcludedVolumeRestraint_get_version_info(self)
6526 __swig_destroy__ = _IMP_core.delete_ExcludedVolumeRestraint
6527
6528 def do_create_decomposition(self):
6529 r"""do_create_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6530 return _IMP_core.ExcludedVolumeRestraint_do_create_decomposition(self)
6531
6532 def do_create_current_decomposition(self):
6533 r"""do_create_current_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6534 return _IMP_core.ExcludedVolumeRestraint_do_create_current_decomposition(self)
6535
6536 def get_indexes(self):
6537 r"""get_indexes(ExcludedVolumeRestraint self) -> IMP::ParticleIndexPairs const &"""
6538 return _IMP_core.ExcludedVolumeRestraint_get_indexes(self)
6539 def __get_pair_filters(self): return IMP._list_util.VarList(getdimfunc=self.get_number_of_pair_filters, getfunc=self.get_pair_filter, erasefunc=self.erase_pair_filter, appendfunc=self.add_pair_filter, extendfunc=self.add_pair_filters, clearfunc=self.clear_pair_filters, indexfunc=self._python_index_pair_filter)
6540 def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
6541 def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
6542 pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
6543
6544 def remove_pair_filter(self, d):
6545 r"""remove_pair_filter(ExcludedVolumeRestraint self, PairPredicate d)"""
6546 return _IMP_core.ExcludedVolumeRestraint_remove_pair_filter(self, d)
6547
6548 def _python_index_pair_filter(self, d, start, stop):
6549 r"""_python_index_pair_filter(ExcludedVolumeRestraint self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
6550 return _IMP_core.ExcludedVolumeRestraint__python_index_pair_filter(self, d, start, stop)
6551
6552 def remove_pair_filters(self, d):
6553 r"""remove_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & d)"""
6554 return _IMP_core.ExcludedVolumeRestraint_remove_pair_filters(self, d)
6555
6556 def set_pair_filters(self, ps):
6557 r"""set_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & ps)"""
6558 return _IMP_core.ExcludedVolumeRestraint_set_pair_filters(self, ps)
6559
6560 def set_pair_filters_order(self, objs):
6561 r"""set_pair_filters_order(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6562 return _IMP_core.ExcludedVolumeRestraint_set_pair_filters_order(self, objs)
6563
6564 def add_pair_filter(self, obj):
6565 r"""add_pair_filter(ExcludedVolumeRestraint self, PairPredicate obj) -> unsigned int"""
6566 return _IMP_core.ExcludedVolumeRestraint_add_pair_filter(self, obj)
6567
6568 def add_pair_filters(self, objs):
6569 r"""add_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6570 return _IMP_core.ExcludedVolumeRestraint_add_pair_filters(self, objs)
6571
6572 def clear_pair_filters(self):
6573 r"""clear_pair_filters(ExcludedVolumeRestraint self)"""
6574 return _IMP_core.ExcludedVolumeRestraint_clear_pair_filters(self)
6575
6576 def get_number_of_pair_filters(self):
6577 r"""get_number_of_pair_filters(ExcludedVolumeRestraint self) -> unsigned int"""
6578 return _IMP_core.ExcludedVolumeRestraint_get_number_of_pair_filters(self)
6579
6580 def get_has_pair_filters(self):
6581 r"""get_has_pair_filters(ExcludedVolumeRestraint self) -> bool"""
6582 return _IMP_core.ExcludedVolumeRestraint_get_has_pair_filters(self)
6583
6584 def get_pair_filter(self, i):
6585 r"""get_pair_filter(ExcludedVolumeRestraint self, unsigned int i) -> PairPredicate"""
6586 return _IMP_core.ExcludedVolumeRestraint_get_pair_filter(self, i)
6587
6588 def get_pair_filters(self):
6589 r"""get_pair_filters(ExcludedVolumeRestraint self) -> IMP::PairPredicates"""
6590 return _IMP_core.ExcludedVolumeRestraint_get_pair_filters(self)
6591
6592 def erase_pair_filter(self, i):
6593 r"""erase_pair_filter(ExcludedVolumeRestraint self, unsigned int i)"""
6594 return _IMP_core.ExcludedVolumeRestraint_erase_pair_filter(self, i)
6595
6596 def reserve_pair_filters(self, sz):
6597 r"""reserve_pair_filters(ExcludedVolumeRestraint self, unsigned int sz)"""
6598 return _IMP_core.ExcludedVolumeRestraint_reserve_pair_filters(self, sz)
6599
6600 def __str__(self):
6601 r"""__str__(ExcludedVolumeRestraint self) -> std::string"""
6602 return _IMP_core.ExcludedVolumeRestraint___str__(self)
6603
6604 def __repr__(self):
6605 r"""__repr__(ExcludedVolumeRestraint self) -> std::string"""
6606 return _IMP_core.ExcludedVolumeRestraint___repr__(self)
6607
6608 @staticmethod
6609 def get_from(o):
6610 return _object_cast_to_ExcludedVolumeRestraint(o)
6611
6612
6613 def _get_jax(self, space):
6614 import jax.numpy as jnp
6615 import IMP.container
6616 # We need all indexes for JAX but ExcludedVolumeRestraint does not
6617 # provide a suitable method, so make a temporary ClosePairContainer
6618 # instead with the same set of indexes (we use all pairs for JAX so
6619 # the cutoff and slack are unimportant here)
6620 c = IMP.container.ClosePairContainer(self.get_container(), 10.0, 1.0)
6621 c.pair_filters.extend(self.pair_filters)
6622 indexes = c._get_static_contents()
6623
6624 score = self.get_score_object().get_derived_object()
6625 ji = score._get_jax(self.get_model(), indexes, space)
6626 score_jax = ji.score_func
6627
6628 def jax_restraint(jm):
6629 return jnp.sum(score_jax(jm), axis=-1)
6630 return self._wrap_jax(jax_restraint, keys=ji._keys)
6631
6632
6633# Register ExcludedVolumeRestraint in _IMP_core:
6634_IMP_core.ExcludedVolumeRestraint_swigregister(ExcludedVolumeRestraint)
6635class FixedRefiner(IMP.Refiner):
6636 r"""Proxy of C++ IMP::core::FixedRefiner class."""
6637
6638 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6639
6640 def __init__(self, *args):
6641 r"""
6642 __init__(FixedRefiner self, IMP::ParticlesTemp const & ps) -> FixedRefiner
6643 __init__(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> FixedRefiner
6644 __init__(FixedRefiner self) -> FixedRefiner
6645 """
6646 _IMP_core.FixedRefiner_swiginit(self, _IMP_core.new_FixedRefiner(*args))
6647
6648 def do_get_inputs(self, m, pis):
6649 r"""do_get_inputs(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6650 return _IMP_core.FixedRefiner_do_get_inputs(self, m, pis)
6651
6652 def get_version_info(self):
6653 r"""get_version_info(FixedRefiner self) -> VersionInfo"""
6654 return _IMP_core.FixedRefiner_get_version_info(self)
6655 __swig_destroy__ = _IMP_core.delete_FixedRefiner
6656
6657 def __str__(self):
6658 r"""__str__(FixedRefiner self) -> std::string"""
6659 return _IMP_core.FixedRefiner___str__(self)
6660
6661 def __repr__(self):
6662 r"""__repr__(FixedRefiner self) -> std::string"""
6663 return _IMP_core.FixedRefiner___repr__(self)
6664
6665 @staticmethod
6666 def get_from(o):
6667 return _object_cast_to_FixedRefiner(o)
6668
6669
6670 def _get_as_binary(self):
6671 r"""_get_as_binary(FixedRefiner self) -> PyObject *"""
6672 return _IMP_core.FixedRefiner__get_as_binary(self)
6673
6674 def _set_from_binary(self, p):
6675 r"""_set_from_binary(FixedRefiner self, PyObject * p)"""
6676 return _IMP_core.FixedRefiner__set_from_binary(self, p)
6677
6678 def __getstate__(self):
6679 p = self._get_as_binary()
6680 if len(self.__dict__) > 1:
6681 d = self.__dict__.copy()
6682 del d['this']
6683 p = (d, p)
6684 return p
6685
6686 def __setstate__(self, p):
6687 if not hasattr(self, 'this'):
6688 self.__init__()
6689 if isinstance(p, tuple):
6690 d, p = p
6691 self.__dict__.update(d)
6692 return self._set_from_binary(p)
6693
6694
6695# Register FixedRefiner in _IMP_core:
6696_IMP_core.FixedRefiner_swigregister(FixedRefiner)
6697class GridClosePairsFinder(ClosePairsFinder):
6698 r"""Proxy of C++ IMP::core::GridClosePairsFinder class."""
6699
6700 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6701
6702 def __init__(self):
6703 r"""__init__(GridClosePairsFinder self) -> GridClosePairsFinder"""
6704 _IMP_core.GridClosePairsFinder_swiginit(self, _IMP_core.new_GridClosePairsFinder())
6705
6706 def get_close_pairs(self, *args):
6707 r"""
6708 get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6709 get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6710 get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
6711 get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
6712 """
6713 return _IMP_core.GridClosePairsFinder_get_close_pairs(self, *args)
6714
6715 def do_get_inputs(self, m, pis):
6716 r"""do_get_inputs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6717 return _IMP_core.GridClosePairsFinder_do_get_inputs(self, m, pis)
6718
6719 def get_version_info(self):
6720 r"""get_version_info(GridClosePairsFinder self) -> VersionInfo"""
6721 return _IMP_core.GridClosePairsFinder_get_version_info(self)
6722 __swig_destroy__ = _IMP_core.delete_GridClosePairsFinder
6723
6724 def __str__(self):
6725 r"""__str__(GridClosePairsFinder self) -> std::string"""
6726 return _IMP_core.GridClosePairsFinder___str__(self)
6727
6728 def __repr__(self):
6729 r"""__repr__(GridClosePairsFinder self) -> std::string"""
6730 return _IMP_core.GridClosePairsFinder___repr__(self)
6731
6732 @staticmethod
6733 def get_from(o):
6734 return _object_cast_to_GridClosePairsFinder(o)
6735
6736
6737 def _get_as_binary(self):
6738 r"""_get_as_binary(GridClosePairsFinder self) -> PyObject *"""
6739 return _IMP_core.GridClosePairsFinder__get_as_binary(self)
6740
6741 def _set_from_binary(self, p):
6742 r"""_set_from_binary(GridClosePairsFinder self, PyObject * p)"""
6743 return _IMP_core.GridClosePairsFinder__set_from_binary(self, p)
6744
6745 def __getstate__(self):
6746 p = self._get_as_binary()
6747 if len(self.__dict__) > 1:
6748 d = self.__dict__.copy()
6749 del d['this']
6750 p = (d, p)
6751 return p
6752
6753 def __setstate__(self, p):
6754 if not hasattr(self, 'this'):
6755 self.__init__()
6756 if isinstance(p, tuple):
6757 d, p = p
6758 self.__dict__.update(d)
6759 return self._set_from_binary(p)
6760
6761
6762# Register GridClosePairsFinder in _IMP_core:
6763_IMP_core.GridClosePairsFinder_swigregister(GridClosePairsFinder)
6764class Harmonic(IMP.UnaryFunction):
6765 r"""Proxy of C++ IMP::core::Harmonic class."""
6766
6767 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6768
6769 def __init__(self, *args):
6770 r"""
6771 __init__(Harmonic self, IMP::Float mean, IMP::Float k) -> Harmonic
6772 __init__(Harmonic self) -> Harmonic
6773 """
6774 _IMP_core.Harmonic_swiginit(self, _IMP_core.new_Harmonic(*args))
6775
6776 def get_version_info(self):
6777 r"""get_version_info(Harmonic self) -> VersionInfo"""
6778 return _IMP_core.Harmonic_get_version_info(self)
6779 __swig_destroy__ = _IMP_core.delete_Harmonic
6780
6781 def get_mean(self):
6782 r"""get_mean(Harmonic self) -> IMP::Float"""
6783 return _IMP_core.Harmonic_get_mean(self)
6784
6785 def get_k(self):
6786 r"""get_k(Harmonic self) -> IMP::Float"""
6787 return _IMP_core.Harmonic_get_k(self)
6788
6789 def set_mean(self, mean):
6790 r"""set_mean(Harmonic self, IMP::Float mean)"""
6791 return _IMP_core.Harmonic_set_mean(self, mean)
6792
6793 def set_k(self, k):
6794 r"""set_k(Harmonic self, IMP::Float k)"""
6795 return _IMP_core.Harmonic_set_k(self, k)
6796
6797 @staticmethod
6798 def get_k_from_standard_deviation(sd, t=297.15):
6799 r"""get_k_from_standard_deviation(IMP::Float sd, IMP::Float t=297.15) -> IMP::Float"""
6800 return _IMP_core.Harmonic_get_k_from_standard_deviation(sd, t)
6801
6802 def __str__(self):
6803 r"""__str__(Harmonic self) -> std::string"""
6804 return _IMP_core.Harmonic___str__(self)
6805
6806 def __repr__(self):
6807 r"""__repr__(Harmonic self) -> std::string"""
6808 return _IMP_core.Harmonic___repr__(self)
6809
6810 @staticmethod
6811 def get_from(o):
6812 return _object_cast_to_Harmonic(o)
6813
6814
6815 def _get_as_binary(self):
6816 r"""_get_as_binary(Harmonic self) -> PyObject *"""
6817 return _IMP_core.Harmonic__get_as_binary(self)
6818
6819 def _set_from_binary(self, p):
6820 r"""_set_from_binary(Harmonic self, PyObject * p)"""
6821 return _IMP_core.Harmonic__set_from_binary(self, p)
6822
6823 def __getstate__(self):
6824 p = self._get_as_binary()
6825 if len(self.__dict__) > 1:
6826 d = self.__dict__.copy()
6827 del d['this']
6828 p = (d, p)
6829 return p
6830
6831 def __setstate__(self, p):
6832 if not hasattr(self, 'this'):
6833 self.__init__()
6834 if isinstance(p, tuple):
6835 d, p = p
6836 self.__dict__.update(d)
6837 return self._set_from_binary(p)
6838
6839
6840 def _get_jax(self):
6841 def score(val, mean, k):
6842 return 0.5 * k * (mean - val) ** 2
6843 return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6844
6845
6846# Register Harmonic in _IMP_core:
6847_IMP_core.Harmonic_swigregister(Harmonic)
6848class HarmonicWell(IMP.UnaryFunction):
6849 r"""Proxy of C++ IMP::core::HarmonicWell class."""
6850
6851 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6852
6853 def __init__(self, well, k):
6854 r"""__init__(HarmonicWell self, IMP::FloatRange const & well, double k) -> HarmonicWell"""
6855 _IMP_core.HarmonicWell_swiginit(self, _IMP_core.new_HarmonicWell(well, k))
6856
6857 def get_well(self):
6858 r"""get_well(HarmonicWell self) -> IMP::FloatRange"""
6859 return _IMP_core.HarmonicWell_get_well(self)
6860
6861 def get_k(self):
6862 r"""get_k(HarmonicWell self) -> double"""
6863 return _IMP_core.HarmonicWell_get_k(self)
6864
6865 def get_version_info(self):
6866 r"""get_version_info(HarmonicWell self) -> VersionInfo"""
6867 return _IMP_core.HarmonicWell_get_version_info(self)
6868 __swig_destroy__ = _IMP_core.delete_HarmonicWell
6869
6870 def __str__(self):
6871 r"""__str__(HarmonicWell self) -> std::string"""
6872 return _IMP_core.HarmonicWell___str__(self)
6873
6874 def __repr__(self):
6875 r"""__repr__(HarmonicWell self) -> std::string"""
6876 return _IMP_core.HarmonicWell___repr__(self)
6877
6878 @staticmethod
6879 def get_from(o):
6880 return _object_cast_to_HarmonicWell(o)
6881
6882
6883 def _get_jax(self):
6884 import jax.numpy as jnp
6885 def score(val, lb, ub, k):
6886 return 0.5 * k * (val - jnp.clip(val, lb, ub)) ** 2
6887 well = self.get_well()
6888 return functools.partial(score, lb=well[0], ub=well[1], k=self.get_k())
6889
6890
6891# Register HarmonicWell in _IMP_core:
6892_IMP_core.HarmonicWell_swigregister(HarmonicWell)
6893class HarmonicLowerBound(Harmonic):
6894 r"""Proxy of C++ IMP::core::HarmonicLowerBound class."""
6895
6896 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6897
6898 def __init__(self, *args):
6899 r"""
6900 __init__(HarmonicLowerBound self, IMP::Float mean, IMP::Float k) -> HarmonicLowerBound
6901 __init__(HarmonicLowerBound self) -> HarmonicLowerBound
6902 """
6903 _IMP_core.HarmonicLowerBound_swiginit(self, _IMP_core.new_HarmonicLowerBound(*args))
6904 __swig_destroy__ = _IMP_core.delete_HarmonicLowerBound
6905
6906 def __str__(self):
6907 r"""__str__(HarmonicLowerBound self) -> std::string"""
6908 return _IMP_core.HarmonicLowerBound___str__(self)
6909
6910 def __repr__(self):
6911 r"""__repr__(HarmonicLowerBound self) -> std::string"""
6912 return _IMP_core.HarmonicLowerBound___repr__(self)
6913
6914 @staticmethod
6915 def get_from(o):
6916 return _object_cast_to_HarmonicLowerBound(o)
6917
6918
6919 def _get_as_binary(self):
6920 r"""_get_as_binary(HarmonicLowerBound self) -> PyObject *"""
6921 return _IMP_core.HarmonicLowerBound__get_as_binary(self)
6922
6923 def _set_from_binary(self, p):
6924 r"""_set_from_binary(HarmonicLowerBound self, PyObject * p)"""
6925 return _IMP_core.HarmonicLowerBound__set_from_binary(self, p)
6926
6927 def __getstate__(self):
6928 p = self._get_as_binary()
6929 if len(self.__dict__) > 1:
6930 d = self.__dict__.copy()
6931 del d['this']
6932 p = (d, p)
6933 return p
6934
6935 def __setstate__(self, p):
6936 if not hasattr(self, 'this'):
6937 self.__init__()
6938 if isinstance(p, tuple):
6939 d, p = p
6940 self.__dict__.update(d)
6941 return self._set_from_binary(p)
6942
6943
6944 def _get_jax(self):
6945 import jax.lax
6946 def score(val, mean, k):
6947 return 0.5 * k * jax.lax.max(mean - val, 0.0) ** 2
6948 return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6949
6950
6951# Register HarmonicLowerBound in _IMP_core:
6952_IMP_core.HarmonicLowerBound_swigregister(HarmonicLowerBound)
6953class HarmonicUpperBound(Harmonic):
6954 r"""Proxy of C++ IMP::core::HarmonicUpperBound class."""
6955
6956 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6957
6958 def __init__(self, *args):
6959 r"""
6960 __init__(HarmonicUpperBound self, IMP::Float mean, IMP::Float k) -> HarmonicUpperBound
6961 __init__(HarmonicUpperBound self) -> HarmonicUpperBound
6962 """
6963 _IMP_core.HarmonicUpperBound_swiginit(self, _IMP_core.new_HarmonicUpperBound(*args))
6964 __swig_destroy__ = _IMP_core.delete_HarmonicUpperBound
6965
6966 def __str__(self):
6967 r"""__str__(HarmonicUpperBound self) -> std::string"""
6968 return _IMP_core.HarmonicUpperBound___str__(self)
6969
6970 def __repr__(self):
6971 r"""__repr__(HarmonicUpperBound self) -> std::string"""
6972 return _IMP_core.HarmonicUpperBound___repr__(self)
6973
6974 @staticmethod
6975 def get_from(o):
6976 return _object_cast_to_HarmonicUpperBound(o)
6977
6978
6979 def _get_as_binary(self):
6980 r"""_get_as_binary(HarmonicUpperBound self) -> PyObject *"""
6981 return _IMP_core.HarmonicUpperBound__get_as_binary(self)
6982
6983 def _set_from_binary(self, p):
6984 r"""_set_from_binary(HarmonicUpperBound self, PyObject * p)"""
6985 return _IMP_core.HarmonicUpperBound__set_from_binary(self, p)
6986
6987 def __getstate__(self):
6988 p = self._get_as_binary()
6989 if len(self.__dict__) > 1:
6990 d = self.__dict__.copy()
6991 del d['this']
6992 p = (d, p)
6993 return p
6994
6995 def __setstate__(self, p):
6996 if not hasattr(self, 'this'):
6997 self.__init__()
6998 if isinstance(p, tuple):
6999 d, p = p
7000 self.__dict__.update(d)
7001 return self._set_from_binary(p)
7002
7003
7004 def _get_jax(self):
7005 import jax.lax
7006 def score(val, mean, k):
7007 return 0.5 * k * jax.lax.min(mean - val, 0.0) ** 2
7008 return functools.partial(score, mean=self.get_mean(), k=self.get_k())
7009
7010
7011# Register HarmonicUpperBound in _IMP_core:
7012_IMP_core.HarmonicUpperBound_swigregister(HarmonicUpperBound)
7013class WeightedSum(IMP.UnaryFunction):
7014 r"""Proxy of C++ IMP::core::WeightedSum class."""
7015
7016 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7017
7018 def __init__(self, funcs, weights):
7019 r"""__init__(WeightedSum self, IMP::UnaryFunctions funcs, IMP::Floats weights) -> WeightedSum"""
7020 _IMP_core.WeightedSum_swiginit(self, _IMP_core.new_WeightedSum(funcs, weights))
7021
7022 def get_function_number(self):
7023 r"""get_function_number(WeightedSum self) -> unsigned int"""
7024 return _IMP_core.WeightedSum_get_function_number(self)
7025
7026 def set_weights(self, weights):
7027 r"""set_weights(WeightedSum self, IMP::Floats weights)"""
7028 return _IMP_core.WeightedSum_set_weights(self, weights)
7029
7030 def get_weights(self):
7031 r"""get_weights(WeightedSum self) -> IMP::Floats"""
7032 return _IMP_core.WeightedSum_get_weights(self)
7033
7034 def get_weight(self, i):
7035 r"""get_weight(WeightedSum self, unsigned int i) -> double"""
7036 return _IMP_core.WeightedSum_get_weight(self, i)
7037
7038 def get_function(self, i):
7039 r"""get_function(WeightedSum self, unsigned int i) -> UnaryFunction"""
7040 return _IMP_core.WeightedSum_get_function(self, i)
7041
7042 def get_version_info(self):
7043 r"""get_version_info(WeightedSum self) -> VersionInfo"""
7044 return _IMP_core.WeightedSum_get_version_info(self)
7045 __swig_destroy__ = _IMP_core.delete_WeightedSum
7046
7047 def __str__(self):
7048 r"""__str__(WeightedSum self) -> std::string"""
7049 return _IMP_core.WeightedSum___str__(self)
7050
7051 def __repr__(self):
7052 r"""__repr__(WeightedSum self) -> std::string"""
7053 return _IMP_core.WeightedSum___repr__(self)
7054
7055 @staticmethod
7056 def get_from(o):
7057 return _object_cast_to_WeightedSum(o)
7058
7059
7060 def _get_jax(self):
7061 import jax.numpy as jnp
7062 def score(val, funcs, weights):
7063 return sum(f(val) * weight for (f, weight) in zip(funcs, weights))
7064 nfunc = self.get_function_number()
7065 funcs = [self.get_function(i).get_derived_object()._get_jax()
7066 for i in range(nfunc)]
7067 return functools.partial(score, funcs=funcs,
7068 weights=self.get_weights())
7069
7070
7071# Register WeightedSum in _IMP_core:
7072_IMP_core.WeightedSum_swigregister(WeightedSum)
7073class WeightedSumOfExponential(IMP.UnaryFunction):
7074 r"""Proxy of C++ IMP::core::WeightedSumOfExponential class."""
7075
7076 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7077
7078 def __init__(self, funcs, weights, denom=1.0):
7079 r"""__init__(WeightedSumOfExponential self, IMP::UnaryFunctions funcs, IMP::Floats weights, IMP::Float denom=1.0) -> WeightedSumOfExponential"""
7080 _IMP_core.WeightedSumOfExponential_swiginit(self, _IMP_core.new_WeightedSumOfExponential(funcs, weights, denom))
7081
7082 def get_function_number(self):
7083 r"""get_function_number(WeightedSumOfExponential self) -> unsigned int"""
7084 return _IMP_core.WeightedSumOfExponential_get_function_number(self)
7085
7086 def set_weights(self, weights):
7087 r"""set_weights(WeightedSumOfExponential self, IMP::Floats weights)"""
7088 return _IMP_core.WeightedSumOfExponential_set_weights(self, weights)
7089
7090 def get_weights(self):
7091 r"""get_weights(WeightedSumOfExponential self) -> IMP::Floats"""
7092 return _IMP_core.WeightedSumOfExponential_get_weights(self)
7093
7094 def get_weight(self, i):
7095 r"""get_weight(WeightedSumOfExponential self, unsigned int i) -> double"""
7096 return _IMP_core.WeightedSumOfExponential_get_weight(self, i)
7097
7098 def get_function(self, i):
7099 r"""get_function(WeightedSumOfExponential self, unsigned int i) -> UnaryFunction"""
7100 return _IMP_core.WeightedSumOfExponential_get_function(self, i)
7101
7102 def set_denominator(self, denom):
7103 r"""set_denominator(WeightedSumOfExponential self, double denom)"""
7104 return _IMP_core.WeightedSumOfExponential_set_denominator(self, denom)
7105
7106 def get_denominator(self):
7107 r"""get_denominator(WeightedSumOfExponential self) -> double"""
7108 return _IMP_core.WeightedSumOfExponential_get_denominator(self)
7109
7110 def get_version_info(self):
7111 r"""get_version_info(WeightedSumOfExponential self) -> VersionInfo"""
7112 return _IMP_core.WeightedSumOfExponential_get_version_info(self)
7113 __swig_destroy__ = _IMP_core.delete_WeightedSumOfExponential
7114
7115 def __str__(self):
7116 r"""__str__(WeightedSumOfExponential self) -> std::string"""
7117 return _IMP_core.WeightedSumOfExponential___str__(self)
7118
7119 def __repr__(self):
7120 r"""__repr__(WeightedSumOfExponential self) -> std::string"""
7121 return _IMP_core.WeightedSumOfExponential___repr__(self)
7122
7123 @staticmethod
7124 def get_from(o):
7125 return _object_cast_to_WeightedSumOfExponential(o)
7126
7127
7128 def _get_jax(self):
7129 import jax.numpy as jnp
7130 def score(val, funcs, weights, denom):
7131 exp_sum = sum(weight * jnp.exp(-f(val) / denom)
7132 for (f, weight) in zip(funcs, weights))
7133 return -jnp.log(exp_sum) * denom
7134 nfunc = self.get_function_number()
7135 funcs = [self.get_function(i).get_derived_object()._get_jax()
7136 for i in range(nfunc)]
7137 return functools.partial(score, funcs=funcs,
7138 weights=self.get_weights(),
7139 denom=self.get_denominator())
7140
7141
7142# Register WeightedSumOfExponential in _IMP_core:
7143_IMP_core.WeightedSumOfExponential_swigregister(WeightedSumOfExponential)
7144class MSConnectivityRestraint(IMP.Restraint):
7145 r"""Proxy of C++ IMP::core::MSConnectivityRestraint class."""
7146
7147 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7148
7149 def __init__(self, m, ps, eps=0.1):
7150 r"""__init__(MSConnectivityRestraint self, Model m, PairScore ps, double eps=0.1) -> MSConnectivityRestraint"""
7151 _IMP_core.MSConnectivityRestraint_swiginit(self, _IMP_core.new_MSConnectivityRestraint(m, ps, eps))
7152
7153 def add_type(self, ps):
7154 r"""add_type(MSConnectivityRestraint self, IMP::ParticlesTemp const & ps) -> unsigned int"""
7155 return _IMP_core.MSConnectivityRestraint_add_type(self, ps)
7156
7157 def add_composite(self, *args):
7158 r"""
7159 add_composite(MSConnectivityRestraint self, IMP::Ints const & components) -> unsigned int
7160 add_composite(MSConnectivityRestraint self, IMP::Ints const & components, unsigned int parent) -> unsigned int
7161 """
7162 return _IMP_core.MSConnectivityRestraint_add_composite(self, *args)
7163
7164 def get_connected_pairs(self):
7165 r"""get_connected_pairs(MSConnectivityRestraint self) -> IMP::ParticlePairsTemp"""
7166 return _IMP_core.MSConnectivityRestraint_get_connected_pairs(self)
7167
7168 def get_pair_score(self):
7169 r"""get_pair_score(MSConnectivityRestraint self) -> PairScore"""
7170 return _IMP_core.MSConnectivityRestraint_get_pair_score(self)
7171
7172 def do_create_current_decomposition(self):
7173 r"""do_create_current_decomposition(MSConnectivityRestraint self) -> IMP::Restraints"""
7174 return _IMP_core.MSConnectivityRestraint_do_create_current_decomposition(self)
7175
7176 def do_get_inputs(self):
7177 r"""do_get_inputs(MSConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
7178 return _IMP_core.MSConnectivityRestraint_do_get_inputs(self)
7179
7180 def get_version_info(self):
7181 r"""get_version_info(MSConnectivityRestraint self) -> VersionInfo"""
7182 return _IMP_core.MSConnectivityRestraint_get_version_info(self)
7183 __swig_destroy__ = _IMP_core.delete_MSConnectivityRestraint
7184
7185 def __str__(self):
7186 r"""__str__(MSConnectivityRestraint self) -> std::string"""
7187 return _IMP_core.MSConnectivityRestraint___str__(self)
7188
7189 def __repr__(self):
7190 r"""__repr__(MSConnectivityRestraint self) -> std::string"""
7191 return _IMP_core.MSConnectivityRestraint___repr__(self)
7192
7193 @staticmethod
7194 def get_from(o):
7195 return _object_cast_to_MSConnectivityRestraint(o)
7196
7197
7198# Register MSConnectivityRestraint in _IMP_core:
7199_IMP_core.MSConnectivityRestraint_swigregister(MSConnectivityRestraint)
7200class HierarchyTraits(object):
7201 r"""Proxy of C++ IMP::core::HierarchyTraits class."""
7202
7203 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7204
7205 def __init__(self, *args):
7206 r"""
7207 __init__(HierarchyTraits self) -> HierarchyTraits
7208 __init__(HierarchyTraits self, std::string name) -> HierarchyTraits
7209 """
7210 _IMP_core.HierarchyTraits_swiginit(self, _IMP_core.new_HierarchyTraits(*args))
7211
7212 def get_children_key(self):
7213 r"""get_children_key(HierarchyTraits self) -> ParticleIndexesKey"""
7214 return _IMP_core.HierarchyTraits_get_children_key(self)
7215
7216 def get_parent_key(self):
7217 r"""get_parent_key(HierarchyTraits self) -> ParticleIndexKey"""
7218 return _IMP_core.HierarchyTraits_get_parent_key(self)
7219
7220 def __eq__(self, o):
7221 r"""__eq__(HierarchyTraits self, HierarchyTraits o) -> bool"""
7222 return _IMP_core.HierarchyTraits___eq__(self, o)
7223
7224 def show(self, *args):
7225 r"""show(HierarchyTraits self, _ostream out=std::cout)"""
7226 return _IMP_core.HierarchyTraits_show(self, *args)
7227
7228 def __str__(self):
7229 r"""__str__(HierarchyTraits self) -> std::string"""
7230 return _IMP_core.HierarchyTraits___str__(self)
7231
7232 def __repr__(self):
7233 r"""__repr__(HierarchyTraits self) -> std::string"""
7234 return _IMP_core.HierarchyTraits___repr__(self)
7235 __swig_destroy__ = _IMP_core.delete_HierarchyTraits
7236
7237# Register HierarchyTraits in _IMP_core:
7238_IMP_core.HierarchyTraits_swigregister(HierarchyTraits)
7239class Hierarchy(IMP.Decorator):
7240 r"""Proxy of C++ IMP::core::Hierarchy class."""
7241
7242 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7243
7244 def get_decorator_traits(self):
7245 r"""get_decorator_traits(Hierarchy self) -> HierarchyTraits"""
7246 return _IMP_core.Hierarchy_get_decorator_traits(self)
7247
7248 @staticmethod
7249 def get_default_decorator_traits():
7250 r"""get_default_decorator_traits() -> HierarchyTraits"""
7251 return _IMP_core.Hierarchy_get_default_decorator_traits()
7252
7253 def __init__(self, *args):
7254 r"""
7255 __init__(Hierarchy self) -> Hierarchy
7256 __init__(Hierarchy self, Model m, ParticleIndex id, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7257 __init__(Hierarchy self, _ParticleAdaptor d, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7258 """
7259 _IMP_core.Hierarchy_swiginit(self, _IMP_core.new_Hierarchy(*args))
7260
7261 def show(self, *args):
7262 r"""show(Hierarchy self, _ostream out=std::cout)"""
7263 return _IMP_core.Hierarchy_show(self, *args)
7264
7265 @staticmethod
7266 def setup_particle(*args):
7267 r"""
7268 setup_particle(Model m, ParticleIndex pi, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7269 setup_particle(_ParticleAdaptor d, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7270 setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7271 setup_particle(_ParticleAdaptor d, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7272 setup_particle(Model m, ParticleIndex pi, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7273 setup_particle(_ParticleAdaptor d, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7274 """
7275 return _IMP_core.Hierarchy_setup_particle(*args)
7276
7277 @staticmethod
7278 def get_is_setup(*args):
7279 r"""
7280 get_is_setup(_ParticleAdaptor p, HierarchyTraits tr=get_default_traits()) -> bool
7281 get_is_setup(Model arg1, ParticleIndex arg2, HierarchyTraits arg3=Hierarchy::get_default_traits()) -> bool
7282 """
7283 return _IMP_core.Hierarchy_get_is_setup(*args)
7284
7285 @staticmethod
7286 def get_changed_key():
7287 r"""get_changed_key() -> TriggerKey"""
7288 return _IMP_core.Hierarchy_get_changed_key()
7289
7290 def get_parent(self):
7291 r"""get_parent(Hierarchy self) -> Hierarchy"""
7292 return _IMP_core.Hierarchy_get_parent(self)
7293
7294 def get_number_of_children(self):
7295 r"""get_number_of_children(Hierarchy self) -> unsigned int"""
7296 return _IMP_core.Hierarchy_get_number_of_children(self)
7297
7298 def get_child(self, i):
7299 r"""get_child(Hierarchy self, unsigned int i) -> Hierarchy"""
7300 return _IMP_core.Hierarchy_get_child(self, i)
7301
7302 def get_children_indexes(self):
7303 r"""get_children_indexes(Hierarchy self) -> IMP::ParticleIndexes"""
7304 return _IMP_core.Hierarchy_get_children_indexes(self)
7305
7306 def get_children(self):
7307 r"""get_children(Hierarchy self) -> IMP::core::GenericHierarchies"""
7308 return _IMP_core.Hierarchy_get_children(self)
7309
7310 def remove_child(self, *args):
7311 r"""
7312 remove_child(Hierarchy self, unsigned int i)
7313 remove_child(Hierarchy self, Hierarchy h)
7314 """
7315 return _IMP_core.Hierarchy_remove_child(self, *args)
7316
7317 def clear_children(self):
7318 r"""clear_children(Hierarchy self)"""
7319 return _IMP_core.Hierarchy_clear_children(self)
7320
7321 def add_child(self, h):
7322 r"""add_child(Hierarchy self, Hierarchy h)"""
7323 return _IMP_core.Hierarchy_add_child(self, h)
7324
7325 def add_child_at(self, h, pos):
7326 r"""add_child_at(Hierarchy self, Hierarchy h, unsigned int pos)"""
7327 return _IMP_core.Hierarchy_add_child_at(self, h, pos)
7328
7329 def get_child_index(self, *args):
7330 r"""
7331 get_child_index(Hierarchy self, unsigned int i) -> ParticleIndex
7332 get_child_index(Hierarchy self) -> int
7333 """
7334 return _IMP_core.Hierarchy_get_child_index(self, *args)
7335
7336 @staticmethod
7337 def get_default_traits():
7338 r"""get_default_traits() -> HierarchyTraits"""
7339 return _IMP_core.Hierarchy_get_default_traits()
7340
7341 def get_traits(self):
7342 r"""get_traits(Hierarchy self) -> HierarchyTraits"""
7343 return _IMP_core.Hierarchy_get_traits(self)
7344
7345 def add_attribute(self, *args):
7346 r"""
7347 add_attribute(Hierarchy self, FloatKey k, IMP::Float v, bool opt)
7348 add_attribute(Hierarchy self, FloatKey a0, IMP::Float a1)
7349 add_attribute(Hierarchy self, IntKey a0, IMP::Int a1)
7350 add_attribute(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7351 add_attribute(Hierarchy self, IntsKey a0, IMP::Ints a1)
7352 add_attribute(Hierarchy self, StringKey a0, IMP::String a1)
7353 add_attribute(Hierarchy self, ParticleIndexKey a0, Particle a1)
7354 add_attribute(Hierarchy self, ObjectKey a0, Object a1)
7355 add_attribute(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7356 add_attribute(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7357 add_attribute(Hierarchy self, SparseStringKey a0, IMP::String a1)
7358 add_attribute(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7359 """
7360 return _IMP_core.Hierarchy_add_attribute(self, *args)
7361
7362 def get_value(self, *args):
7363 r"""
7364 get_value(Hierarchy self, FloatKey a0) -> IMP::Float
7365 get_value(Hierarchy self, IntKey a0) -> IMP::Int
7366 get_value(Hierarchy self, FloatsKey a0) -> IMP::Floats
7367 get_value(Hierarchy self, IntsKey a0) -> IMP::Ints
7368 get_value(Hierarchy self, StringKey a0) -> IMP::String
7369 get_value(Hierarchy self, ParticleIndexKey a0) -> Particle
7370 get_value(Hierarchy self, ObjectKey a0) -> Object
7371 get_value(Hierarchy self, SparseFloatKey a0) -> IMP::Float
7372 get_value(Hierarchy self, SparseIntKey a0) -> IMP::Int
7373 get_value(Hierarchy self, SparseStringKey a0) -> IMP::String
7374 get_value(Hierarchy self, SparseParticleIndexKey a0) -> ParticleIndex
7375 """
7376 return _IMP_core.Hierarchy_get_value(self, *args)
7377
7378 def set_value(self, *args):
7379 r"""
7380 set_value(Hierarchy self, FloatKey a0, IMP::Float a1)
7381 set_value(Hierarchy self, IntKey a0, IMP::Int a1)
7382 set_value(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7383 set_value(Hierarchy self, IntsKey a0, IMP::Ints a1)
7384 set_value(Hierarchy self, StringKey a0, IMP::String a1)
7385 set_value(Hierarchy self, ParticleIndexKey a0, Particle a1)
7386 set_value(Hierarchy self, ObjectKey a0, Object a1)
7387 set_value(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7388 set_value(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7389 set_value(Hierarchy self, SparseStringKey a0, IMP::String a1)
7390 set_value(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7391 """
7392 return _IMP_core.Hierarchy_set_value(self, *args)
7393
7394 def remove_attribute(self, *args):
7395 r"""
7396 remove_attribute(Hierarchy self, FloatKey a0)
7397 remove_attribute(Hierarchy self, IntKey a0)
7398 remove_attribute(Hierarchy self, FloatsKey a0)
7399 remove_attribute(Hierarchy self, IntsKey a0)
7400 remove_attribute(Hierarchy self, StringKey a0)
7401 remove_attribute(Hierarchy self, ParticleIndexKey a0)
7402 remove_attribute(Hierarchy self, ObjectKey a0)
7403 remove_attribute(Hierarchy self, SparseFloatKey a0)
7404 remove_attribute(Hierarchy self, SparseIntKey a0)
7405 remove_attribute(Hierarchy self, SparseStringKey a0)
7406 remove_attribute(Hierarchy self, SparseParticleIndexKey a0)
7407 """
7408 return _IMP_core.Hierarchy_remove_attribute(self, *args)
7409
7410 def has_attribute(self, *args):
7411 r"""
7412 has_attribute(Hierarchy self, FloatKey a0) -> bool
7413 has_attribute(Hierarchy self, IntKey a0) -> bool
7414 has_attribute(Hierarchy self, FloatsKey a0) -> bool
7415 has_attribute(Hierarchy self, IntsKey a0) -> bool
7416 has_attribute(Hierarchy self, StringKey a0) -> bool
7417 has_attribute(Hierarchy self, ParticleIndexKey a0) -> bool
7418 has_attribute(Hierarchy self, ObjectKey a0) -> bool
7419 has_attribute(Hierarchy self, SparseFloatKey a0) -> bool
7420 has_attribute(Hierarchy self, SparseIntKey a0) -> bool
7421 has_attribute(Hierarchy self, SparseStringKey a0) -> bool
7422 has_attribute(Hierarchy self, SparseParticleIndexKey a0) -> bool
7423 """
7424 return _IMP_core.Hierarchy_has_attribute(self, *args)
7425
7426 def get_derivative(self, a0):
7427 r"""get_derivative(Hierarchy self, FloatKey a0) -> double"""
7428 return _IMP_core.Hierarchy_get_derivative(self, a0)
7429
7430 def get_name(self):
7431 r"""get_name(Hierarchy self) -> std::string"""
7432 return _IMP_core.Hierarchy_get_name(self)
7433
7434 def clear_caches(self):
7435 r"""clear_caches(Hierarchy self)"""
7436 return _IMP_core.Hierarchy_clear_caches(self)
7437
7438 def set_name(self, a0):
7439 r"""set_name(Hierarchy self, std::string a0)"""
7440 return _IMP_core.Hierarchy_set_name(self, a0)
7441
7442 def set_check_level(self, a0):
7443 r"""set_check_level(Hierarchy self, IMP::CheckLevel a0)"""
7444 return _IMP_core.Hierarchy_set_check_level(self, a0)
7445
7446 def add_to_derivative(self, a0, a1, a2):
7447 r"""add_to_derivative(Hierarchy self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
7448 return _IMP_core.Hierarchy_add_to_derivative(self, a0, a1, a2)
7449
7450 def set_is_optimized(self, a0, a1):
7451 r"""set_is_optimized(Hierarchy self, FloatKey a0, bool a1)"""
7452 return _IMP_core.Hierarchy_set_is_optimized(self, a0, a1)
7453
7454 def get_is_optimized(self, a0):
7455 r"""get_is_optimized(Hierarchy self, FloatKey a0) -> bool"""
7456 return _IMP_core.Hierarchy_get_is_optimized(self, a0)
7457
7458 def get_check_level(self):
7459 r"""get_check_level(Hierarchy self) -> IMP::CheckLevel"""
7460 return _IMP_core.Hierarchy_get_check_level(self)
7461
7462 def __eq__(self, *args):
7463 r"""
7464 __eq__(Hierarchy self, Hierarchy o) -> bool
7465 __eq__(Hierarchy self, Particle d) -> bool
7466 """
7467 return _IMP_core.Hierarchy___eq__(self, *args)
7468
7469 def __ne__(self, *args):
7470 r"""
7471 __ne__(Hierarchy self, Hierarchy o) -> bool
7472 __ne__(Hierarchy self, Particle d) -> bool
7473 """
7474 return _IMP_core.Hierarchy___ne__(self, *args)
7475
7476 def __le__(self, *args):
7477 r"""
7478 __le__(Hierarchy self, Hierarchy o) -> bool
7479 __le__(Hierarchy self, Particle d) -> bool
7480 """
7481 return _IMP_core.Hierarchy___le__(self, *args)
7482
7483 def __lt__(self, *args):
7484 r"""
7485 __lt__(Hierarchy self, Hierarchy o) -> bool
7486 __lt__(Hierarchy self, Particle d) -> bool
7487 """
7488 return _IMP_core.Hierarchy___lt__(self, *args)
7489
7490 def __ge__(self, *args):
7491 r"""
7492 __ge__(Hierarchy self, Hierarchy o) -> bool
7493 __ge__(Hierarchy self, Particle d) -> bool
7494 """
7495 return _IMP_core.Hierarchy___ge__(self, *args)
7496
7497 def __gt__(self, *args):
7498 r"""
7499 __gt__(Hierarchy self, Hierarchy o) -> bool
7500 __gt__(Hierarchy self, Particle d) -> bool
7501 """
7502 return _IMP_core.Hierarchy___gt__(self, *args)
7503
7504 def __hash__(self):
7505 r"""__hash__(Hierarchy self) -> std::size_t"""
7506 return _IMP_core.Hierarchy___hash__(self)
7507
7508 def __str__(self):
7509 r"""__str__(Hierarchy self) -> std::string"""
7510 return _IMP_core.Hierarchy___str__(self)
7511
7512 def __repr__(self):
7513 r"""__repr__(Hierarchy self) -> std::string"""
7514 return _IMP_core.Hierarchy___repr__(self)
7515 __swig_destroy__ = _IMP_core.delete_Hierarchy
7516
7517# Register Hierarchy in _IMP_core:
7518_IMP_core.Hierarchy_swigregister(Hierarchy)
7519class HierarchyVisitor(object):
7520 r"""Proxy of C++ IMP::core::HierarchyVisitor class."""
7521
7522 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7523 __repr__ = _swig_repr
7524
7525 def __init__(self):
7526 r"""__init__(HierarchyVisitor self) -> HierarchyVisitor"""
7527 if self.__class__ == HierarchyVisitor:
7528 _self = None
7529 else:
7530 _self = self
7531 _IMP_core.HierarchyVisitor_swiginit(self, _IMP_core.new_HierarchyVisitor(_self, ))
7532
7533 if self.__class__ != HierarchyVisitor:
7534 _director_objects.register(self)
7535
7536
7537
7538
7539 def __call__(self, p):
7540 r"""__call__(HierarchyVisitor self, Hierarchy p) -> bool"""
7541 return _IMP_core.HierarchyVisitor___call__(self, p)
7542 __swig_destroy__ = _IMP_core.delete_HierarchyVisitor
7543 def __disown__(self):
7544 self.this.disown()
7545 _IMP_core.disown_HierarchyVisitor(self)
7546 return weakref.proxy(self)
7547
7548# Register HierarchyVisitor in _IMP_core:
7549_IMP_core.HierarchyVisitor_swigregister(HierarchyVisitor)
7550class ModifierVisitor(HierarchyVisitor):
7551 r"""Proxy of C++ IMP::core::ModifierVisitor class."""
7552
7553 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7554 __repr__ = _swig_repr
7555
7556 def __init__(self, sm):
7557 r"""__init__(ModifierVisitor self, SingletonModifier sm) -> ModifierVisitor"""
7558 _IMP_core.ModifierVisitor_swiginit(self, _IMP_core.new_ModifierVisitor(sm))
7559 __swig_destroy__ = _IMP_core.delete_ModifierVisitor
7560
7561# Register ModifierVisitor in _IMP_core:
7562_IMP_core.ModifierVisitor_swigregister(ModifierVisitor)
7563class HierarchyCounter(HierarchyVisitor):
7564 r"""Proxy of C++ IMP::core::HierarchyCounter class."""
7565
7566 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7567
7568 def __init__(self):
7569 r"""__init__(HierarchyCounter self) -> HierarchyCounter"""
7570 _IMP_core.HierarchyCounter_swiginit(self, _IMP_core.new_HierarchyCounter())
7571
7572 def get_count(self):
7573 r"""get_count(HierarchyCounter self) -> unsigned int"""
7574 return _IMP_core.HierarchyCounter_get_count(self)
7575
7576 def show(self, *args):
7577 r"""show(HierarchyCounter self, _ostream out=std::cout)"""
7578 return _IMP_core.HierarchyCounter_show(self, *args)
7579
7580 def __str__(self):
7581 r"""__str__(HierarchyCounter self) -> std::string"""
7582 return _IMP_core.HierarchyCounter___str__(self)
7583
7584 def __repr__(self):
7585 r"""__repr__(HierarchyCounter self) -> std::string"""
7586 return _IMP_core.HierarchyCounter___repr__(self)
7587
7588 def _get_as_binary(self):
7589 r"""_get_as_binary(HierarchyCounter self) -> PyObject *"""
7590 return _IMP_core.HierarchyCounter__get_as_binary(self)
7591
7592 def _set_from_binary(self, p):
7593 r"""_set_from_binary(HierarchyCounter self, PyObject * p)"""
7594 return _IMP_core.HierarchyCounter__set_from_binary(self, p)
7595
7596 def __getstate__(self):
7597 p = self._get_as_binary()
7598 if len(self.__dict__) > 1:
7599 d = self.__dict__.copy()
7600 del d['this']
7601 p = (d, p)
7602 return p
7603
7604 def __setstate__(self, p):
7605 if not hasattr(self, 'this'):
7606 self.__init__()
7607 if isinstance(p, tuple):
7608 d, p = p
7609 self.__dict__.update(d)
7610 return self._set_from_binary(p)
7611
7612 __swig_destroy__ = _IMP_core.delete_HierarchyCounter
7613
7614# Register HierarchyCounter in _IMP_core:
7615_IMP_core.HierarchyCounter_swigregister(HierarchyCounter)
7616
7617def get_leaves(mhd):
7618 r"""get_leaves(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7619 return _IMP_core.get_leaves(mhd)
7620
7621def get_internal(mhd):
7622 r"""get_internal(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7623 return _IMP_core.get_internal(mhd)
7624
7625def get_all_descendants(mhd):
7626 r"""get_all_descendants(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7627 return _IMP_core.get_all_descendants(mhd)
7628
7629def get_root(h):
7630 r"""get_root(Hierarchy h) -> Hierarchy"""
7631 return _IMP_core.get_root(h)
7632
7633def visit_breadth_first(d, f):
7634 r"""visit_breadth_first(Hierarchy d, HierarchyVisitor f)"""
7635 return _IMP_core.visit_breadth_first(d, f)
7636
7637def visit_depth_first(d, f):
7638 r"""visit_depth_first(Hierarchy d, HierarchyVisitor f)"""
7639 return _IMP_core.visit_depth_first(d, f)
7640class LeavesRefiner(IMP.Refiner):
7641 r"""Proxy of C++ IMP::core::LeavesRefiner class."""
7642
7643 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7644
7645 def __init__(self, tr):
7646 r"""__init__(LeavesRefiner self, HierarchyTraits tr) -> LeavesRefiner"""
7647 _IMP_core.LeavesRefiner_swiginit(self, _IMP_core.new_LeavesRefiner(tr))
7648
7649 def do_get_inputs(self, m, pis):
7650 r"""do_get_inputs(LeavesRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7651 return _IMP_core.LeavesRefiner_do_get_inputs(self, m, pis)
7652
7653 def get_version_info(self):
7654 r"""get_version_info(LeavesRefiner self) -> VersionInfo"""
7655 return _IMP_core.LeavesRefiner_get_version_info(self)
7656 __swig_destroy__ = _IMP_core.delete_LeavesRefiner
7657
7658 def __str__(self):
7659 r"""__str__(LeavesRefiner self) -> std::string"""
7660 return _IMP_core.LeavesRefiner___str__(self)
7661
7662 def __repr__(self):
7663 r"""__repr__(LeavesRefiner self) -> std::string"""
7664 return _IMP_core.LeavesRefiner___repr__(self)
7665
7666 @staticmethod
7667 def get_from(o):
7668 return _object_cast_to_LeavesRefiner(o)
7669
7670
7671# Register LeavesRefiner in _IMP_core:
7672_IMP_core.LeavesRefiner_swigregister(LeavesRefiner)
7673class Linear(IMP.UnaryFunction):
7674 r"""Proxy of C++ IMP::core::Linear class."""
7675
7676 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7677
7678 def __init__(self, *args):
7679 r"""
7680 __init__(Linear self, double offset, double slope) -> Linear
7681 __init__(Linear self) -> Linear
7682 """
7683 _IMP_core.Linear_swiginit(self, _IMP_core.new_Linear(*args))
7684
7685 def set_slope(self, f):
7686 r"""set_slope(Linear self, double f)"""
7687 return _IMP_core.Linear_set_slope(self, f)
7688
7689 def get_slope(self):
7690 r"""get_slope(Linear self) -> double"""
7691 return _IMP_core.Linear_get_slope(self)
7692
7693 def set_offset(self, f):
7694 r"""set_offset(Linear self, double f)"""
7695 return _IMP_core.Linear_set_offset(self, f)
7696
7697 def get_offset(self):
7698 r"""get_offset(Linear self) -> double"""
7699 return _IMP_core.Linear_get_offset(self)
7700
7701 def get_version_info(self):
7702 r"""get_version_info(Linear self) -> VersionInfo"""
7703 return _IMP_core.Linear_get_version_info(self)
7704 __swig_destroy__ = _IMP_core.delete_Linear
7705
7706 def __str__(self):
7707 r"""__str__(Linear self) -> std::string"""
7708 return _IMP_core.Linear___str__(self)
7709
7710 def __repr__(self):
7711 r"""__repr__(Linear self) -> std::string"""
7712 return _IMP_core.Linear___repr__(self)
7713
7714 @staticmethod
7715 def get_from(o):
7716 return _object_cast_to_Linear(o)
7717
7718
7719 def _get_as_binary(self):
7720 r"""_get_as_binary(Linear self) -> PyObject *"""
7721 return _IMP_core.Linear__get_as_binary(self)
7722
7723 def _set_from_binary(self, p):
7724 r"""_set_from_binary(Linear self, PyObject * p)"""
7725 return _IMP_core.Linear__set_from_binary(self, p)
7726
7727 def __getstate__(self):
7728 p = self._get_as_binary()
7729 if len(self.__dict__) > 1:
7730 d = self.__dict__.copy()
7731 del d['this']
7732 p = (d, p)
7733 return p
7734
7735 def __setstate__(self, p):
7736 if not hasattr(self, 'this'):
7737 self.__init__()
7738 if isinstance(p, tuple):
7739 d, p = p
7740 self.__dict__.update(d)
7741 return self._set_from_binary(p)
7742
7743
7744 def _get_jax(self):
7745 def score(val, slope, offset):
7746 return (val - offset) * slope
7747 return functools.partial(score, slope=self.get_slope(),
7748 offset=self.get_offset())
7749
7750
7751# Register Linear in _IMP_core:
7752_IMP_core.Linear_swigregister(Linear)
7753class LogNormalMover(MonteCarloMover):
7754 r"""Proxy of C++ IMP::core::LogNormalMover class."""
7755
7756 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7757
7758 def __init__(self, *args):
7759 r"""
7760 __init__(LogNormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> LogNormalMover
7761 __init__(LogNormalMover self, Model m, ParticleIndex pi, double stddev) -> LogNormalMover
7762 __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> LogNormalMover
7763 __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> LogNormalMover
7764 __init__(LogNormalMover self) -> LogNormalMover
7765 """
7766 _IMP_core.LogNormalMover_swiginit(self, _IMP_core.new_LogNormalMover(*args))
7767
7768 def set_sigma(self, sigma):
7769 r"""set_sigma(LogNormalMover self, IMP::Float sigma)"""
7770 return _IMP_core.LogNormalMover_set_sigma(self, sigma)
7771
7772 def get_sigma(self):
7773 r"""get_sigma(LogNormalMover self) -> IMP::Float"""
7774 return _IMP_core.LogNormalMover_get_sigma(self)
7775
7776 def get_indexes(self):
7777 r"""get_indexes(LogNormalMover self) -> IMP::ParticleIndexes"""
7778 return _IMP_core.LogNormalMover_get_indexes(self)
7779
7780 def get_keys(self):
7781 r"""get_keys(LogNormalMover self) -> IMP::FloatKeys"""
7782 return _IMP_core.LogNormalMover_get_keys(self)
7783
7784 def get_version_info(self):
7785 r"""get_version_info(LogNormalMover self) -> VersionInfo"""
7786 return _IMP_core.LogNormalMover_get_version_info(self)
7787 __swig_destroy__ = _IMP_core.delete_LogNormalMover
7788
7789 def __str__(self):
7790 r"""__str__(LogNormalMover self) -> std::string"""
7791 return _IMP_core.LogNormalMover___str__(self)
7792
7793 def __repr__(self):
7794 r"""__repr__(LogNormalMover self) -> std::string"""
7795 return _IMP_core.LogNormalMover___repr__(self)
7796
7797 @staticmethod
7798 def get_from(o):
7799 return _object_cast_to_LogNormalMover(o)
7800
7801
7802 def _get_as_binary(self):
7803 r"""_get_as_binary(LogNormalMover self) -> PyObject *"""
7804 return _IMP_core.LogNormalMover__get_as_binary(self)
7805
7806 def _set_from_binary(self, p):
7807 r"""_set_from_binary(LogNormalMover self, PyObject * p)"""
7808 return _IMP_core.LogNormalMover__set_from_binary(self, p)
7809
7810 def __getstate__(self):
7811 p = self._get_as_binary()
7812 if len(self.__dict__) > 1:
7813 d = self.__dict__.copy()
7814 del d['this']
7815 p = (d, p)
7816 return p
7817
7818 def __setstate__(self, p):
7819 if not hasattr(self, 'this'):
7820 self.__init__()
7821 if isinstance(p, tuple):
7822 d, p = p
7823 self.__dict__.update(d)
7824 return self._set_from_binary(p)
7825
7826
7827 def _get_jax(self, space):
7828 import jax.random
7829 from IMP.core._jax_util import _get_offset_propose_func
7830 keys = self.get_keys()
7831 sigma = self.get_sigma()
7832
7833 def offset_func(key, shape):
7834 key, subkey = jax.random.split(key)
7835 return key, jax.random.lognormal(subkey, sigma, shape)
7836
7837 propose_func, keys = _get_offset_propose_func(
7838 self.get_indexes(), keys, offset_func)
7839
7840 return self._wrap_jax(lambda key: key, propose_func, keys=keys)
7841
7842
7843# Register LogNormalMover in _IMP_core:
7844_IMP_core.LogNormalMover_swigregister(LogNormalMover)
7845IMP_CORE_HAS_MONTE_CARLO_MOVER = _IMP_core.IMP_CORE_HAS_MONTE_CARLO_MOVER
7846
7847class MonteCarlo(IMP.Optimizer):
7848 r"""Proxy of C++ IMP::core::MonteCarlo class."""
7849
7850 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7851
7852 def __init__(self, *args):
7853 r"""
7854 __init__(MonteCarlo self, Model m) -> MonteCarlo
7855 __init__(MonteCarlo self) -> MonteCarlo
7856 """
7857 _IMP_core.MonteCarlo_swiginit(self, _IMP_core.new_MonteCarlo(*args))
7858
7859 def get_version_info(self):
7860 r"""get_version_info(MonteCarlo self) -> VersionInfo"""
7861 return _IMP_core.MonteCarlo_get_version_info(self)
7862 __swig_destroy__ = _IMP_core.delete_MonteCarlo
7863
7864 def set_return_best(self, tf):
7865 r"""set_return_best(MonteCarlo self, bool tf)"""
7866 return _IMP_core.MonteCarlo_set_return_best(self, tf)
7867
7868 def get_return_best(self):
7869 r"""get_return_best(MonteCarlo self) -> bool"""
7870 return _IMP_core.MonteCarlo_get_return_best(self)
7871
7872 def set_score_moved(self, mv):
7873 r"""set_score_moved(MonteCarlo self, bool mv)"""
7874 return _IMP_core.MonteCarlo_set_score_moved(self, mv)
7875
7876 def set_kt(self, t):
7877 r"""set_kt(MonteCarlo self, IMP::Float t)"""
7878 return _IMP_core.MonteCarlo_set_kt(self, t)
7879
7880 def get_kt(self):
7881 r"""get_kt(MonteCarlo self) -> IMP::Float"""
7882 return _IMP_core.MonteCarlo_get_kt(self)
7883
7884 def get_last_accepted_energy(self):
7885 r"""get_last_accepted_energy(MonteCarlo self) -> double"""
7886 return _IMP_core.MonteCarlo_get_last_accepted_energy(self)
7887
7888 def set_last_accepted_energy(self, energy):
7889 r"""set_last_accepted_energy(MonteCarlo self, double energy)"""
7890 return _IMP_core.MonteCarlo_set_last_accepted_energy(self, energy)
7891
7892 def get_best_accepted_energy(self):
7893 r"""get_best_accepted_energy(MonteCarlo self) -> double"""
7894 return _IMP_core.MonteCarlo_get_best_accepted_energy(self)
7895
7896 def set_best_accepted_energy(self, energy):
7897 r"""set_best_accepted_energy(MonteCarlo self, double energy)"""
7898 return _IMP_core.MonteCarlo_set_best_accepted_energy(self, energy)
7899
7900 def get_number_of_downward_steps(self):
7901 r"""get_number_of_downward_steps(MonteCarlo self) -> unsigned int"""
7902 return _IMP_core.MonteCarlo_get_number_of_downward_steps(self)
7903
7904 def get_number_of_upward_steps(self):
7905 r"""get_number_of_upward_steps(MonteCarlo self) -> unsigned int"""
7906 return _IMP_core.MonteCarlo_get_number_of_upward_steps(self)
7907
7908 def get_number_of_proposed_steps(self):
7909 r"""get_number_of_proposed_steps(MonteCarlo self) -> unsigned int"""
7910 return _IMP_core.MonteCarlo_get_number_of_proposed_steps(self)
7911
7912 def get_number_of_accepted_steps(self):
7913 r"""get_number_of_accepted_steps(MonteCarlo self) -> unsigned int"""
7914 return _IMP_core.MonteCarlo_get_number_of_accepted_steps(self)
7915
7916 def set_number_of_downward_steps(self, nsteps):
7917 r"""set_number_of_downward_steps(MonteCarlo self, unsigned int nsteps)"""
7918 return _IMP_core.MonteCarlo_set_number_of_downward_steps(self, nsteps)
7919
7920 def set_number_of_upward_steps(self, nsteps):
7921 r"""set_number_of_upward_steps(MonteCarlo self, unsigned int nsteps)"""
7922 return _IMP_core.MonteCarlo_set_number_of_upward_steps(self, nsteps)
7923
7924 def set_number_of_rejected_steps(self, nsteps):
7925 r"""set_number_of_rejected_steps(MonteCarlo self, unsigned int nsteps)"""
7926 return _IMP_core.MonteCarlo_set_number_of_rejected_steps(self, nsteps)
7927
7928 def reset_statistics(self):
7929 r"""reset_statistics(MonteCarlo self)"""
7930 return _IMP_core.MonteCarlo_reset_statistics(self)
7931
7932 def set_score_threshold(self, s):
7933 r"""set_score_threshold(MonteCarlo self, double s)"""
7934 return _IMP_core.MonteCarlo_set_score_threshold(self, s)
7935
7936 def get_score_threshold(self):
7937 r"""get_score_threshold(MonteCarlo self) -> double"""
7938 return _IMP_core.MonteCarlo_get_score_threshold(self)
7939
7940 def set_maximum_difference(self, d):
7941 r"""set_maximum_difference(MonteCarlo self, double d)"""
7942 return _IMP_core.MonteCarlo_set_maximum_difference(self, d)
7943
7944 def get_maximum_difference(self):
7945 r"""get_maximum_difference(MonteCarlo self) -> double"""
7946 return _IMP_core.MonteCarlo_get_maximum_difference(self)
7947 def __get_movers(self): return IMP._list_util.VarList(getdimfunc=self.get_number_of_movers, getfunc=self.get_mover, erasefunc=self.erase_mover, appendfunc=self.add_mover, extendfunc=self.add_movers, clearfunc=self.clear_movers, indexfunc=self._python_index_mover)
7948 def __set_movers(self, obj): IMP._list_util.set_varlist(self.movers, obj)
7949 def __del_movers(self): IMP._list_util.del_varlist(self.movers)
7950 movers = property(__get_movers, __set_movers, __del_movers, doc="List of ##ucnames")
7951
7952 def remove_mover(self, d):
7953 r"""remove_mover(MonteCarlo self, MonteCarloMover d)"""
7954 return _IMP_core.MonteCarlo_remove_mover(self, d)
7955
7956 def _python_index_mover(self, d, start, stop):
7957 r"""_python_index_mover(MonteCarlo self, MonteCarloMover d, unsigned int start, unsigned int stop) -> unsigned int"""
7958 return _IMP_core.MonteCarlo__python_index_mover(self, d, start, stop)
7959
7960 def remove_movers(self, d):
7961 r"""remove_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & d)"""
7962 return _IMP_core.MonteCarlo_remove_movers(self, d)
7963
7964 def set_movers(self, ps):
7965 r"""set_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & ps)"""
7966 return _IMP_core.MonteCarlo_set_movers(self, ps)
7967
7968 def set_movers_order(self, objs):
7969 r"""set_movers_order(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7970 return _IMP_core.MonteCarlo_set_movers_order(self, objs)
7971
7972 def add_mover(self, obj):
7973 r"""add_mover(MonteCarlo self, MonteCarloMover obj) -> unsigned int"""
7974 return _IMP_core.MonteCarlo_add_mover(self, obj)
7975
7976 def add_movers(self, objs):
7977 r"""add_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7978 return _IMP_core.MonteCarlo_add_movers(self, objs)
7979
7980 def clear_movers(self):
7981 r"""clear_movers(MonteCarlo self)"""
7982 return _IMP_core.MonteCarlo_clear_movers(self)
7983
7984 def get_number_of_movers(self):
7985 r"""get_number_of_movers(MonteCarlo self) -> unsigned int"""
7986 return _IMP_core.MonteCarlo_get_number_of_movers(self)
7987
7988 def get_has_movers(self):
7989 r"""get_has_movers(MonteCarlo self) -> bool"""
7990 return _IMP_core.MonteCarlo_get_has_movers(self)
7991
7992 def get_mover(self, i):
7993 r"""get_mover(MonteCarlo self, unsigned int i) -> MonteCarloMover"""
7994 return _IMP_core.MonteCarlo_get_mover(self, i)
7995
7996 def get_movers(self):
7997 r"""get_movers(MonteCarlo self) -> IMP::core::MonteCarloMovers"""
7998 return _IMP_core.MonteCarlo_get_movers(self)
7999
8000 def erase_mover(self, i):
8001 r"""erase_mover(MonteCarlo self, unsigned int i)"""
8002 return _IMP_core.MonteCarlo_erase_mover(self, i)
8003
8004 def reserve_movers(self, sz):
8005 r"""reserve_movers(MonteCarlo self, unsigned int sz)"""
8006 return _IMP_core.MonteCarlo_reserve_movers(self, sz)
8007
8008 def __str__(self):
8009 r"""__str__(MonteCarlo self) -> std::string"""
8010 return _IMP_core.MonteCarlo___str__(self)
8011
8012 def __repr__(self):
8013 r"""__repr__(MonteCarlo self) -> std::string"""
8014 return _IMP_core.MonteCarlo___repr__(self)
8015
8016 @staticmethod
8017 def get_from(o):
8018 return _object_cast_to_MonteCarlo(o)
8019
8020
8021 def _get_as_binary(self):
8022 r"""_get_as_binary(MonteCarlo self) -> PyObject *"""
8023 return _IMP_core.MonteCarlo__get_as_binary(self)
8024
8025 def _set_from_binary(self, p):
8026 r"""_set_from_binary(MonteCarlo self, PyObject * p)"""
8027 return _IMP_core.MonteCarlo__set_from_binary(self, p)
8028
8029 def __getstate__(self):
8030 p = self._get_as_binary()
8031 if len(self.__dict__) > 1:
8032 d = self.__dict__.copy()
8033 del d['this']
8034 p = (d, p)
8035 return p
8036
8037 def __setstate__(self, p):
8038 if not hasattr(self, 'this'):
8039 self.__init__()
8040 if isinstance(p, tuple):
8041 d, p = p
8042 self.__dict__.update(d)
8043 return self._set_from_binary(p)
8044
8045
8046 def _get_jax(self, space=None):
8047 from IMP.core._jax_util import _MCJAXInfo
8048 return _MCJAXInfo(self, space)
8049
8050 def _get_jax_optimizer(self, max_steps, space=None):
8051 import IMP.core._jax_util
8052 return IMP.core._jax_util._MCJAXOptimizer(self, max_steps, space)
8053
8054 def _optimize_jax(self, max_steps, space=None):
8055 opt = self._get_jax_optimizer(max_steps, space=space)
8056 score, mc_state = opt.optimize(opt.get_initial_state())
8057 return score
8058
8059
8060# Register MonteCarlo in _IMP_core:
8061_IMP_core.MonteCarlo_swigregister(MonteCarlo)
8062class MonteCarloWithLocalOptimization(MonteCarlo):
8063 r"""Proxy of C++ IMP::core::MonteCarloWithLocalOptimization class."""
8064
8065 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8066
8067 def __init__(self, opt, steps):
8068 r"""__init__(MonteCarloWithLocalOptimization self, Optimizer opt, unsigned int steps) -> MonteCarloWithLocalOptimization"""
8069 _IMP_core.MonteCarloWithLocalOptimization_swiginit(self, _IMP_core.new_MonteCarloWithLocalOptimization(opt, steps))
8070
8071 def get_number_of_steps(self):
8072 r"""get_number_of_steps(MonteCarloWithLocalOptimization self) -> unsigned int"""
8073 return _IMP_core.MonteCarloWithLocalOptimization_get_number_of_steps(self)
8074
8075 def get_local_optimizer(self):
8076 r"""get_local_optimizer(MonteCarloWithLocalOptimization self) -> Optimizer"""
8077 return _IMP_core.MonteCarloWithLocalOptimization_get_local_optimizer(self)
8078 __swig_destroy__ = _IMP_core.delete_MonteCarloWithLocalOptimization
8079
8080 def __str__(self):
8081 r"""__str__(MonteCarloWithLocalOptimization self) -> std::string"""
8082 return _IMP_core.MonteCarloWithLocalOptimization___str__(self)
8083
8084 def __repr__(self):
8085 r"""__repr__(MonteCarloWithLocalOptimization self) -> std::string"""
8086 return _IMP_core.MonteCarloWithLocalOptimization___repr__(self)
8087
8088 @staticmethod
8089 def get_from(o):
8090 return _object_cast_to_MonteCarloWithLocalOptimization(o)
8091
8092
8093# Register MonteCarloWithLocalOptimization in _IMP_core:
8094_IMP_core.MonteCarloWithLocalOptimization_swigregister(MonteCarloWithLocalOptimization)
8095class MonteCarloWithBasinHopping(MonteCarloWithLocalOptimization):
8096 r"""Proxy of C++ IMP::core::MonteCarloWithBasinHopping class."""
8097
8098 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8099
8100 def __init__(self, opt, ns):
8101 r"""__init__(MonteCarloWithBasinHopping self, Optimizer opt, unsigned int ns) -> MonteCarloWithBasinHopping"""
8102 _IMP_core.MonteCarloWithBasinHopping_swiginit(self, _IMP_core.new_MonteCarloWithBasinHopping(opt, ns))
8103 __swig_destroy__ = _IMP_core.delete_MonteCarloWithBasinHopping
8104
8105 def __str__(self):
8106 r"""__str__(MonteCarloWithBasinHopping self) -> std::string"""
8107 return _IMP_core.MonteCarloWithBasinHopping___str__(self)
8108
8109 def __repr__(self):
8110 r"""__repr__(MonteCarloWithBasinHopping self) -> std::string"""
8111 return _IMP_core.MonteCarloWithBasinHopping___repr__(self)
8112
8113 @staticmethod
8114 def get_from(o):
8115 return _object_cast_to_MonteCarloWithBasinHopping(o)
8116
8117
8118# Register MonteCarloWithBasinHopping in _IMP_core:
8119_IMP_core.MonteCarloWithBasinHopping_swigregister(MonteCarloWithBasinHopping)
8120class NeighborsTable(IMP.ScoreState):
8121 r"""Proxy of C++ IMP::core::NeighborsTable class."""
8122
8123 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8124
8125 def __init__(self, *args):
8126 r"""__init__(NeighborsTable self, PairContainer input, std::string name="CloseNeighborsTable%1%") -> NeighborsTable"""
8127 _IMP_core.NeighborsTable_swiginit(self, _IMP_core.new_NeighborsTable(*args))
8128
8129 def get_neighbors(self, pi):
8130 r"""get_neighbors(NeighborsTable self, ParticleIndex pi) -> IMP::ParticleIndexes const &"""
8131 return _IMP_core.NeighborsTable_get_neighbors(self, pi)
8132
8133 def get_version_info(self):
8134 r"""get_version_info(NeighborsTable self) -> VersionInfo"""
8135 return _IMP_core.NeighborsTable_get_version_info(self)
8136 __swig_destroy__ = _IMP_core.delete_NeighborsTable
8137
8138 def __str__(self):
8139 r"""__str__(NeighborsTable self) -> std::string"""
8140 return _IMP_core.NeighborsTable___str__(self)
8141
8142 def __repr__(self):
8143 r"""__repr__(NeighborsTable self) -> std::string"""
8144 return _IMP_core.NeighborsTable___repr__(self)
8145
8146 @staticmethod
8147 def get_from(o):
8148 return _object_cast_to_NeighborsTable(o)
8149
8150
8151# Register NeighborsTable in _IMP_core:
8152_IMP_core.NeighborsTable_swigregister(NeighborsTable)
8153class NormalMover(MonteCarloMover):
8154 r"""Proxy of C++ IMP::core::NormalMover class."""
8155
8156 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8157
8158 def __init__(self, *args):
8159 r"""
8160 __init__(NormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> NormalMover
8161 __init__(NormalMover self, Model m, ParticleIndex pi, double stddev) -> NormalMover
8162 __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> NormalMover
8163 __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> NormalMover
8164 __init__(NormalMover self) -> NormalMover
8165 """
8166 _IMP_core.NormalMover_swiginit(self, _IMP_core.new_NormalMover(*args))
8167
8168 def set_sigma(self, sigma):
8169 r"""set_sigma(NormalMover self, IMP::Float sigma)"""
8170 return _IMP_core.NormalMover_set_sigma(self, sigma)
8171
8172 def get_sigma(self):
8173 r"""get_sigma(NormalMover self) -> IMP::Float"""
8174 return _IMP_core.NormalMover_get_sigma(self)
8175
8176 def get_indexes(self):
8177 r"""get_indexes(NormalMover self) -> IMP::ParticleIndexes"""
8178 return _IMP_core.NormalMover_get_indexes(self)
8179
8180 def get_keys(self):
8181 r"""get_keys(NormalMover self) -> IMP::FloatKeys"""
8182 return _IMP_core.NormalMover_get_keys(self)
8183
8184 def get_version_info(self):
8185 r"""get_version_info(NormalMover self) -> VersionInfo"""
8186 return _IMP_core.NormalMover_get_version_info(self)
8187 __swig_destroy__ = _IMP_core.delete_NormalMover
8188
8189 def __str__(self):
8190 r"""__str__(NormalMover self) -> std::string"""
8191 return _IMP_core.NormalMover___str__(self)
8192
8193 def __repr__(self):
8194 r"""__repr__(NormalMover self) -> std::string"""
8195 return _IMP_core.NormalMover___repr__(self)
8196
8197 @staticmethod
8198 def get_from(o):
8199 return _object_cast_to_NormalMover(o)
8200
8201
8202 def _get_as_binary(self):
8203 r"""_get_as_binary(NormalMover self) -> PyObject *"""
8204 return _IMP_core.NormalMover__get_as_binary(self)
8205
8206 def _set_from_binary(self, p):
8207 r"""_set_from_binary(NormalMover self, PyObject * p)"""
8208 return _IMP_core.NormalMover__set_from_binary(self, p)
8209
8210 def __getstate__(self):
8211 p = self._get_as_binary()
8212 if len(self.__dict__) > 1:
8213 d = self.__dict__.copy()
8214 del d['this']
8215 p = (d, p)
8216 return p
8217
8218 def __setstate__(self, p):
8219 if not hasattr(self, 'this'):
8220 self.__init__()
8221 if isinstance(p, tuple):
8222 d, p = p
8223 self.__dict__.update(d)
8224 return self._set_from_binary(p)
8225
8226
8227 def _get_jax(self, space):
8228 import jax.random
8229 from IMP.core._jax_util import _get_offset_propose_func
8230 keys = self.get_keys()
8231 sigma = self.get_sigma()
8232
8233 def offset_func(key, shape):
8234 key, subkey = jax.random.split(key)
8235 return key, jax.random.normal(subkey, shape) * sigma
8236
8237 propose_func, keys = _get_offset_propose_func(
8238 self.get_indexes(), keys, offset_func)
8239
8240 return self._wrap_jax(lambda key: key, propose_func, keys=keys)
8241
8242
8243# Register NormalMover in _IMP_core:
8244_IMP_core.NormalMover_swigregister(NormalMover)
8245class OpenCubicSpline(_OpenCubicSplineBase):
8246 r"""Proxy of C++ IMP::core::OpenCubicSpline class."""
8247
8248 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8249
8250 def __init__(self, values, minrange, spacing, extend=False):
8251 r"""__init__(OpenCubicSpline self, IMP::Floats const & values, IMP::Float minrange, IMP::Float spacing, bool extend=False) -> OpenCubicSpline"""
8252 _IMP_core.OpenCubicSpline_swiginit(self, _IMP_core.new_OpenCubicSpline(values, minrange, spacing, extend))
8253
8254 def get_minrange(self):
8255 r"""get_minrange(OpenCubicSpline self) -> IMP::Float"""
8256 return _IMP_core.OpenCubicSpline_get_minrange(self)
8257
8258 def get_spacing(self):
8259 r"""get_spacing(OpenCubicSpline self) -> IMP::Float"""
8260 return _IMP_core.OpenCubicSpline_get_spacing(self)
8261
8262 def get_values(self):
8263 r"""get_values(OpenCubicSpline self) -> IMP::Floats"""
8264 return _IMP_core.OpenCubicSpline_get_values(self)
8265
8266 def get_extend(self):
8267 r"""get_extend(OpenCubicSpline self) -> bool"""
8268 return _IMP_core.OpenCubicSpline_get_extend(self)
8269
8270 def get_second_derivatives(self):
8271 r"""get_second_derivatives(OpenCubicSpline self) -> IMP::Floats"""
8272 return _IMP_core.OpenCubicSpline_get_second_derivatives(self)
8273 __swig_destroy__ = _IMP_core.delete_OpenCubicSpline
8274
8275 def __str__(self):
8276 r"""__str__(OpenCubicSpline self) -> std::string"""
8277 return _IMP_core.OpenCubicSpline___str__(self)
8278
8279 def __repr__(self):
8280 r"""__repr__(OpenCubicSpline self) -> std::string"""
8281 return _IMP_core.OpenCubicSpline___repr__(self)
8282
8283 @staticmethod
8284 def get_from(o):
8285 return _object_cast_to_OpenCubicSpline(o)
8286
8287
8288 def _get_jax(self):
8289 import jax.numpy as jnp
8290 from IMP.core._jax_util import _spline
8291 def score(feature, minrange, maxrange, spacing, values, second_derivs):
8292 # clip feature to range (extend=True behavior)
8293 feature = jnp.clip(feature, minrange, maxrange)
8294 # determine bin index and thus the cubic fragment to use:
8295 lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
8296 return _spline(feature, minrange, lowbin, lowbin + 1, spacing,
8297 values, second_derivs)
8298 spacing = self.get_spacing()
8299 minrange = self.get_minrange()
8300 values = jnp.asarray(self.get_values())
8301 maxrange = minrange + spacing * (len(values) - 1)
8302 return functools.partial(
8303 score, minrange=minrange, maxrange=maxrange,
8304 spacing=spacing, values=values,
8305 second_derivs=jnp.asarray(self.get_second_derivatives()))
8306
8307
8308# Register OpenCubicSpline in _IMP_core:
8309_IMP_core.OpenCubicSpline_swigregister(OpenCubicSpline)
8310class QuadraticClosePairsFinder(ClosePairsFinder):
8311 r"""Proxy of C++ IMP::core::QuadraticClosePairsFinder class."""
8312
8313 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8314
8315 def __init__(self):
8316 r"""__init__(QuadraticClosePairsFinder self) -> QuadraticClosePairsFinder"""
8317 _IMP_core.QuadraticClosePairsFinder_swiginit(self, _IMP_core.new_QuadraticClosePairsFinder())
8318
8319 def get_are_close_and_filtered(self, *args):
8320 r"""
8321 get_are_close_and_filtered(QuadraticClosePairsFinder self, Particle a, Particle b) -> bool
8322 get_are_close_and_filtered(QuadraticClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b) -> bool
8323 """
8324 return _IMP_core.QuadraticClosePairsFinder_get_are_close_and_filtered(self, *args)
8325
8326 def get_close_pairs(self, *args):
8327 r"""
8328 get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8329 get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8330 get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
8331 get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
8332 """
8333 return _IMP_core.QuadraticClosePairsFinder_get_close_pairs(self, *args)
8334
8335 def do_get_inputs(self, m, pis):
8336 r"""do_get_inputs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8337 return _IMP_core.QuadraticClosePairsFinder_do_get_inputs(self, m, pis)
8338
8339 def get_version_info(self):
8340 r"""get_version_info(QuadraticClosePairsFinder self) -> VersionInfo"""
8341 return _IMP_core.QuadraticClosePairsFinder_get_version_info(self)
8342 __swig_destroy__ = _IMP_core.delete_QuadraticClosePairsFinder
8343
8344 def __str__(self):
8345 r"""__str__(QuadraticClosePairsFinder self) -> std::string"""
8346 return _IMP_core.QuadraticClosePairsFinder___str__(self)
8347
8348 def __repr__(self):
8349 r"""__repr__(QuadraticClosePairsFinder self) -> std::string"""
8350 return _IMP_core.QuadraticClosePairsFinder___repr__(self)
8351
8352 @staticmethod
8353 def get_from(o):
8354 return _object_cast_to_QuadraticClosePairsFinder(o)
8355
8356
8357# Register QuadraticClosePairsFinder in _IMP_core:
8358_IMP_core.QuadraticClosePairsFinder_swigregister(QuadraticClosePairsFinder)
8359class RefinedPairsPairScore(IMP.PairScore):
8360 r"""Proxy of C++ IMP::core::RefinedPairsPairScore class."""
8361
8362 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8363
8364 def __init__(self, r, f):
8365 r"""__init__(RefinedPairsPairScore self, Refiner r, PairScore f) -> RefinedPairsPairScore"""
8366 _IMP_core.RefinedPairsPairScore_swiginit(self, _IMP_core.new_RefinedPairsPairScore(r, f))
8367
8368 def do_get_inputs(self, m, pis):
8369 r"""do_get_inputs(RefinedPairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8370 return _IMP_core.RefinedPairsPairScore_do_get_inputs(self, m, pis)
8371
8372 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
8373 r"""evaluate_indexes(RefinedPairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
8374 return _IMP_core.RefinedPairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
8375
8376 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
8377 r"""evaluate_indexes_scores(RefinedPairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
8378 return _IMP_core.RefinedPairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
8379
8380 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
8381 r"""evaluate_indexes_delta(RefinedPairsPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
8382 return _IMP_core.RefinedPairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
8383
8384 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
8385 r"""evaluate_if_good_indexes(RefinedPairsPairScore 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"""
8386 return _IMP_core.RefinedPairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
8387
8388 def get_version_info(self):
8389 r"""get_version_info(RefinedPairsPairScore self) -> VersionInfo"""
8390 return _IMP_core.RefinedPairsPairScore_get_version_info(self)
8391 __swig_destroy__ = _IMP_core.delete_RefinedPairsPairScore
8392
8393 def __str__(self):
8394 r"""__str__(RefinedPairsPairScore self) -> std::string"""
8395 return _IMP_core.RefinedPairsPairScore___str__(self)
8396
8397 def __repr__(self):
8398 r"""__repr__(RefinedPairsPairScore self) -> std::string"""
8399 return _IMP_core.RefinedPairsPairScore___repr__(self)
8400
8401 @staticmethod
8402 def get_from(o):
8403 return _object_cast_to_RefinedPairsPairScore(o)
8404
8405
8406# Register RefinedPairsPairScore in _IMP_core:
8407_IMP_core.RefinedPairsPairScore_swigregister(RefinedPairsPairScore)
8408class RigidBody(XYZ):
8409 r"""Proxy of C++ IMP::core::RigidBody class."""
8410
8411 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8412
8413 def get_rigid_members(self):
8414 r"""get_rigid_members(RigidBody self) -> IMP::core::RigidMembers"""
8415 return _IMP_core.RigidBody_get_rigid_members(self)
8416
8417 @staticmethod
8418 def get_rotation_key():
8419 r"""get_rotation_key() -> Vector4DDerivKey"""
8420 return _IMP_core.RigidBody_get_rotation_key()
8421
8422 def get_member_particle_indexes(self):
8423 r"""get_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8424 return _IMP_core.RigidBody_get_member_particle_indexes(self)
8425
8426 def get_body_member_particle_indexes(self):
8427 r"""get_body_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8428 return _IMP_core.RigidBody_get_body_member_particle_indexes(self)
8429
8430 def get_member_indexes(self):
8431 r"""get_member_indexes(RigidBody self) -> IMP::ParticleIndexes"""
8432 return _IMP_core.RigidBody_get_member_indexes(self)
8433
8434 def show(self, *args):
8435 r"""show(RigidBody self, _ostream out=std::cout)"""
8436 return _IMP_core.RigidBody_show(self, *args)
8437
8438 @staticmethod
8439 def setup_particle(*args):
8440 r"""
8441 setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor ps) -> RigidBody
8442 setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor ps) -> RigidBody
8443 setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> RigidBody
8444 setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> RigidBody
8445 """
8446 return _IMP_core.RigidBody_setup_particle(*args)
8447
8448 @staticmethod
8449 def teardown_particle(rb):
8450 r"""teardown_particle(RigidBody rb)"""
8451 return _IMP_core.RigidBody_teardown_particle(rb)
8452
8453 def __init__(self, *args):
8454 r"""
8455 __init__(RigidBody self) -> RigidBody
8456 __init__(RigidBody self, Model m, ParticleIndex id) -> RigidBody
8457 __init__(RigidBody self, _ParticleAdaptor d) -> RigidBody
8458 __init__(RigidBody self, RigidBody arg2) -> RigidBody
8459 """
8460 _IMP_core.RigidBody_swiginit(self, _IMP_core.new_RigidBody(*args))
8461 __swig_destroy__ = _IMP_core.delete_RigidBody
8462
8463 @staticmethod
8464 def get_is_setup(*args):
8465 r"""
8466 get_is_setup(_ParticleAdaptor p) -> bool
8467 get_is_setup(Model m, ParticleIndex pi) -> bool
8468 """
8469 return _IMP_core.RigidBody_get_is_setup(*args)
8470
8471 def get_coordinates(self):
8472 r"""get_coordinates(RigidBody self) -> Vector3D"""
8473 return _IMP_core.RigidBody_get_coordinates(self)
8474
8475 def get_rotation(self):
8476 r"""get_rotation(RigidBody self) -> Rotation3D"""
8477 return _IMP_core.RigidBody_get_rotation(self)
8478
8479 def get_reference_frame(self):
8480 r"""get_reference_frame(RigidBody self) -> ReferenceFrame3D"""
8481 return _IMP_core.RigidBody_get_reference_frame(self)
8482
8483 def set_reference_frame(self, tr):
8484 r"""set_reference_frame(RigidBody self, ReferenceFrame3D tr)"""
8485 return _IMP_core.RigidBody_set_reference_frame(self, tr)
8486
8487 def set_reference_frame_lazy(self, tr):
8488 r"""set_reference_frame_lazy(RigidBody self, ReferenceFrame3D tr)"""
8489 return _IMP_core.RigidBody_set_reference_frame_lazy(self, tr)
8490
8491 def set_reference_frame_from_members(self, members):
8492 r"""set_reference_frame_from_members(RigidBody self, IMP::ParticleIndexes const & members)"""
8493 return _IMP_core.RigidBody_set_reference_frame_from_members(self, members)
8494
8495 def pull_back_members_adjoints(self, da):
8496 r"""pull_back_members_adjoints(RigidBody self, DerivativeAccumulator da)"""
8497 return _IMP_core.RigidBody_pull_back_members_adjoints(self, da)
8498
8499 def pull_back_member_adjoints(self, pi, da):
8500 r"""pull_back_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8501 return _IMP_core.RigidBody_pull_back_member_adjoints(self, pi, da)
8502
8503 def pull_back_body_member_adjoints(self, pi, da):
8504 r"""pull_back_body_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8505 return _IMP_core.RigidBody_pull_back_body_member_adjoints(self, pi, da)
8506
8507 def add_to_rotational_derivatives(self, qderiv, da):
8508 r"""add_to_rotational_derivatives(RigidBody self, Vector4D qderiv, DerivativeAccumulator da)"""
8509 return _IMP_core.RigidBody_add_to_rotational_derivatives(self, qderiv, da)
8510
8511 def add_to_torque(self, torque_local, da):
8512 r"""add_to_torque(RigidBody self, Vector3D torque_local, DerivativeAccumulator da)"""
8513 return _IMP_core.RigidBody_add_to_torque(self, torque_local, da)
8514
8515 def get_torque(self):
8516 r"""get_torque(RigidBody self) -> Vector3D"""
8517 return _IMP_core.RigidBody_get_torque(self)
8518
8519 def get_coordinates_are_optimized(self):
8520 r"""get_coordinates_are_optimized(RigidBody self) -> bool"""
8521 return _IMP_core.RigidBody_get_coordinates_are_optimized(self)
8522
8523 def set_coordinates_are_optimized(self, tf):
8524 r"""set_coordinates_are_optimized(RigidBody self, bool tf)"""
8525 return _IMP_core.RigidBody_set_coordinates_are_optimized(self, tf)
8526
8527 def normalize_rotation(self):
8528 r"""normalize_rotation(RigidBody self)"""
8529 return _IMP_core.RigidBody_normalize_rotation(self)
8530
8531 def update_members(self):
8532 r"""update_members(RigidBody self)"""
8533 return _IMP_core.RigidBody_update_members(self)
8534
8535 def get_rotational_derivatives(self):
8536 r"""get_rotational_derivatives(RigidBody self) -> Vector4D"""
8537 return _IMP_core.RigidBody_get_rotational_derivatives(self)
8538
8539 def get_number_of_members(self):
8540 r"""get_number_of_members(RigidBody self) -> unsigned int"""
8541 return _IMP_core.RigidBody_get_number_of_members(self)
8542
8543 def get_member(self, i):
8544 r"""get_member(RigidBody self, unsigned int i) -> RigidBodyMember"""
8545 return _IMP_core.RigidBody_get_member(self, i)
8546
8547 def add_member(self, p):
8548 r"""add_member(RigidBody self, _ParticleIndexAdaptor p)"""
8549 return _IMP_core.RigidBody_add_member(self, p)
8550
8551 def add_non_rigid_member(self, p):
8552 r"""add_non_rigid_member(RigidBody self, _ParticleIndexAdaptor p)"""
8553 return _IMP_core.RigidBody_add_non_rigid_member(self, p)
8554
8555 def set_is_rigid_member(self, pi, tf):
8556 r"""set_is_rigid_member(RigidBody self, ParticleIndex pi, bool tf)"""
8557 return _IMP_core.RigidBody_set_is_rigid_member(self, pi, tf)
8558
8559 def remove_member(self, p):
8560 r"""remove_member(RigidBody self, _ParticleIndexAdaptor p)"""
8561 return _IMP_core.RigidBody_remove_member(self, p)
8562
8563 def add_attribute(self, *args):
8564 r"""
8565 add_attribute(RigidBody self, FloatKey k, IMP::Float v, bool opt)
8566 add_attribute(RigidBody self, FloatKey a0, IMP::Float a1)
8567 add_attribute(RigidBody self, IntKey a0, IMP::Int a1)
8568 add_attribute(RigidBody self, FloatsKey a0, IMP::Floats a1)
8569 add_attribute(RigidBody self, IntsKey a0, IMP::Ints a1)
8570 add_attribute(RigidBody self, StringKey a0, IMP::String a1)
8571 add_attribute(RigidBody self, ParticleIndexKey a0, Particle a1)
8572 add_attribute(RigidBody self, ObjectKey a0, Object a1)
8573 add_attribute(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8574 add_attribute(RigidBody self, SparseIntKey a0, IMP::Int a1)
8575 add_attribute(RigidBody self, SparseStringKey a0, IMP::String a1)
8576 add_attribute(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8577 """
8578 return _IMP_core.RigidBody_add_attribute(self, *args)
8579
8580 def get_value(self, *args):
8581 r"""
8582 get_value(RigidBody self, FloatKey a0) -> IMP::Float
8583 get_value(RigidBody self, IntKey a0) -> IMP::Int
8584 get_value(RigidBody self, FloatsKey a0) -> IMP::Floats
8585 get_value(RigidBody self, IntsKey a0) -> IMP::Ints
8586 get_value(RigidBody self, StringKey a0) -> IMP::String
8587 get_value(RigidBody self, ParticleIndexKey a0) -> Particle
8588 get_value(RigidBody self, ObjectKey a0) -> Object
8589 get_value(RigidBody self, SparseFloatKey a0) -> IMP::Float
8590 get_value(RigidBody self, SparseIntKey a0) -> IMP::Int
8591 get_value(RigidBody self, SparseStringKey a0) -> IMP::String
8592 get_value(RigidBody self, SparseParticleIndexKey a0) -> ParticleIndex
8593 """
8594 return _IMP_core.RigidBody_get_value(self, *args)
8595
8596 def set_value(self, *args):
8597 r"""
8598 set_value(RigidBody self, FloatKey a0, IMP::Float a1)
8599 set_value(RigidBody self, IntKey a0, IMP::Int a1)
8600 set_value(RigidBody self, FloatsKey a0, IMP::Floats a1)
8601 set_value(RigidBody self, IntsKey a0, IMP::Ints a1)
8602 set_value(RigidBody self, StringKey a0, IMP::String a1)
8603 set_value(RigidBody self, ParticleIndexKey a0, Particle a1)
8604 set_value(RigidBody self, ObjectKey a0, Object a1)
8605 set_value(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8606 set_value(RigidBody self, SparseIntKey a0, IMP::Int a1)
8607 set_value(RigidBody self, SparseStringKey a0, IMP::String a1)
8608 set_value(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8609 """
8610 return _IMP_core.RigidBody_set_value(self, *args)
8611
8612 def remove_attribute(self, *args):
8613 r"""
8614 remove_attribute(RigidBody self, FloatKey a0)
8615 remove_attribute(RigidBody self, IntKey a0)
8616 remove_attribute(RigidBody self, FloatsKey a0)
8617 remove_attribute(RigidBody self, IntsKey a0)
8618 remove_attribute(RigidBody self, StringKey a0)
8619 remove_attribute(RigidBody self, ParticleIndexKey a0)
8620 remove_attribute(RigidBody self, ObjectKey a0)
8621 remove_attribute(RigidBody self, SparseFloatKey a0)
8622 remove_attribute(RigidBody self, SparseIntKey a0)
8623 remove_attribute(RigidBody self, SparseStringKey a0)
8624 remove_attribute(RigidBody self, SparseParticleIndexKey a0)
8625 """
8626 return _IMP_core.RigidBody_remove_attribute(self, *args)
8627
8628 def has_attribute(self, *args):
8629 r"""
8630 has_attribute(RigidBody self, FloatKey a0) -> bool
8631 has_attribute(RigidBody self, IntKey a0) -> bool
8632 has_attribute(RigidBody self, FloatsKey a0) -> bool
8633 has_attribute(RigidBody self, IntsKey a0) -> bool
8634 has_attribute(RigidBody self, StringKey a0) -> bool
8635 has_attribute(RigidBody self, ParticleIndexKey a0) -> bool
8636 has_attribute(RigidBody self, ObjectKey a0) -> bool
8637 has_attribute(RigidBody self, SparseFloatKey a0) -> bool
8638 has_attribute(RigidBody self, SparseIntKey a0) -> bool
8639 has_attribute(RigidBody self, SparseStringKey a0) -> bool
8640 has_attribute(RigidBody self, SparseParticleIndexKey a0) -> bool
8641 """
8642 return _IMP_core.RigidBody_has_attribute(self, *args)
8643
8644 def get_derivative(self, a0):
8645 r"""get_derivative(RigidBody self, FloatKey a0) -> double"""
8646 return _IMP_core.RigidBody_get_derivative(self, a0)
8647
8648 def get_name(self):
8649 r"""get_name(RigidBody self) -> std::string"""
8650 return _IMP_core.RigidBody_get_name(self)
8651
8652 def clear_caches(self):
8653 r"""clear_caches(RigidBody self)"""
8654 return _IMP_core.RigidBody_clear_caches(self)
8655
8656 def set_name(self, a0):
8657 r"""set_name(RigidBody self, std::string a0)"""
8658 return _IMP_core.RigidBody_set_name(self, a0)
8659
8660 def set_check_level(self, a0):
8661 r"""set_check_level(RigidBody self, IMP::CheckLevel a0)"""
8662 return _IMP_core.RigidBody_set_check_level(self, a0)
8663
8664 def add_to_derivative(self, a0, a1, a2):
8665 r"""add_to_derivative(RigidBody self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8666 return _IMP_core.RigidBody_add_to_derivative(self, a0, a1, a2)
8667
8668 def set_is_optimized(self, a0, a1):
8669 r"""set_is_optimized(RigidBody self, FloatKey a0, bool a1)"""
8670 return _IMP_core.RigidBody_set_is_optimized(self, a0, a1)
8671
8672 def get_is_optimized(self, a0):
8673 r"""get_is_optimized(RigidBody self, FloatKey a0) -> bool"""
8674 return _IMP_core.RigidBody_get_is_optimized(self, a0)
8675
8676 def get_check_level(self):
8677 r"""get_check_level(RigidBody self) -> IMP::CheckLevel"""
8678 return _IMP_core.RigidBody_get_check_level(self)
8679
8680 def __eq__(self, *args):
8681 r"""
8682 __eq__(RigidBody self, RigidBody o) -> bool
8683 __eq__(RigidBody self, Particle d) -> bool
8684 """
8685 return _IMP_core.RigidBody___eq__(self, *args)
8686
8687 def __ne__(self, *args):
8688 r"""
8689 __ne__(RigidBody self, RigidBody o) -> bool
8690 __ne__(RigidBody self, Particle d) -> bool
8691 """
8692 return _IMP_core.RigidBody___ne__(self, *args)
8693
8694 def __le__(self, *args):
8695 r"""
8696 __le__(RigidBody self, RigidBody o) -> bool
8697 __le__(RigidBody self, Particle d) -> bool
8698 """
8699 return _IMP_core.RigidBody___le__(self, *args)
8700
8701 def __lt__(self, *args):
8702 r"""
8703 __lt__(RigidBody self, RigidBody o) -> bool
8704 __lt__(RigidBody self, Particle d) -> bool
8705 """
8706 return _IMP_core.RigidBody___lt__(self, *args)
8707
8708 def __ge__(self, *args):
8709 r"""
8710 __ge__(RigidBody self, RigidBody o) -> bool
8711 __ge__(RigidBody self, Particle d) -> bool
8712 """
8713 return _IMP_core.RigidBody___ge__(self, *args)
8714
8715 def __gt__(self, *args):
8716 r"""
8717 __gt__(RigidBody self, RigidBody o) -> bool
8718 __gt__(RigidBody self, Particle d) -> bool
8719 """
8720 return _IMP_core.RigidBody___gt__(self, *args)
8721
8722 def __hash__(self):
8723 r"""__hash__(RigidBody self) -> std::size_t"""
8724 return _IMP_core.RigidBody___hash__(self)
8725
8726 def __str__(self):
8727 r"""__str__(RigidBody self) -> std::string"""
8728 return _IMP_core.RigidBody___str__(self)
8729
8730 def __repr__(self):
8731 r"""__repr__(RigidBody self) -> std::string"""
8732 return _IMP_core.RigidBody___repr__(self)
8733
8734 def _get_as_binary(self):
8735 r"""_get_as_binary(RigidBody self) -> PyObject *"""
8736 return _IMP_core.RigidBody__get_as_binary(self)
8737
8738 def _set_from_binary(self, p):
8739 r"""_set_from_binary(RigidBody self, PyObject * p)"""
8740 return _IMP_core.RigidBody__set_from_binary(self, p)
8741
8742 def __getstate__(self):
8743 p = self._get_as_binary()
8744 if len(self.__dict__) > 1:
8745 d = self.__dict__.copy()
8746 del d['this']
8747 p = (d, p)
8748 return p
8749
8750 def __setstate__(self, p):
8751 if not hasattr(self, 'this'):
8752 self.__init__()
8753 if isinstance(p, tuple):
8754 d, p = p
8755 self.__dict__.update(d)
8756 return self._set_from_binary(p)
8757
8758
8759# Register RigidBody in _IMP_core:
8760_IMP_core.RigidBody_swigregister(RigidBody)
8761
8762def add_rigid_body_cache_key(k):
8763 r"""add_rigid_body_cache_key(ObjectKey k)"""
8764 return _IMP_core.add_rigid_body_cache_key(k)
8765class RigidBodyMember(XYZ):
8766 r"""Proxy of C++ IMP::core::RigidBodyMember class."""
8767
8768 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8769
8770 def show(self, *args):
8771 r"""show(RigidBodyMember self, _ostream out=std::cout)"""
8772 return _IMP_core.RigidBodyMember_show(self, *args)
8773
8774 def get_rigid_body(self):
8775 r"""get_rigid_body(RigidBodyMember self) -> RigidBody"""
8776 return _IMP_core.RigidBodyMember_get_rigid_body(self)
8777
8778 def get_internal_coordinates(self):
8779 r"""get_internal_coordinates(RigidBodyMember self) -> Vector3D"""
8780 return _IMP_core.RigidBodyMember_get_internal_coordinates(self)
8781
8782 def set_internal_coordinates(self, v):
8783 r"""set_internal_coordinates(RigidBodyMember self, Vector3D v)"""
8784 return _IMP_core.RigidBodyMember_set_internal_coordinates(self, v)
8785
8786 def set_internal_transformation(self, v):
8787 r"""set_internal_transformation(RigidBodyMember self, Transformation3D v)"""
8788 return _IMP_core.RigidBodyMember_set_internal_transformation(self, v)
8789
8790 def get_internal_transformation(self):
8791 r"""get_internal_transformation(RigidBodyMember self) -> Transformation3D"""
8792 return _IMP_core.RigidBodyMember_get_internal_transformation(self)
8793 __swig_destroy__ = _IMP_core.delete_RigidBodyMember
8794
8795 def set_coordinates(self, *args):
8796 r"""
8797 set_coordinates(RigidBodyMember self, Vector3D center)
8798 set_coordinates(RigidBodyMember self, Transformation3D tr)
8799 """
8800 return _IMP_core.RigidBodyMember_set_coordinates(self, *args)
8801
8802 def __init__(self, *args):
8803 r"""
8804 __init__(RigidBodyMember self) -> RigidBodyMember
8805 __init__(RigidBodyMember self, Model m, ParticleIndex id) -> RigidBodyMember
8806 __init__(RigidBodyMember self, _ParticleAdaptor d) -> RigidBodyMember
8807 __init__(RigidBodyMember self, RigidBodyMember arg2) -> RigidBodyMember
8808 """
8809 _IMP_core.RigidBodyMember_swiginit(self, _IMP_core.new_RigidBodyMember(*args))
8810
8811 @staticmethod
8812 def get_is_setup(*args):
8813 r"""
8814 get_is_setup(_ParticleAdaptor p) -> bool
8815 get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
8816 """
8817 return _IMP_core.RigidBodyMember_get_is_setup(*args)
8818
8819 @staticmethod
8820 def get_internal_coordinate_keys():
8821 r"""get_internal_coordinate_keys() -> IMP::FloatKeys"""
8822 return _IMP_core.RigidBodyMember_get_internal_coordinate_keys()
8823
8824 @staticmethod
8825 def get_internal_rotation_key():
8826 r"""get_internal_rotation_key() -> Vector4DDerivKey"""
8827 return _IMP_core.RigidBodyMember_get_internal_rotation_key()
8828
8829 def add_attribute(self, *args):
8830 r"""
8831 add_attribute(RigidBodyMember self, FloatKey k, IMP::Float v, bool opt)
8832 add_attribute(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8833 add_attribute(RigidBodyMember self, IntKey a0, IMP::Int a1)
8834 add_attribute(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8835 add_attribute(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8836 add_attribute(RigidBodyMember self, StringKey a0, IMP::String a1)
8837 add_attribute(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8838 add_attribute(RigidBodyMember self, ObjectKey a0, Object a1)
8839 add_attribute(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8840 add_attribute(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8841 add_attribute(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8842 add_attribute(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8843 """
8844 return _IMP_core.RigidBodyMember_add_attribute(self, *args)
8845
8846 def get_value(self, *args):
8847 r"""
8848 get_value(RigidBodyMember self, FloatKey a0) -> IMP::Float
8849 get_value(RigidBodyMember self, IntKey a0) -> IMP::Int
8850 get_value(RigidBodyMember self, FloatsKey a0) -> IMP::Floats
8851 get_value(RigidBodyMember self, IntsKey a0) -> IMP::Ints
8852 get_value(RigidBodyMember self, StringKey a0) -> IMP::String
8853 get_value(RigidBodyMember self, ParticleIndexKey a0) -> Particle
8854 get_value(RigidBodyMember self, ObjectKey a0) -> Object
8855 get_value(RigidBodyMember self, SparseFloatKey a0) -> IMP::Float
8856 get_value(RigidBodyMember self, SparseIntKey a0) -> IMP::Int
8857 get_value(RigidBodyMember self, SparseStringKey a0) -> IMP::String
8858 get_value(RigidBodyMember self, SparseParticleIndexKey a0) -> ParticleIndex
8859 """
8860 return _IMP_core.RigidBodyMember_get_value(self, *args)
8861
8862 def set_value(self, *args):
8863 r"""
8864 set_value(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8865 set_value(RigidBodyMember self, IntKey a0, IMP::Int a1)
8866 set_value(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8867 set_value(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8868 set_value(RigidBodyMember self, StringKey a0, IMP::String a1)
8869 set_value(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8870 set_value(RigidBodyMember self, ObjectKey a0, Object a1)
8871 set_value(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8872 set_value(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8873 set_value(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8874 set_value(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8875 """
8876 return _IMP_core.RigidBodyMember_set_value(self, *args)
8877
8878 def remove_attribute(self, *args):
8879 r"""
8880 remove_attribute(RigidBodyMember self, FloatKey a0)
8881 remove_attribute(RigidBodyMember self, IntKey a0)
8882 remove_attribute(RigidBodyMember self, FloatsKey a0)
8883 remove_attribute(RigidBodyMember self, IntsKey a0)
8884 remove_attribute(RigidBodyMember self, StringKey a0)
8885 remove_attribute(RigidBodyMember self, ParticleIndexKey a0)
8886 remove_attribute(RigidBodyMember self, ObjectKey a0)
8887 remove_attribute(RigidBodyMember self, SparseFloatKey a0)
8888 remove_attribute(RigidBodyMember self, SparseIntKey a0)
8889 remove_attribute(RigidBodyMember self, SparseStringKey a0)
8890 remove_attribute(RigidBodyMember self, SparseParticleIndexKey a0)
8891 """
8892 return _IMP_core.RigidBodyMember_remove_attribute(self, *args)
8893
8894 def has_attribute(self, *args):
8895 r"""
8896 has_attribute(RigidBodyMember self, FloatKey a0) -> bool
8897 has_attribute(RigidBodyMember self, IntKey a0) -> bool
8898 has_attribute(RigidBodyMember self, FloatsKey a0) -> bool
8899 has_attribute(RigidBodyMember self, IntsKey a0) -> bool
8900 has_attribute(RigidBodyMember self, StringKey a0) -> bool
8901 has_attribute(RigidBodyMember self, ParticleIndexKey a0) -> bool
8902 has_attribute(RigidBodyMember self, ObjectKey a0) -> bool
8903 has_attribute(RigidBodyMember self, SparseFloatKey a0) -> bool
8904 has_attribute(RigidBodyMember self, SparseIntKey a0) -> bool
8905 has_attribute(RigidBodyMember self, SparseStringKey a0) -> bool
8906 has_attribute(RigidBodyMember self, SparseParticleIndexKey a0) -> bool
8907 """
8908 return _IMP_core.RigidBodyMember_has_attribute(self, *args)
8909
8910 def get_derivative(self, a0):
8911 r"""get_derivative(RigidBodyMember self, FloatKey a0) -> double"""
8912 return _IMP_core.RigidBodyMember_get_derivative(self, a0)
8913
8914 def get_name(self):
8915 r"""get_name(RigidBodyMember self) -> std::string"""
8916 return _IMP_core.RigidBodyMember_get_name(self)
8917
8918 def clear_caches(self):
8919 r"""clear_caches(RigidBodyMember self)"""
8920 return _IMP_core.RigidBodyMember_clear_caches(self)
8921
8922 def set_name(self, a0):
8923 r"""set_name(RigidBodyMember self, std::string a0)"""
8924 return _IMP_core.RigidBodyMember_set_name(self, a0)
8925
8926 def set_check_level(self, a0):
8927 r"""set_check_level(RigidBodyMember self, IMP::CheckLevel a0)"""
8928 return _IMP_core.RigidBodyMember_set_check_level(self, a0)
8929
8930 def add_to_derivative(self, a0, a1, a2):
8931 r"""add_to_derivative(RigidBodyMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8932 return _IMP_core.RigidBodyMember_add_to_derivative(self, a0, a1, a2)
8933
8934 def set_is_optimized(self, a0, a1):
8935 r"""set_is_optimized(RigidBodyMember self, FloatKey a0, bool a1)"""
8936 return _IMP_core.RigidBodyMember_set_is_optimized(self, a0, a1)
8937
8938 def get_is_optimized(self, a0):
8939 r"""get_is_optimized(RigidBodyMember self, FloatKey a0) -> bool"""
8940 return _IMP_core.RigidBodyMember_get_is_optimized(self, a0)
8941
8942 def get_check_level(self):
8943 r"""get_check_level(RigidBodyMember self) -> IMP::CheckLevel"""
8944 return _IMP_core.RigidBodyMember_get_check_level(self)
8945
8946 def __eq__(self, *args):
8947 r"""
8948 __eq__(RigidBodyMember self, RigidBodyMember o) -> bool
8949 __eq__(RigidBodyMember self, Particle d) -> bool
8950 """
8951 return _IMP_core.RigidBodyMember___eq__(self, *args)
8952
8953 def __ne__(self, *args):
8954 r"""
8955 __ne__(RigidBodyMember self, RigidBodyMember o) -> bool
8956 __ne__(RigidBodyMember self, Particle d) -> bool
8957 """
8958 return _IMP_core.RigidBodyMember___ne__(self, *args)
8959
8960 def __le__(self, *args):
8961 r"""
8962 __le__(RigidBodyMember self, RigidBodyMember o) -> bool
8963 __le__(RigidBodyMember self, Particle d) -> bool
8964 """
8965 return _IMP_core.RigidBodyMember___le__(self, *args)
8966
8967 def __lt__(self, *args):
8968 r"""
8969 __lt__(RigidBodyMember self, RigidBodyMember o) -> bool
8970 __lt__(RigidBodyMember self, Particle d) -> bool
8971 """
8972 return _IMP_core.RigidBodyMember___lt__(self, *args)
8973
8974 def __ge__(self, *args):
8975 r"""
8976 __ge__(RigidBodyMember self, RigidBodyMember o) -> bool
8977 __ge__(RigidBodyMember self, Particle d) -> bool
8978 """
8979 return _IMP_core.RigidBodyMember___ge__(self, *args)
8980
8981 def __gt__(self, *args):
8982 r"""
8983 __gt__(RigidBodyMember self, RigidBodyMember o) -> bool
8984 __gt__(RigidBodyMember self, Particle d) -> bool
8985 """
8986 return _IMP_core.RigidBodyMember___gt__(self, *args)
8987
8988 def __hash__(self):
8989 r"""__hash__(RigidBodyMember self) -> std::size_t"""
8990 return _IMP_core.RigidBodyMember___hash__(self)
8991
8992 def __str__(self):
8993 r"""__str__(RigidBodyMember self) -> std::string"""
8994 return _IMP_core.RigidBodyMember___str__(self)
8995
8996 def __repr__(self):
8997 r"""__repr__(RigidBodyMember self) -> std::string"""
8998 return _IMP_core.RigidBodyMember___repr__(self)
8999
9000 def _get_as_binary(self):
9001 r"""_get_as_binary(RigidBodyMember self) -> PyObject *"""
9002 return _IMP_core.RigidBodyMember__get_as_binary(self)
9003
9004 def _set_from_binary(self, p):
9005 r"""_set_from_binary(RigidBodyMember self, PyObject * p)"""
9006 return _IMP_core.RigidBodyMember__set_from_binary(self, p)
9007
9008 def __getstate__(self):
9009 p = self._get_as_binary()
9010 if len(self.__dict__) > 1:
9011 d = self.__dict__.copy()
9012 del d['this']
9013 p = (d, p)
9014 return p
9015
9016 def __setstate__(self, p):
9017 if not hasattr(self, 'this'):
9018 self.__init__()
9019 if isinstance(p, tuple):
9020 d, p = p
9021 self.__dict__.update(d)
9022 return self._set_from_binary(p)
9023
9024
9025# Register RigidBodyMember in _IMP_core:
9026_IMP_core.RigidBodyMember_swigregister(RigidBodyMember)
9027class RigidMember(RigidBodyMember):
9028 r"""Proxy of C++ IMP::core::RigidMember class."""
9029
9030 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9031
9032 def show(self, *args):
9033 r"""show(RigidMember self, _ostream out=std::cout)"""
9034 return _IMP_core.RigidMember_show(self, *args)
9035
9036 def __init__(self, *args):
9037 r"""
9038 __init__(RigidMember self) -> RigidMember
9039 __init__(RigidMember self, Model m, ParticleIndex id) -> RigidMember
9040 __init__(RigidMember self, _ParticleAdaptor d) -> RigidMember
9041 __init__(RigidMember self, RigidMember arg2) -> RigidMember
9042 """
9043 _IMP_core.RigidMember_swiginit(self, _IMP_core.new_RigidMember(*args))
9044 __swig_destroy__ = _IMP_core.delete_RigidMember
9045
9046 @staticmethod
9047 def get_is_setup(*args):
9048 r"""
9049 get_is_setup(_ParticleAdaptor p) -> bool
9050 get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
9051 """
9052 return _IMP_core.RigidMember_get_is_setup(*args)
9053
9054 def add_attribute(self, *args):
9055 r"""
9056 add_attribute(RigidMember self, FloatKey k, IMP::Float v, bool opt)
9057 add_attribute(RigidMember self, FloatKey a0, IMP::Float a1)
9058 add_attribute(RigidMember self, IntKey a0, IMP::Int a1)
9059 add_attribute(RigidMember self, FloatsKey a0, IMP::Floats a1)
9060 add_attribute(RigidMember self, IntsKey a0, IMP::Ints a1)
9061 add_attribute(RigidMember self, StringKey a0, IMP::String a1)
9062 add_attribute(RigidMember self, ParticleIndexKey a0, Particle a1)
9063 add_attribute(RigidMember self, ObjectKey a0, Object a1)
9064 add_attribute(RigidMember self, SparseFloatKey a0, IMP::Float a1)
9065 add_attribute(RigidMember self, SparseIntKey a0, IMP::Int a1)
9066 add_attribute(RigidMember self, SparseStringKey a0, IMP::String a1)
9067 add_attribute(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9068 """
9069 return _IMP_core.RigidMember_add_attribute(self, *args)
9070
9071 def get_value(self, *args):
9072 r"""
9073 get_value(RigidMember self, FloatKey a0) -> IMP::Float
9074 get_value(RigidMember self, IntKey a0) -> IMP::Int
9075 get_value(RigidMember self, FloatsKey a0) -> IMP::Floats
9076 get_value(RigidMember self, IntsKey a0) -> IMP::Ints
9077 get_value(RigidMember self, StringKey a0) -> IMP::String
9078 get_value(RigidMember self, ParticleIndexKey a0) -> Particle
9079 get_value(RigidMember self, ObjectKey a0) -> Object
9080 get_value(RigidMember self, SparseFloatKey a0) -> IMP::Float
9081 get_value(RigidMember self, SparseIntKey a0) -> IMP::Int
9082 get_value(RigidMember self, SparseStringKey a0) -> IMP::String
9083 get_value(RigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9084 """
9085 return _IMP_core.RigidMember_get_value(self, *args)
9086
9087 def set_value(self, *args):
9088 r"""
9089 set_value(RigidMember self, FloatKey a0, IMP::Float a1)
9090 set_value(RigidMember self, IntKey a0, IMP::Int a1)
9091 set_value(RigidMember self, FloatsKey a0, IMP::Floats a1)
9092 set_value(RigidMember self, IntsKey a0, IMP::Ints a1)
9093 set_value(RigidMember self, StringKey a0, IMP::String a1)
9094 set_value(RigidMember self, ParticleIndexKey a0, Particle a1)
9095 set_value(RigidMember self, ObjectKey a0, Object a1)
9096 set_value(RigidMember self, SparseFloatKey a0, IMP::Float a1)
9097 set_value(RigidMember self, SparseIntKey a0, IMP::Int a1)
9098 set_value(RigidMember self, SparseStringKey a0, IMP::String a1)
9099 set_value(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9100 """
9101 return _IMP_core.RigidMember_set_value(self, *args)
9102
9103 def remove_attribute(self, *args):
9104 r"""
9105 remove_attribute(RigidMember self, FloatKey a0)
9106 remove_attribute(RigidMember self, IntKey a0)
9107 remove_attribute(RigidMember self, FloatsKey a0)
9108 remove_attribute(RigidMember self, IntsKey a0)
9109 remove_attribute(RigidMember self, StringKey a0)
9110 remove_attribute(RigidMember self, ParticleIndexKey a0)
9111 remove_attribute(RigidMember self, ObjectKey a0)
9112 remove_attribute(RigidMember self, SparseFloatKey a0)
9113 remove_attribute(RigidMember self, SparseIntKey a0)
9114 remove_attribute(RigidMember self, SparseStringKey a0)
9115 remove_attribute(RigidMember self, SparseParticleIndexKey a0)
9116 """
9117 return _IMP_core.RigidMember_remove_attribute(self, *args)
9118
9119 def has_attribute(self, *args):
9120 r"""
9121 has_attribute(RigidMember self, FloatKey a0) -> bool
9122 has_attribute(RigidMember self, IntKey a0) -> bool
9123 has_attribute(RigidMember self, FloatsKey a0) -> bool
9124 has_attribute(RigidMember self, IntsKey a0) -> bool
9125 has_attribute(RigidMember self, StringKey a0) -> bool
9126 has_attribute(RigidMember self, ParticleIndexKey a0) -> bool
9127 has_attribute(RigidMember self, ObjectKey a0) -> bool
9128 has_attribute(RigidMember self, SparseFloatKey a0) -> bool
9129 has_attribute(RigidMember self, SparseIntKey a0) -> bool
9130 has_attribute(RigidMember self, SparseStringKey a0) -> bool
9131 has_attribute(RigidMember self, SparseParticleIndexKey a0) -> bool
9132 """
9133 return _IMP_core.RigidMember_has_attribute(self, *args)
9134
9135 def get_derivative(self, a0):
9136 r"""get_derivative(RigidMember self, FloatKey a0) -> double"""
9137 return _IMP_core.RigidMember_get_derivative(self, a0)
9138
9139 def get_name(self):
9140 r"""get_name(RigidMember self) -> std::string"""
9141 return _IMP_core.RigidMember_get_name(self)
9142
9143 def clear_caches(self):
9144 r"""clear_caches(RigidMember self)"""
9145 return _IMP_core.RigidMember_clear_caches(self)
9146
9147 def set_name(self, a0):
9148 r"""set_name(RigidMember self, std::string a0)"""
9149 return _IMP_core.RigidMember_set_name(self, a0)
9150
9151 def set_check_level(self, a0):
9152 r"""set_check_level(RigidMember self, IMP::CheckLevel a0)"""
9153 return _IMP_core.RigidMember_set_check_level(self, a0)
9154
9155 def add_to_derivative(self, a0, a1, a2):
9156 r"""add_to_derivative(RigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9157 return _IMP_core.RigidMember_add_to_derivative(self, a0, a1, a2)
9158
9159 def set_is_optimized(self, a0, a1):
9160 r"""set_is_optimized(RigidMember self, FloatKey a0, bool a1)"""
9161 return _IMP_core.RigidMember_set_is_optimized(self, a0, a1)
9162
9163 def get_is_optimized(self, a0):
9164 r"""get_is_optimized(RigidMember self, FloatKey a0) -> bool"""
9165 return _IMP_core.RigidMember_get_is_optimized(self, a0)
9166
9167 def get_check_level(self):
9168 r"""get_check_level(RigidMember self) -> IMP::CheckLevel"""
9169 return _IMP_core.RigidMember_get_check_level(self)
9170
9171 def __eq__(self, *args):
9172 r"""
9173 __eq__(RigidMember self, RigidMember o) -> bool
9174 __eq__(RigidMember self, Particle d) -> bool
9175 """
9176 return _IMP_core.RigidMember___eq__(self, *args)
9177
9178 def __ne__(self, *args):
9179 r"""
9180 __ne__(RigidMember self, RigidMember o) -> bool
9181 __ne__(RigidMember self, Particle d) -> bool
9182 """
9183 return _IMP_core.RigidMember___ne__(self, *args)
9184
9185 def __le__(self, *args):
9186 r"""
9187 __le__(RigidMember self, RigidMember o) -> bool
9188 __le__(RigidMember self, Particle d) -> bool
9189 """
9190 return _IMP_core.RigidMember___le__(self, *args)
9191
9192 def __lt__(self, *args):
9193 r"""
9194 __lt__(RigidMember self, RigidMember o) -> bool
9195 __lt__(RigidMember self, Particle d) -> bool
9196 """
9197 return _IMP_core.RigidMember___lt__(self, *args)
9198
9199 def __ge__(self, *args):
9200 r"""
9201 __ge__(RigidMember self, RigidMember o) -> bool
9202 __ge__(RigidMember self, Particle d) -> bool
9203 """
9204 return _IMP_core.RigidMember___ge__(self, *args)
9205
9206 def __gt__(self, *args):
9207 r"""
9208 __gt__(RigidMember self, RigidMember o) -> bool
9209 __gt__(RigidMember self, Particle d) -> bool
9210 """
9211 return _IMP_core.RigidMember___gt__(self, *args)
9212
9213 def __hash__(self):
9214 r"""__hash__(RigidMember self) -> std::size_t"""
9215 return _IMP_core.RigidMember___hash__(self)
9216
9217 def __str__(self):
9218 r"""__str__(RigidMember self) -> std::string"""
9219 return _IMP_core.RigidMember___str__(self)
9220
9221 def __repr__(self):
9222 r"""__repr__(RigidMember self) -> std::string"""
9223 return _IMP_core.RigidMember___repr__(self)
9224
9225 def _get_as_binary(self):
9226 r"""_get_as_binary(RigidMember self) -> PyObject *"""
9227 return _IMP_core.RigidMember__get_as_binary(self)
9228
9229 def _set_from_binary(self, p):
9230 r"""_set_from_binary(RigidMember self, PyObject * p)"""
9231 return _IMP_core.RigidMember__set_from_binary(self, p)
9232
9233 def __getstate__(self):
9234 p = self._get_as_binary()
9235 if len(self.__dict__) > 1:
9236 d = self.__dict__.copy()
9237 del d['this']
9238 p = (d, p)
9239 return p
9240
9241 def __setstate__(self, p):
9242 if not hasattr(self, 'this'):
9243 self.__init__()
9244 if isinstance(p, tuple):
9245 d, p = p
9246 self.__dict__.update(d)
9247 return self._set_from_binary(p)
9248
9249
9250# Register RigidMember in _IMP_core:
9251_IMP_core.RigidMember_swigregister(RigidMember)
9252class NonRigidMember(RigidBodyMember):
9253 r"""Proxy of C++ IMP::core::NonRigidMember class."""
9254
9255 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9256
9257 def show(self, *args):
9258 r"""show(NonRigidMember self, _ostream out=std::cout)"""
9259 return _IMP_core.NonRigidMember_show(self, *args)
9260
9261 def __init__(self, *args):
9262 r"""
9263 __init__(NonRigidMember self) -> NonRigidMember
9264 __init__(NonRigidMember self, Model m, ParticleIndex id) -> NonRigidMember
9265 __init__(NonRigidMember self, _ParticleAdaptor d) -> NonRigidMember
9266 __init__(NonRigidMember self, NonRigidMember arg2) -> NonRigidMember
9267 """
9268 _IMP_core.NonRigidMember_swiginit(self, _IMP_core.new_NonRigidMember(*args))
9269 __swig_destroy__ = _IMP_core.delete_NonRigidMember
9270
9271 @staticmethod
9272 def get_is_setup(*args):
9273 r"""
9274 get_is_setup(_ParticleAdaptor p) -> bool
9275 get_is_setup(Model m, ParticleIndex p) -> bool
9276 """
9277 return _IMP_core.NonRigidMember_get_is_setup(*args)
9278
9279 def add_to_internal_derivatives(self, deriv_parent, da):
9280 r"""add_to_internal_derivatives(NonRigidMember self, Vector3D deriv_parent, DerivativeAccumulator da)"""
9281 return _IMP_core.NonRigidMember_add_to_internal_derivatives(self, deriv_parent, da)
9282
9283 def add_to_internal_rotational_derivatives(self, qderiv, da):
9284 r"""add_to_internal_rotational_derivatives(NonRigidMember self, Vector4D qderiv, DerivativeAccumulator da)"""
9285 return _IMP_core.NonRigidMember_add_to_internal_rotational_derivatives(self, qderiv, da)
9286
9287 def get_internal_derivatives(self):
9288 r"""get_internal_derivatives(NonRigidMember self) -> Vector3D"""
9289 return _IMP_core.NonRigidMember_get_internal_derivatives(self)
9290
9291 def get_internal_rotational_derivatives(self):
9292 r"""get_internal_rotational_derivatives(NonRigidMember self) -> Vector4D"""
9293 return _IMP_core.NonRigidMember_get_internal_rotational_derivatives(self)
9294
9295 def add_attribute(self, *args):
9296 r"""
9297 add_attribute(NonRigidMember self, FloatKey k, IMP::Float v, bool opt)
9298 add_attribute(NonRigidMember self, FloatKey a0, IMP::Float a1)
9299 add_attribute(NonRigidMember self, IntKey a0, IMP::Int a1)
9300 add_attribute(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9301 add_attribute(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9302 add_attribute(NonRigidMember self, StringKey a0, IMP::String a1)
9303 add_attribute(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9304 add_attribute(NonRigidMember self, ObjectKey a0, Object a1)
9305 add_attribute(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9306 add_attribute(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9307 add_attribute(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9308 add_attribute(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9309 """
9310 return _IMP_core.NonRigidMember_add_attribute(self, *args)
9311
9312 def get_value(self, *args):
9313 r"""
9314 get_value(NonRigidMember self, FloatKey a0) -> IMP::Float
9315 get_value(NonRigidMember self, IntKey a0) -> IMP::Int
9316 get_value(NonRigidMember self, FloatsKey a0) -> IMP::Floats
9317 get_value(NonRigidMember self, IntsKey a0) -> IMP::Ints
9318 get_value(NonRigidMember self, StringKey a0) -> IMP::String
9319 get_value(NonRigidMember self, ParticleIndexKey a0) -> Particle
9320 get_value(NonRigidMember self, ObjectKey a0) -> Object
9321 get_value(NonRigidMember self, SparseFloatKey a0) -> IMP::Float
9322 get_value(NonRigidMember self, SparseIntKey a0) -> IMP::Int
9323 get_value(NonRigidMember self, SparseStringKey a0) -> IMP::String
9324 get_value(NonRigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9325 """
9326 return _IMP_core.NonRigidMember_get_value(self, *args)
9327
9328 def set_value(self, *args):
9329 r"""
9330 set_value(NonRigidMember self, FloatKey a0, IMP::Float a1)
9331 set_value(NonRigidMember self, IntKey a0, IMP::Int a1)
9332 set_value(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9333 set_value(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9334 set_value(NonRigidMember self, StringKey a0, IMP::String a1)
9335 set_value(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9336 set_value(NonRigidMember self, ObjectKey a0, Object a1)
9337 set_value(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9338 set_value(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9339 set_value(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9340 set_value(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9341 """
9342 return _IMP_core.NonRigidMember_set_value(self, *args)
9343
9344 def remove_attribute(self, *args):
9345 r"""
9346 remove_attribute(NonRigidMember self, FloatKey a0)
9347 remove_attribute(NonRigidMember self, IntKey a0)
9348 remove_attribute(NonRigidMember self, FloatsKey a0)
9349 remove_attribute(NonRigidMember self, IntsKey a0)
9350 remove_attribute(NonRigidMember self, StringKey a0)
9351 remove_attribute(NonRigidMember self, ParticleIndexKey a0)
9352 remove_attribute(NonRigidMember self, ObjectKey a0)
9353 remove_attribute(NonRigidMember self, SparseFloatKey a0)
9354 remove_attribute(NonRigidMember self, SparseIntKey a0)
9355 remove_attribute(NonRigidMember self, SparseStringKey a0)
9356 remove_attribute(NonRigidMember self, SparseParticleIndexKey a0)
9357 """
9358 return _IMP_core.NonRigidMember_remove_attribute(self, *args)
9359
9360 def has_attribute(self, *args):
9361 r"""
9362 has_attribute(NonRigidMember self, FloatKey a0) -> bool
9363 has_attribute(NonRigidMember self, IntKey a0) -> bool
9364 has_attribute(NonRigidMember self, FloatsKey a0) -> bool
9365 has_attribute(NonRigidMember self, IntsKey a0) -> bool
9366 has_attribute(NonRigidMember self, StringKey a0) -> bool
9367 has_attribute(NonRigidMember self, ParticleIndexKey a0) -> bool
9368 has_attribute(NonRigidMember self, ObjectKey a0) -> bool
9369 has_attribute(NonRigidMember self, SparseFloatKey a0) -> bool
9370 has_attribute(NonRigidMember self, SparseIntKey a0) -> bool
9371 has_attribute(NonRigidMember self, SparseStringKey a0) -> bool
9372 has_attribute(NonRigidMember self, SparseParticleIndexKey a0) -> bool
9373 """
9374 return _IMP_core.NonRigidMember_has_attribute(self, *args)
9375
9376 def get_derivative(self, a0):
9377 r"""get_derivative(NonRigidMember self, FloatKey a0) -> double"""
9378 return _IMP_core.NonRigidMember_get_derivative(self, a0)
9379
9380 def get_name(self):
9381 r"""get_name(NonRigidMember self) -> std::string"""
9382 return _IMP_core.NonRigidMember_get_name(self)
9383
9384 def clear_caches(self):
9385 r"""clear_caches(NonRigidMember self)"""
9386 return _IMP_core.NonRigidMember_clear_caches(self)
9387
9388 def set_name(self, a0):
9389 r"""set_name(NonRigidMember self, std::string a0)"""
9390 return _IMP_core.NonRigidMember_set_name(self, a0)
9391
9392 def set_check_level(self, a0):
9393 r"""set_check_level(NonRigidMember self, IMP::CheckLevel a0)"""
9394 return _IMP_core.NonRigidMember_set_check_level(self, a0)
9395
9396 def add_to_derivative(self, a0, a1, a2):
9397 r"""add_to_derivative(NonRigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9398 return _IMP_core.NonRigidMember_add_to_derivative(self, a0, a1, a2)
9399
9400 def set_is_optimized(self, a0, a1):
9401 r"""set_is_optimized(NonRigidMember self, FloatKey a0, bool a1)"""
9402 return _IMP_core.NonRigidMember_set_is_optimized(self, a0, a1)
9403
9404 def get_is_optimized(self, a0):
9405 r"""get_is_optimized(NonRigidMember self, FloatKey a0) -> bool"""
9406 return _IMP_core.NonRigidMember_get_is_optimized(self, a0)
9407
9408 def get_check_level(self):
9409 r"""get_check_level(NonRigidMember self) -> IMP::CheckLevel"""
9410 return _IMP_core.NonRigidMember_get_check_level(self)
9411
9412 def __eq__(self, *args):
9413 r"""
9414 __eq__(NonRigidMember self, NonRigidMember o) -> bool
9415 __eq__(NonRigidMember self, Particle d) -> bool
9416 """
9417 return _IMP_core.NonRigidMember___eq__(self, *args)
9418
9419 def __ne__(self, *args):
9420 r"""
9421 __ne__(NonRigidMember self, NonRigidMember o) -> bool
9422 __ne__(NonRigidMember self, Particle d) -> bool
9423 """
9424 return _IMP_core.NonRigidMember___ne__(self, *args)
9425
9426 def __le__(self, *args):
9427 r"""
9428 __le__(NonRigidMember self, NonRigidMember o) -> bool
9429 __le__(NonRigidMember self, Particle d) -> bool
9430 """
9431 return _IMP_core.NonRigidMember___le__(self, *args)
9432
9433 def __lt__(self, *args):
9434 r"""
9435 __lt__(NonRigidMember self, NonRigidMember o) -> bool
9436 __lt__(NonRigidMember self, Particle d) -> bool
9437 """
9438 return _IMP_core.NonRigidMember___lt__(self, *args)
9439
9440 def __ge__(self, *args):
9441 r"""
9442 __ge__(NonRigidMember self, NonRigidMember o) -> bool
9443 __ge__(NonRigidMember self, Particle d) -> bool
9444 """
9445 return _IMP_core.NonRigidMember___ge__(self, *args)
9446
9447 def __gt__(self, *args):
9448 r"""
9449 __gt__(NonRigidMember self, NonRigidMember o) -> bool
9450 __gt__(NonRigidMember self, Particle d) -> bool
9451 """
9452 return _IMP_core.NonRigidMember___gt__(self, *args)
9453
9454 def __hash__(self):
9455 r"""__hash__(NonRigidMember self) -> std::size_t"""
9456 return _IMP_core.NonRigidMember___hash__(self)
9457
9458 def __str__(self):
9459 r"""__str__(NonRigidMember self) -> std::string"""
9460 return _IMP_core.NonRigidMember___str__(self)
9461
9462 def __repr__(self):
9463 r"""__repr__(NonRigidMember self) -> std::string"""
9464 return _IMP_core.NonRigidMember___repr__(self)
9465
9466 def _get_as_binary(self):
9467 r"""_get_as_binary(NonRigidMember self) -> PyObject *"""
9468 return _IMP_core.NonRigidMember__get_as_binary(self)
9469
9470 def _set_from_binary(self, p):
9471 r"""_set_from_binary(NonRigidMember self, PyObject * p)"""
9472 return _IMP_core.NonRigidMember__set_from_binary(self, p)
9473
9474 def __getstate__(self):
9475 p = self._get_as_binary()
9476 if len(self.__dict__) > 1:
9477 d = self.__dict__.copy()
9478 del d['this']
9479 p = (d, p)
9480 return p
9481
9482 def __setstate__(self, p):
9483 if not hasattr(self, 'this'):
9484 self.__init__()
9485 if isinstance(p, tuple):
9486 d, p = p
9487 self.__dict__.update(d)
9488 return self._set_from_binary(p)
9489
9490
9491# Register NonRigidMember in _IMP_core:
9492_IMP_core.NonRigidMember_swigregister(NonRigidMember)
9493class RigidMembersRefiner(IMP.Refiner):
9494 r"""Proxy of C++ IMP::core::RigidMembersRefiner class."""
9495
9496 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9497
9498 def __init__(self, *args):
9499 r"""__init__(RigidMembersRefiner self, std::string name="RigidMembersRefiner%d") -> RigidMembersRefiner"""
9500 _IMP_core.RigidMembersRefiner_swiginit(self, _IMP_core.new_RigidMembersRefiner(*args))
9501
9502 def do_get_inputs(self, m, pis):
9503 r"""do_get_inputs(RigidMembersRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9504 return _IMP_core.RigidMembersRefiner_do_get_inputs(self, m, pis)
9505
9506 def get_version_info(self):
9507 r"""get_version_info(RigidMembersRefiner self) -> VersionInfo"""
9508 return _IMP_core.RigidMembersRefiner_get_version_info(self)
9509 __swig_destroy__ = _IMP_core.delete_RigidMembersRefiner
9510
9511 def __str__(self):
9512 r"""__str__(RigidMembersRefiner self) -> std::string"""
9513 return _IMP_core.RigidMembersRefiner___str__(self)
9514
9515 def __repr__(self):
9516 r"""__repr__(RigidMembersRefiner self) -> std::string"""
9517 return _IMP_core.RigidMembersRefiner___repr__(self)
9518
9519 @staticmethod
9520 def get_from(o):
9521 return _object_cast_to_RigidMembersRefiner(o)
9522
9523
9524# Register RigidMembersRefiner in _IMP_core:
9525_IMP_core.RigidMembersRefiner_swigregister(RigidMembersRefiner)
9526
9527def get_rigid_members_refiner():
9528 r"""get_rigid_members_refiner() -> RigidMembersRefiner"""
9529 return _IMP_core.get_rigid_members_refiner()
9530
9531def transform(*args):
9532 r"""
9533 transform(XYZ a, Transformation3D tr)
9534 transform(RigidBody a, Transformation3D tr)
9535 """
9536 return _IMP_core.transform(*args)
9537
9538def get_initial_reference_frame(*args):
9539 r"""
9540 get_initial_reference_frame(Model m, IMP::ParticleIndexes const & pis) -> ReferenceFrame3D
9541 get_initial_reference_frame(IMP::ParticlesTemp const & ps) -> ReferenceFrame3D
9542 """
9543 return _IMP_core.get_initial_reference_frame(*args)
9544
9545def create_rigid_bodies(m, n, no_members=False):
9546 r"""create_rigid_bodies(Model m, unsigned int n, bool no_members=False) -> IMP::ParticlesTemp"""
9547 return _IMP_core.create_rigid_bodies(m, n, no_members)
9548
9549def show_rigid_body_hierarchy(*args):
9550 r"""show_rigid_body_hierarchy(RigidBody rb, TextOutput out=IMP::TextOutput(std::cout))"""
9551 return _IMP_core.show_rigid_body_hierarchy(*args)
9552
9553def get_root_rigid_body(m):
9554 r"""get_root_rigid_body(RigidMember m) -> ParticleIndex"""
9555 return _IMP_core.get_root_rigid_body(m)
9556class _UpdateRigidBodyMembers(IMP.SingletonModifier):
9557 r"""Proxy of C++ IMP::core::internal::_UpdateRigidBodyMembers class."""
9558
9559 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9560
9561 def __init__(self, *args):
9562 r"""__init__(_UpdateRigidBodyMembers self, std::string name="UpdateRigidBodyMembers%1%") -> _UpdateRigidBodyMembers"""
9563 _IMP_core._UpdateRigidBodyMembers_swiginit(self, _IMP_core.new__UpdateRigidBodyMembers(*args))
9564
9565 def do_get_inputs(self, m, pis):
9566 r"""do_get_inputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9567 return _IMP_core._UpdateRigidBodyMembers_do_get_inputs(self, m, pis)
9568
9569 def do_get_outputs(self, m, pis):
9570 r"""do_get_outputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9571 return _IMP_core._UpdateRigidBodyMembers_do_get_outputs(self, m, pis)
9572
9573 def get_version_info(self):
9574 r"""get_version_info(_UpdateRigidBodyMembers self) -> VersionInfo"""
9575 return _IMP_core._UpdateRigidBodyMembers_get_version_info(self)
9576 __swig_destroy__ = _IMP_core.delete__UpdateRigidBodyMembers
9577
9578 def __str__(self):
9579 r"""__str__(_UpdateRigidBodyMembers self) -> std::string"""
9580 return _IMP_core._UpdateRigidBodyMembers___str__(self)
9581
9582 def __repr__(self):
9583 r"""__repr__(_UpdateRigidBodyMembers self) -> std::string"""
9584 return _IMP_core._UpdateRigidBodyMembers___repr__(self)
9585
9586 @staticmethod
9587 def get_from(o):
9588 return _object_cast_to__UpdateRigidBodyMembers(o)
9589
9590
9591# Register _UpdateRigidBodyMembers in _IMP_core:
9592_IMP_core._UpdateRigidBodyMembers_swigregister(_UpdateRigidBodyMembers)
9593class _AccumulateRigidBodyDerivatives(IMP.SingletonModifier):
9594 r"""Proxy of C++ IMP::core::internal::_AccumulateRigidBodyDerivatives class."""
9595
9596 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9597
9598 def __init__(self, *args):
9599 r"""__init__(_AccumulateRigidBodyDerivatives self, std::string name="AccumulateRigidBodyDerivatives%1%") -> _AccumulateRigidBodyDerivatives"""
9600 _IMP_core._AccumulateRigidBodyDerivatives_swiginit(self, _IMP_core.new__AccumulateRigidBodyDerivatives(*args))
9601
9602 def do_get_inputs(self, m, pis):
9603 r"""do_get_inputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9604 return _IMP_core._AccumulateRigidBodyDerivatives_do_get_inputs(self, m, pis)
9605
9606 def do_get_outputs(self, m, pis):
9607 r"""do_get_outputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9608 return _IMP_core._AccumulateRigidBodyDerivatives_do_get_outputs(self, m, pis)
9609
9610 def get_version_info(self):
9611 r"""get_version_info(_AccumulateRigidBodyDerivatives self) -> VersionInfo"""
9612 return _IMP_core._AccumulateRigidBodyDerivatives_get_version_info(self)
9613 __swig_destroy__ = _IMP_core.delete__AccumulateRigidBodyDerivatives
9614
9615 def __str__(self):
9616 r"""__str__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9617 return _IMP_core._AccumulateRigidBodyDerivatives___str__(self)
9618
9619 def __repr__(self):
9620 r"""__repr__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9621 return _IMP_core._AccumulateRigidBodyDerivatives___repr__(self)
9622
9623 @staticmethod
9624 def get_from(o):
9625 return _object_cast_to__AccumulateRigidBodyDerivatives(o)
9626
9627
9628# Register _AccumulateRigidBodyDerivatives in _IMP_core:
9629_IMP_core._AccumulateRigidBodyDerivatives_swigregister(_AccumulateRigidBodyDerivatives)
9630class _NormalizeRotation(IMP.SingletonModifier):
9631 r"""Proxy of C++ IMP::core::internal::_NormalizeRotation class."""
9632
9633 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9634
9635 def __init__(self, *args):
9636 r"""__init__(_NormalizeRotation self, std::string name="NormalizeRotation%1%") -> _NormalizeRotation"""
9637 _IMP_core._NormalizeRotation_swiginit(self, _IMP_core.new__NormalizeRotation(*args))
9638
9639 def do_get_inputs(self, m, pis):
9640 r"""do_get_inputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9641 return _IMP_core._NormalizeRotation_do_get_inputs(self, m, pis)
9642
9643 def do_get_outputs(self, m, pis):
9644 r"""do_get_outputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9645 return _IMP_core._NormalizeRotation_do_get_outputs(self, m, pis)
9646
9647 def get_version_info(self):
9648 r"""get_version_info(_NormalizeRotation self) -> VersionInfo"""
9649 return _IMP_core._NormalizeRotation_get_version_info(self)
9650 __swig_destroy__ = _IMP_core.delete__NormalizeRotation
9651
9652 def __str__(self):
9653 r"""__str__(_NormalizeRotation self) -> std::string"""
9654 return _IMP_core._NormalizeRotation___str__(self)
9655
9656 def __repr__(self):
9657 r"""__repr__(_NormalizeRotation self) -> std::string"""
9658 return _IMP_core._NormalizeRotation___repr__(self)
9659
9660 @staticmethod
9661 def get_from(o):
9662 return _object_cast_to__NormalizeRotation(o)
9663
9664
9665# Register _NormalizeRotation in _IMP_core:
9666_IMP_core._NormalizeRotation_swigregister(_NormalizeRotation)
9667class _RigidBodyNormalizeConstraint(IMP.Constraint):
9668 r"""Proxy of C++ IMP::core::internal::_RigidBodyNormalizeConstraint class."""
9669
9670 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9671
9672 def __init__(self, *args, **kwargs):
9673 raise AttributeError("No constructor defined - class is abstract")
9674
9675 def get_before_modifier(self):
9676 r"""get_before_modifier(_RigidBodyNormalizeConstraint self) -> _NormalizeRotation"""
9677 return _IMP_core._RigidBodyNormalizeConstraint_get_before_modifier(self)
9678
9679 def get_container(self):
9680 r"""get_container(_RigidBodyNormalizeConstraint self) -> Container"""
9681 return _IMP_core._RigidBodyNormalizeConstraint_get_container(self)
9682
9683 def get_version_info(self):
9684 r"""get_version_info(_RigidBodyNormalizeConstraint self) -> VersionInfo"""
9685 return _IMP_core._RigidBodyNormalizeConstraint_get_version_info(self)
9686 __swig_destroy__ = _IMP_core.delete__RigidBodyNormalizeConstraint
9687
9688 def __str__(self):
9689 r"""__str__(_RigidBodyNormalizeConstraint self) -> std::string"""
9690 return _IMP_core._RigidBodyNormalizeConstraint___str__(self)
9691
9692 def __repr__(self):
9693 r"""__repr__(_RigidBodyNormalizeConstraint self) -> std::string"""
9694 return _IMP_core._RigidBodyNormalizeConstraint___repr__(self)
9695
9696 @staticmethod
9697 def get_from(o):
9698 return _object_cast_to__RigidBodyNormalizeConstraint(o)
9699
9700
9701 def _get_jax(self):
9702 from IMP.algebra.jax import _quaternion_normalize
9703 import jax
9704 def apply_func(jm):
9705 # Assume that constraint acts on all rigid bodies
9706 allrbs = jm['rigid_bodies']
9707 allrbs.quaternion = _quaternion_normalize(allrbs.quaternion)
9708 return jm
9709 return self._wrap_jax(apply_func, keys=['rigid_bodies'])
9710
9711
9712# Register _RigidBodyNormalizeConstraint in _IMP_core:
9713_IMP_core._RigidBodyNormalizeConstraint_swigregister(_RigidBodyNormalizeConstraint)
9714class _RigidBodyPositionConstraint(IMP.Constraint):
9715 r"""Proxy of C++ IMP::core::internal::_RigidBodyPositionConstraint class."""
9716
9717 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9718
9719 def __init__(self, *args, **kwargs):
9720 raise AttributeError("No constructor defined - class is abstract")
9721
9722 def get_version_info(self):
9723 r"""get_version_info(_RigidBodyPositionConstraint self) -> VersionInfo"""
9724 return _IMP_core._RigidBodyPositionConstraint_get_version_info(self)
9725 __swig_destroy__ = _IMP_core.delete__RigidBodyPositionConstraint
9726
9727 def get_before_modifier(self):
9728 r"""get_before_modifier(_RigidBodyPositionConstraint self) -> _UpdateRigidBodyMembers"""
9729 return _IMP_core._RigidBodyPositionConstraint_get_before_modifier(self)
9730
9731 def get_after_modifier(self):
9732 r"""get_after_modifier(_RigidBodyPositionConstraint self) -> _AccumulateRigidBodyDerivatives"""
9733 return _IMP_core._RigidBodyPositionConstraint_get_after_modifier(self)
9734
9735 def get_index(self):
9736 r"""get_index(_RigidBodyPositionConstraint self) -> ParticleIndex"""
9737 return _IMP_core._RigidBodyPositionConstraint_get_index(self)
9738
9739 def __str__(self):
9740 r"""__str__(_RigidBodyPositionConstraint self) -> std::string"""
9741 return _IMP_core._RigidBodyPositionConstraint___str__(self)
9742
9743 def __repr__(self):
9744 r"""__repr__(_RigidBodyPositionConstraint self) -> std::string"""
9745 return _IMP_core._RigidBodyPositionConstraint___repr__(self)
9746
9747 @staticmethod
9748 def get_from(o):
9749 return _object_cast_to__RigidBodyPositionConstraint(o)
9750
9751
9752 def _get_jax(self):
9753 import jax
9754 from IMP.core import _jax_rigid
9755 def apply_func(jm, index):
9756 body = jm['rigid_bodies'].bodies[index]
9757 # todo: this could perhaps be better parallelized, as in most
9758 # cases (at least, without nested rigid bodies) the update of
9759 # one rigid body does not affect members of another body
9760 return body.update_members(jm)
9761 # Get rigid body index from particle index
9762 pindex = self.get_index()
9763 rbindex = _jax_rigid._get_rigid_body_index(self.get_model(), pindex)
9764 f = functools.partial(apply_func, index=rbindex)
9765 return self._wrap_jax(f, keys=['rigid_bodies'])
9766
9767
9768# Register _RigidBodyPositionConstraint in _IMP_core:
9769_IMP_core._RigidBodyPositionConstraint_swigregister(_RigidBodyPositionConstraint)
9770class RigidBodyHierarchyGeometry(IMP.display.SingletonGeometry):
9771 r"""Proxy of C++ IMP::core::RigidBodyHierarchyGeometry class."""
9772
9773 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9774
9775 def __init__(self, rb, constituents):
9776 r"""__init__(RigidBodyHierarchyGeometry self, RigidBody rb, IMP::ParticlesTemp const & constituents) -> RigidBodyHierarchyGeometry"""
9777 _IMP_core.RigidBodyHierarchyGeometry_swiginit(self, _IMP_core.new_RigidBodyHierarchyGeometry(rb, constituents))
9778
9779 def get_version_info(self):
9780 r"""get_version_info(RigidBodyHierarchyGeometry self) -> VersionInfo"""
9781 return _IMP_core.RigidBodyHierarchyGeometry_get_version_info(self)
9782 __swig_destroy__ = _IMP_core.delete_RigidBodyHierarchyGeometry
9783
9784 def __str__(self):
9785 r"""__str__(RigidBodyHierarchyGeometry self) -> std::string"""
9786 return _IMP_core.RigidBodyHierarchyGeometry___str__(self)
9787
9788 def __repr__(self):
9789 r"""__repr__(RigidBodyHierarchyGeometry self) -> std::string"""
9790 return _IMP_core.RigidBodyHierarchyGeometry___repr__(self)
9791
9792 @staticmethod
9793 def get_from(o):
9794 return _object_cast_to_RigidBodyHierarchyGeometry(o)
9795
9796
9797# Register RigidBodyHierarchyGeometry in _IMP_core:
9798_IMP_core.RigidBodyHierarchyGeometry_swigregister(RigidBodyHierarchyGeometry)
9799class RigidBodyDerivativeGeometry(IMP.display.SingletonGeometry):
9800 r"""Proxy of C++ IMP::core::RigidBodyDerivativeGeometry class."""
9801
9802 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9803
9804 def __init__(self, *args):
9805 r"""
9806 __init__(RigidBodyDerivativeGeometry self, Particle p) -> RigidBodyDerivativeGeometry
9807 __init__(RigidBodyDerivativeGeometry self, RigidBody d) -> RigidBodyDerivativeGeometry
9808 """
9809 _IMP_core.RigidBodyDerivativeGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativeGeometry(*args))
9810
9811 def get_version_info(self):
9812 r"""get_version_info(RigidBodyDerivativeGeometry self) -> VersionInfo"""
9813 return _IMP_core.RigidBodyDerivativeGeometry_get_version_info(self)
9814 __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativeGeometry
9815
9816 def __str__(self):
9817 r"""__str__(RigidBodyDerivativeGeometry self) -> std::string"""
9818 return _IMP_core.RigidBodyDerivativeGeometry___str__(self)
9819
9820 def __repr__(self):
9821 r"""__repr__(RigidBodyDerivativeGeometry self) -> std::string"""
9822 return _IMP_core.RigidBodyDerivativeGeometry___repr__(self)
9823
9824 @staticmethod
9825 def get_from(o):
9826 return _object_cast_to_RigidBodyDerivativeGeometry(o)
9827
9828
9829# Register RigidBodyDerivativeGeometry in _IMP_core:
9830_IMP_core.RigidBodyDerivativeGeometry_swigregister(RigidBodyDerivativeGeometry)
9831class RigidBodyDerivativesGeometry(IMP.display.SingletonsGeometry):
9832 r"""Proxy of C++ IMP::core::RigidBodyDerivativesGeometry class."""
9833
9834 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9835
9836 def __init__(self, sc):
9837 r"""__init__(RigidBodyDerivativesGeometry self, SingletonContainer sc) -> RigidBodyDerivativesGeometry"""
9838 _IMP_core.RigidBodyDerivativesGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativesGeometry(sc))
9839
9840 def get_version_info(self):
9841 r"""get_version_info(RigidBodyDerivativesGeometry self) -> VersionInfo"""
9842 return _IMP_core.RigidBodyDerivativesGeometry_get_version_info(self)
9843 __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativesGeometry
9844
9845 def __str__(self):
9846 r"""__str__(RigidBodyDerivativesGeometry self) -> std::string"""
9847 return _IMP_core.RigidBodyDerivativesGeometry___str__(self)
9848
9849 def __repr__(self):
9850 r"""__repr__(RigidBodyDerivativesGeometry self) -> std::string"""
9851 return _IMP_core.RigidBodyDerivativesGeometry___repr__(self)
9852
9853 @staticmethod
9854 def get_from(o):
9855 return _object_cast_to_RigidBodyDerivativesGeometry(o)
9856
9857
9858# Register RigidBodyDerivativesGeometry in _IMP_core:
9859_IMP_core.RigidBodyDerivativesGeometry_swigregister(RigidBodyDerivativesGeometry)
9860class RigidBodyFrameGeometry(IMP.display.SingletonGeometry):
9861 r"""Proxy of C++ IMP::core::RigidBodyFrameGeometry class."""
9862
9863 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9864
9865 def __init__(self, *args):
9866 r"""
9867 __init__(RigidBodyFrameGeometry self, Particle p) -> RigidBodyFrameGeometry
9868 __init__(RigidBodyFrameGeometry self, RigidBody d) -> RigidBodyFrameGeometry
9869 """
9870 _IMP_core.RigidBodyFrameGeometry_swiginit(self, _IMP_core.new_RigidBodyFrameGeometry(*args))
9871
9872 def get_version_info(self):
9873 r"""get_version_info(RigidBodyFrameGeometry self) -> VersionInfo"""
9874 return _IMP_core.RigidBodyFrameGeometry_get_version_info(self)
9875 __swig_destroy__ = _IMP_core.delete_RigidBodyFrameGeometry
9876
9877 def __str__(self):
9878 r"""__str__(RigidBodyFrameGeometry self) -> std::string"""
9879 return _IMP_core.RigidBodyFrameGeometry___str__(self)
9880
9881 def __repr__(self):
9882 r"""__repr__(RigidBodyFrameGeometry self) -> std::string"""
9883 return _IMP_core.RigidBodyFrameGeometry___repr__(self)
9884
9885 @staticmethod
9886 def get_from(o):
9887 return _object_cast_to_RigidBodyFrameGeometry(o)
9888
9889
9890# Register RigidBodyFrameGeometry in _IMP_core:
9891_IMP_core.RigidBodyFrameGeometry_swigregister(RigidBodyFrameGeometry)
9892class RigidBodyFramesGeometry(IMP.display.SingletonsGeometry):
9893 r"""Proxy of C++ IMP::core::RigidBodyFramesGeometry class."""
9894
9895 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9896
9897 def __init__(self, sc):
9898 r"""__init__(RigidBodyFramesGeometry self, SingletonContainer sc) -> RigidBodyFramesGeometry"""
9899 _IMP_core.RigidBodyFramesGeometry_swiginit(self, _IMP_core.new_RigidBodyFramesGeometry(sc))
9900
9901 def get_version_info(self):
9902 r"""get_version_info(RigidBodyFramesGeometry self) -> VersionInfo"""
9903 return _IMP_core.RigidBodyFramesGeometry_get_version_info(self)
9904 __swig_destroy__ = _IMP_core.delete_RigidBodyFramesGeometry
9905
9906 def __str__(self):
9907 r"""__str__(RigidBodyFramesGeometry self) -> std::string"""
9908 return _IMP_core.RigidBodyFramesGeometry___str__(self)
9909
9910 def __repr__(self):
9911 r"""__repr__(RigidBodyFramesGeometry self) -> std::string"""
9912 return _IMP_core.RigidBodyFramesGeometry___repr__(self)
9913
9914 @staticmethod
9915 def get_from(o):
9916 return _object_cast_to_RigidBodyFramesGeometry(o)
9917
9918
9919# Register RigidBodyFramesGeometry in _IMP_core:
9920_IMP_core.RigidBodyFramesGeometry_swigregister(RigidBodyFramesGeometry)
9921class RigidBodyTorque(IMP.display.SegmentGeometry):
9922 r"""Proxy of C++ IMP::core::RigidBodyTorque class."""
9923
9924 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9925
9926 def __init__(self, p):
9927 r"""__init__(RigidBodyTorque self, Particle p) -> RigidBodyTorque"""
9928 _IMP_core.RigidBodyTorque_swiginit(self, _IMP_core.new_RigidBodyTorque(p))
9929
9930 def __str__(self):
9931 r"""__str__(RigidBodyTorque self) -> std::string"""
9932 return _IMP_core.RigidBodyTorque___str__(self)
9933
9934 def __repr__(self):
9935 r"""__repr__(RigidBodyTorque self) -> std::string"""
9936 return _IMP_core.RigidBodyTorque___repr__(self)
9937
9938 @staticmethod
9939 def get_from(o):
9940 return _object_cast_to_RigidBodyTorque(o)
9941
9942 __swig_destroy__ = _IMP_core.delete_RigidBodyTorque
9943
9944# Register RigidBodyTorque in _IMP_core:
9945_IMP_core.RigidBodyTorque_swigregister(RigidBodyTorque)
9946class NearestNeighborsClosePairsFinder(ClosePairsFinder):
9947 r"""Proxy of C++ IMP::core::NearestNeighborsClosePairsFinder class."""
9948
9949 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9950
9951 def __init__(self):
9952 r"""__init__(NearestNeighborsClosePairsFinder self) -> NearestNeighborsClosePairsFinder"""
9953 _IMP_core.NearestNeighborsClosePairsFinder_swiginit(self, _IMP_core.new_NearestNeighborsClosePairsFinder())
9954
9955 def get_close_pairs(self, *args):
9956 r"""
9957 get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9958 get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9959 get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
9960 get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
9961 """
9962 return _IMP_core.NearestNeighborsClosePairsFinder_get_close_pairs(self, *args)
9963
9964 def do_get_inputs(self, m, pis):
9965 r"""do_get_inputs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9966 return _IMP_core.NearestNeighborsClosePairsFinder_do_get_inputs(self, m, pis)
9967
9968 def get_version_info(self):
9969 r"""get_version_info(NearestNeighborsClosePairsFinder self) -> VersionInfo"""
9970 return _IMP_core.NearestNeighborsClosePairsFinder_get_version_info(self)
9971 __swig_destroy__ = _IMP_core.delete_NearestNeighborsClosePairsFinder
9972
9973 def __str__(self):
9974 r"""__str__(NearestNeighborsClosePairsFinder self) -> std::string"""
9975 return _IMP_core.NearestNeighborsClosePairsFinder___str__(self)
9976
9977 def __repr__(self):
9978 r"""__repr__(NearestNeighborsClosePairsFinder self) -> std::string"""
9979 return _IMP_core.NearestNeighborsClosePairsFinder___repr__(self)
9980
9981 @staticmethod
9982 def get_from(o):
9983 return _object_cast_to_NearestNeighborsClosePairsFinder(o)
9984
9985
9986# Register NearestNeighborsClosePairsFinder in _IMP_core:
9987_IMP_core.NearestNeighborsClosePairsFinder_swigregister(NearestNeighborsClosePairsFinder)
9988class RestraintsScoringFunction(IMP.ScoringFunction):
9989 r"""Proxy of C++ IMP::core::RestraintsScoringFunction class."""
9990
9991 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9992
9993 def __init__(self, *args):
9994 r"""
9995 __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, double weight=1.0, double max=NO_MAX, std::string name="RestraintsScoringFunction%1%") -> RestraintsScoringFunction
9996 __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, std::string name) -> RestraintsScoringFunction
9997 __init__(RestraintsScoringFunction self) -> RestraintsScoringFunction
9998 """
9999 _IMP_core.RestraintsScoringFunction_swiginit(self, _IMP_core.new_RestraintsScoringFunction(*args))
10000
10001 def do_add_score_and_derivatives(self, sa, ss):
10002 r"""do_add_score_and_derivatives(RestraintsScoringFunction self, ScoreAccumulator sa, IMP::ScoreStatesTemp const & ss)"""
10003 return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives(self, sa, ss)
10004
10005 def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss):
10006 r"""do_add_score_and_derivatives_moved(RestraintsScoringFunction self, ScoreAccumulator sa, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis, IMP::ScoreStatesTemp const & ss)"""
10007 return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss)
10008
10009 def do_get_inputs(self):
10010 r"""do_get_inputs(RestraintsScoringFunction self) -> IMP::ModelObjectsTemp"""
10011 return _IMP_core.RestraintsScoringFunction_do_get_inputs(self)
10012
10013 def get_restraints(self):
10014 r"""get_restraints(RestraintsScoringFunction self) -> IMP::Restraints"""
10015 return _IMP_core.RestraintsScoringFunction_get_restraints(self)
10016
10017 def set_restraints(self, d):
10018 r"""set_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
10019 return _IMP_core.RestraintsScoringFunction_set_restraints(self, d)
10020
10021 def get_number_of_restraints(self):
10022 r"""get_number_of_restraints(RestraintsScoringFunction self) -> unsigned int"""
10023 return _IMP_core.RestraintsScoringFunction_get_number_of_restraints(self)
10024
10025 def clear_restraints(self):
10026 r"""clear_restraints(RestraintsScoringFunction self)"""
10027 return _IMP_core.RestraintsScoringFunction_clear_restraints(self)
10028
10029 def get_restraint(self, i):
10030 r"""get_restraint(RestraintsScoringFunction self, unsigned int i) -> Restraint"""
10031 return _IMP_core.RestraintsScoringFunction_get_restraint(self, i)
10032
10033 def erase_restraint(self, i):
10034 r"""erase_restraint(RestraintsScoringFunction self, unsigned int i)"""
10035 return _IMP_core.RestraintsScoringFunction_erase_restraint(self, i)
10036
10037 def add_restraint(self, d):
10038 r"""add_restraint(RestraintsScoringFunction self, Restraint d) -> unsigned int"""
10039 return _IMP_core.RestraintsScoringFunction_add_restraint(self, d)
10040
10041 def add_restraints(self, d):
10042 r"""add_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
10043 return _IMP_core.RestraintsScoringFunction_add_restraints(self, d)
10044
10045 def _python_index_restraint(self, r, start, stop):
10046 r"""_python_index_restraint(RestraintsScoringFunction self, Restraint r, unsigned int start, unsigned int stop) -> unsigned int"""
10047 return _IMP_core.RestraintsScoringFunction__python_index_restraint(self, r, start, stop)
10048 def __get_restraints(self): return IMP._list_util.VarList(getdimfunc=self.get_number_of_restraints, getfunc=self.get_restraint, erasefunc=self.erase_restraint, appendfunc=self.add_restraint, extendfunc=self.add_restraints, clearfunc=self.clear_restraints, indexfunc=self._python_index_restraint)
10049 def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
10050 def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
10051 restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##Restraints")
10052
10053 def get_version_info(self):
10054 r"""get_version_info(RestraintsScoringFunction self) -> VersionInfo"""
10055 return _IMP_core.RestraintsScoringFunction_get_version_info(self)
10056 __swig_destroy__ = _IMP_core.delete_RestraintsScoringFunction
10057
10058 def __str__(self):
10059 r"""__str__(RestraintsScoringFunction self) -> std::string"""
10060 return _IMP_core.RestraintsScoringFunction___str__(self)
10061
10062 def __repr__(self):
10063 r"""__repr__(RestraintsScoringFunction self) -> std::string"""
10064 return _IMP_core.RestraintsScoringFunction___repr__(self)
10065
10066 @staticmethod
10067 def get_from(o):
10068 return _object_cast_to_RestraintsScoringFunction(o)
10069
10070
10071 def _get_as_binary(self):
10072 r"""_get_as_binary(RestraintsScoringFunction self) -> PyObject *"""
10073 return _IMP_core.RestraintsScoringFunction__get_as_binary(self)
10074
10075 def _set_from_binary(self, p):
10076 r"""_set_from_binary(RestraintsScoringFunction self, PyObject * p)"""
10077 return _IMP_core.RestraintsScoringFunction__set_from_binary(self, p)
10078
10079 def __getstate__(self):
10080 p = self._get_as_binary()
10081 if len(self.__dict__) > 1:
10082 d = self.__dict__.copy()
10083 del d['this']
10084 p = (d, p)
10085 return p
10086
10087 def __setstate__(self, p):
10088 if not hasattr(self, 'this'):
10089 self.__init__()
10090 if isinstance(p, tuple):
10091 d, p = p
10092 self.__dict__.update(d)
10093 return self._set_from_binary(p)
10094
10095
10096 def _get_jax(self, space=None):
10097 import jax.numpy as jnp
10098 import IMP.jax
10099 import IMP._jax_util
10100 restraints = [r.get_derived_object() for r in self.restraints]
10101 space = space or IMP.jax.FreeSpace
10102 multi_funcs, funcs, keys = IMP._jax_util.get_restraints_jax_funcs_keys(
10103 restraints, space)
10104 def jax_sf(jm):
10105 rets = [f(jm) for f in multi_funcs]
10106 if funcs:
10107 rets.append(jnp.stack([f(jm) for f in funcs], axis=-1))
10108 scores = jnp.concatenate(rets, axis=-1)
10109 return jnp.sum(scores, axis=-1)
10110 return IMP._jax_util.JAXRestraintInfo(
10111 m=self.get_model(), score_func=jax_sf, weight=1.0, keys=keys)
10112
10113
10114# Register RestraintsScoringFunction in _IMP_core:
10115_IMP_core.RestraintsScoringFunction_swigregister(RestraintsScoringFunction)
10116class RigidClosePairsFinder(ClosePairsFinder):
10117 r"""Proxy of C++ IMP::core::RigidClosePairsFinder class."""
10118
10119 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10120
10121 def __init__(self, cpf=None):
10122 r"""__init__(RigidClosePairsFinder self, ClosePairsFinder cpf=None) -> RigidClosePairsFinder"""
10123 _IMP_core.RigidClosePairsFinder_swiginit(self, _IMP_core.new_RigidClosePairsFinder(cpf))
10124
10125 def do_get_inputs(self, m, pis):
10126 r"""do_get_inputs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10127 return _IMP_core.RigidClosePairsFinder_do_get_inputs(self, m, pis)
10128
10129 def get_close_pairs(self, *args):
10130 r"""
10131 get_close_pairs(RigidClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b, IMP::ParticleIndexes const & pa, IMP::ParticleIndexes const & pb) -> IMP::ParticleIndexPairs
10132 get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
10133 get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
10134 get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
10135 get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
10136 """
10137 return _IMP_core.RigidClosePairsFinder_get_close_pairs(self, *args)
10138
10139 def get_version_info(self):
10140 r"""get_version_info(RigidClosePairsFinder self) -> VersionInfo"""
10141 return _IMP_core.RigidClosePairsFinder_get_version_info(self)
10142 __swig_destroy__ = _IMP_core.delete_RigidClosePairsFinder
10143
10144 def __str__(self):
10145 r"""__str__(RigidClosePairsFinder self) -> std::string"""
10146 return _IMP_core.RigidClosePairsFinder___str__(self)
10147
10148 def __repr__(self):
10149 r"""__repr__(RigidClosePairsFinder self) -> std::string"""
10150 return _IMP_core.RigidClosePairsFinder___repr__(self)
10151
10152 @staticmethod
10153 def get_from(o):
10154 return _object_cast_to_RigidClosePairsFinder(o)
10155
10156
10157 def _get_as_binary(self):
10158 r"""_get_as_binary(RigidClosePairsFinder self) -> PyObject *"""
10159 return _IMP_core.RigidClosePairsFinder__get_as_binary(self)
10160
10161 def _set_from_binary(self, p):
10162 r"""_set_from_binary(RigidClosePairsFinder self, PyObject * p)"""
10163 return _IMP_core.RigidClosePairsFinder__set_from_binary(self, p)
10164
10165 def __getstate__(self):
10166 p = self._get_as_binary()
10167 if len(self.__dict__) > 1:
10168 d = self.__dict__.copy()
10169 del d['this']
10170 p = (d, p)
10171 return p
10172
10173 def __setstate__(self, p):
10174 if not hasattr(self, 'this'):
10175 self.__init__()
10176 if isinstance(p, tuple):
10177 d, p = p
10178 self.__dict__.update(d)
10179 return self._set_from_binary(p)
10180
10181
10182# Register RigidClosePairsFinder in _IMP_core:
10183_IMP_core.RigidClosePairsFinder_swigregister(RigidClosePairsFinder)
10184class _SphereDistancePairScore(IMP.PairScore):
10185 r"""Proxy of C++ IMP::core::SphereDistancePairScore class."""
10186
10187 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10188 __repr__ = _swig_repr
10189
10190 def __init__(self, *args):
10191 r"""
10192 SphereDistancePairScore(UnaryFunction uf, std::string name="SphereDistancePairScore%1%") -> _SphereDistancePairScore
10193 __init__(_SphereDistancePairScore self) -> _SphereDistancePairScore
10194 """
10195 _IMP_core._SphereDistancePairScore_swiginit(self, _IMP_core.new__SphereDistancePairScore(*args))
10196
10197 def do_get_inputs(self, m, pis):
10198 r"""do_get_inputs(_SphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10199 return _IMP_core._SphereDistancePairScore_do_get_inputs(self, m, pis)
10200
10201 def get_score_functor(self, *args):
10202 r"""
10203 get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10204 get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10205 """
10206 return _IMP_core._SphereDistancePairScore_get_score_functor(self, *args)
10207
10208 def get_version_info(self):
10209 r"""get_version_info(_SphereDistancePairScore self) -> VersionInfo"""
10210 return _IMP_core._SphereDistancePairScore_get_version_info(self)
10211 __swig_destroy__ = _IMP_core.delete__SphereDistancePairScore
10212
10213 @staticmethod
10214 def get_from(o):
10215 return _object_cast_to__SphereDistancePairScore(o)
10216
10217
10218 def _get_as_binary(self):
10219 r"""_get_as_binary(_SphereDistancePairScore self) -> PyObject *"""
10220 return _IMP_core._SphereDistancePairScore__get_as_binary(self)
10221
10222 def _set_from_binary(self, p):
10223 r"""_set_from_binary(_SphereDistancePairScore self, PyObject * p)"""
10224 return _IMP_core._SphereDistancePairScore__set_from_binary(self, p)
10225
10226 def __getstate__(self):
10227 p = self._get_as_binary()
10228 if len(self.__dict__) > 1:
10229 d = self.__dict__.copy()
10230 del d['this']
10231 p = (d, p)
10232 return p
10233
10234 def __setstate__(self, p):
10235 if not hasattr(self, 'this'):
10236 self.__init__()
10237 if isinstance(p, tuple):
10238 d, p = p
10239 self.__dict__.update(d)
10240 return self._set_from_binary(p)
10241
10242
10243 def _get_jax(self, m, indexes, space):
10244 import jax.numpy as jnp
10245 def jax_score(jm, uf):
10246 xyzs = jm['xyz'][indexes]
10247 rs = jm['r'][indexes]
10248 diff = xyzs[:,0] - xyzs[:,1]
10249 drs = space.distance(diff) - rs.sum(axis=-1)
10250 return uf(drs)
10251 sfnc = self.get_score_functor()
10252 uf = sfnc.get_unary_function().get_derived_object()
10253 f = functools.partial(jax_score, uf=uf._get_jax())
10254 return self._wrap_jax(m, f)
10255
10256
10257# Register _SphereDistancePairScore in _IMP_core:
10258_IMP_core._SphereDistancePairScore_swigregister(_SphereDistancePairScore)
10259class HarmonicUpperBoundSphereDistancePairScore(IMP.PairScore):
10260 r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDistancePairScore class."""
10261
10262 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10263
10264 def __init__(self, *args):
10265 r"""
10266 __init__(HarmonicUpperBoundSphereDistancePairScore self, double x0, double k, std::string name="HarmonicUpperBoundSphereDistancePairScore%1%") -> HarmonicUpperBoundSphereDistancePairScore
10267 __init__(HarmonicUpperBoundSphereDistancePairScore self) -> HarmonicUpperBoundSphereDistancePairScore
10268 """
10269 _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDistancePairScore(*args))
10270
10271 def do_get_inputs(self, m, pis):
10272 r"""do_get_inputs(HarmonicUpperBoundSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10273 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_do_get_inputs(self, m, pis)
10274
10275 def get_score_functor(self, *args):
10276 r"""
10277 get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore
10278 get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore const &
10279 """
10280 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_score_functor(self, *args)
10281
10282 def get_x0(self):
10283 r"""get_x0(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10284 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_x0(self)
10285
10286 def get_k(self):
10287 r"""get_k(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10288 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_k(self)
10289
10290 def get_version_info(self):
10291 r"""get_version_info(HarmonicUpperBoundSphereDistancePairScore self) -> VersionInfo"""
10292 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_version_info(self)
10293 __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDistancePairScore
10294
10295 def __str__(self):
10296 r"""__str__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10297 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___str__(self)
10298
10299 def __repr__(self):
10300 r"""__repr__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10301 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___repr__(self)
10302
10303 @staticmethod
10304 def get_from(o):
10305 return _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
10306
10307
10308 def _get_as_binary(self):
10309 r"""_get_as_binary(HarmonicUpperBoundSphereDistancePairScore self) -> PyObject *"""
10310 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__get_as_binary(self)
10311
10312 def _set_from_binary(self, p):
10313 r"""_set_from_binary(HarmonicUpperBoundSphereDistancePairScore self, PyObject * p)"""
10314 return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__set_from_binary(self, p)
10315
10316 def __getstate__(self):
10317 p = self._get_as_binary()
10318 if len(self.__dict__) > 1:
10319 d = self.__dict__.copy()
10320 del d['this']
10321 p = (d, p)
10322 return p
10323
10324 def __setstate__(self, p):
10325 if not hasattr(self, 'this'):
10326 self.__init__()
10327 if isinstance(p, tuple):
10328 d, p = p
10329 self.__dict__.update(d)
10330 return self._set_from_binary(p)
10331
10332
10333 def _get_jax(self, m, indexes, space):
10334 import jax.numpy as jnp
10335 import jax.lax
10336 def jax_score(jm, d, k):
10337 xyzs = jm['xyz'][indexes]
10338 rs = jm['r'][indexes]
10339 diff = xyzs[:,0] - xyzs[:,1]
10340 drs = space.distance(diff) - rs.sum(axis=-1)
10341 return 0.5 * k * jax.lax.min(d - drs, 0.0) ** 2
10342 f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10343 return self._wrap_jax(m, f)
10344
10345
10346# Register HarmonicUpperBoundSphereDistancePairScore in _IMP_core:
10347_IMP_core.HarmonicUpperBoundSphereDistancePairScore_swigregister(HarmonicUpperBoundSphereDistancePairScore)
10348class HarmonicUpperBoundSphereDiameterPairScore(IMP.PairScore):
10349 r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDiameterPairScore class."""
10350
10351 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10352
10353 def __init__(self, d0, k):
10354 r"""__init__(HarmonicUpperBoundSphereDiameterPairScore self, double d0, double k) -> HarmonicUpperBoundSphereDiameterPairScore"""
10355 _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDiameterPairScore(d0, k))
10356
10357 def get_rest_length(self):
10358 r"""get_rest_length(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10359 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_rest_length(self)
10360
10361 def get_stiffness(self):
10362 r"""get_stiffness(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10363 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_stiffness(self)
10364
10365 def do_get_inputs(self, m, pis):
10366 r"""do_get_inputs(HarmonicUpperBoundSphereDiameterPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10367 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_do_get_inputs(self, m, pis)
10368
10369 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10370 r"""evaluate_indexes(HarmonicUpperBoundSphereDiameterPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
10371 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10372
10373 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10374 r"""evaluate_indexes_scores(HarmonicUpperBoundSphereDiameterPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
10375 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10376
10377 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10378 r"""evaluate_indexes_delta(HarmonicUpperBoundSphereDiameterPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
10379 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10380
10381 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10382 r"""evaluate_if_good_indexes(HarmonicUpperBoundSphereDiameterPairScore 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"""
10383 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10384
10385 def get_version_info(self):
10386 r"""get_version_info(HarmonicUpperBoundSphereDiameterPairScore self) -> VersionInfo"""
10387 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_version_info(self)
10388 __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDiameterPairScore
10389
10390 def __str__(self):
10391 r"""__str__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10392 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___str__(self)
10393
10394 def __repr__(self):
10395 r"""__repr__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10396 return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___repr__(self)
10397
10398 @staticmethod
10399 def get_from(o):
10400 return _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
10401
10402
10403# Register HarmonicUpperBoundSphereDiameterPairScore in _IMP_core:
10404_IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swigregister(HarmonicUpperBoundSphereDiameterPairScore)
10405class HarmonicSphereDistancePairScore(IMP.PairScore):
10406 r"""Proxy of C++ IMP::core::HarmonicSphereDistancePairScore class."""
10407
10408 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10409
10410 def __init__(self, *args):
10411 r"""
10412 __init__(HarmonicSphereDistancePairScore self, double x0, double k, std::string name="HarmonicSphereDistancePairScore%1%") -> HarmonicSphereDistancePairScore
10413 __init__(HarmonicSphereDistancePairScore self) -> HarmonicSphereDistancePairScore
10414 """
10415 _IMP_core.HarmonicSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSphereDistancePairScore(*args))
10416
10417 def do_get_inputs(self, m, pis):
10418 r"""do_get_inputs(HarmonicSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10419 return _IMP_core.HarmonicSphereDistancePairScore_do_get_inputs(self, m, pis)
10420
10421 def get_score_functor(self, *args):
10422 r"""
10423 get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore
10424 get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore const &
10425 """
10426 return _IMP_core.HarmonicSphereDistancePairScore_get_score_functor(self, *args)
10427
10428 def get_x0(self):
10429 r"""get_x0(HarmonicSphereDistancePairScore self) -> double"""
10430 return _IMP_core.HarmonicSphereDistancePairScore_get_x0(self)
10431
10432 def get_k(self):
10433 r"""get_k(HarmonicSphereDistancePairScore self) -> double"""
10434 return _IMP_core.HarmonicSphereDistancePairScore_get_k(self)
10435
10436 def get_version_info(self):
10437 r"""get_version_info(HarmonicSphereDistancePairScore self) -> VersionInfo"""
10438 return _IMP_core.HarmonicSphereDistancePairScore_get_version_info(self)
10439 __swig_destroy__ = _IMP_core.delete_HarmonicSphereDistancePairScore
10440
10441 def __str__(self):
10442 r"""__str__(HarmonicSphereDistancePairScore self) -> std::string"""
10443 return _IMP_core.HarmonicSphereDistancePairScore___str__(self)
10444
10445 def __repr__(self):
10446 r"""__repr__(HarmonicSphereDistancePairScore self) -> std::string"""
10447 return _IMP_core.HarmonicSphereDistancePairScore___repr__(self)
10448
10449 @staticmethod
10450 def get_from(o):
10451 return _object_cast_to_HarmonicSphereDistancePairScore(o)
10452
10453
10454 def _get_as_binary(self):
10455 r"""_get_as_binary(HarmonicSphereDistancePairScore self) -> PyObject *"""
10456 return _IMP_core.HarmonicSphereDistancePairScore__get_as_binary(self)
10457
10458 def _set_from_binary(self, p):
10459 r"""_set_from_binary(HarmonicSphereDistancePairScore self, PyObject * p)"""
10460 return _IMP_core.HarmonicSphereDistancePairScore__set_from_binary(self, p)
10461
10462 def __getstate__(self):
10463 p = self._get_as_binary()
10464 if len(self.__dict__) > 1:
10465 d = self.__dict__.copy()
10466 del d['this']
10467 p = (d, p)
10468 return p
10469
10470 def __setstate__(self, p):
10471 if not hasattr(self, 'this'):
10472 self.__init__()
10473 if isinstance(p, tuple):
10474 d, p = p
10475 self.__dict__.update(d)
10476 return self._set_from_binary(p)
10477
10478
10479 def _get_jax(self, m, indexes, space):
10480 import jax.numpy as jnp
10481 def jax_score(jm, d, k):
10482 xyzs = jm['xyz'][indexes]
10483 rs = jm['r'][indexes]
10484 diff = xyzs[:,0] - xyzs[:,1]
10485 drs = space.distance(diff) - rs.sum(axis=-1)
10486 return 0.5 * k * (d - drs)**2
10487 f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10488 return self._wrap_jax(m, f)
10489
10490
10491# Register HarmonicSphereDistancePairScore in _IMP_core:
10492_IMP_core.HarmonicSphereDistancePairScore_swigregister(HarmonicSphereDistancePairScore)
10493class NormalizedSphereDistancePairScore(IMP.PairScore):
10494 r"""Proxy of C++ IMP::core::NormalizedSphereDistancePairScore class."""
10495
10496 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10497
10498 def __init__(self, *args):
10499 r"""__init__(NormalizedSphereDistancePairScore self, UnaryFunction f, FloatKey radius=IMP::FloatKey("radius")) -> NormalizedSphereDistancePairScore"""
10500 _IMP_core.NormalizedSphereDistancePairScore_swiginit(self, _IMP_core.new_NormalizedSphereDistancePairScore(*args))
10501
10502 def do_get_inputs(self, m, pis):
10503 r"""do_get_inputs(NormalizedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10504 return _IMP_core.NormalizedSphereDistancePairScore_do_get_inputs(self, m, pis)
10505
10506 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10507 r"""evaluate_indexes(NormalizedSphereDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
10508 return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10509
10510 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10511 r"""evaluate_indexes_scores(NormalizedSphereDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
10512 return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10513
10514 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10515 r"""evaluate_indexes_delta(NormalizedSphereDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
10516 return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10517
10518 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10519 r"""evaluate_if_good_indexes(NormalizedSphereDistancePairScore 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"""
10520 return _IMP_core.NormalizedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10521
10522 def get_version_info(self):
10523 r"""get_version_info(NormalizedSphereDistancePairScore self) -> VersionInfo"""
10524 return _IMP_core.NormalizedSphereDistancePairScore_get_version_info(self)
10525 __swig_destroy__ = _IMP_core.delete_NormalizedSphereDistancePairScore
10526
10527 def __str__(self):
10528 r"""__str__(NormalizedSphereDistancePairScore self) -> std::string"""
10529 return _IMP_core.NormalizedSphereDistancePairScore___str__(self)
10530
10531 def __repr__(self):
10532 r"""__repr__(NormalizedSphereDistancePairScore self) -> std::string"""
10533 return _IMP_core.NormalizedSphereDistancePairScore___repr__(self)
10534
10535 @staticmethod
10536 def get_from(o):
10537 return _object_cast_to_NormalizedSphereDistancePairScore(o)
10538
10539
10540# Register NormalizedSphereDistancePairScore in _IMP_core:
10541_IMP_core.NormalizedSphereDistancePairScore_swigregister(NormalizedSphereDistancePairScore)
10542class WeightedSphereDistancePairScore(IMP.PairScore):
10543 r"""Proxy of C++ IMP::core::WeightedSphereDistancePairScore class."""
10544
10545 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10546
10547 def __init__(self, *args):
10548 r"""__init__(WeightedSphereDistancePairScore self, UnaryFunction f, FloatKey weight, FloatKey radius=IMP::FloatKey("radius")) -> WeightedSphereDistancePairScore"""
10549 _IMP_core.WeightedSphereDistancePairScore_swiginit(self, _IMP_core.new_WeightedSphereDistancePairScore(*args))
10550
10551 def do_get_inputs(self, m, pis):
10552 r"""do_get_inputs(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10553 return _IMP_core.WeightedSphereDistancePairScore_do_get_inputs(self, m, pis)
10554
10555 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10556 r"""evaluate_indexes(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
10557 return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10558
10559 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10560 r"""evaluate_indexes_scores(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
10561 return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10562
10563 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10564 r"""evaluate_indexes_delta(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
10565 return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10566
10567 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10568 r"""evaluate_if_good_indexes(WeightedSphereDistancePairScore 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"""
10569 return _IMP_core.WeightedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10570
10571 def get_version_info(self):
10572 r"""get_version_info(WeightedSphereDistancePairScore self) -> VersionInfo"""
10573 return _IMP_core.WeightedSphereDistancePairScore_get_version_info(self)
10574 __swig_destroy__ = _IMP_core.delete_WeightedSphereDistancePairScore
10575
10576 def __str__(self):
10577 r"""__str__(WeightedSphereDistancePairScore self) -> std::string"""
10578 return _IMP_core.WeightedSphereDistancePairScore___str__(self)
10579
10580 def __repr__(self):
10581 r"""__repr__(WeightedSphereDistancePairScore self) -> std::string"""
10582 return _IMP_core.WeightedSphereDistancePairScore___repr__(self)
10583
10584 @staticmethod
10585 def get_from(o):
10586 return _object_cast_to_WeightedSphereDistancePairScore(o)
10587
10588
10589# Register WeightedSphereDistancePairScore in _IMP_core:
10590_IMP_core.WeightedSphereDistancePairScore_swigregister(WeightedSphereDistancePairScore)
10591class SoftSpherePairScore(IMP.PairScore):
10592 r"""Proxy of C++ IMP::core::SoftSpherePairScore class."""
10593
10594 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10595
10596 def __init__(self, *args):
10597 r"""
10598 __init__(SoftSpherePairScore self, double k, std::string name="SoftSpherePairScore%1%") -> SoftSpherePairScore
10599 __init__(SoftSpherePairScore self) -> SoftSpherePairScore
10600 """
10601 _IMP_core.SoftSpherePairScore_swiginit(self, _IMP_core.new_SoftSpherePairScore(*args))
10602
10603 def do_get_inputs(self, m, pis):
10604 r"""do_get_inputs(SoftSpherePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10605 return _IMP_core.SoftSpherePairScore_do_get_inputs(self, m, pis)
10606
10607 def get_score_functor(self, *args):
10608 r"""
10609 get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore
10610 get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore const &
10611 """
10612 return _IMP_core.SoftSpherePairScore_get_score_functor(self, *args)
10613
10614 def get_k(self):
10615 r"""get_k(SoftSpherePairScore self) -> double"""
10616 return _IMP_core.SoftSpherePairScore_get_k(self)
10617
10618 def get_version_info(self):
10619 r"""get_version_info(SoftSpherePairScore self) -> VersionInfo"""
10620 return _IMP_core.SoftSpherePairScore_get_version_info(self)
10621 __swig_destroy__ = _IMP_core.delete_SoftSpherePairScore
10622
10623 def __str__(self):
10624 r"""__str__(SoftSpherePairScore self) -> std::string"""
10625 return _IMP_core.SoftSpherePairScore___str__(self)
10626
10627 def __repr__(self):
10628 r"""__repr__(SoftSpherePairScore self) -> std::string"""
10629 return _IMP_core.SoftSpherePairScore___repr__(self)
10630
10631 @staticmethod
10632 def get_from(o):
10633 return _object_cast_to_SoftSpherePairScore(o)
10634
10635
10636 def _get_as_binary(self):
10637 r"""_get_as_binary(SoftSpherePairScore self) -> PyObject *"""
10638 return _IMP_core.SoftSpherePairScore__get_as_binary(self)
10639
10640 def _set_from_binary(self, p):
10641 r"""_set_from_binary(SoftSpherePairScore self, PyObject * p)"""
10642 return _IMP_core.SoftSpherePairScore__set_from_binary(self, p)
10643
10644 def __getstate__(self):
10645 p = self._get_as_binary()
10646 if len(self.__dict__) > 1:
10647 d = self.__dict__.copy()
10648 del d['this']
10649 p = (d, p)
10650 return p
10651
10652 def __setstate__(self, p):
10653 if not hasattr(self, 'this'):
10654 self.__init__()
10655 if isinstance(p, tuple):
10656 d, p = p
10657 self.__dict__.update(d)
10658 return self._set_from_binary(p)
10659
10660
10661 def _get_jax(self, m, indexes, space):
10662 import jax.numpy as jnp
10663 import jax.lax
10664 def jax_score(jm, k):
10665 xyzs = jm['xyz'][indexes]
10666 rs = jm['r'][indexes]
10667 diff = xyzs[:,0] - xyzs[:,1]
10668 drs = space.distance(diff) - rs.sum(axis=-1)
10669 return 0.5 * k * jax.lax.min(drs, 0.0) ** 2
10670 f = functools.partial(jax_score, k=self.get_k())
10671 return self._wrap_jax(m, f)
10672
10673
10674# Register SoftSpherePairScore in _IMP_core:
10675_IMP_core.SoftSpherePairScore_swigregister(SoftSpherePairScore)
10676class SurfaceDistancePairScore(IMP.PairScore):
10677 r"""Proxy of C++ IMP::core::SurfaceDistancePairScore class."""
10678
10679 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10680
10681 def __init__(self, *args):
10682 r"""__init__(SurfaceDistancePairScore self, UnaryFunction uf, std::string name="SurfaceDistancePairScore%1%") -> SurfaceDistancePairScore"""
10683 _IMP_core.SurfaceDistancePairScore_swiginit(self, _IMP_core.new_SurfaceDistancePairScore(*args))
10684
10685 def do_get_inputs(self, m, pis):
10686 r"""do_get_inputs(SurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10687 return _IMP_core.SurfaceDistancePairScore_do_get_inputs(self, m, pis)
10688
10689 def get_version_info(self):
10690 r"""get_version_info(SurfaceDistancePairScore self) -> VersionInfo"""
10691 return _IMP_core.SurfaceDistancePairScore_get_version_info(self)
10692 __swig_destroy__ = _IMP_core.delete_SurfaceDistancePairScore
10693
10694 def __str__(self):
10695 r"""__str__(SurfaceDistancePairScore self) -> std::string"""
10696 return _IMP_core.SurfaceDistancePairScore___str__(self)
10697
10698 def __repr__(self):
10699 r"""__repr__(SurfaceDistancePairScore self) -> std::string"""
10700 return _IMP_core.SurfaceDistancePairScore___repr__(self)
10701
10702 @staticmethod
10703 def get_from(o):
10704 return _object_cast_to_SurfaceDistancePairScore(o)
10705
10706
10707# Register SurfaceDistancePairScore in _IMP_core:
10708_IMP_core.SurfaceDistancePairScore_swigregister(SurfaceDistancePairScore)
10709class SurfaceHeightPairScore(IMP.PairScore):
10710 r"""Proxy of C++ IMP::core::SurfaceHeightPairScore class."""
10711
10712 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10713
10714 def __init__(self, *args):
10715 r"""__init__(SurfaceHeightPairScore self, UnaryFunction uf, std::string name="SurfaceHeightPairScore%1%") -> SurfaceHeightPairScore"""
10716 _IMP_core.SurfaceHeightPairScore_swiginit(self, _IMP_core.new_SurfaceHeightPairScore(*args))
10717
10718 def do_get_inputs(self, m, pis):
10719 r"""do_get_inputs(SurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10720 return _IMP_core.SurfaceHeightPairScore_do_get_inputs(self, m, pis)
10721
10722 def get_version_info(self):
10723 r"""get_version_info(SurfaceHeightPairScore self) -> VersionInfo"""
10724 return _IMP_core.SurfaceHeightPairScore_get_version_info(self)
10725 __swig_destroy__ = _IMP_core.delete_SurfaceHeightPairScore
10726
10727 def __str__(self):
10728 r"""__str__(SurfaceHeightPairScore self) -> std::string"""
10729 return _IMP_core.SurfaceHeightPairScore___str__(self)
10730
10731 def __repr__(self):
10732 r"""__repr__(SurfaceHeightPairScore self) -> std::string"""
10733 return _IMP_core.SurfaceHeightPairScore___repr__(self)
10734
10735 @staticmethod
10736 def get_from(o):
10737 return _object_cast_to_SurfaceHeightPairScore(o)
10738
10739
10740# Register SurfaceHeightPairScore in _IMP_core:
10741_IMP_core.SurfaceHeightPairScore_swigregister(SurfaceHeightPairScore)
10742class SurfaceDepthPairScore(IMP.PairScore):
10743 r"""Proxy of C++ IMP::core::SurfaceDepthPairScore class."""
10744
10745 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10746
10747 def __init__(self, *args):
10748 r"""__init__(SurfaceDepthPairScore self, UnaryFunction uf, std::string name="SurfaceDepthPairScore%1%") -> SurfaceDepthPairScore"""
10749 _IMP_core.SurfaceDepthPairScore_swiginit(self, _IMP_core.new_SurfaceDepthPairScore(*args))
10750
10751 def do_get_inputs(self, m, pis):
10752 r"""do_get_inputs(SurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10753 return _IMP_core.SurfaceDepthPairScore_do_get_inputs(self, m, pis)
10754
10755 def get_version_info(self):
10756 r"""get_version_info(SurfaceDepthPairScore self) -> VersionInfo"""
10757 return _IMP_core.SurfaceDepthPairScore_get_version_info(self)
10758 __swig_destroy__ = _IMP_core.delete_SurfaceDepthPairScore
10759
10760 def __str__(self):
10761 r"""__str__(SurfaceDepthPairScore self) -> std::string"""
10762 return _IMP_core.SurfaceDepthPairScore___str__(self)
10763
10764 def __repr__(self):
10765 r"""__repr__(SurfaceDepthPairScore self) -> std::string"""
10766 return _IMP_core.SurfaceDepthPairScore___repr__(self)
10767
10768 @staticmethod
10769 def get_from(o):
10770 return _object_cast_to_SurfaceDepthPairScore(o)
10771
10772
10773# Register SurfaceDepthPairScore in _IMP_core:
10774_IMP_core.SurfaceDepthPairScore_swigregister(SurfaceDepthPairScore)
10775class HarmonicSurfaceDistancePairScore(IMP.PairScore):
10776 r"""Proxy of C++ IMP::core::HarmonicSurfaceDistancePairScore class."""
10777
10778 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10779
10780 def __init__(self, *args):
10781 r"""__init__(HarmonicSurfaceDistancePairScore self, double x0, double k, std::string name="HarmonicSurfaceDistancePairScore%1%") -> HarmonicSurfaceDistancePairScore"""
10782 _IMP_core.HarmonicSurfaceDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDistancePairScore(*args))
10783
10784 def do_get_inputs(self, m, pis):
10785 r"""do_get_inputs(HarmonicSurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10786 return _IMP_core.HarmonicSurfaceDistancePairScore_do_get_inputs(self, m, pis)
10787
10788 def get_version_info(self):
10789 r"""get_version_info(HarmonicSurfaceDistancePairScore self) -> VersionInfo"""
10790 return _IMP_core.HarmonicSurfaceDistancePairScore_get_version_info(self)
10791 __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDistancePairScore
10792
10793 def __str__(self):
10794 r"""__str__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10795 return _IMP_core.HarmonicSurfaceDistancePairScore___str__(self)
10796
10797 def __repr__(self):
10798 r"""__repr__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10799 return _IMP_core.HarmonicSurfaceDistancePairScore___repr__(self)
10800
10801 @staticmethod
10802 def get_from(o):
10803 return _object_cast_to_HarmonicSurfaceDistancePairScore(o)
10804
10805
10806# Register HarmonicSurfaceDistancePairScore in _IMP_core:
10807_IMP_core.HarmonicSurfaceDistancePairScore_swigregister(HarmonicSurfaceDistancePairScore)
10808class HarmonicSurfaceHeightPairScore(IMP.PairScore):
10809 r"""Proxy of C++ IMP::core::HarmonicSurfaceHeightPairScore class."""
10810
10811 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10812
10813 def __init__(self, *args):
10814 r"""__init__(HarmonicSurfaceHeightPairScore self, double x0, double k, std::string name="HarmonicSurfaceHeightPairScore%1%") -> HarmonicSurfaceHeightPairScore"""
10815 _IMP_core.HarmonicSurfaceHeightPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceHeightPairScore(*args))
10816
10817 def do_get_inputs(self, m, pis):
10818 r"""do_get_inputs(HarmonicSurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10819 return _IMP_core.HarmonicSurfaceHeightPairScore_do_get_inputs(self, m, pis)
10820
10821 def get_version_info(self):
10822 r"""get_version_info(HarmonicSurfaceHeightPairScore self) -> VersionInfo"""
10823 return _IMP_core.HarmonicSurfaceHeightPairScore_get_version_info(self)
10824 __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceHeightPairScore
10825
10826 def __str__(self):
10827 r"""__str__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10828 return _IMP_core.HarmonicSurfaceHeightPairScore___str__(self)
10829
10830 def __repr__(self):
10831 r"""__repr__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10832 return _IMP_core.HarmonicSurfaceHeightPairScore___repr__(self)
10833
10834 @staticmethod
10835 def get_from(o):
10836 return _object_cast_to_HarmonicSurfaceHeightPairScore(o)
10837
10838
10839# Register HarmonicSurfaceHeightPairScore in _IMP_core:
10840_IMP_core.HarmonicSurfaceHeightPairScore_swigregister(HarmonicSurfaceHeightPairScore)
10841class HarmonicSurfaceDepthPairScore(IMP.PairScore):
10842 r"""Proxy of C++ IMP::core::HarmonicSurfaceDepthPairScore class."""
10843
10844 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10845
10846 def __init__(self, *args):
10847 r"""__init__(HarmonicSurfaceDepthPairScore self, double x0, double k, std::string name="HarmonicSurfaceDepthPairScore%1%") -> HarmonicSurfaceDepthPairScore"""
10848 _IMP_core.HarmonicSurfaceDepthPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDepthPairScore(*args))
10849
10850 def do_get_inputs(self, m, pis):
10851 r"""do_get_inputs(HarmonicSurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10852 return _IMP_core.HarmonicSurfaceDepthPairScore_do_get_inputs(self, m, pis)
10853
10854 def get_version_info(self):
10855 r"""get_version_info(HarmonicSurfaceDepthPairScore self) -> VersionInfo"""
10856 return _IMP_core.HarmonicSurfaceDepthPairScore_get_version_info(self)
10857 __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDepthPairScore
10858
10859 def __str__(self):
10860 r"""__str__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10861 return _IMP_core.HarmonicSurfaceDepthPairScore___str__(self)
10862
10863 def __repr__(self):
10864 r"""__repr__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10865 return _IMP_core.HarmonicSurfaceDepthPairScore___repr__(self)
10866
10867 @staticmethod
10868 def get_from(o):
10869 return _object_cast_to_HarmonicSurfaceDepthPairScore(o)
10870
10871
10872# Register HarmonicSurfaceDepthPairScore in _IMP_core:
10873_IMP_core.HarmonicSurfaceDepthPairScore_swigregister(HarmonicSurfaceDepthPairScore)
10874class SoftSuperSurfacePairScore(IMP.PairScore):
10875 r"""Proxy of C++ IMP::core::SoftSuperSurfacePairScore class."""
10876
10877 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10878
10879 def __init__(self, *args):
10880 r"""__init__(SoftSuperSurfacePairScore self, double k, std::string name="SoftSuperSurfacePairScore%1%") -> SoftSuperSurfacePairScore"""
10881 _IMP_core.SoftSuperSurfacePairScore_swiginit(self, _IMP_core.new_SoftSuperSurfacePairScore(*args))
10882
10883 def do_get_inputs(self, m, pis):
10884 r"""do_get_inputs(SoftSuperSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10885 return _IMP_core.SoftSuperSurfacePairScore_do_get_inputs(self, m, pis)
10886
10887 def get_version_info(self):
10888 r"""get_version_info(SoftSuperSurfacePairScore self) -> VersionInfo"""
10889 return _IMP_core.SoftSuperSurfacePairScore_get_version_info(self)
10890 __swig_destroy__ = _IMP_core.delete_SoftSuperSurfacePairScore
10891
10892 def __str__(self):
10893 r"""__str__(SoftSuperSurfacePairScore self) -> std::string"""
10894 return _IMP_core.SoftSuperSurfacePairScore___str__(self)
10895
10896 def __repr__(self):
10897 r"""__repr__(SoftSuperSurfacePairScore self) -> std::string"""
10898 return _IMP_core.SoftSuperSurfacePairScore___repr__(self)
10899
10900 @staticmethod
10901 def get_from(o):
10902 return _object_cast_to_SoftSuperSurfacePairScore(o)
10903
10904
10905# Register SoftSuperSurfacePairScore in _IMP_core:
10906_IMP_core.SoftSuperSurfacePairScore_swigregister(SoftSuperSurfacePairScore)
10907class SoftSubSurfacePairScore(IMP.PairScore):
10908 r"""Proxy of C++ IMP::core::SoftSubSurfacePairScore class."""
10909
10910 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10911
10912 def __init__(self, *args):
10913 r"""__init__(SoftSubSurfacePairScore self, double k, std::string name="SoftSubSurfacePairScore%1%") -> SoftSubSurfacePairScore"""
10914 _IMP_core.SoftSubSurfacePairScore_swiginit(self, _IMP_core.new_SoftSubSurfacePairScore(*args))
10915
10916 def do_get_inputs(self, m, pis):
10917 r"""do_get_inputs(SoftSubSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10918 return _IMP_core.SoftSubSurfacePairScore_do_get_inputs(self, m, pis)
10919
10920 def get_version_info(self):
10921 r"""get_version_info(SoftSubSurfacePairScore self) -> VersionInfo"""
10922 return _IMP_core.SoftSubSurfacePairScore_get_version_info(self)
10923 __swig_destroy__ = _IMP_core.delete_SoftSubSurfacePairScore
10924
10925 def __str__(self):
10926 r"""__str__(SoftSubSurfacePairScore self) -> std::string"""
10927 return _IMP_core.SoftSubSurfacePairScore___str__(self)
10928
10929 def __repr__(self):
10930 r"""__repr__(SoftSubSurfacePairScore self) -> std::string"""
10931 return _IMP_core.SoftSubSurfacePairScore___repr__(self)
10932
10933 @staticmethod
10934 def get_from(o):
10935 return _object_cast_to_SoftSubSurfacePairScore(o)
10936
10937
10938# Register SoftSubSurfacePairScore in _IMP_core:
10939_IMP_core.SoftSubSurfacePairScore_swigregister(SoftSubSurfacePairScore)
10940class SurfaceTetheredChain(IMP.UnaryFunction):
10941 r"""Proxy of C++ IMP::core::SurfaceTetheredChain class."""
10942
10943 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10944
10945 def __init__(self, link_num, link_length):
10946 r"""__init__(SurfaceTetheredChain self, int link_num, double link_length) -> SurfaceTetheredChain"""
10947 _IMP_core.SurfaceTetheredChain_swiginit(self, _IMP_core.new_SurfaceTetheredChain(link_num, link_length))
10948
10949 def get_version_info(self):
10950 r"""get_version_info(SurfaceTetheredChain self) -> VersionInfo"""
10951 return _IMP_core.SurfaceTetheredChain_get_version_info(self)
10952 __swig_destroy__ = _IMP_core.delete_SurfaceTetheredChain
10953
10954 def get_link_number(self):
10955 r"""get_link_number(SurfaceTetheredChain self) -> int"""
10956 return _IMP_core.SurfaceTetheredChain_get_link_number(self)
10957
10958 def get_link_length(self):
10959 r"""get_link_length(SurfaceTetheredChain self) -> double"""
10960 return _IMP_core.SurfaceTetheredChain_get_link_length(self)
10961
10962 def set_link_number(self, N):
10963 r"""set_link_number(SurfaceTetheredChain self, int N)"""
10964 return _IMP_core.SurfaceTetheredChain_set_link_number(self, N)
10965
10966 def set_link_length(self, b):
10967 r"""set_link_length(SurfaceTetheredChain self, double b)"""
10968 return _IMP_core.SurfaceTetheredChain_set_link_length(self, b)
10969
10970 def get_distance_at_minimum(self):
10971 r"""get_distance_at_minimum(SurfaceTetheredChain self) -> double"""
10972 return _IMP_core.SurfaceTetheredChain_get_distance_at_minimum(self)
10973
10974 def get_average_distance(self):
10975 r"""get_average_distance(SurfaceTetheredChain self) -> double"""
10976 return _IMP_core.SurfaceTetheredChain_get_average_distance(self)
10977
10978 def __str__(self):
10979 r"""__str__(SurfaceTetheredChain self) -> std::string"""
10980 return _IMP_core.SurfaceTetheredChain___str__(self)
10981
10982 def __repr__(self):
10983 r"""__repr__(SurfaceTetheredChain self) -> std::string"""
10984 return _IMP_core.SurfaceTetheredChain___repr__(self)
10985
10986 @staticmethod
10987 def get_from(o):
10988 return _object_cast_to_SurfaceTetheredChain(o)
10989
10990
10991# Register SurfaceTetheredChain in _IMP_core:
10992_IMP_core.SurfaceTetheredChain_swigregister(SurfaceTetheredChain)
10993class SurfaceSymmetryConstraint(IMP.Constraint):
10994 r"""Proxy of C++ IMP::core::SurfaceSymmetryConstraint class."""
10995
10996 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10997
10998 def __init__(self, m, ss, rbs):
10999 r"""__init__(SurfaceSymmetryConstraint self, Model m, IMP::ParticleIndexPair const & ss, IMP::ParticleIndexPair const & rbs) -> SurfaceSymmetryConstraint"""
11000 _IMP_core.SurfaceSymmetryConstraint_swiginit(self, _IMP_core.new_SurfaceSymmetryConstraint(m, ss, rbs))
11001
11002 def do_get_inputs(self):
11003 r"""do_get_inputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
11004 return _IMP_core.SurfaceSymmetryConstraint_do_get_inputs(self)
11005
11006 def do_get_outputs(self):
11007 r"""do_get_outputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
11008 return _IMP_core.SurfaceSymmetryConstraint_do_get_outputs(self)
11009
11010 def get_version_info(self):
11011 r"""get_version_info(SurfaceSymmetryConstraint self) -> VersionInfo"""
11012 return _IMP_core.SurfaceSymmetryConstraint_get_version_info(self)
11013 __swig_destroy__ = _IMP_core.delete_SurfaceSymmetryConstraint
11014
11015 def __str__(self):
11016 r"""__str__(SurfaceSymmetryConstraint self) -> std::string"""
11017 return _IMP_core.SurfaceSymmetryConstraint___str__(self)
11018
11019 def __repr__(self):
11020 r"""__repr__(SurfaceSymmetryConstraint self) -> std::string"""
11021 return _IMP_core.SurfaceSymmetryConstraint___repr__(self)
11022
11023 @staticmethod
11024 def get_from(o):
11025 return _object_cast_to_SurfaceSymmetryConstraint(o)
11026
11027
11028# Register SurfaceSymmetryConstraint in _IMP_core:
11029_IMP_core.SurfaceSymmetryConstraint_swigregister(SurfaceSymmetryConstraint)
11030class SteepestDescent(IMP.AttributeOptimizer):
11031 r"""Proxy of C++ IMP::core::SteepestDescent class."""
11032
11033 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11034
11035 def __init__(self, *args):
11036 r"""__init__(SteepestDescent self, Model m, std::string name="SteepestDescent%1%") -> SteepestDescent"""
11037 _IMP_core.SteepestDescent_swiginit(self, _IMP_core.new_SteepestDescent(*args))
11038
11039 def do_optimize(self, max_steps):
11040 r"""do_optimize(SteepestDescent self, unsigned int max_steps) -> IMP::Float"""
11041 return _IMP_core.SteepestDescent_do_optimize(self, max_steps)
11042
11043 def get_version_info(self):
11044 r"""get_version_info(SteepestDescent self) -> VersionInfo"""
11045 return _IMP_core.SteepestDescent_get_version_info(self)
11046 __swig_destroy__ = _IMP_core.delete_SteepestDescent
11047
11048 def set_threshold(self, t):
11049 r"""set_threshold(SteepestDescent self, IMP::Float t)"""
11050 return _IMP_core.SteepestDescent_set_threshold(self, t)
11051
11052 def get_threshold(self):
11053 r"""get_threshold(SteepestDescent self) -> IMP::Float"""
11054 return _IMP_core.SteepestDescent_get_threshold(self)
11055
11056 def set_step_size(self, t):
11057 r"""set_step_size(SteepestDescent self, IMP::Float t)"""
11058 return _IMP_core.SteepestDescent_set_step_size(self, t)
11059
11060 def get_step_size(self):
11061 r"""get_step_size(SteepestDescent self) -> IMP::Float"""
11062 return _IMP_core.SteepestDescent_get_step_size(self)
11063
11064 def set_maximum_step_size(self, t):
11065 r"""set_maximum_step_size(SteepestDescent self, IMP::Float t)"""
11066 return _IMP_core.SteepestDescent_set_maximum_step_size(self, t)
11067
11068 def get_maximum_step_size(self):
11069 r"""get_maximum_step_size(SteepestDescent self) -> IMP::Float"""
11070 return _IMP_core.SteepestDescent_get_maximum_step_size(self)
11071
11072 def __str__(self):
11073 r"""__str__(SteepestDescent self) -> std::string"""
11074 return _IMP_core.SteepestDescent___str__(self)
11075
11076 def __repr__(self):
11077 r"""__repr__(SteepestDescent self) -> std::string"""
11078 return _IMP_core.SteepestDescent___repr__(self)
11079
11080 @staticmethod
11081 def get_from(o):
11082 return _object_cast_to_SteepestDescent(o)
11083
11084
11085 def _get_jax(self, space=None):
11086 from IMP.core._jax_minimize import _SDJAXInfo
11087 return _SDJAXInfo(self, space)
11088
11089 def _get_jax_optimizer(self, max_steps, space=None):
11090 from IMP.core._jax_minimize import _SDJAXOptimizer
11091 return _SDJAXOptimizer(self, max_steps, space)
11092
11093 def _optimize_jax(self, max_steps, space=None):
11094 opt = self._get_jax_optimizer(max_steps, space=space)
11095 score, sd_state = opt.optimize(opt.get_initial_state())
11096 return score
11097
11098
11099# Register SteepestDescent in _IMP_core:
11100_IMP_core.SteepestDescent_swigregister(SteepestDescent)
11101class TransformedDistancePairScore(IMP.PairScore):
11102 r"""Proxy of C++ IMP::core::TransformedDistancePairScore class."""
11103
11104 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11105
11106 def __init__(self, f, transformation):
11107 r"""__init__(TransformedDistancePairScore self, UnaryFunction f, Transformation3D transformation) -> TransformedDistancePairScore"""
11108 _IMP_core.TransformedDistancePairScore_swiginit(self, _IMP_core.new_TransformedDistancePairScore(f, transformation))
11109
11110 def set_transformation(self, rot):
11111 r"""set_transformation(TransformedDistancePairScore self, Transformation3D rot)"""
11112 return _IMP_core.TransformedDistancePairScore_set_transformation(self, rot)
11113
11114 def do_get_inputs(self, m, pis):
11115 r"""do_get_inputs(TransformedDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11116 return _IMP_core.TransformedDistancePairScore_do_get_inputs(self, m, pis)
11117
11118 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11119 r"""evaluate_indexes(TransformedDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
11120 return _IMP_core.TransformedDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11121
11122 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11123 r"""evaluate_indexes_scores(TransformedDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
11124 return _IMP_core.TransformedDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11125
11126 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11127 r"""evaluate_indexes_delta(TransformedDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
11128 return _IMP_core.TransformedDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11129
11130 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11131 r"""evaluate_if_good_indexes(TransformedDistancePairScore 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"""
11132 return _IMP_core.TransformedDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11133
11134 def get_version_info(self):
11135 r"""get_version_info(TransformedDistancePairScore self) -> VersionInfo"""
11136 return _IMP_core.TransformedDistancePairScore_get_version_info(self)
11137 __swig_destroy__ = _IMP_core.delete_TransformedDistancePairScore
11138
11139 def __str__(self):
11140 r"""__str__(TransformedDistancePairScore self) -> std::string"""
11141 return _IMP_core.TransformedDistancePairScore___str__(self)
11142
11143 def __repr__(self):
11144 r"""__repr__(TransformedDistancePairScore self) -> std::string"""
11145 return _IMP_core.TransformedDistancePairScore___repr__(self)
11146
11147 @staticmethod
11148 def get_from(o):
11149 return _object_cast_to_TransformedDistancePairScore(o)
11150
11151
11152# Register TransformedDistancePairScore in _IMP_core:
11153_IMP_core.TransformedDistancePairScore_swigregister(TransformedDistancePairScore)
11154class TypedPairScore(IMP.PairScore):
11155 r"""Proxy of C++ IMP::core::TypedPairScore class."""
11156
11157 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11158
11159 def __init__(self, typekey, allow_invalid_types=True):
11160 r"""__init__(TypedPairScore self, IntKey typekey, bool allow_invalid_types=True) -> TypedPairScore"""
11161 _IMP_core.TypedPairScore_swiginit(self, _IMP_core.new_TypedPairScore(typekey, allow_invalid_types))
11162
11163 def set_particle_type(self, arg2):
11164 r"""set_particle_type(TypedPairScore self, Particle arg2)"""
11165 return _IMP_core.TypedPairScore_set_particle_type(self, arg2)
11166
11167 def set_pair_score(self, ps, atype, btype):
11168 r"""set_pair_score(TypedPairScore self, PairScore ps, IMP::Int atype, IMP::Int btype)"""
11169 return _IMP_core.TypedPairScore_set_pair_score(self, ps, atype, btype)
11170
11171 def do_get_inputs(self, m, pis):
11172 r"""do_get_inputs(TypedPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11173 return _IMP_core.TypedPairScore_do_get_inputs(self, m, pis)
11174
11175 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11176 r"""evaluate_indexes(TypedPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
11177 return _IMP_core.TypedPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11178
11179 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11180 r"""evaluate_indexes_scores(TypedPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
11181 return _IMP_core.TypedPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11182
11183 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11184 r"""evaluate_indexes_delta(TypedPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
11185 return _IMP_core.TypedPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11186
11187 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11188 r"""evaluate_if_good_indexes(TypedPairScore 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"""
11189 return _IMP_core.TypedPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11190
11191 def get_version_info(self):
11192 r"""get_version_info(TypedPairScore self) -> VersionInfo"""
11193 return _IMP_core.TypedPairScore_get_version_info(self)
11194 __swig_destroy__ = _IMP_core.delete_TypedPairScore
11195
11196 def __str__(self):
11197 r"""__str__(TypedPairScore self) -> std::string"""
11198 return _IMP_core.TypedPairScore___str__(self)
11199
11200 def __repr__(self):
11201 r"""__repr__(TypedPairScore self) -> std::string"""
11202 return _IMP_core.TypedPairScore___repr__(self)
11203
11204 @staticmethod
11205 def get_from(o):
11206 return _object_cast_to_TypedPairScore(o)
11207
11208
11209# Register TypedPairScore in _IMP_core:
11210_IMP_core.TypedPairScore_swigregister(TypedPairScore)
11211class RigidBodyDistancePairScore(KClosePairsPairScore):
11212 r"""Proxy of C++ IMP::core::RigidBodyDistancePairScore class."""
11213
11214 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11215
11216 def __init__(self, ps, r):
11217 r"""__init__(RigidBodyDistancePairScore self, PairScore ps, Refiner r) -> RigidBodyDistancePairScore"""
11218 _IMP_core.RigidBodyDistancePairScore_swiginit(self, _IMP_core.new_RigidBodyDistancePairScore(ps, r))
11219
11220 def __str__(self):
11221 r"""__str__(RigidBodyDistancePairScore self) -> std::string"""
11222 return _IMP_core.RigidBodyDistancePairScore___str__(self)
11223
11224 def __repr__(self):
11225 r"""__repr__(RigidBodyDistancePairScore self) -> std::string"""
11226 return _IMP_core.RigidBodyDistancePairScore___repr__(self)
11227
11228 @staticmethod
11229 def get_from(o):
11230 return _object_cast_to_RigidBodyDistancePairScore(o)
11231
11232 __swig_destroy__ = _IMP_core.delete_RigidBodyDistancePairScore
11233
11234# Register RigidBodyDistancePairScore in _IMP_core:
11235_IMP_core.RigidBodyDistancePairScore_swigregister(RigidBodyDistancePairScore)
11236class RigidBodyAnglePairScore(IMP.PairScore):
11237 r"""Proxy of C++ IMP::core::RigidBodyAnglePairScore class."""
11238
11239 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11240
11241 def __init__(self, f):
11242 r"""__init__(RigidBodyAnglePairScore self, UnaryFunction f) -> RigidBodyAnglePairScore"""
11243 _IMP_core.RigidBodyAnglePairScore_swiginit(self, _IMP_core.new_RigidBodyAnglePairScore(f))
11244
11245 def do_get_inputs(self, m, pis):
11246 r"""do_get_inputs(RigidBodyAnglePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11247 return _IMP_core.RigidBodyAnglePairScore_do_get_inputs(self, m, pis)
11248
11249 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11250 r"""evaluate_indexes(RigidBodyAnglePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
11251 return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11252
11253 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11254 r"""evaluate_indexes_scores(RigidBodyAnglePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
11255 return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11256
11257 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11258 r"""evaluate_indexes_delta(RigidBodyAnglePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
11259 return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11260
11261 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11262 r"""evaluate_if_good_indexes(RigidBodyAnglePairScore 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"""
11263 return _IMP_core.RigidBodyAnglePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11264
11265 def get_version_info(self):
11266 r"""get_version_info(RigidBodyAnglePairScore self) -> VersionInfo"""
11267 return _IMP_core.RigidBodyAnglePairScore_get_version_info(self)
11268 __swig_destroy__ = _IMP_core.delete_RigidBodyAnglePairScore
11269
11270 def __str__(self):
11271 r"""__str__(RigidBodyAnglePairScore self) -> std::string"""
11272 return _IMP_core.RigidBodyAnglePairScore___str__(self)
11273
11274 def __repr__(self):
11275 r"""__repr__(RigidBodyAnglePairScore self) -> std::string"""
11276 return _IMP_core.RigidBodyAnglePairScore___repr__(self)
11277
11278 @staticmethod
11279 def get_from(o):
11280 return _object_cast_to_RigidBodyAnglePairScore(o)
11281
11282
11283# Register RigidBodyAnglePairScore in _IMP_core:
11284_IMP_core.RigidBodyAnglePairScore_swigregister(RigidBodyAnglePairScore)
11285class TableRefiner(IMP.Refiner):
11286 r"""Proxy of C++ IMP::core::TableRefiner class."""
11287
11288 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11289
11290 def __init__(self):
11291 r"""__init__(TableRefiner self) -> TableRefiner"""
11292 _IMP_core.TableRefiner_swiginit(self, _IMP_core.new_TableRefiner())
11293
11294 def add_particle(self, p, ps):
11295 r"""add_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11296 return _IMP_core.TableRefiner_add_particle(self, p, ps)
11297
11298 def remove_particle(self, p):
11299 r"""remove_particle(TableRefiner self, Particle p)"""
11300 return _IMP_core.TableRefiner_remove_particle(self, p)
11301
11302 def set_particle(self, p, ps):
11303 r"""set_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11304 return _IMP_core.TableRefiner_set_particle(self, p, ps)
11305
11306 def do_get_inputs(self, m, pis):
11307 r"""do_get_inputs(TableRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11308 return _IMP_core.TableRefiner_do_get_inputs(self, m, pis)
11309
11310 def get_version_info(self):
11311 r"""get_version_info(TableRefiner self) -> VersionInfo"""
11312 return _IMP_core.TableRefiner_get_version_info(self)
11313 __swig_destroy__ = _IMP_core.delete_TableRefiner
11314
11315 def __str__(self):
11316 r"""__str__(TableRefiner self) -> std::string"""
11317 return _IMP_core.TableRefiner___str__(self)
11318
11319 def __repr__(self):
11320 r"""__repr__(TableRefiner self) -> std::string"""
11321 return _IMP_core.TableRefiner___repr__(self)
11322
11323 @staticmethod
11324 def get_from(o):
11325 return _object_cast_to_TableRefiner(o)
11326
11327
11328# Register TableRefiner in _IMP_core:
11329_IMP_core.TableRefiner_swigregister(TableRefiner)
11330LOWER = _IMP_core.LOWER
11331
11332BOTH = _IMP_core.BOTH
11333
11334UPPER = _IMP_core.UPPER
11335
11336class MCCGSampler(IMP.Sampler):
11337 r"""Proxy of C++ IMP::core::MCCGSampler class."""
11338
11339 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11340
11341 def __init__(self, *args):
11342 r"""__init__(MCCGSampler self, Model m, std::string name="MCCG Sampler %1%") -> MCCGSampler"""
11343 _IMP_core.MCCGSampler_swiginit(self, _IMP_core.new_MCCGSampler(*args))
11344
11345 def set_bounding_box(self, bb):
11346 r"""set_bounding_box(MCCGSampler self, BoundingBox3D bb)"""
11347 return _IMP_core.MCCGSampler_set_bounding_box(self, bb)
11348
11349 def set_number_of_attempts(self, att):
11350 r"""set_number_of_attempts(MCCGSampler self, unsigned int att)"""
11351 return _IMP_core.MCCGSampler_set_number_of_attempts(self, att)
11352
11353 def set_number_of_monte_carlo_steps(self, cg):
11354 r"""set_number_of_monte_carlo_steps(MCCGSampler self, unsigned int cg)"""
11355 return _IMP_core.MCCGSampler_set_number_of_monte_carlo_steps(self, cg)
11356
11357 def set_number_of_conjugate_gradient_steps(self, cg):
11358 r"""set_number_of_conjugate_gradient_steps(MCCGSampler self, unsigned int cg)"""
11359 return _IMP_core.MCCGSampler_set_number_of_conjugate_gradient_steps(self, cg)
11360
11361 def set_max_monte_carlo_step_size(self, *args):
11362 r"""
11363 set_max_monte_carlo_step_size(MCCGSampler self, double d)
11364 set_max_monte_carlo_step_size(MCCGSampler self, FloatKey k, double d)
11365 """
11366 return _IMP_core.MCCGSampler_set_max_monte_carlo_step_size(self, *args)
11367
11368 def set_is_refining(self, tf):
11369 r"""set_is_refining(MCCGSampler self, bool tf)"""
11370 return _IMP_core.MCCGSampler_set_is_refining(self, tf)
11371
11372 def set_local_optimizer(self, opt):
11373 r"""set_local_optimizer(MCCGSampler self, Optimizer opt)"""
11374 return _IMP_core.MCCGSampler_set_local_optimizer(self, opt)
11375
11376 def set_save_rejected_configurations(self, tf):
11377 r"""set_save_rejected_configurations(MCCGSampler self, bool tf)"""
11378 return _IMP_core.MCCGSampler_set_save_rejected_configurations(self, tf)
11379
11380 def get_rejected_configurations(self):
11381 r"""get_rejected_configurations(MCCGSampler self) -> ConfigurationSet"""
11382 return _IMP_core.MCCGSampler_get_rejected_configurations(self)
11383 def __get_optimizer_states(self): return IMP._list_util.VarList(getdimfunc=self.get_number_of_optimizer_states, getfunc=self.get_optimizer_state, erasefunc=self.erase_optimizer_state, appendfunc=self.add_optimizer_state, extendfunc=self.add_optimizer_states, clearfunc=self.clear_optimizer_states, indexfunc=self._python_index_optimizer_state)
11384 def __set_optimizer_states(self, obj): IMP._list_util.set_varlist(self.optimizer_states, obj)
11385 def __del_optimizer_states(self): IMP._list_util.del_varlist(self.optimizer_states)
11386 optimizer_states = property(__get_optimizer_states, __set_optimizer_states, __del_optimizer_states, doc="List of ##ucnames")
11387
11388 def remove_optimizer_state(self, d):
11389 r"""remove_optimizer_state(MCCGSampler self, OptimizerState d)"""
11390 return _IMP_core.MCCGSampler_remove_optimizer_state(self, d)
11391
11392 def _python_index_optimizer_state(self, d, start, stop):
11393 r"""_python_index_optimizer_state(MCCGSampler self, OptimizerState d, unsigned int start, unsigned int stop) -> unsigned int"""
11394 return _IMP_core.MCCGSampler__python_index_optimizer_state(self, d, start, stop)
11395
11396 def remove_optimizer_states(self, d):
11397 r"""remove_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & d)"""
11398 return _IMP_core.MCCGSampler_remove_optimizer_states(self, d)
11399
11400 def set_optimizer_states(self, ps):
11401 r"""set_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & ps)"""
11402 return _IMP_core.MCCGSampler_set_optimizer_states(self, ps)
11403
11404 def set_optimizer_states_order(self, objs):
11405 r"""set_optimizer_states_order(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11406 return _IMP_core.MCCGSampler_set_optimizer_states_order(self, objs)
11407
11408 def add_optimizer_state(self, obj):
11409 r"""add_optimizer_state(MCCGSampler self, OptimizerState obj) -> unsigned int"""
11410 return _IMP_core.MCCGSampler_add_optimizer_state(self, obj)
11411
11412 def add_optimizer_states(self, objs):
11413 r"""add_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11414 return _IMP_core.MCCGSampler_add_optimizer_states(self, objs)
11415
11416 def clear_optimizer_states(self):
11417 r"""clear_optimizer_states(MCCGSampler self)"""
11418 return _IMP_core.MCCGSampler_clear_optimizer_states(self)
11419
11420 def get_number_of_optimizer_states(self):
11421 r"""get_number_of_optimizer_states(MCCGSampler self) -> unsigned int"""
11422 return _IMP_core.MCCGSampler_get_number_of_optimizer_states(self)
11423
11424 def get_has_optimizer_states(self):
11425 r"""get_has_optimizer_states(MCCGSampler self) -> bool"""
11426 return _IMP_core.MCCGSampler_get_has_optimizer_states(self)
11427
11428 def get_optimizer_state(self, i):
11429 r"""get_optimizer_state(MCCGSampler self, unsigned int i) -> OptimizerState"""
11430 return _IMP_core.MCCGSampler_get_optimizer_state(self, i)
11431
11432 def get_optimizer_states(self):
11433 r"""get_optimizer_states(MCCGSampler self) -> IMP::OptimizerStates"""
11434 return _IMP_core.MCCGSampler_get_optimizer_states(self)
11435
11436 def erase_optimizer_state(self, i):
11437 r"""erase_optimizer_state(MCCGSampler self, unsigned int i)"""
11438 return _IMP_core.MCCGSampler_erase_optimizer_state(self, i)
11439
11440 def reserve_optimizer_states(self, sz):
11441 r"""reserve_optimizer_states(MCCGSampler self, unsigned int sz)"""
11442 return _IMP_core.MCCGSampler_reserve_optimizer_states(self, sz)
11443
11444 def do_sample(self):
11445 r"""do_sample(MCCGSampler self) -> ConfigurationSet"""
11446 return _IMP_core.MCCGSampler_do_sample(self)
11447
11448 def get_version_info(self):
11449 r"""get_version_info(MCCGSampler self) -> VersionInfo"""
11450 return _IMP_core.MCCGSampler_get_version_info(self)
11451 __swig_destroy__ = _IMP_core.delete_MCCGSampler
11452
11453 def __str__(self):
11454 r"""__str__(MCCGSampler self) -> std::string"""
11455 return _IMP_core.MCCGSampler___str__(self)
11456
11457 def __repr__(self):
11458 r"""__repr__(MCCGSampler self) -> std::string"""
11459 return _IMP_core.MCCGSampler___repr__(self)
11460
11461 @staticmethod
11462 def get_from(o):
11463 return _object_cast_to_MCCGSampler(o)
11464
11465
11466# Register MCCGSampler in _IMP_core:
11467_IMP_core.MCCGSampler_swigregister(MCCGSampler)
11468class MinimumRestraint(IMP.Restraint):
11469 r"""Proxy of C++ IMP::core::MinimumRestraint class."""
11470
11471 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11472
11473 def __init__(self, *args):
11474 r"""__init__(MinimumRestraint self, unsigned int num, IMP::Restraints const & rs=IMP::Restraints(), std::string name="MinimumRestraint %1%") -> MinimumRestraint"""
11475 _IMP_core.MinimumRestraint_swiginit(self, _IMP_core.new_MinimumRestraint(*args))
11476
11477 def do_get_inputs(self):
11478 r"""do_get_inputs(MinimumRestraint self) -> IMP::ModelObjectsTemp"""
11479 return _IMP_core.MinimumRestraint_do_get_inputs(self)
11480
11481 def get_version_info(self):
11482 r"""get_version_info(MinimumRestraint self) -> VersionInfo"""
11483 return _IMP_core.MinimumRestraint_get_version_info(self)
11484 __swig_destroy__ = _IMP_core.delete_MinimumRestraint
11485 def __get_restraints(self): return IMP._list_util.VarList(getdimfunc=self.get_number_of_restraints, getfunc=self.get_restraint, erasefunc=self.erase_restraint, appendfunc=self.add_restraint, extendfunc=self.add_restraints, clearfunc=self.clear_restraints, indexfunc=self._python_index_restraint)
11486 def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
11487 def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
11488 restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##ucnames")
11489
11490 def remove_restraint(self, d):
11491 r"""remove_restraint(MinimumRestraint self, Restraint d)"""
11492 return _IMP_core.MinimumRestraint_remove_restraint(self, d)
11493
11494 def _python_index_restraint(self, d, start, stop):
11495 r"""_python_index_restraint(MinimumRestraint self, Restraint d, unsigned int start, unsigned int stop) -> unsigned int"""
11496 return _IMP_core.MinimumRestraint__python_index_restraint(self, d, start, stop)
11497
11498 def remove_restraints(self, d):
11499 r"""remove_restraints(MinimumRestraint self, IMP::Restraints const & d)"""
11500 return _IMP_core.MinimumRestraint_remove_restraints(self, d)
11501
11502 def set_restraints(self, ps):
11503 r"""set_restraints(MinimumRestraint self, IMP::Restraints const & ps)"""
11504 return _IMP_core.MinimumRestraint_set_restraints(self, ps)
11505
11506 def set_restraints_order(self, objs):
11507 r"""set_restraints_order(MinimumRestraint self, IMP::Restraints const & objs)"""
11508 return _IMP_core.MinimumRestraint_set_restraints_order(self, objs)
11509
11510 def add_restraint(self, obj):
11511 r"""add_restraint(MinimumRestraint self, Restraint obj) -> unsigned int"""
11512 return _IMP_core.MinimumRestraint_add_restraint(self, obj)
11513
11514 def add_restraints(self, objs):
11515 r"""add_restraints(MinimumRestraint self, IMP::Restraints const & objs)"""
11516 return _IMP_core.MinimumRestraint_add_restraints(self, objs)
11517
11518 def clear_restraints(self):
11519 r"""clear_restraints(MinimumRestraint self)"""
11520 return _IMP_core.MinimumRestraint_clear_restraints(self)
11521
11522 def get_number_of_restraints(self):
11523 r"""get_number_of_restraints(MinimumRestraint self) -> unsigned int"""
11524 return _IMP_core.MinimumRestraint_get_number_of_restraints(self)
11525
11526 def get_has_restraints(self):
11527 r"""get_has_restraints(MinimumRestraint self) -> bool"""
11528 return _IMP_core.MinimumRestraint_get_has_restraints(self)
11529
11530 def get_restraint(self, i):
11531 r"""get_restraint(MinimumRestraint self, unsigned int i) -> Restraint"""
11532 return _IMP_core.MinimumRestraint_get_restraint(self, i)
11533
11534 def get_restraints(self):
11535 r"""get_restraints(MinimumRestraint self) -> IMP::Restraints"""
11536 return _IMP_core.MinimumRestraint_get_restraints(self)
11537
11538 def erase_restraint(self, i):
11539 r"""erase_restraint(MinimumRestraint self, unsigned int i)"""
11540 return _IMP_core.MinimumRestraint_erase_restraint(self, i)
11541
11542 def reserve_restraints(self, sz):
11543 r"""reserve_restraints(MinimumRestraint self, unsigned int sz)"""
11544 return _IMP_core.MinimumRestraint_reserve_restraints(self, sz)
11545
11546 def __str__(self):
11547 r"""__str__(MinimumRestraint self) -> std::string"""
11548 return _IMP_core.MinimumRestraint___str__(self)
11549
11550 def __repr__(self):
11551 r"""__repr__(MinimumRestraint self) -> std::string"""
11552 return _IMP_core.MinimumRestraint___repr__(self)
11553
11554 @staticmethod
11555 def get_from(o):
11556 return _object_cast_to_MinimumRestraint(o)
11557
11558
11559# Register MinimumRestraint in _IMP_core:
11560_IMP_core.MinimumRestraint_swigregister(MinimumRestraint)
11561class Gaussian(RigidBody):
11562 r"""Proxy of C++ IMP::core::Gaussian class."""
11563
11564 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11565
11566 def __init__(self, *args):
11567 r"""
11568 __init__(Gaussian self) -> Gaussian
11569 __init__(Gaussian self, Model m, ParticleIndex id) -> Gaussian
11570 __init__(Gaussian self, _ParticleAdaptor d) -> Gaussian
11571 """
11572 _IMP_core.Gaussian_swiginit(self, _IMP_core.new_Gaussian(*args))
11573
11574 def show(self, *args):
11575 r"""show(Gaussian self, _ostream out=std::cout)"""
11576 return _IMP_core.Gaussian_show(self, *args)
11577
11578 @staticmethod
11579 def setup_particle(*args):
11580 r"""
11581 setup_particle(Model m, ParticleIndex pi) -> Gaussian
11582 setup_particle(_ParticleAdaptor pa) -> Gaussian
11583 setup_particle(Model m, ParticleIndex pi, Gaussian3D g) -> Gaussian
11584 setup_particle(_ParticleAdaptor pa, Gaussian3D g) -> Gaussian
11585 """
11586 return _IMP_core.Gaussian_setup_particle(*args)
11587
11588 @staticmethod
11589 def get_local_covariance_key():
11590 r"""get_local_covariance_key() -> ObjectKey"""
11591 return _IMP_core.Gaussian_get_local_covariance_key()
11592
11593 @staticmethod
11594 def get_global_covariance_key():
11595 r"""get_global_covariance_key() -> ObjectKey"""
11596 return _IMP_core.Gaussian_get_global_covariance_key()
11597
11598 @staticmethod
11599 def get_is_setup(*args):
11600 r"""
11601 get_is_setup(_ParticleAdaptor p) -> bool
11602 get_is_setup(Model m, ParticleIndex pi) -> bool
11603 """
11604 return _IMP_core.Gaussian_get_is_setup(*args)
11605
11606 def get_local_covariance(self):
11607 r"""get_local_covariance(Gaussian self) -> Eigen::Matrix3d"""
11608 return _IMP_core.Gaussian_get_local_covariance(self)
11609
11610 def get_variances(self):
11611 r"""get_variances(Gaussian self) -> Vector3D"""
11612 return _IMP_core.Gaussian_get_variances(self)
11613
11614 def get_global_covariance(self):
11615 r"""get_global_covariance(Gaussian self) -> Eigen::Matrix3d"""
11616 return _IMP_core.Gaussian_get_global_covariance(self)
11617
11618 def get_gaussian(self):
11619 r"""get_gaussian(Gaussian self) -> Gaussian3D"""
11620 return _IMP_core.Gaussian_get_gaussian(self)
11621
11622 def set_gaussian(self, g):
11623 r"""set_gaussian(Gaussian self, Gaussian3D g)"""
11624 return _IMP_core.Gaussian_set_gaussian(self, g)
11625
11626 def set_local_covariance(self, covar):
11627 r"""set_local_covariance(Gaussian self, Eigen::Vector3d const covar)"""
11628 return _IMP_core.Gaussian_set_local_covariance(self, covar)
11629
11630 def set_variances(self, v):
11631 r"""set_variances(Gaussian self, Vector3D v)"""
11632 return _IMP_core.Gaussian_set_variances(self, v)
11633
11634 def set_global_covariance(self, covar):
11635 r"""set_global_covariance(Gaussian self, Eigen::Matrix3d covar)"""
11636 return _IMP_core.Gaussian_set_global_covariance(self, covar)
11637
11638 def update_global_covariance(self):
11639 r"""update_global_covariance(Gaussian self)"""
11640 return _IMP_core.Gaussian_update_global_covariance(self)
11641
11642 def add_attribute(self, *args):
11643 r"""
11644 add_attribute(Gaussian self, FloatKey k, IMP::Float v, bool opt)
11645 add_attribute(Gaussian self, FloatKey a0, IMP::Float a1)
11646 add_attribute(Gaussian self, IntKey a0, IMP::Int a1)
11647 add_attribute(Gaussian self, FloatsKey a0, IMP::Floats a1)
11648 add_attribute(Gaussian self, IntsKey a0, IMP::Ints a1)
11649 add_attribute(Gaussian self, StringKey a0, IMP::String a1)
11650 add_attribute(Gaussian self, ParticleIndexKey a0, Particle a1)
11651 add_attribute(Gaussian self, ObjectKey a0, Object a1)
11652 add_attribute(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11653 add_attribute(Gaussian self, SparseIntKey a0, IMP::Int a1)
11654 add_attribute(Gaussian self, SparseStringKey a0, IMP::String a1)
11655 add_attribute(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11656 """
11657 return _IMP_core.Gaussian_add_attribute(self, *args)
11658
11659 def get_value(self, *args):
11660 r"""
11661 get_value(Gaussian self, FloatKey a0) -> IMP::Float
11662 get_value(Gaussian self, IntKey a0) -> IMP::Int
11663 get_value(Gaussian self, FloatsKey a0) -> IMP::Floats
11664 get_value(Gaussian self, IntsKey a0) -> IMP::Ints
11665 get_value(Gaussian self, StringKey a0) -> IMP::String
11666 get_value(Gaussian self, ParticleIndexKey a0) -> Particle
11667 get_value(Gaussian self, ObjectKey a0) -> Object
11668 get_value(Gaussian self, SparseFloatKey a0) -> IMP::Float
11669 get_value(Gaussian self, SparseIntKey a0) -> IMP::Int
11670 get_value(Gaussian self, SparseStringKey a0) -> IMP::String
11671 get_value(Gaussian self, SparseParticleIndexKey a0) -> ParticleIndex
11672 """
11673 return _IMP_core.Gaussian_get_value(self, *args)
11674
11675 def set_value(self, *args):
11676 r"""
11677 set_value(Gaussian self, FloatKey a0, IMP::Float a1)
11678 set_value(Gaussian self, IntKey a0, IMP::Int a1)
11679 set_value(Gaussian self, FloatsKey a0, IMP::Floats a1)
11680 set_value(Gaussian self, IntsKey a0, IMP::Ints a1)
11681 set_value(Gaussian self, StringKey a0, IMP::String a1)
11682 set_value(Gaussian self, ParticleIndexKey a0, Particle a1)
11683 set_value(Gaussian self, ObjectKey a0, Object a1)
11684 set_value(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11685 set_value(Gaussian self, SparseIntKey a0, IMP::Int a1)
11686 set_value(Gaussian self, SparseStringKey a0, IMP::String a1)
11687 set_value(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11688 """
11689 return _IMP_core.Gaussian_set_value(self, *args)
11690
11691 def remove_attribute(self, *args):
11692 r"""
11693 remove_attribute(Gaussian self, FloatKey a0)
11694 remove_attribute(Gaussian self, IntKey a0)
11695 remove_attribute(Gaussian self, FloatsKey a0)
11696 remove_attribute(Gaussian self, IntsKey a0)
11697 remove_attribute(Gaussian self, StringKey a0)
11698 remove_attribute(Gaussian self, ParticleIndexKey a0)
11699 remove_attribute(Gaussian self, ObjectKey a0)
11700 remove_attribute(Gaussian self, SparseFloatKey a0)
11701 remove_attribute(Gaussian self, SparseIntKey a0)
11702 remove_attribute(Gaussian self, SparseStringKey a0)
11703 remove_attribute(Gaussian self, SparseParticleIndexKey a0)
11704 """
11705 return _IMP_core.Gaussian_remove_attribute(self, *args)
11706
11707 def has_attribute(self, *args):
11708 r"""
11709 has_attribute(Gaussian self, FloatKey a0) -> bool
11710 has_attribute(Gaussian self, IntKey a0) -> bool
11711 has_attribute(Gaussian self, FloatsKey a0) -> bool
11712 has_attribute(Gaussian self, IntsKey a0) -> bool
11713 has_attribute(Gaussian self, StringKey a0) -> bool
11714 has_attribute(Gaussian self, ParticleIndexKey a0) -> bool
11715 has_attribute(Gaussian self, ObjectKey a0) -> bool
11716 has_attribute(Gaussian self, SparseFloatKey a0) -> bool
11717 has_attribute(Gaussian self, SparseIntKey a0) -> bool
11718 has_attribute(Gaussian self, SparseStringKey a0) -> bool
11719 has_attribute(Gaussian self, SparseParticleIndexKey a0) -> bool
11720 """
11721 return _IMP_core.Gaussian_has_attribute(self, *args)
11722
11723 def get_derivative(self, a0):
11724 r"""get_derivative(Gaussian self, FloatKey a0) -> double"""
11725 return _IMP_core.Gaussian_get_derivative(self, a0)
11726
11727 def get_name(self):
11728 r"""get_name(Gaussian self) -> std::string"""
11729 return _IMP_core.Gaussian_get_name(self)
11730
11731 def clear_caches(self):
11732 r"""clear_caches(Gaussian self)"""
11733 return _IMP_core.Gaussian_clear_caches(self)
11734
11735 def set_name(self, a0):
11736 r"""set_name(Gaussian self, std::string a0)"""
11737 return _IMP_core.Gaussian_set_name(self, a0)
11738
11739 def set_check_level(self, a0):
11740 r"""set_check_level(Gaussian self, IMP::CheckLevel a0)"""
11741 return _IMP_core.Gaussian_set_check_level(self, a0)
11742
11743 def add_to_derivative(self, a0, a1, a2):
11744 r"""add_to_derivative(Gaussian self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
11745 return _IMP_core.Gaussian_add_to_derivative(self, a0, a1, a2)
11746
11747 def set_is_optimized(self, a0, a1):
11748 r"""set_is_optimized(Gaussian self, FloatKey a0, bool a1)"""
11749 return _IMP_core.Gaussian_set_is_optimized(self, a0, a1)
11750
11751 def get_is_optimized(self, a0):
11752 r"""get_is_optimized(Gaussian self, FloatKey a0) -> bool"""
11753 return _IMP_core.Gaussian_get_is_optimized(self, a0)
11754
11755 def get_check_level(self):
11756 r"""get_check_level(Gaussian self) -> IMP::CheckLevel"""
11757 return _IMP_core.Gaussian_get_check_level(self)
11758
11759 def __eq__(self, *args):
11760 r"""
11761 __eq__(Gaussian self, Gaussian o) -> bool
11762 __eq__(Gaussian self, Particle d) -> bool
11763 """
11764 return _IMP_core.Gaussian___eq__(self, *args)
11765
11766 def __ne__(self, *args):
11767 r"""
11768 __ne__(Gaussian self, Gaussian o) -> bool
11769 __ne__(Gaussian self, Particle d) -> bool
11770 """
11771 return _IMP_core.Gaussian___ne__(self, *args)
11772
11773 def __le__(self, *args):
11774 r"""
11775 __le__(Gaussian self, Gaussian o) -> bool
11776 __le__(Gaussian self, Particle d) -> bool
11777 """
11778 return _IMP_core.Gaussian___le__(self, *args)
11779
11780 def __lt__(self, *args):
11781 r"""
11782 __lt__(Gaussian self, Gaussian o) -> bool
11783 __lt__(Gaussian self, Particle d) -> bool
11784 """
11785 return _IMP_core.Gaussian___lt__(self, *args)
11786
11787 def __ge__(self, *args):
11788 r"""
11789 __ge__(Gaussian self, Gaussian o) -> bool
11790 __ge__(Gaussian self, Particle d) -> bool
11791 """
11792 return _IMP_core.Gaussian___ge__(self, *args)
11793
11794 def __gt__(self, *args):
11795 r"""
11796 __gt__(Gaussian self, Gaussian o) -> bool
11797 __gt__(Gaussian self, Particle d) -> bool
11798 """
11799 return _IMP_core.Gaussian___gt__(self, *args)
11800
11801 def __hash__(self):
11802 r"""__hash__(Gaussian self) -> std::size_t"""
11803 return _IMP_core.Gaussian___hash__(self)
11804
11805 def __str__(self):
11806 r"""__str__(Gaussian self) -> std::string"""
11807 return _IMP_core.Gaussian___str__(self)
11808
11809 def __repr__(self):
11810 r"""__repr__(Gaussian self) -> std::string"""
11811 return _IMP_core.Gaussian___repr__(self)
11812
11813 def _get_as_binary(self):
11814 r"""_get_as_binary(Gaussian self) -> PyObject *"""
11815 return _IMP_core.Gaussian__get_as_binary(self)
11816
11817 def _set_from_binary(self, p):
11818 r"""_set_from_binary(Gaussian self, PyObject * p)"""
11819 return _IMP_core.Gaussian__set_from_binary(self, p)
11820
11821 def __getstate__(self):
11822 p = self._get_as_binary()
11823 if len(self.__dict__) > 1:
11824 d = self.__dict__.copy()
11825 del d['this']
11826 p = (d, p)
11827 return p
11828
11829 def __setstate__(self, p):
11830 if not hasattr(self, 'this'):
11831 self.__init__()
11832 if isinstance(p, tuple):
11833 d, p = p
11834 self.__dict__.update(d)
11835 return self._set_from_binary(p)
11836
11837 __swig_destroy__ = _IMP_core.delete_Gaussian
11838
11839# Register Gaussian in _IMP_core:
11840_IMP_core.Gaussian_swigregister(Gaussian)
11841class PairRestraint(IMP.Restraint):
11842 r"""Proxy of C++ IMP::core::PairRestraint class."""
11843
11844 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11845
11846 def __init__(self, *args):
11847 r"""
11848 __init__(PairRestraint self, Model m, PairScore ss, IMP::ParticleIndexPair const & vt, std::string name="PairRestraint %1%") -> PairRestraint
11849 __init__(PairRestraint self) -> PairRestraint
11850 """
11851 _IMP_core.PairRestraint_swiginit(self, _IMP_core.new_PairRestraint(*args))
11852
11853 def get_score_object(self):
11854 r"""get_score_object(PairRestraint self) -> PairScore"""
11855 return _IMP_core.PairRestraint_get_score_object(self)
11856
11857 def get_index(self):
11858 r"""get_index(PairRestraint self) -> IMP::PairScore::IndexArgument"""
11859 return _IMP_core.PairRestraint_get_index(self)
11860
11861 def get_version_info(self):
11862 r"""get_version_info(PairRestraint self) -> VersionInfo"""
11863 return _IMP_core.PairRestraint_get_version_info(self)
11864 __swig_destroy__ = _IMP_core.delete_PairRestraint
11865
11866 def __str__(self):
11867 r"""__str__(PairRestraint self) -> std::string"""
11868 return _IMP_core.PairRestraint___str__(self)
11869
11870 def __repr__(self):
11871 r"""__repr__(PairRestraint self) -> std::string"""
11872 return _IMP_core.PairRestraint___repr__(self)
11873
11874 @staticmethod
11875 def get_from(o):
11876 return _object_cast_to_PairRestraint(o)
11877
11878
11879 def _get_as_binary(self):
11880 r"""_get_as_binary(PairRestraint self) -> PyObject *"""
11881 return _IMP_core.PairRestraint__get_as_binary(self)
11882
11883 def _set_from_binary(self, p):
11884 r"""_set_from_binary(PairRestraint self, PyObject * p)"""
11885 return _IMP_core.PairRestraint__set_from_binary(self, p)
11886
11887 def __getstate__(self):
11888 p = self._get_as_binary()
11889 if len(self.__dict__) > 1:
11890 d = self.__dict__.copy()
11891 del d['this']
11892 p = (d, p)
11893 return p
11894
11895 def __setstate__(self, p):
11896 if not hasattr(self, 'this'):
11897 self.__init__()
11898 if isinstance(p, tuple):
11899 d, p = p
11900 self.__dict__.update(d)
11901 return self._set_from_binary(p)
11902
11903
11904 def _get_jax(self, space):
11905 from . import _jax_util
11906 return _jax_util._get_jax_restraint(self, space)
11907
11908 @classmethod
11909 def _get_jax_multiple(cls, restraints, space):
11910 from . import _jax_util
11911 return _jax_util._get_jax_multi_restraint(cls, restraints, space)
11912
11913
11914# Register PairRestraint in _IMP_core:
11915_IMP_core.PairRestraint_swigregister(PairRestraint)
11916class SingletonRestraint(IMP.Restraint):
11917 r"""Proxy of C++ IMP::core::SingletonRestraint class."""
11918
11919 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11920
11921 def __init__(self, *args):
11922 r"""
11923 __init__(SingletonRestraint self, Model m, SingletonScore ss, ParticleIndex vt, std::string name="SingletonRestraint %1%") -> SingletonRestraint
11924 __init__(SingletonRestraint self) -> SingletonRestraint
11925 """
11926 _IMP_core.SingletonRestraint_swiginit(self, _IMP_core.new_SingletonRestraint(*args))
11927
11928 def get_score_object(self):
11929 r"""get_score_object(SingletonRestraint self) -> SingletonScore"""
11930 return _IMP_core.SingletonRestraint_get_score_object(self)
11931
11932 def get_index(self):
11933 r"""get_index(SingletonRestraint self) -> ParticleIndex"""
11934 return _IMP_core.SingletonRestraint_get_index(self)
11935
11936 def get_version_info(self):
11937 r"""get_version_info(SingletonRestraint self) -> VersionInfo"""
11938 return _IMP_core.SingletonRestraint_get_version_info(self)
11939 __swig_destroy__ = _IMP_core.delete_SingletonRestraint
11940
11941 def __str__(self):
11942 r"""__str__(SingletonRestraint self) -> std::string"""
11943 return _IMP_core.SingletonRestraint___str__(self)
11944
11945 def __repr__(self):
11946 r"""__repr__(SingletonRestraint self) -> std::string"""
11947 return _IMP_core.SingletonRestraint___repr__(self)
11948
11949 @staticmethod
11950 def get_from(o):
11951 return _object_cast_to_SingletonRestraint(o)
11952
11953
11954 def _get_as_binary(self):
11955 r"""_get_as_binary(SingletonRestraint self) -> PyObject *"""
11956 return _IMP_core.SingletonRestraint__get_as_binary(self)
11957
11958 def _set_from_binary(self, p):
11959 r"""_set_from_binary(SingletonRestraint self, PyObject * p)"""
11960 return _IMP_core.SingletonRestraint__set_from_binary(self, p)
11961
11962 def __getstate__(self):
11963 p = self._get_as_binary()
11964 if len(self.__dict__) > 1:
11965 d = self.__dict__.copy()
11966 del d['this']
11967 p = (d, p)
11968 return p
11969
11970 def __setstate__(self, p):
11971 if not hasattr(self, 'this'):
11972 self.__init__()
11973 if isinstance(p, tuple):
11974 d, p = p
11975 self.__dict__.update(d)
11976 return self._set_from_binary(p)
11977
11978
11979 def _get_jax(self, space):
11980 from . import _jax_util
11981 return _jax_util._get_jax_restraint(self, space)
11982
11983 @classmethod
11984 def _get_jax_multiple(cls, restraints, space):
11985 from . import _jax_util
11986 return _jax_util._get_jax_multi_restraint(cls, restraints, space)
11987
11988
11989# Register SingletonRestraint in _IMP_core:
11990_IMP_core.SingletonRestraint_swigregister(SingletonRestraint)
11991class TripletRestraint(IMP.Restraint):
11992 r"""Proxy of C++ IMP::core::TripletRestraint class."""
11993
11994 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11995
11996 def __init__(self, *args):
11997 r"""
11998 __init__(TripletRestraint self, Model m, TripletScore ss, IMP::ParticleIndexTriplet const & vt, std::string name="TripletRestraint %1%") -> TripletRestraint
11999 __init__(TripletRestraint self) -> TripletRestraint
12000 """
12001 _IMP_core.TripletRestraint_swiginit(self, _IMP_core.new_TripletRestraint(*args))
12002
12003 def get_score_object(self):
12004 r"""get_score_object(TripletRestraint self) -> TripletScore"""
12005 return _IMP_core.TripletRestraint_get_score_object(self)
12006
12007 def get_index(self):
12008 r"""get_index(TripletRestraint self) -> IMP::TripletScore::IndexArgument"""
12009 return _IMP_core.TripletRestraint_get_index(self)
12010
12011 def get_version_info(self):
12012 r"""get_version_info(TripletRestraint self) -> VersionInfo"""
12013 return _IMP_core.TripletRestraint_get_version_info(self)
12014 __swig_destroy__ = _IMP_core.delete_TripletRestraint
12015
12016 def __str__(self):
12017 r"""__str__(TripletRestraint self) -> std::string"""
12018 return _IMP_core.TripletRestraint___str__(self)
12019
12020 def __repr__(self):
12021 r"""__repr__(TripletRestraint self) -> std::string"""
12022 return _IMP_core.TripletRestraint___repr__(self)
12023
12024 @staticmethod
12025 def get_from(o):
12026 return _object_cast_to_TripletRestraint(o)
12027
12028
12029 def _get_as_binary(self):
12030 r"""_get_as_binary(TripletRestraint self) -> PyObject *"""
12031 return _IMP_core.TripletRestraint__get_as_binary(self)
12032
12033 def _set_from_binary(self, p):
12034 r"""_set_from_binary(TripletRestraint self, PyObject * p)"""
12035 return _IMP_core.TripletRestraint__set_from_binary(self, p)
12036
12037 def __getstate__(self):
12038 p = self._get_as_binary()
12039 if len(self.__dict__) > 1:
12040 d = self.__dict__.copy()
12041 del d['this']
12042 p = (d, p)
12043 return p
12044
12045 def __setstate__(self, p):
12046 if not hasattr(self, 'this'):
12047 self.__init__()
12048 if isinstance(p, tuple):
12049 d, p = p
12050 self.__dict__.update(d)
12051 return self._set_from_binary(p)
12052
12053
12054# Register TripletRestraint in _IMP_core:
12055_IMP_core.TripletRestraint_swigregister(TripletRestraint)
12056class QuadRestraint(IMP.Restraint):
12057 r"""Proxy of C++ IMP::core::QuadRestraint class."""
12058
12059 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12060
12061 def __init__(self, *args):
12062 r"""
12063 __init__(QuadRestraint self, Model m, QuadScore ss, IMP::ParticleIndexQuad const & vt, std::string name="QuadRestraint %1%") -> QuadRestraint
12064 __init__(QuadRestraint self) -> QuadRestraint
12065 """
12066 _IMP_core.QuadRestraint_swiginit(self, _IMP_core.new_QuadRestraint(*args))
12067
12068 def get_score_object(self):
12069 r"""get_score_object(QuadRestraint self) -> QuadScore"""
12070 return _IMP_core.QuadRestraint_get_score_object(self)
12071
12072 def get_index(self):
12073 r"""get_index(QuadRestraint self) -> IMP::QuadScore::IndexArgument"""
12074 return _IMP_core.QuadRestraint_get_index(self)
12075
12076 def get_version_info(self):
12077 r"""get_version_info(QuadRestraint self) -> VersionInfo"""
12078 return _IMP_core.QuadRestraint_get_version_info(self)
12079 __swig_destroy__ = _IMP_core.delete_QuadRestraint
12080
12081 def __str__(self):
12082 r"""__str__(QuadRestraint self) -> std::string"""
12083 return _IMP_core.QuadRestraint___str__(self)
12084
12085 def __repr__(self):
12086 r"""__repr__(QuadRestraint self) -> std::string"""
12087 return _IMP_core.QuadRestraint___repr__(self)
12088
12089 @staticmethod
12090 def get_from(o):
12091 return _object_cast_to_QuadRestraint(o)
12092
12093
12094 def _get_as_binary(self):
12095 r"""_get_as_binary(QuadRestraint self) -> PyObject *"""
12096 return _IMP_core.QuadRestraint__get_as_binary(self)
12097
12098 def _set_from_binary(self, p):
12099 r"""_set_from_binary(QuadRestraint self, PyObject * p)"""
12100 return _IMP_core.QuadRestraint__set_from_binary(self, p)
12101
12102 def __getstate__(self):
12103 p = self._get_as_binary()
12104 if len(self.__dict__) > 1:
12105 d = self.__dict__.copy()
12106 del d['this']
12107 p = (d, p)
12108 return p
12109
12110 def __setstate__(self, p):
12111 if not hasattr(self, 'this'):
12112 self.__init__()
12113 if isinstance(p, tuple):
12114 d, p = p
12115 self.__dict__.update(d)
12116 return self._set_from_binary(p)
12117
12118
12119# Register QuadRestraint in _IMP_core:
12120_IMP_core.QuadRestraint_swigregister(QuadRestraint)
12121class SingletonConstraint(IMP.Constraint):
12122 r"""Proxy of C++ IMP::core::SingletonConstraint class."""
12123
12124 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12125
12126 def __init__(self, *args):
12127 r"""
12128 __init__(SingletonConstraint self, SingletonModifier before, SingletonModifier after, Model m, ParticleIndex vt, std::string name="SingletonConstraint %1%", bool can_skip=False) -> SingletonConstraint
12129 __init__(SingletonConstraint self) -> SingletonConstraint
12130 """
12131 _IMP_core.SingletonConstraint_swiginit(self, _IMP_core.new_SingletonConstraint(*args))
12132
12133 def get_before_modifier(self):
12134 r"""get_before_modifier(SingletonConstraint self) -> SingletonModifier"""
12135 return _IMP_core.SingletonConstraint_get_before_modifier(self)
12136
12137 def get_index(self):
12138 r"""get_index(SingletonConstraint self) -> ParticleIndex"""
12139 return _IMP_core.SingletonConstraint_get_index(self)
12140
12141 def get_version_info(self):
12142 r"""get_version_info(SingletonConstraint self) -> VersionInfo"""
12143 return _IMP_core.SingletonConstraint_get_version_info(self)
12144 __swig_destroy__ = _IMP_core.delete_SingletonConstraint
12145
12146 def __str__(self):
12147 r"""__str__(SingletonConstraint self) -> std::string"""
12148 return _IMP_core.SingletonConstraint___str__(self)
12149
12150 def __repr__(self):
12151 r"""__repr__(SingletonConstraint self) -> std::string"""
12152 return _IMP_core.SingletonConstraint___repr__(self)
12153
12154 @staticmethod
12155 def get_from(o):
12156 return _object_cast_to_SingletonConstraint(o)
12157
12158
12159 def _get_as_binary(self):
12160 r"""_get_as_binary(SingletonConstraint self) -> PyObject *"""
12161 return _IMP_core.SingletonConstraint__get_as_binary(self)
12162
12163 def _set_from_binary(self, p):
12164 r"""_set_from_binary(SingletonConstraint self, PyObject * p)"""
12165 return _IMP_core.SingletonConstraint__set_from_binary(self, p)
12166
12167 def __getstate__(self):
12168 p = self._get_as_binary()
12169 if len(self.__dict__) > 1:
12170 d = self.__dict__.copy()
12171 del d['this']
12172 p = (d, p)
12173 return p
12174
12175 def __setstate__(self, p):
12176 if not hasattr(self, 'this'):
12177 self.__init__()
12178 if isinstance(p, tuple):
12179 d, p = p
12180 self.__dict__.update(d)
12181 return self._set_from_binary(p)
12182
12183
12184 def _get_jax(self):
12185 import jax.numpy as jnp
12186 indexes = jnp.array([self.get_index()])
12187 mod = self.get_before_modifier().get_derived_object()
12188 ji = mod._get_jax(self.get_model(), indexes)
12189 return self._wrap_jax(ji.apply_func, keys=ji._keys)
12190
12191
12192# Register SingletonConstraint in _IMP_core:
12193_IMP_core.SingletonConstraint_swigregister(SingletonConstraint)
12194class PairConstraint(IMP.Constraint):
12195 r"""Proxy of C++ IMP::core::PairConstraint class."""
12196
12197 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12198
12199 def __init__(self, *args):
12200 r"""
12201 __init__(PairConstraint self, PairModifier before, PairModifier after, Model m, IMP::ParticleIndexPair const & vt, std::string name="PairConstraint %1%", bool can_skip=False) -> PairConstraint
12202 __init__(PairConstraint self) -> PairConstraint
12203 """
12204 _IMP_core.PairConstraint_swiginit(self, _IMP_core.new_PairConstraint(*args))
12205
12206 def get_before_modifier(self):
12207 r"""get_before_modifier(PairConstraint self) -> PairModifier"""
12208 return _IMP_core.PairConstraint_get_before_modifier(self)
12209
12210 def get_index(self):
12211 r"""get_index(PairConstraint self) -> IMP::PairModifier::IndexArgument"""
12212 return _IMP_core.PairConstraint_get_index(self)
12213
12214 def get_version_info(self):
12215 r"""get_version_info(PairConstraint self) -> VersionInfo"""
12216 return _IMP_core.PairConstraint_get_version_info(self)
12217 __swig_destroy__ = _IMP_core.delete_PairConstraint
12218
12219 def __str__(self):
12220 r"""__str__(PairConstraint self) -> std::string"""
12221 return _IMP_core.PairConstraint___str__(self)
12222
12223 def __repr__(self):
12224 r"""__repr__(PairConstraint self) -> std::string"""
12225 return _IMP_core.PairConstraint___repr__(self)
12226
12227 @staticmethod
12228 def get_from(o):
12229 return _object_cast_to_PairConstraint(o)
12230
12231
12232 def _get_as_binary(self):
12233 r"""_get_as_binary(PairConstraint self) -> PyObject *"""
12234 return _IMP_core.PairConstraint__get_as_binary(self)
12235
12236 def _set_from_binary(self, p):
12237 r"""_set_from_binary(PairConstraint self, PyObject * p)"""
12238 return _IMP_core.PairConstraint__set_from_binary(self, p)
12239
12240 def __getstate__(self):
12241 p = self._get_as_binary()
12242 if len(self.__dict__) > 1:
12243 d = self.__dict__.copy()
12244 del d['this']
12245 p = (d, p)
12246 return p
12247
12248 def __setstate__(self, p):
12249 if not hasattr(self, 'this'):
12250 self.__init__()
12251 if isinstance(p, tuple):
12252 d, p = p
12253 self.__dict__.update(d)
12254 return self._set_from_binary(p)
12255
12256
12257# Register PairConstraint in _IMP_core:
12258_IMP_core.PairConstraint_swigregister(PairConstraint)
12259class TripletConstraint(IMP.Constraint):
12260 r"""Proxy of C++ IMP::core::TripletConstraint class."""
12261
12262 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12263
12264 def __init__(self, *args):
12265 r"""
12266 __init__(TripletConstraint self, TripletModifier before, TripletModifier after, Model m, IMP::ParticleIndexTriplet const & vt, std::string name="TripletConstraint %1%", bool can_skip=False) -> TripletConstraint
12267 __init__(TripletConstraint self) -> TripletConstraint
12268 """
12269 _IMP_core.TripletConstraint_swiginit(self, _IMP_core.new_TripletConstraint(*args))
12270
12271 def get_before_modifier(self):
12272 r"""get_before_modifier(TripletConstraint self) -> TripletModifier"""
12273 return _IMP_core.TripletConstraint_get_before_modifier(self)
12274
12275 def get_index(self):
12276 r"""get_index(TripletConstraint self) -> IMP::TripletModifier::IndexArgument"""
12277 return _IMP_core.TripletConstraint_get_index(self)
12278
12279 def get_version_info(self):
12280 r"""get_version_info(TripletConstraint self) -> VersionInfo"""
12281 return _IMP_core.TripletConstraint_get_version_info(self)
12282 __swig_destroy__ = _IMP_core.delete_TripletConstraint
12283
12284 def __str__(self):
12285 r"""__str__(TripletConstraint self) -> std::string"""
12286 return _IMP_core.TripletConstraint___str__(self)
12287
12288 def __repr__(self):
12289 r"""__repr__(TripletConstraint self) -> std::string"""
12290 return _IMP_core.TripletConstraint___repr__(self)
12291
12292 @staticmethod
12293 def get_from(o):
12294 return _object_cast_to_TripletConstraint(o)
12295
12296
12297 def _get_as_binary(self):
12298 r"""_get_as_binary(TripletConstraint self) -> PyObject *"""
12299 return _IMP_core.TripletConstraint__get_as_binary(self)
12300
12301 def _set_from_binary(self, p):
12302 r"""_set_from_binary(TripletConstraint self, PyObject * p)"""
12303 return _IMP_core.TripletConstraint__set_from_binary(self, p)
12304
12305 def __getstate__(self):
12306 p = self._get_as_binary()
12307 if len(self.__dict__) > 1:
12308 d = self.__dict__.copy()
12309 del d['this']
12310 p = (d, p)
12311 return p
12312
12313 def __setstate__(self, p):
12314 if not hasattr(self, 'this'):
12315 self.__init__()
12316 if isinstance(p, tuple):
12317 d, p = p
12318 self.__dict__.update(d)
12319 return self._set_from_binary(p)
12320
12321
12322# Register TripletConstraint in _IMP_core:
12323_IMP_core.TripletConstraint_swigregister(TripletConstraint)
12324class QuadConstraint(IMP.Constraint):
12325 r"""Proxy of C++ IMP::core::QuadConstraint class."""
12326
12327 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12328
12329 def __init__(self, *args):
12330 r"""
12331 __init__(QuadConstraint self, QuadModifier before, QuadModifier after, Model m, IMP::ParticleIndexQuad const & vt, std::string name="QuadConstraint %1%", bool can_skip=False) -> QuadConstraint
12332 __init__(QuadConstraint self) -> QuadConstraint
12333 """
12334 _IMP_core.QuadConstraint_swiginit(self, _IMP_core.new_QuadConstraint(*args))
12335
12336 def get_before_modifier(self):
12337 r"""get_before_modifier(QuadConstraint self) -> QuadModifier"""
12338 return _IMP_core.QuadConstraint_get_before_modifier(self)
12339
12340 def get_index(self):
12341 r"""get_index(QuadConstraint self) -> IMP::QuadModifier::IndexArgument"""
12342 return _IMP_core.QuadConstraint_get_index(self)
12343
12344 def get_version_info(self):
12345 r"""get_version_info(QuadConstraint self) -> VersionInfo"""
12346 return _IMP_core.QuadConstraint_get_version_info(self)
12347 __swig_destroy__ = _IMP_core.delete_QuadConstraint
12348
12349 def __str__(self):
12350 r"""__str__(QuadConstraint self) -> std::string"""
12351 return _IMP_core.QuadConstraint___str__(self)
12352
12353 def __repr__(self):
12354 r"""__repr__(QuadConstraint self) -> std::string"""
12355 return _IMP_core.QuadConstraint___repr__(self)
12356
12357 @staticmethod
12358 def get_from(o):
12359 return _object_cast_to_QuadConstraint(o)
12360
12361
12362 def _get_as_binary(self):
12363 r"""_get_as_binary(QuadConstraint self) -> PyObject *"""
12364 return _IMP_core.QuadConstraint__get_as_binary(self)
12365
12366 def _set_from_binary(self, p):
12367 r"""_set_from_binary(QuadConstraint self, PyObject * p)"""
12368 return _IMP_core.QuadConstraint__set_from_binary(self, p)
12369
12370 def __getstate__(self):
12371 p = self._get_as_binary()
12372 if len(self.__dict__) > 1:
12373 d = self.__dict__.copy()
12374 del d['this']
12375 p = (d, p)
12376 return p
12377
12378 def __setstate__(self, p):
12379 if not hasattr(self, 'this'):
12380 self.__init__()
12381 if isinstance(p, tuple):
12382 d, p = p
12383 self.__dict__.update(d)
12384 return self._set_from_binary(p)
12385
12386
12387# Register QuadConstraint in _IMP_core:
12388_IMP_core.QuadConstraint_swigregister(QuadConstraint)
12389class ConstantSingletonPredicate(IMP.SingletonPredicate):
12390 r"""Proxy of C++ IMP::core::ConstantSingletonPredicate class."""
12391
12392 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12393
12394 def __init__(self, *args):
12395 r"""
12396 __init__(ConstantSingletonPredicate self, int v, std::string name="ConstSingletonPredicate%1%") -> ConstantSingletonPredicate
12397 __init__(ConstantSingletonPredicate self) -> ConstantSingletonPredicate
12398 """
12399 _IMP_core.ConstantSingletonPredicate_swiginit(self, _IMP_core.new_ConstantSingletonPredicate(*args))
12400
12401 def do_get_inputs(self, arg2, arg3):
12402 r"""do_get_inputs(ConstantSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12403 return _IMP_core.ConstantSingletonPredicate_do_get_inputs(self, arg2, arg3)
12404
12405 def get_value(self, *args):
12406 r"""
12407 get_value(ConstantSingletonPredicate self, Particle a) -> int
12408 get_value(ConstantSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12409 """
12410 return _IMP_core.ConstantSingletonPredicate_get_value(self, *args)
12411
12412 def get_value_index(self, *args):
12413 r"""
12414 get_value_index(ConstantSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12415 get_value_index(ConstantSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12416 """
12417 return _IMP_core.ConstantSingletonPredicate_get_value_index(self, *args)
12418
12419 def get_version_info(self):
12420 r"""get_version_info(ConstantSingletonPredicate self) -> VersionInfo"""
12421 return _IMP_core.ConstantSingletonPredicate_get_version_info(self)
12422 __swig_destroy__ = _IMP_core.delete_ConstantSingletonPredicate
12423
12424 def __str__(self):
12425 r"""__str__(ConstantSingletonPredicate self) -> std::string"""
12426 return _IMP_core.ConstantSingletonPredicate___str__(self)
12427
12428 def __repr__(self):
12429 r"""__repr__(ConstantSingletonPredicate self) -> std::string"""
12430 return _IMP_core.ConstantSingletonPredicate___repr__(self)
12431
12432 @staticmethod
12433 def get_from(o):
12434 return _object_cast_to_ConstantSingletonPredicate(o)
12435
12436
12437 def _get_as_binary(self):
12438 r"""_get_as_binary(ConstantSingletonPredicate self) -> PyObject *"""
12439 return _IMP_core.ConstantSingletonPredicate__get_as_binary(self)
12440
12441 def _set_from_binary(self, p):
12442 r"""_set_from_binary(ConstantSingletonPredicate self, PyObject * p)"""
12443 return _IMP_core.ConstantSingletonPredicate__set_from_binary(self, p)
12444
12445 def __getstate__(self):
12446 p = self._get_as_binary()
12447 if len(self.__dict__) > 1:
12448 d = self.__dict__.copy()
12449 del d['this']
12450 p = (d, p)
12451 return p
12452
12453 def __setstate__(self, p):
12454 if not hasattr(self, 'this'):
12455 self.__init__()
12456 if isinstance(p, tuple):
12457 d, p = p
12458 self.__dict__.update(d)
12459 return self._set_from_binary(p)
12460
12461
12462# Register ConstantSingletonPredicate in _IMP_core:
12463_IMP_core.ConstantSingletonPredicate_swigregister(ConstantSingletonPredicate)
12464class UnorderedTypeSingletonPredicate(IMP.SingletonPredicate):
12465 r"""Proxy of C++ IMP::core::UnorderedTypeSingletonPredicate class."""
12466
12467 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12468
12469 def __init__(self, *args):
12470 r"""__init__(UnorderedTypeSingletonPredicate self, std::string name="UnorderedTypeSingletonPredicate%1%") -> UnorderedTypeSingletonPredicate"""
12471 _IMP_core.UnorderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_UnorderedTypeSingletonPredicate(*args))
12472
12473 def do_get_inputs(self, m, pis):
12474 r"""do_get_inputs(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12475 return _IMP_core.UnorderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12476
12477 def get_value(self, *args):
12478 r"""
12479 get_value(UnorderedTypeSingletonPredicate self, Particle a) -> int
12480 get_value(UnorderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12481 """
12482 return _IMP_core.UnorderedTypeSingletonPredicate_get_value(self, *args)
12483
12484 def get_value_index(self, *args):
12485 r"""
12486 get_value_index(UnorderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12487 get_value_index(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12488 """
12489 return _IMP_core.UnorderedTypeSingletonPredicate_get_value_index(self, *args)
12490
12491 def get_version_info(self):
12492 r"""get_version_info(UnorderedTypeSingletonPredicate self) -> VersionInfo"""
12493 return _IMP_core.UnorderedTypeSingletonPredicate_get_version_info(self)
12494 __swig_destroy__ = _IMP_core.delete_UnorderedTypeSingletonPredicate
12495
12496 def __str__(self):
12497 r"""__str__(UnorderedTypeSingletonPredicate self) -> std::string"""
12498 return _IMP_core.UnorderedTypeSingletonPredicate___str__(self)
12499
12500 def __repr__(self):
12501 r"""__repr__(UnorderedTypeSingletonPredicate self) -> std::string"""
12502 return _IMP_core.UnorderedTypeSingletonPredicate___repr__(self)
12503
12504 @staticmethod
12505 def get_from(o):
12506 return _object_cast_to_UnorderedTypeSingletonPredicate(o)
12507
12508
12509 def _get_as_binary(self):
12510 r"""_get_as_binary(UnorderedTypeSingletonPredicate self) -> PyObject *"""
12511 return _IMP_core.UnorderedTypeSingletonPredicate__get_as_binary(self)
12512
12513 def _set_from_binary(self, p):
12514 r"""_set_from_binary(UnorderedTypeSingletonPredicate self, PyObject * p)"""
12515 return _IMP_core.UnorderedTypeSingletonPredicate__set_from_binary(self, p)
12516
12517 def __getstate__(self):
12518 p = self._get_as_binary()
12519 if len(self.__dict__) > 1:
12520 d = self.__dict__.copy()
12521 del d['this']
12522 p = (d, p)
12523 return p
12524
12525 def __setstate__(self, p):
12526 if not hasattr(self, 'this'):
12527 self.__init__()
12528 if isinstance(p, tuple):
12529 d, p = p
12530 self.__dict__.update(d)
12531 return self._set_from_binary(p)
12532
12533
12534# Register UnorderedTypeSingletonPredicate in _IMP_core:
12535_IMP_core.UnorderedTypeSingletonPredicate_swigregister(UnorderedTypeSingletonPredicate)
12536class OrderedTypeSingletonPredicate(IMP.SingletonPredicate):
12537 r"""Proxy of C++ IMP::core::OrderedTypeSingletonPredicate class."""
12538
12539 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12540
12541 def __init__(self, *args):
12542 r"""__init__(OrderedTypeSingletonPredicate self, std::string name="OrderedTypeSingletonPredicate%1%") -> OrderedTypeSingletonPredicate"""
12543 _IMP_core.OrderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_OrderedTypeSingletonPredicate(*args))
12544
12545 def do_get_inputs(self, m, pis):
12546 r"""do_get_inputs(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12547 return _IMP_core.OrderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12548
12549 def get_value(self, *args):
12550 r"""
12551 get_value(OrderedTypeSingletonPredicate self, IMP::core::ParticleTypes const & types) -> int
12552 get_value(OrderedTypeSingletonPredicate self, Particle a) -> int
12553 get_value(OrderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12554 """
12555 return _IMP_core.OrderedTypeSingletonPredicate_get_value(self, *args)
12556
12557 def get_value_index(self, *args):
12558 r"""
12559 get_value_index(OrderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12560 get_value_index(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12561 """
12562 return _IMP_core.OrderedTypeSingletonPredicate_get_value_index(self, *args)
12563
12564 def get_version_info(self):
12565 r"""get_version_info(OrderedTypeSingletonPredicate self) -> VersionInfo"""
12566 return _IMP_core.OrderedTypeSingletonPredicate_get_version_info(self)
12567 __swig_destroy__ = _IMP_core.delete_OrderedTypeSingletonPredicate
12568
12569 def __str__(self):
12570 r"""__str__(OrderedTypeSingletonPredicate self) -> std::string"""
12571 return _IMP_core.OrderedTypeSingletonPredicate___str__(self)
12572
12573 def __repr__(self):
12574 r"""__repr__(OrderedTypeSingletonPredicate self) -> std::string"""
12575 return _IMP_core.OrderedTypeSingletonPredicate___repr__(self)
12576
12577 @staticmethod
12578 def get_from(o):
12579 return _object_cast_to_OrderedTypeSingletonPredicate(o)
12580
12581
12582# Register OrderedTypeSingletonPredicate in _IMP_core:
12583_IMP_core.OrderedTypeSingletonPredicate_swigregister(OrderedTypeSingletonPredicate)
12584class AllSameSingletonPredicate(IMP.SingletonPredicate):
12585 r"""Proxy of C++ IMP::core::AllSameSingletonPredicate class."""
12586
12587 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12588
12589 def __init__(self, *args):
12590 r"""__init__(AllSameSingletonPredicate self, std::string name="AllSameSingletonPredicate%1%") -> AllSameSingletonPredicate"""
12591 _IMP_core.AllSameSingletonPredicate_swiginit(self, _IMP_core.new_AllSameSingletonPredicate(*args))
12592
12593 def do_get_inputs(self, arg2, arg3):
12594 r"""do_get_inputs(AllSameSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12595 return _IMP_core.AllSameSingletonPredicate_do_get_inputs(self, arg2, arg3)
12596
12597 def get_value(self, *args):
12598 r"""
12599 get_value(AllSameSingletonPredicate self, Particle a) -> int
12600 get_value(AllSameSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12601 """
12602 return _IMP_core.AllSameSingletonPredicate_get_value(self, *args)
12603
12604 def get_value_index(self, *args):
12605 r"""
12606 get_value_index(AllSameSingletonPredicate self, Model m, ParticleIndex pi) -> int
12607 get_value_index(AllSameSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12608 """
12609 return _IMP_core.AllSameSingletonPredicate_get_value_index(self, *args)
12610
12611 def get_version_info(self):
12612 r"""get_version_info(AllSameSingletonPredicate self) -> VersionInfo"""
12613 return _IMP_core.AllSameSingletonPredicate_get_version_info(self)
12614 __swig_destroy__ = _IMP_core.delete_AllSameSingletonPredicate
12615
12616 def __str__(self):
12617 r"""__str__(AllSameSingletonPredicate self) -> std::string"""
12618 return _IMP_core.AllSameSingletonPredicate___str__(self)
12619
12620 def __repr__(self):
12621 r"""__repr__(AllSameSingletonPredicate self) -> std::string"""
12622 return _IMP_core.AllSameSingletonPredicate___repr__(self)
12623
12624 @staticmethod
12625 def get_from(o):
12626 return _object_cast_to_AllSameSingletonPredicate(o)
12627
12628
12629 def _get_as_binary(self):
12630 r"""_get_as_binary(AllSameSingletonPredicate self) -> PyObject *"""
12631 return _IMP_core.AllSameSingletonPredicate__get_as_binary(self)
12632
12633 def _set_from_binary(self, p):
12634 r"""_set_from_binary(AllSameSingletonPredicate self, PyObject * p)"""
12635 return _IMP_core.AllSameSingletonPredicate__set_from_binary(self, p)
12636
12637 def __getstate__(self):
12638 p = self._get_as_binary()
12639 if len(self.__dict__) > 1:
12640 d = self.__dict__.copy()
12641 del d['this']
12642 p = (d, p)
12643 return p
12644
12645 def __setstate__(self, p):
12646 if not hasattr(self, 'this'):
12647 self.__init__()
12648 if isinstance(p, tuple):
12649 d, p = p
12650 self.__dict__.update(d)
12651 return self._set_from_binary(p)
12652
12653
12654# Register AllSameSingletonPredicate in _IMP_core:
12655_IMP_core.AllSameSingletonPredicate_swigregister(AllSameSingletonPredicate)
12656class CoinFlipSingletonPredicate(IMP.SingletonPredicate):
12657 r"""Proxy of C++ IMP::core::CoinFlipSingletonPredicate class."""
12658
12659 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12660
12661 def __init__(self, *args):
12662 r"""__init__(CoinFlipSingletonPredicate self, double p, std::string name="CoinFlipSingletonPredicate%1%") -> CoinFlipSingletonPredicate"""
12663 _IMP_core.CoinFlipSingletonPredicate_swiginit(self, _IMP_core.new_CoinFlipSingletonPredicate(*args))
12664
12665 def do_get_inputs(self, arg2, arg3):
12666 r"""do_get_inputs(CoinFlipSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12667 return _IMP_core.CoinFlipSingletonPredicate_do_get_inputs(self, arg2, arg3)
12668
12669 def get_value(self, *args):
12670 r"""
12671 get_value(CoinFlipSingletonPredicate self, Particle a) -> int
12672 get_value(CoinFlipSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12673 """
12674 return _IMP_core.CoinFlipSingletonPredicate_get_value(self, *args)
12675
12676 def get_value_index(self, *args):
12677 r"""
12678 get_value_index(CoinFlipSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12679 get_value_index(CoinFlipSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12680 """
12681 return _IMP_core.CoinFlipSingletonPredicate_get_value_index(self, *args)
12682
12683 def get_version_info(self):
12684 r"""get_version_info(CoinFlipSingletonPredicate self) -> VersionInfo"""
12685 return _IMP_core.CoinFlipSingletonPredicate_get_version_info(self)
12686 __swig_destroy__ = _IMP_core.delete_CoinFlipSingletonPredicate
12687
12688 def __str__(self):
12689 r"""__str__(CoinFlipSingletonPredicate self) -> std::string"""
12690 return _IMP_core.CoinFlipSingletonPredicate___str__(self)
12691
12692 def __repr__(self):
12693 r"""__repr__(CoinFlipSingletonPredicate self) -> std::string"""
12694 return _IMP_core.CoinFlipSingletonPredicate___repr__(self)
12695
12696 @staticmethod
12697 def get_from(o):
12698 return _object_cast_to_CoinFlipSingletonPredicate(o)
12699
12700
12701# Register CoinFlipSingletonPredicate in _IMP_core:
12702_IMP_core.CoinFlipSingletonPredicate_swigregister(CoinFlipSingletonPredicate)
12703class ConstantPairPredicate(IMP.PairPredicate):
12704 r"""Proxy of C++ IMP::core::ConstantPairPredicate class."""
12705
12706 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12707
12708 def __init__(self, *args):
12709 r"""
12710 __init__(ConstantPairPredicate self, int v, std::string name="ConstPairPredicate%1%") -> ConstantPairPredicate
12711 __init__(ConstantPairPredicate self) -> ConstantPairPredicate
12712 """
12713 _IMP_core.ConstantPairPredicate_swiginit(self, _IMP_core.new_ConstantPairPredicate(*args))
12714
12715 def do_get_inputs(self, arg2, arg3):
12716 r"""do_get_inputs(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12717 return _IMP_core.ConstantPairPredicate_do_get_inputs(self, arg2, arg3)
12718
12719 def get_value(self, *args):
12720 r"""
12721 get_value(ConstantPairPredicate self, IMP::ParticlePair const & a) -> int
12722 get_value(ConstantPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12723 """
12724 return _IMP_core.ConstantPairPredicate_get_value(self, *args)
12725
12726 def get_value_index(self, *args):
12727 r"""
12728 get_value_index(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12729 get_value_index(ConstantPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12730 """
12731 return _IMP_core.ConstantPairPredicate_get_value_index(self, *args)
12732
12733 def get_version_info(self):
12734 r"""get_version_info(ConstantPairPredicate self) -> VersionInfo"""
12735 return _IMP_core.ConstantPairPredicate_get_version_info(self)
12736 __swig_destroy__ = _IMP_core.delete_ConstantPairPredicate
12737
12738 def __str__(self):
12739 r"""__str__(ConstantPairPredicate self) -> std::string"""
12740 return _IMP_core.ConstantPairPredicate___str__(self)
12741
12742 def __repr__(self):
12743 r"""__repr__(ConstantPairPredicate self) -> std::string"""
12744 return _IMP_core.ConstantPairPredicate___repr__(self)
12745
12746 @staticmethod
12747 def get_from(o):
12748 return _object_cast_to_ConstantPairPredicate(o)
12749
12750
12751 def _get_as_binary(self):
12752 r"""_get_as_binary(ConstantPairPredicate self) -> PyObject *"""
12753 return _IMP_core.ConstantPairPredicate__get_as_binary(self)
12754
12755 def _set_from_binary(self, p):
12756 r"""_set_from_binary(ConstantPairPredicate self, PyObject * p)"""
12757 return _IMP_core.ConstantPairPredicate__set_from_binary(self, p)
12758
12759 def __getstate__(self):
12760 p = self._get_as_binary()
12761 if len(self.__dict__) > 1:
12762 d = self.__dict__.copy()
12763 del d['this']
12764 p = (d, p)
12765 return p
12766
12767 def __setstate__(self, p):
12768 if not hasattr(self, 'this'):
12769 self.__init__()
12770 if isinstance(p, tuple):
12771 d, p = p
12772 self.__dict__.update(d)
12773 return self._set_from_binary(p)
12774
12775
12776# Register ConstantPairPredicate in _IMP_core:
12777_IMP_core.ConstantPairPredicate_swigregister(ConstantPairPredicate)
12778class UnorderedTypePairPredicate(IMP.PairPredicate):
12779 r"""Proxy of C++ IMP::core::UnorderedTypePairPredicate class."""
12780
12781 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12782
12783 def __init__(self, *args):
12784 r"""__init__(UnorderedTypePairPredicate self, std::string name="UnorderedTypePairPredicate%1%") -> UnorderedTypePairPredicate"""
12785 _IMP_core.UnorderedTypePairPredicate_swiginit(self, _IMP_core.new_UnorderedTypePairPredicate(*args))
12786
12787 def do_get_inputs(self, m, pis):
12788 r"""do_get_inputs(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12789 return _IMP_core.UnorderedTypePairPredicate_do_get_inputs(self, m, pis)
12790
12791 def get_value(self, *args):
12792 r"""
12793 get_value(UnorderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12794 get_value(UnorderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12795 """
12796 return _IMP_core.UnorderedTypePairPredicate_get_value(self, *args)
12797
12798 def get_value_index(self, *args):
12799 r"""
12800 get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12801 get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12802 """
12803 return _IMP_core.UnorderedTypePairPredicate_get_value_index(self, *args)
12804
12805 def get_version_info(self):
12806 r"""get_version_info(UnorderedTypePairPredicate self) -> VersionInfo"""
12807 return _IMP_core.UnorderedTypePairPredicate_get_version_info(self)
12808 __swig_destroy__ = _IMP_core.delete_UnorderedTypePairPredicate
12809
12810 def __str__(self):
12811 r"""__str__(UnorderedTypePairPredicate self) -> std::string"""
12812 return _IMP_core.UnorderedTypePairPredicate___str__(self)
12813
12814 def __repr__(self):
12815 r"""__repr__(UnorderedTypePairPredicate self) -> std::string"""
12816 return _IMP_core.UnorderedTypePairPredicate___repr__(self)
12817
12818 @staticmethod
12819 def get_from(o):
12820 return _object_cast_to_UnorderedTypePairPredicate(o)
12821
12822
12823 def _get_as_binary(self):
12824 r"""_get_as_binary(UnorderedTypePairPredicate self) -> PyObject *"""
12825 return _IMP_core.UnorderedTypePairPredicate__get_as_binary(self)
12826
12827 def _set_from_binary(self, p):
12828 r"""_set_from_binary(UnorderedTypePairPredicate self, PyObject * p)"""
12829 return _IMP_core.UnorderedTypePairPredicate__set_from_binary(self, p)
12830
12831 def __getstate__(self):
12832 p = self._get_as_binary()
12833 if len(self.__dict__) > 1:
12834 d = self.__dict__.copy()
12835 del d['this']
12836 p = (d, p)
12837 return p
12838
12839 def __setstate__(self, p):
12840 if not hasattr(self, 'this'):
12841 self.__init__()
12842 if isinstance(p, tuple):
12843 d, p = p
12844 self.__dict__.update(d)
12845 return self._set_from_binary(p)
12846
12847
12848# Register UnorderedTypePairPredicate in _IMP_core:
12849_IMP_core.UnorderedTypePairPredicate_swigregister(UnorderedTypePairPredicate)
12850class OrderedTypePairPredicate(IMP.PairPredicate):
12851 r"""Proxy of C++ IMP::core::OrderedTypePairPredicate class."""
12852
12853 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12854
12855 def __init__(self, *args):
12856 r"""__init__(OrderedTypePairPredicate self, std::string name="OrderedTypePairPredicate%1%") -> OrderedTypePairPredicate"""
12857 _IMP_core.OrderedTypePairPredicate_swiginit(self, _IMP_core.new_OrderedTypePairPredicate(*args))
12858
12859 def do_get_inputs(self, m, pis):
12860 r"""do_get_inputs(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12861 return _IMP_core.OrderedTypePairPredicate_do_get_inputs(self, m, pis)
12862
12863 def get_value(self, *args):
12864 r"""
12865 get_value(OrderedTypePairPredicate self, IMP::core::ParticleTypes const & types) -> int
12866 get_value(OrderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12867 get_value(OrderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12868 """
12869 return _IMP_core.OrderedTypePairPredicate_get_value(self, *args)
12870
12871 def get_value_index(self, *args):
12872 r"""
12873 get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12874 get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12875 """
12876 return _IMP_core.OrderedTypePairPredicate_get_value_index(self, *args)
12877
12878 def get_version_info(self):
12879 r"""get_version_info(OrderedTypePairPredicate self) -> VersionInfo"""
12880 return _IMP_core.OrderedTypePairPredicate_get_version_info(self)
12881 __swig_destroy__ = _IMP_core.delete_OrderedTypePairPredicate
12882
12883 def __str__(self):
12884 r"""__str__(OrderedTypePairPredicate self) -> std::string"""
12885 return _IMP_core.OrderedTypePairPredicate___str__(self)
12886
12887 def __repr__(self):
12888 r"""__repr__(OrderedTypePairPredicate self) -> std::string"""
12889 return _IMP_core.OrderedTypePairPredicate___repr__(self)
12890
12891 @staticmethod
12892 def get_from(o):
12893 return _object_cast_to_OrderedTypePairPredicate(o)
12894
12895
12896# Register OrderedTypePairPredicate in _IMP_core:
12897_IMP_core.OrderedTypePairPredicate_swigregister(OrderedTypePairPredicate)
12898class AllSamePairPredicate(IMP.PairPredicate):
12899 r"""Proxy of C++ IMP::core::AllSamePairPredicate class."""
12900
12901 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12902
12903 def __init__(self, *args):
12904 r"""__init__(AllSamePairPredicate self, std::string name="AllSamePairPredicate%1%") -> AllSamePairPredicate"""
12905 _IMP_core.AllSamePairPredicate_swiginit(self, _IMP_core.new_AllSamePairPredicate(*args))
12906
12907 def do_get_inputs(self, arg2, arg3):
12908 r"""do_get_inputs(AllSamePairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12909 return _IMP_core.AllSamePairPredicate_do_get_inputs(self, arg2, arg3)
12910
12911 def get_value(self, *args):
12912 r"""
12913 get_value(AllSamePairPredicate self, IMP::ParticlePair const & a) -> int
12914 get_value(AllSamePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12915 """
12916 return _IMP_core.AllSamePairPredicate_get_value(self, *args)
12917
12918 def get_value_index(self, *args):
12919 r"""
12920 get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12921 get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12922 """
12923 return _IMP_core.AllSamePairPredicate_get_value_index(self, *args)
12924
12925 def get_version_info(self):
12926 r"""get_version_info(AllSamePairPredicate self) -> VersionInfo"""
12927 return _IMP_core.AllSamePairPredicate_get_version_info(self)
12928 __swig_destroy__ = _IMP_core.delete_AllSamePairPredicate
12929
12930 def __str__(self):
12931 r"""__str__(AllSamePairPredicate self) -> std::string"""
12932 return _IMP_core.AllSamePairPredicate___str__(self)
12933
12934 def __repr__(self):
12935 r"""__repr__(AllSamePairPredicate self) -> std::string"""
12936 return _IMP_core.AllSamePairPredicate___repr__(self)
12937
12938 @staticmethod
12939 def get_from(o):
12940 return _object_cast_to_AllSamePairPredicate(o)
12941
12942
12943 def _get_as_binary(self):
12944 r"""_get_as_binary(AllSamePairPredicate self) -> PyObject *"""
12945 return _IMP_core.AllSamePairPredicate__get_as_binary(self)
12946
12947 def _set_from_binary(self, p):
12948 r"""_set_from_binary(AllSamePairPredicate self, PyObject * p)"""
12949 return _IMP_core.AllSamePairPredicate__set_from_binary(self, p)
12950
12951 def __getstate__(self):
12952 p = self._get_as_binary()
12953 if len(self.__dict__) > 1:
12954 d = self.__dict__.copy()
12955 del d['this']
12956 p = (d, p)
12957 return p
12958
12959 def __setstate__(self, p):
12960 if not hasattr(self, 'this'):
12961 self.__init__()
12962 if isinstance(p, tuple):
12963 d, p = p
12964 self.__dict__.update(d)
12965 return self._set_from_binary(p)
12966
12967
12968# Register AllSamePairPredicate in _IMP_core:
12969_IMP_core.AllSamePairPredicate_swigregister(AllSamePairPredicate)
12970class CoinFlipPairPredicate(IMP.PairPredicate):
12971 r"""Proxy of C++ IMP::core::CoinFlipPairPredicate class."""
12972
12973 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12974
12975 def __init__(self, *args):
12976 r"""__init__(CoinFlipPairPredicate self, double p, std::string name="CoinFlipPairPredicate%1%") -> CoinFlipPairPredicate"""
12977 _IMP_core.CoinFlipPairPredicate_swiginit(self, _IMP_core.new_CoinFlipPairPredicate(*args))
12978
12979 def do_get_inputs(self, arg2, arg3):
12980 r"""do_get_inputs(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12981 return _IMP_core.CoinFlipPairPredicate_do_get_inputs(self, arg2, arg3)
12982
12983 def get_value(self, *args):
12984 r"""
12985 get_value(CoinFlipPairPredicate self, IMP::ParticlePair const & a) -> int
12986 get_value(CoinFlipPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12987 """
12988 return _IMP_core.CoinFlipPairPredicate_get_value(self, *args)
12989
12990 def get_value_index(self, *args):
12991 r"""
12992 get_value_index(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12993 get_value_index(CoinFlipPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12994 """
12995 return _IMP_core.CoinFlipPairPredicate_get_value_index(self, *args)
12996
12997 def get_version_info(self):
12998 r"""get_version_info(CoinFlipPairPredicate self) -> VersionInfo"""
12999 return _IMP_core.CoinFlipPairPredicate_get_version_info(self)
13000 __swig_destroy__ = _IMP_core.delete_CoinFlipPairPredicate
13001
13002 def __str__(self):
13003 r"""__str__(CoinFlipPairPredicate self) -> std::string"""
13004 return _IMP_core.CoinFlipPairPredicate___str__(self)
13005
13006 def __repr__(self):
13007 r"""__repr__(CoinFlipPairPredicate self) -> std::string"""
13008 return _IMP_core.CoinFlipPairPredicate___repr__(self)
13009
13010 @staticmethod
13011 def get_from(o):
13012 return _object_cast_to_CoinFlipPairPredicate(o)
13013
13014
13015# Register CoinFlipPairPredicate in _IMP_core:
13016_IMP_core.CoinFlipPairPredicate_swigregister(CoinFlipPairPredicate)
13017class ConstantTripletPredicate(IMP.TripletPredicate):
13018 r"""Proxy of C++ IMP::core::ConstantTripletPredicate class."""
13019
13020 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13021
13022 def __init__(self, *args):
13023 r"""
13024 __init__(ConstantTripletPredicate self, int v, std::string name="ConstTripletPredicate%1%") -> ConstantTripletPredicate
13025 __init__(ConstantTripletPredicate self) -> ConstantTripletPredicate
13026 """
13027 _IMP_core.ConstantTripletPredicate_swiginit(self, _IMP_core.new_ConstantTripletPredicate(*args))
13028
13029 def do_get_inputs(self, arg2, arg3):
13030 r"""do_get_inputs(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13031 return _IMP_core.ConstantTripletPredicate_do_get_inputs(self, arg2, arg3)
13032
13033 def get_value(self, *args):
13034 r"""
13035 get_value(ConstantTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13036 get_value(ConstantTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13037 """
13038 return _IMP_core.ConstantTripletPredicate_get_value(self, *args)
13039
13040 def get_value_index(self, *args):
13041 r"""
13042 get_value_index(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
13043 get_value_index(ConstantTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13044 """
13045 return _IMP_core.ConstantTripletPredicate_get_value_index(self, *args)
13046
13047 def get_version_info(self):
13048 r"""get_version_info(ConstantTripletPredicate self) -> VersionInfo"""
13049 return _IMP_core.ConstantTripletPredicate_get_version_info(self)
13050 __swig_destroy__ = _IMP_core.delete_ConstantTripletPredicate
13051
13052 def __str__(self):
13053 r"""__str__(ConstantTripletPredicate self) -> std::string"""
13054 return _IMP_core.ConstantTripletPredicate___str__(self)
13055
13056 def __repr__(self):
13057 r"""__repr__(ConstantTripletPredicate self) -> std::string"""
13058 return _IMP_core.ConstantTripletPredicate___repr__(self)
13059
13060 @staticmethod
13061 def get_from(o):
13062 return _object_cast_to_ConstantTripletPredicate(o)
13063
13064
13065 def _get_as_binary(self):
13066 r"""_get_as_binary(ConstantTripletPredicate self) -> PyObject *"""
13067 return _IMP_core.ConstantTripletPredicate__get_as_binary(self)
13068
13069 def _set_from_binary(self, p):
13070 r"""_set_from_binary(ConstantTripletPredicate self, PyObject * p)"""
13071 return _IMP_core.ConstantTripletPredicate__set_from_binary(self, p)
13072
13073 def __getstate__(self):
13074 p = self._get_as_binary()
13075 if len(self.__dict__) > 1:
13076 d = self.__dict__.copy()
13077 del d['this']
13078 p = (d, p)
13079 return p
13080
13081 def __setstate__(self, p):
13082 if not hasattr(self, 'this'):
13083 self.__init__()
13084 if isinstance(p, tuple):
13085 d, p = p
13086 self.__dict__.update(d)
13087 return self._set_from_binary(p)
13088
13089
13090# Register ConstantTripletPredicate in _IMP_core:
13091_IMP_core.ConstantTripletPredicate_swigregister(ConstantTripletPredicate)
13092class UnorderedTypeTripletPredicate(IMP.TripletPredicate):
13093 r"""Proxy of C++ IMP::core::UnorderedTypeTripletPredicate class."""
13094
13095 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13096
13097 def __init__(self, *args):
13098 r"""__init__(UnorderedTypeTripletPredicate self, std::string name="UnorderedTypeTripletPredicate%1%") -> UnorderedTypeTripletPredicate"""
13099 _IMP_core.UnorderedTypeTripletPredicate_swiginit(self, _IMP_core.new_UnorderedTypeTripletPredicate(*args))
13100
13101 def do_get_inputs(self, m, pis):
13102 r"""do_get_inputs(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13103 return _IMP_core.UnorderedTypeTripletPredicate_do_get_inputs(self, m, pis)
13104
13105 def get_value(self, *args):
13106 r"""
13107 get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13108 get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13109 """
13110 return _IMP_core.UnorderedTypeTripletPredicate_get_value(self, *args)
13111
13112 def get_value_index(self, *args):
13113 r"""
13114 get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13115 get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13116 """
13117 return _IMP_core.UnorderedTypeTripletPredicate_get_value_index(self, *args)
13118
13119 def get_version_info(self):
13120 r"""get_version_info(UnorderedTypeTripletPredicate self) -> VersionInfo"""
13121 return _IMP_core.UnorderedTypeTripletPredicate_get_version_info(self)
13122 __swig_destroy__ = _IMP_core.delete_UnorderedTypeTripletPredicate
13123
13124 def __str__(self):
13125 r"""__str__(UnorderedTypeTripletPredicate self) -> std::string"""
13126 return _IMP_core.UnorderedTypeTripletPredicate___str__(self)
13127
13128 def __repr__(self):
13129 r"""__repr__(UnorderedTypeTripletPredicate self) -> std::string"""
13130 return _IMP_core.UnorderedTypeTripletPredicate___repr__(self)
13131
13132 @staticmethod
13133 def get_from(o):
13134 return _object_cast_to_UnorderedTypeTripletPredicate(o)
13135
13136
13137 def _get_as_binary(self):
13138 r"""_get_as_binary(UnorderedTypeTripletPredicate self) -> PyObject *"""
13139 return _IMP_core.UnorderedTypeTripletPredicate__get_as_binary(self)
13140
13141 def _set_from_binary(self, p):
13142 r"""_set_from_binary(UnorderedTypeTripletPredicate self, PyObject * p)"""
13143 return _IMP_core.UnorderedTypeTripletPredicate__set_from_binary(self, p)
13144
13145 def __getstate__(self):
13146 p = self._get_as_binary()
13147 if len(self.__dict__) > 1:
13148 d = self.__dict__.copy()
13149 del d['this']
13150 p = (d, p)
13151 return p
13152
13153 def __setstate__(self, p):
13154 if not hasattr(self, 'this'):
13155 self.__init__()
13156 if isinstance(p, tuple):
13157 d, p = p
13158 self.__dict__.update(d)
13159 return self._set_from_binary(p)
13160
13161
13162# Register UnorderedTypeTripletPredicate in _IMP_core:
13163_IMP_core.UnorderedTypeTripletPredicate_swigregister(UnorderedTypeTripletPredicate)
13164class OrderedTypeTripletPredicate(IMP.TripletPredicate):
13165 r"""Proxy of C++ IMP::core::OrderedTypeTripletPredicate class."""
13166
13167 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13168
13169 def __init__(self, *args):
13170 r"""__init__(OrderedTypeTripletPredicate self, std::string name="OrderedTypeTripletPredicate%1%") -> OrderedTypeTripletPredicate"""
13171 _IMP_core.OrderedTypeTripletPredicate_swiginit(self, _IMP_core.new_OrderedTypeTripletPredicate(*args))
13172
13173 def do_get_inputs(self, m, pis):
13174 r"""do_get_inputs(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13175 return _IMP_core.OrderedTypeTripletPredicate_do_get_inputs(self, m, pis)
13176
13177 def get_value(self, *args):
13178 r"""
13179 get_value(OrderedTypeTripletPredicate self, IMP::core::ParticleTypes const & types) -> int
13180 get_value(OrderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13181 get_value(OrderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13182 """
13183 return _IMP_core.OrderedTypeTripletPredicate_get_value(self, *args)
13184
13185 def get_value_index(self, *args):
13186 r"""
13187 get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13188 get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13189 """
13190 return _IMP_core.OrderedTypeTripletPredicate_get_value_index(self, *args)
13191
13192 def get_version_info(self):
13193 r"""get_version_info(OrderedTypeTripletPredicate self) -> VersionInfo"""
13194 return _IMP_core.OrderedTypeTripletPredicate_get_version_info(self)
13195 __swig_destroy__ = _IMP_core.delete_OrderedTypeTripletPredicate
13196
13197 def __str__(self):
13198 r"""__str__(OrderedTypeTripletPredicate self) -> std::string"""
13199 return _IMP_core.OrderedTypeTripletPredicate___str__(self)
13200
13201 def __repr__(self):
13202 r"""__repr__(OrderedTypeTripletPredicate self) -> std::string"""
13203 return _IMP_core.OrderedTypeTripletPredicate___repr__(self)
13204
13205 @staticmethod
13206 def get_from(o):
13207 return _object_cast_to_OrderedTypeTripletPredicate(o)
13208
13209
13210# Register OrderedTypeTripletPredicate in _IMP_core:
13211_IMP_core.OrderedTypeTripletPredicate_swigregister(OrderedTypeTripletPredicate)
13212class AllSameTripletPredicate(IMP.TripletPredicate):
13213 r"""Proxy of C++ IMP::core::AllSameTripletPredicate class."""
13214
13215 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13216
13217 def __init__(self, *args):
13218 r"""__init__(AllSameTripletPredicate self, std::string name="AllSameTripletPredicate%1%") -> AllSameTripletPredicate"""
13219 _IMP_core.AllSameTripletPredicate_swiginit(self, _IMP_core.new_AllSameTripletPredicate(*args))
13220
13221 def do_get_inputs(self, arg2, arg3):
13222 r"""do_get_inputs(AllSameTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13223 return _IMP_core.AllSameTripletPredicate_do_get_inputs(self, arg2, arg3)
13224
13225 def get_value(self, *args):
13226 r"""
13227 get_value(AllSameTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13228 get_value(AllSameTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13229 """
13230 return _IMP_core.AllSameTripletPredicate_get_value(self, *args)
13231
13232 def get_value_index(self, *args):
13233 r"""
13234 get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13235 get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13236 """
13237 return _IMP_core.AllSameTripletPredicate_get_value_index(self, *args)
13238
13239 def get_version_info(self):
13240 r"""get_version_info(AllSameTripletPredicate self) -> VersionInfo"""
13241 return _IMP_core.AllSameTripletPredicate_get_version_info(self)
13242 __swig_destroy__ = _IMP_core.delete_AllSameTripletPredicate
13243
13244 def __str__(self):
13245 r"""__str__(AllSameTripletPredicate self) -> std::string"""
13246 return _IMP_core.AllSameTripletPredicate___str__(self)
13247
13248 def __repr__(self):
13249 r"""__repr__(AllSameTripletPredicate self) -> std::string"""
13250 return _IMP_core.AllSameTripletPredicate___repr__(self)
13251
13252 @staticmethod
13253 def get_from(o):
13254 return _object_cast_to_AllSameTripletPredicate(o)
13255
13256
13257 def _get_as_binary(self):
13258 r"""_get_as_binary(AllSameTripletPredicate self) -> PyObject *"""
13259 return _IMP_core.AllSameTripletPredicate__get_as_binary(self)
13260
13261 def _set_from_binary(self, p):
13262 r"""_set_from_binary(AllSameTripletPredicate self, PyObject * p)"""
13263 return _IMP_core.AllSameTripletPredicate__set_from_binary(self, p)
13264
13265 def __getstate__(self):
13266 p = self._get_as_binary()
13267 if len(self.__dict__) > 1:
13268 d = self.__dict__.copy()
13269 del d['this']
13270 p = (d, p)
13271 return p
13272
13273 def __setstate__(self, p):
13274 if not hasattr(self, 'this'):
13275 self.__init__()
13276 if isinstance(p, tuple):
13277 d, p = p
13278 self.__dict__.update(d)
13279 return self._set_from_binary(p)
13280
13281
13282# Register AllSameTripletPredicate in _IMP_core:
13283_IMP_core.AllSameTripletPredicate_swigregister(AllSameTripletPredicate)
13284class CoinFlipTripletPredicate(IMP.TripletPredicate):
13285 r"""Proxy of C++ IMP::core::CoinFlipTripletPredicate class."""
13286
13287 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13288
13289 def __init__(self, *args):
13290 r"""__init__(CoinFlipTripletPredicate self, double p, std::string name="CoinFlipTripletPredicate%1%") -> CoinFlipTripletPredicate"""
13291 _IMP_core.CoinFlipTripletPredicate_swiginit(self, _IMP_core.new_CoinFlipTripletPredicate(*args))
13292
13293 def do_get_inputs(self, arg2, arg3):
13294 r"""do_get_inputs(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13295 return _IMP_core.CoinFlipTripletPredicate_do_get_inputs(self, arg2, arg3)
13296
13297 def get_value(self, *args):
13298 r"""
13299 get_value(CoinFlipTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13300 get_value(CoinFlipTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13301 """
13302 return _IMP_core.CoinFlipTripletPredicate_get_value(self, *args)
13303
13304 def get_value_index(self, *args):
13305 r"""
13306 get_value_index(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
13307 get_value_index(CoinFlipTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13308 """
13309 return _IMP_core.CoinFlipTripletPredicate_get_value_index(self, *args)
13310
13311 def get_version_info(self):
13312 r"""get_version_info(CoinFlipTripletPredicate self) -> VersionInfo"""
13313 return _IMP_core.CoinFlipTripletPredicate_get_version_info(self)
13314 __swig_destroy__ = _IMP_core.delete_CoinFlipTripletPredicate
13315
13316 def __str__(self):
13317 r"""__str__(CoinFlipTripletPredicate self) -> std::string"""
13318 return _IMP_core.CoinFlipTripletPredicate___str__(self)
13319
13320 def __repr__(self):
13321 r"""__repr__(CoinFlipTripletPredicate self) -> std::string"""
13322 return _IMP_core.CoinFlipTripletPredicate___repr__(self)
13323
13324 @staticmethod
13325 def get_from(o):
13326 return _object_cast_to_CoinFlipTripletPredicate(o)
13327
13328
13329# Register CoinFlipTripletPredicate in _IMP_core:
13330_IMP_core.CoinFlipTripletPredicate_swigregister(CoinFlipTripletPredicate)
13331class ConstantQuadPredicate(IMP.QuadPredicate):
13332 r"""Proxy of C++ IMP::core::ConstantQuadPredicate class."""
13333
13334 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13335
13336 def __init__(self, *args):
13337 r"""
13338 __init__(ConstantQuadPredicate self, int v, std::string name="ConstQuadPredicate%1%") -> ConstantQuadPredicate
13339 __init__(ConstantQuadPredicate self) -> ConstantQuadPredicate
13340 """
13341 _IMP_core.ConstantQuadPredicate_swiginit(self, _IMP_core.new_ConstantQuadPredicate(*args))
13342
13343 def do_get_inputs(self, arg2, arg3):
13344 r"""do_get_inputs(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13345 return _IMP_core.ConstantQuadPredicate_do_get_inputs(self, arg2, arg3)
13346
13347 def get_value(self, *args):
13348 r"""
13349 get_value(ConstantQuadPredicate self, IMP::ParticleQuad const & a) -> int
13350 get_value(ConstantQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13351 """
13352 return _IMP_core.ConstantQuadPredicate_get_value(self, *args)
13353
13354 def get_value_index(self, *args):
13355 r"""
13356 get_value_index(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13357 get_value_index(ConstantQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13358 """
13359 return _IMP_core.ConstantQuadPredicate_get_value_index(self, *args)
13360
13361 def get_version_info(self):
13362 r"""get_version_info(ConstantQuadPredicate self) -> VersionInfo"""
13363 return _IMP_core.ConstantQuadPredicate_get_version_info(self)
13364 __swig_destroy__ = _IMP_core.delete_ConstantQuadPredicate
13365
13366 def __str__(self):
13367 r"""__str__(ConstantQuadPredicate self) -> std::string"""
13368 return _IMP_core.ConstantQuadPredicate___str__(self)
13369
13370 def __repr__(self):
13371 r"""__repr__(ConstantQuadPredicate self) -> std::string"""
13372 return _IMP_core.ConstantQuadPredicate___repr__(self)
13373
13374 @staticmethod
13375 def get_from(o):
13376 return _object_cast_to_ConstantQuadPredicate(o)
13377
13378
13379 def _get_as_binary(self):
13380 r"""_get_as_binary(ConstantQuadPredicate self) -> PyObject *"""
13381 return _IMP_core.ConstantQuadPredicate__get_as_binary(self)
13382
13383 def _set_from_binary(self, p):
13384 r"""_set_from_binary(ConstantQuadPredicate self, PyObject * p)"""
13385 return _IMP_core.ConstantQuadPredicate__set_from_binary(self, p)
13386
13387 def __getstate__(self):
13388 p = self._get_as_binary()
13389 if len(self.__dict__) > 1:
13390 d = self.__dict__.copy()
13391 del d['this']
13392 p = (d, p)
13393 return p
13394
13395 def __setstate__(self, p):
13396 if not hasattr(self, 'this'):
13397 self.__init__()
13398 if isinstance(p, tuple):
13399 d, p = p
13400 self.__dict__.update(d)
13401 return self._set_from_binary(p)
13402
13403
13404# Register ConstantQuadPredicate in _IMP_core:
13405_IMP_core.ConstantQuadPredicate_swigregister(ConstantQuadPredicate)
13406class UnorderedTypeQuadPredicate(IMP.QuadPredicate):
13407 r"""Proxy of C++ IMP::core::UnorderedTypeQuadPredicate class."""
13408
13409 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13410
13411 def __init__(self, *args):
13412 r"""__init__(UnorderedTypeQuadPredicate self, std::string name="UnorderedTypeQuadPredicate%1%") -> UnorderedTypeQuadPredicate"""
13413 _IMP_core.UnorderedTypeQuadPredicate_swiginit(self, _IMP_core.new_UnorderedTypeQuadPredicate(*args))
13414
13415 def do_get_inputs(self, m, pis):
13416 r"""do_get_inputs(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13417 return _IMP_core.UnorderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13418
13419 def get_value(self, *args):
13420 r"""
13421 get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13422 get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13423 """
13424 return _IMP_core.UnorderedTypeQuadPredicate_get_value(self, *args)
13425
13426 def get_value_index(self, *args):
13427 r"""
13428 get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13429 get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13430 """
13431 return _IMP_core.UnorderedTypeQuadPredicate_get_value_index(self, *args)
13432
13433 def get_version_info(self):
13434 r"""get_version_info(UnorderedTypeQuadPredicate self) -> VersionInfo"""
13435 return _IMP_core.UnorderedTypeQuadPredicate_get_version_info(self)
13436 __swig_destroy__ = _IMP_core.delete_UnorderedTypeQuadPredicate
13437
13438 def __str__(self):
13439 r"""__str__(UnorderedTypeQuadPredicate self) -> std::string"""
13440 return _IMP_core.UnorderedTypeQuadPredicate___str__(self)
13441
13442 def __repr__(self):
13443 r"""__repr__(UnorderedTypeQuadPredicate self) -> std::string"""
13444 return _IMP_core.UnorderedTypeQuadPredicate___repr__(self)
13445
13446 @staticmethod
13447 def get_from(o):
13448 return _object_cast_to_UnorderedTypeQuadPredicate(o)
13449
13450
13451 def _get_as_binary(self):
13452 r"""_get_as_binary(UnorderedTypeQuadPredicate self) -> PyObject *"""
13453 return _IMP_core.UnorderedTypeQuadPredicate__get_as_binary(self)
13454
13455 def _set_from_binary(self, p):
13456 r"""_set_from_binary(UnorderedTypeQuadPredicate self, PyObject * p)"""
13457 return _IMP_core.UnorderedTypeQuadPredicate__set_from_binary(self, p)
13458
13459 def __getstate__(self):
13460 p = self._get_as_binary()
13461 if len(self.__dict__) > 1:
13462 d = self.__dict__.copy()
13463 del d['this']
13464 p = (d, p)
13465 return p
13466
13467 def __setstate__(self, p):
13468 if not hasattr(self, 'this'):
13469 self.__init__()
13470 if isinstance(p, tuple):
13471 d, p = p
13472 self.__dict__.update(d)
13473 return self._set_from_binary(p)
13474
13475
13476# Register UnorderedTypeQuadPredicate in _IMP_core:
13477_IMP_core.UnorderedTypeQuadPredicate_swigregister(UnorderedTypeQuadPredicate)
13478class OrderedTypeQuadPredicate(IMP.QuadPredicate):
13479 r"""Proxy of C++ IMP::core::OrderedTypeQuadPredicate class."""
13480
13481 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13482
13483 def __init__(self, *args):
13484 r"""__init__(OrderedTypeQuadPredicate self, std::string name="OrderedTypeQuadPredicate%1%") -> OrderedTypeQuadPredicate"""
13485 _IMP_core.OrderedTypeQuadPredicate_swiginit(self, _IMP_core.new_OrderedTypeQuadPredicate(*args))
13486
13487 def do_get_inputs(self, m, pis):
13488 r"""do_get_inputs(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13489 return _IMP_core.OrderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13490
13491 def get_value(self, *args):
13492 r"""
13493 get_value(OrderedTypeQuadPredicate self, IMP::core::ParticleTypes const & types) -> int
13494 get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13495 get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13496 """
13497 return _IMP_core.OrderedTypeQuadPredicate_get_value(self, *args)
13498
13499 def get_value_index(self, *args):
13500 r"""
13501 get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13502 get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13503 """
13504 return _IMP_core.OrderedTypeQuadPredicate_get_value_index(self, *args)
13505
13506 def get_version_info(self):
13507 r"""get_version_info(OrderedTypeQuadPredicate self) -> VersionInfo"""
13508 return _IMP_core.OrderedTypeQuadPredicate_get_version_info(self)
13509 __swig_destroy__ = _IMP_core.delete_OrderedTypeQuadPredicate
13510
13511 def __str__(self):
13512 r"""__str__(OrderedTypeQuadPredicate self) -> std::string"""
13513 return _IMP_core.OrderedTypeQuadPredicate___str__(self)
13514
13515 def __repr__(self):
13516 r"""__repr__(OrderedTypeQuadPredicate self) -> std::string"""
13517 return _IMP_core.OrderedTypeQuadPredicate___repr__(self)
13518
13519 @staticmethod
13520 def get_from(o):
13521 return _object_cast_to_OrderedTypeQuadPredicate(o)
13522
13523
13524# Register OrderedTypeQuadPredicate in _IMP_core:
13525_IMP_core.OrderedTypeQuadPredicate_swigregister(OrderedTypeQuadPredicate)
13526class AllSameQuadPredicate(IMP.QuadPredicate):
13527 r"""Proxy of C++ IMP::core::AllSameQuadPredicate class."""
13528
13529 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13530
13531 def __init__(self, *args):
13532 r"""__init__(AllSameQuadPredicate self, std::string name="AllSameQuadPredicate%1%") -> AllSameQuadPredicate"""
13533 _IMP_core.AllSameQuadPredicate_swiginit(self, _IMP_core.new_AllSameQuadPredicate(*args))
13534
13535 def do_get_inputs(self, arg2, arg3):
13536 r"""do_get_inputs(AllSameQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13537 return _IMP_core.AllSameQuadPredicate_do_get_inputs(self, arg2, arg3)
13538
13539 def get_value(self, *args):
13540 r"""
13541 get_value(AllSameQuadPredicate self, IMP::ParticleQuad const & a) -> int
13542 get_value(AllSameQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13543 """
13544 return _IMP_core.AllSameQuadPredicate_get_value(self, *args)
13545
13546 def get_value_index(self, *args):
13547 r"""
13548 get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13549 get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13550 """
13551 return _IMP_core.AllSameQuadPredicate_get_value_index(self, *args)
13552
13553 def get_version_info(self):
13554 r"""get_version_info(AllSameQuadPredicate self) -> VersionInfo"""
13555 return _IMP_core.AllSameQuadPredicate_get_version_info(self)
13556 __swig_destroy__ = _IMP_core.delete_AllSameQuadPredicate
13557
13558 def __str__(self):
13559 r"""__str__(AllSameQuadPredicate self) -> std::string"""
13560 return _IMP_core.AllSameQuadPredicate___str__(self)
13561
13562 def __repr__(self):
13563 r"""__repr__(AllSameQuadPredicate self) -> std::string"""
13564 return _IMP_core.AllSameQuadPredicate___repr__(self)
13565
13566 @staticmethod
13567 def get_from(o):
13568 return _object_cast_to_AllSameQuadPredicate(o)
13569
13570
13571 def _get_as_binary(self):
13572 r"""_get_as_binary(AllSameQuadPredicate self) -> PyObject *"""
13573 return _IMP_core.AllSameQuadPredicate__get_as_binary(self)
13574
13575 def _set_from_binary(self, p):
13576 r"""_set_from_binary(AllSameQuadPredicate self, PyObject * p)"""
13577 return _IMP_core.AllSameQuadPredicate__set_from_binary(self, p)
13578
13579 def __getstate__(self):
13580 p = self._get_as_binary()
13581 if len(self.__dict__) > 1:
13582 d = self.__dict__.copy()
13583 del d['this']
13584 p = (d, p)
13585 return p
13586
13587 def __setstate__(self, p):
13588 if not hasattr(self, 'this'):
13589 self.__init__()
13590 if isinstance(p, tuple):
13591 d, p = p
13592 self.__dict__.update(d)
13593 return self._set_from_binary(p)
13594
13595
13596# Register AllSameQuadPredicate in _IMP_core:
13597_IMP_core.AllSameQuadPredicate_swigregister(AllSameQuadPredicate)
13598class CoinFlipQuadPredicate(IMP.QuadPredicate):
13599 r"""Proxy of C++ IMP::core::CoinFlipQuadPredicate class."""
13600
13601 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13602
13603 def __init__(self, *args):
13604 r"""__init__(CoinFlipQuadPredicate self, double p, std::string name="CoinFlipQuadPredicate%1%") -> CoinFlipQuadPredicate"""
13605 _IMP_core.CoinFlipQuadPredicate_swiginit(self, _IMP_core.new_CoinFlipQuadPredicate(*args))
13606
13607 def do_get_inputs(self, arg2, arg3):
13608 r"""do_get_inputs(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13609 return _IMP_core.CoinFlipQuadPredicate_do_get_inputs(self, arg2, arg3)
13610
13611 def get_value(self, *args):
13612 r"""
13613 get_value(CoinFlipQuadPredicate self, IMP::ParticleQuad const & a) -> int
13614 get_value(CoinFlipQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13615 """
13616 return _IMP_core.CoinFlipQuadPredicate_get_value(self, *args)
13617
13618 def get_value_index(self, *args):
13619 r"""
13620 get_value_index(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13621 get_value_index(CoinFlipQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13622 """
13623 return _IMP_core.CoinFlipQuadPredicate_get_value_index(self, *args)
13624
13625 def get_version_info(self):
13626 r"""get_version_info(CoinFlipQuadPredicate self) -> VersionInfo"""
13627 return _IMP_core.CoinFlipQuadPredicate_get_version_info(self)
13628 __swig_destroy__ = _IMP_core.delete_CoinFlipQuadPredicate
13629
13630 def __str__(self):
13631 r"""__str__(CoinFlipQuadPredicate self) -> std::string"""
13632 return _IMP_core.CoinFlipQuadPredicate___str__(self)
13633
13634 def __repr__(self):
13635 r"""__repr__(CoinFlipQuadPredicate self) -> std::string"""
13636 return _IMP_core.CoinFlipQuadPredicate___repr__(self)
13637
13638 @staticmethod
13639 def get_from(o):
13640 return _object_cast_to_CoinFlipQuadPredicate(o)
13641
13642
13643# Register CoinFlipQuadPredicate in _IMP_core:
13644_IMP_core.CoinFlipQuadPredicate_swigregister(CoinFlipQuadPredicate)
13645class InBoundingBox3DSingletonPredicate(IMP.SingletonPredicate):
13646 r"""Proxy of C++ IMP::core::InBoundingBox3DSingletonPredicate class."""
13647
13648 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13649
13650 def __init__(self, *args):
13651 r"""__init__(InBoundingBox3DSingletonPredicate self, BoundingBox3D bb, std::string name="InBoundingBox3DSingletonPredicate%1%") -> InBoundingBox3DSingletonPredicate"""
13652 _IMP_core.InBoundingBox3DSingletonPredicate_swiginit(self, _IMP_core.new_InBoundingBox3DSingletonPredicate(*args))
13653
13654 def do_get_inputs(self, m, pi):
13655 r"""do_get_inputs(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13656 return _IMP_core.InBoundingBox3DSingletonPredicate_do_get_inputs(self, m, pi)
13657
13658 def get_value(self, *args):
13659 r"""
13660 get_value(InBoundingBox3DSingletonPredicate self, Particle a) -> int
13661 get_value(InBoundingBox3DSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13662 """
13663 return _IMP_core.InBoundingBox3DSingletonPredicate_get_value(self, *args)
13664
13665 def get_value_index(self, *args):
13666 r"""
13667 get_value_index(InBoundingBox3DSingletonPredicate self, Model m, ParticleIndex pi) -> int
13668 get_value_index(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13669 """
13670 return _IMP_core.InBoundingBox3DSingletonPredicate_get_value_index(self, *args)
13671
13672 def get_version_info(self):
13673 r"""get_version_info(InBoundingBox3DSingletonPredicate self) -> VersionInfo"""
13674 return _IMP_core.InBoundingBox3DSingletonPredicate_get_version_info(self)
13675 __swig_destroy__ = _IMP_core.delete_InBoundingBox3DSingletonPredicate
13676
13677 def __str__(self):
13678 r"""__str__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13679 return _IMP_core.InBoundingBox3DSingletonPredicate___str__(self)
13680
13681 def __repr__(self):
13682 r"""__repr__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13683 return _IMP_core.InBoundingBox3DSingletonPredicate___repr__(self)
13684
13685 @staticmethod
13686 def get_from(o):
13687 return _object_cast_to_InBoundingBox3DSingletonPredicate(o)
13688
13689
13690# Register InBoundingBox3DSingletonPredicate in _IMP_core:
13691_IMP_core.InBoundingBox3DSingletonPredicate_swigregister(InBoundingBox3DSingletonPredicate)
13692class AttributeSingletonPredicate(IMP.SingletonPredicate):
13693 r"""Proxy of C++ IMP::core::AttributeSingletonPredicate class."""
13694
13695 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13696
13697 def __init__(self, *args):
13698 r"""__init__(AttributeSingletonPredicate self, IntKey bb, std::string name="AttributeSingletonPredicate%1%") -> AttributeSingletonPredicate"""
13699 _IMP_core.AttributeSingletonPredicate_swiginit(self, _IMP_core.new_AttributeSingletonPredicate(*args))
13700
13701 def do_get_inputs(self, m, pi):
13702 r"""do_get_inputs(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13703 return _IMP_core.AttributeSingletonPredicate_do_get_inputs(self, m, pi)
13704
13705 def get_value(self, *args):
13706 r"""
13707 get_value(AttributeSingletonPredicate self, Particle a) -> int
13708 get_value(AttributeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13709 """
13710 return _IMP_core.AttributeSingletonPredicate_get_value(self, *args)
13711
13712 def get_value_index(self, *args):
13713 r"""
13714 get_value_index(AttributeSingletonPredicate self, Model m, ParticleIndex pi) -> int
13715 get_value_index(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13716 """
13717 return _IMP_core.AttributeSingletonPredicate_get_value_index(self, *args)
13718
13719 def get_version_info(self):
13720 r"""get_version_info(AttributeSingletonPredicate self) -> VersionInfo"""
13721 return _IMP_core.AttributeSingletonPredicate_get_version_info(self)
13722 __swig_destroy__ = _IMP_core.delete_AttributeSingletonPredicate
13723
13724 def __str__(self):
13725 r"""__str__(AttributeSingletonPredicate self) -> std::string"""
13726 return _IMP_core.AttributeSingletonPredicate___str__(self)
13727
13728 def __repr__(self):
13729 r"""__repr__(AttributeSingletonPredicate self) -> std::string"""
13730 return _IMP_core.AttributeSingletonPredicate___repr__(self)
13731
13732 @staticmethod
13733 def get_from(o):
13734 return _object_cast_to_AttributeSingletonPredicate(o)
13735
13736
13737# Register AttributeSingletonPredicate in _IMP_core:
13738_IMP_core.AttributeSingletonPredicate_swigregister(AttributeSingletonPredicate)
13739class IsCollisionPairPredicate(IMP.PairPredicate):
13740 r"""Proxy of C++ IMP::core::IsCollisionPairPredicate class."""
13741
13742 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13743
13744 def __init__(self, *args):
13745 r"""__init__(IsCollisionPairPredicate self, std::string name="CollisionPairPredicate%1%") -> IsCollisionPairPredicate"""
13746 _IMP_core.IsCollisionPairPredicate_swiginit(self, _IMP_core.new_IsCollisionPairPredicate(*args))
13747
13748 def do_get_inputs(self, m, pi):
13749 r"""do_get_inputs(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13750 return _IMP_core.IsCollisionPairPredicate_do_get_inputs(self, m, pi)
13751
13752 def get_value(self, *args):
13753 r"""
13754 get_value(IsCollisionPairPredicate self, IMP::ParticlePair const & a) -> int
13755 get_value(IsCollisionPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
13756 """
13757 return _IMP_core.IsCollisionPairPredicate_get_value(self, *args)
13758
13759 def get_value_index(self, *args):
13760 r"""
13761 get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
13762 get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
13763 """
13764 return _IMP_core.IsCollisionPairPredicate_get_value_index(self, *args)
13765
13766 def get_version_info(self):
13767 r"""get_version_info(IsCollisionPairPredicate self) -> VersionInfo"""
13768 return _IMP_core.IsCollisionPairPredicate_get_version_info(self)
13769 __swig_destroy__ = _IMP_core.delete_IsCollisionPairPredicate
13770
13771 def __str__(self):
13772 r"""__str__(IsCollisionPairPredicate self) -> std::string"""
13773 return _IMP_core.IsCollisionPairPredicate___str__(self)
13774
13775 def __repr__(self):
13776 r"""__repr__(IsCollisionPairPredicate self) -> std::string"""
13777 return _IMP_core.IsCollisionPairPredicate___repr__(self)
13778
13779 @staticmethod
13780 def get_from(o):
13781 return _object_cast_to_IsCollisionPairPredicate(o)
13782
13783
13784# Register IsCollisionPairPredicate in _IMP_core:
13785_IMP_core.IsCollisionPairPredicate_swigregister(IsCollisionPairPredicate)
13786class AngleRestraint(TripletRestraint):
13787 r"""Proxy of C++ IMP::core::AngleRestraint class."""
13788
13789 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13790
13791 def __init__(self, *args):
13792 r"""
13793 __init__(AngleRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3) -> AngleRestraint
13794 __init__(AngleRestraint self) -> AngleRestraint
13795 """
13796 _IMP_core.AngleRestraint_swiginit(self, _IMP_core.new_AngleRestraint(*args))
13797 __swig_destroy__ = _IMP_core.delete_AngleRestraint
13798
13799 def __str__(self):
13800 r"""__str__(AngleRestraint self) -> std::string"""
13801 return _IMP_core.AngleRestraint___str__(self)
13802
13803 def __repr__(self):
13804 r"""__repr__(AngleRestraint self) -> std::string"""
13805 return _IMP_core.AngleRestraint___repr__(self)
13806
13807 @staticmethod
13808 def get_from(o):
13809 return _object_cast_to_AngleRestraint(o)
13810
13811
13812 def _get_as_binary(self):
13813 r"""_get_as_binary(AngleRestraint self) -> PyObject *"""
13814 return _IMP_core.AngleRestraint__get_as_binary(self)
13815
13816 def _set_from_binary(self, p):
13817 r"""_set_from_binary(AngleRestraint self, PyObject * p)"""
13818 return _IMP_core.AngleRestraint__set_from_binary(self, p)
13819
13820 def __getstate__(self):
13821 p = self._get_as_binary()
13822 if len(self.__dict__) > 1:
13823 d = self.__dict__.copy()
13824 del d['this']
13825 p = (d, p)
13826 return p
13827
13828 def __setstate__(self, p):
13829 if not hasattr(self, 'this'):
13830 self.__init__()
13831 if isinstance(p, tuple):
13832 d, p = p
13833 self.__dict__.update(d)
13834 return self._set_from_binary(p)
13835
13836
13837# Register AngleRestraint in _IMP_core:
13838_IMP_core.AngleRestraint_swigregister(AngleRestraint)
13839class DihedralRestraint(QuadRestraint):
13840 r"""Proxy of C++ IMP::core::DihedralRestraint class."""
13841
13842 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13843
13844 def __init__(self, *args):
13845 r"""
13846 __init__(DihedralRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3, _ParticleIndexAdaptor p4) -> DihedralRestraint
13847 __init__(DihedralRestraint self) -> DihedralRestraint
13848 """
13849 _IMP_core.DihedralRestraint_swiginit(self, _IMP_core.new_DihedralRestraint(*args))
13850 __swig_destroy__ = _IMP_core.delete_DihedralRestraint
13851
13852 def __str__(self):
13853 r"""__str__(DihedralRestraint self) -> std::string"""
13854 return _IMP_core.DihedralRestraint___str__(self)
13855
13856 def __repr__(self):
13857 r"""__repr__(DihedralRestraint self) -> std::string"""
13858 return _IMP_core.DihedralRestraint___repr__(self)
13859
13860 @staticmethod
13861 def get_from(o):
13862 return _object_cast_to_DihedralRestraint(o)
13863
13864
13865 def _get_as_binary(self):
13866 r"""_get_as_binary(DihedralRestraint self) -> PyObject *"""
13867 return _IMP_core.DihedralRestraint__get_as_binary(self)
13868
13869 def _set_from_binary(self, p):
13870 r"""_set_from_binary(DihedralRestraint self, PyObject * p)"""
13871 return _IMP_core.DihedralRestraint__set_from_binary(self, p)
13872
13873 def __getstate__(self):
13874 p = self._get_as_binary()
13875 if len(self.__dict__) > 1:
13876 d = self.__dict__.copy()
13877 del d['this']
13878 p = (d, p)
13879 return p
13880
13881 def __setstate__(self, p):
13882 if not hasattr(self, 'this'):
13883 self.__init__()
13884 if isinstance(p, tuple):
13885 d, p = p
13886 self.__dict__.update(d)
13887 return self._set_from_binary(p)
13888
13889
13890# Register DihedralRestraint in _IMP_core:
13891_IMP_core.DihedralRestraint_swigregister(DihedralRestraint)
13892class RigidBodyMover(MonteCarloMover):
13893 r"""Proxy of C++ IMP::core::RigidBodyMover class."""
13894
13895 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13896
13897 def __init__(self, *args):
13898 r"""
13899 __init__(RigidBodyMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation) -> RigidBodyMover
13900 __init__(RigidBodyMover self) -> RigidBodyMover
13901 """
13902 _IMP_core.RigidBodyMover_swiginit(self, _IMP_core.new_RigidBodyMover(*args))
13903
13904 def set_maximum_translation(self, mt):
13905 r"""set_maximum_translation(RigidBodyMover self, IMP::Float mt)"""
13906 return _IMP_core.RigidBodyMover_set_maximum_translation(self, mt)
13907
13908 def set_maximum_rotation(self, mr):
13909 r"""set_maximum_rotation(RigidBodyMover self, IMP::Float mr)"""
13910 return _IMP_core.RigidBodyMover_set_maximum_rotation(self, mr)
13911
13912 def get_maximum_translation(self):
13913 r"""get_maximum_translation(RigidBodyMover self) -> IMP::Float"""
13914 return _IMP_core.RigidBodyMover_get_maximum_translation(self)
13915
13916 def get_maximum_rotation(self):
13917 r"""get_maximum_rotation(RigidBodyMover self) -> IMP::Float"""
13918 return _IMP_core.RigidBodyMover_get_maximum_rotation(self)
13919
13920 def get_index(self):
13921 r"""get_index(RigidBodyMover self) -> ParticleIndex"""
13922 return _IMP_core.RigidBodyMover_get_index(self)
13923
13924 def get_version_info(self):
13925 r"""get_version_info(RigidBodyMover self) -> VersionInfo"""
13926 return _IMP_core.RigidBodyMover_get_version_info(self)
13927 __swig_destroy__ = _IMP_core.delete_RigidBodyMover
13928
13929 def __str__(self):
13930 r"""__str__(RigidBodyMover self) -> std::string"""
13931 return _IMP_core.RigidBodyMover___str__(self)
13932
13933 def __repr__(self):
13934 r"""__repr__(RigidBodyMover self) -> std::string"""
13935 return _IMP_core.RigidBodyMover___repr__(self)
13936
13937 @staticmethod
13938 def get_from(o):
13939 return _object_cast_to_RigidBodyMover(o)
13940
13941
13942 def _get_as_binary(self):
13943 r"""_get_as_binary(RigidBodyMover self) -> PyObject *"""
13944 return _IMP_core.RigidBodyMover__get_as_binary(self)
13945
13946 def _set_from_binary(self, p):
13947 r"""_set_from_binary(RigidBodyMover self, PyObject * p)"""
13948 return _IMP_core.RigidBodyMover__set_from_binary(self, p)
13949
13950 def __getstate__(self):
13951 p = self._get_as_binary()
13952 if len(self.__dict__) > 1:
13953 d = self.__dict__.copy()
13954 del d['this']
13955 p = (d, p)
13956 return p
13957
13958 def __setstate__(self, p):
13959 if not hasattr(self, 'this'):
13960 self.__init__()
13961 if isinstance(p, tuple):
13962 d, p = p
13963 self.__dict__.update(d)
13964 return self._set_from_binary(p)
13965
13966
13967 def _get_jax(self, space):
13968 import jax.random
13969 import IMP.core._jax_rigid
13970 from IMP.algebra.jax import (get_random_vector_on_3d_sphere,
13971 get_random_vector_in_3d_sphere,
13972 get_rotation_about_normalized_axis,
13973 _quaternion_multiply)
13974 max_angle = self.get_maximum_rotation()
13975 max_translation = self.get_maximum_translation()
13976 particle_index = self.get_index()
13977 body_index = IMP.core._jax_rigid._get_rigid_body_index(
13978 self.get_model(), self.get_index())
13979
13980 def init_func(key):
13981 return key
13982
13983 def propose_func(jm, key):
13984 body = jm['rigid_bodies'].bodies[body_index]
13985 tf = body.get_transformation(jm)
13986
13987 if max_translation > 0:
13988 key, subkey = jax.random.split(key)
13989 tf.translation = space.shift(
13990 tf.translation,
13991 get_random_vector_in_3d_sphere(subkey, max_translation)[0])
13992 if max_angle > 0:
13993 key, subkey1, subkey2 = jax.random.split(key, 3)
13994 axis_norm = get_random_vector_on_3d_sphere(subkey1, 1.0)[0]
13995 angle = jax.random.uniform(
13996 subkey2, minval=-max_angle, maxval=max_angle)
13997 rotation = get_rotation_about_normalized_axis(axis_norm, angle)
13998 tf.rotation = _quaternion_multiply(rotation, tf.rotation)
13999 jm = body.set_transformation_lazy(tf, jm)
14000 return jm, key, 1.0
14001
14002 return self._wrap_jax(init_func, propose_func, keys=['rigid_bodies'])
14003
14004
14005# Register RigidBodyMover in _IMP_core:
14006_IMP_core.RigidBodyMover_swigregister(RigidBodyMover)
14007class RigidBodyTunneler(MonteCarloMover):
14008 r"""Proxy of C++ IMP::core::RigidBodyTunneler class."""
14009
14010 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14011
14012 def __init__(self, m, pis, ref, k, move_probability=1.):
14013 r"""__init__(RigidBodyTunneler self, Model m, IMP::ParticleIndexes pis, ParticleIndex ref, double k, double move_probability=1.) -> RigidBodyTunneler"""
14014 _IMP_core.RigidBodyTunneler_swiginit(self, _IMP_core.new_RigidBodyTunneler(m, pis, ref, k, move_probability))
14015
14016 def add_entry_point(self, fl):
14017 r"""add_entry_point(RigidBodyTunneler self, IMP::Floats fl)"""
14018 return _IMP_core.RigidBodyTunneler_add_entry_point(self, fl)
14019
14020 def reset_stats(self):
14021 r"""reset_stats(RigidBodyTunneler self)"""
14022 return _IMP_core.RigidBodyTunneler_reset_stats(self)
14023
14024 def get_number_of_rejected_moves(self):
14025 r"""get_number_of_rejected_moves(RigidBodyTunneler self) -> unsigned int"""
14026 return _IMP_core.RigidBodyTunneler_get_number_of_rejected_moves(self)
14027
14028 def get_number_of_proposed_moves(self):
14029 r"""get_number_of_proposed_moves(RigidBodyTunneler self) -> unsigned int"""
14030 return _IMP_core.RigidBodyTunneler_get_number_of_proposed_moves(self)
14031
14032 def get_number_of_impossible_moves(self):
14033 r"""get_number_of_impossible_moves(RigidBodyTunneler self) -> unsigned int"""
14034 return _IMP_core.RigidBodyTunneler_get_number_of_impossible_moves(self)
14035
14036 def get_number_of_calls(self):
14037 r"""get_number_of_calls(RigidBodyTunneler self) -> unsigned int"""
14038 return _IMP_core.RigidBodyTunneler_get_number_of_calls(self)
14039
14040 @staticmethod
14041 def get_reduced_coordinates(*args):
14042 r"""
14043 get_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref) -> IMP::Floats
14044 get_reduced_coordinates(Model m, ParticleIndex pi) -> IMP::Floats
14045 """
14046 return _IMP_core.RigidBodyTunneler_get_reduced_coordinates(*args)
14047
14048 @staticmethod
14049 def set_reduced_coordinates(m, target, ref, coords):
14050 r"""set_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref, IMP::Floats coords)"""
14051 return _IMP_core.RigidBodyTunneler_set_reduced_coordinates(m, target, ref, coords)
14052
14053 def get_version_info(self):
14054 r"""get_version_info(RigidBodyTunneler self) -> VersionInfo"""
14055 return _IMP_core.RigidBodyTunneler_get_version_info(self)
14056 __swig_destroy__ = _IMP_core.delete_RigidBodyTunneler
14057
14058 def __str__(self):
14059 r"""__str__(RigidBodyTunneler self) -> std::string"""
14060 return _IMP_core.RigidBodyTunneler___str__(self)
14061
14062 def __repr__(self):
14063 r"""__repr__(RigidBodyTunneler self) -> std::string"""
14064 return _IMP_core.RigidBodyTunneler___repr__(self)
14065
14066 @staticmethod
14067 def get_from(o):
14068 return _object_cast_to_RigidBodyTunneler(o)
14069
14070
14071# Register RigidBodyTunneler in _IMP_core:
14072_IMP_core.RigidBodyTunneler_swigregister(RigidBodyTunneler)
14073class RigidBodyUmbrella(IMP.Restraint):
14074 r"""Proxy of C++ IMP::core::RigidBodyUmbrella class."""
14075
14076 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14077
14078 def __init__(self, *args):
14079 r"""
14080 __init__(RigidBodyUmbrella self, Model m, ParticleIndex pi, ParticleIndex ref, IMP::Floats x0, double alpha, double k, std::string name="RigidBodyUmbrella %1%") -> RigidBodyUmbrella
14081 __init__(RigidBodyUmbrella self, Model m, ParticleIndex pi, ParticleIndex ref, double _lambda, IMP::Floats x1, IMP::Floats x2, double alpha, double k, std::string name="RigidBodyUmbrella %1%") -> RigidBodyUmbrella
14082 """
14083 _IMP_core.RigidBodyUmbrella_swiginit(self, _IMP_core.new_RigidBodyUmbrella(*args))
14084
14085 def set_x0(self, *args):
14086 r"""
14087 set_x0(RigidBodyUmbrella self, IMP::Floats x0)
14088 set_x0(RigidBodyUmbrella self, double _lambda, IMP::Floats x1, IMP::Floats x2)
14089 """
14090 return _IMP_core.RigidBodyUmbrella_set_x0(self, *args)
14091
14092 def get_x0(self):
14093 r"""get_x0(RigidBodyUmbrella self) -> IMP::Floats"""
14094 return _IMP_core.RigidBodyUmbrella_get_x0(self)
14095
14096 def get_x(self):
14097 r"""get_x(RigidBodyUmbrella self) -> IMP::Floats"""
14098 return _IMP_core.RigidBodyUmbrella_get_x(self)
14099
14100 def set_alpha(self, alpha):
14101 r"""set_alpha(RigidBodyUmbrella self, double alpha)"""
14102 return _IMP_core.RigidBodyUmbrella_set_alpha(self, alpha)
14103
14104 def set_k(self, k):
14105 r"""set_k(RigidBodyUmbrella self, double k)"""
14106 return _IMP_core.RigidBodyUmbrella_set_k(self, k)
14107
14108 def get_version_info(self):
14109 r"""get_version_info(RigidBodyUmbrella self) -> VersionInfo"""
14110 return _IMP_core.RigidBodyUmbrella_get_version_info(self)
14111 __swig_destroy__ = _IMP_core.delete_RigidBodyUmbrella
14112
14113 def __str__(self):
14114 r"""__str__(RigidBodyUmbrella self) -> std::string"""
14115 return _IMP_core.RigidBodyUmbrella___str__(self)
14116
14117 def __repr__(self):
14118 r"""__repr__(RigidBodyUmbrella self) -> std::string"""
14119 return _IMP_core.RigidBodyUmbrella___repr__(self)
14120
14121 @staticmethod
14122 def get_from(o):
14123 return _object_cast_to_RigidBodyUmbrella(o)
14124
14125
14126# Register RigidBodyUmbrella in _IMP_core:
14127_IMP_core.RigidBodyUmbrella_swigregister(RigidBodyUmbrella)
14128class VolumeRestraint(IMP.Restraint):
14129 r"""Proxy of C++ IMP::core::VolumeRestraint class."""
14130
14131 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14132
14133 def __init__(self, f, sc, volume):
14134 r"""__init__(VolumeRestraint self, UnaryFunction f, SingletonContainer sc, double volume) -> VolumeRestraint"""
14135 _IMP_core.VolumeRestraint_swiginit(self, _IMP_core.new_VolumeRestraint(f, sc, volume))
14136
14137 def do_get_inputs(self):
14138 r"""do_get_inputs(VolumeRestraint self) -> IMP::ModelObjectsTemp"""
14139 return _IMP_core.VolumeRestraint_do_get_inputs(self)
14140
14141 def get_version_info(self):
14142 r"""get_version_info(VolumeRestraint self) -> VersionInfo"""
14143 return _IMP_core.VolumeRestraint_get_version_info(self)
14144 __swig_destroy__ = _IMP_core.delete_VolumeRestraint
14145
14146 def __str__(self):
14147 r"""__str__(VolumeRestraint self) -> std::string"""
14148 return _IMP_core.VolumeRestraint___str__(self)
14149
14150 def __repr__(self):
14151 r"""__repr__(VolumeRestraint self) -> std::string"""
14152 return _IMP_core.VolumeRestraint___repr__(self)
14153
14154 @staticmethod
14155 def get_from(o):
14156 return _object_cast_to_VolumeRestraint(o)
14157
14158
14159# Register VolumeRestraint in _IMP_core:
14160_IMP_core.VolumeRestraint_swigregister(VolumeRestraint)
14161
14162def get_centroid(ps):
14163 r"""get_centroid(IMP::core::XYZs const & ps) -> Vector3D"""
14164 return _IMP_core.get_centroid(ps)
14165
14166def get_bounding_box(ps):
14167 r"""get_bounding_box(IMP::core::XYZRs const & ps) -> BoundingBox3D"""
14168 return _IMP_core.get_bounding_box(ps)
14169class MoveStatisticsScoreState(IMP.ScoreState):
14170 r"""Proxy of C++ IMP::core::MoveStatisticsScoreState class."""
14171
14172 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14173
14174 def __init__(self, ps):
14175 r"""__init__(MoveStatisticsScoreState self, IMP::ParticlesTemp const & ps) -> MoveStatisticsScoreState"""
14176 _IMP_core.MoveStatisticsScoreState_swiginit(self, _IMP_core.new_MoveStatisticsScoreState(ps))
14177
14178 def show_statistics(self, *args):
14179 r"""show_statistics(MoveStatisticsScoreState self, _ostream out=std::cout)"""
14180 return _IMP_core.MoveStatisticsScoreState_show_statistics(self, *args)
14181
14182 def reset(self):
14183 r"""reset(MoveStatisticsScoreState self)"""
14184 return _IMP_core.MoveStatisticsScoreState_reset(self)
14185
14186 def do_before_evaluate(self):
14187 r"""do_before_evaluate(MoveStatisticsScoreState self)"""
14188 return _IMP_core.MoveStatisticsScoreState_do_before_evaluate(self)
14189
14190 def do_after_evaluate(self, da):
14191 r"""do_after_evaluate(MoveStatisticsScoreState self, DerivativeAccumulator da)"""
14192 return _IMP_core.MoveStatisticsScoreState_do_after_evaluate(self, da)
14193
14194 def do_get_inputs(self):
14195 r"""do_get_inputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
14196 return _IMP_core.MoveStatisticsScoreState_do_get_inputs(self)
14197
14198 def do_get_outputs(self):
14199 r"""do_get_outputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
14200 return _IMP_core.MoveStatisticsScoreState_do_get_outputs(self)
14201
14202 def get_version_info(self):
14203 r"""get_version_info(MoveStatisticsScoreState self) -> VersionInfo"""
14204 return _IMP_core.MoveStatisticsScoreState_get_version_info(self)
14205 __swig_destroy__ = _IMP_core.delete_MoveStatisticsScoreState
14206
14207 def __str__(self):
14208 r"""__str__(MoveStatisticsScoreState self) -> std::string"""
14209 return _IMP_core.MoveStatisticsScoreState___str__(self)
14210
14211 def __repr__(self):
14212 r"""__repr__(MoveStatisticsScoreState self) -> std::string"""
14213 return _IMP_core.MoveStatisticsScoreState___repr__(self)
14214
14215 @staticmethod
14216 def get_from(o):
14217 return _object_cast_to_MoveStatisticsScoreState(o)
14218
14219
14220# Register MoveStatisticsScoreState in _IMP_core:
14221_IMP_core.MoveStatisticsScoreState_swigregister(MoveStatisticsScoreState)
14222IMP_PARTICLE_TYPE_INDEX = _IMP_core.IMP_PARTICLE_TYPE_INDEX
14223
14224class Typed(IMP.Decorator):
14225 r"""Proxy of C++ IMP::core::Typed class."""
14226
14227 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14228
14229 @staticmethod
14230 def get_type_key():
14231 r"""get_type_key() -> IntKey"""
14232 return _IMP_core.Typed_get_type_key()
14233
14234 def __init__(self, *args):
14235 r"""
14236 __init__(Typed self) -> Typed
14237 __init__(Typed self, Model m, ParticleIndex id) -> Typed
14238 __init__(Typed self, _ParticleAdaptor d) -> Typed
14239 """
14240 _IMP_core.Typed_swiginit(self, _IMP_core.new_Typed(*args))
14241
14242 def show(self, *args):
14243 r"""show(Typed self, _ostream out=std::cout)"""
14244 return _IMP_core.Typed_show(self, *args)
14245
14246 @staticmethod
14247 def setup_particle(*args):
14248 r"""
14249 setup_particle(Model m, ParticleIndex pi, ParticleType t) -> Typed
14250 setup_particle(_ParticleAdaptor pa, ParticleType t) -> Typed
14251 """
14252 return _IMP_core.Typed_setup_particle(*args)
14253
14254 @staticmethod
14255 def get_is_setup(*args):
14256 r"""
14257 get_is_setup(_ParticleAdaptor p) -> bool
14258 get_is_setup(Model m, ParticleIndex pi) -> bool
14259 """
14260 return _IMP_core.Typed_get_is_setup(*args)
14261
14262 def get_type(self):
14263 r"""get_type(Typed self) -> ParticleType"""
14264 return _IMP_core.Typed_get_type(self)
14265
14266 def set_type(self, pt):
14267 r"""set_type(Typed self, ParticleType pt)"""
14268 return _IMP_core.Typed_set_type(self, pt)
14269
14270 def add_attribute(self, *args):
14271 r"""
14272 add_attribute(Typed self, FloatKey k, IMP::Float v, bool opt)
14273 add_attribute(Typed self, FloatKey a0, IMP::Float a1)
14274 add_attribute(Typed self, IntKey a0, IMP::Int a1)
14275 add_attribute(Typed self, FloatsKey a0, IMP::Floats a1)
14276 add_attribute(Typed self, IntsKey a0, IMP::Ints a1)
14277 add_attribute(Typed self, StringKey a0, IMP::String a1)
14278 add_attribute(Typed self, ParticleIndexKey a0, Particle a1)
14279 add_attribute(Typed self, ObjectKey a0, Object a1)
14280 add_attribute(Typed self, SparseFloatKey a0, IMP::Float a1)
14281 add_attribute(Typed self, SparseIntKey a0, IMP::Int a1)
14282 add_attribute(Typed self, SparseStringKey a0, IMP::String a1)
14283 add_attribute(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14284 """
14285 return _IMP_core.Typed_add_attribute(self, *args)
14286
14287 def get_value(self, *args):
14288 r"""
14289 get_value(Typed self, FloatKey a0) -> IMP::Float
14290 get_value(Typed self, IntKey a0) -> IMP::Int
14291 get_value(Typed self, FloatsKey a0) -> IMP::Floats
14292 get_value(Typed self, IntsKey a0) -> IMP::Ints
14293 get_value(Typed self, StringKey a0) -> IMP::String
14294 get_value(Typed self, ParticleIndexKey a0) -> Particle
14295 get_value(Typed self, ObjectKey a0) -> Object
14296 get_value(Typed self, SparseFloatKey a0) -> IMP::Float
14297 get_value(Typed self, SparseIntKey a0) -> IMP::Int
14298 get_value(Typed self, SparseStringKey a0) -> IMP::String
14299 get_value(Typed self, SparseParticleIndexKey a0) -> ParticleIndex
14300 """
14301 return _IMP_core.Typed_get_value(self, *args)
14302
14303 def set_value(self, *args):
14304 r"""
14305 set_value(Typed self, FloatKey a0, IMP::Float a1)
14306 set_value(Typed self, IntKey a0, IMP::Int a1)
14307 set_value(Typed self, FloatsKey a0, IMP::Floats a1)
14308 set_value(Typed self, IntsKey a0, IMP::Ints a1)
14309 set_value(Typed self, StringKey a0, IMP::String a1)
14310 set_value(Typed self, ParticleIndexKey a0, Particle a1)
14311 set_value(Typed self, ObjectKey a0, Object a1)
14312 set_value(Typed self, SparseFloatKey a0, IMP::Float a1)
14313 set_value(Typed self, SparseIntKey a0, IMP::Int a1)
14314 set_value(Typed self, SparseStringKey a0, IMP::String a1)
14315 set_value(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14316 """
14317 return _IMP_core.Typed_set_value(self, *args)
14318
14319 def remove_attribute(self, *args):
14320 r"""
14321 remove_attribute(Typed self, FloatKey a0)
14322 remove_attribute(Typed self, IntKey a0)
14323 remove_attribute(Typed self, FloatsKey a0)
14324 remove_attribute(Typed self, IntsKey a0)
14325 remove_attribute(Typed self, StringKey a0)
14326 remove_attribute(Typed self, ParticleIndexKey a0)
14327 remove_attribute(Typed self, ObjectKey a0)
14328 remove_attribute(Typed self, SparseFloatKey a0)
14329 remove_attribute(Typed self, SparseIntKey a0)
14330 remove_attribute(Typed self, SparseStringKey a0)
14331 remove_attribute(Typed self, SparseParticleIndexKey a0)
14332 """
14333 return _IMP_core.Typed_remove_attribute(self, *args)
14334
14335 def has_attribute(self, *args):
14336 r"""
14337 has_attribute(Typed self, FloatKey a0) -> bool
14338 has_attribute(Typed self, IntKey a0) -> bool
14339 has_attribute(Typed self, FloatsKey a0) -> bool
14340 has_attribute(Typed self, IntsKey a0) -> bool
14341 has_attribute(Typed self, StringKey a0) -> bool
14342 has_attribute(Typed self, ParticleIndexKey a0) -> bool
14343 has_attribute(Typed self, ObjectKey a0) -> bool
14344 has_attribute(Typed self, SparseFloatKey a0) -> bool
14345 has_attribute(Typed self, SparseIntKey a0) -> bool
14346 has_attribute(Typed self, SparseStringKey a0) -> bool
14347 has_attribute(Typed self, SparseParticleIndexKey a0) -> bool
14348 """
14349 return _IMP_core.Typed_has_attribute(self, *args)
14350
14351 def get_derivative(self, a0):
14352 r"""get_derivative(Typed self, FloatKey a0) -> double"""
14353 return _IMP_core.Typed_get_derivative(self, a0)
14354
14355 def get_name(self):
14356 r"""get_name(Typed self) -> std::string"""
14357 return _IMP_core.Typed_get_name(self)
14358
14359 def clear_caches(self):
14360 r"""clear_caches(Typed self)"""
14361 return _IMP_core.Typed_clear_caches(self)
14362
14363 def set_name(self, a0):
14364 r"""set_name(Typed self, std::string a0)"""
14365 return _IMP_core.Typed_set_name(self, a0)
14366
14367 def set_check_level(self, a0):
14368 r"""set_check_level(Typed self, IMP::CheckLevel a0)"""
14369 return _IMP_core.Typed_set_check_level(self, a0)
14370
14371 def add_to_derivative(self, a0, a1, a2):
14372 r"""add_to_derivative(Typed self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14373 return _IMP_core.Typed_add_to_derivative(self, a0, a1, a2)
14374
14375 def set_is_optimized(self, a0, a1):
14376 r"""set_is_optimized(Typed self, FloatKey a0, bool a1)"""
14377 return _IMP_core.Typed_set_is_optimized(self, a0, a1)
14378
14379 def get_is_optimized(self, a0):
14380 r"""get_is_optimized(Typed self, FloatKey a0) -> bool"""
14381 return _IMP_core.Typed_get_is_optimized(self, a0)
14382
14383 def get_check_level(self):
14384 r"""get_check_level(Typed self) -> IMP::CheckLevel"""
14385 return _IMP_core.Typed_get_check_level(self)
14386
14387 def __eq__(self, *args):
14388 r"""
14389 __eq__(Typed self, Typed o) -> bool
14390 __eq__(Typed self, Particle d) -> bool
14391 """
14392 return _IMP_core.Typed___eq__(self, *args)
14393
14394 def __ne__(self, *args):
14395 r"""
14396 __ne__(Typed self, Typed o) -> bool
14397 __ne__(Typed self, Particle d) -> bool
14398 """
14399 return _IMP_core.Typed___ne__(self, *args)
14400
14401 def __le__(self, *args):
14402 r"""
14403 __le__(Typed self, Typed o) -> bool
14404 __le__(Typed self, Particle d) -> bool
14405 """
14406 return _IMP_core.Typed___le__(self, *args)
14407
14408 def __lt__(self, *args):
14409 r"""
14410 __lt__(Typed self, Typed o) -> bool
14411 __lt__(Typed self, Particle d) -> bool
14412 """
14413 return _IMP_core.Typed___lt__(self, *args)
14414
14415 def __ge__(self, *args):
14416 r"""
14417 __ge__(Typed self, Typed o) -> bool
14418 __ge__(Typed self, Particle d) -> bool
14419 """
14420 return _IMP_core.Typed___ge__(self, *args)
14421
14422 def __gt__(self, *args):
14423 r"""
14424 __gt__(Typed self, Typed o) -> bool
14425 __gt__(Typed self, Particle d) -> bool
14426 """
14427 return _IMP_core.Typed___gt__(self, *args)
14428
14429 def __hash__(self):
14430 r"""__hash__(Typed self) -> std::size_t"""
14431 return _IMP_core.Typed___hash__(self)
14432
14433 def __str__(self):
14434 r"""__str__(Typed self) -> std::string"""
14435 return _IMP_core.Typed___str__(self)
14436
14437 def __repr__(self):
14438 r"""__repr__(Typed self) -> std::string"""
14439 return _IMP_core.Typed___repr__(self)
14440
14441 def _get_as_binary(self):
14442 r"""_get_as_binary(Typed self) -> PyObject *"""
14443 return _IMP_core.Typed__get_as_binary(self)
14444
14445 def _set_from_binary(self, p):
14446 r"""_set_from_binary(Typed self, PyObject * p)"""
14447 return _IMP_core.Typed__set_from_binary(self, p)
14448
14449 def __getstate__(self):
14450 p = self._get_as_binary()
14451 if len(self.__dict__) > 1:
14452 d = self.__dict__.copy()
14453 del d['this']
14454 p = (d, p)
14455 return p
14456
14457 def __setstate__(self, p):
14458 if not hasattr(self, 'this'):
14459 self.__init__()
14460 if isinstance(p, tuple):
14461 d, p = p
14462 self.__dict__.update(d)
14463 return self._set_from_binary(p)
14464
14465 __swig_destroy__ = _IMP_core.delete_Typed
14466
14467# Register Typed in _IMP_core:
14468_IMP_core.Typed_swigregister(Typed)
14469
14470def __lshift__(*args):
14471 r"""
14472 __lshift__(_ostream out, XYZ n) -> _ostream
14473 __lshift__(_ostream out, XYZR n) -> _ostream
14474 __lshift__(_ostream out, Direction n) -> _ostream
14475 __lshift__(_ostream out, DirectionAngle n) -> _ostream
14476 __lshift__(_ostream out, Surface n) -> _ostream
14477 __lshift__(_ostream out, Centroid n) -> _ostream
14478 __lshift__(_ostream out, Cover n) -> _ostream
14479 __lshift__(_ostream out, Reference n) -> _ostream
14480 __lshift__(_ostream out, RigidMember n) -> _ostream
14481 __lshift__(_ostream out, RigidBody n) -> _ostream
14482 __lshift__(_ostream out, Gaussian n) -> _ostream
14483 __lshift__(_ostream out, Typed n) -> _ostream
14484 """
14485 return _IMP_core.__lshift__(*args)
14486class WriteRestraintScoresOptimizerState(IMP.OptimizerState):
14487 r"""Proxy of C++ IMP::core::WriteRestraintScoresOptimizerState class."""
14488
14489 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14490
14491 def __init__(self, rs, out):
14492 r"""__init__(WriteRestraintScoresOptimizerState self, IMP::Restraints const & rs, TextOutput out) -> WriteRestraintScoresOptimizerState"""
14493 _IMP_core.WriteRestraintScoresOptimizerState_swiginit(self, _IMP_core.new_WriteRestraintScoresOptimizerState(rs, out))
14494
14495 def get_version_info(self):
14496 r"""get_version_info(WriteRestraintScoresOptimizerState self) -> VersionInfo"""
14497 return _IMP_core.WriteRestraintScoresOptimizerState_get_version_info(self)
14498 __swig_destroy__ = _IMP_core.delete_WriteRestraintScoresOptimizerState
14499
14500 def __str__(self):
14501 r"""__str__(WriteRestraintScoresOptimizerState self) -> std::string"""
14502 return _IMP_core.WriteRestraintScoresOptimizerState___str__(self)
14503
14504 def __repr__(self):
14505 r"""__repr__(WriteRestraintScoresOptimizerState self) -> std::string"""
14506 return _IMP_core.WriteRestraintScoresOptimizerState___repr__(self)
14507
14508 @staticmethod
14509 def get_from(o):
14510 return _object_cast_to_WriteRestraintScoresOptimizerState(o)
14511
14512
14513# Register WriteRestraintScoresOptimizerState in _IMP_core:
14514_IMP_core.WriteRestraintScoresOptimizerState_swigregister(WriteRestraintScoresOptimizerState)
14515
14516def assign_blame(rs, ps, attribute):
14517 r"""assign_blame(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, FloatKey attribute)"""
14518 return _IMP_core.assign_blame(rs, ps, attribute)
14519
14520def create_blame_geometries(*args):
14521 r"""create_blame_geometries(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, double max=NO_MAX, std::string name=std::string()) -> IMP::display::Geometries"""
14522 return _IMP_core.create_blame_geometries(*args)
14523class MultipleBinormalRestraint(IMP.Restraint):
14524 r"""Proxy of C++ IMP::core::MultipleBinormalRestraint class."""
14525
14526 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14527
14528 def __init__(self, m, q1, q2):
14529 r"""__init__(MultipleBinormalRestraint self, Model m, IMP::ParticleIndexQuad const & q1, IMP::ParticleIndexQuad const & q2) -> MultipleBinormalRestraint"""
14530 _IMP_core.MultipleBinormalRestraint_swiginit(self, _IMP_core.new_MultipleBinormalRestraint(m, q1, q2))
14531
14532 def add_term(self, term):
14533 r"""add_term(MultipleBinormalRestraint self, BinormalTerm term)"""
14534 return _IMP_core.MultipleBinormalRestraint_add_term(self, term)
14535
14536 def do_get_inputs(self):
14537 r"""do_get_inputs(MultipleBinormalRestraint self) -> IMP::ModelObjectsTemp"""
14538 return _IMP_core.MultipleBinormalRestraint_do_get_inputs(self)
14539
14540 def get_version_info(self):
14541 r"""get_version_info(MultipleBinormalRestraint self) -> VersionInfo"""
14542 return _IMP_core.MultipleBinormalRestraint_get_version_info(self)
14543 __swig_destroy__ = _IMP_core.delete_MultipleBinormalRestraint
14544
14545 def __str__(self):
14546 r"""__str__(MultipleBinormalRestraint self) -> std::string"""
14547 return _IMP_core.MultipleBinormalRestraint___str__(self)
14548
14549 def __repr__(self):
14550 r"""__repr__(MultipleBinormalRestraint self) -> std::string"""
14551 return _IMP_core.MultipleBinormalRestraint___repr__(self)
14552
14553 @staticmethod
14554 def get_from(o):
14555 return _object_cast_to_MultipleBinormalRestraint(o)
14556
14557
14558# Register MultipleBinormalRestraint in _IMP_core:
14559_IMP_core.MultipleBinormalRestraint_swigregister(MultipleBinormalRestraint)
14560class BinormalTerm(object):
14561 r"""Proxy of C++ IMP::core::BinormalTerm class."""
14562
14563 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14564
14565 def __init__(self):
14566 r"""__init__(BinormalTerm self) -> BinormalTerm"""
14567 _IMP_core.BinormalTerm_swiginit(self, _IMP_core.new_BinormalTerm())
14568
14569 def set_correlation(self, correlation):
14570 r"""set_correlation(BinormalTerm self, double correlation)"""
14571 return _IMP_core.BinormalTerm_set_correlation(self, correlation)
14572
14573 def set_weight(self, weight):
14574 r"""set_weight(BinormalTerm self, double weight)"""
14575 return _IMP_core.BinormalTerm_set_weight(self, weight)
14576
14577 def set_means(self, means):
14578 r"""set_means(BinormalTerm self, IMP::FloatPair means)"""
14579 return _IMP_core.BinormalTerm_set_means(self, means)
14580
14581 def set_standard_deviations(self, stdevs):
14582 r"""set_standard_deviations(BinormalTerm self, IMP::FloatPair stdevs)"""
14583 return _IMP_core.BinormalTerm_set_standard_deviations(self, stdevs)
14584
14585 def show(self, *args):
14586 r"""show(BinormalTerm self, _ostream out=std::cout)"""
14587 return _IMP_core.BinormalTerm_show(self, *args)
14588
14589 def __str__(self):
14590 r"""__str__(BinormalTerm self) -> std::string"""
14591 return _IMP_core.BinormalTerm___str__(self)
14592
14593 def __repr__(self):
14594 r"""__repr__(BinormalTerm self) -> std::string"""
14595 return _IMP_core.BinormalTerm___repr__(self)
14596
14597 def _get_as_binary(self):
14598 r"""_get_as_binary(BinormalTerm self) -> PyObject *"""
14599 return _IMP_core.BinormalTerm__get_as_binary(self)
14600
14601 def _set_from_binary(self, p):
14602 r"""_set_from_binary(BinormalTerm self, PyObject * p)"""
14603 return _IMP_core.BinormalTerm__set_from_binary(self, p)
14604
14605 def __getstate__(self):
14606 p = self._get_as_binary()
14607 if len(self.__dict__) > 1:
14608 d = self.__dict__.copy()
14609 del d['this']
14610 p = (d, p)
14611 return p
14612
14613 def __setstate__(self, p):
14614 if not hasattr(self, 'this'):
14615 self.__init__()
14616 if isinstance(p, tuple):
14617 d, p = p
14618 self.__dict__.update(d)
14619 return self._set_from_binary(p)
14620
14621 __swig_destroy__ = _IMP_core.delete_BinormalTerm
14622
14623# Register BinormalTerm in _IMP_core:
14624_IMP_core.BinormalTerm_swigregister(BinormalTerm)
14625class Provenance(IMP.Decorator):
14626 r"""Proxy of C++ IMP::core::Provenance class."""
14627
14628 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14629
14630 def get_previous(self):
14631 r"""get_previous(Provenance self) -> Provenance"""
14632 return _IMP_core.Provenance_get_previous(self)
14633
14634 def set_previous(self, p):
14635 r"""set_previous(Provenance self, Provenance p)"""
14636 return _IMP_core.Provenance_set_previous(self, p)
14637
14638 def __init__(self, *args):
14639 r"""
14640 __init__(Provenance self) -> Provenance
14641 __init__(Provenance self, Model m, ParticleIndex id) -> Provenance
14642 __init__(Provenance self, _ParticleAdaptor d) -> Provenance
14643 """
14644 _IMP_core.Provenance_swiginit(self, _IMP_core.new_Provenance(*args))
14645
14646 @staticmethod
14647 def get_is_setup(*args):
14648 r"""
14649 get_is_setup(Model m, ParticleIndex pi) -> bool
14650 get_is_setup(_ParticleAdaptor p) -> bool
14651 """
14652 return _IMP_core.Provenance_get_is_setup(*args)
14653
14654 def show(self, *args):
14655 r"""show(Provenance self, _ostream out=std::cout)"""
14656 return _IMP_core.Provenance_show(self, *args)
14657
14658 @staticmethod
14659 def setup_particle(*args):
14660 r"""
14661 setup_particle(Model m, ParticleIndex pi) -> Provenance
14662 setup_particle(_ParticleAdaptor pa) -> Provenance
14663 """
14664 return _IMP_core.Provenance_setup_particle(*args)
14665
14666 def add_attribute(self, *args):
14667 r"""
14668 add_attribute(Provenance self, FloatKey k, IMP::Float v, bool opt)
14669 add_attribute(Provenance self, FloatKey a0, IMP::Float a1)
14670 add_attribute(Provenance self, IntKey a0, IMP::Int a1)
14671 add_attribute(Provenance self, FloatsKey a0, IMP::Floats a1)
14672 add_attribute(Provenance self, IntsKey a0, IMP::Ints a1)
14673 add_attribute(Provenance self, StringKey a0, IMP::String a1)
14674 add_attribute(Provenance self, ParticleIndexKey a0, Particle a1)
14675 add_attribute(Provenance self, ObjectKey a0, Object a1)
14676 add_attribute(Provenance self, SparseFloatKey a0, IMP::Float a1)
14677 add_attribute(Provenance self, SparseIntKey a0, IMP::Int a1)
14678 add_attribute(Provenance self, SparseStringKey a0, IMP::String a1)
14679 add_attribute(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14680 """
14681 return _IMP_core.Provenance_add_attribute(self, *args)
14682
14683 def get_value(self, *args):
14684 r"""
14685 get_value(Provenance self, FloatKey a0) -> IMP::Float
14686 get_value(Provenance self, IntKey a0) -> IMP::Int
14687 get_value(Provenance self, FloatsKey a0) -> IMP::Floats
14688 get_value(Provenance self, IntsKey a0) -> IMP::Ints
14689 get_value(Provenance self, StringKey a0) -> IMP::String
14690 get_value(Provenance self, ParticleIndexKey a0) -> Particle
14691 get_value(Provenance self, ObjectKey a0) -> Object
14692 get_value(Provenance self, SparseFloatKey a0) -> IMP::Float
14693 get_value(Provenance self, SparseIntKey a0) -> IMP::Int
14694 get_value(Provenance self, SparseStringKey a0) -> IMP::String
14695 get_value(Provenance self, SparseParticleIndexKey a0) -> ParticleIndex
14696 """
14697 return _IMP_core.Provenance_get_value(self, *args)
14698
14699 def set_value(self, *args):
14700 r"""
14701 set_value(Provenance self, FloatKey a0, IMP::Float a1)
14702 set_value(Provenance self, IntKey a0, IMP::Int a1)
14703 set_value(Provenance self, FloatsKey a0, IMP::Floats a1)
14704 set_value(Provenance self, IntsKey a0, IMP::Ints a1)
14705 set_value(Provenance self, StringKey a0, IMP::String a1)
14706 set_value(Provenance self, ParticleIndexKey a0, Particle a1)
14707 set_value(Provenance self, ObjectKey a0, Object a1)
14708 set_value(Provenance self, SparseFloatKey a0, IMP::Float a1)
14709 set_value(Provenance self, SparseIntKey a0, IMP::Int a1)
14710 set_value(Provenance self, SparseStringKey a0, IMP::String a1)
14711 set_value(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14712 """
14713 return _IMP_core.Provenance_set_value(self, *args)
14714
14715 def remove_attribute(self, *args):
14716 r"""
14717 remove_attribute(Provenance self, FloatKey a0)
14718 remove_attribute(Provenance self, IntKey a0)
14719 remove_attribute(Provenance self, FloatsKey a0)
14720 remove_attribute(Provenance self, IntsKey a0)
14721 remove_attribute(Provenance self, StringKey a0)
14722 remove_attribute(Provenance self, ParticleIndexKey a0)
14723 remove_attribute(Provenance self, ObjectKey a0)
14724 remove_attribute(Provenance self, SparseFloatKey a0)
14725 remove_attribute(Provenance self, SparseIntKey a0)
14726 remove_attribute(Provenance self, SparseStringKey a0)
14727 remove_attribute(Provenance self, SparseParticleIndexKey a0)
14728 """
14729 return _IMP_core.Provenance_remove_attribute(self, *args)
14730
14731 def has_attribute(self, *args):
14732 r"""
14733 has_attribute(Provenance self, FloatKey a0) -> bool
14734 has_attribute(Provenance self, IntKey a0) -> bool
14735 has_attribute(Provenance self, FloatsKey a0) -> bool
14736 has_attribute(Provenance self, IntsKey a0) -> bool
14737 has_attribute(Provenance self, StringKey a0) -> bool
14738 has_attribute(Provenance self, ParticleIndexKey a0) -> bool
14739 has_attribute(Provenance self, ObjectKey a0) -> bool
14740 has_attribute(Provenance self, SparseFloatKey a0) -> bool
14741 has_attribute(Provenance self, SparseIntKey a0) -> bool
14742 has_attribute(Provenance self, SparseStringKey a0) -> bool
14743 has_attribute(Provenance self, SparseParticleIndexKey a0) -> bool
14744 """
14745 return _IMP_core.Provenance_has_attribute(self, *args)
14746
14747 def get_derivative(self, a0):
14748 r"""get_derivative(Provenance self, FloatKey a0) -> double"""
14749 return _IMP_core.Provenance_get_derivative(self, a0)
14750
14751 def get_name(self):
14752 r"""get_name(Provenance self) -> std::string"""
14753 return _IMP_core.Provenance_get_name(self)
14754
14755 def clear_caches(self):
14756 r"""clear_caches(Provenance self)"""
14757 return _IMP_core.Provenance_clear_caches(self)
14758
14759 def set_name(self, a0):
14760 r"""set_name(Provenance self, std::string a0)"""
14761 return _IMP_core.Provenance_set_name(self, a0)
14762
14763 def set_check_level(self, a0):
14764 r"""set_check_level(Provenance self, IMP::CheckLevel a0)"""
14765 return _IMP_core.Provenance_set_check_level(self, a0)
14766
14767 def add_to_derivative(self, a0, a1, a2):
14768 r"""add_to_derivative(Provenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14769 return _IMP_core.Provenance_add_to_derivative(self, a0, a1, a2)
14770
14771 def set_is_optimized(self, a0, a1):
14772 r"""set_is_optimized(Provenance self, FloatKey a0, bool a1)"""
14773 return _IMP_core.Provenance_set_is_optimized(self, a0, a1)
14774
14775 def get_is_optimized(self, a0):
14776 r"""get_is_optimized(Provenance self, FloatKey a0) -> bool"""
14777 return _IMP_core.Provenance_get_is_optimized(self, a0)
14778
14779 def get_check_level(self):
14780 r"""get_check_level(Provenance self) -> IMP::CheckLevel"""
14781 return _IMP_core.Provenance_get_check_level(self)
14782
14783 def __eq__(self, *args):
14784 r"""
14785 __eq__(Provenance self, Provenance o) -> bool
14786 __eq__(Provenance self, Particle d) -> bool
14787 """
14788 return _IMP_core.Provenance___eq__(self, *args)
14789
14790 def __ne__(self, *args):
14791 r"""
14792 __ne__(Provenance self, Provenance o) -> bool
14793 __ne__(Provenance self, Particle d) -> bool
14794 """
14795 return _IMP_core.Provenance___ne__(self, *args)
14796
14797 def __le__(self, *args):
14798 r"""
14799 __le__(Provenance self, Provenance o) -> bool
14800 __le__(Provenance self, Particle d) -> bool
14801 """
14802 return _IMP_core.Provenance___le__(self, *args)
14803
14804 def __lt__(self, *args):
14805 r"""
14806 __lt__(Provenance self, Provenance o) -> bool
14807 __lt__(Provenance self, Particle d) -> bool
14808 """
14809 return _IMP_core.Provenance___lt__(self, *args)
14810
14811 def __ge__(self, *args):
14812 r"""
14813 __ge__(Provenance self, Provenance o) -> bool
14814 __ge__(Provenance self, Particle d) -> bool
14815 """
14816 return _IMP_core.Provenance___ge__(self, *args)
14817
14818 def __gt__(self, *args):
14819 r"""
14820 __gt__(Provenance self, Provenance o) -> bool
14821 __gt__(Provenance self, Particle d) -> bool
14822 """
14823 return _IMP_core.Provenance___gt__(self, *args)
14824
14825 def __hash__(self):
14826 r"""__hash__(Provenance self) -> std::size_t"""
14827 return _IMP_core.Provenance___hash__(self)
14828
14829 def __str__(self):
14830 r"""__str__(Provenance self) -> std::string"""
14831 return _IMP_core.Provenance___str__(self)
14832
14833 def __repr__(self):
14834 r"""__repr__(Provenance self) -> std::string"""
14835 return _IMP_core.Provenance___repr__(self)
14836
14837 def _get_as_binary(self):
14838 r"""_get_as_binary(Provenance self) -> PyObject *"""
14839 return _IMP_core.Provenance__get_as_binary(self)
14840
14841 def _set_from_binary(self, p):
14842 r"""_set_from_binary(Provenance self, PyObject * p)"""
14843 return _IMP_core.Provenance__set_from_binary(self, p)
14844
14845 def __getstate__(self):
14846 p = self._get_as_binary()
14847 if len(self.__dict__) > 1:
14848 d = self.__dict__.copy()
14849 del d['this']
14850 p = (d, p)
14851 return p
14852
14853 def __setstate__(self, p):
14854 if not hasattr(self, 'this'):
14855 self.__init__()
14856 if isinstance(p, tuple):
14857 d, p = p
14858 self.__dict__.update(d)
14859 return self._set_from_binary(p)
14860
14861 __swig_destroy__ = _IMP_core.delete_Provenance
14862
14863# Register Provenance in _IMP_core:
14864_IMP_core.Provenance_swigregister(Provenance)
14865class StructureProvenance(Provenance):
14866 r"""Proxy of C++ IMP::core::StructureProvenance class."""
14867
14868 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14869
14870 def set_filename(self, filename):
14871 r"""set_filename(StructureProvenance self, std::string filename)"""
14872 return _IMP_core.StructureProvenance_set_filename(self, filename)
14873
14874 def get_filename(self):
14875 r"""get_filename(StructureProvenance self) -> std::string"""
14876 return _IMP_core.StructureProvenance_get_filename(self)
14877
14878 def set_chain_id(self, chain_id):
14879 r"""set_chain_id(StructureProvenance self, std::string chain_id)"""
14880 return _IMP_core.StructureProvenance_set_chain_id(self, chain_id)
14881
14882 def get_chain_id(self):
14883 r"""get_chain_id(StructureProvenance self) -> std::string"""
14884 return _IMP_core.StructureProvenance_get_chain_id(self)
14885
14886 def set_residue_offset(self, residue_offset):
14887 r"""set_residue_offset(StructureProvenance self, int residue_offset)"""
14888 return _IMP_core.StructureProvenance_set_residue_offset(self, residue_offset)
14889
14890 def get_residue_offset(self):
14891 r"""get_residue_offset(StructureProvenance self) -> int"""
14892 return _IMP_core.StructureProvenance_get_residue_offset(self)
14893
14894 def __init__(self, *args):
14895 r"""
14896 __init__(StructureProvenance self) -> StructureProvenance
14897 __init__(StructureProvenance self, Model m, ParticleIndex id) -> StructureProvenance
14898 __init__(StructureProvenance self, _ParticleAdaptor d) -> StructureProvenance
14899 """
14900 _IMP_core.StructureProvenance_swiginit(self, _IMP_core.new_StructureProvenance(*args))
14901
14902 @staticmethod
14903 def get_is_setup(*args):
14904 r"""
14905 get_is_setup(Model m, ParticleIndex pi) -> bool
14906 get_is_setup(_ParticleAdaptor p) -> bool
14907 """
14908 return _IMP_core.StructureProvenance_get_is_setup(*args)
14909
14910 def show(self, *args):
14911 r"""show(StructureProvenance self, _ostream out=std::cout)"""
14912 return _IMP_core.StructureProvenance_show(self, *args)
14913
14914 @staticmethod
14915 def setup_particle(*args):
14916 r"""
14917 setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14918 setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14919 setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id) -> StructureProvenance
14920 setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id) -> StructureProvenance
14921 setup_particle(Model m, ParticleIndex pi, StructureProvenance o) -> StructureProvenance
14922 setup_particle(_ParticleAdaptor pa, StructureProvenance o) -> StructureProvenance
14923 """
14924 return _IMP_core.StructureProvenance_setup_particle(*args)
14925
14926 def add_attribute(self, *args):
14927 r"""
14928 add_attribute(StructureProvenance self, FloatKey k, IMP::Float v, bool opt)
14929 add_attribute(StructureProvenance self, FloatKey a0, IMP::Float a1)
14930 add_attribute(StructureProvenance self, IntKey a0, IMP::Int a1)
14931 add_attribute(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14932 add_attribute(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14933 add_attribute(StructureProvenance self, StringKey a0, IMP::String a1)
14934 add_attribute(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14935 add_attribute(StructureProvenance self, ObjectKey a0, Object a1)
14936 add_attribute(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14937 add_attribute(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14938 add_attribute(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14939 add_attribute(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14940 """
14941 return _IMP_core.StructureProvenance_add_attribute(self, *args)
14942
14943 def get_value(self, *args):
14944 r"""
14945 get_value(StructureProvenance self, FloatKey a0) -> IMP::Float
14946 get_value(StructureProvenance self, IntKey a0) -> IMP::Int
14947 get_value(StructureProvenance self, FloatsKey a0) -> IMP::Floats
14948 get_value(StructureProvenance self, IntsKey a0) -> IMP::Ints
14949 get_value(StructureProvenance self, StringKey a0) -> IMP::String
14950 get_value(StructureProvenance self, ParticleIndexKey a0) -> Particle
14951 get_value(StructureProvenance self, ObjectKey a0) -> Object
14952 get_value(StructureProvenance self, SparseFloatKey a0) -> IMP::Float
14953 get_value(StructureProvenance self, SparseIntKey a0) -> IMP::Int
14954 get_value(StructureProvenance self, SparseStringKey a0) -> IMP::String
14955 get_value(StructureProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
14956 """
14957 return _IMP_core.StructureProvenance_get_value(self, *args)
14958
14959 def set_value(self, *args):
14960 r"""
14961 set_value(StructureProvenance self, FloatKey a0, IMP::Float a1)
14962 set_value(StructureProvenance self, IntKey a0, IMP::Int a1)
14963 set_value(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14964 set_value(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14965 set_value(StructureProvenance self, StringKey a0, IMP::String a1)
14966 set_value(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14967 set_value(StructureProvenance self, ObjectKey a0, Object a1)
14968 set_value(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14969 set_value(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14970 set_value(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14971 set_value(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14972 """
14973 return _IMP_core.StructureProvenance_set_value(self, *args)
14974
14975 def remove_attribute(self, *args):
14976 r"""
14977 remove_attribute(StructureProvenance self, FloatKey a0)
14978 remove_attribute(StructureProvenance self, IntKey a0)
14979 remove_attribute(StructureProvenance self, FloatsKey a0)
14980 remove_attribute(StructureProvenance self, IntsKey a0)
14981 remove_attribute(StructureProvenance self, StringKey a0)
14982 remove_attribute(StructureProvenance self, ParticleIndexKey a0)
14983 remove_attribute(StructureProvenance self, ObjectKey a0)
14984 remove_attribute(StructureProvenance self, SparseFloatKey a0)
14985 remove_attribute(StructureProvenance self, SparseIntKey a0)
14986 remove_attribute(StructureProvenance self, SparseStringKey a0)
14987 remove_attribute(StructureProvenance self, SparseParticleIndexKey a0)
14988 """
14989 return _IMP_core.StructureProvenance_remove_attribute(self, *args)
14990
14991 def has_attribute(self, *args):
14992 r"""
14993 has_attribute(StructureProvenance self, FloatKey a0) -> bool
14994 has_attribute(StructureProvenance self, IntKey a0) -> bool
14995 has_attribute(StructureProvenance self, FloatsKey a0) -> bool
14996 has_attribute(StructureProvenance self, IntsKey a0) -> bool
14997 has_attribute(StructureProvenance self, StringKey a0) -> bool
14998 has_attribute(StructureProvenance self, ParticleIndexKey a0) -> bool
14999 has_attribute(StructureProvenance self, ObjectKey a0) -> bool
15000 has_attribute(StructureProvenance self, SparseFloatKey a0) -> bool
15001 has_attribute(StructureProvenance self, SparseIntKey a0) -> bool
15002 has_attribute(StructureProvenance self, SparseStringKey a0) -> bool
15003 has_attribute(StructureProvenance self, SparseParticleIndexKey a0) -> bool
15004 """
15005 return _IMP_core.StructureProvenance_has_attribute(self, *args)
15006
15007 def get_derivative(self, a0):
15008 r"""get_derivative(StructureProvenance self, FloatKey a0) -> double"""
15009 return _IMP_core.StructureProvenance_get_derivative(self, a0)
15010
15011 def get_name(self):
15012 r"""get_name(StructureProvenance self) -> std::string"""
15013 return _IMP_core.StructureProvenance_get_name(self)
15014
15015 def clear_caches(self):
15016 r"""clear_caches(StructureProvenance self)"""
15017 return _IMP_core.StructureProvenance_clear_caches(self)
15018
15019 def set_name(self, a0):
15020 r"""set_name(StructureProvenance self, std::string a0)"""
15021 return _IMP_core.StructureProvenance_set_name(self, a0)
15022
15023 def set_check_level(self, a0):
15024 r"""set_check_level(StructureProvenance self, IMP::CheckLevel a0)"""
15025 return _IMP_core.StructureProvenance_set_check_level(self, a0)
15026
15027 def add_to_derivative(self, a0, a1, a2):
15028 r"""add_to_derivative(StructureProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15029 return _IMP_core.StructureProvenance_add_to_derivative(self, a0, a1, a2)
15030
15031 def set_is_optimized(self, a0, a1):
15032 r"""set_is_optimized(StructureProvenance self, FloatKey a0, bool a1)"""
15033 return _IMP_core.StructureProvenance_set_is_optimized(self, a0, a1)
15034
15035 def get_is_optimized(self, a0):
15036 r"""get_is_optimized(StructureProvenance self, FloatKey a0) -> bool"""
15037 return _IMP_core.StructureProvenance_get_is_optimized(self, a0)
15038
15039 def get_check_level(self):
15040 r"""get_check_level(StructureProvenance self) -> IMP::CheckLevel"""
15041 return _IMP_core.StructureProvenance_get_check_level(self)
15042
15043 def __eq__(self, *args):
15044 r"""
15045 __eq__(StructureProvenance self, StructureProvenance o) -> bool
15046 __eq__(StructureProvenance self, Particle d) -> bool
15047 """
15048 return _IMP_core.StructureProvenance___eq__(self, *args)
15049
15050 def __ne__(self, *args):
15051 r"""
15052 __ne__(StructureProvenance self, StructureProvenance o) -> bool
15053 __ne__(StructureProvenance self, Particle d) -> bool
15054 """
15055 return _IMP_core.StructureProvenance___ne__(self, *args)
15056
15057 def __le__(self, *args):
15058 r"""
15059 __le__(StructureProvenance self, StructureProvenance o) -> bool
15060 __le__(StructureProvenance self, Particle d) -> bool
15061 """
15062 return _IMP_core.StructureProvenance___le__(self, *args)
15063
15064 def __lt__(self, *args):
15065 r"""
15066 __lt__(StructureProvenance self, StructureProvenance o) -> bool
15067 __lt__(StructureProvenance self, Particle d) -> bool
15068 """
15069 return _IMP_core.StructureProvenance___lt__(self, *args)
15070
15071 def __ge__(self, *args):
15072 r"""
15073 __ge__(StructureProvenance self, StructureProvenance o) -> bool
15074 __ge__(StructureProvenance self, Particle d) -> bool
15075 """
15076 return _IMP_core.StructureProvenance___ge__(self, *args)
15077
15078 def __gt__(self, *args):
15079 r"""
15080 __gt__(StructureProvenance self, StructureProvenance o) -> bool
15081 __gt__(StructureProvenance self, Particle d) -> bool
15082 """
15083 return _IMP_core.StructureProvenance___gt__(self, *args)
15084
15085 def __hash__(self):
15086 r"""__hash__(StructureProvenance self) -> std::size_t"""
15087 return _IMP_core.StructureProvenance___hash__(self)
15088
15089 def __str__(self):
15090 r"""__str__(StructureProvenance self) -> std::string"""
15091 return _IMP_core.StructureProvenance___str__(self)
15092
15093 def __repr__(self):
15094 r"""__repr__(StructureProvenance self) -> std::string"""
15095 return _IMP_core.StructureProvenance___repr__(self)
15096
15097 def _get_as_binary(self):
15098 r"""_get_as_binary(StructureProvenance self) -> PyObject *"""
15099 return _IMP_core.StructureProvenance__get_as_binary(self)
15100
15101 def _set_from_binary(self, p):
15102 r"""_set_from_binary(StructureProvenance self, PyObject * p)"""
15103 return _IMP_core.StructureProvenance__set_from_binary(self, p)
15104
15105 def __getstate__(self):
15106 p = self._get_as_binary()
15107 if len(self.__dict__) > 1:
15108 d = self.__dict__.copy()
15109 del d['this']
15110 p = (d, p)
15111 return p
15112
15113 def __setstate__(self, p):
15114 if not hasattr(self, 'this'):
15115 self.__init__()
15116 if isinstance(p, tuple):
15117 d, p = p
15118 self.__dict__.update(d)
15119 return self._set_from_binary(p)
15120
15121 __swig_destroy__ = _IMP_core.delete_StructureProvenance
15122
15123# Register StructureProvenance in _IMP_core:
15124_IMP_core.StructureProvenance_swigregister(StructureProvenance)
15125class SampleProvenance(Provenance):
15126 r"""Proxy of C++ IMP::core::SampleProvenance class."""
15127
15128 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15129
15130 def set_method(self, method):
15131 r"""set_method(SampleProvenance self, std::string method)"""
15132 return _IMP_core.SampleProvenance_set_method(self, method)
15133
15134 def get_method(self):
15135 r"""get_method(SampleProvenance self) -> std::string"""
15136 return _IMP_core.SampleProvenance_get_method(self)
15137
15138 def set_number_of_frames(self, frames):
15139 r"""set_number_of_frames(SampleProvenance self, int frames)"""
15140 return _IMP_core.SampleProvenance_set_number_of_frames(self, frames)
15141
15142 def get_number_of_frames(self):
15143 r"""get_number_of_frames(SampleProvenance self) -> int"""
15144 return _IMP_core.SampleProvenance_get_number_of_frames(self)
15145
15146 def set_number_of_iterations(self, iterations):
15147 r"""set_number_of_iterations(SampleProvenance self, int iterations)"""
15148 return _IMP_core.SampleProvenance_set_number_of_iterations(self, iterations)
15149
15150 def get_number_of_iterations(self):
15151 r"""get_number_of_iterations(SampleProvenance self) -> int"""
15152 return _IMP_core.SampleProvenance_get_number_of_iterations(self)
15153
15154 def set_number_of_replicas(self, replicas):
15155 r"""set_number_of_replicas(SampleProvenance self, int replicas)"""
15156 return _IMP_core.SampleProvenance_set_number_of_replicas(self, replicas)
15157
15158 def get_number_of_replicas(self):
15159 r"""get_number_of_replicas(SampleProvenance self) -> int"""
15160 return _IMP_core.SampleProvenance_get_number_of_replicas(self)
15161
15162 def __init__(self, *args):
15163 r"""
15164 __init__(SampleProvenance self) -> SampleProvenance
15165 __init__(SampleProvenance self, Model m, ParticleIndex id) -> SampleProvenance
15166 __init__(SampleProvenance self, _ParticleAdaptor d) -> SampleProvenance
15167 """
15168 _IMP_core.SampleProvenance_swiginit(self, _IMP_core.new_SampleProvenance(*args))
15169
15170 @staticmethod
15171 def get_is_setup(*args):
15172 r"""
15173 get_is_setup(Model m, ParticleIndex pi) -> bool
15174 get_is_setup(_ParticleAdaptor p) -> bool
15175 """
15176 return _IMP_core.SampleProvenance_get_is_setup(*args)
15177
15178 def show(self, *args):
15179 r"""show(SampleProvenance self, _ostream out=std::cout)"""
15180 return _IMP_core.SampleProvenance_show(self, *args)
15181
15182 @staticmethod
15183 def setup_particle(*args):
15184 r"""
15185 setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
15186 setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
15187 setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations) -> SampleProvenance
15188 setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations) -> SampleProvenance
15189 setup_particle(Model m, ParticleIndex pi, SampleProvenance o) -> SampleProvenance
15190 setup_particle(_ParticleAdaptor pa, SampleProvenance o) -> SampleProvenance
15191 """
15192 return _IMP_core.SampleProvenance_setup_particle(*args)
15193
15194 def add_attribute(self, *args):
15195 r"""
15196 add_attribute(SampleProvenance self, FloatKey k, IMP::Float v, bool opt)
15197 add_attribute(SampleProvenance self, FloatKey a0, IMP::Float a1)
15198 add_attribute(SampleProvenance self, IntKey a0, IMP::Int a1)
15199 add_attribute(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
15200 add_attribute(SampleProvenance self, IntsKey a0, IMP::Ints a1)
15201 add_attribute(SampleProvenance self, StringKey a0, IMP::String a1)
15202 add_attribute(SampleProvenance self, ParticleIndexKey a0, Particle a1)
15203 add_attribute(SampleProvenance self, ObjectKey a0, Object a1)
15204 add_attribute(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
15205 add_attribute(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
15206 add_attribute(SampleProvenance self, SparseStringKey a0, IMP::String a1)
15207 add_attribute(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15208 """
15209 return _IMP_core.SampleProvenance_add_attribute(self, *args)
15210
15211 def get_value(self, *args):
15212 r"""
15213 get_value(SampleProvenance self, FloatKey a0) -> IMP::Float
15214 get_value(SampleProvenance self, IntKey a0) -> IMP::Int
15215 get_value(SampleProvenance self, FloatsKey a0) -> IMP::Floats
15216 get_value(SampleProvenance self, IntsKey a0) -> IMP::Ints
15217 get_value(SampleProvenance self, StringKey a0) -> IMP::String
15218 get_value(SampleProvenance self, ParticleIndexKey a0) -> Particle
15219 get_value(SampleProvenance self, ObjectKey a0) -> Object
15220 get_value(SampleProvenance self, SparseFloatKey a0) -> IMP::Float
15221 get_value(SampleProvenance self, SparseIntKey a0) -> IMP::Int
15222 get_value(SampleProvenance self, SparseStringKey a0) -> IMP::String
15223 get_value(SampleProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15224 """
15225 return _IMP_core.SampleProvenance_get_value(self, *args)
15226
15227 def set_value(self, *args):
15228 r"""
15229 set_value(SampleProvenance self, FloatKey a0, IMP::Float a1)
15230 set_value(SampleProvenance self, IntKey a0, IMP::Int a1)
15231 set_value(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
15232 set_value(SampleProvenance self, IntsKey a0, IMP::Ints a1)
15233 set_value(SampleProvenance self, StringKey a0, IMP::String a1)
15234 set_value(SampleProvenance self, ParticleIndexKey a0, Particle a1)
15235 set_value(SampleProvenance self, ObjectKey a0, Object a1)
15236 set_value(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
15237 set_value(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
15238 set_value(SampleProvenance self, SparseStringKey a0, IMP::String a1)
15239 set_value(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15240 """
15241 return _IMP_core.SampleProvenance_set_value(self, *args)
15242
15243 def remove_attribute(self, *args):
15244 r"""
15245 remove_attribute(SampleProvenance self, FloatKey a0)
15246 remove_attribute(SampleProvenance self, IntKey a0)
15247 remove_attribute(SampleProvenance self, FloatsKey a0)
15248 remove_attribute(SampleProvenance self, IntsKey a0)
15249 remove_attribute(SampleProvenance self, StringKey a0)
15250 remove_attribute(SampleProvenance self, ParticleIndexKey a0)
15251 remove_attribute(SampleProvenance self, ObjectKey a0)
15252 remove_attribute(SampleProvenance self, SparseFloatKey a0)
15253 remove_attribute(SampleProvenance self, SparseIntKey a0)
15254 remove_attribute(SampleProvenance self, SparseStringKey a0)
15255 remove_attribute(SampleProvenance self, SparseParticleIndexKey a0)
15256 """
15257 return _IMP_core.SampleProvenance_remove_attribute(self, *args)
15258
15259 def has_attribute(self, *args):
15260 r"""
15261 has_attribute(SampleProvenance self, FloatKey a0) -> bool
15262 has_attribute(SampleProvenance self, IntKey a0) -> bool
15263 has_attribute(SampleProvenance self, FloatsKey a0) -> bool
15264 has_attribute(SampleProvenance self, IntsKey a0) -> bool
15265 has_attribute(SampleProvenance self, StringKey a0) -> bool
15266 has_attribute(SampleProvenance self, ParticleIndexKey a0) -> bool
15267 has_attribute(SampleProvenance self, ObjectKey a0) -> bool
15268 has_attribute(SampleProvenance self, SparseFloatKey a0) -> bool
15269 has_attribute(SampleProvenance self, SparseIntKey a0) -> bool
15270 has_attribute(SampleProvenance self, SparseStringKey a0) -> bool
15271 has_attribute(SampleProvenance self, SparseParticleIndexKey a0) -> bool
15272 """
15273 return _IMP_core.SampleProvenance_has_attribute(self, *args)
15274
15275 def get_derivative(self, a0):
15276 r"""get_derivative(SampleProvenance self, FloatKey a0) -> double"""
15277 return _IMP_core.SampleProvenance_get_derivative(self, a0)
15278
15279 def get_name(self):
15280 r"""get_name(SampleProvenance self) -> std::string"""
15281 return _IMP_core.SampleProvenance_get_name(self)
15282
15283 def clear_caches(self):
15284 r"""clear_caches(SampleProvenance self)"""
15285 return _IMP_core.SampleProvenance_clear_caches(self)
15286
15287 def set_name(self, a0):
15288 r"""set_name(SampleProvenance self, std::string a0)"""
15289 return _IMP_core.SampleProvenance_set_name(self, a0)
15290
15291 def set_check_level(self, a0):
15292 r"""set_check_level(SampleProvenance self, IMP::CheckLevel a0)"""
15293 return _IMP_core.SampleProvenance_set_check_level(self, a0)
15294
15295 def add_to_derivative(self, a0, a1, a2):
15296 r"""add_to_derivative(SampleProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15297 return _IMP_core.SampleProvenance_add_to_derivative(self, a0, a1, a2)
15298
15299 def set_is_optimized(self, a0, a1):
15300 r"""set_is_optimized(SampleProvenance self, FloatKey a0, bool a1)"""
15301 return _IMP_core.SampleProvenance_set_is_optimized(self, a0, a1)
15302
15303 def get_is_optimized(self, a0):
15304 r"""get_is_optimized(SampleProvenance self, FloatKey a0) -> bool"""
15305 return _IMP_core.SampleProvenance_get_is_optimized(self, a0)
15306
15307 def get_check_level(self):
15308 r"""get_check_level(SampleProvenance self) -> IMP::CheckLevel"""
15309 return _IMP_core.SampleProvenance_get_check_level(self)
15310
15311 def __eq__(self, *args):
15312 r"""
15313 __eq__(SampleProvenance self, SampleProvenance o) -> bool
15314 __eq__(SampleProvenance self, Particle d) -> bool
15315 """
15316 return _IMP_core.SampleProvenance___eq__(self, *args)
15317
15318 def __ne__(self, *args):
15319 r"""
15320 __ne__(SampleProvenance self, SampleProvenance o) -> bool
15321 __ne__(SampleProvenance self, Particle d) -> bool
15322 """
15323 return _IMP_core.SampleProvenance___ne__(self, *args)
15324
15325 def __le__(self, *args):
15326 r"""
15327 __le__(SampleProvenance self, SampleProvenance o) -> bool
15328 __le__(SampleProvenance self, Particle d) -> bool
15329 """
15330 return _IMP_core.SampleProvenance___le__(self, *args)
15331
15332 def __lt__(self, *args):
15333 r"""
15334 __lt__(SampleProvenance self, SampleProvenance o) -> bool
15335 __lt__(SampleProvenance self, Particle d) -> bool
15336 """
15337 return _IMP_core.SampleProvenance___lt__(self, *args)
15338
15339 def __ge__(self, *args):
15340 r"""
15341 __ge__(SampleProvenance self, SampleProvenance o) -> bool
15342 __ge__(SampleProvenance self, Particle d) -> bool
15343 """
15344 return _IMP_core.SampleProvenance___ge__(self, *args)
15345
15346 def __gt__(self, *args):
15347 r"""
15348 __gt__(SampleProvenance self, SampleProvenance o) -> bool
15349 __gt__(SampleProvenance self, Particle d) -> bool
15350 """
15351 return _IMP_core.SampleProvenance___gt__(self, *args)
15352
15353 def __hash__(self):
15354 r"""__hash__(SampleProvenance self) -> std::size_t"""
15355 return _IMP_core.SampleProvenance___hash__(self)
15356
15357 def __str__(self):
15358 r"""__str__(SampleProvenance self) -> std::string"""
15359 return _IMP_core.SampleProvenance___str__(self)
15360
15361 def __repr__(self):
15362 r"""__repr__(SampleProvenance self) -> std::string"""
15363 return _IMP_core.SampleProvenance___repr__(self)
15364
15365 def _get_as_binary(self):
15366 r"""_get_as_binary(SampleProvenance self) -> PyObject *"""
15367 return _IMP_core.SampleProvenance__get_as_binary(self)
15368
15369 def _set_from_binary(self, p):
15370 r"""_set_from_binary(SampleProvenance self, PyObject * p)"""
15371 return _IMP_core.SampleProvenance__set_from_binary(self, p)
15372
15373 def __getstate__(self):
15374 p = self._get_as_binary()
15375 if len(self.__dict__) > 1:
15376 d = self.__dict__.copy()
15377 del d['this']
15378 p = (d, p)
15379 return p
15380
15381 def __setstate__(self, p):
15382 if not hasattr(self, 'this'):
15383 self.__init__()
15384 if isinstance(p, tuple):
15385 d, p = p
15386 self.__dict__.update(d)
15387 return self._set_from_binary(p)
15388
15389 __swig_destroy__ = _IMP_core.delete_SampleProvenance
15390
15391# Register SampleProvenance in _IMP_core:
15392_IMP_core.SampleProvenance_swigregister(SampleProvenance)
15393class CombineProvenance(Provenance):
15394 r"""Proxy of C++ IMP::core::CombineProvenance class."""
15395
15396 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15397
15398 def set_number_of_frames(self, frames):
15399 r"""set_number_of_frames(CombineProvenance self, int frames)"""
15400 return _IMP_core.CombineProvenance_set_number_of_frames(self, frames)
15401
15402 def get_number_of_frames(self):
15403 r"""get_number_of_frames(CombineProvenance self) -> int"""
15404 return _IMP_core.CombineProvenance_get_number_of_frames(self)
15405
15406 def set_number_of_runs(self, runs):
15407 r"""set_number_of_runs(CombineProvenance self, int runs)"""
15408 return _IMP_core.CombineProvenance_set_number_of_runs(self, runs)
15409
15410 def get_number_of_runs(self):
15411 r"""get_number_of_runs(CombineProvenance self) -> int"""
15412 return _IMP_core.CombineProvenance_get_number_of_runs(self)
15413
15414 def __init__(self, *args):
15415 r"""
15416 __init__(CombineProvenance self) -> CombineProvenance
15417 __init__(CombineProvenance self, Model m, ParticleIndex id) -> CombineProvenance
15418 __init__(CombineProvenance self, _ParticleAdaptor d) -> CombineProvenance
15419 """
15420 _IMP_core.CombineProvenance_swiginit(self, _IMP_core.new_CombineProvenance(*args))
15421
15422 @staticmethod
15423 def get_is_setup(*args):
15424 r"""
15425 get_is_setup(Model m, ParticleIndex pi) -> bool
15426 get_is_setup(_ParticleAdaptor p) -> bool
15427 """
15428 return _IMP_core.CombineProvenance_get_is_setup(*args)
15429
15430 def show(self, *args):
15431 r"""show(CombineProvenance self, _ostream out=std::cout)"""
15432 return _IMP_core.CombineProvenance_show(self, *args)
15433
15434 @staticmethod
15435 def setup_particle(*args):
15436 r"""
15437 setup_particle(Model m, ParticleIndex pi, int runs, int frames) -> CombineProvenance
15438 setup_particle(_ParticleAdaptor pa, int runs, int frames) -> CombineProvenance
15439 setup_particle(Model m, ParticleIndex pi, CombineProvenance o) -> CombineProvenance
15440 setup_particle(_ParticleAdaptor pa, CombineProvenance o) -> CombineProvenance
15441 """
15442 return _IMP_core.CombineProvenance_setup_particle(*args)
15443
15444 def add_attribute(self, *args):
15445 r"""
15446 add_attribute(CombineProvenance self, FloatKey k, IMP::Float v, bool opt)
15447 add_attribute(CombineProvenance self, FloatKey a0, IMP::Float a1)
15448 add_attribute(CombineProvenance self, IntKey a0, IMP::Int a1)
15449 add_attribute(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15450 add_attribute(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15451 add_attribute(CombineProvenance self, StringKey a0, IMP::String a1)
15452 add_attribute(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15453 add_attribute(CombineProvenance self, ObjectKey a0, Object a1)
15454 add_attribute(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15455 add_attribute(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15456 add_attribute(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15457 add_attribute(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15458 """
15459 return _IMP_core.CombineProvenance_add_attribute(self, *args)
15460
15461 def get_value(self, *args):
15462 r"""
15463 get_value(CombineProvenance self, FloatKey a0) -> IMP::Float
15464 get_value(CombineProvenance self, IntKey a0) -> IMP::Int
15465 get_value(CombineProvenance self, FloatsKey a0) -> IMP::Floats
15466 get_value(CombineProvenance self, IntsKey a0) -> IMP::Ints
15467 get_value(CombineProvenance self, StringKey a0) -> IMP::String
15468 get_value(CombineProvenance self, ParticleIndexKey a0) -> Particle
15469 get_value(CombineProvenance self, ObjectKey a0) -> Object
15470 get_value(CombineProvenance self, SparseFloatKey a0) -> IMP::Float
15471 get_value(CombineProvenance self, SparseIntKey a0) -> IMP::Int
15472 get_value(CombineProvenance self, SparseStringKey a0) -> IMP::String
15473 get_value(CombineProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15474 """
15475 return _IMP_core.CombineProvenance_get_value(self, *args)
15476
15477 def set_value(self, *args):
15478 r"""
15479 set_value(CombineProvenance self, FloatKey a0, IMP::Float a1)
15480 set_value(CombineProvenance self, IntKey a0, IMP::Int a1)
15481 set_value(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15482 set_value(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15483 set_value(CombineProvenance self, StringKey a0, IMP::String a1)
15484 set_value(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15485 set_value(CombineProvenance self, ObjectKey a0, Object a1)
15486 set_value(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15487 set_value(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15488 set_value(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15489 set_value(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15490 """
15491 return _IMP_core.CombineProvenance_set_value(self, *args)
15492
15493 def remove_attribute(self, *args):
15494 r"""
15495 remove_attribute(CombineProvenance self, FloatKey a0)
15496 remove_attribute(CombineProvenance self, IntKey a0)
15497 remove_attribute(CombineProvenance self, FloatsKey a0)
15498 remove_attribute(CombineProvenance self, IntsKey a0)
15499 remove_attribute(CombineProvenance self, StringKey a0)
15500 remove_attribute(CombineProvenance self, ParticleIndexKey a0)
15501 remove_attribute(CombineProvenance self, ObjectKey a0)
15502 remove_attribute(CombineProvenance self, SparseFloatKey a0)
15503 remove_attribute(CombineProvenance self, SparseIntKey a0)
15504 remove_attribute(CombineProvenance self, SparseStringKey a0)
15505 remove_attribute(CombineProvenance self, SparseParticleIndexKey a0)
15506 """
15507 return _IMP_core.CombineProvenance_remove_attribute(self, *args)
15508
15509 def has_attribute(self, *args):
15510 r"""
15511 has_attribute(CombineProvenance self, FloatKey a0) -> bool
15512 has_attribute(CombineProvenance self, IntKey a0) -> bool
15513 has_attribute(CombineProvenance self, FloatsKey a0) -> bool
15514 has_attribute(CombineProvenance self, IntsKey a0) -> bool
15515 has_attribute(CombineProvenance self, StringKey a0) -> bool
15516 has_attribute(CombineProvenance self, ParticleIndexKey a0) -> bool
15517 has_attribute(CombineProvenance self, ObjectKey a0) -> bool
15518 has_attribute(CombineProvenance self, SparseFloatKey a0) -> bool
15519 has_attribute(CombineProvenance self, SparseIntKey a0) -> bool
15520 has_attribute(CombineProvenance self, SparseStringKey a0) -> bool
15521 has_attribute(CombineProvenance self, SparseParticleIndexKey a0) -> bool
15522 """
15523 return _IMP_core.CombineProvenance_has_attribute(self, *args)
15524
15525 def get_derivative(self, a0):
15526 r"""get_derivative(CombineProvenance self, FloatKey a0) -> double"""
15527 return _IMP_core.CombineProvenance_get_derivative(self, a0)
15528
15529 def get_name(self):
15530 r"""get_name(CombineProvenance self) -> std::string"""
15531 return _IMP_core.CombineProvenance_get_name(self)
15532
15533 def clear_caches(self):
15534 r"""clear_caches(CombineProvenance self)"""
15535 return _IMP_core.CombineProvenance_clear_caches(self)
15536
15537 def set_name(self, a0):
15538 r"""set_name(CombineProvenance self, std::string a0)"""
15539 return _IMP_core.CombineProvenance_set_name(self, a0)
15540
15541 def set_check_level(self, a0):
15542 r"""set_check_level(CombineProvenance self, IMP::CheckLevel a0)"""
15543 return _IMP_core.CombineProvenance_set_check_level(self, a0)
15544
15545 def add_to_derivative(self, a0, a1, a2):
15546 r"""add_to_derivative(CombineProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15547 return _IMP_core.CombineProvenance_add_to_derivative(self, a0, a1, a2)
15548
15549 def set_is_optimized(self, a0, a1):
15550 r"""set_is_optimized(CombineProvenance self, FloatKey a0, bool a1)"""
15551 return _IMP_core.CombineProvenance_set_is_optimized(self, a0, a1)
15552
15553 def get_is_optimized(self, a0):
15554 r"""get_is_optimized(CombineProvenance self, FloatKey a0) -> bool"""
15555 return _IMP_core.CombineProvenance_get_is_optimized(self, a0)
15556
15557 def get_check_level(self):
15558 r"""get_check_level(CombineProvenance self) -> IMP::CheckLevel"""
15559 return _IMP_core.CombineProvenance_get_check_level(self)
15560
15561 def __eq__(self, *args):
15562 r"""
15563 __eq__(CombineProvenance self, CombineProvenance o) -> bool
15564 __eq__(CombineProvenance self, Particle d) -> bool
15565 """
15566 return _IMP_core.CombineProvenance___eq__(self, *args)
15567
15568 def __ne__(self, *args):
15569 r"""
15570 __ne__(CombineProvenance self, CombineProvenance o) -> bool
15571 __ne__(CombineProvenance self, Particle d) -> bool
15572 """
15573 return _IMP_core.CombineProvenance___ne__(self, *args)
15574
15575 def __le__(self, *args):
15576 r"""
15577 __le__(CombineProvenance self, CombineProvenance o) -> bool
15578 __le__(CombineProvenance self, Particle d) -> bool
15579 """
15580 return _IMP_core.CombineProvenance___le__(self, *args)
15581
15582 def __lt__(self, *args):
15583 r"""
15584 __lt__(CombineProvenance self, CombineProvenance o) -> bool
15585 __lt__(CombineProvenance self, Particle d) -> bool
15586 """
15587 return _IMP_core.CombineProvenance___lt__(self, *args)
15588
15589 def __ge__(self, *args):
15590 r"""
15591 __ge__(CombineProvenance self, CombineProvenance o) -> bool
15592 __ge__(CombineProvenance self, Particle d) -> bool
15593 """
15594 return _IMP_core.CombineProvenance___ge__(self, *args)
15595
15596 def __gt__(self, *args):
15597 r"""
15598 __gt__(CombineProvenance self, CombineProvenance o) -> bool
15599 __gt__(CombineProvenance self, Particle d) -> bool
15600 """
15601 return _IMP_core.CombineProvenance___gt__(self, *args)
15602
15603 def __hash__(self):
15604 r"""__hash__(CombineProvenance self) -> std::size_t"""
15605 return _IMP_core.CombineProvenance___hash__(self)
15606
15607 def __str__(self):
15608 r"""__str__(CombineProvenance self) -> std::string"""
15609 return _IMP_core.CombineProvenance___str__(self)
15610
15611 def __repr__(self):
15612 r"""__repr__(CombineProvenance self) -> std::string"""
15613 return _IMP_core.CombineProvenance___repr__(self)
15614
15615 def _get_as_binary(self):
15616 r"""_get_as_binary(CombineProvenance self) -> PyObject *"""
15617 return _IMP_core.CombineProvenance__get_as_binary(self)
15618
15619 def _set_from_binary(self, p):
15620 r"""_set_from_binary(CombineProvenance self, PyObject * p)"""
15621 return _IMP_core.CombineProvenance__set_from_binary(self, p)
15622
15623 def __getstate__(self):
15624 p = self._get_as_binary()
15625 if len(self.__dict__) > 1:
15626 d = self.__dict__.copy()
15627 del d['this']
15628 p = (d, p)
15629 return p
15630
15631 def __setstate__(self, p):
15632 if not hasattr(self, 'this'):
15633 self.__init__()
15634 if isinstance(p, tuple):
15635 d, p = p
15636 self.__dict__.update(d)
15637 return self._set_from_binary(p)
15638
15639 __swig_destroy__ = _IMP_core.delete_CombineProvenance
15640
15641# Register CombineProvenance in _IMP_core:
15642_IMP_core.CombineProvenance_swigregister(CombineProvenance)
15643class FilterProvenance(Provenance):
15644 r"""Proxy of C++ IMP::core::FilterProvenance class."""
15645
15646 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15647
15648 def set_method(self, method):
15649 r"""set_method(FilterProvenance self, std::string method)"""
15650 return _IMP_core.FilterProvenance_set_method(self, method)
15651
15652 def get_method(self):
15653 r"""get_method(FilterProvenance self) -> std::string"""
15654 return _IMP_core.FilterProvenance_get_method(self)
15655
15656 def set_number_of_frames(self, frames):
15657 r"""set_number_of_frames(FilterProvenance self, int frames)"""
15658 return _IMP_core.FilterProvenance_set_number_of_frames(self, frames)
15659
15660 def get_number_of_frames(self):
15661 r"""get_number_of_frames(FilterProvenance self) -> int"""
15662 return _IMP_core.FilterProvenance_get_number_of_frames(self)
15663
15664 def set_threshold(self, threshold):
15665 r"""set_threshold(FilterProvenance self, double threshold)"""
15666 return _IMP_core.FilterProvenance_set_threshold(self, threshold)
15667
15668 def get_threshold(self):
15669 r"""get_threshold(FilterProvenance self) -> double"""
15670 return _IMP_core.FilterProvenance_get_threshold(self)
15671
15672 def __init__(self, *args):
15673 r"""
15674 __init__(FilterProvenance self) -> FilterProvenance
15675 __init__(FilterProvenance self, Model m, ParticleIndex id) -> FilterProvenance
15676 __init__(FilterProvenance self, _ParticleAdaptor d) -> FilterProvenance
15677 """
15678 _IMP_core.FilterProvenance_swiginit(self, _IMP_core.new_FilterProvenance(*args))
15679
15680 @staticmethod
15681 def get_is_setup(*args):
15682 r"""
15683 get_is_setup(Model m, ParticleIndex pi) -> bool
15684 get_is_setup(_ParticleAdaptor p) -> bool
15685 """
15686 return _IMP_core.FilterProvenance_get_is_setup(*args)
15687
15688 def show(self, *args):
15689 r"""show(FilterProvenance self, _ostream out=std::cout)"""
15690 return _IMP_core.FilterProvenance_show(self, *args)
15691
15692 @staticmethod
15693 def setup_particle(*args):
15694 r"""
15695 setup_particle(Model m, ParticleIndex pi, std::string method, double threshold, int frames) -> FilterProvenance
15696 setup_particle(_ParticleAdaptor pa, std::string method, double threshold, int frames) -> FilterProvenance
15697 setup_particle(Model m, ParticleIndex pi, FilterProvenance o) -> FilterProvenance
15698 setup_particle(_ParticleAdaptor pa, FilterProvenance o) -> FilterProvenance
15699 """
15700 return _IMP_core.FilterProvenance_setup_particle(*args)
15701
15702 def add_attribute(self, *args):
15703 r"""
15704 add_attribute(FilterProvenance self, FloatKey k, IMP::Float v, bool opt)
15705 add_attribute(FilterProvenance self, FloatKey a0, IMP::Float a1)
15706 add_attribute(FilterProvenance self, IntKey a0, IMP::Int a1)
15707 add_attribute(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15708 add_attribute(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15709 add_attribute(FilterProvenance self, StringKey a0, IMP::String a1)
15710 add_attribute(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15711 add_attribute(FilterProvenance self, ObjectKey a0, Object a1)
15712 add_attribute(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15713 add_attribute(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15714 add_attribute(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15715 add_attribute(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15716 """
15717 return _IMP_core.FilterProvenance_add_attribute(self, *args)
15718
15719 def get_value(self, *args):
15720 r"""
15721 get_value(FilterProvenance self, FloatKey a0) -> IMP::Float
15722 get_value(FilterProvenance self, IntKey a0) -> IMP::Int
15723 get_value(FilterProvenance self, FloatsKey a0) -> IMP::Floats
15724 get_value(FilterProvenance self, IntsKey a0) -> IMP::Ints
15725 get_value(FilterProvenance self, StringKey a0) -> IMP::String
15726 get_value(FilterProvenance self, ParticleIndexKey a0) -> Particle
15727 get_value(FilterProvenance self, ObjectKey a0) -> Object
15728 get_value(FilterProvenance self, SparseFloatKey a0) -> IMP::Float
15729 get_value(FilterProvenance self, SparseIntKey a0) -> IMP::Int
15730 get_value(FilterProvenance self, SparseStringKey a0) -> IMP::String
15731 get_value(FilterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15732 """
15733 return _IMP_core.FilterProvenance_get_value(self, *args)
15734
15735 def set_value(self, *args):
15736 r"""
15737 set_value(FilterProvenance self, FloatKey a0, IMP::Float a1)
15738 set_value(FilterProvenance self, IntKey a0, IMP::Int a1)
15739 set_value(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15740 set_value(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15741 set_value(FilterProvenance self, StringKey a0, IMP::String a1)
15742 set_value(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15743 set_value(FilterProvenance self, ObjectKey a0, Object a1)
15744 set_value(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15745 set_value(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15746 set_value(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15747 set_value(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15748 """
15749 return _IMP_core.FilterProvenance_set_value(self, *args)
15750
15751 def remove_attribute(self, *args):
15752 r"""
15753 remove_attribute(FilterProvenance self, FloatKey a0)
15754 remove_attribute(FilterProvenance self, IntKey a0)
15755 remove_attribute(FilterProvenance self, FloatsKey a0)
15756 remove_attribute(FilterProvenance self, IntsKey a0)
15757 remove_attribute(FilterProvenance self, StringKey a0)
15758 remove_attribute(FilterProvenance self, ParticleIndexKey a0)
15759 remove_attribute(FilterProvenance self, ObjectKey a0)
15760 remove_attribute(FilterProvenance self, SparseFloatKey a0)
15761 remove_attribute(FilterProvenance self, SparseIntKey a0)
15762 remove_attribute(FilterProvenance self, SparseStringKey a0)
15763 remove_attribute(FilterProvenance self, SparseParticleIndexKey a0)
15764 """
15765 return _IMP_core.FilterProvenance_remove_attribute(self, *args)
15766
15767 def has_attribute(self, *args):
15768 r"""
15769 has_attribute(FilterProvenance self, FloatKey a0) -> bool
15770 has_attribute(FilterProvenance self, IntKey a0) -> bool
15771 has_attribute(FilterProvenance self, FloatsKey a0) -> bool
15772 has_attribute(FilterProvenance self, IntsKey a0) -> bool
15773 has_attribute(FilterProvenance self, StringKey a0) -> bool
15774 has_attribute(FilterProvenance self, ParticleIndexKey a0) -> bool
15775 has_attribute(FilterProvenance self, ObjectKey a0) -> bool
15776 has_attribute(FilterProvenance self, SparseFloatKey a0) -> bool
15777 has_attribute(FilterProvenance self, SparseIntKey a0) -> bool
15778 has_attribute(FilterProvenance self, SparseStringKey a0) -> bool
15779 has_attribute(FilterProvenance self, SparseParticleIndexKey a0) -> bool
15780 """
15781 return _IMP_core.FilterProvenance_has_attribute(self, *args)
15782
15783 def get_derivative(self, a0):
15784 r"""get_derivative(FilterProvenance self, FloatKey a0) -> double"""
15785 return _IMP_core.FilterProvenance_get_derivative(self, a0)
15786
15787 def get_name(self):
15788 r"""get_name(FilterProvenance self) -> std::string"""
15789 return _IMP_core.FilterProvenance_get_name(self)
15790
15791 def clear_caches(self):
15792 r"""clear_caches(FilterProvenance self)"""
15793 return _IMP_core.FilterProvenance_clear_caches(self)
15794
15795 def set_name(self, a0):
15796 r"""set_name(FilterProvenance self, std::string a0)"""
15797 return _IMP_core.FilterProvenance_set_name(self, a0)
15798
15799 def set_check_level(self, a0):
15800 r"""set_check_level(FilterProvenance self, IMP::CheckLevel a0)"""
15801 return _IMP_core.FilterProvenance_set_check_level(self, a0)
15802
15803 def add_to_derivative(self, a0, a1, a2):
15804 r"""add_to_derivative(FilterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15805 return _IMP_core.FilterProvenance_add_to_derivative(self, a0, a1, a2)
15806
15807 def set_is_optimized(self, a0, a1):
15808 r"""set_is_optimized(FilterProvenance self, FloatKey a0, bool a1)"""
15809 return _IMP_core.FilterProvenance_set_is_optimized(self, a0, a1)
15810
15811 def get_is_optimized(self, a0):
15812 r"""get_is_optimized(FilterProvenance self, FloatKey a0) -> bool"""
15813 return _IMP_core.FilterProvenance_get_is_optimized(self, a0)
15814
15815 def get_check_level(self):
15816 r"""get_check_level(FilterProvenance self) -> IMP::CheckLevel"""
15817 return _IMP_core.FilterProvenance_get_check_level(self)
15818
15819 def __eq__(self, *args):
15820 r"""
15821 __eq__(FilterProvenance self, FilterProvenance o) -> bool
15822 __eq__(FilterProvenance self, Particle d) -> bool
15823 """
15824 return _IMP_core.FilterProvenance___eq__(self, *args)
15825
15826 def __ne__(self, *args):
15827 r"""
15828 __ne__(FilterProvenance self, FilterProvenance o) -> bool
15829 __ne__(FilterProvenance self, Particle d) -> bool
15830 """
15831 return _IMP_core.FilterProvenance___ne__(self, *args)
15832
15833 def __le__(self, *args):
15834 r"""
15835 __le__(FilterProvenance self, FilterProvenance o) -> bool
15836 __le__(FilterProvenance self, Particle d) -> bool
15837 """
15838 return _IMP_core.FilterProvenance___le__(self, *args)
15839
15840 def __lt__(self, *args):
15841 r"""
15842 __lt__(FilterProvenance self, FilterProvenance o) -> bool
15843 __lt__(FilterProvenance self, Particle d) -> bool
15844 """
15845 return _IMP_core.FilterProvenance___lt__(self, *args)
15846
15847 def __ge__(self, *args):
15848 r"""
15849 __ge__(FilterProvenance self, FilterProvenance o) -> bool
15850 __ge__(FilterProvenance self, Particle d) -> bool
15851 """
15852 return _IMP_core.FilterProvenance___ge__(self, *args)
15853
15854 def __gt__(self, *args):
15855 r"""
15856 __gt__(FilterProvenance self, FilterProvenance o) -> bool
15857 __gt__(FilterProvenance self, Particle d) -> bool
15858 """
15859 return _IMP_core.FilterProvenance___gt__(self, *args)
15860
15861 def __hash__(self):
15862 r"""__hash__(FilterProvenance self) -> std::size_t"""
15863 return _IMP_core.FilterProvenance___hash__(self)
15864
15865 def __str__(self):
15866 r"""__str__(FilterProvenance self) -> std::string"""
15867 return _IMP_core.FilterProvenance___str__(self)
15868
15869 def __repr__(self):
15870 r"""__repr__(FilterProvenance self) -> std::string"""
15871 return _IMP_core.FilterProvenance___repr__(self)
15872
15873 def _get_as_binary(self):
15874 r"""_get_as_binary(FilterProvenance self) -> PyObject *"""
15875 return _IMP_core.FilterProvenance__get_as_binary(self)
15876
15877 def _set_from_binary(self, p):
15878 r"""_set_from_binary(FilterProvenance self, PyObject * p)"""
15879 return _IMP_core.FilterProvenance__set_from_binary(self, p)
15880
15881 def __getstate__(self):
15882 p = self._get_as_binary()
15883 if len(self.__dict__) > 1:
15884 d = self.__dict__.copy()
15885 del d['this']
15886 p = (d, p)
15887 return p
15888
15889 def __setstate__(self, p):
15890 if not hasattr(self, 'this'):
15891 self.__init__()
15892 if isinstance(p, tuple):
15893 d, p = p
15894 self.__dict__.update(d)
15895 return self._set_from_binary(p)
15896
15897 __swig_destroy__ = _IMP_core.delete_FilterProvenance
15898
15899# Register FilterProvenance in _IMP_core:
15900_IMP_core.FilterProvenance_swigregister(FilterProvenance)
15901class ClusterProvenance(Provenance):
15902 r"""Proxy of C++ IMP::core::ClusterProvenance class."""
15903
15904 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15905
15906 def set_number_of_members(self, members):
15907 r"""set_number_of_members(ClusterProvenance self, int members)"""
15908 return _IMP_core.ClusterProvenance_set_number_of_members(self, members)
15909
15910 def get_number_of_members(self):
15911 r"""get_number_of_members(ClusterProvenance self) -> int"""
15912 return _IMP_core.ClusterProvenance_get_number_of_members(self)
15913
15914 def set_precision(self, precision):
15915 r"""set_precision(ClusterProvenance self, double precision)"""
15916 return _IMP_core.ClusterProvenance_set_precision(self, precision)
15917
15918 def get_precision(self):
15919 r"""get_precision(ClusterProvenance self) -> double"""
15920 return _IMP_core.ClusterProvenance_get_precision(self)
15921
15922 def set_density(self, density):
15923 r"""set_density(ClusterProvenance self, std::string density)"""
15924 return _IMP_core.ClusterProvenance_set_density(self, density)
15925
15926 def get_density(self):
15927 r"""get_density(ClusterProvenance self) -> std::string"""
15928 return _IMP_core.ClusterProvenance_get_density(self)
15929
15930 def __init__(self, *args):
15931 r"""
15932 __init__(ClusterProvenance self) -> ClusterProvenance
15933 __init__(ClusterProvenance self, Model m, ParticleIndex id) -> ClusterProvenance
15934 __init__(ClusterProvenance self, _ParticleAdaptor d) -> ClusterProvenance
15935 """
15936 _IMP_core.ClusterProvenance_swiginit(self, _IMP_core.new_ClusterProvenance(*args))
15937
15938 @staticmethod
15939 def get_is_setup(*args):
15940 r"""
15941 get_is_setup(Model m, ParticleIndex pi) -> bool
15942 get_is_setup(_ParticleAdaptor p) -> bool
15943 """
15944 return _IMP_core.ClusterProvenance_get_is_setup(*args)
15945
15946 def show(self, *args):
15947 r"""show(ClusterProvenance self, _ostream out=std::cout)"""
15948 return _IMP_core.ClusterProvenance_show(self, *args)
15949
15950 @staticmethod
15951 def setup_particle(*args):
15952 r"""
15953 setup_particle(Model m, ParticleIndex pi, int members) -> ClusterProvenance
15954 setup_particle(_ParticleAdaptor pa, int members) -> ClusterProvenance
15955 setup_particle(Model m, ParticleIndex pi, int members, double precision) -> ClusterProvenance
15956 setup_particle(_ParticleAdaptor pa, int members, double precision) -> ClusterProvenance
15957 setup_particle(Model m, ParticleIndex pi, int members, double precision, std::string density) -> ClusterProvenance
15958 setup_particle(_ParticleAdaptor pa, int members, double precision, std::string density) -> ClusterProvenance
15959 setup_particle(Model m, ParticleIndex pi, ClusterProvenance o) -> ClusterProvenance
15960 setup_particle(_ParticleAdaptor pa, ClusterProvenance o) -> ClusterProvenance
15961 """
15962 return _IMP_core.ClusterProvenance_setup_particle(*args)
15963
15964 def add_attribute(self, *args):
15965 r"""
15966 add_attribute(ClusterProvenance self, FloatKey k, IMP::Float v, bool opt)
15967 add_attribute(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15968 add_attribute(ClusterProvenance self, IntKey a0, IMP::Int a1)
15969 add_attribute(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15970 add_attribute(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15971 add_attribute(ClusterProvenance self, StringKey a0, IMP::String a1)
15972 add_attribute(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15973 add_attribute(ClusterProvenance self, ObjectKey a0, Object a1)
15974 add_attribute(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15975 add_attribute(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15976 add_attribute(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15977 add_attribute(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15978 """
15979 return _IMP_core.ClusterProvenance_add_attribute(self, *args)
15980
15981 def get_value(self, *args):
15982 r"""
15983 get_value(ClusterProvenance self, FloatKey a0) -> IMP::Float
15984 get_value(ClusterProvenance self, IntKey a0) -> IMP::Int
15985 get_value(ClusterProvenance self, FloatsKey a0) -> IMP::Floats
15986 get_value(ClusterProvenance self, IntsKey a0) -> IMP::Ints
15987 get_value(ClusterProvenance self, StringKey a0) -> IMP::String
15988 get_value(ClusterProvenance self, ParticleIndexKey a0) -> Particle
15989 get_value(ClusterProvenance self, ObjectKey a0) -> Object
15990 get_value(ClusterProvenance self, SparseFloatKey a0) -> IMP::Float
15991 get_value(ClusterProvenance self, SparseIntKey a0) -> IMP::Int
15992 get_value(ClusterProvenance self, SparseStringKey a0) -> IMP::String
15993 get_value(ClusterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15994 """
15995 return _IMP_core.ClusterProvenance_get_value(self, *args)
15996
15997 def set_value(self, *args):
15998 r"""
15999 set_value(ClusterProvenance self, FloatKey a0, IMP::Float a1)
16000 set_value(ClusterProvenance self, IntKey a0, IMP::Int a1)
16001 set_value(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
16002 set_value(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
16003 set_value(ClusterProvenance self, StringKey a0, IMP::String a1)
16004 set_value(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
16005 set_value(ClusterProvenance self, ObjectKey a0, Object a1)
16006 set_value(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
16007 set_value(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
16008 set_value(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
16009 set_value(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16010 """
16011 return _IMP_core.ClusterProvenance_set_value(self, *args)
16012
16013 def remove_attribute(self, *args):
16014 r"""
16015 remove_attribute(ClusterProvenance self, FloatKey a0)
16016 remove_attribute(ClusterProvenance self, IntKey a0)
16017 remove_attribute(ClusterProvenance self, FloatsKey a0)
16018 remove_attribute(ClusterProvenance self, IntsKey a0)
16019 remove_attribute(ClusterProvenance self, StringKey a0)
16020 remove_attribute(ClusterProvenance self, ParticleIndexKey a0)
16021 remove_attribute(ClusterProvenance self, ObjectKey a0)
16022 remove_attribute(ClusterProvenance self, SparseFloatKey a0)
16023 remove_attribute(ClusterProvenance self, SparseIntKey a0)
16024 remove_attribute(ClusterProvenance self, SparseStringKey a0)
16025 remove_attribute(ClusterProvenance self, SparseParticleIndexKey a0)
16026 """
16027 return _IMP_core.ClusterProvenance_remove_attribute(self, *args)
16028
16029 def has_attribute(self, *args):
16030 r"""
16031 has_attribute(ClusterProvenance self, FloatKey a0) -> bool
16032 has_attribute(ClusterProvenance self, IntKey a0) -> bool
16033 has_attribute(ClusterProvenance self, FloatsKey a0) -> bool
16034 has_attribute(ClusterProvenance self, IntsKey a0) -> bool
16035 has_attribute(ClusterProvenance self, StringKey a0) -> bool
16036 has_attribute(ClusterProvenance self, ParticleIndexKey a0) -> bool
16037 has_attribute(ClusterProvenance self, ObjectKey a0) -> bool
16038 has_attribute(ClusterProvenance self, SparseFloatKey a0) -> bool
16039 has_attribute(ClusterProvenance self, SparseIntKey a0) -> bool
16040 has_attribute(ClusterProvenance self, SparseStringKey a0) -> bool
16041 has_attribute(ClusterProvenance self, SparseParticleIndexKey a0) -> bool
16042 """
16043 return _IMP_core.ClusterProvenance_has_attribute(self, *args)
16044
16045 def get_derivative(self, a0):
16046 r"""get_derivative(ClusterProvenance self, FloatKey a0) -> double"""
16047 return _IMP_core.ClusterProvenance_get_derivative(self, a0)
16048
16049 def get_name(self):
16050 r"""get_name(ClusterProvenance self) -> std::string"""
16051 return _IMP_core.ClusterProvenance_get_name(self)
16052
16053 def clear_caches(self):
16054 r"""clear_caches(ClusterProvenance self)"""
16055 return _IMP_core.ClusterProvenance_clear_caches(self)
16056
16057 def set_name(self, a0):
16058 r"""set_name(ClusterProvenance self, std::string a0)"""
16059 return _IMP_core.ClusterProvenance_set_name(self, a0)
16060
16061 def set_check_level(self, a0):
16062 r"""set_check_level(ClusterProvenance self, IMP::CheckLevel a0)"""
16063 return _IMP_core.ClusterProvenance_set_check_level(self, a0)
16064
16065 def add_to_derivative(self, a0, a1, a2):
16066 r"""add_to_derivative(ClusterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16067 return _IMP_core.ClusterProvenance_add_to_derivative(self, a0, a1, a2)
16068
16069 def set_is_optimized(self, a0, a1):
16070 r"""set_is_optimized(ClusterProvenance self, FloatKey a0, bool a1)"""
16071 return _IMP_core.ClusterProvenance_set_is_optimized(self, a0, a1)
16072
16073 def get_is_optimized(self, a0):
16074 r"""get_is_optimized(ClusterProvenance self, FloatKey a0) -> bool"""
16075 return _IMP_core.ClusterProvenance_get_is_optimized(self, a0)
16076
16077 def get_check_level(self):
16078 r"""get_check_level(ClusterProvenance self) -> IMP::CheckLevel"""
16079 return _IMP_core.ClusterProvenance_get_check_level(self)
16080
16081 def __eq__(self, *args):
16082 r"""
16083 __eq__(ClusterProvenance self, ClusterProvenance o) -> bool
16084 __eq__(ClusterProvenance self, Particle d) -> bool
16085 """
16086 return _IMP_core.ClusterProvenance___eq__(self, *args)
16087
16088 def __ne__(self, *args):
16089 r"""
16090 __ne__(ClusterProvenance self, ClusterProvenance o) -> bool
16091 __ne__(ClusterProvenance self, Particle d) -> bool
16092 """
16093 return _IMP_core.ClusterProvenance___ne__(self, *args)
16094
16095 def __le__(self, *args):
16096 r"""
16097 __le__(ClusterProvenance self, ClusterProvenance o) -> bool
16098 __le__(ClusterProvenance self, Particle d) -> bool
16099 """
16100 return _IMP_core.ClusterProvenance___le__(self, *args)
16101
16102 def __lt__(self, *args):
16103 r"""
16104 __lt__(ClusterProvenance self, ClusterProvenance o) -> bool
16105 __lt__(ClusterProvenance self, Particle d) -> bool
16106 """
16107 return _IMP_core.ClusterProvenance___lt__(self, *args)
16108
16109 def __ge__(self, *args):
16110 r"""
16111 __ge__(ClusterProvenance self, ClusterProvenance o) -> bool
16112 __ge__(ClusterProvenance self, Particle d) -> bool
16113 """
16114 return _IMP_core.ClusterProvenance___ge__(self, *args)
16115
16116 def __gt__(self, *args):
16117 r"""
16118 __gt__(ClusterProvenance self, ClusterProvenance o) -> bool
16119 __gt__(ClusterProvenance self, Particle d) -> bool
16120 """
16121 return _IMP_core.ClusterProvenance___gt__(self, *args)
16122
16123 def __hash__(self):
16124 r"""__hash__(ClusterProvenance self) -> std::size_t"""
16125 return _IMP_core.ClusterProvenance___hash__(self)
16126
16127 def __str__(self):
16128 r"""__str__(ClusterProvenance self) -> std::string"""
16129 return _IMP_core.ClusterProvenance___str__(self)
16130
16131 def __repr__(self):
16132 r"""__repr__(ClusterProvenance self) -> std::string"""
16133 return _IMP_core.ClusterProvenance___repr__(self)
16134
16135 def _get_as_binary(self):
16136 r"""_get_as_binary(ClusterProvenance self) -> PyObject *"""
16137 return _IMP_core.ClusterProvenance__get_as_binary(self)
16138
16139 def _set_from_binary(self, p):
16140 r"""_set_from_binary(ClusterProvenance self, PyObject * p)"""
16141 return _IMP_core.ClusterProvenance__set_from_binary(self, p)
16142
16143 def __getstate__(self):
16144 p = self._get_as_binary()
16145 if len(self.__dict__) > 1:
16146 d = self.__dict__.copy()
16147 del d['this']
16148 p = (d, p)
16149 return p
16150
16151 def __setstate__(self, p):
16152 if not hasattr(self, 'this'):
16153 self.__init__()
16154 if isinstance(p, tuple):
16155 d, p = p
16156 self.__dict__.update(d)
16157 return self._set_from_binary(p)
16158
16159 __swig_destroy__ = _IMP_core.delete_ClusterProvenance
16160
16161# Register ClusterProvenance in _IMP_core:
16162_IMP_core.ClusterProvenance_swigregister(ClusterProvenance)
16163class ScriptProvenance(Provenance):
16164 r"""Proxy of C++ IMP::core::ScriptProvenance class."""
16165
16166 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16167
16168 def set_filename(self, filename):
16169 r"""set_filename(ScriptProvenance self, std::string filename)"""
16170 return _IMP_core.ScriptProvenance_set_filename(self, filename)
16171
16172 def get_filename(self):
16173 r"""get_filename(ScriptProvenance self) -> std::string"""
16174 return _IMP_core.ScriptProvenance_get_filename(self)
16175
16176 def __init__(self, *args):
16177 r"""
16178 __init__(ScriptProvenance self) -> ScriptProvenance
16179 __init__(ScriptProvenance self, Model m, ParticleIndex id) -> ScriptProvenance
16180 __init__(ScriptProvenance self, _ParticleAdaptor d) -> ScriptProvenance
16181 """
16182 _IMP_core.ScriptProvenance_swiginit(self, _IMP_core.new_ScriptProvenance(*args))
16183
16184 @staticmethod
16185 def get_is_setup(*args):
16186 r"""
16187 get_is_setup(Model m, ParticleIndex pi) -> bool
16188 get_is_setup(_ParticleAdaptor p) -> bool
16189 """
16190 return _IMP_core.ScriptProvenance_get_is_setup(*args)
16191
16192 def show(self, *args):
16193 r"""show(ScriptProvenance self, _ostream out=std::cout)"""
16194 return _IMP_core.ScriptProvenance_show(self, *args)
16195
16196 @staticmethod
16197 def setup_particle(*args):
16198 r"""
16199 setup_particle(Model m, ParticleIndex pi, std::string filename) -> ScriptProvenance
16200 setup_particle(_ParticleAdaptor pa, std::string filename) -> ScriptProvenance
16201 setup_particle(Model m, ParticleIndex pi, ScriptProvenance o) -> ScriptProvenance
16202 setup_particle(_ParticleAdaptor pa, ScriptProvenance o) -> ScriptProvenance
16203 """
16204 return _IMP_core.ScriptProvenance_setup_particle(*args)
16205
16206 def add_attribute(self, *args):
16207 r"""
16208 add_attribute(ScriptProvenance self, FloatKey k, IMP::Float v, bool opt)
16209 add_attribute(ScriptProvenance self, FloatKey a0, IMP::Float a1)
16210 add_attribute(ScriptProvenance self, IntKey a0, IMP::Int a1)
16211 add_attribute(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16212 add_attribute(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16213 add_attribute(ScriptProvenance self, StringKey a0, IMP::String a1)
16214 add_attribute(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16215 add_attribute(ScriptProvenance self, ObjectKey a0, Object a1)
16216 add_attribute(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16217 add_attribute(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16218 add_attribute(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16219 add_attribute(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16220 """
16221 return _IMP_core.ScriptProvenance_add_attribute(self, *args)
16222
16223 def get_value(self, *args):
16224 r"""
16225 get_value(ScriptProvenance self, FloatKey a0) -> IMP::Float
16226 get_value(ScriptProvenance self, IntKey a0) -> IMP::Int
16227 get_value(ScriptProvenance self, FloatsKey a0) -> IMP::Floats
16228 get_value(ScriptProvenance self, IntsKey a0) -> IMP::Ints
16229 get_value(ScriptProvenance self, StringKey a0) -> IMP::String
16230 get_value(ScriptProvenance self, ParticleIndexKey a0) -> Particle
16231 get_value(ScriptProvenance self, ObjectKey a0) -> Object
16232 get_value(ScriptProvenance self, SparseFloatKey a0) -> IMP::Float
16233 get_value(ScriptProvenance self, SparseIntKey a0) -> IMP::Int
16234 get_value(ScriptProvenance self, SparseStringKey a0) -> IMP::String
16235 get_value(ScriptProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16236 """
16237 return _IMP_core.ScriptProvenance_get_value(self, *args)
16238
16239 def set_value(self, *args):
16240 r"""
16241 set_value(ScriptProvenance self, FloatKey a0, IMP::Float a1)
16242 set_value(ScriptProvenance self, IntKey a0, IMP::Int a1)
16243 set_value(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16244 set_value(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16245 set_value(ScriptProvenance self, StringKey a0, IMP::String a1)
16246 set_value(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16247 set_value(ScriptProvenance self, ObjectKey a0, Object a1)
16248 set_value(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16249 set_value(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16250 set_value(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16251 set_value(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16252 """
16253 return _IMP_core.ScriptProvenance_set_value(self, *args)
16254
16255 def remove_attribute(self, *args):
16256 r"""
16257 remove_attribute(ScriptProvenance self, FloatKey a0)
16258 remove_attribute(ScriptProvenance self, IntKey a0)
16259 remove_attribute(ScriptProvenance self, FloatsKey a0)
16260 remove_attribute(ScriptProvenance self, IntsKey a0)
16261 remove_attribute(ScriptProvenance self, StringKey a0)
16262 remove_attribute(ScriptProvenance self, ParticleIndexKey a0)
16263 remove_attribute(ScriptProvenance self, ObjectKey a0)
16264 remove_attribute(ScriptProvenance self, SparseFloatKey a0)
16265 remove_attribute(ScriptProvenance self, SparseIntKey a0)
16266 remove_attribute(ScriptProvenance self, SparseStringKey a0)
16267 remove_attribute(ScriptProvenance self, SparseParticleIndexKey a0)
16268 """
16269 return _IMP_core.ScriptProvenance_remove_attribute(self, *args)
16270
16271 def has_attribute(self, *args):
16272 r"""
16273 has_attribute(ScriptProvenance self, FloatKey a0) -> bool
16274 has_attribute(ScriptProvenance self, IntKey a0) -> bool
16275 has_attribute(ScriptProvenance self, FloatsKey a0) -> bool
16276 has_attribute(ScriptProvenance self, IntsKey a0) -> bool
16277 has_attribute(ScriptProvenance self, StringKey a0) -> bool
16278 has_attribute(ScriptProvenance self, ParticleIndexKey a0) -> bool
16279 has_attribute(ScriptProvenance self, ObjectKey a0) -> bool
16280 has_attribute(ScriptProvenance self, SparseFloatKey a0) -> bool
16281 has_attribute(ScriptProvenance self, SparseIntKey a0) -> bool
16282 has_attribute(ScriptProvenance self, SparseStringKey a0) -> bool
16283 has_attribute(ScriptProvenance self, SparseParticleIndexKey a0) -> bool
16284 """
16285 return _IMP_core.ScriptProvenance_has_attribute(self, *args)
16286
16287 def get_derivative(self, a0):
16288 r"""get_derivative(ScriptProvenance self, FloatKey a0) -> double"""
16289 return _IMP_core.ScriptProvenance_get_derivative(self, a0)
16290
16291 def get_name(self):
16292 r"""get_name(ScriptProvenance self) -> std::string"""
16293 return _IMP_core.ScriptProvenance_get_name(self)
16294
16295 def clear_caches(self):
16296 r"""clear_caches(ScriptProvenance self)"""
16297 return _IMP_core.ScriptProvenance_clear_caches(self)
16298
16299 def set_name(self, a0):
16300 r"""set_name(ScriptProvenance self, std::string a0)"""
16301 return _IMP_core.ScriptProvenance_set_name(self, a0)
16302
16303 def set_check_level(self, a0):
16304 r"""set_check_level(ScriptProvenance self, IMP::CheckLevel a0)"""
16305 return _IMP_core.ScriptProvenance_set_check_level(self, a0)
16306
16307 def add_to_derivative(self, a0, a1, a2):
16308 r"""add_to_derivative(ScriptProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16309 return _IMP_core.ScriptProvenance_add_to_derivative(self, a0, a1, a2)
16310
16311 def set_is_optimized(self, a0, a1):
16312 r"""set_is_optimized(ScriptProvenance self, FloatKey a0, bool a1)"""
16313 return _IMP_core.ScriptProvenance_set_is_optimized(self, a0, a1)
16314
16315 def get_is_optimized(self, a0):
16316 r"""get_is_optimized(ScriptProvenance self, FloatKey a0) -> bool"""
16317 return _IMP_core.ScriptProvenance_get_is_optimized(self, a0)
16318
16319 def get_check_level(self):
16320 r"""get_check_level(ScriptProvenance self) -> IMP::CheckLevel"""
16321 return _IMP_core.ScriptProvenance_get_check_level(self)
16322
16323 def __eq__(self, *args):
16324 r"""
16325 __eq__(ScriptProvenance self, ScriptProvenance o) -> bool
16326 __eq__(ScriptProvenance self, Particle d) -> bool
16327 """
16328 return _IMP_core.ScriptProvenance___eq__(self, *args)
16329
16330 def __ne__(self, *args):
16331 r"""
16332 __ne__(ScriptProvenance self, ScriptProvenance o) -> bool
16333 __ne__(ScriptProvenance self, Particle d) -> bool
16334 """
16335 return _IMP_core.ScriptProvenance___ne__(self, *args)
16336
16337 def __le__(self, *args):
16338 r"""
16339 __le__(ScriptProvenance self, ScriptProvenance o) -> bool
16340 __le__(ScriptProvenance self, Particle d) -> bool
16341 """
16342 return _IMP_core.ScriptProvenance___le__(self, *args)
16343
16344 def __lt__(self, *args):
16345 r"""
16346 __lt__(ScriptProvenance self, ScriptProvenance o) -> bool
16347 __lt__(ScriptProvenance self, Particle d) -> bool
16348 """
16349 return _IMP_core.ScriptProvenance___lt__(self, *args)
16350
16351 def __ge__(self, *args):
16352 r"""
16353 __ge__(ScriptProvenance self, ScriptProvenance o) -> bool
16354 __ge__(ScriptProvenance self, Particle d) -> bool
16355 """
16356 return _IMP_core.ScriptProvenance___ge__(self, *args)
16357
16358 def __gt__(self, *args):
16359 r"""
16360 __gt__(ScriptProvenance self, ScriptProvenance o) -> bool
16361 __gt__(ScriptProvenance self, Particle d) -> bool
16362 """
16363 return _IMP_core.ScriptProvenance___gt__(self, *args)
16364
16365 def __hash__(self):
16366 r"""__hash__(ScriptProvenance self) -> std::size_t"""
16367 return _IMP_core.ScriptProvenance___hash__(self)
16368
16369 def __str__(self):
16370 r"""__str__(ScriptProvenance self) -> std::string"""
16371 return _IMP_core.ScriptProvenance___str__(self)
16372
16373 def __repr__(self):
16374 r"""__repr__(ScriptProvenance self) -> std::string"""
16375 return _IMP_core.ScriptProvenance___repr__(self)
16376
16377 def _get_as_binary(self):
16378 r"""_get_as_binary(ScriptProvenance self) -> PyObject *"""
16379 return _IMP_core.ScriptProvenance__get_as_binary(self)
16380
16381 def _set_from_binary(self, p):
16382 r"""_set_from_binary(ScriptProvenance self, PyObject * p)"""
16383 return _IMP_core.ScriptProvenance__set_from_binary(self, p)
16384
16385 def __getstate__(self):
16386 p = self._get_as_binary()
16387 if len(self.__dict__) > 1:
16388 d = self.__dict__.copy()
16389 del d['this']
16390 p = (d, p)
16391 return p
16392
16393 def __setstate__(self, p):
16394 if not hasattr(self, 'this'):
16395 self.__init__()
16396 if isinstance(p, tuple):
16397 d, p = p
16398 self.__dict__.update(d)
16399 return self._set_from_binary(p)
16400
16401 __swig_destroy__ = _IMP_core.delete_ScriptProvenance
16402
16403# Register ScriptProvenance in _IMP_core:
16404_IMP_core.ScriptProvenance_swigregister(ScriptProvenance)
16405class SoftwareProvenance(Provenance):
16406 r"""Proxy of C++ IMP::core::SoftwareProvenance class."""
16407
16408 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16409
16410 def set_software_name(self, name):
16411 r"""set_software_name(SoftwareProvenance self, std::string name)"""
16412 return _IMP_core.SoftwareProvenance_set_software_name(self, name)
16413
16414 def get_software_name(self):
16415 r"""get_software_name(SoftwareProvenance self) -> std::string"""
16416 return _IMP_core.SoftwareProvenance_get_software_name(self)
16417
16418 def set_version(self, version):
16419 r"""set_version(SoftwareProvenance self, std::string version)"""
16420 return _IMP_core.SoftwareProvenance_set_version(self, version)
16421
16422 def get_version(self):
16423 r"""get_version(SoftwareProvenance self) -> std::string"""
16424 return _IMP_core.SoftwareProvenance_get_version(self)
16425
16426 def set_location(self, location):
16427 r"""set_location(SoftwareProvenance self, std::string location)"""
16428 return _IMP_core.SoftwareProvenance_set_location(self, location)
16429
16430 def get_location(self):
16431 r"""get_location(SoftwareProvenance self) -> std::string"""
16432 return _IMP_core.SoftwareProvenance_get_location(self)
16433
16434 def __init__(self, *args):
16435 r"""
16436 __init__(SoftwareProvenance self) -> SoftwareProvenance
16437 __init__(SoftwareProvenance self, Model m, ParticleIndex id) -> SoftwareProvenance
16438 __init__(SoftwareProvenance self, _ParticleAdaptor d) -> SoftwareProvenance
16439 """
16440 _IMP_core.SoftwareProvenance_swiginit(self, _IMP_core.new_SoftwareProvenance(*args))
16441
16442 @staticmethod
16443 def get_is_setup(*args):
16444 r"""
16445 get_is_setup(Model m, ParticleIndex pi) -> bool
16446 get_is_setup(_ParticleAdaptor p) -> bool
16447 """
16448 return _IMP_core.SoftwareProvenance_get_is_setup(*args)
16449
16450 def show(self, *args):
16451 r"""show(SoftwareProvenance self, _ostream out=std::cout)"""
16452 return _IMP_core.SoftwareProvenance_show(self, *args)
16453
16454 @staticmethod
16455 def setup_particle(*args):
16456 r"""
16457 setup_particle(Model m, ParticleIndex pi, std::string name, std::string version, std::string location) -> SoftwareProvenance
16458 setup_particle(_ParticleAdaptor pa, std::string name, std::string version, std::string location) -> SoftwareProvenance
16459 setup_particle(Model m, ParticleIndex pi, SoftwareProvenance o) -> SoftwareProvenance
16460 setup_particle(_ParticleAdaptor pa, SoftwareProvenance o) -> SoftwareProvenance
16461 """
16462 return _IMP_core.SoftwareProvenance_setup_particle(*args)
16463
16464 def add_attribute(self, *args):
16465 r"""
16466 add_attribute(SoftwareProvenance self, FloatKey k, IMP::Float v, bool opt)
16467 add_attribute(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16468 add_attribute(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16469 add_attribute(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16470 add_attribute(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16471 add_attribute(SoftwareProvenance self, StringKey a0, IMP::String a1)
16472 add_attribute(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16473 add_attribute(SoftwareProvenance self, ObjectKey a0, Object a1)
16474 add_attribute(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16475 add_attribute(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16476 add_attribute(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16477 add_attribute(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16478 """
16479 return _IMP_core.SoftwareProvenance_add_attribute(self, *args)
16480
16481 def get_value(self, *args):
16482 r"""
16483 get_value(SoftwareProvenance self, FloatKey a0) -> IMP::Float
16484 get_value(SoftwareProvenance self, IntKey a0) -> IMP::Int
16485 get_value(SoftwareProvenance self, FloatsKey a0) -> IMP::Floats
16486 get_value(SoftwareProvenance self, IntsKey a0) -> IMP::Ints
16487 get_value(SoftwareProvenance self, StringKey a0) -> IMP::String
16488 get_value(SoftwareProvenance self, ParticleIndexKey a0) -> Particle
16489 get_value(SoftwareProvenance self, ObjectKey a0) -> Object
16490 get_value(SoftwareProvenance self, SparseFloatKey a0) -> IMP::Float
16491 get_value(SoftwareProvenance self, SparseIntKey a0) -> IMP::Int
16492 get_value(SoftwareProvenance self, SparseStringKey a0) -> IMP::String
16493 get_value(SoftwareProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16494 """
16495 return _IMP_core.SoftwareProvenance_get_value(self, *args)
16496
16497 def set_value(self, *args):
16498 r"""
16499 set_value(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16500 set_value(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16501 set_value(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16502 set_value(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16503 set_value(SoftwareProvenance self, StringKey a0, IMP::String a1)
16504 set_value(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16505 set_value(SoftwareProvenance self, ObjectKey a0, Object a1)
16506 set_value(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16507 set_value(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16508 set_value(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16509 set_value(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16510 """
16511 return _IMP_core.SoftwareProvenance_set_value(self, *args)
16512
16513 def remove_attribute(self, *args):
16514 r"""
16515 remove_attribute(SoftwareProvenance self, FloatKey a0)
16516 remove_attribute(SoftwareProvenance self, IntKey a0)
16517 remove_attribute(SoftwareProvenance self, FloatsKey a0)
16518 remove_attribute(SoftwareProvenance self, IntsKey a0)
16519 remove_attribute(SoftwareProvenance self, StringKey a0)
16520 remove_attribute(SoftwareProvenance self, ParticleIndexKey a0)
16521 remove_attribute(SoftwareProvenance self, ObjectKey a0)
16522 remove_attribute(SoftwareProvenance self, SparseFloatKey a0)
16523 remove_attribute(SoftwareProvenance self, SparseIntKey a0)
16524 remove_attribute(SoftwareProvenance self, SparseStringKey a0)
16525 remove_attribute(SoftwareProvenance self, SparseParticleIndexKey a0)
16526 """
16527 return _IMP_core.SoftwareProvenance_remove_attribute(self, *args)
16528
16529 def has_attribute(self, *args):
16530 r"""
16531 has_attribute(SoftwareProvenance self, FloatKey a0) -> bool
16532 has_attribute(SoftwareProvenance self, IntKey a0) -> bool
16533 has_attribute(SoftwareProvenance self, FloatsKey a0) -> bool
16534 has_attribute(SoftwareProvenance self, IntsKey a0) -> bool
16535 has_attribute(SoftwareProvenance self, StringKey a0) -> bool
16536 has_attribute(SoftwareProvenance self, ParticleIndexKey a0) -> bool
16537 has_attribute(SoftwareProvenance self, ObjectKey a0) -> bool
16538 has_attribute(SoftwareProvenance self, SparseFloatKey a0) -> bool
16539 has_attribute(SoftwareProvenance self, SparseIntKey a0) -> bool
16540 has_attribute(SoftwareProvenance self, SparseStringKey a0) -> bool
16541 has_attribute(SoftwareProvenance self, SparseParticleIndexKey a0) -> bool
16542 """
16543 return _IMP_core.SoftwareProvenance_has_attribute(self, *args)
16544
16545 def get_derivative(self, a0):
16546 r"""get_derivative(SoftwareProvenance self, FloatKey a0) -> double"""
16547 return _IMP_core.SoftwareProvenance_get_derivative(self, a0)
16548
16549 def get_name(self):
16550 r"""get_name(SoftwareProvenance self) -> std::string"""
16551 return _IMP_core.SoftwareProvenance_get_name(self)
16552
16553 def clear_caches(self):
16554 r"""clear_caches(SoftwareProvenance self)"""
16555 return _IMP_core.SoftwareProvenance_clear_caches(self)
16556
16557 def set_name(self, a0):
16558 r"""set_name(SoftwareProvenance self, std::string a0)"""
16559 return _IMP_core.SoftwareProvenance_set_name(self, a0)
16560
16561 def set_check_level(self, a0):
16562 r"""set_check_level(SoftwareProvenance self, IMP::CheckLevel a0)"""
16563 return _IMP_core.SoftwareProvenance_set_check_level(self, a0)
16564
16565 def add_to_derivative(self, a0, a1, a2):
16566 r"""add_to_derivative(SoftwareProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16567 return _IMP_core.SoftwareProvenance_add_to_derivative(self, a0, a1, a2)
16568
16569 def set_is_optimized(self, a0, a1):
16570 r"""set_is_optimized(SoftwareProvenance self, FloatKey a0, bool a1)"""
16571 return _IMP_core.SoftwareProvenance_set_is_optimized(self, a0, a1)
16572
16573 def get_is_optimized(self, a0):
16574 r"""get_is_optimized(SoftwareProvenance self, FloatKey a0) -> bool"""
16575 return _IMP_core.SoftwareProvenance_get_is_optimized(self, a0)
16576
16577 def get_check_level(self):
16578 r"""get_check_level(SoftwareProvenance self) -> IMP::CheckLevel"""
16579 return _IMP_core.SoftwareProvenance_get_check_level(self)
16580
16581 def __eq__(self, *args):
16582 r"""
16583 __eq__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16584 __eq__(SoftwareProvenance self, Particle d) -> bool
16585 """
16586 return _IMP_core.SoftwareProvenance___eq__(self, *args)
16587
16588 def __ne__(self, *args):
16589 r"""
16590 __ne__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16591 __ne__(SoftwareProvenance self, Particle d) -> bool
16592 """
16593 return _IMP_core.SoftwareProvenance___ne__(self, *args)
16594
16595 def __le__(self, *args):
16596 r"""
16597 __le__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16598 __le__(SoftwareProvenance self, Particle d) -> bool
16599 """
16600 return _IMP_core.SoftwareProvenance___le__(self, *args)
16601
16602 def __lt__(self, *args):
16603 r"""
16604 __lt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16605 __lt__(SoftwareProvenance self, Particle d) -> bool
16606 """
16607 return _IMP_core.SoftwareProvenance___lt__(self, *args)
16608
16609 def __ge__(self, *args):
16610 r"""
16611 __ge__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16612 __ge__(SoftwareProvenance self, Particle d) -> bool
16613 """
16614 return _IMP_core.SoftwareProvenance___ge__(self, *args)
16615
16616 def __gt__(self, *args):
16617 r"""
16618 __gt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16619 __gt__(SoftwareProvenance self, Particle d) -> bool
16620 """
16621 return _IMP_core.SoftwareProvenance___gt__(self, *args)
16622
16623 def __hash__(self):
16624 r"""__hash__(SoftwareProvenance self) -> std::size_t"""
16625 return _IMP_core.SoftwareProvenance___hash__(self)
16626
16627 def __str__(self):
16628 r"""__str__(SoftwareProvenance self) -> std::string"""
16629 return _IMP_core.SoftwareProvenance___str__(self)
16630
16631 def __repr__(self):
16632 r"""__repr__(SoftwareProvenance self) -> std::string"""
16633 return _IMP_core.SoftwareProvenance___repr__(self)
16634
16635 def _get_as_binary(self):
16636 r"""_get_as_binary(SoftwareProvenance self) -> PyObject *"""
16637 return _IMP_core.SoftwareProvenance__get_as_binary(self)
16638
16639 def _set_from_binary(self, p):
16640 r"""_set_from_binary(SoftwareProvenance self, PyObject * p)"""
16641 return _IMP_core.SoftwareProvenance__set_from_binary(self, p)
16642
16643 def __getstate__(self):
16644 p = self._get_as_binary()
16645 if len(self.__dict__) > 1:
16646 d = self.__dict__.copy()
16647 del d['this']
16648 p = (d, p)
16649 return p
16650
16651 def __setstate__(self, p):
16652 if not hasattr(self, 'this'):
16653 self.__init__()
16654 if isinstance(p, tuple):
16655 d, p = p
16656 self.__dict__.update(d)
16657 return self._set_from_binary(p)
16658
16659 __swig_destroy__ = _IMP_core.delete_SoftwareProvenance
16660
16661# Register SoftwareProvenance in _IMP_core:
16662_IMP_core.SoftwareProvenance_swigregister(SoftwareProvenance)
16663class Provenanced(IMP.Decorator):
16664 r"""Proxy of C++ IMP::core::Provenanced class."""
16665
16666 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16667
16668 def get_provenance(self):
16669 r"""get_provenance(Provenanced self) -> Provenance"""
16670 return _IMP_core.Provenanced_get_provenance(self)
16671
16672 def set_provenance(self, p):
16673 r"""set_provenance(Provenanced self, Provenance p)"""
16674 return _IMP_core.Provenanced_set_provenance(self, p)
16675
16676 def __init__(self, *args):
16677 r"""
16678 __init__(Provenanced self) -> Provenanced
16679 __init__(Provenanced self, Model m, ParticleIndex id) -> Provenanced
16680 __init__(Provenanced self, _ParticleAdaptor d) -> Provenanced
16681 """
16682 _IMP_core.Provenanced_swiginit(self, _IMP_core.new_Provenanced(*args))
16683
16684 @staticmethod
16685 def get_is_setup(*args):
16686 r"""
16687 get_is_setup(Model m, ParticleIndex pi) -> bool
16688 get_is_setup(_ParticleAdaptor p) -> bool
16689 """
16690 return _IMP_core.Provenanced_get_is_setup(*args)
16691
16692 def show(self, *args):
16693 r"""show(Provenanced self, _ostream out=std::cout)"""
16694 return _IMP_core.Provenanced_show(self, *args)
16695
16696 @staticmethod
16697 def setup_particle(*args):
16698 r"""
16699 setup_particle(Model m, ParticleIndex pi, Provenance p) -> Provenanced
16700 setup_particle(_ParticleAdaptor pa, Provenance p) -> Provenanced
16701 """
16702 return _IMP_core.Provenanced_setup_particle(*args)
16703
16704 def add_attribute(self, *args):
16705 r"""
16706 add_attribute(Provenanced self, FloatKey k, IMP::Float v, bool opt)
16707 add_attribute(Provenanced self, FloatKey a0, IMP::Float a1)
16708 add_attribute(Provenanced self, IntKey a0, IMP::Int a1)
16709 add_attribute(Provenanced self, FloatsKey a0, IMP::Floats a1)
16710 add_attribute(Provenanced self, IntsKey a0, IMP::Ints a1)
16711 add_attribute(Provenanced self, StringKey a0, IMP::String a1)
16712 add_attribute(Provenanced self, ParticleIndexKey a0, Particle a1)
16713 add_attribute(Provenanced self, ObjectKey a0, Object a1)
16714 add_attribute(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16715 add_attribute(Provenanced self, SparseIntKey a0, IMP::Int a1)
16716 add_attribute(Provenanced self, SparseStringKey a0, IMP::String a1)
16717 add_attribute(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16718 """
16719 return _IMP_core.Provenanced_add_attribute(self, *args)
16720
16721 def get_value(self, *args):
16722 r"""
16723 get_value(Provenanced self, FloatKey a0) -> IMP::Float
16724 get_value(Provenanced self, IntKey a0) -> IMP::Int
16725 get_value(Provenanced self, FloatsKey a0) -> IMP::Floats
16726 get_value(Provenanced self, IntsKey a0) -> IMP::Ints
16727 get_value(Provenanced self, StringKey a0) -> IMP::String
16728 get_value(Provenanced self, ParticleIndexKey a0) -> Particle
16729 get_value(Provenanced self, ObjectKey a0) -> Object
16730 get_value(Provenanced self, SparseFloatKey a0) -> IMP::Float
16731 get_value(Provenanced self, SparseIntKey a0) -> IMP::Int
16732 get_value(Provenanced self, SparseStringKey a0) -> IMP::String
16733 get_value(Provenanced self, SparseParticleIndexKey a0) -> ParticleIndex
16734 """
16735 return _IMP_core.Provenanced_get_value(self, *args)
16736
16737 def set_value(self, *args):
16738 r"""
16739 set_value(Provenanced self, FloatKey a0, IMP::Float a1)
16740 set_value(Provenanced self, IntKey a0, IMP::Int a1)
16741 set_value(Provenanced self, FloatsKey a0, IMP::Floats a1)
16742 set_value(Provenanced self, IntsKey a0, IMP::Ints a1)
16743 set_value(Provenanced self, StringKey a0, IMP::String a1)
16744 set_value(Provenanced self, ParticleIndexKey a0, Particle a1)
16745 set_value(Provenanced self, ObjectKey a0, Object a1)
16746 set_value(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16747 set_value(Provenanced self, SparseIntKey a0, IMP::Int a1)
16748 set_value(Provenanced self, SparseStringKey a0, IMP::String a1)
16749 set_value(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16750 """
16751 return _IMP_core.Provenanced_set_value(self, *args)
16752
16753 def remove_attribute(self, *args):
16754 r"""
16755 remove_attribute(Provenanced self, FloatKey a0)
16756 remove_attribute(Provenanced self, IntKey a0)
16757 remove_attribute(Provenanced self, FloatsKey a0)
16758 remove_attribute(Provenanced self, IntsKey a0)
16759 remove_attribute(Provenanced self, StringKey a0)
16760 remove_attribute(Provenanced self, ParticleIndexKey a0)
16761 remove_attribute(Provenanced self, ObjectKey a0)
16762 remove_attribute(Provenanced self, SparseFloatKey a0)
16763 remove_attribute(Provenanced self, SparseIntKey a0)
16764 remove_attribute(Provenanced self, SparseStringKey a0)
16765 remove_attribute(Provenanced self, SparseParticleIndexKey a0)
16766 """
16767 return _IMP_core.Provenanced_remove_attribute(self, *args)
16768
16769 def has_attribute(self, *args):
16770 r"""
16771 has_attribute(Provenanced self, FloatKey a0) -> bool
16772 has_attribute(Provenanced self, IntKey a0) -> bool
16773 has_attribute(Provenanced self, FloatsKey a0) -> bool
16774 has_attribute(Provenanced self, IntsKey a0) -> bool
16775 has_attribute(Provenanced self, StringKey a0) -> bool
16776 has_attribute(Provenanced self, ParticleIndexKey a0) -> bool
16777 has_attribute(Provenanced self, ObjectKey a0) -> bool
16778 has_attribute(Provenanced self, SparseFloatKey a0) -> bool
16779 has_attribute(Provenanced self, SparseIntKey a0) -> bool
16780 has_attribute(Provenanced self, SparseStringKey a0) -> bool
16781 has_attribute(Provenanced self, SparseParticleIndexKey a0) -> bool
16782 """
16783 return _IMP_core.Provenanced_has_attribute(self, *args)
16784
16785 def get_derivative(self, a0):
16786 r"""get_derivative(Provenanced self, FloatKey a0) -> double"""
16787 return _IMP_core.Provenanced_get_derivative(self, a0)
16788
16789 def get_name(self):
16790 r"""get_name(Provenanced self) -> std::string"""
16791 return _IMP_core.Provenanced_get_name(self)
16792
16793 def clear_caches(self):
16794 r"""clear_caches(Provenanced self)"""
16795 return _IMP_core.Provenanced_clear_caches(self)
16796
16797 def set_name(self, a0):
16798 r"""set_name(Provenanced self, std::string a0)"""
16799 return _IMP_core.Provenanced_set_name(self, a0)
16800
16801 def set_check_level(self, a0):
16802 r"""set_check_level(Provenanced self, IMP::CheckLevel a0)"""
16803 return _IMP_core.Provenanced_set_check_level(self, a0)
16804
16805 def add_to_derivative(self, a0, a1, a2):
16806 r"""add_to_derivative(Provenanced self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16807 return _IMP_core.Provenanced_add_to_derivative(self, a0, a1, a2)
16808
16809 def set_is_optimized(self, a0, a1):
16810 r"""set_is_optimized(Provenanced self, FloatKey a0, bool a1)"""
16811 return _IMP_core.Provenanced_set_is_optimized(self, a0, a1)
16812
16813 def get_is_optimized(self, a0):
16814 r"""get_is_optimized(Provenanced self, FloatKey a0) -> bool"""
16815 return _IMP_core.Provenanced_get_is_optimized(self, a0)
16816
16817 def get_check_level(self):
16818 r"""get_check_level(Provenanced self) -> IMP::CheckLevel"""
16819 return _IMP_core.Provenanced_get_check_level(self)
16820
16821 def __eq__(self, *args):
16822 r"""
16823 __eq__(Provenanced self, Provenanced o) -> bool
16824 __eq__(Provenanced self, Particle d) -> bool
16825 """
16826 return _IMP_core.Provenanced___eq__(self, *args)
16827
16828 def __ne__(self, *args):
16829 r"""
16830 __ne__(Provenanced self, Provenanced o) -> bool
16831 __ne__(Provenanced self, Particle d) -> bool
16832 """
16833 return _IMP_core.Provenanced___ne__(self, *args)
16834
16835 def __le__(self, *args):
16836 r"""
16837 __le__(Provenanced self, Provenanced o) -> bool
16838 __le__(Provenanced self, Particle d) -> bool
16839 """
16840 return _IMP_core.Provenanced___le__(self, *args)
16841
16842 def __lt__(self, *args):
16843 r"""
16844 __lt__(Provenanced self, Provenanced o) -> bool
16845 __lt__(Provenanced self, Particle d) -> bool
16846 """
16847 return _IMP_core.Provenanced___lt__(self, *args)
16848
16849 def __ge__(self, *args):
16850 r"""
16851 __ge__(Provenanced self, Provenanced o) -> bool
16852 __ge__(Provenanced self, Particle d) -> bool
16853 """
16854 return _IMP_core.Provenanced___ge__(self, *args)
16855
16856 def __gt__(self, *args):
16857 r"""
16858 __gt__(Provenanced self, Provenanced o) -> bool
16859 __gt__(Provenanced self, Particle d) -> bool
16860 """
16861 return _IMP_core.Provenanced___gt__(self, *args)
16862
16863 def __hash__(self):
16864 r"""__hash__(Provenanced self) -> std::size_t"""
16865 return _IMP_core.Provenanced___hash__(self)
16866
16867 def __str__(self):
16868 r"""__str__(Provenanced self) -> std::string"""
16869 return _IMP_core.Provenanced___str__(self)
16870
16871 def __repr__(self):
16872 r"""__repr__(Provenanced self) -> std::string"""
16873 return _IMP_core.Provenanced___repr__(self)
16874
16875 def _get_as_binary(self):
16876 r"""_get_as_binary(Provenanced self) -> PyObject *"""
16877 return _IMP_core.Provenanced__get_as_binary(self)
16878
16879 def _set_from_binary(self, p):
16880 r"""_set_from_binary(Provenanced self, PyObject * p)"""
16881 return _IMP_core.Provenanced__set_from_binary(self, p)
16882
16883 def __getstate__(self):
16884 p = self._get_as_binary()
16885 if len(self.__dict__) > 1:
16886 d = self.__dict__.copy()
16887 del d['this']
16888 p = (d, p)
16889 return p
16890
16891 def __setstate__(self, p):
16892 if not hasattr(self, 'this'):
16893 self.__init__()
16894 if isinstance(p, tuple):
16895 d, p = p
16896 self.__dict__.update(d)
16897 return self._set_from_binary(p)
16898
16899 __swig_destroy__ = _IMP_core.delete_Provenanced
16900
16901# Register Provenanced in _IMP_core:
16902_IMP_core.Provenanced_swigregister(Provenanced)
16903
16904def add_provenance(m, pi, p):
16905 r"""add_provenance(Model m, ParticleIndex pi, Provenance p)"""
16906 return _IMP_core.add_provenance(m, pi, p)
16907
16908def create_clone(p, m=None):
16909 r"""create_clone(Provenance p, Model m=None) -> Provenance"""
16910 return _IMP_core.create_clone(p, m)
16911
16912def get_transformation_aligning_first_to_second(*args):
16913 r"""
16914 get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16915 get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & b) -> Transformation3D
16916 get_transformation_aligning_first_to_second(IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16917 """
16918 return _IMP_core.get_transformation_aligning_first_to_second(*args)
16919
16920def create_restraint(ps, pp):
16921 r"""create_restraint(PairScore ps, IMP::ParticlePair pp) -> Restraint"""
16922 return _IMP_core.create_restraint(ps, pp)
16923class TruncatedHarmonicLowerBound(IMP.UnaryFunction):
16924 r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::LOWER > class."""
16925
16926 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16927
16928 def __init__(self, *args):
16929 r"""
16930 __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicLowerBound
16931 __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicLowerBound
16932 """
16933 _IMP_core.TruncatedHarmonicLowerBound_swiginit(self, _IMP_core.new_TruncatedHarmonicLowerBound(*args))
16934
16935 def get_version_info(self):
16936 r"""get_version_info(TruncatedHarmonicLowerBound self) -> VersionInfo"""
16937 return _IMP_core.TruncatedHarmonicLowerBound_get_version_info(self)
16938 __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicLowerBound
16939
16940 def __str__(self):
16941 r"""__str__(TruncatedHarmonicLowerBound self) -> std::string"""
16942 return _IMP_core.TruncatedHarmonicLowerBound___str__(self)
16943
16944 def __repr__(self):
16945 r"""__repr__(TruncatedHarmonicLowerBound self) -> std::string"""
16946 return _IMP_core.TruncatedHarmonicLowerBound___repr__(self)
16947
16948 @staticmethod
16949 def get_from(o):
16950 return _object_cast_to_TruncatedHarmonic(o)
16951
16952
16953# Register TruncatedHarmonicLowerBound in _IMP_core:
16954_IMP_core.TruncatedHarmonicLowerBound_swigregister(TruncatedHarmonicLowerBound)
16955class TruncatedHarmonicUpperBound(IMP.UnaryFunction):
16956 r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::UPPER > class."""
16957
16958 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16959
16960 def __init__(self, *args):
16961 r"""
16962 __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicUpperBound
16963 __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicUpperBound
16964 """
16965 _IMP_core.TruncatedHarmonicUpperBound_swiginit(self, _IMP_core.new_TruncatedHarmonicUpperBound(*args))
16966
16967 def get_version_info(self):
16968 r"""get_version_info(TruncatedHarmonicUpperBound self) -> VersionInfo"""
16969 return _IMP_core.TruncatedHarmonicUpperBound_get_version_info(self)
16970 __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicUpperBound
16971
16972 def __str__(self):
16973 r"""__str__(TruncatedHarmonicUpperBound self) -> std::string"""
16974 return _IMP_core.TruncatedHarmonicUpperBound___str__(self)
16975
16976 def __repr__(self):
16977 r"""__repr__(TruncatedHarmonicUpperBound self) -> std::string"""
16978 return _IMP_core.TruncatedHarmonicUpperBound___repr__(self)
16979
16980 @staticmethod
16981 def get_from(o):
16982 return _object_cast_to_TruncatedHarmonic(o)
16983
16984
16985# Register TruncatedHarmonicUpperBound in _IMP_core:
16986_IMP_core.TruncatedHarmonicUpperBound_swigregister(TruncatedHarmonicUpperBound)
16987class TruncatedHarmonicBound(IMP.UnaryFunction):
16988 r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::BOTH > class."""
16989
16990 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16991
16992 def __init__(self, *args):
16993 r"""
16994 __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicBound
16995 __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicBound
16996 """
16997 _IMP_core.TruncatedHarmonicBound_swiginit(self, _IMP_core.new_TruncatedHarmonicBound(*args))
16998
16999 def get_version_info(self):
17000 r"""get_version_info(TruncatedHarmonicBound self) -> VersionInfo"""
17001 return _IMP_core.TruncatedHarmonicBound_get_version_info(self)
17002 __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicBound
17003
17004 def __str__(self):
17005 r"""__str__(TruncatedHarmonicBound self) -> std::string"""
17006 return _IMP_core.TruncatedHarmonicBound___str__(self)
17007
17008 def __repr__(self):
17009 r"""__repr__(TruncatedHarmonicBound self) -> std::string"""
17010 return _IMP_core.TruncatedHarmonicBound___repr__(self)
17011
17012 @staticmethod
17013 def get_from(o):
17014 return _object_cast_to_TruncatedHarmonic(o)
17015
17016
17017# Register TruncatedHarmonicBound in _IMP_core:
17018_IMP_core.TruncatedHarmonicBound_swigregister(TruncatedHarmonicBound)
17019class ParticleType(IMP._Value):
17020 r"""Proxy of C++ IMP::Key< 34897493 > class."""
17021
17022 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17023
17024 def __init__(self, *args):
17025 r"""
17026 __init__(ParticleType self) -> ParticleType
17027 __init__(ParticleType self, std::string const & c, bool is_implicit_add_permitted=True) -> ParticleType
17028 __init__(ParticleType self, unsigned int i) -> ParticleType
17029 """
17030 _IMP_core.ParticleType_swiginit(self, _IMP_core.new_ParticleType(*args))
17031
17032 @staticmethod
17033 def add_key(sc):
17034 r"""add_key(std::string const & sc) -> unsigned int"""
17035 return _IMP_core.ParticleType_add_key(sc)
17036
17037 @staticmethod
17038 def get_existing_key(sc):
17039 r"""get_existing_key(std::string const & sc) -> ParticleType"""
17040 return _IMP_core.ParticleType_get_existing_key(sc)
17041
17042 @staticmethod
17043 def get_key_exists(sc):
17044 r"""get_key_exists(std::string const & sc) -> bool"""
17045 return _IMP_core.ParticleType_get_key_exists(sc)
17046
17047 def get_string(self):
17048 r"""get_string(ParticleType self) -> std::string const"""
17049 return _IMP_core.ParticleType_get_string(self)
17050
17051 def __eq__(self, o):
17052 r"""__eq__(ParticleType self, ParticleType o) -> bool"""
17053 return _IMP_core.ParticleType___eq__(self, o)
17054
17055 def __ne__(self, o):
17056 r"""__ne__(ParticleType self, ParticleType o) -> bool"""
17057 return _IMP_core.ParticleType___ne__(self, o)
17058
17059 def __lt__(self, o):
17060 r"""__lt__(ParticleType self, ParticleType o) -> bool"""
17061 return _IMP_core.ParticleType___lt__(self, o)
17062
17063 def __gt__(self, o):
17064 r"""__gt__(ParticleType self, ParticleType o) -> bool"""
17065 return _IMP_core.ParticleType___gt__(self, o)
17066
17067 def __ge__(self, o):
17068 r"""__ge__(ParticleType self, ParticleType o) -> bool"""
17069 return _IMP_core.ParticleType___ge__(self, o)
17070
17071 def __le__(self, o):
17072 r"""__le__(ParticleType self, ParticleType o) -> bool"""
17073 return _IMP_core.ParticleType___le__(self, o)
17074
17075 def __hash__(self):
17076 r"""__hash__(ParticleType self) -> std::size_t"""
17077 return _IMP_core.ParticleType___hash__(self)
17078
17079 def show(self, *args):
17080 r"""show(ParticleType self, _ostream out=std::cout)"""
17081 return _IMP_core.ParticleType_show(self, *args)
17082
17083 @staticmethod
17084 def add_alias(old_key, new_name):
17085 r"""add_alias(ParticleType old_key, std::string new_name) -> ParticleType"""
17086 return _IMP_core.ParticleType_add_alias(old_key, new_name)
17087
17088 @staticmethod
17089 def get_number_of_keys():
17090 r"""get_number_of_keys() -> unsigned int"""
17091 return _IMP_core.ParticleType_get_number_of_keys()
17092
17093 def get_index(self):
17094 r"""get_index(ParticleType self) -> unsigned int"""
17095 return _IMP_core.ParticleType_get_index(self)
17096
17097 @staticmethod
17098 def show_all(out):
17099 r"""show_all(_ostream out)"""
17100 return _IMP_core.ParticleType_show_all(out)
17101
17102 @staticmethod
17103 def get_all_strings():
17104 r"""get_all_strings() -> IMP::Vector< std::string >"""
17105 return _IMP_core.ParticleType_get_all_strings()
17106
17107 @staticmethod
17108 def get_number_unique():
17109 r"""get_number_unique() -> unsigned int"""
17110 return _IMP_core.ParticleType_get_number_unique()
17111
17112 def __str__(self):
17113 r"""__str__(ParticleType self) -> std::string"""
17114 return _IMP_core.ParticleType___str__(self)
17115
17116 def __repr__(self):
17117 r"""__repr__(ParticleType self) -> std::string"""
17118 return _IMP_core.ParticleType___repr__(self)
17119 __swig_destroy__ = _IMP_core.delete_ParticleType
17120
17121# Register ParticleType in _IMP_core:
17122_IMP_core.ParticleType_swigregister(ParticleType)
17123class AttributeSingletonScore(IMP.SingletonScore):
17124 r"""Proxy of C++ IMP::core::GenericAttributeSingletonScore< UnaryFunction > class."""
17125
17126 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17127 __repr__ = _swig_repr
17128
17129 def __init__(self, f, k):
17130 r"""__init__(AttributeSingletonScore self, UnaryFunction f, FloatKey k) -> AttributeSingletonScore"""
17131 _IMP_core.AttributeSingletonScore_swiginit(self, _IMP_core.new_AttributeSingletonScore(f, k))
17132
17133 def do_get_inputs(self, m, pis):
17134 r"""do_get_inputs(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17135 return _IMP_core.AttributeSingletonScore_do_get_inputs(self, m, pis)
17136
17137 def get_unary_function(self):
17138 r"""get_unary_function(AttributeSingletonScore self) -> UnaryFunction"""
17139 return _IMP_core.AttributeSingletonScore_get_unary_function(self)
17140
17141 def get_key(self):
17142 r"""get_key(AttributeSingletonScore self) -> FloatKey"""
17143 return _IMP_core.AttributeSingletonScore_get_key(self)
17144
17145 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17146 r"""evaluate_indexes(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
17147 return _IMP_core.AttributeSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17148
17149 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17150 r"""evaluate_indexes_scores(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
17151 return _IMP_core.AttributeSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17152
17153 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17154 r"""evaluate_indexes_delta(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
17155 return _IMP_core.AttributeSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17156
17157 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17158 r"""evaluate_if_good_indexes(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
17159 return _IMP_core.AttributeSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17160
17161 def get_version_info(self):
17162 r"""get_version_info(AttributeSingletonScore self) -> VersionInfo"""
17163 return _IMP_core.AttributeSingletonScore_get_version_info(self)
17164 __swig_destroy__ = _IMP_core.delete_AttributeSingletonScore
17165
17166 @staticmethod
17167 def get_from(o):
17168 return _object_cast_to_AttributeSingletonScore(o)
17169
17170
17171 def _get_jax(self, m, indexes, space):
17172 def score_float_key(jm, key, uf):
17173 return uf(jm[key][indexes])
17174
17175 def score_xyz_key(jm, xyz_index, uf):
17176 return uf(jm['xyz'][indexes, xyz_index])
17177
17178 uf = self.get_unary_function().get_derived_object()._get_jax()
17179 key = self.get_key()
17180 # First 7 FloatKeys are reserved in IMP and have to be handled
17181 # specially
17182 if key.get_index() >= 7:
17183 need_keys = [key]
17184 f = functools.partial(score_float_key, key=key.get_string(), uf=uf)
17185 elif key == XYZR.get_radius_key():
17186 need_keys = [] # We already have the radius in the JAX model
17187 f = functools.partial(score_float_key, key='r', uf=uf)
17188 elif key in XYZ.get_xyz_keys():
17189 need_keys = [] # We already have coordinates in the JAX model
17190 xyz_index = XYZ.get_xyz_keys().index(key)
17191 f = functools.partial(score_xyz_key, xyz_index=xyz_index, uf=uf)
17192 else:
17193 raise NotImplementedError("No support for key %s" % key)
17194 return self._wrap_jax(m, f, keys=need_keys)
17195
17196
17197# Register AttributeSingletonScore in _IMP_core:
17198_IMP_core.AttributeSingletonScore_swigregister(AttributeSingletonScore)
17199
17200def create_generic_attribute_singleton_score(uf, k):
17201 r"""create_generic_attribute_singleton_score(UnaryFunction uf, FloatKey k) -> AttributeSingletonScore"""
17202 return _IMP_core.create_generic_attribute_singleton_score(uf, k)
17203class BoundingBox3DSingletonScore(IMP.SingletonScore):
17204 r"""Proxy of C++ IMP::core::GenericBoundingBox3DSingletonScore< UnaryFunction > class."""
17205
17206 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17207 __repr__ = _swig_repr
17208
17209 def __init__(self, f, bb):
17210 r"""__init__(BoundingBox3DSingletonScore self, UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17211 _IMP_core.BoundingBox3DSingletonScore_swiginit(self, _IMP_core.new_BoundingBox3DSingletonScore(f, bb))
17212
17213 def get_unary_function(self):
17214 r"""get_unary_function(BoundingBox3DSingletonScore self) -> UnaryFunction"""
17215 return _IMP_core.BoundingBox3DSingletonScore_get_unary_function(self)
17216
17217 def get_bounding_box(self):
17218 r"""get_bounding_box(BoundingBox3DSingletonScore self) -> BoundingBox3D"""
17219 return _IMP_core.BoundingBox3DSingletonScore_get_bounding_box(self)
17220
17221 def do_get_inputs(self, m, pis):
17222 r"""do_get_inputs(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17223 return _IMP_core.BoundingBox3DSingletonScore_do_get_inputs(self, m, pis)
17224
17225 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17226 r"""evaluate_indexes(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
17227 return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17228
17229 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17230 r"""evaluate_indexes_scores(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
17231 return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17232
17233 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17234 r"""evaluate_indexes_delta(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
17235 return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17236
17237 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17238 r"""evaluate_if_good_indexes(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
17239 return _IMP_core.BoundingBox3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17240
17241 def get_version_info(self):
17242 r"""get_version_info(BoundingBox3DSingletonScore self) -> VersionInfo"""
17243 return _IMP_core.BoundingBox3DSingletonScore_get_version_info(self)
17244 __swig_destroy__ = _IMP_core.delete_BoundingBox3DSingletonScore
17245
17246 @staticmethod
17247 def get_from(o):
17248 return _object_cast_to_BoundingBox3DSingletonScore(o)
17249
17250
17251 def _get_jax(self, m, indexes, space):
17252 import jax.numpy as jnp
17253 def score(jm, box_min, box_max, uf):
17254 xyzs = jm['xyz'][indexes]
17255 diff = xyzs - jnp.clip(xyzs, box_min, box_max)
17256 outside = jnp.any(diff != 0., axis=-1)
17257 # Avoid taking the distance of a zero vector for points inside
17258 # the box, since the gradient of sqrt(0) is infinite (NaN)
17259 safe_diff = jnp.where(outside[..., jnp.newaxis], diff, 1.)
17260 drs = jnp.where(outside, space.distance(safe_diff), 0.)
17261 return jnp.where(outside, uf(drs), 0.)
17262 uf = self.get_unary_function().get_derived_object()
17263 bb = self.get_bounding_box()
17264 f = functools.partial(score, box_min=jnp.asarray(bb.get_corner(0)),
17265 box_max=jnp.asarray(bb.get_corner(1)),
17266 uf=uf._get_jax())
17267 return self._wrap_jax(m, f)
17268
17269
17270# Register BoundingBox3DSingletonScore in _IMP_core:
17271_IMP_core.BoundingBox3DSingletonScore_swigregister(BoundingBox3DSingletonScore)
17272
17273def create_bounding_box_3d_singleton_score(f, bb):
17274 r"""create_bounding_box_3d_singleton_score(UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17275 return _IMP_core.create_bounding_box_3d_singleton_score(f, bb)
17276class BoundingSphere3DSingletonScore(IMP.SingletonScore):
17277 r"""Proxy of C++ IMP::core::GenericBoundingSphere3DSingletonScore< UnaryFunction > class."""
17278
17279 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17280 __repr__ = _swig_repr
17281
17282 def __init__(self, f, sphere):
17283 r"""__init__(BoundingSphere3DSingletonScore self, UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17284 _IMP_core.BoundingSphere3DSingletonScore_swiginit(self, _IMP_core.new_BoundingSphere3DSingletonScore(f, sphere))
17285
17286 def do_get_inputs(self, m, pis):
17287 r"""do_get_inputs(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17288 return _IMP_core.BoundingSphere3DSingletonScore_do_get_inputs(self, m, pis)
17289
17290 def get_unary_function(self):
17291 r"""get_unary_function(BoundingSphere3DSingletonScore self) -> UnaryFunction"""
17292 return _IMP_core.BoundingSphere3DSingletonScore_get_unary_function(self)
17293
17294 def get_sphere(self):
17295 r"""get_sphere(BoundingSphere3DSingletonScore self) -> Sphere3D"""
17296 return _IMP_core.BoundingSphere3DSingletonScore_get_sphere(self)
17297
17298 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17299 r"""evaluate_indexes(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
17300 return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17301
17302 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17303 r"""evaluate_indexes_scores(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
17304 return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17305
17306 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17307 r"""evaluate_indexes_delta(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
17308 return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17309
17310 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17311 r"""evaluate_if_good_indexes(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
17312 return _IMP_core.BoundingSphere3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17313
17314 def get_version_info(self):
17315 r"""get_version_info(BoundingSphere3DSingletonScore self) -> VersionInfo"""
17316 return _IMP_core.BoundingSphere3DSingletonScore_get_version_info(self)
17317 __swig_destroy__ = _IMP_core.delete_BoundingSphere3DSingletonScore
17318
17319 @staticmethod
17320 def get_from(o):
17321 return _object_cast_to_BoundingSphere3DSingletonScore(o)
17322
17323
17324 def _get_jax(self, m, indexes, space):
17325 import numpy as np
17326 import jax.numpy as jnp
17327 def score(jm, use_radii, center, radius, uf):
17328 xyzs = jm['xyz'][indexes]
17329 radii = jnp.where(use_radii, jm['r'][indexes], 0.0)
17330 drs = space.distance(xyzs - center) + radii - radius
17331 return jnp.where(drs < 0.000001, 0.0, uf(drs))
17332 use_radii = np.array([XYZR.get_is_setup(m, IMP.ParticleIndex(ind))
17333 for ind in indexes])
17334 uf = self.get_unary_function().get_derived_object()
17335 sphere = self.get_sphere()
17336 f = functools.partial(score, use_radii=use_radii,
17337 center=jnp.asarray(sphere.get_center()),
17338 radius=sphere.get_radius(), uf=uf._get_jax())
17339 return self._wrap_jax(m, f)
17340
17341
17342# Register BoundingSphere3DSingletonScore in _IMP_core:
17343_IMP_core.BoundingSphere3DSingletonScore_swigregister(BoundingSphere3DSingletonScore)
17344
17345def create_bounding_sphere_3d_singleton_score(f, sphere):
17346 r"""create_bounding_sphere_3d_singleton_score(UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17347 return _IMP_core.create_bounding_sphere_3d_singleton_score(f, sphere)
17348class DistanceToSingletonScore(IMP.SingletonScore):
17349 r"""Proxy of C++ IMP::core::GenericDistanceToSingletonScore< UnaryFunction > class."""
17350
17351 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17352 __repr__ = _swig_repr
17353
17354 def __init__(self, *args):
17355 r"""
17356 __init__(DistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore
17357 __init__(DistanceToSingletonScore self) -> DistanceToSingletonScore
17358 """
17359 _IMP_core.DistanceToSingletonScore_swiginit(self, _IMP_core.new_DistanceToSingletonScore(*args))
17360
17361 def do_get_inputs(self, m, pis):
17362 r"""do_get_inputs(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17363 return _IMP_core.DistanceToSingletonScore_do_get_inputs(self, m, pis)
17364
17365 def get_unary_function(self):
17366 r"""get_unary_function(DistanceToSingletonScore self) -> UnaryFunction"""
17367 return _IMP_core.DistanceToSingletonScore_get_unary_function(self)
17368
17369 def get_point(self):
17370 r"""get_point(DistanceToSingletonScore self) -> Vector3D"""
17371 return _IMP_core.DistanceToSingletonScore_get_point(self)
17372
17373 def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17374 r"""evaluate_indexes(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
17375 return _IMP_core.DistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17376
17377 def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17378 r"""evaluate_indexes_scores(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
17379 return _IMP_core.DistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17380
17381 def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17382 r"""evaluate_indexes_delta(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
17383 return _IMP_core.DistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17384
17385 def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17386 r"""evaluate_if_good_indexes(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
17387 return _IMP_core.DistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17388
17389 def get_version_info(self):
17390 r"""get_version_info(DistanceToSingletonScore self) -> VersionInfo"""
17391 return _IMP_core.DistanceToSingletonScore_get_version_info(self)
17392 __swig_destroy__ = _IMP_core.delete_DistanceToSingletonScore
17393
17394 @staticmethod
17395 def get_from(o):
17396 return _object_cast_to_DistanceToSingletonScore(o)
17397
17398
17399 def _get_as_binary(self):
17400 r"""_get_as_binary(DistanceToSingletonScore self) -> PyObject *"""
17401 return _IMP_core.DistanceToSingletonScore__get_as_binary(self)
17402
17403 def _set_from_binary(self, p):
17404 r"""_set_from_binary(DistanceToSingletonScore self, PyObject * p)"""
17405 return _IMP_core.DistanceToSingletonScore__set_from_binary(self, p)
17406
17407 def __getstate__(self):
17408 p = self._get_as_binary()
17409 if len(self.__dict__) > 1:
17410 d = self.__dict__.copy()
17411 del d['this']
17412 p = (d, p)
17413 return p
17414
17415 def __setstate__(self, p):
17416 if not hasattr(self, 'this'):
17417 self.__init__()
17418 if isinstance(p, tuple):
17419 d, p = p
17420 self.__dict__.update(d)
17421 return self._set_from_binary(p)
17422
17423
17424 def _get_jax(self, m, indexes, space):
17425 import jax.numpy as jnp
17426 def score(jm, point, uf):
17427 xyzs = jm['xyz'][indexes]
17428 drs = space.distance(xyzs - point)
17429 return uf(drs)
17430 uf = self.get_unary_function().get_derived_object()
17431 f = functools.partial(score, point=jnp.array(self.get_point()),
17432 uf=uf._get_jax())
17433 return self._wrap_jax(m, f)
17434
17435
17436# Register DistanceToSingletonScore in _IMP_core:
17437_IMP_core.DistanceToSingletonScore_swigregister(DistanceToSingletonScore)
17438
17439def create_distance_to_singleton_score(f, pt):
17440 r"""create_distance_to_singleton_score(UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore"""
17441 return _IMP_core.create_distance_to_singleton_score(f, pt)
17442
17443class SphereDistancePairScore(_SphereDistancePairScore.__bases__[0]):
17444 def __init__(self, uf):
17445 if isinstance(uf, HarmonicUpperBound):
17446 p = HarmonicUpperBoundSphereDistancePairScore(
17447 uf.get_mean(), uf.get_k())
17448 elif isinstance(uf, HarmonicLowerBound):
17449 if uf.get_mean() == 0.0:
17450 p = SoftSpherePairScore(uf.get_k())
17451 else:
17452 p = _SphereDistancePairScore(uf)
17453 elif isinstance(uf, Harmonic):
17454 p = HarmonicSphereDistancePairScore(
17455 uf.get_mean(), uf.get_k())
17456 else:
17457 p = _SphereDistancePairScore(uf)
17458 self.__dict__['_proxied'] = p
17459 def __getattr__(self, key):
17460 return getattr(self._proxied, key)
17461 def __setattr__(self, key, val):
17462 return setattr(self._proxied, key, val)
17463
17464 def __getstate__(self):
17465 return self.__dict__['_proxied']
17466
17467 def __setstate__(self, p):
17468 self.__dict__['_proxied'] = p
17469
17470 def _get_jax(self, *args, **kwargs):
17471 return self._proxied._get_jax(*args, **kwargs)
17472
17473 @staticmethod
17474 def get_from(o):
17475 try:
17476 p = HarmonicUpperBoundSphereDistancePairScore.get_from(o)
17477 except ValueError:
17478 try:
17479 p = HarmonicSphereDistancePairScore.get_from(o)
17480 except ValueError:
17481 try:
17482 p = SoftSpherePairScore.get_from(o)
17483 except ValueError:
17484 p = _SphereDistancePairScore.get_from(o)
17485 obj = object.__new__(SphereDistancePairScore)
17486 obj.__dict__['_proxied'] = p
17487 return obj
17488
17489
17490
17491def get_all_provenance(p, types=[StructureProvenance, SampleProvenance,
17492 CombineProvenance, FilterProvenance,
17493 ClusterProvenance, ScriptProvenance,
17494 SoftwareProvenance]):
17495 """Yield all provenance decorators of the given types for the particle.
17496 By default, all provenance types are returned. Provenance is returned
17497 in order, most recent first. If the particle has no provenance
17498 information, an empty generator is returned."""
17499 if Provenanced.get_is_setup(p):
17500 prov = Provenanced(p).get_provenance()
17501 while prov:
17502 for c in types:
17503 if c.get_is_setup(prov):
17504 yield c(prov)
17505 prov = prov.get_previous()
17506
17507def add_script_provenance(p):
17508 """Tag the given particle with the current Python script.
17509 This is a noop if the particle is already so tagged."""
17510 main = sys.modules['__main__']
17511# Can't do anything if running from an interactive interpreter
17512 if not hasattr(main, '__file__'):
17513 return
17514 f = IMP.get_absolute_path(main.__file__)
17515 for prov in get_all_provenance(p, types=[ScriptProvenance]):
17516 if prov.get_filename() == f:
17517 return
17518 m = p.get_model()
17519 provp = IMP.Particle(m)
17520 provp.set_name('script')
17521 prov = ScriptProvenance.setup_particle(provp, f)
17522 add_provenance(m, p, prov)
17523
17524def add_software_provenance(p, name, version, location):
17525 """Tag the given particle with the software used to create it.
17526 This is a noop if the particle is already so tagged."""
17527 for prov in get_all_provenance(p, types=[SoftwareProvenance]):
17528 if prov.get_software_name() == name and prov.get_version() == version \
17529 and prov.get_location() == location:
17530 return
17531 m = p.get_model()
17532 provp = IMP.Particle(m)
17533 provp.set_name('software')
17534 prov = SoftwareProvenance.setup_particle(provp, name, version, location)
17535 add_provenance(m, p, prov)
17536
17537def add_imp_provenance(p):
17538 """Tag the given particle as being created by the current version of IMP."""
17539 add_software_provenance(p, name="Integrative Modeling Platform (IMP)",
17540 version=IMP.get_module_version(),
17541 location="https://integrativemodeling.org")
17542
17543
17544def get_module_name():
17545 r"""get_module_name() -> std::string const"""
17546 return _IMP_core.get_module_name()
17547
17548def get_module_version():
17549 r"""get_module_version() -> std::string const"""
17550 return _IMP_core.get_module_version()
17551
17552def get_example_path(fname):
17553 r"""get_example_path(std::string fname) -> std::string"""
17554 return _IMP_core.get_example_path(fname)
17555
17556def get_data_path(fname):
17557 r"""get_data_path(std::string fname) -> std::string"""
17558 return _IMP_core.get_data_path(fname)
17559
17560from . import _version_check
17561_version_check.check_version(get_module_version())
17562__version__ = get_module_version()
17563
17564
add_script_provenance(p)
Tag the given particle with the current Python script.
add_software_provenance(p, name, version, location)
Tag the given particle with the software used to create it.
get_all_provenance(p, types=[StructureProvenance, SampleProvenance, CombineProvenance, FilterProvenance, ClusterProvenance, ScriptProvenance, SoftwareProvenance])
Yield all provenance decorators of the given types for the particle.
add_imp_provenance(p)
Tag the given particle as being created by the current version of IMP.