IMP logo
IMP Reference Guide  develop.21ec66f3d8,2026/10/03
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 
13 import functools
14 
15 
16 
17 import typing
18 import _IMP_core
19 
20 import builtins as __builtin__
21 
22 def _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 
30 def _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 
43 def _swig_setattr_nondynamic_class_variable(set):
44  def set_class_attr(cls, name, value):
45  if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
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 
52 class _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 
57 import weakref
58 
59 class 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 
142 IMP_DEBUG = _IMP_core.IMP_DEBUG
143 
144 IMP_RELEASE = _IMP_core.IMP_RELEASE
145 
146 IMP_SILENT = _IMP_core.IMP_SILENT
147 
148 IMP_PROGRESS = _IMP_core.IMP_PROGRESS
149 
150 IMP_TERSE = _IMP_core.IMP_TERSE
151 
152 IMP_VERBOSE = _IMP_core.IMP_VERBOSE
153 
154 IMP_MEMORY = _IMP_core.IMP_MEMORY
155 
156 IMP_NONE = _IMP_core.IMP_NONE
157 
158 IMP_USAGE = _IMP_core.IMP_USAGE
159 
160 IMP_INTERNAL = _IMP_core.IMP_INTERNAL
161 
162 IMP_KERNEL_HAS_LOG4CXX = _IMP_core.IMP_KERNEL_HAS_LOG4CXX
163 
164 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_core.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
165 
166 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_core.IMP_COMPILER_HAS_DEBUG_VECTOR
167 
168 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_core.IMP_COMPILER_HAS_RANDOM_SHUFFLE
169 
170 IMP_COMPILER_HAS_THREE_WAY = _IMP_core.IMP_COMPILER_HAS_THREE_WAY
171 
172 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_core.IMP_KERNEL_HAS_BOOST_RANDOM
173 
174 IMP_KERNEL_HAS_NUMPY = _IMP_core.IMP_KERNEL_HAS_NUMPY
175 
176 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_core.IMP_KERNEL_HAS_BOOST_SYSTEM
177 
178 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_core.IMP_KERNEL_HAS_GPERFTOOLS
179 
180 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_core.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
181 
182 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_core.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
183 
184 IMPKERNEL_SHOW_WARNINGS = _IMP_core.IMPKERNEL_SHOW_WARNINGS
185 
186 
187 import sys
188 class _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 
213 class _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)
228 IMP_C_OPEN_BINARY = _IMP_core.IMP_C_OPEN_BINARY
229 
230 import IMP
231 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_CGAL_HAS_BOOST_FILESYSTEM
232 
233 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
234 
235 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_core.IMP_CGAL_HAS_BOOST_RANDOM
236 
237 IMP_CGAL_HAS_NUMPY = _IMP_core.IMP_CGAL_HAS_NUMPY
238 
239 IMPCGAL_SHOW_WARNINGS = _IMP_core.IMPCGAL_SHOW_WARNINGS
240 
241 import IMP.cgal
242 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_core.IMP_ALGEBRA_HAS_IMP_CGAL
243 
244 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
245 
246 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
247 
248 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_core.IMP_ALGEBRA_HAS_BOOST_RANDOM
249 
250 IMP_ALGEBRA_HAS_CGAL = _IMP_core.IMP_ALGEBRA_HAS_CGAL
251 
252 IMP_ALGEBRA_HAS_NUMPY = _IMP_core.IMP_ALGEBRA_HAS_NUMPY
253 
254 IMP_ALGEBRA_HAS_ANN = _IMP_core.IMP_ALGEBRA_HAS_ANN
255 
256 IMPALGEBRA_SHOW_WARNINGS = _IMP_core.IMPALGEBRA_SHOW_WARNINGS
257 
258 import IMP.algebra
259 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_core.IMP_DISPLAY_HAS_IMP_CGAL
260 
261 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
262 
263 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
264 
265 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_core.IMP_DISPLAY_HAS_BOOST_RANDOM
266 
267 IMP_DISPLAY_HAS_CGAL = _IMP_core.IMP_DISPLAY_HAS_CGAL
268 
269 IMP_DISPLAY_HAS_NUMPY = _IMP_core.IMP_DISPLAY_HAS_NUMPY
270 
271 IMPDISPLAY_SHOW_WARNINGS = _IMP_core.IMPDISPLAY_SHOW_WARNINGS
272 
273 import IMP.display
274 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_core.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
275 
276 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
277 
278 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
279 
280 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
281 
282 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_core.IMP_SCORE_FUNCTOR_HAS_CGAL
283 
284 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_core.IMP_SCORE_FUNCTOR_HAS_HDF5
285 
286 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_core.IMP_SCORE_FUNCTOR_HAS_NUMPY
287 
288 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_core.IMPSCOREFUNCTOR_SHOW_WARNINGS
289 
290 import IMP.score_functor
291 IMP_CORE_HAS_IMP_CGAL = _IMP_core.IMP_CORE_HAS_IMP_CGAL
292 
293 IMP_CORE_HAS_IMP_KERNEL = _IMP_core.IMP_CORE_HAS_IMP_KERNEL
294 
295 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_CORE_HAS_BOOST_FILESYSTEM
296 
297 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
298 
299 IMP_CORE_HAS_BOOST_RANDOM = _IMP_core.IMP_CORE_HAS_BOOST_RANDOM
300 
301 IMP_CORE_HAS_CGAL = _IMP_core.IMP_CORE_HAS_CGAL
302 
303 IMP_CORE_HAS_HDF5 = _IMP_core.IMP_CORE_HAS_HDF5
304 
305 IMP_CORE_HAS_NUMPY = _IMP_core.IMP_CORE_HAS_NUMPY
306 
307 IMPCORE_SHOW_WARNINGS = _IMP_core.IMPCORE_SHOW_WARNINGS
308 
309 class _OpenCubicSplineBase(IMP.UnaryFunction):
310  r"""Proxy of C++ IMP::score_functor::ScoreUnaryFunction< IMP::score_functor::OpenCubicSpline > class."""
311 
312  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
313  __repr__ = _swig_repr
314 
315  def __init__(self, *args):
316  r"""__init__(_OpenCubicSplineBase self, IMP::score_functor::OpenCubicSpline const & score, std::string name="UnaryFunction%1%") -> _OpenCubicSplineBase"""
317  _IMP_core._OpenCubicSplineBase_swiginit(self, _IMP_core.new__OpenCubicSplineBase(*args))
318 
319  def get_version_info(self):
320  r"""get_version_info(_OpenCubicSplineBase self) -> VersionInfo"""
321  return _IMP_core._OpenCubicSplineBase_get_version_info(self)
322  __swig_destroy__ = _IMP_core.delete__OpenCubicSplineBase
323 
324 # Register _OpenCubicSplineBase in _IMP_core:
325 _IMP_core._OpenCubicSplineBase_swigregister(_OpenCubicSplineBase)
326 
327 _object_types.append("MonteCarloMover")
328 
329 
330 def _object_cast_to_MonteCarloMover(o):
331  r"""_object_cast_to_MonteCarloMover(Object o) -> MonteCarloMover"""
332  return _IMP_core._object_cast_to_MonteCarloMover(o)
333 
334 MonteCarloMoverResults=list
335 _plural_types.append("MonteCarloMoverResults")
336 _value_types.append("MonteCarloMoverResult")
337 
338 
339 _object_types.append("AngleRestraint")
340 
341 
342 def _object_cast_to_AngleRestraint(o):
343  r"""_object_cast_to_AngleRestraint(Object o) -> AngleRestraint"""
344  return _IMP_core._object_cast_to_AngleRestraint(o)
345 
346 _object_types.append("AngleTripletScore")
347 
348 
349 def _object_cast_to_AngleTripletScore(o):
350  r"""_object_cast_to_AngleTripletScore(Object o) -> AngleTripletScore"""
351  return _IMP_core._object_cast_to_AngleTripletScore(o)
352 
353 _object_types.append("DihedralQuadScore")
354 
355 
356 def _object_cast_to_DihedralQuadScore(o):
357  r"""_object_cast_to_DihedralQuadScore(Object o) -> DihedralQuadScore"""
358  return _IMP_core._object_cast_to_DihedralQuadScore(o)
359 
360 _object_types.append("AttributeSingletonScore")
361 
362 
363 def _object_cast_to_AttributeSingletonScore(o):
364  r"""_object_cast_to_AttributeSingletonScore(Object o) -> AttributeSingletonScore"""
365  return _IMP_core._object_cast_to_AttributeSingletonScore(o)
366 
367 _object_types.append("BallMover")
368 
369 
370 def _object_cast_to_BallMover(o):
371  r"""_object_cast_to_BallMover(Object o) -> BallMover"""
372  return _IMP_core._object_cast_to_BallMover(o)
373 
374 _object_types.append("SerialMover")
375 
376 
377 def _object_cast_to_SerialMover(o):
378  r"""_object_cast_to_SerialMover(Object o) -> SerialMover"""
379  return _IMP_core._object_cast_to_SerialMover(o)
380 
381 _object_types.append("SubsetMover")
382 
383 
384 def _object_cast_to_SubsetMover(o):
385  r"""_object_cast_to_SubsetMover(Object o) -> SubsetMover"""
386  return _IMP_core._object_cast_to_SubsetMover(o)
387 
388 _object_types.append("DirectionMover")
389 
390 
391 def _object_cast_to_DirectionMover(o):
392  r"""_object_cast_to_DirectionMover(Object o) -> DirectionMover"""
393  return _IMP_core._object_cast_to_DirectionMover(o)
394 
395 _object_types.append("SurfaceMover")
396 
397 
398 def _object_cast_to_SurfaceMover(o):
399  r"""_object_cast_to_SurfaceMover(Object o) -> SurfaceMover"""
400  return _IMP_core._object_cast_to_SurfaceMover(o)
401 
402 _object_types.append("BoundingBox3DSingletonScore")
403 
404 
405 def _object_cast_to_BoundingBox3DSingletonScore(o):
406  r"""_object_cast_to_BoundingBox3DSingletonScore(Object o) -> BoundingBox3DSingletonScore"""
407  return _IMP_core._object_cast_to_BoundingBox3DSingletonScore(o)
408 
409 _object_types.append("BoundingSphere3DSingletonScore")
410 
411 
412 def _object_cast_to_BoundingSphere3DSingletonScore(o):
413  r"""_object_cast_to_BoundingSphere3DSingletonScore(Object o) -> BoundingSphere3DSingletonScore"""
414  return _IMP_core._object_cast_to_BoundingSphere3DSingletonScore(o)
415 
416 _object_types.append("BoxSweepClosePairsFinder")
417 
418 
419 def _object_cast_to_BoxSweepClosePairsFinder(o):
420  r"""_object_cast_to_BoxSweepClosePairsFinder(Object o) -> BoxSweepClosePairsFinder"""
421  return _IMP_core._object_cast_to_BoxSweepClosePairsFinder(o)
422 
423 _object_types.append("NearestNeighborsClosePairsFinder")
424 
425 
426 def _object_cast_to_NearestNeighborsClosePairsFinder(o):
427  r"""_object_cast_to_NearestNeighborsClosePairsFinder(Object o) -> NearestNeighborsClosePairsFinder"""
428  return _IMP_core._object_cast_to_NearestNeighborsClosePairsFinder(o)
429 
430 _object_types.append("CentroidOfRefined")
431 
432 
433 def _object_cast_to_CentroidOfRefined(o):
434  r"""_object_cast_to_CentroidOfRefined(Object o) -> CentroidOfRefined"""
435  return _IMP_core._object_cast_to_CentroidOfRefined(o)
436 
437 _object_types.append("ChecksScoreState")
438 
439 
440 def _object_cast_to_ChecksScoreState(o):
441  r"""_object_cast_to_ChecksScoreState(Object o) -> ChecksScoreState"""
442  return _IMP_core._object_cast_to_ChecksScoreState(o)
443 
444 _object_types.append("ChildrenRefiner")
445 
446 
447 def _object_cast_to_ChildrenRefiner(o):
448  r"""_object_cast_to_ChildrenRefiner(Object o) -> ChildrenRefiner"""
449  return _IMP_core._object_cast_to_ChildrenRefiner(o)
450 
451 _object_types.append("ClosePairsFinder")
452 
453 
454 def _object_cast_to_ClosePairsFinder(o):
455  r"""_object_cast_to_ClosePairsFinder(Object o) -> ClosePairsFinder"""
456  return _IMP_core._object_cast_to_ClosePairsFinder(o)
457 
458 _object_types.append("ClosePairsPairScore")
459 
460 
461 def _object_cast_to_ClosePairsPairScore(o):
462  r"""_object_cast_to_ClosePairsPairScore(Object o) -> ClosePairsPairScore"""
463  return _IMP_core._object_cast_to_ClosePairsPairScore(o)
464 
465 _object_types.append("ClosedCubicSpline")
466 
467 
468 def _object_cast_to_ClosedCubicSpline(o):
469  r"""_object_cast_to_ClosedCubicSpline(Object o) -> ClosedCubicSpline"""
470  return _IMP_core._object_cast_to_ClosedCubicSpline(o)
471 
472 _object_types.append("ConjugateGradients")
473 
474 
475 def _object_cast_to_ConjugateGradients(o):
476  r"""_object_cast_to_ConjugateGradients(Object o) -> ConjugateGradients"""
477  return _IMP_core._object_cast_to_ConjugateGradients(o)
478 
479 _object_types.append("ConnectivityRestraint")
480 
481 
482 def _object_cast_to_ConnectivityRestraint(o):
483  r"""_object_cast_to_ConnectivityRestraint(Object o) -> ConnectivityRestraint"""
484  return _IMP_core._object_cast_to_ConnectivityRestraint(o)
485 
486 _object_types.append("ConstantRestraint")
487 
488 
489 def _object_cast_to_ConstantRestraint(o):
490  r"""_object_cast_to_ConstantRestraint(Object o) -> ConstantRestraint"""
491  return _IMP_core._object_cast_to_ConstantRestraint(o)
492 
493 _object_types.append("Cosine")
494 
495 
496 def _object_cast_to_Cosine(o):
497  r"""_object_cast_to_Cosine(Object o) -> Cosine"""
498  return _IMP_core._object_cast_to_Cosine(o)
499 
500 _object_types.append("CoverRefined")
501 
502 
503 def _object_cast_to_CoverRefined(o):
504  r"""_object_cast_to_CoverRefined(Object o) -> CoverRefined"""
505  return _IMP_core._object_cast_to_CoverRefined(o)
506 
507 _object_types.append("DerivativesFromRefined")
508 
509 
510 def _object_cast_to_DerivativesFromRefined(o):
511  r"""_object_cast_to_DerivativesFromRefined(Object o) -> DerivativesFromRefined"""
512  return _IMP_core._object_cast_to_DerivativesFromRefined(o)
513 
514 _object_types.append("DerivativesToRefined")
515 
516 
517 def _object_cast_to_DerivativesToRefined(o):
518  r"""_object_cast_to_DerivativesToRefined(Object o) -> DerivativesToRefined"""
519  return _IMP_core._object_cast_to_DerivativesToRefined(o)
520 
521 _object_types.append("WeightedDerivativesToRefined")
522 
523 
524 def _object_cast_to_WeightedDerivativesToRefined(o):
525  r"""_object_cast_to_WeightedDerivativesToRefined(Object o) -> IMP::core::WeightedDerivativesToRefined *"""
526  return _IMP_core._object_cast_to_WeightedDerivativesToRefined(o)
527 
528 _object_types.append("DiameterRestraint")
529 
530 
531 def _object_cast_to_DiameterRestraint(o):
532  r"""_object_cast_to_DiameterRestraint(Object o) -> DiameterRestraint"""
533  return _IMP_core._object_cast_to_DiameterRestraint(o)
534 
535 _object_types.append("DihedralRestraint")
536 
537 
538 def _object_cast_to_DihedralRestraint(o):
539  r"""_object_cast_to_DihedralRestraint(Object o) -> DihedralRestraint"""
540  return _IMP_core._object_cast_to_DihedralRestraint(o)
541 
542 _object_types.append("DistanceRestraint")
543 
544 
545 def _object_cast_to_DistanceRestraint(o):
546  r"""_object_cast_to_DistanceRestraint(Object o) -> DistanceRestraint"""
547  return _IMP_core._object_cast_to_DistanceRestraint(o)
548 
549 _object_types.append("DistanceToSingletonScore")
550 
551 
552 def _object_cast_to_DistanceToSingletonScore(o):
553  r"""_object_cast_to_DistanceToSingletonScore(Object o) -> DistanceToSingletonScore"""
554  return _IMP_core._object_cast_to_DistanceToSingletonScore(o)
555 
556 _object_types.append("ExcludedVolumeRestraint")
557 
558 
559 def _object_cast_to_ExcludedVolumeRestraint(o):
560  r"""_object_cast_to_ExcludedVolumeRestraint(Object o) -> ExcludedVolumeRestraint"""
561  return _IMP_core._object_cast_to_ExcludedVolumeRestraint(o)
562 
563 _object_types.append("FixedRefiner")
564 
565 
566 def _object_cast_to_FixedRefiner(o):
567  r"""_object_cast_to_FixedRefiner(Object o) -> FixedRefiner"""
568  return _IMP_core._object_cast_to_FixedRefiner(o)
569 
570 _object_types.append("GridClosePairsFinder")
571 
572 
573 def _object_cast_to_GridClosePairsFinder(o):
574  r"""_object_cast_to_GridClosePairsFinder(Object o) -> GridClosePairsFinder"""
575  return _IMP_core._object_cast_to_GridClosePairsFinder(o)
576 
577 _object_types.append("Harmonic")
578 
579 
580 def _object_cast_to_Harmonic(o):
581  r"""_object_cast_to_Harmonic(Object o) -> Harmonic"""
582  return _IMP_core._object_cast_to_Harmonic(o)
583 
584 _object_types.append("HarmonicWell")
585 
586 
587 def _object_cast_to_HarmonicWell(o):
588  r"""_object_cast_to_HarmonicWell(Object o) -> HarmonicWell"""
589  return _IMP_core._object_cast_to_HarmonicWell(o)
590 
591 _object_types.append("HarmonicLowerBound")
592 
593 
594 def _object_cast_to_HarmonicLowerBound(o):
595  r"""_object_cast_to_HarmonicLowerBound(Object o) -> HarmonicLowerBound"""
596  return _IMP_core._object_cast_to_HarmonicLowerBound(o)
597 
598 _object_types.append("HarmonicUpperBound")
599 
600 
601 def _object_cast_to_HarmonicUpperBound(o):
602  r"""_object_cast_to_HarmonicUpperBound(Object o) -> HarmonicUpperBound"""
603  return _IMP_core._object_cast_to_HarmonicUpperBound(o)
604 
605 _object_types.append("HarmonicSphereDistancePairScore")
606 
607 
608 def _object_cast_to_HarmonicSphereDistancePairScore(o):
609  r"""_object_cast_to_HarmonicSphereDistancePairScore(Object o) -> HarmonicSphereDistancePairScore"""
610  return _IMP_core._object_cast_to_HarmonicSphereDistancePairScore(o)
611 
612 _object_types.append("HarmonicUpperBoundSphereDistancePairScore")
613 
614 
615 def _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o):
616  r"""_object_cast_to_HarmonicUpperBoundSphereDistancePairScore(Object o) -> HarmonicUpperBoundSphereDistancePairScore"""
617  return _IMP_core._object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
618 
619 _object_types.append("HarmonicUpperBoundSphereDiameterPairScore")
620 
621 
622 def _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o):
623  r"""_object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(Object o) -> HarmonicUpperBoundSphereDiameterPairScore"""
624  return _IMP_core._object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
625 
626 _object_types.append("HarmonicSurfaceDistancePairScore")
627 
628 
629 def _object_cast_to_HarmonicSurfaceDistancePairScore(o):
630  r"""_object_cast_to_HarmonicSurfaceDistancePairScore(Object o) -> HarmonicSurfaceDistancePairScore"""
631  return _IMP_core._object_cast_to_HarmonicSurfaceDistancePairScore(o)
632 
633 _object_types.append("HarmonicSurfaceHeightPairScore")
634 
635 
636 def _object_cast_to_HarmonicSurfaceHeightPairScore(o):
637  r"""_object_cast_to_HarmonicSurfaceHeightPairScore(Object o) -> HarmonicSurfaceHeightPairScore"""
638  return _IMP_core._object_cast_to_HarmonicSurfaceHeightPairScore(o)
639 
640 _object_types.append("HarmonicSurfaceDepthPairScore")
641 
642 
643 def _object_cast_to_HarmonicSurfaceDepthPairScore(o):
644  r"""_object_cast_to_HarmonicSurfaceDepthPairScore(Object o) -> HarmonicSurfaceDepthPairScore"""
645  return _IMP_core._object_cast_to_HarmonicSurfaceDepthPairScore(o)
646 
647 _object_types.append("WeightedSum")
648 
649 
650 def _object_cast_to_WeightedSum(o):
651  r"""_object_cast_to_WeightedSum(Object o) -> WeightedSum"""
652  return _IMP_core._object_cast_to_WeightedSum(o)
653 
654 _object_types.append("WeightedSumOfExponential")
655 
656 
657 def _object_cast_to_WeightedSumOfExponential(o):
658  r"""_object_cast_to_WeightedSumOfExponential(Object o) -> WeightedSumOfExponential"""
659  return _IMP_core._object_cast_to_WeightedSumOfExponential(o)
660 
661 _object_types.append("KClosePairsPairScore")
662 
663 
664 def _object_cast_to_KClosePairsPairScore(o):
665  r"""_object_cast_to_KClosePairsPairScore(Object o) -> KClosePairsPairScore"""
666  return _IMP_core._object_cast_to_KClosePairsPairScore(o)
667 
668 _object_types.append("LeavesRefiner")
669 
670 
671 def _object_cast_to_LeavesRefiner(o):
672  r"""_object_cast_to_LeavesRefiner(Object o) -> LeavesRefiner"""
673  return _IMP_core._object_cast_to_LeavesRefiner(o)
674 
675 _object_types.append("Linear")
676 
677 
678 def _object_cast_to_Linear(o):
679  r"""_object_cast_to_Linear(Object o) -> Linear"""
680  return _IMP_core._object_cast_to_Linear(o)
681 
682 _object_types.append("LogNormalMover")
683 
684 
685 def _object_cast_to_LogNormalMover(o):
686  r"""_object_cast_to_LogNormalMover(Object o) -> LogNormalMover"""
687  return _IMP_core._object_cast_to_LogNormalMover(o)
688 
689 _object_types.append("MCCGSampler")
690 
691 
692 def _object_cast_to_MCCGSampler(o):
693  r"""_object_cast_to_MCCGSampler(Object o) -> MCCGSampler"""
694  return _IMP_core._object_cast_to_MCCGSampler(o)
695 
696 _object_types.append("MonteCarlo")
697 
698 
699 def _object_cast_to_MonteCarlo(o):
700  r"""_object_cast_to_MonteCarlo(Object o) -> MonteCarlo"""
701  return _IMP_core._object_cast_to_MonteCarlo(o)
702 
703 _object_types.append("MonteCarloWithLocalOptimization")
704 
705 
706 def _object_cast_to_MonteCarloWithLocalOptimization(o):
707  r"""_object_cast_to_MonteCarloWithLocalOptimization(Object o) -> MonteCarloWithLocalOptimization"""
708  return _IMP_core._object_cast_to_MonteCarloWithLocalOptimization(o)
709 
710 _object_types.append("MonteCarloWithBasinHopping")
711 
712 
713 def _object_cast_to_MonteCarloWithBasinHopping(o):
714  r"""_object_cast_to_MonteCarloWithBasinHopping(Object o) -> MonteCarloWithBasinHopping"""
715  return _IMP_core._object_cast_to_MonteCarloWithBasinHopping(o)
716 
717 _object_types.append("MSConnectivityRestraint")
718 
719 
720 def _object_cast_to_MSConnectivityRestraint(o):
721  r"""_object_cast_to_MSConnectivityRestraint(Object o) -> MSConnectivityRestraint"""
722  return _IMP_core._object_cast_to_MSConnectivityRestraint(o)
723 
724 _object_types.append("NeighborsTable")
725 
726 
727 def _object_cast_to_NeighborsTable(o):
728  r"""_object_cast_to_NeighborsTable(Object o) -> NeighborsTable"""
729  return _IMP_core._object_cast_to_NeighborsTable(o)
730 
731 _object_types.append("NormalMover")
732 
733 
734 def _object_cast_to_NormalMover(o):
735  r"""_object_cast_to_NormalMover(Object o) -> NormalMover"""
736  return _IMP_core._object_cast_to_NormalMover(o)
737 
738 _object_types.append("NormalizedSphereDistancePairScore")
739 
740 
741 def _object_cast_to_NormalizedSphereDistancePairScore(o):
742  r"""_object_cast_to_NormalizedSphereDistancePairScore(Object o) -> NormalizedSphereDistancePairScore"""
743  return _IMP_core._object_cast_to_NormalizedSphereDistancePairScore(o)
744 
745 _object_types.append("OpenCubicSpline")
746 
747 
748 def _object_cast_to_OpenCubicSpline(o):
749  r"""_object_cast_to_OpenCubicSpline(Object o) -> OpenCubicSpline"""
750  return _IMP_core._object_cast_to_OpenCubicSpline(o)
751 
752 _object_types.append("PairConstraint")
753 
754 
755 def _object_cast_to_PairConstraint(o):
756  r"""_object_cast_to_PairConstraint(Object o) -> PairConstraint"""
757  return _IMP_core._object_cast_to_PairConstraint(o)
758 
759 _object_types.append("PairRestraint")
760 
761 
762 def _object_cast_to_PairRestraint(o):
763  r"""_object_cast_to_PairRestraint(Object o) -> PairRestraint"""
764  return _IMP_core._object_cast_to_PairRestraint(o)
765 
766 _object_types.append("QuadConstraint")
767 
768 
769 def _object_cast_to_QuadConstraint(o):
770  r"""_object_cast_to_QuadConstraint(Object o) -> QuadConstraint"""
771  return _IMP_core._object_cast_to_QuadConstraint(o)
772 
773 _object_types.append("QuadRestraint")
774 
775 
776 def _object_cast_to_QuadRestraint(o):
777  r"""_object_cast_to_QuadRestraint(Object o) -> QuadRestraint"""
778  return _IMP_core._object_cast_to_QuadRestraint(o)
779 
780 _object_types.append("QuadraticClosePairsFinder")
781 
782 
783 def _object_cast_to_QuadraticClosePairsFinder(o):
784  r"""_object_cast_to_QuadraticClosePairsFinder(Object o) -> QuadraticClosePairsFinder"""
785  return _IMP_core._object_cast_to_QuadraticClosePairsFinder(o)
786 
787 _object_types.append("RefinedPairsPairScore")
788 
789 
790 def _object_cast_to_RefinedPairsPairScore(o):
791  r"""_object_cast_to_RefinedPairsPairScore(Object o) -> RefinedPairsPairScore"""
792  return _IMP_core._object_cast_to_RefinedPairsPairScore(o)
793 
794 _object_types.append("RestraintsScoringFunction")
795 
796 
797 def _object_cast_to_RestraintsScoringFunction(o):
798  r"""_object_cast_to_RestraintsScoringFunction(Object o) -> RestraintsScoringFunction"""
799  return _IMP_core._object_cast_to_RestraintsScoringFunction(o)
800 
801 _object_types.append("RigidBodyDistancePairScore")
802 
803 
804 def _object_cast_to_RigidBodyDistancePairScore(o):
805  r"""_object_cast_to_RigidBodyDistancePairScore(Object o) -> RigidBodyDistancePairScore"""
806  return _IMP_core._object_cast_to_RigidBodyDistancePairScore(o)
807 
808 _object_types.append("RigidBodyAnglePairScore")
809 
810 
811 def _object_cast_to_RigidBodyAnglePairScore(o):
812  r"""_object_cast_to_RigidBodyAnglePairScore(Object o) -> RigidBodyAnglePairScore"""
813  return _IMP_core._object_cast_to_RigidBodyAnglePairScore(o)
814 
815 _object_types.append("RigidBodyMover")
816 
817 
818 def _object_cast_to_RigidBodyMover(o):
819  r"""_object_cast_to_RigidBodyMover(Object o) -> RigidBodyMover"""
820  return _IMP_core._object_cast_to_RigidBodyMover(o)
821 
822 _object_types.append("RigidBodyTunneler")
823 
824 
825 def _object_cast_to_RigidBodyTunneler(o):
826  r"""_object_cast_to_RigidBodyTunneler(Object o) -> RigidBodyTunneler"""
827  return _IMP_core._object_cast_to_RigidBodyTunneler(o)
828 
829 _object_types.append("RigidBodyUmbrella")
830 
831 
832 def _object_cast_to_RigidBodyUmbrella(o):
833  r"""_object_cast_to_RigidBodyUmbrella(Object o) -> RigidBodyUmbrella"""
834  return _IMP_core._object_cast_to_RigidBodyUmbrella(o)
835 
836 _object_types.append("_UpdateRigidBodyMembers")
837 
838 
839 def _object_cast_to__UpdateRigidBodyMembers(o):
840  r"""_object_cast_to__UpdateRigidBodyMembers(Object o) -> _UpdateRigidBodyMembers"""
841  return _IMP_core._object_cast_to__UpdateRigidBodyMembers(o)
842 
843 _object_types.append("_AccumulateRigidBodyDerivatives")
844 
845 
846 def _object_cast_to__AccumulateRigidBodyDerivatives(o):
847  r"""_object_cast_to__AccumulateRigidBodyDerivatives(Object o) -> _AccumulateRigidBodyDerivatives"""
848  return _IMP_core._object_cast_to__AccumulateRigidBodyDerivatives(o)
849 
850 _object_types.append("_RigidBodyNormalizeConstraint")
851 
852 
853 def _object_cast_to__RigidBodyNormalizeConstraint(o):
854  r"""_object_cast_to__RigidBodyNormalizeConstraint(Object o) -> _RigidBodyNormalizeConstraint"""
855  return _IMP_core._object_cast_to__RigidBodyNormalizeConstraint(o)
856 
857 _object_types.append("_NormalizeRotation")
858 
859 
860 def _object_cast_to__NormalizeRotation(o):
861  r"""_object_cast_to__NormalizeRotation(Object o) -> _NormalizeRotation"""
862  return _IMP_core._object_cast_to__NormalizeRotation(o)
863 
864 _object_types.append("_RigidBodyPositionConstraint")
865 
866 
867 def _object_cast_to__RigidBodyPositionConstraint(o):
868  r"""_object_cast_to__RigidBodyPositionConstraint(Object o) -> _RigidBodyPositionConstraint"""
869  return _IMP_core._object_cast_to__RigidBodyPositionConstraint(o)
870 
871 _object_types.append("RigidClosePairsFinder")
872 
873 
874 def _object_cast_to_RigidClosePairsFinder(o):
875  r"""_object_cast_to_RigidClosePairsFinder(Object o) -> RigidClosePairsFinder"""
876  return _IMP_core._object_cast_to_RigidClosePairsFinder(o)
877 
878 _object_types.append("RigidMembersRefiner")
879 
880 
881 def _object_cast_to_RigidMembersRefiner(o):
882  r"""_object_cast_to_RigidMembersRefiner(Object o) -> RigidMembersRefiner"""
883  return _IMP_core._object_cast_to_RigidMembersRefiner(o)
884 
885 _object_types.append("SingletonConstraint")
886 
887 
888 def _object_cast_to_SingletonConstraint(o):
889  r"""_object_cast_to_SingletonConstraint(Object o) -> SingletonConstraint"""
890  return _IMP_core._object_cast_to_SingletonConstraint(o)
891 
892 _object_types.append("SingletonRestraint")
893 
894 
895 def _object_cast_to_SingletonRestraint(o):
896  r"""_object_cast_to_SingletonRestraint(Object o) -> SingletonRestraint"""
897  return _IMP_core._object_cast_to_SingletonRestraint(o)
898 
899 _object_types.append("SoftSpherePairScore")
900 
901 
902 def _object_cast_to_SoftSpherePairScore(o):
903  r"""_object_cast_to_SoftSpherePairScore(Object o) -> SoftSpherePairScore"""
904  return _IMP_core._object_cast_to_SoftSpherePairScore(o)
905 
906 _object_types.append("_SphereDistancePairScore")
907 
908 
909 def _object_cast_to__SphereDistancePairScore(o):
910  r"""_object_cast_to__SphereDistancePairScore(Object o) -> _SphereDistancePairScore"""
911  return _IMP_core._object_cast_to__SphereDistancePairScore(o)
912 
913 _object_types.append("SphereDistanceToSingletonScore")
914 
915 
916 def _object_cast_to_SphereDistanceToSingletonScore(o):
917  r"""_object_cast_to_SphereDistanceToSingletonScore(Object o) -> SphereDistanceToSingletonScore"""
918  return _IMP_core._object_cast_to_SphereDistanceToSingletonScore(o)
919 
920 _object_types.append("SoftSubSurfacePairScore")
921 
922 
923 def _object_cast_to_SoftSubSurfacePairScore(o):
924  r"""_object_cast_to_SoftSubSurfacePairScore(Object o) -> SoftSubSurfacePairScore"""
925  return _IMP_core._object_cast_to_SoftSubSurfacePairScore(o)
926 
927 _object_types.append("SoftSuperSurfacePairScore")
928 
929 
930 def _object_cast_to_SoftSuperSurfacePairScore(o):
931  r"""_object_cast_to_SoftSuperSurfacePairScore(Object o) -> SoftSuperSurfacePairScore"""
932  return _IMP_core._object_cast_to_SoftSuperSurfacePairScore(o)
933 
934 _object_types.append("SurfaceDistancePairScore")
935 
936 
937 def _object_cast_to_SurfaceDistancePairScore(o):
938  r"""_object_cast_to_SurfaceDistancePairScore(Object o) -> SurfaceDistancePairScore"""
939  return _IMP_core._object_cast_to_SurfaceDistancePairScore(o)
940 
941 _object_types.append("SurfaceHeightPairScore")
942 
943 
944 def _object_cast_to_SurfaceHeightPairScore(o):
945  r"""_object_cast_to_SurfaceHeightPairScore(Object o) -> SurfaceHeightPairScore"""
946  return _IMP_core._object_cast_to_SurfaceHeightPairScore(o)
947 
948 _object_types.append("SurfaceDepthPairScore")
949 
950 
951 def _object_cast_to_SurfaceDepthPairScore(o):
952  r"""_object_cast_to_SurfaceDepthPairScore(Object o) -> SurfaceDepthPairScore"""
953  return _IMP_core._object_cast_to_SurfaceDepthPairScore(o)
954 
955 _object_types.append("SurfaceTetheredChain")
956 
957 
958 def _object_cast_to_SurfaceTetheredChain(o):
959  r"""_object_cast_to_SurfaceTetheredChain(Object o) -> SurfaceTetheredChain"""
960  return _IMP_core._object_cast_to_SurfaceTetheredChain(o)
961 
962 _object_types.append("SurfaceSymmetryConstraint")
963 
964 
965 def _object_cast_to_SurfaceSymmetryConstraint(o):
966  r"""_object_cast_to_SurfaceSymmetryConstraint(Object o) -> SurfaceSymmetryConstraint"""
967  return _IMP_core._object_cast_to_SurfaceSymmetryConstraint(o)
968 
969 _object_types.append("SteepestDescent")
970 
971 
972 def _object_cast_to_SteepestDescent(o):
973  r"""_object_cast_to_SteepestDescent(Object o) -> SteepestDescent"""
974  return _IMP_core._object_cast_to_SteepestDescent(o)
975 
976 _object_types.append("TableRefiner")
977 
978 
979 def _object_cast_to_TableRefiner(o):
980  r"""_object_cast_to_TableRefiner(Object o) -> TableRefiner"""
981  return _IMP_core._object_cast_to_TableRefiner(o)
982 
983 _object_types.append("Transform")
984 
985 
986 def _object_cast_to_Transform(o):
987  r"""_object_cast_to_Transform(Object o) -> Transform"""
988  return _IMP_core._object_cast_to_Transform(o)
989 
990 _object_types.append("TransformationAndReflectionSymmetry")
991 
992 
993 def _object_cast_to_TransformationAndReflectionSymmetry(o):
994  r"""_object_cast_to_TransformationAndReflectionSymmetry(Object o) -> TransformationAndReflectionSymmetry"""
995  return _IMP_core._object_cast_to_TransformationAndReflectionSymmetry(o)
996 
997 _object_types.append("TransformationSymmetry")
998 
999 
1000 def _object_cast_to_TransformationSymmetry(o):
1001  r"""_object_cast_to_TransformationSymmetry(Object o) -> TransformationSymmetry"""
1002  return _IMP_core._object_cast_to_TransformationSymmetry(o)
1003 
1004 _object_types.append("TransformationSymmetryMover")
1005 
1006 
1007 def _object_cast_to_TransformationSymmetryMover(o):
1008  r"""_object_cast_to_TransformationSymmetryMover(Object o) -> TransformationSymmetryMover"""
1009  return _IMP_core._object_cast_to_TransformationSymmetryMover(o)
1010 
1011 _object_types.append("TransformedDistancePairScore")
1012 
1013 
1014 def _object_cast_to_TransformedDistancePairScore(o):
1015  r"""_object_cast_to_TransformedDistancePairScore(Object o) -> TransformedDistancePairScore"""
1016  return _IMP_core._object_cast_to_TransformedDistancePairScore(o)
1017 
1018 _object_types.append("TripletConstraint")
1019 
1020 
1021 def _object_cast_to_TripletConstraint(o):
1022  r"""_object_cast_to_TripletConstraint(Object o) -> TripletConstraint"""
1023  return _IMP_core._object_cast_to_TripletConstraint(o)
1024 
1025 _object_types.append("TripletRestraint")
1026 
1027 
1028 def _object_cast_to_TripletRestraint(o):
1029  r"""_object_cast_to_TripletRestraint(Object o) -> TripletRestraint"""
1030  return _IMP_core._object_cast_to_TripletRestraint(o)
1031 
1032 _object_types.append("TypedPairScore")
1033 
1034 
1035 def _object_cast_to_TypedPairScore(o):
1036  r"""_object_cast_to_TypedPairScore(Object o) -> TypedPairScore"""
1037  return _IMP_core._object_cast_to_TypedPairScore(o)
1038 
1039 _object_types.append("VolumeRestraint")
1040 
1041 
1042 def _object_cast_to_VolumeRestraint(o):
1043  r"""_object_cast_to_VolumeRestraint(Object o) -> VolumeRestraint"""
1044  return _IMP_core._object_cast_to_VolumeRestraint(o)
1045 
1046 _object_types.append("WeightedSphereDistancePairScore")
1047 
1048 
1049 def _object_cast_to_WeightedSphereDistancePairScore(o):
1050  r"""_object_cast_to_WeightedSphereDistancePairScore(Object o) -> WeightedSphereDistancePairScore"""
1051  return _IMP_core._object_cast_to_WeightedSphereDistancePairScore(o)
1052 
1053 _object_types.append("MoveStatisticsScoreState")
1054 
1055 
1056 def _object_cast_to_MoveStatisticsScoreState(o):
1057  r"""_object_cast_to_MoveStatisticsScoreState(Object o) -> MoveStatisticsScoreState"""
1058  return _IMP_core._object_cast_to_MoveStatisticsScoreState(o)
1059 
1060 _object_types.append("MinimumRestraint")
1061 
1062 
1063 def _object_cast_to_MinimumRestraint(o):
1064  r"""_object_cast_to_MinimumRestraint(Object o) -> MinimumRestraint"""
1065  return _IMP_core._object_cast_to_MinimumRestraint(o)
1066 
1067 _object_types.append("WriteRestraintScoresOptimizerState")
1068 
1069 
1070 def _object_cast_to_WriteRestraintScoresOptimizerState(o):
1071  r"""_object_cast_to_WriteRestraintScoresOptimizerState(Object o) -> WriteRestraintScoresOptimizerState"""
1072  return _IMP_core._object_cast_to_WriteRestraintScoresOptimizerState(o)
1073 
1074 _object_types.append("LateralSurfaceConstraint")
1075 
1076 
1077 def _object_cast_to_LateralSurfaceConstraint(o):
1078  r"""_object_cast_to_LateralSurfaceConstraint(Object o) -> LateralSurfaceConstraint"""
1079  return _IMP_core._object_cast_to_LateralSurfaceConstraint(o)
1080 
1081 _object_types.append("ConstantSingletonPredicate")
1082 
1083 
1084 def _object_cast_to_ConstantSingletonPredicate(o):
1085  r"""_object_cast_to_ConstantSingletonPredicate(Object o) -> ConstantSingletonPredicate"""
1086  return _IMP_core._object_cast_to_ConstantSingletonPredicate(o)
1087 
1088 _object_types.append("ConstantPairPredicate")
1089 
1090 
1091 def _object_cast_to_ConstantPairPredicate(o):
1092  r"""_object_cast_to_ConstantPairPredicate(Object o) -> ConstantPairPredicate"""
1093  return _IMP_core._object_cast_to_ConstantPairPredicate(o)
1094 
1095 _object_types.append("ConstantTripletPredicate")
1096 
1097 
1098 def _object_cast_to_ConstantTripletPredicate(o):
1099  r"""_object_cast_to_ConstantTripletPredicate(Object o) -> ConstantTripletPredicate"""
1100  return _IMP_core._object_cast_to_ConstantTripletPredicate(o)
1101 
1102 _object_types.append("ConstantQuadPredicate")
1103 
1104 
1105 def _object_cast_to_ConstantQuadPredicate(o):
1106  r"""_object_cast_to_ConstantQuadPredicate(Object o) -> ConstantQuadPredicate"""
1107  return _IMP_core._object_cast_to_ConstantQuadPredicate(o)
1108 
1109 _object_types.append("CoinFlipSingletonPredicate")
1110 
1111 
1112 def _object_cast_to_CoinFlipSingletonPredicate(o):
1113  r"""_object_cast_to_CoinFlipSingletonPredicate(Object o) -> CoinFlipSingletonPredicate"""
1114  return _IMP_core._object_cast_to_CoinFlipSingletonPredicate(o)
1115 
1116 _object_types.append("CoinFlipPairPredicate")
1117 
1118 
1119 def _object_cast_to_CoinFlipPairPredicate(o):
1120  r"""_object_cast_to_CoinFlipPairPredicate(Object o) -> CoinFlipPairPredicate"""
1121  return _IMP_core._object_cast_to_CoinFlipPairPredicate(o)
1122 
1123 _object_types.append("CoinFlipTripletPredicate")
1124 
1125 
1126 def _object_cast_to_CoinFlipTripletPredicate(o):
1127  r"""_object_cast_to_CoinFlipTripletPredicate(Object o) -> CoinFlipTripletPredicate"""
1128  return _IMP_core._object_cast_to_CoinFlipTripletPredicate(o)
1129 
1130 _object_types.append("CoinFlipQuadPredicate")
1131 
1132 
1133 def _object_cast_to_CoinFlipQuadPredicate(o):
1134  r"""_object_cast_to_CoinFlipQuadPredicate(Object o) -> CoinFlipQuadPredicate"""
1135  return _IMP_core._object_cast_to_CoinFlipQuadPredicate(o)
1136 
1137 _object_types.append("UnorderedTypeSingletonPredicate")
1138 
1139 
1140 def _object_cast_to_UnorderedTypeSingletonPredicate(o):
1141  r"""_object_cast_to_UnorderedTypeSingletonPredicate(Object o) -> UnorderedTypeSingletonPredicate"""
1142  return _IMP_core._object_cast_to_UnorderedTypeSingletonPredicate(o)
1143 
1144 _object_types.append("UnorderedTypePairPredicate")
1145 
1146 
1147 def _object_cast_to_UnorderedTypePairPredicate(o):
1148  r"""_object_cast_to_UnorderedTypePairPredicate(Object o) -> UnorderedTypePairPredicate"""
1149  return _IMP_core._object_cast_to_UnorderedTypePairPredicate(o)
1150 
1151 _object_types.append("UnorderedTypeTripletPredicate")
1152 
1153 
1154 def _object_cast_to_UnorderedTypeTripletPredicate(o):
1155  r"""_object_cast_to_UnorderedTypeTripletPredicate(Object o) -> UnorderedTypeTripletPredicate"""
1156  return _IMP_core._object_cast_to_UnorderedTypeTripletPredicate(o)
1157 
1158 _object_types.append("UnorderedTypeQuadPredicate")
1159 
1160 
1161 def _object_cast_to_UnorderedTypeQuadPredicate(o):
1162  r"""_object_cast_to_UnorderedTypeQuadPredicate(Object o) -> UnorderedTypeQuadPredicate"""
1163  return _IMP_core._object_cast_to_UnorderedTypeQuadPredicate(o)
1164 
1165 _object_types.append("OrderedTypeSingletonPredicate")
1166 
1167 
1168 def _object_cast_to_OrderedTypeSingletonPredicate(o):
1169  r"""_object_cast_to_OrderedTypeSingletonPredicate(Object o) -> OrderedTypeSingletonPredicate"""
1170  return _IMP_core._object_cast_to_OrderedTypeSingletonPredicate(o)
1171 
1172 _object_types.append("OrderedTypePairPredicate")
1173 
1174 
1175 def _object_cast_to_OrderedTypePairPredicate(o):
1176  r"""_object_cast_to_OrderedTypePairPredicate(Object o) -> OrderedTypePairPredicate"""
1177  return _IMP_core._object_cast_to_OrderedTypePairPredicate(o)
1178 
1179 _object_types.append("OrderedTypeTripletPredicate")
1180 
1181 
1182 def _object_cast_to_OrderedTypeTripletPredicate(o):
1183  r"""_object_cast_to_OrderedTypeTripletPredicate(Object o) -> OrderedTypeTripletPredicate"""
1184  return _IMP_core._object_cast_to_OrderedTypeTripletPredicate(o)
1185 
1186 _object_types.append("OrderedTypeQuadPredicate")
1187 
1188 
1189 def _object_cast_to_OrderedTypeQuadPredicate(o):
1190  r"""_object_cast_to_OrderedTypeQuadPredicate(Object o) -> OrderedTypeQuadPredicate"""
1191  return _IMP_core._object_cast_to_OrderedTypeQuadPredicate(o)
1192 
1193 _object_types.append("AllSameSingletonPredicate")
1194 
1195 
1196 def _object_cast_to_AllSameSingletonPredicate(o):
1197  r"""_object_cast_to_AllSameSingletonPredicate(Object o) -> AllSameSingletonPredicate"""
1198  return _IMP_core._object_cast_to_AllSameSingletonPredicate(o)
1199 
1200 _object_types.append("AllSamePairPredicate")
1201 
1202 
1203 def _object_cast_to_AllSamePairPredicate(o):
1204  r"""_object_cast_to_AllSamePairPredicate(Object o) -> AllSamePairPredicate"""
1205  return _IMP_core._object_cast_to_AllSamePairPredicate(o)
1206 
1207 _object_types.append("AllSameTripletPredicate")
1208 
1209 
1210 def _object_cast_to_AllSameTripletPredicate(o):
1211  r"""_object_cast_to_AllSameTripletPredicate(Object o) -> AllSameTripletPredicate"""
1212  return _IMP_core._object_cast_to_AllSameTripletPredicate(o)
1213 
1214 _object_types.append("AllSameQuadPredicate")
1215 
1216 
1217 def _object_cast_to_AllSameQuadPredicate(o):
1218  r"""_object_cast_to_AllSameQuadPredicate(Object o) -> AllSameQuadPredicate"""
1219  return _IMP_core._object_cast_to_AllSameQuadPredicate(o)
1220 
1221 def XYZs(l=[]):
1222  return [XYZ(x) for x in l]
1223 _plural_types.append("XYZs")
1224 
1225 
1226 _value_types.append("XYZ")
1227 
1228 
1229 def XYZRs(l=[]):
1230  return [XYZR(x) for x in l]
1231 _plural_types.append("XYZRs")
1232 
1233 
1234 _value_types.append("XYZR")
1235 
1236 
1237 def RigidBodies(l=[]):
1238  return [RigidBody(x) for x in l]
1239 _plural_types.append("RigidBodies")
1240 
1241 
1242 _value_types.append("RigidBody")
1243 
1244 
1245 def RigidBodyMembers(l=[]):
1246  return [RigidBodyMember(x) for x in l]
1247 _plural_types.append("RigidBodyMembers")
1248 
1249 
1250 _value_types.append("RigidBodyMember")
1251 
1252 
1253 def RigidMembers(l=[]):
1254  return [RigidMember(x) for x in l]
1255 _plural_types.append("RigidMembers")
1256 
1257 
1258 _value_types.append("RigidMember")
1259 
1260 
1261 def NonRigidMembers(l=[]):
1262  return [NonRigidMember(x) for x in l]
1263 _plural_types.append("NonRigidMembers")
1264 
1265 
1266 _value_types.append("NonRigidMember")
1267 
1268 
1269 def Centroids(l=[]):
1270  return [Centroid(x) for x in l]
1271 _plural_types.append("Centroids")
1272 
1273 
1274 _value_types.append("Centroid")
1275 
1276 
1277 def Covers(l=[]):
1278  return [Cover(x) for x in l]
1279 _plural_types.append("Covers")
1280 
1281 
1282 _value_types.append("Cover")
1283 
1284 
1285 def References(l=[]):
1286  return [Reference(x) for x in l]
1287 _plural_types.append("References")
1288 
1289 
1290 _value_types.append("Reference")
1291 
1292 
1293 ParticleTypes=list
1294 _plural_types.append("ParticleTypes")
1295 _value_types.append("ParticleType")
1296 
1297 
1298 def Typeds(l=[]):
1299  return [Typed(x) for x in l]
1300 _plural_types.append("Typeds")
1301 
1302 
1303 _value_types.append("Typed")
1304 
1305 
1306 def GenericHierarchies(l=[]):
1307  return [Hierarchy(x) for x in l]
1308 _plural_types.append("GenericHierarchies")
1309 
1310 
1311 _value_types.append("Hierarchy")
1312 
1313 
1314 def Gaussians(l=[]):
1315  return [Gaussian(x) for x in l]
1316 _plural_types.append("Gaussians")
1317 
1318 
1319 _value_types.append("Gaussian")
1320 
1321 
1322 def Directions(l=[]):
1323  return [Direction(x) for x in l]
1324 _plural_types.append("Directions")
1325 
1326 
1327 _value_types.append("Direction")
1328 
1329 
1330 def DirectionAngles(l=[]):
1331  return [DirectionAngle(x) for x in l]
1332 _plural_types.append("DirectionAngles")
1333 
1334 
1335 _value_types.append("DirectionAngle")
1336 
1337 
1338 def Surfaces(l=[]):
1339  return [Surface(x) for x in l]
1340 _plural_types.append("Surfaces")
1341 
1342 
1343 _value_types.append("Surface")
1344 
1345 
1346 def Provenances(l=[]):
1347  return [Provenance(x) for x in l]
1348 _plural_types.append("Provenances")
1349 
1350 
1351 _value_types.append("Provenance")
1352 
1353 
1354 def StructureProvenances(l=[]):
1355  return [StructureProvenance(x) for x in l]
1356 _plural_types.append("StructureProvenances")
1357 
1358 
1359 _value_types.append("StructureProvenance")
1360 
1361 
1362 def SampleProvenances(l=[]):
1363  return [SampleProvenance(x) for x in l]
1364 _plural_types.append("SampleProvenances")
1365 
1366 
1367 _value_types.append("SampleProvenance")
1368 
1369 
1370 def ClusterProvenances(l=[]):
1371  return [ClusterProvenance(x) for x in l]
1372 _plural_types.append("ClusterProvenances")
1373 
1374 
1375 _value_types.append("ClusterProvenance")
1376 
1377 
1378 def CombineProvenances(l=[]):
1379  return [CombineProvenance(x) for x in l]
1380 _plural_types.append("CombineProvenances")
1381 
1382 
1383 _value_types.append("CombineProvenance")
1384 
1385 
1386 def FilterProvenances(l=[]):
1387  return [FilterProvenance(x) for x in l]
1388 _plural_types.append("FilterProvenances")
1389 
1390 
1391 _value_types.append("FilterProvenance")
1392 
1393 
1394 def ScriptProvenances(l=[]):
1395  return [ScriptProvenance(x) for x in l]
1396 _plural_types.append("ScriptProvenances")
1397 
1398 
1399 _value_types.append("ScriptProvenance")
1400 
1401 
1402 def SoftwareProvenances(l=[]):
1403  return [SoftwareProvenance(x) for x in l]
1404 _plural_types.append("SoftwareProvenances")
1405 
1406 
1407 _value_types.append("SoftwareProvenance")
1408 
1409 
1410 def Provenanceds(l=[]):
1411  return [Provenanced(x) for x in l]
1412 _plural_types.append("Provenanceds")
1413 
1414 
1415 _value_types.append("Provenanced")
1416 
1417 
1418 HierarchyCounters=list
1419 _plural_types.append("HierarchyCounters")
1420 _value_types.append("HierarchyCounter")
1421 
1422 
1423 HierarchyTraitsList=list
1424 _plural_types.append("HierarchyTraitsList")
1425 _value_types.append("HierarchyTraits")
1426 
1427 
1428 _object_types.append("TruncatedHarmonicBound")
1429 
1430 
1431 def _object_cast_to_TruncatedHarmonicBound(o):
1432  r"""_object_cast_to_TruncatedHarmonicBound(Object o) -> TruncatedHarmonicBound"""
1433  return _IMP_core._object_cast_to_TruncatedHarmonicBound(o)
1434 
1435 _object_types.append("TruncatedHarmonicLowerBound")
1436 
1437 
1438 def _object_cast_to_TruncatedHarmonicLowerBound(o):
1439  r"""_object_cast_to_TruncatedHarmonicLowerBound(Object o) -> TruncatedHarmonicLowerBound"""
1440  return _IMP_core._object_cast_to_TruncatedHarmonicLowerBound(o)
1441 
1442 _object_types.append("TruncatedHarmonicUpperBound")
1443 
1444 
1445 def _object_cast_to_TruncatedHarmonicUpperBound(o):
1446  r"""_object_cast_to_TruncatedHarmonicUpperBound(Object o) -> TruncatedHarmonicUpperBound"""
1447  return _IMP_core._object_cast_to_TruncatedHarmonicUpperBound(o)
1448 
1449 _object_types.append("HarmonicDistancePairScore")
1450 
1451 
1452 def _object_cast_to_HarmonicDistancePairScore(o):
1453  r"""_object_cast_to_HarmonicDistancePairScore(Object o) -> HarmonicDistancePairScore"""
1454  return _IMP_core._object_cast_to_HarmonicDistancePairScore(o)
1455 
1456 _object_types.append("DistancePairScore")
1457 
1458 
1459 def _object_cast_to_DistancePairScore(o):
1460  r"""_object_cast_to_DistancePairScore(Object o) -> DistancePairScore"""
1461  return _IMP_core._object_cast_to_DistancePairScore(o)
1462 
1463 _object_types.append("XYZRGeometry")
1464 
1465 
1466 def _object_cast_to_XYZRGeometry(o):
1467  r"""_object_cast_to_XYZRGeometry(Object o) -> XYZRGeometry"""
1468  return _IMP_core._object_cast_to_XYZRGeometry(o)
1469 
1470 _object_types.append("XYZRsGeometry")
1471 
1472 
1473 def _object_cast_to_XYZRsGeometry(o):
1474  r"""_object_cast_to_XYZRsGeometry(Object o) -> XYZRsGeometry"""
1475  return _IMP_core._object_cast_to_XYZRsGeometry(o)
1476 
1477 _object_types.append("XYZDerivativeGeometry")
1478 
1479 
1480 def _object_cast_to_XYZDerivativeGeometry(o):
1481  r"""_object_cast_to_XYZDerivativeGeometry(Object o) -> XYZDerivativeGeometry"""
1482  return _IMP_core._object_cast_to_XYZDerivativeGeometry(o)
1483 
1484 _object_types.append("XYZDerivativesGeometry")
1485 
1486 
1487 def _object_cast_to_XYZDerivativesGeometry(o):
1488  r"""_object_cast_to_XYZDerivativesGeometry(Object o) -> XYZDerivativesGeometry"""
1489  return _IMP_core._object_cast_to_XYZDerivativesGeometry(o)
1490 
1491 _object_types.append("RigidBodyDerivativeGeometry")
1492 
1493 
1494 def _object_cast_to_RigidBodyDerivativeGeometry(o):
1495  r"""_object_cast_to_RigidBodyDerivativeGeometry(Object o) -> RigidBodyDerivativeGeometry"""
1496  return _IMP_core._object_cast_to_RigidBodyDerivativeGeometry(o)
1497 
1498 _object_types.append("RigidBodyDerivativesGeometry")
1499 
1500 
1501 def _object_cast_to_RigidBodyDerivativesGeometry(o):
1502  r"""_object_cast_to_RigidBodyDerivativesGeometry(Object o) -> RigidBodyDerivativesGeometry"""
1503  return _IMP_core._object_cast_to_RigidBodyDerivativesGeometry(o)
1504 
1505 _object_types.append("RigidBodyHierarchyGeometry")
1506 
1507 
1508 def _object_cast_to_RigidBodyHierarchyGeometry(o):
1509  r"""_object_cast_to_RigidBodyHierarchyGeometry(Object o) -> RigidBodyHierarchyGeometry"""
1510  return _IMP_core._object_cast_to_RigidBodyHierarchyGeometry(o)
1511 
1512 _object_types.append("RigidBodyFrameGeometry")
1513 
1514 
1515 def _object_cast_to_RigidBodyFrameGeometry(o):
1516  r"""_object_cast_to_RigidBodyFrameGeometry(Object o) -> RigidBodyFrameGeometry"""
1517  return _IMP_core._object_cast_to_RigidBodyFrameGeometry(o)
1518 
1519 _object_types.append("RigidBodyFramesGeometry")
1520 
1521 
1522 def _object_cast_to_RigidBodyFramesGeometry(o):
1523  r"""_object_cast_to_RigidBodyFramesGeometry(Object o) -> RigidBodyFramesGeometry"""
1524  return _IMP_core._object_cast_to_RigidBodyFramesGeometry(o)
1525 
1526 _object_types.append("RigidBodyTorque")
1527 
1528 
1529 def _object_cast_to_RigidBodyTorque(o):
1530  r"""_object_cast_to_RigidBodyTorque(Object o) -> RigidBodyTorque"""
1531  return _IMP_core._object_cast_to_RigidBodyTorque(o)
1532 
1533 _object_types.append("EdgePairGeometry")
1534 
1535 
1536 def _object_cast_to_EdgePairGeometry(o):
1537  r"""_object_cast_to_EdgePairGeometry(Object o) -> EdgePairGeometry"""
1538  return _IMP_core._object_cast_to_EdgePairGeometry(o)
1539 
1540 _object_types.append("EdgePairsGeometry")
1541 
1542 
1543 def _object_cast_to_EdgePairsGeometry(o):
1544  r"""_object_cast_to_EdgePairsGeometry(Object o) -> EdgePairsGeometry"""
1545  return _IMP_core._object_cast_to_EdgePairsGeometry(o)
1546 
1547 _object_types.append("SurfaceGeometry")
1548 
1549 
1550 def _object_cast_to_SurfaceGeometry(o):
1551  r"""_object_cast_to_SurfaceGeometry(Object o) -> SurfaceGeometry"""
1552  return _IMP_core._object_cast_to_SurfaceGeometry(o)
1553 
1554 _object_types.append("SurfaceGeometryConstraint")
1555 
1556 
1557 def _object_cast_to_SurfaceGeometryConstraint(o):
1558  r"""_object_cast_to_SurfaceGeometryConstraint(Object o) -> SurfaceGeometryConstraint"""
1559  return _IMP_core._object_cast_to_SurfaceGeometryConstraint(o)
1560 
1561 _object_types.append("AttributeSingletonPredicate")
1562 
1563 
1564 def _object_cast_to_AttributeSingletonPredicate(o):
1565  r"""_object_cast_to_AttributeSingletonPredicate(Object o) -> AttributeSingletonPredicate"""
1566  return _IMP_core._object_cast_to_AttributeSingletonPredicate(o)
1567 
1568 _object_types.append("InBoundingBox3DSingletonPredicate")
1569 
1570 
1571 def _object_cast_to_InBoundingBox3DSingletonPredicate(o):
1572  r"""_object_cast_to_InBoundingBox3DSingletonPredicate(Object o) -> InBoundingBox3DSingletonPredicate"""
1573  return _IMP_core._object_cast_to_InBoundingBox3DSingletonPredicate(o)
1574 
1575 _object_types.append("IsCollisionPairPredicate")
1576 
1577 
1578 def _object_cast_to_IsCollisionPairPredicate(o):
1579  r"""_object_cast_to_IsCollisionPairPredicate(Object o) -> IsCollisionPairPredicate"""
1580  return _IMP_core._object_cast_to_IsCollisionPairPredicate(o)
1581 
1582 BinormalTermList=list
1583 _plural_types.append("BinormalTermList")
1584 _value_types.append("BinormalTerm")
1585 
1586 
1587 _object_types.append("MultipleBinormalRestraint")
1588 
1589 
1590 def _object_cast_to_MultipleBinormalRestraint(o):
1591  r"""_object_cast_to_MultipleBinormalRestraint(Object o) -> MultipleBinormalRestraint"""
1592  return _IMP_core._object_cast_to_MultipleBinormalRestraint(o)
1593 class ClosePairsFinder(IMP._ParticleInputs, IMP.Object):
1594  r"""Proxy of C++ IMP::core::ClosePairsFinder class."""
1595 
1596  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1597 
1598  def __init__(self, *args, **kwargs):
1599  raise AttributeError("No constructor defined - class is abstract")
1600  __swig_destroy__ = _IMP_core.delete_ClosePairsFinder
1601 
1602  def get_close_pairs(self, *args):
1603  r"""
1604  get_close_pairs(ClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
1605  get_close_pairs(ClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
1606  get_close_pairs(ClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
1607  get_close_pairs(ClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
1608  """
1609  return _IMP_core.ClosePairsFinder_get_close_pairs(self, *args)
1610 
1611  def set_distance(self, d):
1612  r"""set_distance(ClosePairsFinder self, double d)"""
1613  return _IMP_core.ClosePairsFinder_set_distance(self, d)
1614 
1615  def get_distance(self):
1616  r"""get_distance(ClosePairsFinder self) -> double"""
1617  return _IMP_core.ClosePairsFinder_get_distance(self)
1618  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)
1619  def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
1620  def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
1621  pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
1622 
1623  def remove_pair_filter(self, d):
1624  r"""remove_pair_filter(ClosePairsFinder self, PairPredicate d)"""
1625  return _IMP_core.ClosePairsFinder_remove_pair_filter(self, d)
1626 
1627  def _python_index_pair_filter(self, d, start, stop):
1628  r"""_python_index_pair_filter(ClosePairsFinder self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
1629  return _IMP_core.ClosePairsFinder__python_index_pair_filter(self, d, start, stop)
1630 
1631  def remove_pair_filters(self, d):
1632  r"""remove_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & d)"""
1633  return _IMP_core.ClosePairsFinder_remove_pair_filters(self, d)
1634 
1635  def set_pair_filters(self, ps):
1636  r"""set_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & ps)"""
1637  return _IMP_core.ClosePairsFinder_set_pair_filters(self, ps)
1638 
1639  def set_pair_filters_order(self, objs):
1640  r"""set_pair_filters_order(ClosePairsFinder self, IMP::PairPredicates const & objs)"""
1641  return _IMP_core.ClosePairsFinder_set_pair_filters_order(self, objs)
1642 
1643  def add_pair_filter(self, obj):
1644  r"""add_pair_filter(ClosePairsFinder self, PairPredicate obj) -> unsigned int"""
1645  return _IMP_core.ClosePairsFinder_add_pair_filter(self, obj)
1646 
1647  def add_pair_filters(self, objs):
1648  r"""add_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & objs)"""
1649  return _IMP_core.ClosePairsFinder_add_pair_filters(self, objs)
1650 
1651  def clear_pair_filters(self):
1652  r"""clear_pair_filters(ClosePairsFinder self)"""
1653  return _IMP_core.ClosePairsFinder_clear_pair_filters(self)
1654 
1655  def get_number_of_pair_filters(self):
1656  r"""get_number_of_pair_filters(ClosePairsFinder self) -> unsigned int"""
1657  return _IMP_core.ClosePairsFinder_get_number_of_pair_filters(self)
1658 
1659  def get_has_pair_filters(self):
1660  r"""get_has_pair_filters(ClosePairsFinder self) -> bool"""
1661  return _IMP_core.ClosePairsFinder_get_has_pair_filters(self)
1662 
1663  def get_pair_filter(self, i):
1664  r"""get_pair_filter(ClosePairsFinder self, unsigned int i) -> PairPredicate"""
1665  return _IMP_core.ClosePairsFinder_get_pair_filter(self, i)
1666 
1667  def get_pair_filters(self):
1668  r"""get_pair_filters(ClosePairsFinder self) -> IMP::PairPredicates"""
1669  return _IMP_core.ClosePairsFinder_get_pair_filters(self)
1670 
1671  def erase_pair_filter(self, i):
1672  r"""erase_pair_filter(ClosePairsFinder self, unsigned int i)"""
1673  return _IMP_core.ClosePairsFinder_erase_pair_filter(self, i)
1674 
1675  def reserve_pair_filters(self, sz):
1676  r"""reserve_pair_filters(ClosePairsFinder self, unsigned int sz)"""
1677  return _IMP_core.ClosePairsFinder_reserve_pair_filters(self, sz)
1678 
1679  def __str__(self):
1680  r"""__str__(ClosePairsFinder self) -> std::string"""
1681  return _IMP_core.ClosePairsFinder___str__(self)
1682 
1683  def __repr__(self):
1684  r"""__repr__(ClosePairsFinder self) -> std::string"""
1685  return _IMP_core.ClosePairsFinder___repr__(self)
1686 
1687  @staticmethod
1688  def get_from(o):
1689  return _object_cast_to_ClosePairsFinder(o)
1690 
1691 
1692 # Register ClosePairsFinder in _IMP_core:
1693 _IMP_core.ClosePairsFinder_swigregister(ClosePairsFinder)
1694 class MonteCarloMoverResult(IMP._Value):
1695  r"""Proxy of C++ IMP::core::MonteCarloMoverResult class."""
1696 
1697  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1698 
1699  def __init__(self, *args):
1700  r"""__init__(MonteCarloMoverResult self, IMP::ParticleIndexes i0=IMP::ParticleIndexes(), double i1=double()) -> MonteCarloMoverResult"""
1701  _IMP_core.MonteCarloMoverResult_swiginit(self, _IMP_core.new_MonteCarloMoverResult(*args))
1702 
1703  def __hash__(self):
1704  r"""__hash__(MonteCarloMoverResult self) -> std::size_t"""
1705  return _IMP_core.MonteCarloMoverResult___hash__(self)
1706 
1707  def show(self, *args):
1708  r"""show(MonteCarloMoverResult self, _ostream out=std::cout)"""
1709  return _IMP_core.MonteCarloMoverResult_show(self, *args)
1710 
1711  def __cmp__(self, o):
1712  r"""__cmp__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> int"""
1713  return _IMP_core.MonteCarloMoverResult___cmp__(self, o)
1714 
1715  def __eq__(self, o):
1716  r"""__eq__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1717  return _IMP_core.MonteCarloMoverResult___eq__(self, o)
1718 
1719  def __ne__(self, o):
1720  r"""__ne__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1721  return _IMP_core.MonteCarloMoverResult___ne__(self, o)
1722 
1723  def __lt__(self, o):
1724  r"""__lt__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1725  return _IMP_core.MonteCarloMoverResult___lt__(self, o)
1726 
1727  def __gt__(self, o):
1728  r"""__gt__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1729  return _IMP_core.MonteCarloMoverResult___gt__(self, o)
1730 
1731  def __ge__(self, o):
1732  r"""__ge__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1733  return _IMP_core.MonteCarloMoverResult___ge__(self, o)
1734 
1735  def __le__(self, o):
1736  r"""__le__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1737  return _IMP_core.MonteCarloMoverResult___le__(self, o)
1738 
1739  def get_moved_particles(self):
1740  r"""get_moved_particles(MonteCarloMoverResult self) -> IMP::ParticleIndexes const &"""
1741  return _IMP_core.MonteCarloMoverResult_get_moved_particles(self)
1742 
1743  def set_moved_particles(self, v):
1744  r"""set_moved_particles(MonteCarloMoverResult self, IMP::ParticleIndexes const & v)"""
1745  return _IMP_core.MonteCarloMoverResult_set_moved_particles(self, v)
1746 
1747  def get_proposal_ratio(self):
1748  r"""get_proposal_ratio(MonteCarloMoverResult self) -> double const &"""
1749  return _IMP_core.MonteCarloMoverResult_get_proposal_ratio(self)
1750 
1751  def set_proposal_ratio(self, v):
1752  r"""set_proposal_ratio(MonteCarloMoverResult self, double const & v)"""
1753  return _IMP_core.MonteCarloMoverResult_set_proposal_ratio(self, v)
1754 
1755  def __str__(self):
1756  r"""__str__(MonteCarloMoverResult self) -> std::string"""
1757  return _IMP_core.MonteCarloMoverResult___str__(self)
1758 
1759  def __repr__(self):
1760  r"""__repr__(MonteCarloMoverResult self) -> std::string"""
1761  return _IMP_core.MonteCarloMoverResult___repr__(self)
1762  __swig_destroy__ = _IMP_core.delete_MonteCarloMoverResult
1763 
1764 # Register MonteCarloMoverResult in _IMP_core:
1765 _IMP_core.MonteCarloMoverResult_swigregister(MonteCarloMoverResult)
1766 class MonteCarloMover(IMP.ModelObject):
1767  r"""Proxy of C++ IMP::core::MonteCarloMover class."""
1768 
1769  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1770 
1771  def __init__(self, *args):
1772  r"""
1773  __init__(MonteCarloMover self, Model m, std::string name) -> MonteCarloMover
1774  __init__(MonteCarloMover self) -> MonteCarloMover
1775  """
1776  if self.__class__ == MonteCarloMover:
1777  _self = None
1778  else:
1779  _self = self
1780  _IMP_core.MonteCarloMover_swiginit(self, _IMP_core.new_MonteCarloMover(_self, *args))
1781 
1782  if self.__class__ != MonteCarloMover:
1783  _director_objects.register(self)
1784 
1785 
1786 
1787 
1788  def propose(self):
1789  r"""propose(MonteCarloMover self) -> MonteCarloMoverResult"""
1790  return _IMP_core.MonteCarloMover_propose(self)
1791 
1792  def reject(self):
1793  r"""reject(MonteCarloMover self)"""
1794  return _IMP_core.MonteCarloMover_reject(self)
1795 
1796  def accept(self):
1797  r"""accept(MonteCarloMover self)"""
1798  return _IMP_core.MonteCarloMover_accept(self)
1799 
1800  def get_number_of_proposed(self):
1801  r"""get_number_of_proposed(MonteCarloMover self) -> unsigned int"""
1802  return _IMP_core.MonteCarloMover_get_number_of_proposed(self)
1803 
1804  def get_number_of_accepted(self):
1805  r"""get_number_of_accepted(MonteCarloMover self) -> unsigned int"""
1806  return _IMP_core.MonteCarloMover_get_number_of_accepted(self)
1807 
1808  def reset_statistics(self):
1809  r"""reset_statistics(MonteCarloMover self)"""
1810  return _IMP_core.MonteCarloMover_reset_statistics(self)
1811 
1812  def add_to_statistics(self, num_proposed, num_rejected):
1813  r"""add_to_statistics(MonteCarloMover self, unsigned int num_proposed, unsigned int num_rejected)"""
1814  return _IMP_core.MonteCarloMover_add_to_statistics(self, num_proposed, num_rejected)
1815 
1816  def do_propose(self):
1817  r"""do_propose(MonteCarloMover self) -> MonteCarloMoverResult"""
1818  return _IMP_core.MonteCarloMover_do_propose(self)
1819 
1820  def do_reject(self):
1821  r"""do_reject(MonteCarloMover self)"""
1822  return _IMP_core.MonteCarloMover_do_reject(self)
1823 
1824  def do_accept(self):
1825  r"""do_accept(MonteCarloMover self)"""
1826  return _IMP_core.MonteCarloMover_do_accept(self)
1827 
1828  def do_get_outputs(self):
1829  r"""do_get_outputs(MonteCarloMover self) -> IMP::ModelObjectsTemp"""
1830  return _IMP_core.MonteCarloMover_do_get_outputs(self)
1831 
1832  def __str__(self):
1833  r"""__str__(MonteCarloMover self) -> std::string"""
1834  return _IMP_core.MonteCarloMover___str__(self)
1835 
1836  def __repr__(self):
1837  r"""__repr__(MonteCarloMover self) -> std::string"""
1838  return _IMP_core.MonteCarloMover___repr__(self)
1839 
1840  @staticmethod
1841  def get_from(o):
1842  return _object_cast_to_MonteCarloMover(o)
1843 
1844 
1845  def do_show(self, out):
1846  pass
1847 
1848  @staticmethod
1849  def get_from(o):
1850  return _object_cast_to_MonteCarloMover(o)
1851 
1852 
1853  def _get_jax(self, space):
1854  """Return a JAX implementation of this mover.
1855  Implement this method in a MonteCarloMover subclass to provide
1856  equivalent functionality using [JAX](https://docs.jax.dev/).
1857  See _wrap_jax for more information.
1858 
1859  @param space The space in which the mover operates
1860  (e.g. a periodic box). See IMP._jax_util.Space.
1861  """
1862  raise NotImplementedError(f"No JAX implementation for {self}")
1863 
1864  def _wrap_jax(self, init_func, propose_func, accept_func=None,
1865  sync_func=None, reset_stats_func=None, keys=None):
1866  """Create the return value for _get_jax.
1867  Use this method in _get_jax() to wrap the JAX functions
1868  with other mover-specific information.
1869 
1870  @param init_func a JAX function which is used to initialize this
1871  mover. It is called with a single argument, a fresh JAX
1872  random key, and should return a persistent state object.
1873  This object may be the key itself, or any other Python object
1874  that JAX understands.
1875  @param propose_func a JAX function which is called with the current
1876  JAX Model and the mover's persistent state object.
1877  It should return a new JAX Model with the move applied,
1878  a new persistent state, and the proposal ratio. If the move
1879  is rejected then the new JAX Model will be discarded.
1880  However, the mover's persistent state is updated for both
1881  accepted and rejected moves.
1882  @param accept_func if provided, a JAX function which is called
1883  after each accepted Monte Carlo move, with the persistent
1884  state object. It should return a new persistent state.
1885  @param sync_func If provided, a Python function which is called
1886  at the end of a Monte Carlo sampling run to sync mover
1887  data back to IMP. It is called with the persistent state
1888  and the IMP Mover object.
1889  @param reset_stats_func If provided, a JAX function which is called
1890  at the beginning of a Monte Carlo run to reset this mover's
1891  statistics. It is called with the persistent state object and
1892  should return a new state.
1893  @param keys If given, a set of IMP::Key objects describing Model
1894  attributes (other than xyz and radius) that are altered
1895  by this mover.
1896  """
1897  from IMP.core._jax_util import JAXMoverInfo
1898  return JAXMoverInfo(init_func, propose_func, accept_func, sync_func,
1899  reset_stats_func, keys)
1900 
1901  __swig_destroy__ = _IMP_core.delete_MonteCarloMover
1902  def __disown__(self):
1903  self.this.disown()
1904  _IMP_core.disown_MonteCarloMover(self)
1905  return weakref.proxy(self)
1906 
1907  def do_destroy(self):
1908  r"""do_destroy(MonteCarloMover self)"""
1909  return _IMP_core.MonteCarloMover_do_destroy(self)
1910 
1911  def handle_set_has_required_score_states(self, arg0):
1912  r"""handle_set_has_required_score_states(MonteCarloMover self, bool arg0)"""
1913  return _IMP_core.MonteCarloMover_handle_set_has_required_score_states(self, arg0)
1914 
1915  def do_get_inputs(self):
1916  r"""do_get_inputs(MonteCarloMover self) -> IMP::ModelObjectsTemp"""
1917  return _IMP_core.MonteCarloMover_do_get_inputs(self)
1918 
1919  def do_get_interactions(self):
1920  r"""do_get_interactions(MonteCarloMover self) -> IMP::ModelObjectsTemps"""
1921  return _IMP_core.MonteCarloMover_do_get_interactions(self)
1922 
1923 # Register MonteCarloMover in _IMP_core:
1924 _IMP_core.MonteCarloMover_swigregister(MonteCarloMover)
1925 class XYZ(IMP.Decorator):
1926  r"""Proxy of C++ IMP::core::XYZ class."""
1927 
1928  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1929 
1930  @staticmethod
1931  def get_coordinate_key(i):
1932  r"""get_coordinate_key(unsigned int i) -> FloatKey"""
1933  return _IMP_core.XYZ_get_coordinate_key(i)
1934 
1935  def __init__(self, *args):
1936  r"""
1937  __init__(XYZ self) -> XYZ
1938  __init__(XYZ self, Model m, ParticleIndex id) -> XYZ
1939  __init__(XYZ self, _ParticleAdaptor d) -> XYZ
1940  """
1941  _IMP_core.XYZ_swiginit(self, _IMP_core.new_XYZ(*args))
1942 
1943  def show(self, *args):
1944  r"""show(XYZ self, _ostream out=std::cout)"""
1945  return _IMP_core.XYZ_show(self, *args)
1946 
1947  @staticmethod
1948  def setup_particle(*args):
1949  r"""
1950  setup_particle(Model m, ParticleIndex pi) -> XYZ
1951  setup_particle(_ParticleAdaptor pa) -> XYZ
1952  setup_particle(Model m, ParticleIndex pi, Vector3D v) -> XYZ
1953  setup_particle(_ParticleAdaptor pa, Vector3D v) -> XYZ
1954  """
1955  return _IMP_core.XYZ_setup_particle(*args)
1956 
1957  def get_x(self):
1958  r"""get_x(XYZ self) -> IMP::Float"""
1959  return _IMP_core.XYZ_get_x(self)
1960 
1961  def set_x(self, t):
1962  r"""set_x(XYZ self, IMP::Float t)"""
1963  return _IMP_core.XYZ_set_x(self, t)
1964 
1965  def get_y(self):
1966  r"""get_y(XYZ self) -> IMP::Float"""
1967  return _IMP_core.XYZ_get_y(self)
1968 
1969  def set_y(self, t):
1970  r"""set_y(XYZ self, IMP::Float t)"""
1971  return _IMP_core.XYZ_set_y(self, t)
1972 
1973  def get_z(self):
1974  r"""get_z(XYZ self) -> IMP::Float"""
1975  return _IMP_core.XYZ_get_z(self)
1976 
1977  def set_z(self, t):
1978  r"""set_z(XYZ self, IMP::Float t)"""
1979  return _IMP_core.XYZ_set_z(self, t)
1980 
1981  def set_coordinate(self, i, v):
1982  r"""set_coordinate(XYZ self, unsigned int i, IMP::Float v)"""
1983  return _IMP_core.XYZ_set_coordinate(self, i, v)
1984 
1985  def set_coordinates(self, v):
1986  r"""set_coordinates(XYZ self, Vector3D v)"""
1987  return _IMP_core.XYZ_set_coordinates(self, v)
1988 
1989  def get_coordinate(self, i):
1990  r"""get_coordinate(XYZ self, int i) -> IMP::Float"""
1991  return _IMP_core.XYZ_get_coordinate(self, i)
1992 
1993  def add_to_derivatives(self, v, d):
1994  r"""add_to_derivatives(XYZ self, Vector3D v, DerivativeAccumulator d)"""
1995  return _IMP_core.XYZ_add_to_derivatives(self, v, d)
1996 
1997  def get_coordinates_are_optimized(self):
1998  r"""get_coordinates_are_optimized(XYZ self) -> bool"""
1999  return _IMP_core.XYZ_get_coordinates_are_optimized(self)
2000 
2001  def set_coordinates_are_optimized(self, tf):
2002  r"""set_coordinates_are_optimized(XYZ self, bool tf)"""
2003  return _IMP_core.XYZ_set_coordinates_are_optimized(self, tf)
2004 
2005  def get_vector_to(self, b):
2006  r"""get_vector_to(XYZ self, XYZ b) -> Vector3D"""
2007  return _IMP_core.XYZ_get_vector_to(self, b)
2008 
2009  def get_coordinates(self):
2010  r"""get_coordinates(XYZ self) -> Vector3D"""
2011  return _IMP_core.XYZ_get_coordinates(self)
2012 
2013  def get_derivatives(self):
2014  r"""get_derivatives(XYZ self) -> Vector3D"""
2015  return _IMP_core.XYZ_get_derivatives(self)
2016 
2017  @staticmethod
2018  def get_is_setup(*args):
2019  r"""
2020  get_is_setup(_ParticleAdaptor p) -> bool
2021  get_is_setup(Model m, ParticleIndex pi) -> bool
2022  """
2023  return _IMP_core.XYZ_get_is_setup(*args)
2024 
2025  @staticmethod
2026  def get_xyz_keys():
2027  r"""get_xyz_keys() -> IMP::FloatKeys const &"""
2028  return _IMP_core.XYZ_get_xyz_keys()
2029 
2030  def add_attribute(self, *args):
2031  r"""
2032  add_attribute(XYZ self, FloatKey k, IMP::Float v, bool opt)
2033  add_attribute(XYZ self, FloatKey a0, IMP::Float a1)
2034  add_attribute(XYZ self, IntKey a0, IMP::Int a1)
2035  add_attribute(XYZ self, FloatsKey a0, IMP::Floats a1)
2036  add_attribute(XYZ self, IntsKey a0, IMP::Ints a1)
2037  add_attribute(XYZ self, StringKey a0, IMP::String a1)
2038  add_attribute(XYZ self, ParticleIndexKey a0, Particle a1)
2039  add_attribute(XYZ self, ObjectKey a0, Object a1)
2040  add_attribute(XYZ self, SparseFloatKey a0, IMP::Float a1)
2041  add_attribute(XYZ self, SparseIntKey a0, IMP::Int a1)
2042  add_attribute(XYZ self, SparseStringKey a0, IMP::String a1)
2043  add_attribute(XYZ self, SparseParticleIndexKey a0, ParticleIndex a1)
2044  """
2045  return _IMP_core.XYZ_add_attribute(self, *args)
2046 
2047  def get_value(self, *args):
2048  r"""
2049  get_value(XYZ self, FloatKey a0) -> IMP::Float
2050  get_value(XYZ self, IntKey a0) -> IMP::Int
2051  get_value(XYZ self, FloatsKey a0) -> IMP::Floats
2052  get_value(XYZ self, IntsKey a0) -> IMP::Ints
2053  get_value(XYZ self, StringKey a0) -> IMP::String
2054  get_value(XYZ self, ParticleIndexKey a0) -> Particle
2055  get_value(XYZ self, ObjectKey a0) -> Object
2056  get_value(XYZ self, SparseFloatKey a0) -> IMP::Float
2057  get_value(XYZ self, SparseIntKey a0) -> IMP::Int
2058  get_value(XYZ self, SparseStringKey a0) -> IMP::String
2059  get_value(XYZ self, SparseParticleIndexKey a0) -> ParticleIndex
2060  """
2061  return _IMP_core.XYZ_get_value(self, *args)
2062 
2063  def set_value(self, *args):
2064  r"""
2065  set_value(XYZ self, FloatKey a0, IMP::Float a1)
2066  set_value(XYZ self, IntKey a0, IMP::Int a1)
2067  set_value(XYZ self, FloatsKey a0, IMP::Floats a1)
2068  set_value(XYZ self, IntsKey a0, IMP::Ints a1)
2069  set_value(XYZ self, StringKey a0, IMP::String a1)
2070  set_value(XYZ self, ParticleIndexKey a0, Particle a1)
2071  set_value(XYZ self, ObjectKey a0, Object a1)
2072  set_value(XYZ self, SparseFloatKey a0, IMP::Float a1)
2073  set_value(XYZ self, SparseIntKey a0, IMP::Int a1)
2074  set_value(XYZ self, SparseStringKey a0, IMP::String a1)
2075  set_value(XYZ self, SparseParticleIndexKey a0, ParticleIndex a1)
2076  """
2077  return _IMP_core.XYZ_set_value(self, *args)
2078 
2079  def remove_attribute(self, *args):
2080  r"""
2081  remove_attribute(XYZ self, FloatKey a0)
2082  remove_attribute(XYZ self, IntKey a0)
2083  remove_attribute(XYZ self, FloatsKey a0)
2084  remove_attribute(XYZ self, IntsKey a0)
2085  remove_attribute(XYZ self, StringKey a0)
2086  remove_attribute(XYZ self, ParticleIndexKey a0)
2087  remove_attribute(XYZ self, ObjectKey a0)
2088  remove_attribute(XYZ self, SparseFloatKey a0)
2089  remove_attribute(XYZ self, SparseIntKey a0)
2090  remove_attribute(XYZ self, SparseStringKey a0)
2091  remove_attribute(XYZ self, SparseParticleIndexKey a0)
2092  """
2093  return _IMP_core.XYZ_remove_attribute(self, *args)
2094 
2095  def has_attribute(self, *args):
2096  r"""
2097  has_attribute(XYZ self, FloatKey a0) -> bool
2098  has_attribute(XYZ self, IntKey a0) -> bool
2099  has_attribute(XYZ self, FloatsKey a0) -> bool
2100  has_attribute(XYZ self, IntsKey a0) -> bool
2101  has_attribute(XYZ self, StringKey a0) -> bool
2102  has_attribute(XYZ self, ParticleIndexKey a0) -> bool
2103  has_attribute(XYZ self, ObjectKey a0) -> bool
2104  has_attribute(XYZ self, SparseFloatKey a0) -> bool
2105  has_attribute(XYZ self, SparseIntKey a0) -> bool
2106  has_attribute(XYZ self, SparseStringKey a0) -> bool
2107  has_attribute(XYZ self, SparseParticleIndexKey a0) -> bool
2108  """
2109  return _IMP_core.XYZ_has_attribute(self, *args)
2110 
2111  def get_derivative(self, *args):
2112  r"""
2113  get_derivative(XYZ self, int i) -> IMP::Float
2114  get_derivative(XYZ self, FloatKey a0) -> double
2115  """
2116  return _IMP_core.XYZ_get_derivative(self, *args)
2117 
2118  def get_name(self):
2119  r"""get_name(XYZ self) -> std::string"""
2120  return _IMP_core.XYZ_get_name(self)
2121 
2122  def clear_caches(self):
2123  r"""clear_caches(XYZ self)"""
2124  return _IMP_core.XYZ_clear_caches(self)
2125 
2126  def set_name(self, a0):
2127  r"""set_name(XYZ self, std::string a0)"""
2128  return _IMP_core.XYZ_set_name(self, a0)
2129 
2130  def set_check_level(self, a0):
2131  r"""set_check_level(XYZ self, IMP::CheckLevel a0)"""
2132  return _IMP_core.XYZ_set_check_level(self, a0)
2133 
2134  def add_to_derivative(self, *args):
2135  r"""
2136  add_to_derivative(XYZ self, int i, IMP::Float v, DerivativeAccumulator d)
2137  add_to_derivative(XYZ self, FloatKey a0, double a1, DerivativeAccumulator a2)
2138  """
2139  return _IMP_core.XYZ_add_to_derivative(self, *args)
2140 
2141  def set_is_optimized(self, a0, a1):
2142  r"""set_is_optimized(XYZ self, FloatKey a0, bool a1)"""
2143  return _IMP_core.XYZ_set_is_optimized(self, a0, a1)
2144 
2145  def get_is_optimized(self, a0):
2146  r"""get_is_optimized(XYZ self, FloatKey a0) -> bool"""
2147  return _IMP_core.XYZ_get_is_optimized(self, a0)
2148 
2149  def get_check_level(self):
2150  r"""get_check_level(XYZ self) -> IMP::CheckLevel"""
2151  return _IMP_core.XYZ_get_check_level(self)
2152 
2153  def __eq__(self, *args):
2154  r"""
2155  __eq__(XYZ self, XYZ o) -> bool
2156  __eq__(XYZ self, Particle d) -> bool
2157  """
2158  return _IMP_core.XYZ___eq__(self, *args)
2159 
2160  def __ne__(self, *args):
2161  r"""
2162  __ne__(XYZ self, XYZ o) -> bool
2163  __ne__(XYZ self, Particle d) -> bool
2164  """
2165  return _IMP_core.XYZ___ne__(self, *args)
2166 
2167  def __le__(self, *args):
2168  r"""
2169  __le__(XYZ self, XYZ o) -> bool
2170  __le__(XYZ self, Particle d) -> bool
2171  """
2172  return _IMP_core.XYZ___le__(self, *args)
2173 
2174  def __lt__(self, *args):
2175  r"""
2176  __lt__(XYZ self, XYZ o) -> bool
2177  __lt__(XYZ self, Particle d) -> bool
2178  """
2179  return _IMP_core.XYZ___lt__(self, *args)
2180 
2181  def __ge__(self, *args):
2182  r"""
2183  __ge__(XYZ self, XYZ o) -> bool
2184  __ge__(XYZ self, Particle d) -> bool
2185  """
2186  return _IMP_core.XYZ___ge__(self, *args)
2187 
2188  def __gt__(self, *args):
2189  r"""
2190  __gt__(XYZ self, XYZ o) -> bool
2191  __gt__(XYZ self, Particle d) -> bool
2192  """
2193  return _IMP_core.XYZ___gt__(self, *args)
2194 
2195  def __hash__(self):
2196  r"""__hash__(XYZ self) -> std::size_t"""
2197  return _IMP_core.XYZ___hash__(self)
2198 
2199  def __str__(self):
2200  r"""__str__(XYZ self) -> std::string"""
2201  return _IMP_core.XYZ___str__(self)
2202 
2203  def __repr__(self):
2204  r"""__repr__(XYZ self) -> std::string"""
2205  return _IMP_core.XYZ___repr__(self)
2206 
2207  def _get_as_binary(self):
2208  r"""_get_as_binary(XYZ self) -> PyObject *"""
2209  return _IMP_core.XYZ__get_as_binary(self)
2210 
2211  def _set_from_binary(self, p):
2212  r"""_set_from_binary(XYZ self, PyObject * p)"""
2213  return _IMP_core.XYZ__set_from_binary(self, p)
2214 
2215  def __getstate__(self):
2216  p = self._get_as_binary()
2217  if len(self.__dict__) > 1:
2218  d = self.__dict__.copy()
2219  del d['this']
2220  p = (d, p)
2221  return p
2222 
2223  def __setstate__(self, p):
2224  if not hasattr(self, 'this'):
2225  self.__init__()
2226  if isinstance(p, tuple):
2227  d, p = p
2228  self.__dict__.update(d)
2229  return self._set_from_binary(p)
2230 
2231  __swig_destroy__ = _IMP_core.delete_XYZ
2232 
2233 # Register XYZ in _IMP_core:
2234 _IMP_core.XYZ_swigregister(XYZ)
2235 
2236 def set_vector_geometry(d, v):
2237  r"""set_vector_geometry(XYZ d, Vector3D v)"""
2238  return _IMP_core.set_vector_geometry(d, v)
2239 
2240 def get_vector_geometry(d):
2241  r"""get_vector_geometry(XYZ d) -> Vector3D"""
2242  return _IMP_core.get_vector_geometry(d)
2243 
2244 def get_dihedral(a, b, c, d):
2245  r"""get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d) -> double"""
2246  return _IMP_core.get_dihedral(a, b, c, d)
2247 class XYZR(XYZ):
2248  r"""Proxy of C++ IMP::core::XYZR class."""
2249 
2250  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2251 
2252  def __init__(self, *args):
2253  r"""
2254  __init__(XYZR self) -> XYZR
2255  __init__(XYZR self, Model m, ParticleIndex id) -> XYZR
2256  __init__(XYZR self, _ParticleAdaptor d) -> XYZR
2257  """
2258  _IMP_core.XYZR_swiginit(self, _IMP_core.new_XYZR(*args))
2259 
2260  def show(self, *args):
2261  r"""show(XYZR self, _ostream out=std::cout)"""
2262  return _IMP_core.XYZR_show(self, *args)
2263 
2264  @staticmethod
2265  def setup_particle(*args):
2266  r"""
2267  setup_particle(Model m, ParticleIndex pi) -> XYZR
2268  setup_particle(_ParticleAdaptor pa) -> XYZR
2269  setup_particle(Model m, ParticleIndex pi, IMP::Float radius) -> XYZR
2270  setup_particle(_ParticleAdaptor pa, IMP::Float radius) -> XYZR
2271  setup_particle(Model m, ParticleIndex pi, Sphere3D ball) -> XYZR
2272  setup_particle(_ParticleAdaptor pa, Sphere3D ball) -> XYZR
2273  """
2274  return _IMP_core.XYZR_setup_particle(*args)
2275 
2276  @staticmethod
2277  def get_is_setup(*args):
2278  r"""
2279  get_is_setup(_ParticleAdaptor p) -> bool
2280  get_is_setup(Model m, ParticleIndex pi) -> bool
2281  """
2282  return _IMP_core.XYZR_get_is_setup(*args)
2283 
2284  def get_radius(self):
2285  r"""get_radius(XYZR self) -> double"""
2286  return _IMP_core.XYZR_get_radius(self)
2287 
2288  def set_radius(self, r):
2289  r"""set_radius(XYZR self, double r)"""
2290  return _IMP_core.XYZR_set_radius(self, r)
2291 
2292  def get_sphere(self):
2293  r"""get_sphere(XYZR self) -> Sphere3D"""
2294  return _IMP_core.XYZR_get_sphere(self)
2295 
2296  def set_sphere(self, s):
2297  r"""set_sphere(XYZR self, Sphere3D s)"""
2298  return _IMP_core.XYZR_set_sphere(self, s)
2299 
2300  @staticmethod
2301  def get_radius_key():
2302  r"""get_radius_key() -> FloatKey"""
2303  return _IMP_core.XYZR_get_radius_key()
2304 
2305  def add_to_radius_derivative(self, v, d):
2306  r"""add_to_radius_derivative(XYZR self, double v, DerivativeAccumulator d)"""
2307  return _IMP_core.XYZR_add_to_radius_derivative(self, v, d)
2308 
2309  def add_attribute(self, *args):
2310  r"""
2311  add_attribute(XYZR self, FloatKey k, IMP::Float v, bool opt)
2312  add_attribute(XYZR self, FloatKey a0, IMP::Float a1)
2313  add_attribute(XYZR self, IntKey a0, IMP::Int a1)
2314  add_attribute(XYZR self, FloatsKey a0, IMP::Floats a1)
2315  add_attribute(XYZR self, IntsKey a0, IMP::Ints a1)
2316  add_attribute(XYZR self, StringKey a0, IMP::String a1)
2317  add_attribute(XYZR self, ParticleIndexKey a0, Particle a1)
2318  add_attribute(XYZR self, ObjectKey a0, Object a1)
2319  add_attribute(XYZR self, SparseFloatKey a0, IMP::Float a1)
2320  add_attribute(XYZR self, SparseIntKey a0, IMP::Int a1)
2321  add_attribute(XYZR self, SparseStringKey a0, IMP::String a1)
2322  add_attribute(XYZR self, SparseParticleIndexKey a0, ParticleIndex a1)
2323  """
2324  return _IMP_core.XYZR_add_attribute(self, *args)
2325 
2326  def get_value(self, *args):
2327  r"""
2328  get_value(XYZR self, FloatKey a0) -> IMP::Float
2329  get_value(XYZR self, IntKey a0) -> IMP::Int
2330  get_value(XYZR self, FloatsKey a0) -> IMP::Floats
2331  get_value(XYZR self, IntsKey a0) -> IMP::Ints
2332  get_value(XYZR self, StringKey a0) -> IMP::String
2333  get_value(XYZR self, ParticleIndexKey a0) -> Particle
2334  get_value(XYZR self, ObjectKey a0) -> Object
2335  get_value(XYZR self, SparseFloatKey a0) -> IMP::Float
2336  get_value(XYZR self, SparseIntKey a0) -> IMP::Int
2337  get_value(XYZR self, SparseStringKey a0) -> IMP::String
2338  get_value(XYZR self, SparseParticleIndexKey a0) -> ParticleIndex
2339  """
2340  return _IMP_core.XYZR_get_value(self, *args)
2341 
2342  def set_value(self, *args):
2343  r"""
2344  set_value(XYZR self, FloatKey a0, IMP::Float a1)
2345  set_value(XYZR self, IntKey a0, IMP::Int a1)
2346  set_value(XYZR self, FloatsKey a0, IMP::Floats a1)
2347  set_value(XYZR self, IntsKey a0, IMP::Ints a1)
2348  set_value(XYZR self, StringKey a0, IMP::String a1)
2349  set_value(XYZR self, ParticleIndexKey a0, Particle a1)
2350  set_value(XYZR self, ObjectKey a0, Object a1)
2351  set_value(XYZR self, SparseFloatKey a0, IMP::Float a1)
2352  set_value(XYZR self, SparseIntKey a0, IMP::Int a1)
2353  set_value(XYZR self, SparseStringKey a0, IMP::String a1)
2354  set_value(XYZR self, SparseParticleIndexKey a0, ParticleIndex a1)
2355  """
2356  return _IMP_core.XYZR_set_value(self, *args)
2357 
2358  def remove_attribute(self, *args):
2359  r"""
2360  remove_attribute(XYZR self, FloatKey a0)
2361  remove_attribute(XYZR self, IntKey a0)
2362  remove_attribute(XYZR self, FloatsKey a0)
2363  remove_attribute(XYZR self, IntsKey a0)
2364  remove_attribute(XYZR self, StringKey a0)
2365  remove_attribute(XYZR self, ParticleIndexKey a0)
2366  remove_attribute(XYZR self, ObjectKey a0)
2367  remove_attribute(XYZR self, SparseFloatKey a0)
2368  remove_attribute(XYZR self, SparseIntKey a0)
2369  remove_attribute(XYZR self, SparseStringKey a0)
2370  remove_attribute(XYZR self, SparseParticleIndexKey a0)
2371  """
2372  return _IMP_core.XYZR_remove_attribute(self, *args)
2373 
2374  def has_attribute(self, *args):
2375  r"""
2376  has_attribute(XYZR self, FloatKey a0) -> bool
2377  has_attribute(XYZR self, IntKey a0) -> bool
2378  has_attribute(XYZR self, FloatsKey a0) -> bool
2379  has_attribute(XYZR self, IntsKey a0) -> bool
2380  has_attribute(XYZR self, StringKey a0) -> bool
2381  has_attribute(XYZR self, ParticleIndexKey a0) -> bool
2382  has_attribute(XYZR self, ObjectKey a0) -> bool
2383  has_attribute(XYZR self, SparseFloatKey a0) -> bool
2384  has_attribute(XYZR self, SparseIntKey a0) -> bool
2385  has_attribute(XYZR self, SparseStringKey a0) -> bool
2386  has_attribute(XYZR self, SparseParticleIndexKey a0) -> bool
2387  """
2388  return _IMP_core.XYZR_has_attribute(self, *args)
2389 
2390  def get_derivative(self, a0):
2391  r"""get_derivative(XYZR self, FloatKey a0) -> double"""
2392  return _IMP_core.XYZR_get_derivative(self, a0)
2393 
2394  def get_name(self):
2395  r"""get_name(XYZR self) -> std::string"""
2396  return _IMP_core.XYZR_get_name(self)
2397 
2398  def clear_caches(self):
2399  r"""clear_caches(XYZR self)"""
2400  return _IMP_core.XYZR_clear_caches(self)
2401 
2402  def set_name(self, a0):
2403  r"""set_name(XYZR self, std::string a0)"""
2404  return _IMP_core.XYZR_set_name(self, a0)
2405 
2406  def set_check_level(self, a0):
2407  r"""set_check_level(XYZR self, IMP::CheckLevel a0)"""
2408  return _IMP_core.XYZR_set_check_level(self, a0)
2409 
2410  def add_to_derivative(self, a0, a1, a2):
2411  r"""add_to_derivative(XYZR self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2412  return _IMP_core.XYZR_add_to_derivative(self, a0, a1, a2)
2413 
2414  def set_is_optimized(self, a0, a1):
2415  r"""set_is_optimized(XYZR self, FloatKey a0, bool a1)"""
2416  return _IMP_core.XYZR_set_is_optimized(self, a0, a1)
2417 
2418  def get_is_optimized(self, a0):
2419  r"""get_is_optimized(XYZR self, FloatKey a0) -> bool"""
2420  return _IMP_core.XYZR_get_is_optimized(self, a0)
2421 
2422  def get_check_level(self):
2423  r"""get_check_level(XYZR self) -> IMP::CheckLevel"""
2424  return _IMP_core.XYZR_get_check_level(self)
2425 
2426  def __eq__(self, *args):
2427  r"""
2428  __eq__(XYZR self, XYZR o) -> bool
2429  __eq__(XYZR self, Particle d) -> bool
2430  """
2431  return _IMP_core.XYZR___eq__(self, *args)
2432 
2433  def __ne__(self, *args):
2434  r"""
2435  __ne__(XYZR self, XYZR o) -> bool
2436  __ne__(XYZR self, Particle d) -> bool
2437  """
2438  return _IMP_core.XYZR___ne__(self, *args)
2439 
2440  def __le__(self, *args):
2441  r"""
2442  __le__(XYZR self, XYZR o) -> bool
2443  __le__(XYZR self, Particle d) -> bool
2444  """
2445  return _IMP_core.XYZR___le__(self, *args)
2446 
2447  def __lt__(self, *args):
2448  r"""
2449  __lt__(XYZR self, XYZR o) -> bool
2450  __lt__(XYZR self, Particle d) -> bool
2451  """
2452  return _IMP_core.XYZR___lt__(self, *args)
2453 
2454  def __ge__(self, *args):
2455  r"""
2456  __ge__(XYZR self, XYZR o) -> bool
2457  __ge__(XYZR self, Particle d) -> bool
2458  """
2459  return _IMP_core.XYZR___ge__(self, *args)
2460 
2461  def __gt__(self, *args):
2462  r"""
2463  __gt__(XYZR self, XYZR o) -> bool
2464  __gt__(XYZR self, Particle d) -> bool
2465  """
2466  return _IMP_core.XYZR___gt__(self, *args)
2467 
2468  def __hash__(self):
2469  r"""__hash__(XYZR self) -> std::size_t"""
2470  return _IMP_core.XYZR___hash__(self)
2471 
2472  def __str__(self):
2473  r"""__str__(XYZR self) -> std::string"""
2474  return _IMP_core.XYZR___str__(self)
2475 
2476  def __repr__(self):
2477  r"""__repr__(XYZR self) -> std::string"""
2478  return _IMP_core.XYZR___repr__(self)
2479 
2480  def _get_as_binary(self):
2481  r"""_get_as_binary(XYZR self) -> PyObject *"""
2482  return _IMP_core.XYZR__get_as_binary(self)
2483 
2484  def _set_from_binary(self, p):
2485  r"""_set_from_binary(XYZR self, PyObject * p)"""
2486  return _IMP_core.XYZR__set_from_binary(self, p)
2487 
2488  def __getstate__(self):
2489  p = self._get_as_binary()
2490  if len(self.__dict__) > 1:
2491  d = self.__dict__.copy()
2492  del d['this']
2493  p = (d, p)
2494  return p
2495 
2496  def __setstate__(self, p):
2497  if not hasattr(self, 'this'):
2498  self.__init__()
2499  if isinstance(p, tuple):
2500  d, p = p
2501  self.__dict__.update(d)
2502  return self._set_from_binary(p)
2503 
2504  __swig_destroy__ = _IMP_core.delete_XYZR
2505 
2506 # Register XYZR in _IMP_core:
2507 _IMP_core.XYZR_swigregister(XYZR)
2508 
2509 def set_enclosing_sphere(b, v, slack=0):
2510  r"""set_enclosing_sphere(XYZR b, IMP::core::XYZs const & v, double slack=0)"""
2511  return _IMP_core.set_enclosing_sphere(b, v, slack)
2512 
2513 def set_enclosing_radius(b, v):
2514  r"""set_enclosing_radius(XYZR b, IMP::core::XYZs const & v)"""
2515  return _IMP_core.set_enclosing_radius(b, v)
2516 
2517 def get_enclosing_sphere(v):
2518  r"""get_enclosing_sphere(IMP::core::XYZs const & v) -> Sphere3D"""
2519  return _IMP_core.get_enclosing_sphere(v)
2520 
2521 def create_xyzr_particles(m, num, radius, box_side=10):
2522  r"""create_xyzr_particles(Model m, unsigned int num, IMP::Float radius, IMP::Float box_side=10) -> IMP::core::XYZRs"""
2523  return _IMP_core.create_xyzr_particles(m, num, radius, box_side)
2524 class XYZRGeometry(IMP.display.SingletonGeometry):
2525  r"""Proxy of C++ IMP::core::XYZRGeometry class."""
2526 
2527  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2528 
2529  def __init__(self, *args):
2530  r"""
2531  __init__(XYZRGeometry self, Particle p) -> XYZRGeometry
2532  __init__(XYZRGeometry self, XYZR d) -> XYZRGeometry
2533  """
2534  _IMP_core.XYZRGeometry_swiginit(self, _IMP_core.new_XYZRGeometry(*args))
2535 
2536  def get_version_info(self):
2537  r"""get_version_info(XYZRGeometry self) -> VersionInfo"""
2538  return _IMP_core.XYZRGeometry_get_version_info(self)
2539  __swig_destroy__ = _IMP_core.delete_XYZRGeometry
2540 
2541  def __str__(self):
2542  r"""__str__(XYZRGeometry self) -> std::string"""
2543  return _IMP_core.XYZRGeometry___str__(self)
2544 
2545  def __repr__(self):
2546  r"""__repr__(XYZRGeometry self) -> std::string"""
2547  return _IMP_core.XYZRGeometry___repr__(self)
2548 
2549  @staticmethod
2550  def get_from(o):
2551  return _object_cast_to_XYZRGeometry(o)
2552 
2553 
2554 # Register XYZRGeometry in _IMP_core:
2555 _IMP_core.XYZRGeometry_swigregister(XYZRGeometry)
2556 class XYZRsGeometry(IMP.display.SingletonsGeometry):
2557  r"""Proxy of C++ IMP::core::XYZRsGeometry class."""
2558 
2559  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2560 
2561  def __init__(self, sc):
2562  r"""__init__(XYZRsGeometry self, SingletonContainer sc) -> XYZRsGeometry"""
2563  _IMP_core.XYZRsGeometry_swiginit(self, _IMP_core.new_XYZRsGeometry(sc))
2564 
2565  def get_version_info(self):
2566  r"""get_version_info(XYZRsGeometry self) -> VersionInfo"""
2567  return _IMP_core.XYZRsGeometry_get_version_info(self)
2568  __swig_destroy__ = _IMP_core.delete_XYZRsGeometry
2569 
2570  def __str__(self):
2571  r"""__str__(XYZRsGeometry self) -> std::string"""
2572  return _IMP_core.XYZRsGeometry___str__(self)
2573 
2574  def __repr__(self):
2575  r"""__repr__(XYZRsGeometry self) -> std::string"""
2576  return _IMP_core.XYZRsGeometry___repr__(self)
2577 
2578  @staticmethod
2579  def get_from(o):
2580  return _object_cast_to_XYZRsGeometry(o)
2581 
2582 
2583 # Register XYZRsGeometry in _IMP_core:
2584 _IMP_core.XYZRsGeometry_swigregister(XYZRsGeometry)
2585 class XYZDerivativeGeometry(IMP.display.SingletonGeometry):
2586  r"""Proxy of C++ IMP::core::XYZDerivativeGeometry class."""
2587 
2588  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2589 
2590  def __init__(self, *args):
2591  r"""
2592  __init__(XYZDerivativeGeometry self, Particle p) -> XYZDerivativeGeometry
2593  __init__(XYZDerivativeGeometry self, XYZ d) -> XYZDerivativeGeometry
2594  """
2595  _IMP_core.XYZDerivativeGeometry_swiginit(self, _IMP_core.new_XYZDerivativeGeometry(*args))
2596 
2597  def get_version_info(self):
2598  r"""get_version_info(XYZDerivativeGeometry self) -> VersionInfo"""
2599  return _IMP_core.XYZDerivativeGeometry_get_version_info(self)
2600  __swig_destroy__ = _IMP_core.delete_XYZDerivativeGeometry
2601 
2602  def __str__(self):
2603  r"""__str__(XYZDerivativeGeometry self) -> std::string"""
2604  return _IMP_core.XYZDerivativeGeometry___str__(self)
2605 
2606  def __repr__(self):
2607  r"""__repr__(XYZDerivativeGeometry self) -> std::string"""
2608  return _IMP_core.XYZDerivativeGeometry___repr__(self)
2609 
2610  @staticmethod
2611  def get_from(o):
2612  return _object_cast_to_XYZDerivativeGeometry(o)
2613 
2614 
2615 # Register XYZDerivativeGeometry in _IMP_core:
2616 _IMP_core.XYZDerivativeGeometry_swigregister(XYZDerivativeGeometry)
2617 class XYZDerivativesGeometry(IMP.display.SingletonsGeometry):
2618  r"""Proxy of C++ IMP::core::XYZDerivativesGeometry class."""
2619 
2620  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2621 
2622  def __init__(self, sc):
2623  r"""__init__(XYZDerivativesGeometry self, SingletonContainer sc) -> XYZDerivativesGeometry"""
2624  _IMP_core.XYZDerivativesGeometry_swiginit(self, _IMP_core.new_XYZDerivativesGeometry(sc))
2625 
2626  def get_version_info(self):
2627  r"""get_version_info(XYZDerivativesGeometry self) -> VersionInfo"""
2628  return _IMP_core.XYZDerivativesGeometry_get_version_info(self)
2629  __swig_destroy__ = _IMP_core.delete_XYZDerivativesGeometry
2630 
2631  def __str__(self):
2632  r"""__str__(XYZDerivativesGeometry self) -> std::string"""
2633  return _IMP_core.XYZDerivativesGeometry___str__(self)
2634 
2635  def __repr__(self):
2636  r"""__repr__(XYZDerivativesGeometry self) -> std::string"""
2637  return _IMP_core.XYZDerivativesGeometry___repr__(self)
2638 
2639  @staticmethod
2640  def get_from(o):
2641  return _object_cast_to_XYZDerivativesGeometry(o)
2642 
2643 
2644 # Register XYZDerivativesGeometry in _IMP_core:
2645 _IMP_core.XYZDerivativesGeometry_swigregister(XYZDerivativesGeometry)
2646 class EdgePairGeometry(IMP.display.PairGeometry):
2647  r"""Proxy of C++ IMP::core::EdgePairGeometry class."""
2648 
2649  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2650 
2651  def __init__(self, pp):
2652  r"""__init__(EdgePairGeometry self, IMP::ParticlePair const & pp) -> EdgePairGeometry"""
2653  _IMP_core.EdgePairGeometry_swiginit(self, _IMP_core.new_EdgePairGeometry(pp))
2654 
2655  def get_version_info(self):
2656  r"""get_version_info(EdgePairGeometry self) -> VersionInfo"""
2657  return _IMP_core.EdgePairGeometry_get_version_info(self)
2658  __swig_destroy__ = _IMP_core.delete_EdgePairGeometry
2659 
2660  def __str__(self):
2661  r"""__str__(EdgePairGeometry self) -> std::string"""
2662  return _IMP_core.EdgePairGeometry___str__(self)
2663 
2664  def __repr__(self):
2665  r"""__repr__(EdgePairGeometry self) -> std::string"""
2666  return _IMP_core.EdgePairGeometry___repr__(self)
2667 
2668  @staticmethod
2669  def get_from(o):
2670  return _object_cast_to_EdgePairGeometry(o)
2671 
2672 
2673 # Register EdgePairGeometry in _IMP_core:
2674 _IMP_core.EdgePairGeometry_swigregister(EdgePairGeometry)
2675 class EdgePairsGeometry(IMP.display.PairsGeometry):
2676  r"""Proxy of C++ IMP::core::EdgePairsGeometry class."""
2677 
2678  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2679 
2680  def __init__(self, sc):
2681  r"""__init__(EdgePairsGeometry self, PairContainer sc) -> EdgePairsGeometry"""
2682  _IMP_core.EdgePairsGeometry_swiginit(self, _IMP_core.new_EdgePairsGeometry(sc))
2683 
2684  def get_version_info(self):
2685  r"""get_version_info(EdgePairsGeometry self) -> VersionInfo"""
2686  return _IMP_core.EdgePairsGeometry_get_version_info(self)
2687  __swig_destroy__ = _IMP_core.delete_EdgePairsGeometry
2688 
2689  def __str__(self):
2690  r"""__str__(EdgePairsGeometry self) -> std::string"""
2691  return _IMP_core.EdgePairsGeometry___str__(self)
2692 
2693  def __repr__(self):
2694  r"""__repr__(EdgePairsGeometry self) -> std::string"""
2695  return _IMP_core.EdgePairsGeometry___repr__(self)
2696 
2697  @staticmethod
2698  def get_from(o):
2699  return _object_cast_to_EdgePairsGeometry(o)
2700 
2701 
2702 # Register EdgePairsGeometry in _IMP_core:
2703 _IMP_core.EdgePairsGeometry_swigregister(EdgePairsGeometry)
2704 class Direction(IMP.Decorator):
2705  r"""Proxy of C++ IMP::core::Direction class."""
2706 
2707  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2708 
2709  @staticmethod
2710  def do_setup_particle(m, pi, v):
2711  r"""do_setup_particle(Model m, ParticleIndex pi, Vector3D v)"""
2712  return _IMP_core.Direction_do_setup_particle(m, pi, v)
2713 
2714  def __init__(self, *args):
2715  r"""
2716  __init__(Direction self) -> Direction
2717  __init__(Direction self, Model m, ParticleIndex id) -> Direction
2718  __init__(Direction self, _ParticleAdaptor d) -> Direction
2719  """
2720  _IMP_core.Direction_swiginit(self, _IMP_core.new_Direction(*args))
2721 
2722  def show(self, *args):
2723  r"""show(Direction self, _ostream out=std::cout)"""
2724  return _IMP_core.Direction_show(self, *args)
2725 
2726  @staticmethod
2727  def setup_particle(*args):
2728  r"""
2729  setup_particle(Model m, ParticleIndex pi, Vector3D v) -> Direction
2730  setup_particle(_ParticleAdaptor pa, Vector3D v) -> Direction
2731  """
2732  return _IMP_core.Direction_setup_particle(*args)
2733 
2734  @staticmethod
2735  def get_is_setup(*args):
2736  r"""
2737  get_is_setup(_ParticleAdaptor p) -> bool
2738  get_is_setup(Model m, ParticleIndex pi) -> bool
2739  """
2740  return _IMP_core.Direction_get_is_setup(*args)
2741 
2742  @staticmethod
2743  def get_direction_key(i):
2744  r"""get_direction_key(unsigned int i) -> FloatKey"""
2745  return _IMP_core.Direction_get_direction_key(i)
2746 
2747  def get_direction_derivative(self, i):
2748  r"""get_direction_derivative(Direction self, int i) -> IMP::Float"""
2749  return _IMP_core.Direction_get_direction_derivative(self, i)
2750 
2751  def get_direction_derivatives(self):
2752  r"""get_direction_derivatives(Direction self) -> Vector3D"""
2753  return _IMP_core.Direction_get_direction_derivatives(self)
2754 
2755  def add_to_direction_derivative(self, i, v, d):
2756  r"""add_to_direction_derivative(Direction self, int i, IMP::Float v, DerivativeAccumulator d)"""
2757  return _IMP_core.Direction_add_to_direction_derivative(self, i, v, d)
2758 
2759  def add_to_direction_derivatives(self, v, d):
2760  r"""add_to_direction_derivatives(Direction self, Vector3D v, DerivativeAccumulator d)"""
2761  return _IMP_core.Direction_add_to_direction_derivatives(self, v, d)
2762 
2763  def get_direction_is_optimized(self):
2764  r"""get_direction_is_optimized(Direction self) -> bool"""
2765  return _IMP_core.Direction_get_direction_is_optimized(self)
2766 
2767  def set_direction_is_optimized(self, tf):
2768  r"""set_direction_is_optimized(Direction self, bool tf)"""
2769  return _IMP_core.Direction_set_direction_is_optimized(self, tf)
2770 
2771  def get_direction(self):
2772  r"""get_direction(Direction self) -> Vector3D"""
2773  return _IMP_core.Direction_get_direction(self)
2774 
2775  def set_direction(self, v):
2776  r"""set_direction(Direction self, Vector3D v)"""
2777  return _IMP_core.Direction_set_direction(self, v)
2778 
2779  def reflect(self):
2780  r"""reflect(Direction self)"""
2781  return _IMP_core.Direction_reflect(self)
2782 
2783  def add_attribute(self, *args):
2784  r"""
2785  add_attribute(Direction self, FloatKey k, IMP::Float v, bool opt)
2786  add_attribute(Direction self, FloatKey a0, IMP::Float a1)
2787  add_attribute(Direction self, IntKey a0, IMP::Int a1)
2788  add_attribute(Direction self, FloatsKey a0, IMP::Floats a1)
2789  add_attribute(Direction self, IntsKey a0, IMP::Ints a1)
2790  add_attribute(Direction self, StringKey a0, IMP::String a1)
2791  add_attribute(Direction self, ParticleIndexKey a0, Particle a1)
2792  add_attribute(Direction self, ObjectKey a0, Object a1)
2793  add_attribute(Direction self, SparseFloatKey a0, IMP::Float a1)
2794  add_attribute(Direction self, SparseIntKey a0, IMP::Int a1)
2795  add_attribute(Direction self, SparseStringKey a0, IMP::String a1)
2796  add_attribute(Direction self, SparseParticleIndexKey a0, ParticleIndex a1)
2797  """
2798  return _IMP_core.Direction_add_attribute(self, *args)
2799 
2800  def get_value(self, *args):
2801  r"""
2802  get_value(Direction self, FloatKey a0) -> IMP::Float
2803  get_value(Direction self, IntKey a0) -> IMP::Int
2804  get_value(Direction self, FloatsKey a0) -> IMP::Floats
2805  get_value(Direction self, IntsKey a0) -> IMP::Ints
2806  get_value(Direction self, StringKey a0) -> IMP::String
2807  get_value(Direction self, ParticleIndexKey a0) -> Particle
2808  get_value(Direction self, ObjectKey a0) -> Object
2809  get_value(Direction self, SparseFloatKey a0) -> IMP::Float
2810  get_value(Direction self, SparseIntKey a0) -> IMP::Int
2811  get_value(Direction self, SparseStringKey a0) -> IMP::String
2812  get_value(Direction self, SparseParticleIndexKey a0) -> ParticleIndex
2813  """
2814  return _IMP_core.Direction_get_value(self, *args)
2815 
2816  def set_value(self, *args):
2817  r"""
2818  set_value(Direction self, FloatKey a0, IMP::Float a1)
2819  set_value(Direction self, IntKey a0, IMP::Int a1)
2820  set_value(Direction self, FloatsKey a0, IMP::Floats a1)
2821  set_value(Direction self, IntsKey a0, IMP::Ints a1)
2822  set_value(Direction self, StringKey a0, IMP::String a1)
2823  set_value(Direction self, ParticleIndexKey a0, Particle a1)
2824  set_value(Direction self, ObjectKey a0, Object a1)
2825  set_value(Direction self, SparseFloatKey a0, IMP::Float a1)
2826  set_value(Direction self, SparseIntKey a0, IMP::Int a1)
2827  set_value(Direction self, SparseStringKey a0, IMP::String a1)
2828  set_value(Direction self, SparseParticleIndexKey a0, ParticleIndex a1)
2829  """
2830  return _IMP_core.Direction_set_value(self, *args)
2831 
2832  def remove_attribute(self, *args):
2833  r"""
2834  remove_attribute(Direction self, FloatKey a0)
2835  remove_attribute(Direction self, IntKey a0)
2836  remove_attribute(Direction self, FloatsKey a0)
2837  remove_attribute(Direction self, IntsKey a0)
2838  remove_attribute(Direction self, StringKey a0)
2839  remove_attribute(Direction self, ParticleIndexKey a0)
2840  remove_attribute(Direction self, ObjectKey a0)
2841  remove_attribute(Direction self, SparseFloatKey a0)
2842  remove_attribute(Direction self, SparseIntKey a0)
2843  remove_attribute(Direction self, SparseStringKey a0)
2844  remove_attribute(Direction self, SparseParticleIndexKey a0)
2845  """
2846  return _IMP_core.Direction_remove_attribute(self, *args)
2847 
2848  def has_attribute(self, *args):
2849  r"""
2850  has_attribute(Direction self, FloatKey a0) -> bool
2851  has_attribute(Direction self, IntKey a0) -> bool
2852  has_attribute(Direction self, FloatsKey a0) -> bool
2853  has_attribute(Direction self, IntsKey a0) -> bool
2854  has_attribute(Direction self, StringKey a0) -> bool
2855  has_attribute(Direction self, ParticleIndexKey a0) -> bool
2856  has_attribute(Direction self, ObjectKey a0) -> bool
2857  has_attribute(Direction self, SparseFloatKey a0) -> bool
2858  has_attribute(Direction self, SparseIntKey a0) -> bool
2859  has_attribute(Direction self, SparseStringKey a0) -> bool
2860  has_attribute(Direction self, SparseParticleIndexKey a0) -> bool
2861  """
2862  return _IMP_core.Direction_has_attribute(self, *args)
2863 
2864  def get_derivative(self, a0):
2865  r"""get_derivative(Direction self, FloatKey a0) -> double"""
2866  return _IMP_core.Direction_get_derivative(self, a0)
2867 
2868  def get_name(self):
2869  r"""get_name(Direction self) -> std::string"""
2870  return _IMP_core.Direction_get_name(self)
2871 
2872  def clear_caches(self):
2873  r"""clear_caches(Direction self)"""
2874  return _IMP_core.Direction_clear_caches(self)
2875 
2876  def set_name(self, a0):
2877  r"""set_name(Direction self, std::string a0)"""
2878  return _IMP_core.Direction_set_name(self, a0)
2879 
2880  def set_check_level(self, a0):
2881  r"""set_check_level(Direction self, IMP::CheckLevel a0)"""
2882  return _IMP_core.Direction_set_check_level(self, a0)
2883 
2884  def add_to_derivative(self, a0, a1, a2):
2885  r"""add_to_derivative(Direction self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2886  return _IMP_core.Direction_add_to_derivative(self, a0, a1, a2)
2887 
2888  def set_is_optimized(self, a0, a1):
2889  r"""set_is_optimized(Direction self, FloatKey a0, bool a1)"""
2890  return _IMP_core.Direction_set_is_optimized(self, a0, a1)
2891 
2892  def get_is_optimized(self, a0):
2893  r"""get_is_optimized(Direction self, FloatKey a0) -> bool"""
2894  return _IMP_core.Direction_get_is_optimized(self, a0)
2895 
2896  def get_check_level(self):
2897  r"""get_check_level(Direction self) -> IMP::CheckLevel"""
2898  return _IMP_core.Direction_get_check_level(self)
2899 
2900  def __eq__(self, *args):
2901  r"""
2902  __eq__(Direction self, Direction o) -> bool
2903  __eq__(Direction self, Particle d) -> bool
2904  """
2905  return _IMP_core.Direction___eq__(self, *args)
2906 
2907  def __ne__(self, *args):
2908  r"""
2909  __ne__(Direction self, Direction o) -> bool
2910  __ne__(Direction self, Particle d) -> bool
2911  """
2912  return _IMP_core.Direction___ne__(self, *args)
2913 
2914  def __le__(self, *args):
2915  r"""
2916  __le__(Direction self, Direction o) -> bool
2917  __le__(Direction self, Particle d) -> bool
2918  """
2919  return _IMP_core.Direction___le__(self, *args)
2920 
2921  def __lt__(self, *args):
2922  r"""
2923  __lt__(Direction self, Direction o) -> bool
2924  __lt__(Direction self, Particle d) -> bool
2925  """
2926  return _IMP_core.Direction___lt__(self, *args)
2927 
2928  def __ge__(self, *args):
2929  r"""
2930  __ge__(Direction self, Direction o) -> bool
2931  __ge__(Direction self, Particle d) -> bool
2932  """
2933  return _IMP_core.Direction___ge__(self, *args)
2934 
2935  def __gt__(self, *args):
2936  r"""
2937  __gt__(Direction self, Direction o) -> bool
2938  __gt__(Direction self, Particle d) -> bool
2939  """
2940  return _IMP_core.Direction___gt__(self, *args)
2941 
2942  def __hash__(self):
2943  r"""__hash__(Direction self) -> std::size_t"""
2944  return _IMP_core.Direction___hash__(self)
2945 
2946  def __str__(self):
2947  r"""__str__(Direction self) -> std::string"""
2948  return _IMP_core.Direction___str__(self)
2949 
2950  def __repr__(self):
2951  r"""__repr__(Direction self) -> std::string"""
2952  return _IMP_core.Direction___repr__(self)
2953 
2954  def _get_as_binary(self):
2955  r"""_get_as_binary(Direction self) -> PyObject *"""
2956  return _IMP_core.Direction__get_as_binary(self)
2957 
2958  def _set_from_binary(self, p):
2959  r"""_set_from_binary(Direction self, PyObject * p)"""
2960  return _IMP_core.Direction__set_from_binary(self, p)
2961 
2962  def __getstate__(self):
2963  p = self._get_as_binary()
2964  if len(self.__dict__) > 1:
2965  d = self.__dict__.copy()
2966  del d['this']
2967  p = (d, p)
2968  return p
2969 
2970  def __setstate__(self, p):
2971  if not hasattr(self, 'this'):
2972  self.__init__()
2973  if isinstance(p, tuple):
2974  d, p = p
2975  self.__dict__.update(d)
2976  return self._set_from_binary(p)
2977 
2978  __swig_destroy__ = _IMP_core.delete_Direction
2979 
2980 # Register Direction in _IMP_core:
2981 _IMP_core.Direction_swigregister(Direction)
2982 
2983 def get_angle(a, b):
2984  r"""get_angle(Direction a, Direction b) -> double"""
2985  return _IMP_core.get_angle(a, b)
2986 class DirectionAngle(IMP.Decorator):
2987  r"""Proxy of C++ IMP::core::DirectionAngle class."""
2988 
2989  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2990 
2991  def __init__(self, *args):
2992  r"""
2993  __init__(DirectionAngle self) -> DirectionAngle
2994  __init__(DirectionAngle self, Model m, ParticleIndex id) -> DirectionAngle
2995  __init__(DirectionAngle self, _ParticleAdaptor d) -> DirectionAngle
2996  """
2997  _IMP_core.DirectionAngle_swiginit(self, _IMP_core.new_DirectionAngle(*args))
2998 
2999  def show(self, *args):
3000  r"""show(DirectionAngle self, _ostream out=std::cout)"""
3001  return _IMP_core.DirectionAngle_show(self, *args)
3002 
3003  @staticmethod
3004  def setup_particle(*args):
3005  r"""
3006  setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexPair ds) -> DirectionAngle
3007  setup_particle(_ParticleAdaptor pa, IMP::ParticleIndexPair ds) -> DirectionAngle
3008  setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor d0, _ParticleIndexAdaptor d1) -> DirectionAngle
3009  setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor d0, _ParticleIndexAdaptor d1) -> DirectionAngle
3010  """
3011  return _IMP_core.DirectionAngle_setup_particle(*args)
3012 
3013  @staticmethod
3014  def get_is_setup(*args):
3015  r"""
3016  get_is_setup(_ParticleAdaptor p) -> bool
3017  get_is_setup(Model m, ParticleIndex pi) -> bool
3018  """
3019  return _IMP_core.DirectionAngle_get_is_setup(*args)
3020 
3021  @staticmethod
3022  def get_angle_key():
3023  r"""get_angle_key() -> FloatKey"""
3024  return _IMP_core.DirectionAngle_get_angle_key()
3025 
3026  @staticmethod
3027  def get_particle_key(i):
3028  r"""get_particle_key(unsigned int i) -> ParticleIndexKey"""
3029  return _IMP_core.DirectionAngle_get_particle_key(i)
3030 
3031  def get_particle(self, *args):
3032  r"""
3033  get_particle(DirectionAngle self, unsigned int i) -> Particle
3034  get_particle(DirectionAngle self) -> Particle
3035  """
3036  return _IMP_core.DirectionAngle_get_particle(self, *args)
3037 
3038  def get_particle_index(self, *args):
3039  r"""
3040  get_particle_index(DirectionAngle self, unsigned int i) -> ParticleIndex
3041  get_particle_index(DirectionAngle self) -> ParticleIndex
3042  """
3043  return _IMP_core.DirectionAngle_get_particle_index(self, *args)
3044 
3045  def get_angle(self):
3046  r"""get_angle(DirectionAngle self) -> IMP::Float"""
3047  return _IMP_core.DirectionAngle_get_angle(self)
3048 
3049  def get_angle_derivative(self):
3050  r"""get_angle_derivative(DirectionAngle self) -> IMP::Float"""
3051  return _IMP_core.DirectionAngle_get_angle_derivative(self)
3052 
3053  def add_to_angle_derivative(self, v, d):
3054  r"""add_to_angle_derivative(DirectionAngle self, IMP::Float v, DerivativeAccumulator d)"""
3055  return _IMP_core.DirectionAngle_add_to_angle_derivative(self, v, d)
3056 
3057  def add_attribute(self, *args):
3058  r"""
3059  add_attribute(DirectionAngle self, FloatKey k, IMP::Float v, bool opt)
3060  add_attribute(DirectionAngle self, FloatKey a0, IMP::Float a1)
3061  add_attribute(DirectionAngle self, IntKey a0, IMP::Int a1)
3062  add_attribute(DirectionAngle self, FloatsKey a0, IMP::Floats a1)
3063  add_attribute(DirectionAngle self, IntsKey a0, IMP::Ints a1)
3064  add_attribute(DirectionAngle self, StringKey a0, IMP::String a1)
3065  add_attribute(DirectionAngle self, ParticleIndexKey a0, Particle a1)
3066  add_attribute(DirectionAngle self, ObjectKey a0, Object a1)
3067  add_attribute(DirectionAngle self, SparseFloatKey a0, IMP::Float a1)
3068  add_attribute(DirectionAngle self, SparseIntKey a0, IMP::Int a1)
3069  add_attribute(DirectionAngle self, SparseStringKey a0, IMP::String a1)
3070  add_attribute(DirectionAngle self, SparseParticleIndexKey a0, ParticleIndex a1)
3071  """
3072  return _IMP_core.DirectionAngle_add_attribute(self, *args)
3073 
3074  def get_value(self, *args):
3075  r"""
3076  get_value(DirectionAngle self, FloatKey a0) -> IMP::Float
3077  get_value(DirectionAngle self, IntKey a0) -> IMP::Int
3078  get_value(DirectionAngle self, FloatsKey a0) -> IMP::Floats
3079  get_value(DirectionAngle self, IntsKey a0) -> IMP::Ints
3080  get_value(DirectionAngle self, StringKey a0) -> IMP::String
3081  get_value(DirectionAngle self, ParticleIndexKey a0) -> Particle
3082  get_value(DirectionAngle self, ObjectKey a0) -> Object
3083  get_value(DirectionAngle self, SparseFloatKey a0) -> IMP::Float
3084  get_value(DirectionAngle self, SparseIntKey a0) -> IMP::Int
3085  get_value(DirectionAngle self, SparseStringKey a0) -> IMP::String
3086  get_value(DirectionAngle self, SparseParticleIndexKey a0) -> ParticleIndex
3087  """
3088  return _IMP_core.DirectionAngle_get_value(self, *args)
3089 
3090  def set_value(self, *args):
3091  r"""
3092  set_value(DirectionAngle self, FloatKey a0, IMP::Float a1)
3093  set_value(DirectionAngle self, IntKey a0, IMP::Int a1)
3094  set_value(DirectionAngle self, FloatsKey a0, IMP::Floats a1)
3095  set_value(DirectionAngle self, IntsKey a0, IMP::Ints a1)
3096  set_value(DirectionAngle self, StringKey a0, IMP::String a1)
3097  set_value(DirectionAngle self, ParticleIndexKey a0, Particle a1)
3098  set_value(DirectionAngle self, ObjectKey a0, Object a1)
3099  set_value(DirectionAngle self, SparseFloatKey a0, IMP::Float a1)
3100  set_value(DirectionAngle self, SparseIntKey a0, IMP::Int a1)
3101  set_value(DirectionAngle self, SparseStringKey a0, IMP::String a1)
3102  set_value(DirectionAngle self, SparseParticleIndexKey a0, ParticleIndex a1)
3103  """
3104  return _IMP_core.DirectionAngle_set_value(self, *args)
3105 
3106  def remove_attribute(self, *args):
3107  r"""
3108  remove_attribute(DirectionAngle self, FloatKey a0)
3109  remove_attribute(DirectionAngle self, IntKey a0)
3110  remove_attribute(DirectionAngle self, FloatsKey a0)
3111  remove_attribute(DirectionAngle self, IntsKey a0)
3112  remove_attribute(DirectionAngle self, StringKey a0)
3113  remove_attribute(DirectionAngle self, ParticleIndexKey a0)
3114  remove_attribute(DirectionAngle self, ObjectKey a0)
3115  remove_attribute(DirectionAngle self, SparseFloatKey a0)
3116  remove_attribute(DirectionAngle self, SparseIntKey a0)
3117  remove_attribute(DirectionAngle self, SparseStringKey a0)
3118  remove_attribute(DirectionAngle self, SparseParticleIndexKey a0)
3119  """
3120  return _IMP_core.DirectionAngle_remove_attribute(self, *args)
3121 
3122  def has_attribute(self, *args):
3123  r"""
3124  has_attribute(DirectionAngle self, FloatKey a0) -> bool
3125  has_attribute(DirectionAngle self, IntKey a0) -> bool
3126  has_attribute(DirectionAngle self, FloatsKey a0) -> bool
3127  has_attribute(DirectionAngle self, IntsKey a0) -> bool
3128  has_attribute(DirectionAngle self, StringKey a0) -> bool
3129  has_attribute(DirectionAngle self, ParticleIndexKey a0) -> bool
3130  has_attribute(DirectionAngle self, ObjectKey a0) -> bool
3131  has_attribute(DirectionAngle self, SparseFloatKey a0) -> bool
3132  has_attribute(DirectionAngle self, SparseIntKey a0) -> bool
3133  has_attribute(DirectionAngle self, SparseStringKey a0) -> bool
3134  has_attribute(DirectionAngle self, SparseParticleIndexKey a0) -> bool
3135  """
3136  return _IMP_core.DirectionAngle_has_attribute(self, *args)
3137 
3138  def get_derivative(self, a0):
3139  r"""get_derivative(DirectionAngle self, FloatKey a0) -> double"""
3140  return _IMP_core.DirectionAngle_get_derivative(self, a0)
3141 
3142  def get_name(self):
3143  r"""get_name(DirectionAngle self) -> std::string"""
3144  return _IMP_core.DirectionAngle_get_name(self)
3145 
3146  def clear_caches(self):
3147  r"""clear_caches(DirectionAngle self)"""
3148  return _IMP_core.DirectionAngle_clear_caches(self)
3149 
3150  def set_name(self, a0):
3151  r"""set_name(DirectionAngle self, std::string a0)"""
3152  return _IMP_core.DirectionAngle_set_name(self, a0)
3153 
3154  def set_check_level(self, a0):
3155  r"""set_check_level(DirectionAngle self, IMP::CheckLevel a0)"""
3156  return _IMP_core.DirectionAngle_set_check_level(self, a0)
3157 
3158  def add_to_derivative(self, a0, a1, a2):
3159  r"""add_to_derivative(DirectionAngle self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
3160  return _IMP_core.DirectionAngle_add_to_derivative(self, a0, a1, a2)
3161 
3162  def set_is_optimized(self, a0, a1):
3163  r"""set_is_optimized(DirectionAngle self, FloatKey a0, bool a1)"""
3164  return _IMP_core.DirectionAngle_set_is_optimized(self, a0, a1)
3165 
3166  def get_is_optimized(self, a0):
3167  r"""get_is_optimized(DirectionAngle self, FloatKey a0) -> bool"""
3168  return _IMP_core.DirectionAngle_get_is_optimized(self, a0)
3169 
3170  def get_check_level(self):
3171  r"""get_check_level(DirectionAngle self) -> IMP::CheckLevel"""
3172  return _IMP_core.DirectionAngle_get_check_level(self)
3173 
3174  def __eq__(self, *args):
3175  r"""
3176  __eq__(DirectionAngle self, DirectionAngle o) -> bool
3177  __eq__(DirectionAngle self, Particle d) -> bool
3178  """
3179  return _IMP_core.DirectionAngle___eq__(self, *args)
3180 
3181  def __ne__(self, *args):
3182  r"""
3183  __ne__(DirectionAngle self, DirectionAngle o) -> bool
3184  __ne__(DirectionAngle self, Particle d) -> bool
3185  """
3186  return _IMP_core.DirectionAngle___ne__(self, *args)
3187 
3188  def __le__(self, *args):
3189  r"""
3190  __le__(DirectionAngle self, DirectionAngle o) -> bool
3191  __le__(DirectionAngle self, Particle d) -> bool
3192  """
3193  return _IMP_core.DirectionAngle___le__(self, *args)
3194 
3195  def __lt__(self, *args):
3196  r"""
3197  __lt__(DirectionAngle self, DirectionAngle o) -> bool
3198  __lt__(DirectionAngle self, Particle d) -> bool
3199  """
3200  return _IMP_core.DirectionAngle___lt__(self, *args)
3201 
3202  def __ge__(self, *args):
3203  r"""
3204  __ge__(DirectionAngle self, DirectionAngle o) -> bool
3205  __ge__(DirectionAngle self, Particle d) -> bool
3206  """
3207  return _IMP_core.DirectionAngle___ge__(self, *args)
3208 
3209  def __gt__(self, *args):
3210  r"""
3211  __gt__(DirectionAngle self, DirectionAngle o) -> bool
3212  __gt__(DirectionAngle self, Particle d) -> bool
3213  """
3214  return _IMP_core.DirectionAngle___gt__(self, *args)
3215 
3216  def __hash__(self):
3217  r"""__hash__(DirectionAngle self) -> std::size_t"""
3218  return _IMP_core.DirectionAngle___hash__(self)
3219 
3220  def __str__(self):
3221  r"""__str__(DirectionAngle self) -> std::string"""
3222  return _IMP_core.DirectionAngle___str__(self)
3223 
3224  def __repr__(self):
3225  r"""__repr__(DirectionAngle self) -> std::string"""
3226  return _IMP_core.DirectionAngle___repr__(self)
3227 
3228  def _get_as_binary(self):
3229  r"""_get_as_binary(DirectionAngle self) -> PyObject *"""
3230  return _IMP_core.DirectionAngle__get_as_binary(self)
3231 
3232  def _set_from_binary(self, p):
3233  r"""_set_from_binary(DirectionAngle self, PyObject * p)"""
3234  return _IMP_core.DirectionAngle__set_from_binary(self, p)
3235 
3236  def __getstate__(self):
3237  p = self._get_as_binary()
3238  if len(self.__dict__) > 1:
3239  d = self.__dict__.copy()
3240  del d['this']
3241  p = (d, p)
3242  return p
3243 
3244  def __setstate__(self, p):
3245  if not hasattr(self, 'this'):
3246  self.__init__()
3247  if isinstance(p, tuple):
3248  d, p = p
3249  self.__dict__.update(d)
3250  return self._set_from_binary(p)
3251 
3252  __swig_destroy__ = _IMP_core.delete_DirectionAngle
3253 
3254 # Register DirectionAngle in _IMP_core:
3255 _IMP_core.DirectionAngle_swigregister(DirectionAngle)
3256 class Surface(XYZ):
3257  r"""Proxy of C++ IMP::core::Surface class."""
3258 
3259  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3260 
3261  @staticmethod
3262  def do_setup_particle(*args):
3263  r"""
3264  do_setup_particle(Model m, ParticleIndex pi, Vector3D center=IMP::Vector3D(0, 0, 0), Vector3D normal=IMP::Vector3D(0, 0, 1))
3265  do_setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf)
3266  """
3267  return _IMP_core.Surface_do_setup_particle(*args)
3268 
3269  def __init__(self, *args):
3270  r"""
3271  __init__(Surface self) -> Surface
3272  __init__(Surface self, Model m, ParticleIndex id) -> Surface
3273  __init__(Surface self, _ParticleAdaptor d) -> Surface
3274  """
3275  _IMP_core.Surface_swiginit(self, _IMP_core.new_Surface(*args))
3276 
3277  def show(self, *args):
3278  r"""show(Surface self, _ostream out=std::cout)"""
3279  return _IMP_core.Surface_show(self, *args)
3280 
3281  @staticmethod
3282  def setup_particle(*args):
3283  r"""
3284  setup_particle(Model m, ParticleIndex pi) -> Surface
3285  setup_particle(_ParticleAdaptor pa) -> Surface
3286  setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> Surface
3287  setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> Surface
3288  setup_particle(Model m, ParticleIndex pi, Vector3D center) -> Surface
3289  setup_particle(_ParticleAdaptor pa, Vector3D center) -> Surface
3290  setup_particle(Model m, ParticleIndex pi, Vector3D center, Vector3D normal) -> Surface
3291  setup_particle(_ParticleAdaptor pa, Vector3D center, Vector3D normal) -> Surface
3292  """
3293  return _IMP_core.Surface_setup_particle(*args)
3294 
3295  def get_normal_x(self):
3296  r"""get_normal_x(Surface self) -> IMP::Float"""
3297  return _IMP_core.Surface_get_normal_x(self)
3298 
3299  def set_normal_x(self, t):
3300  r"""set_normal_x(Surface self, IMP::Float t)"""
3301  return _IMP_core.Surface_set_normal_x(self, t)
3302 
3303  def get_normal_y(self):
3304  r"""get_normal_y(Surface self) -> IMP::Float"""
3305  return _IMP_core.Surface_get_normal_y(self)
3306 
3307  def set_normal_y(self, t):
3308  r"""set_normal_y(Surface self, IMP::Float t)"""
3309  return _IMP_core.Surface_set_normal_y(self, t)
3310 
3311  def get_normal_z(self):
3312  r"""get_normal_z(Surface self) -> IMP::Float"""
3313  return _IMP_core.Surface_get_normal_z(self)
3314 
3315  def set_normal_z(self, t):
3316  r"""set_normal_z(Surface self, IMP::Float t)"""
3317  return _IMP_core.Surface_set_normal_z(self, t)
3318 
3319  @staticmethod
3320  def get_is_setup(*args):
3321  r"""
3322  get_is_setup(_ParticleAdaptor p) -> bool
3323  get_is_setup(Model m, ParticleIndex pi) -> bool
3324  """
3325  return _IMP_core.Surface_get_is_setup(*args)
3326 
3327  @staticmethod
3328  def get_normal_key(i):
3329  r"""get_normal_key(unsigned int i) -> FloatKey"""
3330  return _IMP_core.Surface_get_normal_key(i)
3331 
3332  def get_normal_derivative(self, i):
3333  r"""get_normal_derivative(Surface self, int i) -> IMP::Float"""
3334  return _IMP_core.Surface_get_normal_derivative(self, i)
3335 
3336  def get_normal_derivatives(self):
3337  r"""get_normal_derivatives(Surface self) -> Vector3D"""
3338  return _IMP_core.Surface_get_normal_derivatives(self)
3339 
3340  def add_to_normal_derivative(self, i, v, d):
3341  r"""add_to_normal_derivative(Surface self, int i, IMP::Float v, DerivativeAccumulator d)"""
3342  return _IMP_core.Surface_add_to_normal_derivative(self, i, v, d)
3343 
3344  def add_to_normal_derivatives(self, v, d):
3345  r"""add_to_normal_derivatives(Surface self, Vector3D v, DerivativeAccumulator d)"""
3346  return _IMP_core.Surface_add_to_normal_derivatives(self, v, d)
3347 
3348  def get_normal_is_optimized(self):
3349  r"""get_normal_is_optimized(Surface self) -> bool"""
3350  return _IMP_core.Surface_get_normal_is_optimized(self)
3351 
3352  def set_normal_is_optimized(self, tf):
3353  r"""set_normal_is_optimized(Surface self, bool tf)"""
3354  return _IMP_core.Surface_set_normal_is_optimized(self, tf)
3355 
3356  def get_normal(self):
3357  r"""get_normal(Surface self) -> Vector3D"""
3358  return _IMP_core.Surface_get_normal(self)
3359 
3360  def set_normal(self, normal):
3361  r"""set_normal(Surface self, Vector3D normal)"""
3362  return _IMP_core.Surface_set_normal(self, normal)
3363 
3364  def reflect(self):
3365  r"""reflect(Surface self)"""
3366  return _IMP_core.Surface_reflect(self)
3367 
3368  def get_height(self, v):
3369  r"""get_height(Surface self, Vector3D v) -> double"""
3370  return _IMP_core.Surface_get_height(self, v)
3371 
3372  def get_depth(self, v):
3373  r"""get_depth(Surface self, Vector3D v) -> double"""
3374  return _IMP_core.Surface_get_depth(self, v)
3375 
3376  def get_distance_to(self, v):
3377  r"""get_distance_to(Surface self, Vector3D v) -> double"""
3378  return _IMP_core.Surface_get_distance_to(self, v)
3379 
3380  def get_distance_to_center(self, v):
3381  r"""get_distance_to_center(Surface self, Vector3D v) -> double"""
3382  return _IMP_core.Surface_get_distance_to_center(self, v)
3383 
3384  def set_reference_frame(self, rf):
3385  r"""set_reference_frame(Surface self, ReferenceFrame3D rf)"""
3386  return _IMP_core.Surface_set_reference_frame(self, rf)
3387 
3388  def get_reference_frame(self):
3389  r"""get_reference_frame(Surface self) -> ReferenceFrame3D"""
3390  return _IMP_core.Surface_get_reference_frame(self)
3391 
3392  def get_plane(self):
3393  r"""get_plane(Surface self) -> Plane3D"""
3394  return _IMP_core.Surface_get_plane(self)
3395 
3396  def add_attribute(self, *args):
3397  r"""
3398  add_attribute(Surface self, FloatKey k, IMP::Float v, bool opt)
3399  add_attribute(Surface self, FloatKey a0, IMP::Float a1)
3400  add_attribute(Surface self, IntKey a0, IMP::Int a1)
3401  add_attribute(Surface self, FloatsKey a0, IMP::Floats a1)
3402  add_attribute(Surface self, IntsKey a0, IMP::Ints a1)
3403  add_attribute(Surface self, StringKey a0, IMP::String a1)
3404  add_attribute(Surface self, ParticleIndexKey a0, Particle a1)
3405  add_attribute(Surface self, ObjectKey a0, Object a1)
3406  add_attribute(Surface self, SparseFloatKey a0, IMP::Float a1)
3407  add_attribute(Surface self, SparseIntKey a0, IMP::Int a1)
3408  add_attribute(Surface self, SparseStringKey a0, IMP::String a1)
3409  add_attribute(Surface self, SparseParticleIndexKey a0, ParticleIndex a1)
3410  """
3411  return _IMP_core.Surface_add_attribute(self, *args)
3412 
3413  def get_value(self, *args):
3414  r"""
3415  get_value(Surface self, FloatKey a0) -> IMP::Float
3416  get_value(Surface self, IntKey a0) -> IMP::Int
3417  get_value(Surface self, FloatsKey a0) -> IMP::Floats
3418  get_value(Surface self, IntsKey a0) -> IMP::Ints
3419  get_value(Surface self, StringKey a0) -> IMP::String
3420  get_value(Surface self, ParticleIndexKey a0) -> Particle
3421  get_value(Surface self, ObjectKey a0) -> Object
3422  get_value(Surface self, SparseFloatKey a0) -> IMP::Float
3423  get_value(Surface self, SparseIntKey a0) -> IMP::Int
3424  get_value(Surface self, SparseStringKey a0) -> IMP::String
3425  get_value(Surface self, SparseParticleIndexKey a0) -> ParticleIndex
3426  """
3427  return _IMP_core.Surface_get_value(self, *args)
3428 
3429  def set_value(self, *args):
3430  r"""
3431  set_value(Surface self, FloatKey a0, IMP::Float a1)
3432  set_value(Surface self, IntKey a0, IMP::Int a1)
3433  set_value(Surface self, FloatsKey a0, IMP::Floats a1)
3434  set_value(Surface self, IntsKey a0, IMP::Ints a1)
3435  set_value(Surface self, StringKey a0, IMP::String a1)
3436  set_value(Surface self, ParticleIndexKey a0, Particle a1)
3437  set_value(Surface self, ObjectKey a0, Object a1)
3438  set_value(Surface self, SparseFloatKey a0, IMP::Float a1)
3439  set_value(Surface self, SparseIntKey a0, IMP::Int a1)
3440  set_value(Surface self, SparseStringKey a0, IMP::String a1)
3441  set_value(Surface self, SparseParticleIndexKey a0, ParticleIndex a1)
3442  """
3443  return _IMP_core.Surface_set_value(self, *args)
3444 
3445  def remove_attribute(self, *args):
3446  r"""
3447  remove_attribute(Surface self, FloatKey a0)
3448  remove_attribute(Surface self, IntKey a0)
3449  remove_attribute(Surface self, FloatsKey a0)
3450  remove_attribute(Surface self, IntsKey a0)
3451  remove_attribute(Surface self, StringKey a0)
3452  remove_attribute(Surface self, ParticleIndexKey a0)
3453  remove_attribute(Surface self, ObjectKey a0)
3454  remove_attribute(Surface self, SparseFloatKey a0)
3455  remove_attribute(Surface self, SparseIntKey a0)
3456  remove_attribute(Surface self, SparseStringKey a0)
3457  remove_attribute(Surface self, SparseParticleIndexKey a0)
3458  """
3459  return _IMP_core.Surface_remove_attribute(self, *args)
3460 
3461  def has_attribute(self, *args):
3462  r"""
3463  has_attribute(Surface self, FloatKey a0) -> bool
3464  has_attribute(Surface self, IntKey a0) -> bool
3465  has_attribute(Surface self, FloatsKey a0) -> bool
3466  has_attribute(Surface self, IntsKey a0) -> bool
3467  has_attribute(Surface self, StringKey a0) -> bool
3468  has_attribute(Surface self, ParticleIndexKey a0) -> bool
3469  has_attribute(Surface self, ObjectKey a0) -> bool
3470  has_attribute(Surface self, SparseFloatKey a0) -> bool
3471  has_attribute(Surface self, SparseIntKey a0) -> bool
3472  has_attribute(Surface self, SparseStringKey a0) -> bool
3473  has_attribute(Surface self, SparseParticleIndexKey a0) -> bool
3474  """
3475  return _IMP_core.Surface_has_attribute(self, *args)
3476 
3477  def get_derivative(self, a0):
3478  r"""get_derivative(Surface self, FloatKey a0) -> double"""
3479  return _IMP_core.Surface_get_derivative(self, a0)
3480 
3481  def get_name(self):
3482  r"""get_name(Surface self) -> std::string"""
3483  return _IMP_core.Surface_get_name(self)
3484 
3485  def clear_caches(self):
3486  r"""clear_caches(Surface self)"""
3487  return _IMP_core.Surface_clear_caches(self)
3488 
3489  def set_name(self, a0):
3490  r"""set_name(Surface self, std::string a0)"""
3491  return _IMP_core.Surface_set_name(self, a0)
3492 
3493  def set_check_level(self, a0):
3494  r"""set_check_level(Surface self, IMP::CheckLevel a0)"""
3495  return _IMP_core.Surface_set_check_level(self, a0)
3496 
3497  def add_to_derivative(self, a0, a1, a2):
3498  r"""add_to_derivative(Surface self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
3499  return _IMP_core.Surface_add_to_derivative(self, a0, a1, a2)
3500 
3501  def set_is_optimized(self, a0, a1):
3502  r"""set_is_optimized(Surface self, FloatKey a0, bool a1)"""
3503  return _IMP_core.Surface_set_is_optimized(self, a0, a1)
3504 
3505  def get_is_optimized(self, a0):
3506  r"""get_is_optimized(Surface self, FloatKey a0) -> bool"""
3507  return _IMP_core.Surface_get_is_optimized(self, a0)
3508 
3509  def get_check_level(self):
3510  r"""get_check_level(Surface self) -> IMP::CheckLevel"""
3511  return _IMP_core.Surface_get_check_level(self)
3512 
3513  def __eq__(self, *args):
3514  r"""
3515  __eq__(Surface self, Surface o) -> bool
3516  __eq__(Surface self, Particle d) -> bool
3517  """
3518  return _IMP_core.Surface___eq__(self, *args)
3519 
3520  def __ne__(self, *args):
3521  r"""
3522  __ne__(Surface self, Surface o) -> bool
3523  __ne__(Surface self, Particle d) -> bool
3524  """
3525  return _IMP_core.Surface___ne__(self, *args)
3526 
3527  def __le__(self, *args):
3528  r"""
3529  __le__(Surface self, Surface o) -> bool
3530  __le__(Surface self, Particle d) -> bool
3531  """
3532  return _IMP_core.Surface___le__(self, *args)
3533 
3534  def __lt__(self, *args):
3535  r"""
3536  __lt__(Surface self, Surface o) -> bool
3537  __lt__(Surface self, Particle d) -> bool
3538  """
3539  return _IMP_core.Surface___lt__(self, *args)
3540 
3541  def __ge__(self, *args):
3542  r"""
3543  __ge__(Surface self, Surface o) -> bool
3544  __ge__(Surface self, Particle d) -> bool
3545  """
3546  return _IMP_core.Surface___ge__(self, *args)
3547 
3548  def __gt__(self, *args):
3549  r"""
3550  __gt__(Surface self, Surface o) -> bool
3551  __gt__(Surface self, Particle d) -> bool
3552  """
3553  return _IMP_core.Surface___gt__(self, *args)
3554 
3555  def __hash__(self):
3556  r"""__hash__(Surface self) -> std::size_t"""
3557  return _IMP_core.Surface___hash__(self)
3558 
3559  def __str__(self):
3560  r"""__str__(Surface self) -> std::string"""
3561  return _IMP_core.Surface___str__(self)
3562 
3563  def __repr__(self):
3564  r"""__repr__(Surface self) -> std::string"""
3565  return _IMP_core.Surface___repr__(self)
3566 
3567  def _get_as_binary(self):
3568  r"""_get_as_binary(Surface self) -> PyObject *"""
3569  return _IMP_core.Surface__get_as_binary(self)
3570 
3571  def _set_from_binary(self, p):
3572  r"""_set_from_binary(Surface self, PyObject * p)"""
3573  return _IMP_core.Surface__set_from_binary(self, p)
3574 
3575  def __getstate__(self):
3576  p = self._get_as_binary()
3577  if len(self.__dict__) > 1:
3578  d = self.__dict__.copy()
3579  del d['this']
3580  p = (d, p)
3581  return p
3582 
3583  def __setstate__(self, p):
3584  if not hasattr(self, 'this'):
3585  self.__init__()
3586  if isinstance(p, tuple):
3587  d, p = p
3588  self.__dict__.update(d)
3589  return self._set_from_binary(p)
3590 
3591  __swig_destroy__ = _IMP_core.delete_Surface
3592 
3593 # Register Surface in _IMP_core:
3594 _IMP_core.Surface_swigregister(Surface)
3595 
3596 def get_height(*args):
3597  r"""
3598  get_height(Surface s, XYZR d) -> double
3599  get_height(Surface s, XYZ d) -> double
3600  """
3601  return _IMP_core.get_height(*args)
3602 
3603 def get_depth(*args):
3604  r"""
3605  get_depth(Surface s, XYZR d) -> double
3606  get_depth(Surface s, XYZ d) -> double
3607  """
3608  return _IMP_core.get_depth(*args)
3609 
3610 def get_distance(*args):
3611  r"""
3612  get_distance(XYZ a, XYZ b) -> double
3613  get_distance(XYZR a, XYZR b) -> double
3614  get_distance(Surface s, XYZR d) -> double
3615  get_distance(Surface s, XYZ d) -> double
3616  """
3617  return _IMP_core.get_distance(*args)
3618 class SurfaceGeometry(IMP.display.Geometry):
3619  r"""Proxy of C++ IMP::core::SurfaceGeometry class."""
3620 
3621  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3622 
3623  def __init__(self, *args):
3624  r"""
3625  __init__(SurfaceGeometry self, std::string n="SurfaceGeometry") -> SurfaceGeometry
3626  __init__(SurfaceGeometry self, Surface s, std::string const n="SurfaceGeometry") -> SurfaceGeometry
3627  __init__(SurfaceGeometry self, Surface s, Color c, std::string n="SurfaceGeometry") -> SurfaceGeometry
3628  """
3629  _IMP_core.SurfaceGeometry_swiginit(self, _IMP_core.new_SurfaceGeometry(*args))
3630 
3631  def get_geometry(self):
3632  r"""get_geometry(SurfaceGeometry self) -> Surface"""
3633  return _IMP_core.SurfaceGeometry_get_geometry(self)
3634 
3635  def set_geometry(self, s):
3636  r"""set_geometry(SurfaceGeometry self, Surface s)"""
3637  return _IMP_core.SurfaceGeometry_set_geometry(self, s)
3638 
3639  def get_version_info(self):
3640  r"""get_version_info(SurfaceGeometry self) -> VersionInfo"""
3641  return _IMP_core.SurfaceGeometry_get_version_info(self)
3642  __swig_destroy__ = _IMP_core.delete_SurfaceGeometry
3643 
3644  def __str__(self):
3645  r"""__str__(SurfaceGeometry self) -> std::string"""
3646  return _IMP_core.SurfaceGeometry___str__(self)
3647 
3648  def __repr__(self):
3649  r"""__repr__(SurfaceGeometry self) -> std::string"""
3650  return _IMP_core.SurfaceGeometry___repr__(self)
3651 
3652  @staticmethod
3653  def get_from(o):
3654  return _object_cast_to_SurfaceGeometry(o)
3655 
3656 
3657 # Register SurfaceGeometry in _IMP_core:
3658 _IMP_core.SurfaceGeometry_swigregister(SurfaceGeometry)
3659 
3660 def create_geometry(*args):
3661  r"""create_geometry(Surface s, std::string name=std::string("SurfaceGeometry%1%")) -> SurfaceGeometry"""
3662  return _IMP_core.create_geometry(*args)
3663 class SurfaceGeometryConstraint(IMP.Constraint):
3664  r"""Proxy of C++ IMP::core::SurfaceGeometryConstraint class."""
3665 
3666  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3667 
3668  def __init__(self, s, g):
3669  r"""__init__(SurfaceGeometryConstraint self, Surface s, SurfaceGeometry g) -> SurfaceGeometryConstraint"""
3670  _IMP_core.SurfaceGeometryConstraint_swiginit(self, _IMP_core.new_SurfaceGeometryConstraint(s, g))
3671 
3672  def get_surface(self):
3673  r"""get_surface(SurfaceGeometryConstraint self) -> Surface"""
3674  return _IMP_core.SurfaceGeometryConstraint_get_surface(self)
3675 
3676  def get_geometry(self):
3677  r"""get_geometry(SurfaceGeometryConstraint self) -> SurfaceGeometry"""
3678  return _IMP_core.SurfaceGeometryConstraint_get_geometry(self)
3679 
3680  def do_get_inputs(self):
3681  r"""do_get_inputs(SurfaceGeometryConstraint self) -> IMP::ModelObjectsTemp"""
3682  return _IMP_core.SurfaceGeometryConstraint_do_get_inputs(self)
3683 
3684  def do_get_outputs(self):
3685  r"""do_get_outputs(SurfaceGeometryConstraint self) -> IMP::ModelObjectsTemp"""
3686  return _IMP_core.SurfaceGeometryConstraint_do_get_outputs(self)
3687 
3688  def get_version_info(self):
3689  r"""get_version_info(SurfaceGeometryConstraint self) -> VersionInfo"""
3690  return _IMP_core.SurfaceGeometryConstraint_get_version_info(self)
3691  __swig_destroy__ = _IMP_core.delete_SurfaceGeometryConstraint
3692 
3693  def __str__(self):
3694  r"""__str__(SurfaceGeometryConstraint self) -> std::string"""
3695  return _IMP_core.SurfaceGeometryConstraint___str__(self)
3696 
3697  def __repr__(self):
3698  r"""__repr__(SurfaceGeometryConstraint self) -> std::string"""
3699  return _IMP_core.SurfaceGeometryConstraint___repr__(self)
3700 
3701  @staticmethod
3702  def get_from(o):
3703  return _object_cast_to_SurfaceGeometryConstraint(o)
3704 
3705 
3706 # Register SurfaceGeometryConstraint in _IMP_core:
3707 _IMP_core.SurfaceGeometryConstraint_swigregister(SurfaceGeometryConstraint)
3708 
3710  r"""get_constrained_surface_geometry(Surface s, std::string name="SurfaceGeometry%1%") -> SurfaceGeometry"""
3711  return _IMP_core.get_constrained_surface_geometry(*args)
3712 class LateralSurfaceConstraint(IMP.Constraint):
3713  r"""Proxy of C++ IMP::core::LateralSurfaceConstraint class."""
3714 
3715  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3716 
3717  def __init__(self, s, d):
3718  r"""__init__(LateralSurfaceConstraint self, Surface s, XYZ d) -> LateralSurfaceConstraint"""
3719  _IMP_core.LateralSurfaceConstraint_swiginit(self, _IMP_core.new_LateralSurfaceConstraint(s, d))
3720 
3721  def do_get_inputs(self):
3722  r"""do_get_inputs(LateralSurfaceConstraint self) -> IMP::ModelObjectsTemp"""
3723  return _IMP_core.LateralSurfaceConstraint_do_get_inputs(self)
3724 
3725  def do_get_outputs(self):
3726  r"""do_get_outputs(LateralSurfaceConstraint self) -> IMP::ModelObjectsTemp"""
3727  return _IMP_core.LateralSurfaceConstraint_do_get_outputs(self)
3728 
3729  def get_version_info(self):
3730  r"""get_version_info(LateralSurfaceConstraint self) -> VersionInfo"""
3731  return _IMP_core.LateralSurfaceConstraint_get_version_info(self)
3732  __swig_destroy__ = _IMP_core.delete_LateralSurfaceConstraint
3733 
3734  def __str__(self):
3735  r"""__str__(LateralSurfaceConstraint self) -> std::string"""
3736  return _IMP_core.LateralSurfaceConstraint___str__(self)
3737 
3738  def __repr__(self):
3739  r"""__repr__(LateralSurfaceConstraint self) -> std::string"""
3740  return _IMP_core.LateralSurfaceConstraint___repr__(self)
3741 
3742  @staticmethod
3743  def get_from(o):
3744  return _object_cast_to_LateralSurfaceConstraint(o)
3745 
3746 
3747 # Register LateralSurfaceConstraint in _IMP_core:
3748 _IMP_core.LateralSurfaceConstraint_swigregister(LateralSurfaceConstraint)
3749 class AngleTripletScore(IMP.TripletScore):
3750  r"""Proxy of C++ IMP::core::AngleTripletScore class."""
3751 
3752  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3753 
3754  def __init__(self, *args):
3755  r"""
3756  __init__(AngleTripletScore self, UnaryFunction f) -> AngleTripletScore
3757  __init__(AngleTripletScore self) -> AngleTripletScore
3758  """
3759  _IMP_core.AngleTripletScore_swiginit(self, _IMP_core.new_AngleTripletScore(*args))
3760 
3761  def do_get_inputs(self, m, pis):
3762  r"""do_get_inputs(AngleTripletScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3763  return _IMP_core.AngleTripletScore_do_get_inputs(self, m, pis)
3764 
3765  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
3766  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"""
3767  return _IMP_core.AngleTripletScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
3768 
3769  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
3770  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"""
3771  return _IMP_core.AngleTripletScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
3772 
3773  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
3774  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"""
3775  return _IMP_core.AngleTripletScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
3776 
3777  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
3778  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"""
3779  return _IMP_core.AngleTripletScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
3780 
3781  def get_version_info(self):
3782  r"""get_version_info(AngleTripletScore self) -> VersionInfo"""
3783  return _IMP_core.AngleTripletScore_get_version_info(self)
3784  __swig_destroy__ = _IMP_core.delete_AngleTripletScore
3785 
3786  def __str__(self):
3787  r"""__str__(AngleTripletScore self) -> std::string"""
3788  return _IMP_core.AngleTripletScore___str__(self)
3789 
3790  def __repr__(self):
3791  r"""__repr__(AngleTripletScore self) -> std::string"""
3792  return _IMP_core.AngleTripletScore___repr__(self)
3793 
3794  @staticmethod
3795  def get_from(o):
3796  return _object_cast_to_AngleTripletScore(o)
3797 
3798 
3799  def _get_as_binary(self):
3800  r"""_get_as_binary(AngleTripletScore self) -> PyObject *"""
3801  return _IMP_core.AngleTripletScore__get_as_binary(self)
3802 
3803  def _set_from_binary(self, p):
3804  r"""_set_from_binary(AngleTripletScore self, PyObject * p)"""
3805  return _IMP_core.AngleTripletScore__set_from_binary(self, p)
3806 
3807  def __getstate__(self):
3808  p = self._get_as_binary()
3809  if len(self.__dict__) > 1:
3810  d = self.__dict__.copy()
3811  del d['this']
3812  p = (d, p)
3813  return p
3814 
3815  def __setstate__(self, p):
3816  if not hasattr(self, 'this'):
3817  self.__init__()
3818  if isinstance(p, tuple):
3819  d, p = p
3820  self.__dict__.update(d)
3821  return self._set_from_binary(p)
3822 
3823 
3824 # Register AngleTripletScore in _IMP_core:
3825 _IMP_core.AngleTripletScore_swigregister(AngleTripletScore)
3826 class DihedralQuadScore(IMP.QuadScore):
3827  r"""Proxy of C++ IMP::core::DihedralQuadScore class."""
3828 
3829  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3830 
3831  def __init__(self, *args):
3832  r"""
3833  __init__(DihedralQuadScore self, UnaryFunction f) -> DihedralQuadScore
3834  __init__(DihedralQuadScore self) -> DihedralQuadScore
3835  """
3836  _IMP_core.DihedralQuadScore_swiginit(self, _IMP_core.new_DihedralQuadScore(*args))
3837 
3838  def do_get_inputs(self, m, pis):
3839  r"""do_get_inputs(DihedralQuadScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3840  return _IMP_core.DihedralQuadScore_do_get_inputs(self, m, pis)
3841 
3842  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
3843  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"""
3844  return _IMP_core.DihedralQuadScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
3845 
3846  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
3847  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"""
3848  return _IMP_core.DihedralQuadScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
3849 
3850  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
3851  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"""
3852  return _IMP_core.DihedralQuadScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
3853 
3854  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
3855  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"""
3856  return _IMP_core.DihedralQuadScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
3857 
3858  def get_version_info(self):
3859  r"""get_version_info(DihedralQuadScore self) -> VersionInfo"""
3860  return _IMP_core.DihedralQuadScore_get_version_info(self)
3861  __swig_destroy__ = _IMP_core.delete_DihedralQuadScore
3862 
3863  def __str__(self):
3864  r"""__str__(DihedralQuadScore self) -> std::string"""
3865  return _IMP_core.DihedralQuadScore___str__(self)
3866 
3867  def __repr__(self):
3868  r"""__repr__(DihedralQuadScore self) -> std::string"""
3869  return _IMP_core.DihedralQuadScore___repr__(self)
3870 
3871  @staticmethod
3872  def get_from(o):
3873  return _object_cast_to_DihedralQuadScore(o)
3874 
3875 
3876  def _get_as_binary(self):
3877  r"""_get_as_binary(DihedralQuadScore self) -> PyObject *"""
3878  return _IMP_core.DihedralQuadScore__get_as_binary(self)
3879 
3880  def _set_from_binary(self, p):
3881  r"""_set_from_binary(DihedralQuadScore self, PyObject * p)"""
3882  return _IMP_core.DihedralQuadScore__set_from_binary(self, p)
3883 
3884  def __getstate__(self):
3885  p = self._get_as_binary()
3886  if len(self.__dict__) > 1:
3887  d = self.__dict__.copy()
3888  del d['this']
3889  p = (d, p)
3890  return p
3891 
3892  def __setstate__(self, p):
3893  if not hasattr(self, 'this'):
3894  self.__init__()
3895  if isinstance(p, tuple):
3896  d, p = p
3897  self.__dict__.update(d)
3898  return self._set_from_binary(p)
3899 
3900 
3901 # Register DihedralQuadScore in _IMP_core:
3902 _IMP_core.DihedralQuadScore_swigregister(DihedralQuadScore)
3903 class BallMover(MonteCarloMover):
3904  r"""Proxy of C++ IMP::core::BallMover class."""
3905 
3906  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3907 
3908  def __init__(self, *args):
3909  r"""
3910  __init__(BallMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double radius) -> BallMover
3911  __init__(BallMover self, Model m, ParticleIndex pi, double radius) -> BallMover
3912  __init__(BallMover self, Model m, IMP::ParticleIndexes const & pis, IMP::FloatKeys const & vars, IMP::Float radius) -> BallMover
3913  __init__(BallMover self, Model m, IMP::ParticleIndexes const & pis, IMP::Float radius) -> BallMover
3914  __init__(BallMover self) -> BallMover
3915  """
3916  _IMP_core.BallMover_swiginit(self, _IMP_core.new_BallMover(*args))
3917 
3918  def set_radius(self, radius):
3919  r"""set_radius(BallMover self, IMP::Float radius)"""
3920  return _IMP_core.BallMover_set_radius(self, radius)
3921 
3922  def get_radius(self):
3923  r"""get_radius(BallMover self) -> IMP::Float"""
3924  return _IMP_core.BallMover_get_radius(self)
3925 
3926  def get_indexes(self):
3927  r"""get_indexes(BallMover self) -> IMP::ParticleIndexes"""
3928  return _IMP_core.BallMover_get_indexes(self)
3929 
3930  def get_keys(self):
3931  r"""get_keys(BallMover self) -> IMP::FloatKeys"""
3932  return _IMP_core.BallMover_get_keys(self)
3933 
3934  def get_version_info(self):
3935  r"""get_version_info(BallMover self) -> VersionInfo"""
3936  return _IMP_core.BallMover_get_version_info(self)
3937  __swig_destroy__ = _IMP_core.delete_BallMover
3938 
3939  def __str__(self):
3940  r"""__str__(BallMover self) -> std::string"""
3941  return _IMP_core.BallMover___str__(self)
3942 
3943  def __repr__(self):
3944  r"""__repr__(BallMover self) -> std::string"""
3945  return _IMP_core.BallMover___repr__(self)
3946 
3947  @staticmethod
3948  def get_from(o):
3949  return _object_cast_to_BallMover(o)
3950 
3951 
3952  def _get_as_binary(self):
3953  r"""_get_as_binary(BallMover self) -> PyObject *"""
3954  return _IMP_core.BallMover__get_as_binary(self)
3955 
3956  def _set_from_binary(self, p):
3957  r"""_set_from_binary(BallMover self, PyObject * p)"""
3958  return _IMP_core.BallMover__set_from_binary(self, p)
3959 
3960  def __getstate__(self):
3961  p = self._get_as_binary()
3962  if len(self.__dict__) > 1:
3963  d = self.__dict__.copy()
3964  del d['this']
3965  p = (d, p)
3966  return p
3967 
3968  def __setstate__(self, p):
3969  if not hasattr(self, 'this'):
3970  self.__init__()
3971  if isinstance(p, tuple):
3972  d, p = p
3973  self.__dict__.update(d)
3974  return self._set_from_binary(p)
3975 
3976 
3977  def _get_jax(self, space):
3978  import jax.random
3979  from IMP.algebra._jax_util import get_random_vector_in_3d_sphere
3980  indexes = self.get_indexes()
3981  keys = frozenset(self.get_keys())
3982  if keys == frozenset(IMP.core.XYZ.get_xyz_keys()):
3983  intcoord = False
3984  elif keys == frozenset(
3986  intcoord = True
3987  else:
3988  raise NotImplementedError(
3989  "Only works for XYZ or internal coordinates")
3990  radius = self.get_radius()
3991 
3992  def init_func(key):
3993  return key
3994 
3995  def propose_func(jm, key):
3996  key, subkey = jax.random.split(key)
3997  v = get_random_vector_in_3d_sphere(subkey, radius)
3998  if intcoord:
3999  rbs = jm['rigid_bodies']
4000  rbs.intcoord = space.shift_indexes(rbs.intcoord, indexes, v)
4001  else:
4002  jm['xyz'] = space.shift_indexes(jm['xyz'], indexes, v)
4003  return jm, key, 1.0
4004  return self._wrap_jax(init_func, propose_func,
4005  keys=['rigid_bodies'] if intcoord else None)
4006 
4007 
4008 # Register BallMover in _IMP_core:
4009 _IMP_core.BallMover_swigregister(BallMover)
4010 class SerialMover(MonteCarloMover):
4011  r"""Proxy of C++ IMP::core::SerialMover class."""
4012 
4013  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4014 
4015  def __init__(self, *args):
4016  r"""
4017  __init__(SerialMover self, IMP::core::MonteCarloMoversTemp const & mvs) -> SerialMover
4018  __init__(SerialMover self) -> SerialMover
4019  """
4020  _IMP_core.SerialMover_swiginit(self, _IMP_core.new_SerialMover(*args))
4021 
4022  def get_movers(self):
4023  r"""get_movers(SerialMover self) -> IMP::core::MonteCarloMovers const &"""
4024  return _IMP_core.SerialMover_get_movers(self)
4025 
4026  def get_version_info(self):
4027  r"""get_version_info(SerialMover self) -> VersionInfo"""
4028  return _IMP_core.SerialMover_get_version_info(self)
4029  __swig_destroy__ = _IMP_core.delete_SerialMover
4030 
4031  def __str__(self):
4032  r"""__str__(SerialMover self) -> std::string"""
4033  return _IMP_core.SerialMover___str__(self)
4034 
4035  def __repr__(self):
4036  r"""__repr__(SerialMover self) -> std::string"""
4037  return _IMP_core.SerialMover___repr__(self)
4038 
4039  @staticmethod
4040  def get_from(o):
4041  return _object_cast_to_SerialMover(o)
4042 
4043 
4044  def _get_as_binary(self):
4045  r"""_get_as_binary(SerialMover self) -> PyObject *"""
4046  return _IMP_core.SerialMover__get_as_binary(self)
4047 
4048  def _set_from_binary(self, p):
4049  r"""_set_from_binary(SerialMover self, PyObject * p)"""
4050  return _IMP_core.SerialMover__set_from_binary(self, p)
4051 
4052  def __getstate__(self):
4053  p = self._get_as_binary()
4054  if len(self.__dict__) > 1:
4055  d = self.__dict__.copy()
4056  del d['this']
4057  p = (d, p)
4058  return p
4059 
4060  def __setstate__(self, p):
4061  if not hasattr(self, 'this'):
4062  self.__init__()
4063  if isinstance(p, tuple):
4064  d, p = p
4065  self.__dict__.update(d)
4066  return self._set_from_binary(p)
4067 
4068 
4069  def _get_jax(self, space):
4070  import jax.random
4071  import jax.lax
4072  import jax.numpy as jnp
4073  from IMP.core._jax_util import _SerialMover
4074  movers = [m.get_derived_object()._get_jax(space)
4075  for m in self.get_movers()]
4076 
4077  def sub_propose_func(jm, sms, i):
4078  """Call the propose_func of the ith mover"""
4079  jm, sms.mover_state[i], ratio = movers[i].propose_func(
4080  jm, sms.mover_state[i])
4081  sms.proposed_mover_steps = sms.proposed_mover_steps.at[i].add(1)
4082  return jm, sms, ratio
4083 
4084  sub_propose_funcs = [functools.partial(sub_propose_func, i=i)
4085  for i in range(len(movers))]
4086 
4087  def init_func(key):
4088  # Initialize all movers and store their state in ours
4089  mover_state = []
4090  for m in movers:
4091  key, subkey = jax.random.split(key)
4092  mover_state.append(m.init_func(subkey))
4093  return _SerialMover(
4094  imov=-1, mover_state=mover_state,
4095  proposed_mover_steps=jnp.zeros(len(movers), dtype=int),
4096  accepted_mover_steps=jnp.zeros(len(movers), dtype=int))
4097 
4098  def reset_stats_func(sms):
4099  sms.mover_state = [m.reset_stats_func(ms)
4100  if m.reset_stats_func else ms
4101  for (m, ms) in zip(movers, sms.mover_state)]
4102  sms.proposed_mover_steps = jnp.zeros(len(movers), dtype=int)
4103  sms.accepted_mover_steps = jnp.zeros(len(movers), dtype=int)
4104  return sms
4105 
4106  def propose_func(jm, sms):
4107  sms.imov = jnp.mod(sms.imov + 1, len(movers))
4108  return jax.lax.switch(sms.imov, sub_propose_funcs, jm, sms)
4109 
4110  def accept_func(sms):
4111  # Update statistics for the chosen mover
4112  sms.accepted_mover_steps = \
4113  sms.accepted_mover_steps.at[sms.imov].add(1)
4114  return sms
4115 
4116  def sync_func(imp_mover, sms):
4117  # Copy submover statistics back to IMP Movers
4118  for i, mover in enumerate(imp_mover.get_movers()):
4119  mover.add_to_statistics(
4120  sms.proposed_mover_steps[i],
4121  sms.proposed_mover_steps[i] - sms.accepted_mover_steps[i])
4122 
4123  return self._wrap_jax(
4124  init_func, propose_func, accept_func, sync_func,
4125  reset_stats_func=reset_stats_func,
4126  keys=frozenset(x for m in movers for x in m._keys))
4127 
4128 
4129 # Register SerialMover in _IMP_core:
4130 _IMP_core.SerialMover_swigregister(SerialMover)
4131 class SubsetMover(MonteCarloMover):
4132  r"""Proxy of C++ IMP::core::SubsetMover class."""
4133 
4134  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4135 
4136  def __init__(self, *args):
4137  r"""
4138  __init__(SubsetMover self, IMP::core::MonteCarloMoversTemp const & mvs, unsigned int n) -> SubsetMover
4139  __init__(SubsetMover self) -> SubsetMover
4140  """
4141  _IMP_core.SubsetMover_swiginit(self, _IMP_core.new_SubsetMover(*args))
4142 
4143  def get_movers(self):
4144  r"""get_movers(SubsetMover self) -> IMP::core::MonteCarloMovers const &"""
4145  return _IMP_core.SubsetMover_get_movers(self)
4146 
4147  def get_subset_size(self):
4148  r"""get_subset_size(SubsetMover self) -> unsigned int"""
4149  return _IMP_core.SubsetMover_get_subset_size(self)
4150 
4151  def get_version_info(self):
4152  r"""get_version_info(SubsetMover self) -> VersionInfo"""
4153  return _IMP_core.SubsetMover_get_version_info(self)
4154  __swig_destroy__ = _IMP_core.delete_SubsetMover
4155 
4156  def __str__(self):
4157  r"""__str__(SubsetMover self) -> std::string"""
4158  return _IMP_core.SubsetMover___str__(self)
4159 
4160  def __repr__(self):
4161  r"""__repr__(SubsetMover self) -> std::string"""
4162  return _IMP_core.SubsetMover___repr__(self)
4163 
4164  @staticmethod
4165  def get_from(o):
4166  return _object_cast_to_SubsetMover(o)
4167 
4168 
4169  def _get_as_binary(self):
4170  r"""_get_as_binary(SubsetMover self) -> PyObject *"""
4171  return _IMP_core.SubsetMover__get_as_binary(self)
4172 
4173  def _set_from_binary(self, p):
4174  r"""_set_from_binary(SubsetMover self, PyObject * p)"""
4175  return _IMP_core.SubsetMover__set_from_binary(self, p)
4176 
4177  def __getstate__(self):
4178  p = self._get_as_binary()
4179  if len(self.__dict__) > 1:
4180  d = self.__dict__.copy()
4181  del d['this']
4182  p = (d, p)
4183  return p
4184 
4185  def __setstate__(self, p):
4186  if not hasattr(self, 'this'):
4187  self.__init__()
4188  if isinstance(p, tuple):
4189  d, p = p
4190  self.__dict__.update(d)
4191  return self._set_from_binary(p)
4192 
4193 
4194 # Register SubsetMover in _IMP_core:
4195 _IMP_core.SubsetMover_swigregister(SubsetMover)
4196 class DirectionMover(MonteCarloMover):
4197  r"""Proxy of C++ IMP::core::DirectionMover class."""
4198 
4199  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4200 
4201  def __init__(self, *args):
4202  r"""
4203  __init__(DirectionMover self, Model m, ParticleIndex pi, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4204  __init__(DirectionMover self, Direction d, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4205  __init__(DirectionMover self) -> DirectionMover
4206  """
4207  _IMP_core.DirectionMover_swiginit(self, _IMP_core.new_DirectionMover(*args))
4208 
4209  def set_maximum_rotation(self, mr):
4210  r"""set_maximum_rotation(DirectionMover self, IMP::Float mr)"""
4211  return _IMP_core.DirectionMover_set_maximum_rotation(self, mr)
4212 
4213  def set_reflect_probability(self, rp):
4214  r"""set_reflect_probability(DirectionMover self, IMP::Float rp)"""
4215  return _IMP_core.DirectionMover_set_reflect_probability(self, rp)
4216 
4217  def get_maximum_rotation(self):
4218  r"""get_maximum_rotation(DirectionMover self) -> IMP::Float"""
4219  return _IMP_core.DirectionMover_get_maximum_rotation(self)
4220 
4221  def get_reflect_probability(self):
4222  r"""get_reflect_probability(DirectionMover self) -> IMP::Float"""
4223  return _IMP_core.DirectionMover_get_reflect_probability(self)
4224 
4225  def get_direction(self):
4226  r"""get_direction(DirectionMover self) -> Direction"""
4227  return _IMP_core.DirectionMover_get_direction(self)
4228 
4229  def get_version_info(self):
4230  r"""get_version_info(DirectionMover self) -> VersionInfo"""
4231  return _IMP_core.DirectionMover_get_version_info(self)
4232  __swig_destroy__ = _IMP_core.delete_DirectionMover
4233 
4234  def __str__(self):
4235  r"""__str__(DirectionMover self) -> std::string"""
4236  return _IMP_core.DirectionMover___str__(self)
4237 
4238  def __repr__(self):
4239  r"""__repr__(DirectionMover self) -> std::string"""
4240  return _IMP_core.DirectionMover___repr__(self)
4241 
4242  @staticmethod
4243  def get_from(o):
4244  return _object_cast_to_DirectionMover(o)
4245 
4246 
4247  def _get_as_binary(self):
4248  r"""_get_as_binary(DirectionMover self) -> PyObject *"""
4249  return _IMP_core.DirectionMover__get_as_binary(self)
4250 
4251  def _set_from_binary(self, p):
4252  r"""_set_from_binary(DirectionMover self, PyObject * p)"""
4253  return _IMP_core.DirectionMover__set_from_binary(self, p)
4254 
4255  def __getstate__(self):
4256  p = self._get_as_binary()
4257  if len(self.__dict__) > 1:
4258  d = self.__dict__.copy()
4259  del d['this']
4260  p = (d, p)
4261  return p
4262 
4263  def __setstate__(self, p):
4264  if not hasattr(self, 'this'):
4265  self.__init__()
4266  if isinstance(p, tuple):
4267  d, p = p
4268  self.__dict__.update(d)
4269  return self._set_from_binary(p)
4270 
4271 
4272 # Register DirectionMover in _IMP_core:
4273 _IMP_core.DirectionMover_swigregister(DirectionMover)
4274 class SurfaceMover(MonteCarloMover):
4275  r"""Proxy of C++ IMP::core::SurfaceMover class."""
4276 
4277  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4278 
4279  def __init__(self, *args):
4280  r"""
4281  __init__(SurfaceMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4282  __init__(SurfaceMover self, Surface s, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4283  __init__(SurfaceMover self) -> SurfaceMover
4284  """
4285  _IMP_core.SurfaceMover_swiginit(self, _IMP_core.new_SurfaceMover(*args))
4286 
4287  def set_maximum_translation(self, mt):
4288  r"""set_maximum_translation(SurfaceMover self, IMP::Float mt)"""
4289  return _IMP_core.SurfaceMover_set_maximum_translation(self, mt)
4290 
4291  def set_maximum_rotation(self, mr):
4292  r"""set_maximum_rotation(SurfaceMover self, IMP::Float mr)"""
4293  return _IMP_core.SurfaceMover_set_maximum_rotation(self, mr)
4294 
4295  def set_reflect_probability(self, rp):
4296  r"""set_reflect_probability(SurfaceMover self, IMP::Float rp)"""
4297  return _IMP_core.SurfaceMover_set_reflect_probability(self, rp)
4298 
4299  def get_maximum_translation(self):
4300  r"""get_maximum_translation(SurfaceMover self) -> IMP::Float"""
4301  return _IMP_core.SurfaceMover_get_maximum_translation(self)
4302 
4303  def get_maximum_rotation(self):
4304  r"""get_maximum_rotation(SurfaceMover self) -> IMP::Float"""
4305  return _IMP_core.SurfaceMover_get_maximum_rotation(self)
4306 
4307  def get_reflect_probability(self):
4308  r"""get_reflect_probability(SurfaceMover self) -> IMP::Float"""
4309  return _IMP_core.SurfaceMover_get_reflect_probability(self)
4310 
4311  def get_surface(self):
4312  r"""get_surface(SurfaceMover self) -> Surface"""
4313  return _IMP_core.SurfaceMover_get_surface(self)
4314 
4315  def get_version_info(self):
4316  r"""get_version_info(SurfaceMover self) -> VersionInfo"""
4317  return _IMP_core.SurfaceMover_get_version_info(self)
4318  __swig_destroy__ = _IMP_core.delete_SurfaceMover
4319 
4320  def __str__(self):
4321  r"""__str__(SurfaceMover self) -> std::string"""
4322  return _IMP_core.SurfaceMover___str__(self)
4323 
4324  def __repr__(self):
4325  r"""__repr__(SurfaceMover self) -> std::string"""
4326  return _IMP_core.SurfaceMover___repr__(self)
4327 
4328  @staticmethod
4329  def get_from(o):
4330  return _object_cast_to_SurfaceMover(o)
4331 
4332 
4333  def _get_as_binary(self):
4334  r"""_get_as_binary(SurfaceMover self) -> PyObject *"""
4335  return _IMP_core.SurfaceMover__get_as_binary(self)
4336 
4337  def _set_from_binary(self, p):
4338  r"""_set_from_binary(SurfaceMover self, PyObject * p)"""
4339  return _IMP_core.SurfaceMover__set_from_binary(self, p)
4340 
4341  def __getstate__(self):
4342  p = self._get_as_binary()
4343  if len(self.__dict__) > 1:
4344  d = self.__dict__.copy()
4345  del d['this']
4346  p = (d, p)
4347  return p
4348 
4349  def __setstate__(self, p):
4350  if not hasattr(self, 'this'):
4351  self.__init__()
4352  if isinstance(p, tuple):
4353  d, p = p
4354  self.__dict__.update(d)
4355  return self._set_from_binary(p)
4356 
4357 
4358 # Register SurfaceMover in _IMP_core:
4359 _IMP_core.SurfaceMover_swigregister(SurfaceMover)
4360 class BoxSweepClosePairsFinder(ClosePairsFinder):
4361  r"""Proxy of C++ IMP::core::BoxSweepClosePairsFinder class."""
4362 
4363  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4364 
4365  def __init__(self):
4366  r"""__init__(BoxSweepClosePairsFinder self) -> BoxSweepClosePairsFinder"""
4367  _IMP_core.BoxSweepClosePairsFinder_swiginit(self, _IMP_core.new_BoxSweepClosePairsFinder())
4368 
4369  def get_close_pairs(self, *args):
4370  r"""
4371  get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4372  get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4373  get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
4374  get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
4375  """
4376  return _IMP_core.BoxSweepClosePairsFinder_get_close_pairs(self, *args)
4377 
4378  def do_get_inputs(self, m, pis):
4379  r"""do_get_inputs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4380  return _IMP_core.BoxSweepClosePairsFinder_do_get_inputs(self, m, pis)
4381 
4382  def get_version_info(self):
4383  r"""get_version_info(BoxSweepClosePairsFinder self) -> VersionInfo"""
4384  return _IMP_core.BoxSweepClosePairsFinder_get_version_info(self)
4385  __swig_destroy__ = _IMP_core.delete_BoxSweepClosePairsFinder
4386 
4387  def __str__(self):
4388  r"""__str__(BoxSweepClosePairsFinder self) -> std::string"""
4389  return _IMP_core.BoxSweepClosePairsFinder___str__(self)
4390 
4391  def __repr__(self):
4392  r"""__repr__(BoxSweepClosePairsFinder self) -> std::string"""
4393  return _IMP_core.BoxSweepClosePairsFinder___repr__(self)
4394 
4395  @staticmethod
4396  def get_from(o):
4397  return _object_cast_to_BoxSweepClosePairsFinder(o)
4398 
4399 
4400 # Register BoxSweepClosePairsFinder in _IMP_core:
4401 _IMP_core.BoxSweepClosePairsFinder_swigregister(BoxSweepClosePairsFinder)
4402 class CentroidOfRefined(IMP.SingletonModifier):
4403  r"""Proxy of C++ IMP::core::CentroidOfRefined class."""
4404 
4405  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4406 
4407  def __init__(self, *args):
4408  r"""
4409  __init__(CentroidOfRefined self, Refiner r, FloatKey weight=IMP::FloatKey(), IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> CentroidOfRefined
4410  __init__(CentroidOfRefined self) -> CentroidOfRefined
4411  """
4412  _IMP_core.CentroidOfRefined_swiginit(self, _IMP_core.new_CentroidOfRefined(*args))
4413 
4414  def get_refiner(self):
4415  r"""get_refiner(CentroidOfRefined self) -> Refiner"""
4416  return _IMP_core.CentroidOfRefined_get_refiner(self)
4417 
4418  def get_weight(self):
4419  r"""get_weight(CentroidOfRefined self) -> FloatKey"""
4420  return _IMP_core.CentroidOfRefined_get_weight(self)
4421 
4422  def get_keys(self):
4423  r"""get_keys(CentroidOfRefined self) -> IMP::FloatKeys"""
4424  return _IMP_core.CentroidOfRefined_get_keys(self)
4425 
4426  def get_is_weight_null(self):
4427  r"""get_is_weight_null(CentroidOfRefined self) -> bool"""
4428  return _IMP_core.CentroidOfRefined_get_is_weight_null(self)
4429 
4430  def do_get_inputs(self, m, pis):
4431  r"""do_get_inputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4432  return _IMP_core.CentroidOfRefined_do_get_inputs(self, m, pis)
4433 
4434  def do_get_outputs(self, m, pis):
4435  r"""do_get_outputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4436  return _IMP_core.CentroidOfRefined_do_get_outputs(self, m, pis)
4437 
4438  def get_version_info(self):
4439  r"""get_version_info(CentroidOfRefined self) -> VersionInfo"""
4440  return _IMP_core.CentroidOfRefined_get_version_info(self)
4441  __swig_destroy__ = _IMP_core.delete_CentroidOfRefined
4442 
4443  def __str__(self):
4444  r"""__str__(CentroidOfRefined self) -> std::string"""
4445  return _IMP_core.CentroidOfRefined___str__(self)
4446 
4447  def __repr__(self):
4448  r"""__repr__(CentroidOfRefined self) -> std::string"""
4449  return _IMP_core.CentroidOfRefined___repr__(self)
4450 
4451  @staticmethod
4452  def get_from(o):
4453  return _object_cast_to_CentroidOfRefined(o)
4454 
4455 
4456  def _get_as_binary(self):
4457  r"""_get_as_binary(CentroidOfRefined self) -> PyObject *"""
4458  return _IMP_core.CentroidOfRefined__get_as_binary(self)
4459 
4460  def _set_from_binary(self, p):
4461  r"""_set_from_binary(CentroidOfRefined self, PyObject * p)"""
4462  return _IMP_core.CentroidOfRefined__set_from_binary(self, p)
4463 
4464  def __getstate__(self):
4465  p = self._get_as_binary()
4466  if len(self.__dict__) > 1:
4467  d = self.__dict__.copy()
4468  del d['this']
4469  p = (d, p)
4470  return p
4471 
4472  def __setstate__(self, p):
4473  if not hasattr(self, 'this'):
4474  self.__init__()
4475  if isinstance(p, tuple):
4476  d, p = p
4477  self.__dict__.update(d)
4478  return self._set_from_binary(p)
4479 
4480 
4481  def _get_jax(self, m, indexes):
4482  import jax.numpy as jnp
4483  refined = [
4484  self.get_refiner().get_refined_indexes(m, IMP.ParticleIndex(index))
4485  for index in indexes]
4486 
4487  def apply_func_unweighted(jm):
4488  for ind, ref in zip(indexes, refined):
4489  xyz = jm['xyz']
4490  jm['xyz'] = xyz.at[ind].set(jnp.average(xyz[ref], axis=0))
4491  return jm
4492 
4493  def apply_func_weighted(jm, weight_key):
4494  for ind, ref in zip(indexes, refined):
4495  xyz = jm['xyz']
4496  weights = jm[weight_key][ref]
4497  jm['xyz'] = xyz.at[ind].set(
4498  jnp.average(xyz[ref], axis=0, weights=weights))
4499  return jm
4500 
4501  keys = frozenset(self.get_keys())
4502  if keys != frozenset(IMP.core.XYZ.get_xyz_keys()):
4503  raise NotImplementedError("Only works for XYZ")
4504 
4505  if self.get_is_weight_null():
4506  return self._wrap_jax(apply_func_unweighted)
4507  else:
4508  weight_key = self.get_weight()
4509  return self._wrap_jax(
4510  functools.partial(apply_func_weighted,
4511  weight_key=weight_key.get_string()),
4512  keys=(weight_key,))
4513 
4514 
4515 # Register CentroidOfRefined in _IMP_core:
4516 _IMP_core.CentroidOfRefined_swigregister(CentroidOfRefined)
4517 class Centroid(XYZ):
4518  r"""Proxy of C++ IMP::core::Centroid class."""
4519 
4520  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4521 
4522  def get_constraint(self):
4523  r"""get_constraint(Centroid self) -> Constraint"""
4524  return _IMP_core.Centroid_get_constraint(self)
4525 
4526  def __init__(self, *args):
4527  r"""
4528  __init__(Centroid self) -> Centroid
4529  __init__(Centroid self, Model m, ParticleIndex id) -> Centroid
4530  __init__(Centroid self, _ParticleAdaptor d) -> Centroid
4531  """
4532  _IMP_core.Centroid_swiginit(self, _IMP_core.new_Centroid(*args))
4533 
4534  def show(self, *args):
4535  r"""show(Centroid self, _ostream out=std::cout)"""
4536  return _IMP_core.Centroid_show(self, *args)
4537 
4538  @staticmethod
4539  def setup_particle(*args):
4540  r"""
4541  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Centroid
4542  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Centroid
4543  setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Centroid
4544  setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Centroid
4545  """
4546  return _IMP_core.Centroid_setup_particle(*args)
4547 
4548  @staticmethod
4549  def get_is_setup(*args):
4550  r"""
4551  get_is_setup(_ParticleAdaptor p) -> bool
4552  get_is_setup(Model m, ParticleIndex pi) -> bool
4553  """
4554  return _IMP_core.Centroid_get_is_setup(*args)
4555 
4556  def add_attribute(self, *args):
4557  r"""
4558  add_attribute(Centroid self, FloatKey k, IMP::Float v, bool opt)
4559  add_attribute(Centroid self, FloatKey a0, IMP::Float a1)
4560  add_attribute(Centroid self, IntKey a0, IMP::Int a1)
4561  add_attribute(Centroid self, FloatsKey a0, IMP::Floats a1)
4562  add_attribute(Centroid self, IntsKey a0, IMP::Ints a1)
4563  add_attribute(Centroid self, StringKey a0, IMP::String a1)
4564  add_attribute(Centroid self, ParticleIndexKey a0, Particle a1)
4565  add_attribute(Centroid self, ObjectKey a0, Object a1)
4566  add_attribute(Centroid self, SparseFloatKey a0, IMP::Float a1)
4567  add_attribute(Centroid self, SparseIntKey a0, IMP::Int a1)
4568  add_attribute(Centroid self, SparseStringKey a0, IMP::String a1)
4569  add_attribute(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4570  """
4571  return _IMP_core.Centroid_add_attribute(self, *args)
4572 
4573  def get_value(self, *args):
4574  r"""
4575  get_value(Centroid self, FloatKey a0) -> IMP::Float
4576  get_value(Centroid self, IntKey a0) -> IMP::Int
4577  get_value(Centroid self, FloatsKey a0) -> IMP::Floats
4578  get_value(Centroid self, IntsKey a0) -> IMP::Ints
4579  get_value(Centroid self, StringKey a0) -> IMP::String
4580  get_value(Centroid self, ParticleIndexKey a0) -> Particle
4581  get_value(Centroid self, ObjectKey a0) -> Object
4582  get_value(Centroid self, SparseFloatKey a0) -> IMP::Float
4583  get_value(Centroid self, SparseIntKey a0) -> IMP::Int
4584  get_value(Centroid self, SparseStringKey a0) -> IMP::String
4585  get_value(Centroid self, SparseParticleIndexKey a0) -> ParticleIndex
4586  """
4587  return _IMP_core.Centroid_get_value(self, *args)
4588 
4589  def set_value(self, *args):
4590  r"""
4591  set_value(Centroid self, FloatKey a0, IMP::Float a1)
4592  set_value(Centroid self, IntKey a0, IMP::Int a1)
4593  set_value(Centroid self, FloatsKey a0, IMP::Floats a1)
4594  set_value(Centroid self, IntsKey a0, IMP::Ints a1)
4595  set_value(Centroid self, StringKey a0, IMP::String a1)
4596  set_value(Centroid self, ParticleIndexKey a0, Particle a1)
4597  set_value(Centroid self, ObjectKey a0, Object a1)
4598  set_value(Centroid self, SparseFloatKey a0, IMP::Float a1)
4599  set_value(Centroid self, SparseIntKey a0, IMP::Int a1)
4600  set_value(Centroid self, SparseStringKey a0, IMP::String a1)
4601  set_value(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4602  """
4603  return _IMP_core.Centroid_set_value(self, *args)
4604 
4605  def remove_attribute(self, *args):
4606  r"""
4607  remove_attribute(Centroid self, FloatKey a0)
4608  remove_attribute(Centroid self, IntKey a0)
4609  remove_attribute(Centroid self, FloatsKey a0)
4610  remove_attribute(Centroid self, IntsKey a0)
4611  remove_attribute(Centroid self, StringKey a0)
4612  remove_attribute(Centroid self, ParticleIndexKey a0)
4613  remove_attribute(Centroid self, ObjectKey a0)
4614  remove_attribute(Centroid self, SparseFloatKey a0)
4615  remove_attribute(Centroid self, SparseIntKey a0)
4616  remove_attribute(Centroid self, SparseStringKey a0)
4617  remove_attribute(Centroid self, SparseParticleIndexKey a0)
4618  """
4619  return _IMP_core.Centroid_remove_attribute(self, *args)
4620 
4621  def has_attribute(self, *args):
4622  r"""
4623  has_attribute(Centroid self, FloatKey a0) -> bool
4624  has_attribute(Centroid self, IntKey a0) -> bool
4625  has_attribute(Centroid self, FloatsKey a0) -> bool
4626  has_attribute(Centroid self, IntsKey a0) -> bool
4627  has_attribute(Centroid self, StringKey a0) -> bool
4628  has_attribute(Centroid self, ParticleIndexKey a0) -> bool
4629  has_attribute(Centroid self, ObjectKey a0) -> bool
4630  has_attribute(Centroid self, SparseFloatKey a0) -> bool
4631  has_attribute(Centroid self, SparseIntKey a0) -> bool
4632  has_attribute(Centroid self, SparseStringKey a0) -> bool
4633  has_attribute(Centroid self, SparseParticleIndexKey a0) -> bool
4634  """
4635  return _IMP_core.Centroid_has_attribute(self, *args)
4636 
4637  def get_derivative(self, a0):
4638  r"""get_derivative(Centroid self, FloatKey a0) -> double"""
4639  return _IMP_core.Centroid_get_derivative(self, a0)
4640 
4641  def get_name(self):
4642  r"""get_name(Centroid self) -> std::string"""
4643  return _IMP_core.Centroid_get_name(self)
4644 
4645  def clear_caches(self):
4646  r"""clear_caches(Centroid self)"""
4647  return _IMP_core.Centroid_clear_caches(self)
4648 
4649  def set_name(self, a0):
4650  r"""set_name(Centroid self, std::string a0)"""
4651  return _IMP_core.Centroid_set_name(self, a0)
4652 
4653  def set_check_level(self, a0):
4654  r"""set_check_level(Centroid self, IMP::CheckLevel a0)"""
4655  return _IMP_core.Centroid_set_check_level(self, a0)
4656 
4657  def add_to_derivative(self, a0, a1, a2):
4658  r"""add_to_derivative(Centroid self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
4659  return _IMP_core.Centroid_add_to_derivative(self, a0, a1, a2)
4660 
4661  def set_is_optimized(self, a0, a1):
4662  r"""set_is_optimized(Centroid self, FloatKey a0, bool a1)"""
4663  return _IMP_core.Centroid_set_is_optimized(self, a0, a1)
4664 
4665  def get_is_optimized(self, a0):
4666  r"""get_is_optimized(Centroid self, FloatKey a0) -> bool"""
4667  return _IMP_core.Centroid_get_is_optimized(self, a0)
4668 
4669  def get_check_level(self):
4670  r"""get_check_level(Centroid self) -> IMP::CheckLevel"""
4671  return _IMP_core.Centroid_get_check_level(self)
4672 
4673  def __eq__(self, *args):
4674  r"""
4675  __eq__(Centroid self, Centroid o) -> bool
4676  __eq__(Centroid self, Particle d) -> bool
4677  """
4678  return _IMP_core.Centroid___eq__(self, *args)
4679 
4680  def __ne__(self, *args):
4681  r"""
4682  __ne__(Centroid self, Centroid o) -> bool
4683  __ne__(Centroid self, Particle d) -> bool
4684  """
4685  return _IMP_core.Centroid___ne__(self, *args)
4686 
4687  def __le__(self, *args):
4688  r"""
4689  __le__(Centroid self, Centroid o) -> bool
4690  __le__(Centroid self, Particle d) -> bool
4691  """
4692  return _IMP_core.Centroid___le__(self, *args)
4693 
4694  def __lt__(self, *args):
4695  r"""
4696  __lt__(Centroid self, Centroid o) -> bool
4697  __lt__(Centroid self, Particle d) -> bool
4698  """
4699  return _IMP_core.Centroid___lt__(self, *args)
4700 
4701  def __ge__(self, *args):
4702  r"""
4703  __ge__(Centroid self, Centroid o) -> bool
4704  __ge__(Centroid self, Particle d) -> bool
4705  """
4706  return _IMP_core.Centroid___ge__(self, *args)
4707 
4708  def __gt__(self, *args):
4709  r"""
4710  __gt__(Centroid self, Centroid o) -> bool
4711  __gt__(Centroid self, Particle d) -> bool
4712  """
4713  return _IMP_core.Centroid___gt__(self, *args)
4714 
4715  def __hash__(self):
4716  r"""__hash__(Centroid self) -> std::size_t"""
4717  return _IMP_core.Centroid___hash__(self)
4718 
4719  def __str__(self):
4720  r"""__str__(Centroid self) -> std::string"""
4721  return _IMP_core.Centroid___str__(self)
4722 
4723  def __repr__(self):
4724  r"""__repr__(Centroid self) -> std::string"""
4725  return _IMP_core.Centroid___repr__(self)
4726 
4727  def _get_as_binary(self):
4728  r"""_get_as_binary(Centroid self) -> PyObject *"""
4729  return _IMP_core.Centroid__get_as_binary(self)
4730 
4731  def _set_from_binary(self, p):
4732  r"""_set_from_binary(Centroid self, PyObject * p)"""
4733  return _IMP_core.Centroid__set_from_binary(self, p)
4734 
4735  def __getstate__(self):
4736  p = self._get_as_binary()
4737  if len(self.__dict__) > 1:
4738  d = self.__dict__.copy()
4739  del d['this']
4740  p = (d, p)
4741  return p
4742 
4743  def __setstate__(self, p):
4744  if not hasattr(self, 'this'):
4745  self.__init__()
4746  if isinstance(p, tuple):
4747  d, p = p
4748  self.__dict__.update(d)
4749  return self._set_from_binary(p)
4750 
4751  __swig_destroy__ = _IMP_core.delete_Centroid
4752 
4753 # Register Centroid in _IMP_core:
4754 _IMP_core.Centroid_swigregister(Centroid)
4755 class ChecksScoreState(IMP.ScoreState):
4756  r"""Proxy of C++ IMP::core::ChecksScoreState class."""
4757 
4758  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4759 
4760  def __init__(self, *args):
4761  r"""
4762  __init__(ChecksScoreState self, Model m, double probability) -> ChecksScoreState
4763  __init__(ChecksScoreState self) -> ChecksScoreState
4764  """
4765  _IMP_core.ChecksScoreState_swiginit(self, _IMP_core.new_ChecksScoreState(*args))
4766 
4767  def get_number_of_checked(self):
4768  r"""get_number_of_checked(ChecksScoreState self) -> unsigned int"""
4769  return _IMP_core.ChecksScoreState_get_number_of_checked(self)
4770 
4771  def do_before_evaluate(self):
4772  r"""do_before_evaluate(ChecksScoreState self)"""
4773  return _IMP_core.ChecksScoreState_do_before_evaluate(self)
4774 
4775  def do_after_evaluate(self, da):
4776  r"""do_after_evaluate(ChecksScoreState self, DerivativeAccumulator da)"""
4777  return _IMP_core.ChecksScoreState_do_after_evaluate(self, da)
4778 
4779  def do_get_outputs(self):
4780  r"""do_get_outputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4781  return _IMP_core.ChecksScoreState_do_get_outputs(self)
4782 
4783  def do_get_inputs(self):
4784  r"""do_get_inputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4785  return _IMP_core.ChecksScoreState_do_get_inputs(self)
4786 
4787  def get_version_info(self):
4788  r"""get_version_info(ChecksScoreState self) -> VersionInfo"""
4789  return _IMP_core.ChecksScoreState_get_version_info(self)
4790  __swig_destroy__ = _IMP_core.delete_ChecksScoreState
4791 
4792  def __str__(self):
4793  r"""__str__(ChecksScoreState self) -> std::string"""
4794  return _IMP_core.ChecksScoreState___str__(self)
4795 
4796  def __repr__(self):
4797  r"""__repr__(ChecksScoreState self) -> std::string"""
4798  return _IMP_core.ChecksScoreState___repr__(self)
4799 
4800  @staticmethod
4801  def get_from(o):
4802  return _object_cast_to_ChecksScoreState(o)
4803 
4804 
4805  def _get_as_binary(self):
4806  r"""_get_as_binary(ChecksScoreState self) -> PyObject *"""
4807  return _IMP_core.ChecksScoreState__get_as_binary(self)
4808 
4809  def _set_from_binary(self, p):
4810  r"""_set_from_binary(ChecksScoreState self, PyObject * p)"""
4811  return _IMP_core.ChecksScoreState__set_from_binary(self, p)
4812 
4813  def __getstate__(self):
4814  p = self._get_as_binary()
4815  if len(self.__dict__) > 1:
4816  d = self.__dict__.copy()
4817  del d['this']
4818  p = (d, p)
4819  return p
4820 
4821  def __setstate__(self, p):
4822  if not hasattr(self, 'this'):
4823  self.__init__()
4824  if isinstance(p, tuple):
4825  d, p = p
4826  self.__dict__.update(d)
4827  return self._set_from_binary(p)
4828 
4829 
4830 # Register ChecksScoreState in _IMP_core:
4831 _IMP_core.ChecksScoreState_swigregister(ChecksScoreState)
4832 class ChildrenRefiner(IMP.Refiner):
4833  r"""Proxy of C++ IMP::core::ChildrenRefiner class."""
4834 
4835  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4836 
4837  def __init__(self, tr):
4838  r"""__init__(ChildrenRefiner self, HierarchyTraits tr) -> ChildrenRefiner"""
4839  _IMP_core.ChildrenRefiner_swiginit(self, _IMP_core.new_ChildrenRefiner(tr))
4840 
4841  def do_get_inputs(self, m, pis):
4842  r"""do_get_inputs(ChildrenRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4843  return _IMP_core.ChildrenRefiner_do_get_inputs(self, m, pis)
4844 
4845  def get_version_info(self):
4846  r"""get_version_info(ChildrenRefiner self) -> VersionInfo"""
4847  return _IMP_core.ChildrenRefiner_get_version_info(self)
4848  __swig_destroy__ = _IMP_core.delete_ChildrenRefiner
4849 
4850  def __str__(self):
4851  r"""__str__(ChildrenRefiner self) -> std::string"""
4852  return _IMP_core.ChildrenRefiner___str__(self)
4853 
4854  def __repr__(self):
4855  r"""__repr__(ChildrenRefiner self) -> std::string"""
4856  return _IMP_core.ChildrenRefiner___repr__(self)
4857 
4858  @staticmethod
4859  def get_from(o):
4860  return _object_cast_to_ChildrenRefiner(o)
4861 
4862 
4863 # Register ChildrenRefiner in _IMP_core:
4864 _IMP_core.ChildrenRefiner_swigregister(ChildrenRefiner)
4865 class ClosedCubicSpline(IMP.UnaryFunction):
4866  r"""Proxy of C++ IMP::core::ClosedCubicSpline class."""
4867 
4868  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4869 
4870  def __init__(self, values, minrange, spacing):
4871  r"""__init__(ClosedCubicSpline self, IMP::Floats const & values, double minrange, double spacing) -> ClosedCubicSpline"""
4872  _IMP_core.ClosedCubicSpline_swiginit(self, _IMP_core.new_ClosedCubicSpline(values, minrange, spacing))
4873 
4874  def get_version_info(self):
4875  r"""get_version_info(ClosedCubicSpline self) -> VersionInfo"""
4876  return _IMP_core.ClosedCubicSpline_get_version_info(self)
4877  __swig_destroy__ = _IMP_core.delete_ClosedCubicSpline
4878 
4879  def do_show(self, out):
4880  r"""do_show(ClosedCubicSpline self, _ostream out)"""
4881  return _IMP_core.ClosedCubicSpline_do_show(self, out)
4882 
4883  def get_minrange(self):
4884  r"""get_minrange(ClosedCubicSpline self) -> IMP::Float"""
4885  return _IMP_core.ClosedCubicSpline_get_minrange(self)
4886 
4887  def get_spacing(self):
4888  r"""get_spacing(ClosedCubicSpline self) -> IMP::Float"""
4889  return _IMP_core.ClosedCubicSpline_get_spacing(self)
4890 
4891  def get_values(self):
4892  r"""get_values(ClosedCubicSpline self) -> IMP::Floats"""
4893  return _IMP_core.ClosedCubicSpline_get_values(self)
4894 
4895  def get_second_derivatives(self):
4896  r"""get_second_derivatives(ClosedCubicSpline self) -> IMP::Floats"""
4897  return _IMP_core.ClosedCubicSpline_get_second_derivatives(self)
4898 
4899  def __str__(self):
4900  r"""__str__(ClosedCubicSpline self) -> std::string"""
4901  return _IMP_core.ClosedCubicSpline___str__(self)
4902 
4903  def __repr__(self):
4904  r"""__repr__(ClosedCubicSpline self) -> std::string"""
4905  return _IMP_core.ClosedCubicSpline___repr__(self)
4906 
4907  @staticmethod
4908  def get_from(o):
4909  return _object_cast_to_ClosedCubicSpline(o)
4910 
4911 
4912  def _get_jax(self):
4913  import jax.numpy as jnp
4914  from IMP.core._jax_util import _spline
4915  def score(feature, minrange, spacing, values, second_derivs):
4916  # determine bin index and thus the cubic fragment to use:
4917  lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
4918  # enforce periodicity - wrap around from n to 0
4919  highbin = jnp.remainder(lowbin + 1, len(values))
4920  return _spline(feature, minrange, lowbin, highbin, spacing,
4921  values, second_derivs)
4922  return functools.partial(
4923  score, minrange=self.get_minrange(),
4924  spacing=self.get_spacing(), values=jnp.asarray(self.get_values()),
4925  second_derivs=jnp.asarray(self.get_second_derivatives()))
4926 
4927 
4928 # Register ClosedCubicSpline in _IMP_core:
4929 _IMP_core.ClosedCubicSpline_swigregister(ClosedCubicSpline)
4930 class KClosePairsPairScore(IMP.PairScore):
4931  r"""Proxy of C++ IMP::core::KClosePairsPairScore class."""
4932 
4933  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4934 
4935  def __init__(self, f, r, k=1):
4936  r"""__init__(KClosePairsPairScore self, PairScore f, Refiner r, int k=1) -> KClosePairsPairScore"""
4937  _IMP_core.KClosePairsPairScore_swiginit(self, _IMP_core.new_KClosePairsPairScore(f, r, k))
4938 
4939  def get_close_pairs(self, pp):
4940  r"""get_close_pairs(KClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
4941  return _IMP_core.KClosePairsPairScore_get_close_pairs(self, pp)
4942 
4943  def create_current_decomposition(self, m, vt):
4944  r"""create_current_decomposition(KClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
4945  return _IMP_core.KClosePairsPairScore_create_current_decomposition(self, m, vt)
4946 
4947  def do_get_inputs(self, m, pis):
4948  r"""do_get_inputs(KClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4949  return _IMP_core.KClosePairsPairScore_do_get_inputs(self, m, pis)
4950 
4951  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
4952  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"""
4953  return _IMP_core.KClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
4954 
4955  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
4956  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"""
4957  return _IMP_core.KClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
4958 
4959  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
4960  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"""
4961  return _IMP_core.KClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
4962 
4963  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
4964  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"""
4965  return _IMP_core.KClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
4966 
4967  def get_version_info(self):
4968  r"""get_version_info(KClosePairsPairScore self) -> VersionInfo"""
4969  return _IMP_core.KClosePairsPairScore_get_version_info(self)
4970  __swig_destroy__ = _IMP_core.delete_KClosePairsPairScore
4971 
4972  def __str__(self):
4973  r"""__str__(KClosePairsPairScore self) -> std::string"""
4974  return _IMP_core.KClosePairsPairScore___str__(self)
4975 
4976  def __repr__(self):
4977  r"""__repr__(KClosePairsPairScore self) -> std::string"""
4978  return _IMP_core.KClosePairsPairScore___repr__(self)
4979 
4980  @staticmethod
4981  def get_from(o):
4982  return _object_cast_to_KClosePairsPairScore(o)
4983 
4984 
4985 # Register KClosePairsPairScore in _IMP_core:
4986 _IMP_core.KClosePairsPairScore_swigregister(KClosePairsPairScore)
4987 class ClosePairsPairScore(IMP.PairScore):
4988  r"""Proxy of C++ IMP::core::ClosePairsPairScore class."""
4989 
4990  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4991 
4992  def __init__(self, f, r, max_distance):
4993  r"""__init__(ClosePairsPairScore self, PairScore f, Refiner r, IMP::Float max_distance) -> ClosePairsPairScore"""
4994  _IMP_core.ClosePairsPairScore_swiginit(self, _IMP_core.new_ClosePairsPairScore(f, r, max_distance))
4995 
4996  def get_close_pairs(self, pp):
4997  r"""get_close_pairs(ClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
4998  return _IMP_core.ClosePairsPairScore_get_close_pairs(self, pp)
4999 
5000  def create_current_decomposition(self, m, vt):
5001  r"""create_current_decomposition(ClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
5002  return _IMP_core.ClosePairsPairScore_create_current_decomposition(self, m, vt)
5003 
5004  def do_get_inputs(self, m, pis):
5005  r"""do_get_inputs(ClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5006  return _IMP_core.ClosePairsPairScore_do_get_inputs(self, m, pis)
5007 
5008  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
5009  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"""
5010  return _IMP_core.ClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
5011 
5012  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
5013  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"""
5014  return _IMP_core.ClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
5015 
5016  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
5017  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"""
5018  return _IMP_core.ClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
5019 
5020  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
5021  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"""
5022  return _IMP_core.ClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
5023 
5024  def get_version_info(self):
5025  r"""get_version_info(ClosePairsPairScore self) -> VersionInfo"""
5026  return _IMP_core.ClosePairsPairScore_get_version_info(self)
5027  __swig_destroy__ = _IMP_core.delete_ClosePairsPairScore
5028 
5029  def __str__(self):
5030  r"""__str__(ClosePairsPairScore self) -> std::string"""
5031  return _IMP_core.ClosePairsPairScore___str__(self)
5032 
5033  def __repr__(self):
5034  r"""__repr__(ClosePairsPairScore self) -> std::string"""
5035  return _IMP_core.ClosePairsPairScore___repr__(self)
5036 
5037  @staticmethod
5038  def get_from(o):
5039  return _object_cast_to_ClosePairsPairScore(o)
5040 
5041 
5042 # Register ClosePairsPairScore in _IMP_core:
5043 _IMP_core.ClosePairsPairScore_swigregister(ClosePairsPairScore)
5044 class ConjugateGradients(IMP.AttributeOptimizer):
5045  r"""Proxy of C++ IMP::core::ConjugateGradients class."""
5046 
5047  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5048 
5049  def __init__(self, *args):
5050  r"""
5051  __init__(ConjugateGradients self, Model m, std::string name="ConjugateGradients%1%") -> ConjugateGradients
5052  __init__(ConjugateGradients self) -> ConjugateGradients
5053  """
5054  _IMP_core.ConjugateGradients_swiginit(self, _IMP_core.new_ConjugateGradients(*args))
5055 
5056  def set_gradient_threshold(self, t):
5057  r"""set_gradient_threshold(ConjugateGradients self, IMP::Float t)"""
5058  return _IMP_core.ConjugateGradients_set_gradient_threshold(self, t)
5059 
5060  def set_max_change(self, t):
5061  r"""set_max_change(ConjugateGradients self, IMP::Float t)"""
5062  return _IMP_core.ConjugateGradients_set_max_change(self, t)
5063 
5064  def do_optimize(self, max_steps):
5065  r"""do_optimize(ConjugateGradients self, unsigned int max_steps) -> IMP::Float"""
5066  return _IMP_core.ConjugateGradients_do_optimize(self, max_steps)
5067 
5068  def get_version_info(self):
5069  r"""get_version_info(ConjugateGradients self) -> VersionInfo"""
5070  return _IMP_core.ConjugateGradients_get_version_info(self)
5071  __swig_destroy__ = _IMP_core.delete_ConjugateGradients
5072 
5073  def __str__(self):
5074  r"""__str__(ConjugateGradients self) -> std::string"""
5075  return _IMP_core.ConjugateGradients___str__(self)
5076 
5077  def __repr__(self):
5078  r"""__repr__(ConjugateGradients self) -> std::string"""
5079  return _IMP_core.ConjugateGradients___repr__(self)
5080 
5081  @staticmethod
5082  def get_from(o):
5083  return _object_cast_to_ConjugateGradients(o)
5084 
5085 
5086  def _get_as_binary(self):
5087  r"""_get_as_binary(ConjugateGradients self) -> PyObject *"""
5088  return _IMP_core.ConjugateGradients__get_as_binary(self)
5089 
5090  def _set_from_binary(self, p):
5091  r"""_set_from_binary(ConjugateGradients self, PyObject * p)"""
5092  return _IMP_core.ConjugateGradients__set_from_binary(self, p)
5093 
5094  def __getstate__(self):
5095  p = self._get_as_binary()
5096  if len(self.__dict__) > 1:
5097  d = self.__dict__.copy()
5098  del d['this']
5099  p = (d, p)
5100  return p
5101 
5102  def __setstate__(self, p):
5103  if not hasattr(self, 'this'):
5104  self.__init__()
5105  if isinstance(p, tuple):
5106  d, p = p
5107  self.__dict__.update(d)
5108  return self._set_from_binary(p)
5109 
5110 
5111 # Register ConjugateGradients in _IMP_core:
5112 _IMP_core.ConjugateGradients_swigregister(ConjugateGradients)
5113 class ConnectivityRestraint(IMP.Restraint):
5114  r"""Proxy of C++ IMP::core::ConnectivityRestraint class."""
5115 
5116  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5117 
5118  def __init__(self, ps, sc):
5119  r"""__init__(ConnectivityRestraint self, PairScore ps, _SingletonContainerAdaptor sc) -> ConnectivityRestraint"""
5120  _IMP_core.ConnectivityRestraint_swiginit(self, _IMP_core.new_ConnectivityRestraint(ps, sc))
5121 
5122  def get_connected_index_pairs(self):
5123  r"""get_connected_index_pairs(ConnectivityRestraint self) -> IMP::ParticleIndexPairs"""
5124  return _IMP_core.ConnectivityRestraint_get_connected_index_pairs(self)
5125 
5126  def get_pair_score(self):
5127  r"""get_pair_score(ConnectivityRestraint self) -> PairScore"""
5128  return _IMP_core.ConnectivityRestraint_get_pair_score(self)
5129 
5130  def do_create_current_decomposition(self):
5131  r"""do_create_current_decomposition(ConnectivityRestraint self) -> IMP::Restraints"""
5132  return _IMP_core.ConnectivityRestraint_do_create_current_decomposition(self)
5133 
5134  def do_get_inputs(self):
5135  r"""do_get_inputs(ConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
5136  return _IMP_core.ConnectivityRestraint_do_get_inputs(self)
5137 
5138  def get_version_info(self):
5139  r"""get_version_info(ConnectivityRestraint self) -> VersionInfo"""
5140  return _IMP_core.ConnectivityRestraint_get_version_info(self)
5141  __swig_destroy__ = _IMP_core.delete_ConnectivityRestraint
5142 
5143  def __str__(self):
5144  r"""__str__(ConnectivityRestraint self) -> std::string"""
5145  return _IMP_core.ConnectivityRestraint___str__(self)
5146 
5147  def __repr__(self):
5148  r"""__repr__(ConnectivityRestraint self) -> std::string"""
5149  return _IMP_core.ConnectivityRestraint___repr__(self)
5150 
5151  @staticmethod
5152  def get_from(o):
5153  return _object_cast_to_ConnectivityRestraint(o)
5154 
5155 
5156 # Register ConnectivityRestraint in _IMP_core:
5157 _IMP_core.ConnectivityRestraint_swigregister(ConnectivityRestraint)
5158 class ConstantRestraint(IMP.Restraint):
5159  r"""Proxy of C++ IMP::core::ConstantRestraint class."""
5160 
5161  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5162 
5163  def __init__(self, *args):
5164  r"""
5165  __init__(ConstantRestraint self, Model m, IMP::Float v) -> ConstantRestraint
5166  __init__(ConstantRestraint self) -> ConstantRestraint
5167  """
5168  _IMP_core.ConstantRestraint_swiginit(self, _IMP_core.new_ConstantRestraint(*args))
5169 
5170  def do_get_inputs(self):
5171  r"""do_get_inputs(ConstantRestraint self) -> IMP::ModelObjectsTemp"""
5172  return _IMP_core.ConstantRestraint_do_get_inputs(self)
5173 
5174  def get_version_info(self):
5175  r"""get_version_info(ConstantRestraint self) -> VersionInfo"""
5176  return _IMP_core.ConstantRestraint_get_version_info(self)
5177  __swig_destroy__ = _IMP_core.delete_ConstantRestraint
5178 
5179  def __str__(self):
5180  r"""__str__(ConstantRestraint self) -> std::string"""
5181  return _IMP_core.ConstantRestraint___str__(self)
5182 
5183  def __repr__(self):
5184  r"""__repr__(ConstantRestraint self) -> std::string"""
5185  return _IMP_core.ConstantRestraint___repr__(self)
5186 
5187  @staticmethod
5188  def get_from(o):
5189  return _object_cast_to_ConstantRestraint(o)
5190 
5191 
5192  def _get_as_binary(self):
5193  r"""_get_as_binary(ConstantRestraint self) -> PyObject *"""
5194  return _IMP_core.ConstantRestraint__get_as_binary(self)
5195 
5196  def _set_from_binary(self, p):
5197  r"""_set_from_binary(ConstantRestraint self, PyObject * p)"""
5198  return _IMP_core.ConstantRestraint__set_from_binary(self, p)
5199 
5200  def __getstate__(self):
5201  p = self._get_as_binary()
5202  if len(self.__dict__) > 1:
5203  d = self.__dict__.copy()
5204  del d['this']
5205  p = (d, p)
5206  return p
5207 
5208  def __setstate__(self, p):
5209  if not hasattr(self, 'this'):
5210  self.__init__()
5211  if isinstance(p, tuple):
5212  d, p = p
5213  self.__dict__.update(d)
5214  return self._set_from_binary(p)
5215 
5216 
5217 # Register ConstantRestraint in _IMP_core:
5218 _IMP_core.ConstantRestraint_swigregister(ConstantRestraint)
5219 class Cosine(IMP.UnaryFunction):
5220  r"""Proxy of C++ IMP::core::Cosine class."""
5221 
5222  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5223 
5224  def __init__(self, *args):
5225  r"""
5226  __init__(Cosine self, IMP::Float force_constant, int periodicity, IMP::Float phase) -> Cosine
5227  __init__(Cosine self) -> Cosine
5228  """
5229  _IMP_core.Cosine_swiginit(self, _IMP_core.new_Cosine(*args))
5230 
5231  def get_force_constant(self):
5232  r"""get_force_constant(Cosine self) -> IMP::Float"""
5233  return _IMP_core.Cosine_get_force_constant(self)
5234 
5235  def get_periodicity(self):
5236  r"""get_periodicity(Cosine self) -> int"""
5237  return _IMP_core.Cosine_get_periodicity(self)
5238 
5239  def get_phase(self):
5240  r"""get_phase(Cosine self) -> IMP::Float"""
5241  return _IMP_core.Cosine_get_phase(self)
5242 
5243  def get_version_info(self):
5244  r"""get_version_info(Cosine self) -> VersionInfo"""
5245  return _IMP_core.Cosine_get_version_info(self)
5246  __swig_destroy__ = _IMP_core.delete_Cosine
5247 
5248  def do_show(self, out):
5249  r"""do_show(Cosine self, _ostream out)"""
5250  return _IMP_core.Cosine_do_show(self, out)
5251 
5252  def __str__(self):
5253  r"""__str__(Cosine self) -> std::string"""
5254  return _IMP_core.Cosine___str__(self)
5255 
5256  def __repr__(self):
5257  r"""__repr__(Cosine self) -> std::string"""
5258  return _IMP_core.Cosine___repr__(self)
5259 
5260  @staticmethod
5261  def get_from(o):
5262  return _object_cast_to_Cosine(o)
5263 
5264 
5265  def _get_as_binary(self):
5266  r"""_get_as_binary(Cosine self) -> PyObject *"""
5267  return _IMP_core.Cosine__get_as_binary(self)
5268 
5269  def _set_from_binary(self, p):
5270  r"""_set_from_binary(Cosine self, PyObject * p)"""
5271  return _IMP_core.Cosine__set_from_binary(self, p)
5272 
5273  def __getstate__(self):
5274  p = self._get_as_binary()
5275  if len(self.__dict__) > 1:
5276  d = self.__dict__.copy()
5277  del d['this']
5278  p = (d, p)
5279  return p
5280 
5281  def __setstate__(self, p):
5282  if not hasattr(self, 'this'):
5283  self.__init__()
5284  if isinstance(p, tuple):
5285  d, p = p
5286  self.__dict__.update(d)
5287  return self._set_from_binary(p)
5288 
5289 
5290  def _get_jax(self):
5291  import jax.numpy as jnp
5292  def score(val, k, period, phase):
5293  return jnp.abs(k) - k * jnp.cos(period * val + phase)
5294  return functools.partial(score, k=self.get_force_constant(),
5295  period=self.get_periodicity(),
5296  phase=self.get_phase())
5297 
5298 
5299 # Register Cosine in _IMP_core:
5300 _IMP_core.Cosine_swigregister(Cosine)
5301 class CoverRefined(IMP.SingletonModifier):
5302  r"""Proxy of C++ IMP::core::CoverRefined class."""
5303 
5304  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5305 
5306  def __init__(self, ref, slack=0):
5307  r"""__init__(CoverRefined self, Refiner ref, IMP::Float slack=0) -> CoverRefined"""
5308  _IMP_core.CoverRefined_swiginit(self, _IMP_core.new_CoverRefined(ref, slack))
5309 
5310  def set_slack(self, slack):
5311  r"""set_slack(CoverRefined self, IMP::Float slack)"""
5312  return _IMP_core.CoverRefined_set_slack(self, slack)
5313 
5314  def do_get_inputs(self, m, pis):
5315  r"""do_get_inputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5316  return _IMP_core.CoverRefined_do_get_inputs(self, m, pis)
5317 
5318  def do_get_outputs(self, m, pis):
5319  r"""do_get_outputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5320  return _IMP_core.CoverRefined_do_get_outputs(self, m, pis)
5321 
5322  def get_version_info(self):
5323  r"""get_version_info(CoverRefined self) -> VersionInfo"""
5324  return _IMP_core.CoverRefined_get_version_info(self)
5325  __swig_destroy__ = _IMP_core.delete_CoverRefined
5326 
5327  def __str__(self):
5328  r"""__str__(CoverRefined self) -> std::string"""
5329  return _IMP_core.CoverRefined___str__(self)
5330 
5331  def __repr__(self):
5332  r"""__repr__(CoverRefined self) -> std::string"""
5333  return _IMP_core.CoverRefined___repr__(self)
5334 
5335  @staticmethod
5336  def get_from(o):
5337  return _object_cast_to_CoverRefined(o)
5338 
5339 
5340 # Register CoverRefined in _IMP_core:
5341 _IMP_core.CoverRefined_swigregister(CoverRefined)
5342 class Cover(XYZR):
5343  r"""Proxy of C++ IMP::core::Cover class."""
5344 
5345  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5346 
5347  def get_constraint(self):
5348  r"""get_constraint(Cover self) -> Constraint"""
5349  return _IMP_core.Cover_get_constraint(self)
5350 
5351  def __init__(self, *args):
5352  r"""
5353  __init__(Cover self) -> Cover
5354  __init__(Cover self, Model m, ParticleIndex id) -> Cover
5355  __init__(Cover self, _ParticleAdaptor d) -> Cover
5356  """
5357  _IMP_core.Cover_swiginit(self, _IMP_core.new_Cover(*args))
5358 
5359  def show(self, *args):
5360  r"""show(Cover self, _ostream out=std::cout)"""
5361  return _IMP_core.Cover_show(self, *args)
5362 
5363  @staticmethod
5364  def setup_particle(*args):
5365  r"""
5366  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Cover
5367  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Cover
5368  setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Cover
5369  setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Cover
5370  """
5371  return _IMP_core.Cover_setup_particle(*args)
5372 
5373  @staticmethod
5374  def get_is_setup(*args):
5375  r"""
5376  get_is_setup(_ParticleAdaptor p) -> bool
5377  get_is_setup(Model m, ParticleIndex pi) -> bool
5378  """
5379  return _IMP_core.Cover_get_is_setup(*args)
5380 
5381  def add_attribute(self, *args):
5382  r"""
5383  add_attribute(Cover self, FloatKey k, IMP::Float v, bool opt)
5384  add_attribute(Cover self, FloatKey a0, IMP::Float a1)
5385  add_attribute(Cover self, IntKey a0, IMP::Int a1)
5386  add_attribute(Cover self, FloatsKey a0, IMP::Floats a1)
5387  add_attribute(Cover self, IntsKey a0, IMP::Ints a1)
5388  add_attribute(Cover self, StringKey a0, IMP::String a1)
5389  add_attribute(Cover self, ParticleIndexKey a0, Particle a1)
5390  add_attribute(Cover self, ObjectKey a0, Object a1)
5391  add_attribute(Cover self, SparseFloatKey a0, IMP::Float a1)
5392  add_attribute(Cover self, SparseIntKey a0, IMP::Int a1)
5393  add_attribute(Cover self, SparseStringKey a0, IMP::String a1)
5394  add_attribute(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5395  """
5396  return _IMP_core.Cover_add_attribute(self, *args)
5397 
5398  def get_value(self, *args):
5399  r"""
5400  get_value(Cover self, FloatKey a0) -> IMP::Float
5401  get_value(Cover self, IntKey a0) -> IMP::Int
5402  get_value(Cover self, FloatsKey a0) -> IMP::Floats
5403  get_value(Cover self, IntsKey a0) -> IMP::Ints
5404  get_value(Cover self, StringKey a0) -> IMP::String
5405  get_value(Cover self, ParticleIndexKey a0) -> Particle
5406  get_value(Cover self, ObjectKey a0) -> Object
5407  get_value(Cover self, SparseFloatKey a0) -> IMP::Float
5408  get_value(Cover self, SparseIntKey a0) -> IMP::Int
5409  get_value(Cover self, SparseStringKey a0) -> IMP::String
5410  get_value(Cover self, SparseParticleIndexKey a0) -> ParticleIndex
5411  """
5412  return _IMP_core.Cover_get_value(self, *args)
5413 
5414  def set_value(self, *args):
5415  r"""
5416  set_value(Cover self, FloatKey a0, IMP::Float a1)
5417  set_value(Cover self, IntKey a0, IMP::Int a1)
5418  set_value(Cover self, FloatsKey a0, IMP::Floats a1)
5419  set_value(Cover self, IntsKey a0, IMP::Ints a1)
5420  set_value(Cover self, StringKey a0, IMP::String a1)
5421  set_value(Cover self, ParticleIndexKey a0, Particle a1)
5422  set_value(Cover self, ObjectKey a0, Object a1)
5423  set_value(Cover self, SparseFloatKey a0, IMP::Float a1)
5424  set_value(Cover self, SparseIntKey a0, IMP::Int a1)
5425  set_value(Cover self, SparseStringKey a0, IMP::String a1)
5426  set_value(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5427  """
5428  return _IMP_core.Cover_set_value(self, *args)
5429 
5430  def remove_attribute(self, *args):
5431  r"""
5432  remove_attribute(Cover self, FloatKey a0)
5433  remove_attribute(Cover self, IntKey a0)
5434  remove_attribute(Cover self, FloatsKey a0)
5435  remove_attribute(Cover self, IntsKey a0)
5436  remove_attribute(Cover self, StringKey a0)
5437  remove_attribute(Cover self, ParticleIndexKey a0)
5438  remove_attribute(Cover self, ObjectKey a0)
5439  remove_attribute(Cover self, SparseFloatKey a0)
5440  remove_attribute(Cover self, SparseIntKey a0)
5441  remove_attribute(Cover self, SparseStringKey a0)
5442  remove_attribute(Cover self, SparseParticleIndexKey a0)
5443  """
5444  return _IMP_core.Cover_remove_attribute(self, *args)
5445 
5446  def has_attribute(self, *args):
5447  r"""
5448  has_attribute(Cover self, FloatKey a0) -> bool
5449  has_attribute(Cover self, IntKey a0) -> bool
5450  has_attribute(Cover self, FloatsKey a0) -> bool
5451  has_attribute(Cover self, IntsKey a0) -> bool
5452  has_attribute(Cover self, StringKey a0) -> bool
5453  has_attribute(Cover self, ParticleIndexKey a0) -> bool
5454  has_attribute(Cover self, ObjectKey a0) -> bool
5455  has_attribute(Cover self, SparseFloatKey a0) -> bool
5456  has_attribute(Cover self, SparseIntKey a0) -> bool
5457  has_attribute(Cover self, SparseStringKey a0) -> bool
5458  has_attribute(Cover self, SparseParticleIndexKey a0) -> bool
5459  """
5460  return _IMP_core.Cover_has_attribute(self, *args)
5461 
5462  def get_derivative(self, a0):
5463  r"""get_derivative(Cover self, FloatKey a0) -> double"""
5464  return _IMP_core.Cover_get_derivative(self, a0)
5465 
5466  def get_name(self):
5467  r"""get_name(Cover self) -> std::string"""
5468  return _IMP_core.Cover_get_name(self)
5469 
5470  def clear_caches(self):
5471  r"""clear_caches(Cover self)"""
5472  return _IMP_core.Cover_clear_caches(self)
5473 
5474  def set_name(self, a0):
5475  r"""set_name(Cover self, std::string a0)"""
5476  return _IMP_core.Cover_set_name(self, a0)
5477 
5478  def set_check_level(self, a0):
5479  r"""set_check_level(Cover self, IMP::CheckLevel a0)"""
5480  return _IMP_core.Cover_set_check_level(self, a0)
5481 
5482  def add_to_derivative(self, a0, a1, a2):
5483  r"""add_to_derivative(Cover self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5484  return _IMP_core.Cover_add_to_derivative(self, a0, a1, a2)
5485 
5486  def set_is_optimized(self, a0, a1):
5487  r"""set_is_optimized(Cover self, FloatKey a0, bool a1)"""
5488  return _IMP_core.Cover_set_is_optimized(self, a0, a1)
5489 
5490  def get_is_optimized(self, a0):
5491  r"""get_is_optimized(Cover self, FloatKey a0) -> bool"""
5492  return _IMP_core.Cover_get_is_optimized(self, a0)
5493 
5494  def get_check_level(self):
5495  r"""get_check_level(Cover self) -> IMP::CheckLevel"""
5496  return _IMP_core.Cover_get_check_level(self)
5497 
5498  def __eq__(self, *args):
5499  r"""
5500  __eq__(Cover self, Cover o) -> bool
5501  __eq__(Cover self, Particle d) -> bool
5502  """
5503  return _IMP_core.Cover___eq__(self, *args)
5504 
5505  def __ne__(self, *args):
5506  r"""
5507  __ne__(Cover self, Cover o) -> bool
5508  __ne__(Cover self, Particle d) -> bool
5509  """
5510  return _IMP_core.Cover___ne__(self, *args)
5511 
5512  def __le__(self, *args):
5513  r"""
5514  __le__(Cover self, Cover o) -> bool
5515  __le__(Cover self, Particle d) -> bool
5516  """
5517  return _IMP_core.Cover___le__(self, *args)
5518 
5519  def __lt__(self, *args):
5520  r"""
5521  __lt__(Cover self, Cover o) -> bool
5522  __lt__(Cover self, Particle d) -> bool
5523  """
5524  return _IMP_core.Cover___lt__(self, *args)
5525 
5526  def __ge__(self, *args):
5527  r"""
5528  __ge__(Cover self, Cover o) -> bool
5529  __ge__(Cover self, Particle d) -> bool
5530  """
5531  return _IMP_core.Cover___ge__(self, *args)
5532 
5533  def __gt__(self, *args):
5534  r"""
5535  __gt__(Cover self, Cover o) -> bool
5536  __gt__(Cover self, Particle d) -> bool
5537  """
5538  return _IMP_core.Cover___gt__(self, *args)
5539 
5540  def __hash__(self):
5541  r"""__hash__(Cover self) -> std::size_t"""
5542  return _IMP_core.Cover___hash__(self)
5543 
5544  def __str__(self):
5545  r"""__str__(Cover self) -> std::string"""
5546  return _IMP_core.Cover___str__(self)
5547 
5548  def __repr__(self):
5549  r"""__repr__(Cover self) -> std::string"""
5550  return _IMP_core.Cover___repr__(self)
5551 
5552  def _get_as_binary(self):
5553  r"""_get_as_binary(Cover self) -> PyObject *"""
5554  return _IMP_core.Cover__get_as_binary(self)
5555 
5556  def _set_from_binary(self, p):
5557  r"""_set_from_binary(Cover self, PyObject * p)"""
5558  return _IMP_core.Cover__set_from_binary(self, p)
5559 
5560  def __getstate__(self):
5561  p = self._get_as_binary()
5562  if len(self.__dict__) > 1:
5563  d = self.__dict__.copy()
5564  del d['this']
5565  p = (d, p)
5566  return p
5567 
5568  def __setstate__(self, p):
5569  if not hasattr(self, 'this'):
5570  self.__init__()
5571  if isinstance(p, tuple):
5572  d, p = p
5573  self.__dict__.update(d)
5574  return self._set_from_binary(p)
5575 
5576  __swig_destroy__ = _IMP_core.delete_Cover
5577 
5578 # Register Cover in _IMP_core:
5579 _IMP_core.Cover_swigregister(Cover)
5580 class DerivativesFromRefined(IMP.SingletonModifier):
5581  r"""Proxy of C++ IMP::core::DerivativesFromRefined class."""
5582 
5583  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5584 
5585  def __init__(self, *args):
5586  r"""__init__(DerivativesFromRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesFromRefined"""
5587  _IMP_core.DerivativesFromRefined_swiginit(self, _IMP_core.new_DerivativesFromRefined(*args))
5588 
5589  def do_get_inputs(self, m, pis):
5590  r"""do_get_inputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5591  return _IMP_core.DerivativesFromRefined_do_get_inputs(self, m, pis)
5592 
5593  def do_get_outputs(self, m, pis):
5594  r"""do_get_outputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5595  return _IMP_core.DerivativesFromRefined_do_get_outputs(self, m, pis)
5596 
5597  def get_version_info(self):
5598  r"""get_version_info(DerivativesFromRefined self) -> VersionInfo"""
5599  return _IMP_core.DerivativesFromRefined_get_version_info(self)
5600  __swig_destroy__ = _IMP_core.delete_DerivativesFromRefined
5601 
5602  def __str__(self):
5603  r"""__str__(DerivativesFromRefined self) -> std::string"""
5604  return _IMP_core.DerivativesFromRefined___str__(self)
5605 
5606  def __repr__(self):
5607  r"""__repr__(DerivativesFromRefined self) -> std::string"""
5608  return _IMP_core.DerivativesFromRefined___repr__(self)
5609 
5610  @staticmethod
5611  def get_from(o):
5612  return _object_cast_to_DerivativesFromRefined(o)
5613 
5614 
5615 # Register DerivativesFromRefined in _IMP_core:
5616 _IMP_core.DerivativesFromRefined_swigregister(DerivativesFromRefined)
5617 class DerivativesToRefined(IMP.SingletonModifier):
5618  r"""Proxy of C++ IMP::core::DerivativesToRefined class."""
5619 
5620  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5621 
5622  def __init__(self, *args):
5623  r"""
5624  __init__(DerivativesToRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesToRefined
5625  __init__(DerivativesToRefined self) -> DerivativesToRefined
5626  """
5627  _IMP_core.DerivativesToRefined_swiginit(self, _IMP_core.new_DerivativesToRefined(*args))
5628 
5629  def do_get_inputs(self, m, pis):
5630  r"""do_get_inputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5631  return _IMP_core.DerivativesToRefined_do_get_inputs(self, m, pis)
5632 
5633  def do_get_outputs(self, m, pis):
5634  r"""do_get_outputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5635  return _IMP_core.DerivativesToRefined_do_get_outputs(self, m, pis)
5636 
5637  def get_version_info(self):
5638  r"""get_version_info(DerivativesToRefined self) -> VersionInfo"""
5639  return _IMP_core.DerivativesToRefined_get_version_info(self)
5640  __swig_destroy__ = _IMP_core.delete_DerivativesToRefined
5641 
5642  def __str__(self):
5643  r"""__str__(DerivativesToRefined self) -> std::string"""
5644  return _IMP_core.DerivativesToRefined___str__(self)
5645 
5646  def __repr__(self):
5647  r"""__repr__(DerivativesToRefined self) -> std::string"""
5648  return _IMP_core.DerivativesToRefined___repr__(self)
5649 
5650  @staticmethod
5651  def get_from(o):
5652  return _object_cast_to_DerivativesToRefined(o)
5653 
5654 
5655  def _get_as_binary(self):
5656  r"""_get_as_binary(DerivativesToRefined self) -> PyObject *"""
5657  return _IMP_core.DerivativesToRefined__get_as_binary(self)
5658 
5659  def _set_from_binary(self, p):
5660  r"""_set_from_binary(DerivativesToRefined self, PyObject * p)"""
5661  return _IMP_core.DerivativesToRefined__set_from_binary(self, p)
5662 
5663  def __getstate__(self):
5664  p = self._get_as_binary()
5665  if len(self.__dict__) > 1:
5666  d = self.__dict__.copy()
5667  del d['this']
5668  p = (d, p)
5669  return p
5670 
5671  def __setstate__(self, p):
5672  if not hasattr(self, 'this'):
5673  self.__init__()
5674  if isinstance(p, tuple):
5675  d, p = p
5676  self.__dict__.update(d)
5677  return self._set_from_binary(p)
5678 
5679 
5680 # Register DerivativesToRefined in _IMP_core:
5681 _IMP_core.DerivativesToRefined_swigregister(DerivativesToRefined)
5682 class DiameterRestraint(IMP.Restraint):
5683  r"""Proxy of C++ IMP::core::DiameterRestraint class."""
5684 
5685  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5686 
5687  def __init__(self, f, sc, diameter):
5688  r"""__init__(DiameterRestraint self, UnaryFunction f, SingletonContainer sc, IMP::Float diameter) -> DiameterRestraint"""
5689  _IMP_core.DiameterRestraint_swiginit(self, _IMP_core.new_DiameterRestraint(f, sc, diameter))
5690 
5691  def do_get_inputs(self):
5692  r"""do_get_inputs(DiameterRestraint self) -> IMP::ModelObjectsTemp"""
5693  return _IMP_core.DiameterRestraint_do_get_inputs(self)
5694 
5695  def get_version_info(self):
5696  r"""get_version_info(DiameterRestraint self) -> VersionInfo"""
5697  return _IMP_core.DiameterRestraint_get_version_info(self)
5698  __swig_destroy__ = _IMP_core.delete_DiameterRestraint
5699 
5700  def do_create_decomposition(self):
5701  r"""do_create_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5702  return _IMP_core.DiameterRestraint_do_create_decomposition(self)
5703 
5704  def do_create_current_decomposition(self):
5705  r"""do_create_current_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5706  return _IMP_core.DiameterRestraint_do_create_current_decomposition(self)
5707 
5708  def __str__(self):
5709  r"""__str__(DiameterRestraint self) -> std::string"""
5710  return _IMP_core.DiameterRestraint___str__(self)
5711 
5712  def __repr__(self):
5713  r"""__repr__(DiameterRestraint self) -> std::string"""
5714  return _IMP_core.DiameterRestraint___repr__(self)
5715 
5716  @staticmethod
5717  def get_from(o):
5718  return _object_cast_to_DiameterRestraint(o)
5719 
5720 
5721 # Register DiameterRestraint in _IMP_core:
5722 _IMP_core.DiameterRestraint_swigregister(DiameterRestraint)
5723 class Transform(IMP.SingletonModifier):
5724  r"""Proxy of C++ IMP::core::Transform class."""
5725 
5726  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5727 
5728  def __init__(self, *args):
5729  r"""
5730  __init__(Transform self, Transformation3D t, bool ignore_non_xyz=False) -> Transform
5731  __init__(Transform self) -> Transform
5732  """
5733  _IMP_core.Transform_swiginit(self, _IMP_core.new_Transform(*args))
5734 
5735  def do_get_inputs(self, m, pis):
5736  r"""do_get_inputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5737  return _IMP_core.Transform_do_get_inputs(self, m, pis)
5738 
5739  def do_get_outputs(self, m, pis):
5740  r"""do_get_outputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5741  return _IMP_core.Transform_do_get_outputs(self, m, pis)
5742 
5743  def get_version_info(self):
5744  r"""get_version_info(Transform self) -> VersionInfo"""
5745  return _IMP_core.Transform_get_version_info(self)
5746  __swig_destroy__ = _IMP_core.delete_Transform
5747 
5748  def __str__(self):
5749  r"""__str__(Transform self) -> std::string"""
5750  return _IMP_core.Transform___str__(self)
5751 
5752  def __repr__(self):
5753  r"""__repr__(Transform self) -> std::string"""
5754  return _IMP_core.Transform___repr__(self)
5755 
5756  @staticmethod
5757  def get_from(o):
5758  return _object_cast_to_Transform(o)
5759 
5760 
5761  def _get_as_binary(self):
5762  r"""_get_as_binary(Transform self) -> PyObject *"""
5763  return _IMP_core.Transform__get_as_binary(self)
5764 
5765  def _set_from_binary(self, p):
5766  r"""_set_from_binary(Transform self, PyObject * p)"""
5767  return _IMP_core.Transform__set_from_binary(self, p)
5768 
5769  def __getstate__(self):
5770  p = self._get_as_binary()
5771  if len(self.__dict__) > 1:
5772  d = self.__dict__.copy()
5773  del d['this']
5774  p = (d, p)
5775  return p
5776 
5777  def __setstate__(self, p):
5778  if not hasattr(self, 'this'):
5779  self.__init__()
5780  if isinstance(p, tuple):
5781  d, p = p
5782  self.__dict__.update(d)
5783  return self._set_from_binary(p)
5784 
5785 
5786 # Register Transform in _IMP_core:
5787 _IMP_core.Transform_swigregister(Transform)
5788 class Reference(IMP.Decorator):
5789  r"""Proxy of C++ IMP::core::Reference class."""
5790 
5791  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5792 
5793  def __init__(self, *args):
5794  r"""
5795  __init__(Reference self) -> Reference
5796  __init__(Reference self, Model m, ParticleIndex id) -> Reference
5797  __init__(Reference self, _ParticleAdaptor d) -> Reference
5798  """
5799  _IMP_core.Reference_swiginit(self, _IMP_core.new_Reference(*args))
5800 
5801  def show(self, *args):
5802  r"""show(Reference self, _ostream out=std::cout)"""
5803  return _IMP_core.Reference_show(self, *args)
5804 
5805  @staticmethod
5806  def setup_particle(*args):
5807  r"""
5808  setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor reference) -> Reference
5809  setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor reference) -> Reference
5810  """
5811  return _IMP_core.Reference_setup_particle(*args)
5812 
5813  def get_reference_particle(self):
5814  r"""get_reference_particle(Reference self) -> Particle"""
5815  return _IMP_core.Reference_get_reference_particle(self)
5816 
5817  @staticmethod
5818  def get_is_setup(*args):
5819  r"""
5820  get_is_setup(_ParticleAdaptor p) -> bool
5821  get_is_setup(Model m, ParticleIndex pi) -> bool
5822  """
5823  return _IMP_core.Reference_get_is_setup(*args)
5824 
5825  @staticmethod
5826  def get_reference_key():
5827  r"""get_reference_key() -> ParticleIndexKey"""
5828  return _IMP_core.Reference_get_reference_key()
5829 
5830  def add_attribute(self, *args):
5831  r"""
5832  add_attribute(Reference self, FloatKey k, IMP::Float v, bool opt)
5833  add_attribute(Reference self, FloatKey a0, IMP::Float a1)
5834  add_attribute(Reference self, IntKey a0, IMP::Int a1)
5835  add_attribute(Reference self, FloatsKey a0, IMP::Floats a1)
5836  add_attribute(Reference self, IntsKey a0, IMP::Ints a1)
5837  add_attribute(Reference self, StringKey a0, IMP::String a1)
5838  add_attribute(Reference self, ParticleIndexKey a0, Particle a1)
5839  add_attribute(Reference self, ObjectKey a0, Object a1)
5840  add_attribute(Reference self, SparseFloatKey a0, IMP::Float a1)
5841  add_attribute(Reference self, SparseIntKey a0, IMP::Int a1)
5842  add_attribute(Reference self, SparseStringKey a0, IMP::String a1)
5843  add_attribute(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5844  """
5845  return _IMP_core.Reference_add_attribute(self, *args)
5846 
5847  def get_value(self, *args):
5848  r"""
5849  get_value(Reference self, FloatKey a0) -> IMP::Float
5850  get_value(Reference self, IntKey a0) -> IMP::Int
5851  get_value(Reference self, FloatsKey a0) -> IMP::Floats
5852  get_value(Reference self, IntsKey a0) -> IMP::Ints
5853  get_value(Reference self, StringKey a0) -> IMP::String
5854  get_value(Reference self, ParticleIndexKey a0) -> Particle
5855  get_value(Reference self, ObjectKey a0) -> Object
5856  get_value(Reference self, SparseFloatKey a0) -> IMP::Float
5857  get_value(Reference self, SparseIntKey a0) -> IMP::Int
5858  get_value(Reference self, SparseStringKey a0) -> IMP::String
5859  get_value(Reference self, SparseParticleIndexKey a0) -> ParticleIndex
5860  """
5861  return _IMP_core.Reference_get_value(self, *args)
5862 
5863  def set_value(self, *args):
5864  r"""
5865  set_value(Reference self, FloatKey a0, IMP::Float a1)
5866  set_value(Reference self, IntKey a0, IMP::Int a1)
5867  set_value(Reference self, FloatsKey a0, IMP::Floats a1)
5868  set_value(Reference self, IntsKey a0, IMP::Ints a1)
5869  set_value(Reference self, StringKey a0, IMP::String a1)
5870  set_value(Reference self, ParticleIndexKey a0, Particle a1)
5871  set_value(Reference self, ObjectKey a0, Object a1)
5872  set_value(Reference self, SparseFloatKey a0, IMP::Float a1)
5873  set_value(Reference self, SparseIntKey a0, IMP::Int a1)
5874  set_value(Reference self, SparseStringKey a0, IMP::String a1)
5875  set_value(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5876  """
5877  return _IMP_core.Reference_set_value(self, *args)
5878 
5879  def remove_attribute(self, *args):
5880  r"""
5881  remove_attribute(Reference self, FloatKey a0)
5882  remove_attribute(Reference self, IntKey a0)
5883  remove_attribute(Reference self, FloatsKey a0)
5884  remove_attribute(Reference self, IntsKey a0)
5885  remove_attribute(Reference self, StringKey a0)
5886  remove_attribute(Reference self, ParticleIndexKey a0)
5887  remove_attribute(Reference self, ObjectKey a0)
5888  remove_attribute(Reference self, SparseFloatKey a0)
5889  remove_attribute(Reference self, SparseIntKey a0)
5890  remove_attribute(Reference self, SparseStringKey a0)
5891  remove_attribute(Reference self, SparseParticleIndexKey a0)
5892  """
5893  return _IMP_core.Reference_remove_attribute(self, *args)
5894 
5895  def has_attribute(self, *args):
5896  r"""
5897  has_attribute(Reference self, FloatKey a0) -> bool
5898  has_attribute(Reference self, IntKey a0) -> bool
5899  has_attribute(Reference self, FloatsKey a0) -> bool
5900  has_attribute(Reference self, IntsKey a0) -> bool
5901  has_attribute(Reference self, StringKey a0) -> bool
5902  has_attribute(Reference self, ParticleIndexKey a0) -> bool
5903  has_attribute(Reference self, ObjectKey a0) -> bool
5904  has_attribute(Reference self, SparseFloatKey a0) -> bool
5905  has_attribute(Reference self, SparseIntKey a0) -> bool
5906  has_attribute(Reference self, SparseStringKey a0) -> bool
5907  has_attribute(Reference self, SparseParticleIndexKey a0) -> bool
5908  """
5909  return _IMP_core.Reference_has_attribute(self, *args)
5910 
5911  def get_derivative(self, a0):
5912  r"""get_derivative(Reference self, FloatKey a0) -> double"""
5913  return _IMP_core.Reference_get_derivative(self, a0)
5914 
5915  def get_name(self):
5916  r"""get_name(Reference self) -> std::string"""
5917  return _IMP_core.Reference_get_name(self)
5918 
5919  def clear_caches(self):
5920  r"""clear_caches(Reference self)"""
5921  return _IMP_core.Reference_clear_caches(self)
5922 
5923  def set_name(self, a0):
5924  r"""set_name(Reference self, std::string a0)"""
5925  return _IMP_core.Reference_set_name(self, a0)
5926 
5927  def set_check_level(self, a0):
5928  r"""set_check_level(Reference self, IMP::CheckLevel a0)"""
5929  return _IMP_core.Reference_set_check_level(self, a0)
5930 
5931  def add_to_derivative(self, a0, a1, a2):
5932  r"""add_to_derivative(Reference self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5933  return _IMP_core.Reference_add_to_derivative(self, a0, a1, a2)
5934 
5935  def set_is_optimized(self, a0, a1):
5936  r"""set_is_optimized(Reference self, FloatKey a0, bool a1)"""
5937  return _IMP_core.Reference_set_is_optimized(self, a0, a1)
5938 
5939  def get_is_optimized(self, a0):
5940  r"""get_is_optimized(Reference self, FloatKey a0) -> bool"""
5941  return _IMP_core.Reference_get_is_optimized(self, a0)
5942 
5943  def get_check_level(self):
5944  r"""get_check_level(Reference self) -> IMP::CheckLevel"""
5945  return _IMP_core.Reference_get_check_level(self)
5946 
5947  def __eq__(self, *args):
5948  r"""
5949  __eq__(Reference self, Reference o) -> bool
5950  __eq__(Reference self, Particle d) -> bool
5951  """
5952  return _IMP_core.Reference___eq__(self, *args)
5953 
5954  def __ne__(self, *args):
5955  r"""
5956  __ne__(Reference self, Reference o) -> bool
5957  __ne__(Reference self, Particle d) -> bool
5958  """
5959  return _IMP_core.Reference___ne__(self, *args)
5960 
5961  def __le__(self, *args):
5962  r"""
5963  __le__(Reference self, Reference o) -> bool
5964  __le__(Reference self, Particle d) -> bool
5965  """
5966  return _IMP_core.Reference___le__(self, *args)
5967 
5968  def __lt__(self, *args):
5969  r"""
5970  __lt__(Reference self, Reference o) -> bool
5971  __lt__(Reference self, Particle d) -> bool
5972  """
5973  return _IMP_core.Reference___lt__(self, *args)
5974 
5975  def __ge__(self, *args):
5976  r"""
5977  __ge__(Reference self, Reference o) -> bool
5978  __ge__(Reference self, Particle d) -> bool
5979  """
5980  return _IMP_core.Reference___ge__(self, *args)
5981 
5982  def __gt__(self, *args):
5983  r"""
5984  __gt__(Reference self, Reference o) -> bool
5985  __gt__(Reference self, Particle d) -> bool
5986  """
5987  return _IMP_core.Reference___gt__(self, *args)
5988 
5989  def __hash__(self):
5990  r"""__hash__(Reference self) -> std::size_t"""
5991  return _IMP_core.Reference___hash__(self)
5992 
5993  def __str__(self):
5994  r"""__str__(Reference self) -> std::string"""
5995  return _IMP_core.Reference___str__(self)
5996 
5997  def __repr__(self):
5998  r"""__repr__(Reference self) -> std::string"""
5999  return _IMP_core.Reference___repr__(self)
6000 
6001  def _get_as_binary(self):
6002  r"""_get_as_binary(Reference self) -> PyObject *"""
6003  return _IMP_core.Reference__get_as_binary(self)
6004 
6005  def _set_from_binary(self, p):
6006  r"""_set_from_binary(Reference self, PyObject * p)"""
6007  return _IMP_core.Reference__set_from_binary(self, p)
6008 
6009  def __getstate__(self):
6010  p = self._get_as_binary()
6011  if len(self.__dict__) > 1:
6012  d = self.__dict__.copy()
6013  del d['this']
6014  p = (d, p)
6015  return p
6016 
6017  def __setstate__(self, p):
6018  if not hasattr(self, 'this'):
6019  self.__init__()
6020  if isinstance(p, tuple):
6021  d, p = p
6022  self.__dict__.update(d)
6023  return self._set_from_binary(p)
6024 
6025  __swig_destroy__ = _IMP_core.delete_Reference
6026 
6027 # Register Reference in _IMP_core:
6028 _IMP_core.Reference_swigregister(Reference)
6029 class TransformationAndReflectionSymmetry(IMP.SingletonModifier):
6030  r"""Proxy of C++ IMP::core::TransformationAndReflectionSymmetry class."""
6031 
6032  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6033 
6034  def __init__(self, t, r):
6035  r"""__init__(TransformationAndReflectionSymmetry self, Transformation3D t, Reflection3D r) -> TransformationAndReflectionSymmetry"""
6036  _IMP_core.TransformationAndReflectionSymmetry_swiginit(self, _IMP_core.new_TransformationAndReflectionSymmetry(t, r))
6037 
6038  def do_get_inputs(self, m, pis):
6039  r"""do_get_inputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6040  return _IMP_core.TransformationAndReflectionSymmetry_do_get_inputs(self, m, pis)
6041 
6042  def do_get_outputs(self, m, pis):
6043  r"""do_get_outputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6044  return _IMP_core.TransformationAndReflectionSymmetry_do_get_outputs(self, m, pis)
6045 
6046  def get_version_info(self):
6047  r"""get_version_info(TransformationAndReflectionSymmetry self) -> VersionInfo"""
6048  return _IMP_core.TransformationAndReflectionSymmetry_get_version_info(self)
6049  __swig_destroy__ = _IMP_core.delete_TransformationAndReflectionSymmetry
6050 
6051  def __str__(self):
6052  r"""__str__(TransformationAndReflectionSymmetry self) -> std::string"""
6053  return _IMP_core.TransformationAndReflectionSymmetry___str__(self)
6054 
6055  def __repr__(self):
6056  r"""__repr__(TransformationAndReflectionSymmetry self) -> std::string"""
6057  return _IMP_core.TransformationAndReflectionSymmetry___repr__(self)
6058 
6059  @staticmethod
6060  def get_from(o):
6061  return _object_cast_to_TransformationAndReflectionSymmetry(o)
6062 
6063 
6064 # Register TransformationAndReflectionSymmetry in _IMP_core:
6065 _IMP_core.TransformationAndReflectionSymmetry_swigregister(TransformationAndReflectionSymmetry)
6066 class TransformationSymmetry(IMP.SingletonModifier):
6067  r"""Proxy of C++ IMP::core::TransformationSymmetry class."""
6068 
6069  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6070 
6071  def __init__(self, *args):
6072  r"""
6073  __init__(TransformationSymmetry self, Transformation3D t) -> TransformationSymmetry
6074  __init__(TransformationSymmetry self, ParticleIndex rb_pi) -> TransformationSymmetry
6075  """
6076  _IMP_core.TransformationSymmetry_swiginit(self, _IMP_core.new_TransformationSymmetry(*args))
6077 
6078  def get_transformation(self):
6079  r"""get_transformation(TransformationSymmetry self) -> Transformation3D"""
6080  return _IMP_core.TransformationSymmetry_get_transformation(self)
6081 
6082  def set_transformation(self, t):
6083  r"""set_transformation(TransformationSymmetry self, Transformation3D t)"""
6084  return _IMP_core.TransformationSymmetry_set_transformation(self, t)
6085 
6086  def do_get_inputs(self, m, pis):
6087  r"""do_get_inputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6088  return _IMP_core.TransformationSymmetry_do_get_inputs(self, m, pis)
6089 
6090  def do_get_outputs(self, m, pis):
6091  r"""do_get_outputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6092  return _IMP_core.TransformationSymmetry_do_get_outputs(self, m, pis)
6093 
6094  def get_version_info(self):
6095  r"""get_version_info(TransformationSymmetry self) -> VersionInfo"""
6096  return _IMP_core.TransformationSymmetry_get_version_info(self)
6097  __swig_destroy__ = _IMP_core.delete_TransformationSymmetry
6098 
6099  def __str__(self):
6100  r"""__str__(TransformationSymmetry self) -> std::string"""
6101  return _IMP_core.TransformationSymmetry___str__(self)
6102 
6103  def __repr__(self):
6104  r"""__repr__(TransformationSymmetry self) -> std::string"""
6105  return _IMP_core.TransformationSymmetry___repr__(self)
6106 
6107  @staticmethod
6108  def get_from(o):
6109  return _object_cast_to_TransformationSymmetry(o)
6110 
6111 
6112 # Register TransformationSymmetry in _IMP_core:
6113 _IMP_core.TransformationSymmetry_swigregister(TransformationSymmetry)
6114 class TransformationSymmetryMover(MonteCarloMover):
6115  r"""Proxy of C++ IMP::core::TransformationSymmetryMover class."""
6116 
6117  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6118 
6119  def __init__(self, m, symm, pivot, max_translation, max_rotation):
6120  r"""__init__(TransformationSymmetryMover self, Model m, TransformationSymmetry symm, ParticleIndex pivot, IMP::Float max_translation, IMP::Float max_rotation) -> TransformationSymmetryMover"""
6121  _IMP_core.TransformationSymmetryMover_swiginit(self, _IMP_core.new_TransformationSymmetryMover(m, symm, pivot, max_translation, max_rotation))
6122 
6123  def set_maximum_translation(self, mt):
6124  r"""set_maximum_translation(TransformationSymmetryMover self, IMP::Float mt)"""
6125  return _IMP_core.TransformationSymmetryMover_set_maximum_translation(self, mt)
6126 
6127  def set_maximum_rotation(self, mr):
6128  r"""set_maximum_rotation(TransformationSymmetryMover self, IMP::Float mr)"""
6129  return _IMP_core.TransformationSymmetryMover_set_maximum_rotation(self, mr)
6130 
6131  def get_maximum_translation(self):
6132  r"""get_maximum_translation(TransformationSymmetryMover self) -> IMP::Float"""
6133  return _IMP_core.TransformationSymmetryMover_get_maximum_translation(self)
6134 
6135  def get_maximum_rotation(self):
6136  r"""get_maximum_rotation(TransformationSymmetryMover self) -> IMP::Float"""
6137  return _IMP_core.TransformationSymmetryMover_get_maximum_rotation(self)
6138 
6139  def get_version_info(self):
6140  r"""get_version_info(TransformationSymmetryMover self) -> VersionInfo"""
6141  return _IMP_core.TransformationSymmetryMover_get_version_info(self)
6142  __swig_destroy__ = _IMP_core.delete_TransformationSymmetryMover
6143 
6144  def __str__(self):
6145  r"""__str__(TransformationSymmetryMover self) -> std::string"""
6146  return _IMP_core.TransformationSymmetryMover___str__(self)
6147 
6148  def __repr__(self):
6149  r"""__repr__(TransformationSymmetryMover self) -> std::string"""
6150  return _IMP_core.TransformationSymmetryMover___repr__(self)
6151 
6152  @staticmethod
6153  def get_from(o):
6154  return _object_cast_to_TransformationSymmetryMover(o)
6155 
6156 
6157 # Register TransformationSymmetryMover in _IMP_core:
6158 _IMP_core.TransformationSymmetryMover_swigregister(TransformationSymmetryMover)
6159 class DistancePairScore(IMP.PairScore):
6160  r"""Proxy of C++ IMP::core::DistancePairScore class."""
6161 
6162  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6163 
6164  def __init__(self, *args):
6165  r"""
6166  __init__(DistancePairScore self, UnaryFunction uf, std::string name="DistancePairScore%1%") -> DistancePairScore
6167  __init__(DistancePairScore self) -> DistancePairScore
6168  """
6169  _IMP_core.DistancePairScore_swiginit(self, _IMP_core.new_DistancePairScore(*args))
6170 
6171  def do_get_inputs(self, m, pis):
6172  r"""do_get_inputs(DistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6173  return _IMP_core.DistancePairScore_do_get_inputs(self, m, pis)
6174 
6175  def get_score_functor(self, *args):
6176  r"""
6177  get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6178  get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6179  """
6180  return _IMP_core.DistancePairScore_get_score_functor(self, *args)
6181 
6182  def get_version_info(self):
6183  r"""get_version_info(DistancePairScore self) -> VersionInfo"""
6184  return _IMP_core.DistancePairScore_get_version_info(self)
6185  __swig_destroy__ = _IMP_core.delete_DistancePairScore
6186 
6187  def __str__(self):
6188  r"""__str__(DistancePairScore self) -> std::string"""
6189  return _IMP_core.DistancePairScore___str__(self)
6190 
6191  def __repr__(self):
6192  r"""__repr__(DistancePairScore self) -> std::string"""
6193  return _IMP_core.DistancePairScore___repr__(self)
6194 
6195  @staticmethod
6196  def get_from(o):
6197  return _object_cast_to_DistancePairScore(o)
6198 
6199 
6200  def _get_as_binary(self):
6201  r"""_get_as_binary(DistancePairScore self) -> PyObject *"""
6202  return _IMP_core.DistancePairScore__get_as_binary(self)
6203 
6204  def _set_from_binary(self, p):
6205  r"""_set_from_binary(DistancePairScore self, PyObject * p)"""
6206  return _IMP_core.DistancePairScore__set_from_binary(self, p)
6207 
6208  def __getstate__(self):
6209  p = self._get_as_binary()
6210  if len(self.__dict__) > 1:
6211  d = self.__dict__.copy()
6212  del d['this']
6213  p = (d, p)
6214  return p
6215 
6216  def __setstate__(self, p):
6217  if not hasattr(self, 'this'):
6218  self.__init__()
6219  if isinstance(p, tuple):
6220  d, p = p
6221  self.__dict__.update(d)
6222  return self._set_from_binary(p)
6223 
6224 
6225  def _get_jax(self, m, indexes, space):
6226  import jax.numpy as jnp
6227  def jax_score(jm, uf):
6228  xyzs = jm['xyz'][indexes]
6229  diff = xyzs[:,0] - xyzs[:,1]
6230  drs = space.distance(diff)
6231  return uf(drs)
6232  sfnc = self.get_score_functor()
6233  uf = sfnc.get_unary_function().get_derived_object()
6234  f = functools.partial(jax_score, uf=uf._get_jax())
6235  return self._wrap_jax(m, f)
6236 
6237 
6238 # Register DistancePairScore in _IMP_core:
6239 _IMP_core.DistancePairScore_swigregister(DistancePairScore)
6240 class HarmonicDistancePairScore(IMP.PairScore):
6241  r"""Proxy of C++ IMP::core::HarmonicDistancePairScore class."""
6242 
6243  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6244 
6245  def __init__(self, *args):
6246  r"""
6247  __init__(HarmonicDistancePairScore self, double x0, double k, std::string name="HarmonicDistancePairScore%1%") -> HarmonicDistancePairScore
6248  __init__(HarmonicDistancePairScore self) -> HarmonicDistancePairScore
6249  """
6250  _IMP_core.HarmonicDistancePairScore_swiginit(self, _IMP_core.new_HarmonicDistancePairScore(*args))
6251 
6252  def do_get_inputs(self, m, pis):
6253  r"""do_get_inputs(HarmonicDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6254  return _IMP_core.HarmonicDistancePairScore_do_get_inputs(self, m, pis)
6255 
6256  def get_score_functor(self, *args):
6257  r"""
6258  get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore
6259  get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore const &
6260  """
6261  return _IMP_core.HarmonicDistancePairScore_get_score_functor(self, *args)
6262 
6263  def get_x0(self):
6264  r"""get_x0(HarmonicDistancePairScore self) -> double"""
6265  return _IMP_core.HarmonicDistancePairScore_get_x0(self)
6266 
6267  def get_k(self):
6268  r"""get_k(HarmonicDistancePairScore self) -> double"""
6269  return _IMP_core.HarmonicDistancePairScore_get_k(self)
6270 
6271  def get_version_info(self):
6272  r"""get_version_info(HarmonicDistancePairScore self) -> VersionInfo"""
6273  return _IMP_core.HarmonicDistancePairScore_get_version_info(self)
6274  __swig_destroy__ = _IMP_core.delete_HarmonicDistancePairScore
6275 
6276  def __str__(self):
6277  r"""__str__(HarmonicDistancePairScore self) -> std::string"""
6278  return _IMP_core.HarmonicDistancePairScore___str__(self)
6279 
6280  def __repr__(self):
6281  r"""__repr__(HarmonicDistancePairScore self) -> std::string"""
6282  return _IMP_core.HarmonicDistancePairScore___repr__(self)
6283 
6284  @staticmethod
6285  def get_from(o):
6286  return _object_cast_to_HarmonicDistancePairScore(o)
6287 
6288 
6289  def _get_as_binary(self):
6290  r"""_get_as_binary(HarmonicDistancePairScore self) -> PyObject *"""
6291  return _IMP_core.HarmonicDistancePairScore__get_as_binary(self)
6292 
6293  def _set_from_binary(self, p):
6294  r"""_set_from_binary(HarmonicDistancePairScore self, PyObject * p)"""
6295  return _IMP_core.HarmonicDistancePairScore__set_from_binary(self, p)
6296 
6297  def __getstate__(self):
6298  p = self._get_as_binary()
6299  if len(self.__dict__) > 1:
6300  d = self.__dict__.copy()
6301  del d['this']
6302  p = (d, p)
6303  return p
6304 
6305  def __setstate__(self, p):
6306  if not hasattr(self, 'this'):
6307  self.__init__()
6308  if isinstance(p, tuple):
6309  d, p = p
6310  self.__dict__.update(d)
6311  return self._set_from_binary(p)
6312 
6313 
6314  def _get_jax(self, m, indexes, space):
6315  import jax.numpy as jnp
6316  def jax_harmonic_distance_pair_score(jm, d, k):
6317  xyzs = jm['xyz'][indexes]
6318  diff = xyzs[:,0] - xyzs[:,1]
6319  drs = space.distance(diff)
6320  return 0.5 * k * (d - drs)**2
6321  f = functools.partial(jax_harmonic_distance_pair_score,
6322  d=self.get_x0(), k=self.get_k())
6323  return self._wrap_jax(m, f)
6324 
6325 
6326 # Register HarmonicDistancePairScore in _IMP_core:
6327 _IMP_core.HarmonicDistancePairScore_swigregister(HarmonicDistancePairScore)
6328 class DistanceRestraint(IMP.Restraint):
6329  r"""Proxy of C++ IMP::core::DistanceRestraint class."""
6330 
6331  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6332 
6333  def __init__(self, *args):
6334  r"""
6335  __init__(DistanceRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor a, _ParticleIndexAdaptor b, std::string name="DistanceRestraint %1%") -> DistanceRestraint
6336  __init__(DistanceRestraint self) -> DistanceRestraint
6337  """
6338  _IMP_core.DistanceRestraint_swiginit(self, _IMP_core.new_DistanceRestraint(*args))
6339 
6340  def get_score_object(self):
6341  r"""get_score_object(DistanceRestraint self) -> DistancePairScore"""
6342  return _IMP_core.DistanceRestraint_get_score_object(self)
6343 
6344  def get_index(self):
6345  r"""get_index(DistanceRestraint self) -> IMP::core::DistancePairScore::IndexArgument"""
6346  return _IMP_core.DistanceRestraint_get_index(self)
6347 
6348  def get_version_info(self):
6349  r"""get_version_info(DistanceRestraint self) -> VersionInfo"""
6350  return _IMP_core.DistanceRestraint_get_version_info(self)
6351  __swig_destroy__ = _IMP_core.delete_DistanceRestraint
6352 
6353  def __str__(self):
6354  r"""__str__(DistanceRestraint self) -> std::string"""
6355  return _IMP_core.DistanceRestraint___str__(self)
6356 
6357  def __repr__(self):
6358  r"""__repr__(DistanceRestraint self) -> std::string"""
6359  return _IMP_core.DistanceRestraint___repr__(self)
6360 
6361  @staticmethod
6362  def get_from(o):
6363  return _object_cast_to_DistanceRestraint(o)
6364 
6365 
6366  def _get_as_binary(self):
6367  r"""_get_as_binary(DistanceRestraint self) -> PyObject *"""
6368  return _IMP_core.DistanceRestraint__get_as_binary(self)
6369 
6370  def _set_from_binary(self, p):
6371  r"""_set_from_binary(DistanceRestraint self, PyObject * p)"""
6372  return _IMP_core.DistanceRestraint__set_from_binary(self, p)
6373 
6374  def __getstate__(self):
6375  p = self._get_as_binary()
6376  if len(self.__dict__) > 1:
6377  d = self.__dict__.copy()
6378  del d['this']
6379  p = (d, p)
6380  return p
6381 
6382  def __setstate__(self, p):
6383  if not hasattr(self, 'this'):
6384  self.__init__()
6385  if isinstance(p, tuple):
6386  d, p = p
6387  self.__dict__.update(d)
6388  return self._set_from_binary(p)
6389 
6390 
6391  def _get_jax(self, space):
6392  import jax.numpy as jnp
6393  import IMP._jax_util
6394  ps = self.get_score_object()
6395  indexes = jnp.array([self.get_index()])
6396  ji = ps._get_jax(self.get_model(), indexes, space=space)
6397  def score(jm):
6398  return jnp.sum(ji.score_func(jm))
6399  return self._wrap_jax(score)
6400 
6401 
6402 # Register DistanceRestraint in _IMP_core:
6403 _IMP_core.DistanceRestraint_swigregister(DistanceRestraint)
6404 class SphereDistanceToSingletonScore(IMP.SingletonScore):
6405  r"""Proxy of C++ IMP::core::SphereDistanceToSingletonScore class."""
6406 
6407  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6408 
6409  def __init__(self, f, pt):
6410  r"""__init__(SphereDistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> SphereDistanceToSingletonScore"""
6411  _IMP_core.SphereDistanceToSingletonScore_swiginit(self, _IMP_core.new_SphereDistanceToSingletonScore(f, pt))
6412 
6413  def do_get_inputs(self, m, pis):
6414  r"""do_get_inputs(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6415  return _IMP_core.SphereDistanceToSingletonScore_do_get_inputs(self, m, pis)
6416 
6417  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
6418  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"""
6419  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
6420 
6421  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
6422  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"""
6423  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
6424 
6425  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
6426  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"""
6427  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
6428 
6429  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
6430  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"""
6431  return _IMP_core.SphereDistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
6432 
6433  def get_version_info(self):
6434  r"""get_version_info(SphereDistanceToSingletonScore self) -> VersionInfo"""
6435  return _IMP_core.SphereDistanceToSingletonScore_get_version_info(self)
6436  __swig_destroy__ = _IMP_core.delete_SphereDistanceToSingletonScore
6437 
6438  def __str__(self):
6439  r"""__str__(SphereDistanceToSingletonScore self) -> std::string"""
6440  return _IMP_core.SphereDistanceToSingletonScore___str__(self)
6441 
6442  def __repr__(self):
6443  r"""__repr__(SphereDistanceToSingletonScore self) -> std::string"""
6444  return _IMP_core.SphereDistanceToSingletonScore___repr__(self)
6445 
6446  @staticmethod
6447  def get_from(o):
6448  return _object_cast_to_SphereDistanceToSingletonScore(o)
6449 
6450 
6451 # Register SphereDistanceToSingletonScore in _IMP_core:
6452 _IMP_core.SphereDistanceToSingletonScore_swigregister(SphereDistanceToSingletonScore)
6453 class ExcludedVolumeRestraint(IMP.Restraint):
6454  r"""Proxy of C++ IMP::core::ExcludedVolumeRestraint 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, *args):
6459  r"""__init__(ExcludedVolumeRestraint self, _SingletonContainerAdaptor sc, double k=1, double slack=10, std::string name="ExcludedVolumeRestraint%1%") -> ExcludedVolumeRestraint"""
6460  _IMP_core.ExcludedVolumeRestraint_swiginit(self, _IMP_core.new_ExcludedVolumeRestraint(*args))
6461 
6462  def do_get_inputs(self):
6463  r"""do_get_inputs(ExcludedVolumeRestraint self) -> IMP::ModelObjectsTemp"""
6464  return _IMP_core.ExcludedVolumeRestraint_do_get_inputs(self)
6465 
6466  def get_version_info(self):
6467  r"""get_version_info(ExcludedVolumeRestraint self) -> VersionInfo"""
6468  return _IMP_core.ExcludedVolumeRestraint_get_version_info(self)
6469  __swig_destroy__ = _IMP_core.delete_ExcludedVolumeRestraint
6470 
6471  def do_create_decomposition(self):
6472  r"""do_create_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6473  return _IMP_core.ExcludedVolumeRestraint_do_create_decomposition(self)
6474 
6475  def do_create_current_decomposition(self):
6476  r"""do_create_current_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6477  return _IMP_core.ExcludedVolumeRestraint_do_create_current_decomposition(self)
6478 
6479  def get_indexes(self):
6480  r"""get_indexes(ExcludedVolumeRestraint self) -> IMP::ParticleIndexPairs const &"""
6481  return _IMP_core.ExcludedVolumeRestraint_get_indexes(self)
6482  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)
6483  def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
6484  def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
6485  pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
6486 
6487  def remove_pair_filter(self, d):
6488  r"""remove_pair_filter(ExcludedVolumeRestraint self, PairPredicate d)"""
6489  return _IMP_core.ExcludedVolumeRestraint_remove_pair_filter(self, d)
6490 
6491  def _python_index_pair_filter(self, d, start, stop):
6492  r"""_python_index_pair_filter(ExcludedVolumeRestraint self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
6493  return _IMP_core.ExcludedVolumeRestraint__python_index_pair_filter(self, d, start, stop)
6494 
6495  def remove_pair_filters(self, d):
6496  r"""remove_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & d)"""
6497  return _IMP_core.ExcludedVolumeRestraint_remove_pair_filters(self, d)
6498 
6499  def set_pair_filters(self, ps):
6500  r"""set_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & ps)"""
6501  return _IMP_core.ExcludedVolumeRestraint_set_pair_filters(self, ps)
6502 
6503  def set_pair_filters_order(self, objs):
6504  r"""set_pair_filters_order(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6505  return _IMP_core.ExcludedVolumeRestraint_set_pair_filters_order(self, objs)
6506 
6507  def add_pair_filter(self, obj):
6508  r"""add_pair_filter(ExcludedVolumeRestraint self, PairPredicate obj) -> unsigned int"""
6509  return _IMP_core.ExcludedVolumeRestraint_add_pair_filter(self, obj)
6510 
6511  def add_pair_filters(self, objs):
6512  r"""add_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6513  return _IMP_core.ExcludedVolumeRestraint_add_pair_filters(self, objs)
6514 
6515  def clear_pair_filters(self):
6516  r"""clear_pair_filters(ExcludedVolumeRestraint self)"""
6517  return _IMP_core.ExcludedVolumeRestraint_clear_pair_filters(self)
6518 
6519  def get_number_of_pair_filters(self):
6520  r"""get_number_of_pair_filters(ExcludedVolumeRestraint self) -> unsigned int"""
6521  return _IMP_core.ExcludedVolumeRestraint_get_number_of_pair_filters(self)
6522 
6523  def get_has_pair_filters(self):
6524  r"""get_has_pair_filters(ExcludedVolumeRestraint self) -> bool"""
6525  return _IMP_core.ExcludedVolumeRestraint_get_has_pair_filters(self)
6526 
6527  def get_pair_filter(self, i):
6528  r"""get_pair_filter(ExcludedVolumeRestraint self, unsigned int i) -> PairPredicate"""
6529  return _IMP_core.ExcludedVolumeRestraint_get_pair_filter(self, i)
6530 
6531  def get_pair_filters(self):
6532  r"""get_pair_filters(ExcludedVolumeRestraint self) -> IMP::PairPredicates"""
6533  return _IMP_core.ExcludedVolumeRestraint_get_pair_filters(self)
6534 
6535  def erase_pair_filter(self, i):
6536  r"""erase_pair_filter(ExcludedVolumeRestraint self, unsigned int i)"""
6537  return _IMP_core.ExcludedVolumeRestraint_erase_pair_filter(self, i)
6538 
6539  def reserve_pair_filters(self, sz):
6540  r"""reserve_pair_filters(ExcludedVolumeRestraint self, unsigned int sz)"""
6541  return _IMP_core.ExcludedVolumeRestraint_reserve_pair_filters(self, sz)
6542 
6543  def __str__(self):
6544  r"""__str__(ExcludedVolumeRestraint self) -> std::string"""
6545  return _IMP_core.ExcludedVolumeRestraint___str__(self)
6546 
6547  def __repr__(self):
6548  r"""__repr__(ExcludedVolumeRestraint self) -> std::string"""
6549  return _IMP_core.ExcludedVolumeRestraint___repr__(self)
6550 
6551  @staticmethod
6552  def get_from(o):
6553  return _object_cast_to_ExcludedVolumeRestraint(o)
6554 
6555 
6556 # Register ExcludedVolumeRestraint in _IMP_core:
6557 _IMP_core.ExcludedVolumeRestraint_swigregister(ExcludedVolumeRestraint)
6558 class FixedRefiner(IMP.Refiner):
6559  r"""Proxy of C++ IMP::core::FixedRefiner class."""
6560 
6561  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6562 
6563  def __init__(self, *args):
6564  r"""
6565  __init__(FixedRefiner self, IMP::ParticlesTemp const & ps) -> FixedRefiner
6566  __init__(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> FixedRefiner
6567  __init__(FixedRefiner self) -> FixedRefiner
6568  """
6569  _IMP_core.FixedRefiner_swiginit(self, _IMP_core.new_FixedRefiner(*args))
6570 
6571  def do_get_inputs(self, m, pis):
6572  r"""do_get_inputs(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6573  return _IMP_core.FixedRefiner_do_get_inputs(self, m, pis)
6574 
6575  def get_version_info(self):
6576  r"""get_version_info(FixedRefiner self) -> VersionInfo"""
6577  return _IMP_core.FixedRefiner_get_version_info(self)
6578  __swig_destroy__ = _IMP_core.delete_FixedRefiner
6579 
6580  def __str__(self):
6581  r"""__str__(FixedRefiner self) -> std::string"""
6582  return _IMP_core.FixedRefiner___str__(self)
6583 
6584  def __repr__(self):
6585  r"""__repr__(FixedRefiner self) -> std::string"""
6586  return _IMP_core.FixedRefiner___repr__(self)
6587 
6588  @staticmethod
6589  def get_from(o):
6590  return _object_cast_to_FixedRefiner(o)
6591 
6592 
6593  def _get_as_binary(self):
6594  r"""_get_as_binary(FixedRefiner self) -> PyObject *"""
6595  return _IMP_core.FixedRefiner__get_as_binary(self)
6596 
6597  def _set_from_binary(self, p):
6598  r"""_set_from_binary(FixedRefiner self, PyObject * p)"""
6599  return _IMP_core.FixedRefiner__set_from_binary(self, p)
6600 
6601  def __getstate__(self):
6602  p = self._get_as_binary()
6603  if len(self.__dict__) > 1:
6604  d = self.__dict__.copy()
6605  del d['this']
6606  p = (d, p)
6607  return p
6608 
6609  def __setstate__(self, p):
6610  if not hasattr(self, 'this'):
6611  self.__init__()
6612  if isinstance(p, tuple):
6613  d, p = p
6614  self.__dict__.update(d)
6615  return self._set_from_binary(p)
6616 
6617 
6618 # Register FixedRefiner in _IMP_core:
6619 _IMP_core.FixedRefiner_swigregister(FixedRefiner)
6620 class GridClosePairsFinder(ClosePairsFinder):
6621  r"""Proxy of C++ IMP::core::GridClosePairsFinder class."""
6622 
6623  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6624 
6625  def __init__(self):
6626  r"""__init__(GridClosePairsFinder self) -> GridClosePairsFinder"""
6627  _IMP_core.GridClosePairsFinder_swiginit(self, _IMP_core.new_GridClosePairsFinder())
6628 
6629  def get_close_pairs(self, *args):
6630  r"""
6631  get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6632  get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6633  get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
6634  get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
6635  """
6636  return _IMP_core.GridClosePairsFinder_get_close_pairs(self, *args)
6637 
6638  def do_get_inputs(self, m, pis):
6639  r"""do_get_inputs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6640  return _IMP_core.GridClosePairsFinder_do_get_inputs(self, m, pis)
6641 
6642  def get_version_info(self):
6643  r"""get_version_info(GridClosePairsFinder self) -> VersionInfo"""
6644  return _IMP_core.GridClosePairsFinder_get_version_info(self)
6645  __swig_destroy__ = _IMP_core.delete_GridClosePairsFinder
6646 
6647  def __str__(self):
6648  r"""__str__(GridClosePairsFinder self) -> std::string"""
6649  return _IMP_core.GridClosePairsFinder___str__(self)
6650 
6651  def __repr__(self):
6652  r"""__repr__(GridClosePairsFinder self) -> std::string"""
6653  return _IMP_core.GridClosePairsFinder___repr__(self)
6654 
6655  @staticmethod
6656  def get_from(o):
6657  return _object_cast_to_GridClosePairsFinder(o)
6658 
6659 
6660  def _get_as_binary(self):
6661  r"""_get_as_binary(GridClosePairsFinder self) -> PyObject *"""
6662  return _IMP_core.GridClosePairsFinder__get_as_binary(self)
6663 
6664  def _set_from_binary(self, p):
6665  r"""_set_from_binary(GridClosePairsFinder self, PyObject * p)"""
6666  return _IMP_core.GridClosePairsFinder__set_from_binary(self, p)
6667 
6668  def __getstate__(self):
6669  p = self._get_as_binary()
6670  if len(self.__dict__) > 1:
6671  d = self.__dict__.copy()
6672  del d['this']
6673  p = (d, p)
6674  return p
6675 
6676  def __setstate__(self, p):
6677  if not hasattr(self, 'this'):
6678  self.__init__()
6679  if isinstance(p, tuple):
6680  d, p = p
6681  self.__dict__.update(d)
6682  return self._set_from_binary(p)
6683 
6684 
6685 # Register GridClosePairsFinder in _IMP_core:
6686 _IMP_core.GridClosePairsFinder_swigregister(GridClosePairsFinder)
6687 class Harmonic(IMP.UnaryFunction):
6688  r"""Proxy of C++ IMP::core::Harmonic class."""
6689 
6690  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6691 
6692  def __init__(self, *args):
6693  r"""
6694  __init__(Harmonic self, IMP::Float mean, IMP::Float k) -> Harmonic
6695  __init__(Harmonic self) -> Harmonic
6696  """
6697  _IMP_core.Harmonic_swiginit(self, _IMP_core.new_Harmonic(*args))
6698 
6699  def get_version_info(self):
6700  r"""get_version_info(Harmonic self) -> VersionInfo"""
6701  return _IMP_core.Harmonic_get_version_info(self)
6702  __swig_destroy__ = _IMP_core.delete_Harmonic
6703 
6704  def get_mean(self):
6705  r"""get_mean(Harmonic self) -> IMP::Float"""
6706  return _IMP_core.Harmonic_get_mean(self)
6707 
6708  def get_k(self):
6709  r"""get_k(Harmonic self) -> IMP::Float"""
6710  return _IMP_core.Harmonic_get_k(self)
6711 
6712  def set_mean(self, mean):
6713  r"""set_mean(Harmonic self, IMP::Float mean)"""
6714  return _IMP_core.Harmonic_set_mean(self, mean)
6715 
6716  def set_k(self, k):
6717  r"""set_k(Harmonic self, IMP::Float k)"""
6718  return _IMP_core.Harmonic_set_k(self, k)
6719 
6720  @staticmethod
6721  def get_k_from_standard_deviation(sd, t=297.15):
6722  r"""get_k_from_standard_deviation(IMP::Float sd, IMP::Float t=297.15) -> IMP::Float"""
6723  return _IMP_core.Harmonic_get_k_from_standard_deviation(sd, t)
6724 
6725  def __str__(self):
6726  r"""__str__(Harmonic self) -> std::string"""
6727  return _IMP_core.Harmonic___str__(self)
6728 
6729  def __repr__(self):
6730  r"""__repr__(Harmonic self) -> std::string"""
6731  return _IMP_core.Harmonic___repr__(self)
6732 
6733  @staticmethod
6734  def get_from(o):
6735  return _object_cast_to_Harmonic(o)
6736 
6737 
6738  def _get_as_binary(self):
6739  r"""_get_as_binary(Harmonic self) -> PyObject *"""
6740  return _IMP_core.Harmonic__get_as_binary(self)
6741 
6742  def _set_from_binary(self, p):
6743  r"""_set_from_binary(Harmonic self, PyObject * p)"""
6744  return _IMP_core.Harmonic__set_from_binary(self, p)
6745 
6746  def __getstate__(self):
6747  p = self._get_as_binary()
6748  if len(self.__dict__) > 1:
6749  d = self.__dict__.copy()
6750  del d['this']
6751  p = (d, p)
6752  return p
6753 
6754  def __setstate__(self, p):
6755  if not hasattr(self, 'this'):
6756  self.__init__()
6757  if isinstance(p, tuple):
6758  d, p = p
6759  self.__dict__.update(d)
6760  return self._set_from_binary(p)
6761 
6762 
6763  def _get_jax(self):
6764  def score(val, mean, k):
6765  return 0.5 * k * (mean - val) ** 2
6766  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6767 
6768 
6769 # Register Harmonic in _IMP_core:
6770 _IMP_core.Harmonic_swigregister(Harmonic)
6771 class HarmonicWell(IMP.UnaryFunction):
6772  r"""Proxy of C++ IMP::core::HarmonicWell class."""
6773 
6774  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6775 
6776  def __init__(self, well, k):
6777  r"""__init__(HarmonicWell self, IMP::FloatRange const & well, double k) -> HarmonicWell"""
6778  _IMP_core.HarmonicWell_swiginit(self, _IMP_core.new_HarmonicWell(well, k))
6779 
6780  def get_well(self):
6781  r"""get_well(HarmonicWell self) -> IMP::FloatRange"""
6782  return _IMP_core.HarmonicWell_get_well(self)
6783 
6784  def get_k(self):
6785  r"""get_k(HarmonicWell self) -> double"""
6786  return _IMP_core.HarmonicWell_get_k(self)
6787 
6788  def get_version_info(self):
6789  r"""get_version_info(HarmonicWell self) -> VersionInfo"""
6790  return _IMP_core.HarmonicWell_get_version_info(self)
6791  __swig_destroy__ = _IMP_core.delete_HarmonicWell
6792 
6793  def __str__(self):
6794  r"""__str__(HarmonicWell self) -> std::string"""
6795  return _IMP_core.HarmonicWell___str__(self)
6796 
6797  def __repr__(self):
6798  r"""__repr__(HarmonicWell self) -> std::string"""
6799  return _IMP_core.HarmonicWell___repr__(self)
6800 
6801  @staticmethod
6802  def get_from(o):
6803  return _object_cast_to_HarmonicWell(o)
6804 
6805 
6806  def _get_jax(self):
6807  import jax.numpy as jnp
6808  def score(val, lb, ub, k):
6809  return 0.5 * k * (val - jnp.clip(val, lb, ub)) ** 2
6810  well = self.get_well()
6811  return functools.partial(score, lb=well[0], ub=well[1], k=self.get_k())
6812 
6813 
6814 # Register HarmonicWell in _IMP_core:
6815 _IMP_core.HarmonicWell_swigregister(HarmonicWell)
6816 class HarmonicLowerBound(Harmonic):
6817  r"""Proxy of C++ IMP::core::HarmonicLowerBound class."""
6818 
6819  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6820 
6821  def __init__(self, *args):
6822  r"""
6823  __init__(HarmonicLowerBound self, IMP::Float mean, IMP::Float k) -> HarmonicLowerBound
6824  __init__(HarmonicLowerBound self) -> HarmonicLowerBound
6825  """
6826  _IMP_core.HarmonicLowerBound_swiginit(self, _IMP_core.new_HarmonicLowerBound(*args))
6827  __swig_destroy__ = _IMP_core.delete_HarmonicLowerBound
6828 
6829  def __str__(self):
6830  r"""__str__(HarmonicLowerBound self) -> std::string"""
6831  return _IMP_core.HarmonicLowerBound___str__(self)
6832 
6833  def __repr__(self):
6834  r"""__repr__(HarmonicLowerBound self) -> std::string"""
6835  return _IMP_core.HarmonicLowerBound___repr__(self)
6836 
6837  @staticmethod
6838  def get_from(o):
6839  return _object_cast_to_HarmonicLowerBound(o)
6840 
6841 
6842  def _get_as_binary(self):
6843  r"""_get_as_binary(HarmonicLowerBound self) -> PyObject *"""
6844  return _IMP_core.HarmonicLowerBound__get_as_binary(self)
6845 
6846  def _set_from_binary(self, p):
6847  r"""_set_from_binary(HarmonicLowerBound self, PyObject * p)"""
6848  return _IMP_core.HarmonicLowerBound__set_from_binary(self, p)
6849 
6850  def __getstate__(self):
6851  p = self._get_as_binary()
6852  if len(self.__dict__) > 1:
6853  d = self.__dict__.copy()
6854  del d['this']
6855  p = (d, p)
6856  return p
6857 
6858  def __setstate__(self, p):
6859  if not hasattr(self, 'this'):
6860  self.__init__()
6861  if isinstance(p, tuple):
6862  d, p = p
6863  self.__dict__.update(d)
6864  return self._set_from_binary(p)
6865 
6866 
6867  def _get_jax(self):
6868  import jax.lax
6869  def score(val, mean, k):
6870  return 0.5 * k * jax.lax.max(mean - val, 0.0) ** 2
6871  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6872 
6873 
6874 # Register HarmonicLowerBound in _IMP_core:
6875 _IMP_core.HarmonicLowerBound_swigregister(HarmonicLowerBound)
6876 class HarmonicUpperBound(Harmonic):
6877  r"""Proxy of C++ IMP::core::HarmonicUpperBound class."""
6878 
6879  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6880 
6881  def __init__(self, *args):
6882  r"""
6883  __init__(HarmonicUpperBound self, IMP::Float mean, IMP::Float k) -> HarmonicUpperBound
6884  __init__(HarmonicUpperBound self) -> HarmonicUpperBound
6885  """
6886  _IMP_core.HarmonicUpperBound_swiginit(self, _IMP_core.new_HarmonicUpperBound(*args))
6887  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBound
6888 
6889  def __str__(self):
6890  r"""__str__(HarmonicUpperBound self) -> std::string"""
6891  return _IMP_core.HarmonicUpperBound___str__(self)
6892 
6893  def __repr__(self):
6894  r"""__repr__(HarmonicUpperBound self) -> std::string"""
6895  return _IMP_core.HarmonicUpperBound___repr__(self)
6896 
6897  @staticmethod
6898  def get_from(o):
6899  return _object_cast_to_HarmonicUpperBound(o)
6900 
6901 
6902  def _get_as_binary(self):
6903  r"""_get_as_binary(HarmonicUpperBound self) -> PyObject *"""
6904  return _IMP_core.HarmonicUpperBound__get_as_binary(self)
6905 
6906  def _set_from_binary(self, p):
6907  r"""_set_from_binary(HarmonicUpperBound self, PyObject * p)"""
6908  return _IMP_core.HarmonicUpperBound__set_from_binary(self, p)
6909 
6910  def __getstate__(self):
6911  p = self._get_as_binary()
6912  if len(self.__dict__) > 1:
6913  d = self.__dict__.copy()
6914  del d['this']
6915  p = (d, p)
6916  return p
6917 
6918  def __setstate__(self, p):
6919  if not hasattr(self, 'this'):
6920  self.__init__()
6921  if isinstance(p, tuple):
6922  d, p = p
6923  self.__dict__.update(d)
6924  return self._set_from_binary(p)
6925 
6926 
6927  def _get_jax(self):
6928  import jax.lax
6929  def score(val, mean, k):
6930  return 0.5 * k * jax.lax.min(mean - val, 0.0) ** 2
6931  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6932 
6933 
6934 # Register HarmonicUpperBound in _IMP_core:
6935 _IMP_core.HarmonicUpperBound_swigregister(HarmonicUpperBound)
6936 class WeightedSum(IMP.UnaryFunction):
6937  r"""Proxy of C++ IMP::core::WeightedSum class."""
6938 
6939  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6940 
6941  def __init__(self, funcs, weights):
6942  r"""__init__(WeightedSum self, IMP::UnaryFunctions funcs, IMP::Floats weights) -> WeightedSum"""
6943  _IMP_core.WeightedSum_swiginit(self, _IMP_core.new_WeightedSum(funcs, weights))
6944 
6945  def get_function_number(self):
6946  r"""get_function_number(WeightedSum self) -> unsigned int"""
6947  return _IMP_core.WeightedSum_get_function_number(self)
6948 
6949  def set_weights(self, weights):
6950  r"""set_weights(WeightedSum self, IMP::Floats weights)"""
6951  return _IMP_core.WeightedSum_set_weights(self, weights)
6952 
6953  def get_weights(self):
6954  r"""get_weights(WeightedSum self) -> IMP::Floats"""
6955  return _IMP_core.WeightedSum_get_weights(self)
6956 
6957  def get_weight(self, i):
6958  r"""get_weight(WeightedSum self, unsigned int i) -> double"""
6959  return _IMP_core.WeightedSum_get_weight(self, i)
6960 
6961  def get_function(self, i):
6962  r"""get_function(WeightedSum self, unsigned int i) -> UnaryFunction"""
6963  return _IMP_core.WeightedSum_get_function(self, i)
6964 
6965  def get_version_info(self):
6966  r"""get_version_info(WeightedSum self) -> VersionInfo"""
6967  return _IMP_core.WeightedSum_get_version_info(self)
6968  __swig_destroy__ = _IMP_core.delete_WeightedSum
6969 
6970  def __str__(self):
6971  r"""__str__(WeightedSum self) -> std::string"""
6972  return _IMP_core.WeightedSum___str__(self)
6973 
6974  def __repr__(self):
6975  r"""__repr__(WeightedSum self) -> std::string"""
6976  return _IMP_core.WeightedSum___repr__(self)
6977 
6978  @staticmethod
6979  def get_from(o):
6980  return _object_cast_to_WeightedSum(o)
6981 
6982 
6983  def _get_jax(self):
6984  import jax.numpy as jnp
6985  def score(val, funcs, weights):
6986  return sum(f(val) * weight for (f, weight) in zip(funcs, weights))
6987  nfunc = self.get_function_number()
6988  funcs = [self.get_function(i).get_derived_object()._get_jax()
6989  for i in range(nfunc)]
6990  return functools.partial(score, funcs=funcs,
6991  weights=self.get_weights())
6992 
6993 
6994 # Register WeightedSum in _IMP_core:
6995 _IMP_core.WeightedSum_swigregister(WeightedSum)
6996 class WeightedSumOfExponential(IMP.UnaryFunction):
6997  r"""Proxy of C++ IMP::core::WeightedSumOfExponential class."""
6998 
6999  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7000 
7001  def __init__(self, funcs, weights, denom=1.0):
7002  r"""__init__(WeightedSumOfExponential self, IMP::UnaryFunctions funcs, IMP::Floats weights, IMP::Float denom=1.0) -> WeightedSumOfExponential"""
7003  _IMP_core.WeightedSumOfExponential_swiginit(self, _IMP_core.new_WeightedSumOfExponential(funcs, weights, denom))
7004 
7005  def get_function_number(self):
7006  r"""get_function_number(WeightedSumOfExponential self) -> unsigned int"""
7007  return _IMP_core.WeightedSumOfExponential_get_function_number(self)
7008 
7009  def set_weights(self, weights):
7010  r"""set_weights(WeightedSumOfExponential self, IMP::Floats weights)"""
7011  return _IMP_core.WeightedSumOfExponential_set_weights(self, weights)
7012 
7013  def get_weights(self):
7014  r"""get_weights(WeightedSumOfExponential self) -> IMP::Floats"""
7015  return _IMP_core.WeightedSumOfExponential_get_weights(self)
7016 
7017  def get_weight(self, i):
7018  r"""get_weight(WeightedSumOfExponential self, unsigned int i) -> double"""
7019  return _IMP_core.WeightedSumOfExponential_get_weight(self, i)
7020 
7021  def get_function(self, i):
7022  r"""get_function(WeightedSumOfExponential self, unsigned int i) -> UnaryFunction"""
7023  return _IMP_core.WeightedSumOfExponential_get_function(self, i)
7024 
7025  def set_denominator(self, denom):
7026  r"""set_denominator(WeightedSumOfExponential self, double denom)"""
7027  return _IMP_core.WeightedSumOfExponential_set_denominator(self, denom)
7028 
7029  def get_denominator(self):
7030  r"""get_denominator(WeightedSumOfExponential self) -> double"""
7031  return _IMP_core.WeightedSumOfExponential_get_denominator(self)
7032 
7033  def get_version_info(self):
7034  r"""get_version_info(WeightedSumOfExponential self) -> VersionInfo"""
7035  return _IMP_core.WeightedSumOfExponential_get_version_info(self)
7036  __swig_destroy__ = _IMP_core.delete_WeightedSumOfExponential
7037 
7038  def __str__(self):
7039  r"""__str__(WeightedSumOfExponential self) -> std::string"""
7040  return _IMP_core.WeightedSumOfExponential___str__(self)
7041 
7042  def __repr__(self):
7043  r"""__repr__(WeightedSumOfExponential self) -> std::string"""
7044  return _IMP_core.WeightedSumOfExponential___repr__(self)
7045 
7046  @staticmethod
7047  def get_from(o):
7048  return _object_cast_to_WeightedSumOfExponential(o)
7049 
7050 
7051  def _get_jax(self):
7052  import jax.numpy as jnp
7053  def score(val, funcs, weights, denom):
7054  exp_sum = sum(weight * jnp.exp(-f(val) / denom)
7055  for (f, weight) in zip(funcs, weights))
7056  return -jnp.log(exp_sum) * denom
7057  nfunc = self.get_function_number()
7058  funcs = [self.get_function(i).get_derived_object()._get_jax()
7059  for i in range(nfunc)]
7060  return functools.partial(score, funcs=funcs,
7061  weights=self.get_weights(),
7062  denom=self.get_denominator())
7063 
7064 
7065 # Register WeightedSumOfExponential in _IMP_core:
7066 _IMP_core.WeightedSumOfExponential_swigregister(WeightedSumOfExponential)
7067 class MSConnectivityRestraint(IMP.Restraint):
7068  r"""Proxy of C++ IMP::core::MSConnectivityRestraint class."""
7069 
7070  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7071 
7072  def __init__(self, m, ps, eps=0.1):
7073  r"""__init__(MSConnectivityRestraint self, Model m, PairScore ps, double eps=0.1) -> MSConnectivityRestraint"""
7074  _IMP_core.MSConnectivityRestraint_swiginit(self, _IMP_core.new_MSConnectivityRestraint(m, ps, eps))
7075 
7076  def add_type(self, ps):
7077  r"""add_type(MSConnectivityRestraint self, IMP::ParticlesTemp const & ps) -> unsigned int"""
7078  return _IMP_core.MSConnectivityRestraint_add_type(self, ps)
7079 
7080  def add_composite(self, *args):
7081  r"""
7082  add_composite(MSConnectivityRestraint self, IMP::Ints const & components) -> unsigned int
7083  add_composite(MSConnectivityRestraint self, IMP::Ints const & components, unsigned int parent) -> unsigned int
7084  """
7085  return _IMP_core.MSConnectivityRestraint_add_composite(self, *args)
7086 
7087  def get_connected_pairs(self):
7088  r"""get_connected_pairs(MSConnectivityRestraint self) -> IMP::ParticlePairsTemp"""
7089  return _IMP_core.MSConnectivityRestraint_get_connected_pairs(self)
7090 
7091  def get_pair_score(self):
7092  r"""get_pair_score(MSConnectivityRestraint self) -> PairScore"""
7093  return _IMP_core.MSConnectivityRestraint_get_pair_score(self)
7094 
7095  def do_create_current_decomposition(self):
7096  r"""do_create_current_decomposition(MSConnectivityRestraint self) -> IMP::Restraints"""
7097  return _IMP_core.MSConnectivityRestraint_do_create_current_decomposition(self)
7098 
7099  def do_get_inputs(self):
7100  r"""do_get_inputs(MSConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
7101  return _IMP_core.MSConnectivityRestraint_do_get_inputs(self)
7102 
7103  def get_version_info(self):
7104  r"""get_version_info(MSConnectivityRestraint self) -> VersionInfo"""
7105  return _IMP_core.MSConnectivityRestraint_get_version_info(self)
7106  __swig_destroy__ = _IMP_core.delete_MSConnectivityRestraint
7107 
7108  def __str__(self):
7109  r"""__str__(MSConnectivityRestraint self) -> std::string"""
7110  return _IMP_core.MSConnectivityRestraint___str__(self)
7111 
7112  def __repr__(self):
7113  r"""__repr__(MSConnectivityRestraint self) -> std::string"""
7114  return _IMP_core.MSConnectivityRestraint___repr__(self)
7115 
7116  @staticmethod
7117  def get_from(o):
7118  return _object_cast_to_MSConnectivityRestraint(o)
7119 
7120 
7121 # Register MSConnectivityRestraint in _IMP_core:
7122 _IMP_core.MSConnectivityRestraint_swigregister(MSConnectivityRestraint)
7123 class HierarchyTraits(object):
7124  r"""Proxy of C++ IMP::core::HierarchyTraits class."""
7125 
7126  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7127 
7128  def __init__(self, *args):
7129  r"""
7130  __init__(HierarchyTraits self) -> HierarchyTraits
7131  __init__(HierarchyTraits self, std::string name) -> HierarchyTraits
7132  """
7133  _IMP_core.HierarchyTraits_swiginit(self, _IMP_core.new_HierarchyTraits(*args))
7134 
7135  def get_children_key(self):
7136  r"""get_children_key(HierarchyTraits self) -> ParticleIndexesKey"""
7137  return _IMP_core.HierarchyTraits_get_children_key(self)
7138 
7139  def get_parent_key(self):
7140  r"""get_parent_key(HierarchyTraits self) -> ParticleIndexKey"""
7141  return _IMP_core.HierarchyTraits_get_parent_key(self)
7142 
7143  def __eq__(self, o):
7144  r"""__eq__(HierarchyTraits self, HierarchyTraits o) -> bool"""
7145  return _IMP_core.HierarchyTraits___eq__(self, o)
7146 
7147  def show(self, *args):
7148  r"""show(HierarchyTraits self, _ostream out=std::cout)"""
7149  return _IMP_core.HierarchyTraits_show(self, *args)
7150 
7151  def __str__(self):
7152  r"""__str__(HierarchyTraits self) -> std::string"""
7153  return _IMP_core.HierarchyTraits___str__(self)
7154 
7155  def __repr__(self):
7156  r"""__repr__(HierarchyTraits self) -> std::string"""
7157  return _IMP_core.HierarchyTraits___repr__(self)
7158  __swig_destroy__ = _IMP_core.delete_HierarchyTraits
7159 
7160 # Register HierarchyTraits in _IMP_core:
7161 _IMP_core.HierarchyTraits_swigregister(HierarchyTraits)
7162 class Hierarchy(IMP.Decorator):
7163  r"""Proxy of C++ IMP::core::Hierarchy class."""
7164 
7165  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7166 
7167  def get_decorator_traits(self):
7168  r"""get_decorator_traits(Hierarchy self) -> HierarchyTraits"""
7169  return _IMP_core.Hierarchy_get_decorator_traits(self)
7170 
7171  @staticmethod
7172  def get_default_decorator_traits():
7173  r"""get_default_decorator_traits() -> HierarchyTraits"""
7174  return _IMP_core.Hierarchy_get_default_decorator_traits()
7175 
7176  def __init__(self, *args):
7177  r"""
7178  __init__(Hierarchy self) -> Hierarchy
7179  __init__(Hierarchy self, Model m, ParticleIndex id, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7180  __init__(Hierarchy self, _ParticleAdaptor d, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7181  """
7182  _IMP_core.Hierarchy_swiginit(self, _IMP_core.new_Hierarchy(*args))
7183 
7184  def show(self, *args):
7185  r"""show(Hierarchy self, _ostream out=std::cout)"""
7186  return _IMP_core.Hierarchy_show(self, *args)
7187 
7188  @staticmethod
7189  def setup_particle(*args):
7190  r"""
7191  setup_particle(Model m, ParticleIndex pi, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7192  setup_particle(_ParticleAdaptor d, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7193  setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7194  setup_particle(_ParticleAdaptor d, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7195  setup_particle(Model m, ParticleIndex pi, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7196  setup_particle(_ParticleAdaptor d, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7197  """
7198  return _IMP_core.Hierarchy_setup_particle(*args)
7199 
7200  @staticmethod
7201  def get_is_setup(*args):
7202  r"""
7203  get_is_setup(_ParticleAdaptor p, HierarchyTraits tr=get_default_traits()) -> bool
7204  get_is_setup(Model arg1, ParticleIndex arg2, HierarchyTraits arg3=Hierarchy::get_default_traits()) -> bool
7205  """
7206  return _IMP_core.Hierarchy_get_is_setup(*args)
7207 
7208  @staticmethod
7209  def get_changed_key():
7210  r"""get_changed_key() -> TriggerKey"""
7211  return _IMP_core.Hierarchy_get_changed_key()
7212 
7213  def get_parent(self):
7214  r"""get_parent(Hierarchy self) -> Hierarchy"""
7215  return _IMP_core.Hierarchy_get_parent(self)
7216 
7217  def get_number_of_children(self):
7218  r"""get_number_of_children(Hierarchy self) -> unsigned int"""
7219  return _IMP_core.Hierarchy_get_number_of_children(self)
7220 
7221  def get_child(self, i):
7222  r"""get_child(Hierarchy self, unsigned int i) -> Hierarchy"""
7223  return _IMP_core.Hierarchy_get_child(self, i)
7224 
7225  def get_children_indexes(self):
7226  r"""get_children_indexes(Hierarchy self) -> IMP::ParticleIndexes"""
7227  return _IMP_core.Hierarchy_get_children_indexes(self)
7228 
7229  def get_children(self):
7230  r"""get_children(Hierarchy self) -> IMP::core::GenericHierarchies"""
7231  return _IMP_core.Hierarchy_get_children(self)
7232 
7233  def remove_child(self, *args):
7234  r"""
7235  remove_child(Hierarchy self, unsigned int i)
7236  remove_child(Hierarchy self, Hierarchy h)
7237  """
7238  return _IMP_core.Hierarchy_remove_child(self, *args)
7239 
7240  def clear_children(self):
7241  r"""clear_children(Hierarchy self)"""
7242  return _IMP_core.Hierarchy_clear_children(self)
7243 
7244  def add_child(self, h):
7245  r"""add_child(Hierarchy self, Hierarchy h)"""
7246  return _IMP_core.Hierarchy_add_child(self, h)
7247 
7248  def add_child_at(self, h, pos):
7249  r"""add_child_at(Hierarchy self, Hierarchy h, unsigned int pos)"""
7250  return _IMP_core.Hierarchy_add_child_at(self, h, pos)
7251 
7252  def get_child_index(self, *args):
7253  r"""
7254  get_child_index(Hierarchy self, unsigned int i) -> ParticleIndex
7255  get_child_index(Hierarchy self) -> int
7256  """
7257  return _IMP_core.Hierarchy_get_child_index(self, *args)
7258 
7259  @staticmethod
7260  def get_default_traits():
7261  r"""get_default_traits() -> HierarchyTraits"""
7262  return _IMP_core.Hierarchy_get_default_traits()
7263 
7264  def get_traits(self):
7265  r"""get_traits(Hierarchy self) -> HierarchyTraits"""
7266  return _IMP_core.Hierarchy_get_traits(self)
7267 
7268  def add_attribute(self, *args):
7269  r"""
7270  add_attribute(Hierarchy self, FloatKey k, IMP::Float v, bool opt)
7271  add_attribute(Hierarchy self, FloatKey a0, IMP::Float a1)
7272  add_attribute(Hierarchy self, IntKey a0, IMP::Int a1)
7273  add_attribute(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7274  add_attribute(Hierarchy self, IntsKey a0, IMP::Ints a1)
7275  add_attribute(Hierarchy self, StringKey a0, IMP::String a1)
7276  add_attribute(Hierarchy self, ParticleIndexKey a0, Particle a1)
7277  add_attribute(Hierarchy self, ObjectKey a0, Object a1)
7278  add_attribute(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7279  add_attribute(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7280  add_attribute(Hierarchy self, SparseStringKey a0, IMP::String a1)
7281  add_attribute(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7282  """
7283  return _IMP_core.Hierarchy_add_attribute(self, *args)
7284 
7285  def get_value(self, *args):
7286  r"""
7287  get_value(Hierarchy self, FloatKey a0) -> IMP::Float
7288  get_value(Hierarchy self, IntKey a0) -> IMP::Int
7289  get_value(Hierarchy self, FloatsKey a0) -> IMP::Floats
7290  get_value(Hierarchy self, IntsKey a0) -> IMP::Ints
7291  get_value(Hierarchy self, StringKey a0) -> IMP::String
7292  get_value(Hierarchy self, ParticleIndexKey a0) -> Particle
7293  get_value(Hierarchy self, ObjectKey a0) -> Object
7294  get_value(Hierarchy self, SparseFloatKey a0) -> IMP::Float
7295  get_value(Hierarchy self, SparseIntKey a0) -> IMP::Int
7296  get_value(Hierarchy self, SparseStringKey a0) -> IMP::String
7297  get_value(Hierarchy self, SparseParticleIndexKey a0) -> ParticleIndex
7298  """
7299  return _IMP_core.Hierarchy_get_value(self, *args)
7300 
7301  def set_value(self, *args):
7302  r"""
7303  set_value(Hierarchy self, FloatKey a0, IMP::Float a1)
7304  set_value(Hierarchy self, IntKey a0, IMP::Int a1)
7305  set_value(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7306  set_value(Hierarchy self, IntsKey a0, IMP::Ints a1)
7307  set_value(Hierarchy self, StringKey a0, IMP::String a1)
7308  set_value(Hierarchy self, ParticleIndexKey a0, Particle a1)
7309  set_value(Hierarchy self, ObjectKey a0, Object a1)
7310  set_value(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7311  set_value(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7312  set_value(Hierarchy self, SparseStringKey a0, IMP::String a1)
7313  set_value(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7314  """
7315  return _IMP_core.Hierarchy_set_value(self, *args)
7316 
7317  def remove_attribute(self, *args):
7318  r"""
7319  remove_attribute(Hierarchy self, FloatKey a0)
7320  remove_attribute(Hierarchy self, IntKey a0)
7321  remove_attribute(Hierarchy self, FloatsKey a0)
7322  remove_attribute(Hierarchy self, IntsKey a0)
7323  remove_attribute(Hierarchy self, StringKey a0)
7324  remove_attribute(Hierarchy self, ParticleIndexKey a0)
7325  remove_attribute(Hierarchy self, ObjectKey a0)
7326  remove_attribute(Hierarchy self, SparseFloatKey a0)
7327  remove_attribute(Hierarchy self, SparseIntKey a0)
7328  remove_attribute(Hierarchy self, SparseStringKey a0)
7329  remove_attribute(Hierarchy self, SparseParticleIndexKey a0)
7330  """
7331  return _IMP_core.Hierarchy_remove_attribute(self, *args)
7332 
7333  def has_attribute(self, *args):
7334  r"""
7335  has_attribute(Hierarchy self, FloatKey a0) -> bool
7336  has_attribute(Hierarchy self, IntKey a0) -> bool
7337  has_attribute(Hierarchy self, FloatsKey a0) -> bool
7338  has_attribute(Hierarchy self, IntsKey a0) -> bool
7339  has_attribute(Hierarchy self, StringKey a0) -> bool
7340  has_attribute(Hierarchy self, ParticleIndexKey a0) -> bool
7341  has_attribute(Hierarchy self, ObjectKey a0) -> bool
7342  has_attribute(Hierarchy self, SparseFloatKey a0) -> bool
7343  has_attribute(Hierarchy self, SparseIntKey a0) -> bool
7344  has_attribute(Hierarchy self, SparseStringKey a0) -> bool
7345  has_attribute(Hierarchy self, SparseParticleIndexKey a0) -> bool
7346  """
7347  return _IMP_core.Hierarchy_has_attribute(self, *args)
7348 
7349  def get_derivative(self, a0):
7350  r"""get_derivative(Hierarchy self, FloatKey a0) -> double"""
7351  return _IMP_core.Hierarchy_get_derivative(self, a0)
7352 
7353  def get_name(self):
7354  r"""get_name(Hierarchy self) -> std::string"""
7355  return _IMP_core.Hierarchy_get_name(self)
7356 
7357  def clear_caches(self):
7358  r"""clear_caches(Hierarchy self)"""
7359  return _IMP_core.Hierarchy_clear_caches(self)
7360 
7361  def set_name(self, a0):
7362  r"""set_name(Hierarchy self, std::string a0)"""
7363  return _IMP_core.Hierarchy_set_name(self, a0)
7364 
7365  def set_check_level(self, a0):
7366  r"""set_check_level(Hierarchy self, IMP::CheckLevel a0)"""
7367  return _IMP_core.Hierarchy_set_check_level(self, a0)
7368 
7369  def add_to_derivative(self, a0, a1, a2):
7370  r"""add_to_derivative(Hierarchy self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
7371  return _IMP_core.Hierarchy_add_to_derivative(self, a0, a1, a2)
7372 
7373  def set_is_optimized(self, a0, a1):
7374  r"""set_is_optimized(Hierarchy self, FloatKey a0, bool a1)"""
7375  return _IMP_core.Hierarchy_set_is_optimized(self, a0, a1)
7376 
7377  def get_is_optimized(self, a0):
7378  r"""get_is_optimized(Hierarchy self, FloatKey a0) -> bool"""
7379  return _IMP_core.Hierarchy_get_is_optimized(self, a0)
7380 
7381  def get_check_level(self):
7382  r"""get_check_level(Hierarchy self) -> IMP::CheckLevel"""
7383  return _IMP_core.Hierarchy_get_check_level(self)
7384 
7385  def __eq__(self, *args):
7386  r"""
7387  __eq__(Hierarchy self, Hierarchy o) -> bool
7388  __eq__(Hierarchy self, Particle d) -> bool
7389  """
7390  return _IMP_core.Hierarchy___eq__(self, *args)
7391 
7392  def __ne__(self, *args):
7393  r"""
7394  __ne__(Hierarchy self, Hierarchy o) -> bool
7395  __ne__(Hierarchy self, Particle d) -> bool
7396  """
7397  return _IMP_core.Hierarchy___ne__(self, *args)
7398 
7399  def __le__(self, *args):
7400  r"""
7401  __le__(Hierarchy self, Hierarchy o) -> bool
7402  __le__(Hierarchy self, Particle d) -> bool
7403  """
7404  return _IMP_core.Hierarchy___le__(self, *args)
7405 
7406  def __lt__(self, *args):
7407  r"""
7408  __lt__(Hierarchy self, Hierarchy o) -> bool
7409  __lt__(Hierarchy self, Particle d) -> bool
7410  """
7411  return _IMP_core.Hierarchy___lt__(self, *args)
7412 
7413  def __ge__(self, *args):
7414  r"""
7415  __ge__(Hierarchy self, Hierarchy o) -> bool
7416  __ge__(Hierarchy self, Particle d) -> bool
7417  """
7418  return _IMP_core.Hierarchy___ge__(self, *args)
7419 
7420  def __gt__(self, *args):
7421  r"""
7422  __gt__(Hierarchy self, Hierarchy o) -> bool
7423  __gt__(Hierarchy self, Particle d) -> bool
7424  """
7425  return _IMP_core.Hierarchy___gt__(self, *args)
7426 
7427  def __hash__(self):
7428  r"""__hash__(Hierarchy self) -> std::size_t"""
7429  return _IMP_core.Hierarchy___hash__(self)
7430 
7431  def __str__(self):
7432  r"""__str__(Hierarchy self) -> std::string"""
7433  return _IMP_core.Hierarchy___str__(self)
7434 
7435  def __repr__(self):
7436  r"""__repr__(Hierarchy self) -> std::string"""
7437  return _IMP_core.Hierarchy___repr__(self)
7438  __swig_destroy__ = _IMP_core.delete_Hierarchy
7439 
7440 # Register Hierarchy in _IMP_core:
7441 _IMP_core.Hierarchy_swigregister(Hierarchy)
7442 class HierarchyVisitor(object):
7443  r"""Proxy of C++ IMP::core::HierarchyVisitor class."""
7444 
7445  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7446  __repr__ = _swig_repr
7447 
7448  def __init__(self):
7449  r"""__init__(HierarchyVisitor self) -> HierarchyVisitor"""
7450  if self.__class__ == HierarchyVisitor:
7451  _self = None
7452  else:
7453  _self = self
7454  _IMP_core.HierarchyVisitor_swiginit(self, _IMP_core.new_HierarchyVisitor(_self, ))
7455 
7456  if self.__class__ != HierarchyVisitor:
7457  _director_objects.register(self)
7458 
7459 
7460 
7461 
7462  def __call__(self, p):
7463  r"""__call__(HierarchyVisitor self, Hierarchy p) -> bool"""
7464  return _IMP_core.HierarchyVisitor___call__(self, p)
7465  __swig_destroy__ = _IMP_core.delete_HierarchyVisitor
7466  def __disown__(self):
7467  self.this.disown()
7468  _IMP_core.disown_HierarchyVisitor(self)
7469  return weakref.proxy(self)
7470 
7471 # Register HierarchyVisitor in _IMP_core:
7472 _IMP_core.HierarchyVisitor_swigregister(HierarchyVisitor)
7473 class ModifierVisitor(HierarchyVisitor):
7474  r"""Proxy of C++ IMP::core::ModifierVisitor class."""
7475 
7476  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7477  __repr__ = _swig_repr
7478 
7479  def __init__(self, sm):
7480  r"""__init__(ModifierVisitor self, SingletonModifier sm) -> ModifierVisitor"""
7481  _IMP_core.ModifierVisitor_swiginit(self, _IMP_core.new_ModifierVisitor(sm))
7482  __swig_destroy__ = _IMP_core.delete_ModifierVisitor
7483 
7484 # Register ModifierVisitor in _IMP_core:
7485 _IMP_core.ModifierVisitor_swigregister(ModifierVisitor)
7486 class HierarchyCounter(HierarchyVisitor):
7487  r"""Proxy of C++ IMP::core::HierarchyCounter class."""
7488 
7489  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7490 
7491  def __init__(self):
7492  r"""__init__(HierarchyCounter self) -> HierarchyCounter"""
7493  _IMP_core.HierarchyCounter_swiginit(self, _IMP_core.new_HierarchyCounter())
7494 
7495  def get_count(self):
7496  r"""get_count(HierarchyCounter self) -> unsigned int"""
7497  return _IMP_core.HierarchyCounter_get_count(self)
7498 
7499  def show(self, *args):
7500  r"""show(HierarchyCounter self, _ostream out=std::cout)"""
7501  return _IMP_core.HierarchyCounter_show(self, *args)
7502 
7503  def __str__(self):
7504  r"""__str__(HierarchyCounter self) -> std::string"""
7505  return _IMP_core.HierarchyCounter___str__(self)
7506 
7507  def __repr__(self):
7508  r"""__repr__(HierarchyCounter self) -> std::string"""
7509  return _IMP_core.HierarchyCounter___repr__(self)
7510 
7511  def _get_as_binary(self):
7512  r"""_get_as_binary(HierarchyCounter self) -> PyObject *"""
7513  return _IMP_core.HierarchyCounter__get_as_binary(self)
7514 
7515  def _set_from_binary(self, p):
7516  r"""_set_from_binary(HierarchyCounter self, PyObject * p)"""
7517  return _IMP_core.HierarchyCounter__set_from_binary(self, p)
7518 
7519  def __getstate__(self):
7520  p = self._get_as_binary()
7521  if len(self.__dict__) > 1:
7522  d = self.__dict__.copy()
7523  del d['this']
7524  p = (d, p)
7525  return p
7526 
7527  def __setstate__(self, p):
7528  if not hasattr(self, 'this'):
7529  self.__init__()
7530  if isinstance(p, tuple):
7531  d, p = p
7532  self.__dict__.update(d)
7533  return self._set_from_binary(p)
7534 
7535  __swig_destroy__ = _IMP_core.delete_HierarchyCounter
7536 
7537 # Register HierarchyCounter in _IMP_core:
7538 _IMP_core.HierarchyCounter_swigregister(HierarchyCounter)
7539 
7540 def get_leaves(mhd):
7541  r"""get_leaves(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7542  return _IMP_core.get_leaves(mhd)
7543 
7544 def get_internal(mhd):
7545  r"""get_internal(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7546  return _IMP_core.get_internal(mhd)
7547 
7548 def get_all_descendants(mhd):
7549  r"""get_all_descendants(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7550  return _IMP_core.get_all_descendants(mhd)
7551 
7552 def get_root(h):
7553  r"""get_root(Hierarchy h) -> Hierarchy"""
7554  return _IMP_core.get_root(h)
7555 
7556 def visit_breadth_first(d, f):
7557  r"""visit_breadth_first(Hierarchy d, HierarchyVisitor f)"""
7558  return _IMP_core.visit_breadth_first(d, f)
7559 
7560 def visit_depth_first(d, f):
7561  r"""visit_depth_first(Hierarchy d, HierarchyVisitor f)"""
7562  return _IMP_core.visit_depth_first(d, f)
7563 class LeavesRefiner(IMP.Refiner):
7564  r"""Proxy of C++ IMP::core::LeavesRefiner 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, tr):
7569  r"""__init__(LeavesRefiner self, HierarchyTraits tr) -> LeavesRefiner"""
7570  _IMP_core.LeavesRefiner_swiginit(self, _IMP_core.new_LeavesRefiner(tr))
7571 
7572  def do_get_inputs(self, m, pis):
7573  r"""do_get_inputs(LeavesRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7574  return _IMP_core.LeavesRefiner_do_get_inputs(self, m, pis)
7575 
7576  def get_version_info(self):
7577  r"""get_version_info(LeavesRefiner self) -> VersionInfo"""
7578  return _IMP_core.LeavesRefiner_get_version_info(self)
7579  __swig_destroy__ = _IMP_core.delete_LeavesRefiner
7580 
7581  def __str__(self):
7582  r"""__str__(LeavesRefiner self) -> std::string"""
7583  return _IMP_core.LeavesRefiner___str__(self)
7584 
7585  def __repr__(self):
7586  r"""__repr__(LeavesRefiner self) -> std::string"""
7587  return _IMP_core.LeavesRefiner___repr__(self)
7588 
7589  @staticmethod
7590  def get_from(o):
7591  return _object_cast_to_LeavesRefiner(o)
7592 
7593 
7594 # Register LeavesRefiner in _IMP_core:
7595 _IMP_core.LeavesRefiner_swigregister(LeavesRefiner)
7596 class Linear(IMP.UnaryFunction):
7597  r"""Proxy of C++ IMP::core::Linear class."""
7598 
7599  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7600 
7601  def __init__(self, *args):
7602  r"""
7603  __init__(Linear self, double offset, double slope) -> Linear
7604  __init__(Linear self) -> Linear
7605  """
7606  _IMP_core.Linear_swiginit(self, _IMP_core.new_Linear(*args))
7607 
7608  def set_slope(self, f):
7609  r"""set_slope(Linear self, double f)"""
7610  return _IMP_core.Linear_set_slope(self, f)
7611 
7612  def get_slope(self):
7613  r"""get_slope(Linear self) -> double"""
7614  return _IMP_core.Linear_get_slope(self)
7615 
7616  def set_offset(self, f):
7617  r"""set_offset(Linear self, double f)"""
7618  return _IMP_core.Linear_set_offset(self, f)
7619 
7620  def get_offset(self):
7621  r"""get_offset(Linear self) -> double"""
7622  return _IMP_core.Linear_get_offset(self)
7623 
7624  def get_version_info(self):
7625  r"""get_version_info(Linear self) -> VersionInfo"""
7626  return _IMP_core.Linear_get_version_info(self)
7627  __swig_destroy__ = _IMP_core.delete_Linear
7628 
7629  def __str__(self):
7630  r"""__str__(Linear self) -> std::string"""
7631  return _IMP_core.Linear___str__(self)
7632 
7633  def __repr__(self):
7634  r"""__repr__(Linear self) -> std::string"""
7635  return _IMP_core.Linear___repr__(self)
7636 
7637  @staticmethod
7638  def get_from(o):
7639  return _object_cast_to_Linear(o)
7640 
7641 
7642  def _get_as_binary(self):
7643  r"""_get_as_binary(Linear self) -> PyObject *"""
7644  return _IMP_core.Linear__get_as_binary(self)
7645 
7646  def _set_from_binary(self, p):
7647  r"""_set_from_binary(Linear self, PyObject * p)"""
7648  return _IMP_core.Linear__set_from_binary(self, p)
7649 
7650  def __getstate__(self):
7651  p = self._get_as_binary()
7652  if len(self.__dict__) > 1:
7653  d = self.__dict__.copy()
7654  del d['this']
7655  p = (d, p)
7656  return p
7657 
7658  def __setstate__(self, p):
7659  if not hasattr(self, 'this'):
7660  self.__init__()
7661  if isinstance(p, tuple):
7662  d, p = p
7663  self.__dict__.update(d)
7664  return self._set_from_binary(p)
7665 
7666 
7667  def _get_jax(self):
7668  def score(val, slope, offset):
7669  return (val - offset) * slope
7670  return functools.partial(score, slope=self.get_slope(),
7671  offset=self.get_offset())
7672 
7673 
7674 # Register Linear in _IMP_core:
7675 _IMP_core.Linear_swigregister(Linear)
7676 class LogNormalMover(MonteCarloMover):
7677  r"""Proxy of C++ IMP::core::LogNormalMover class."""
7678 
7679  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7680 
7681  def __init__(self, *args):
7682  r"""
7683  __init__(LogNormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> LogNormalMover
7684  __init__(LogNormalMover self, Model m, ParticleIndex pi, double stddev) -> LogNormalMover
7685  __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> LogNormalMover
7686  __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> LogNormalMover
7687  __init__(LogNormalMover self) -> LogNormalMover
7688  """
7689  _IMP_core.LogNormalMover_swiginit(self, _IMP_core.new_LogNormalMover(*args))
7690 
7691  def set_sigma(self, sigma):
7692  r"""set_sigma(LogNormalMover self, IMP::Float sigma)"""
7693  return _IMP_core.LogNormalMover_set_sigma(self, sigma)
7694 
7695  def get_sigma(self):
7696  r"""get_sigma(LogNormalMover self) -> IMP::Float"""
7697  return _IMP_core.LogNormalMover_get_sigma(self)
7698 
7699  def get_indexes(self):
7700  r"""get_indexes(LogNormalMover self) -> IMP::ParticleIndexes"""
7701  return _IMP_core.LogNormalMover_get_indexes(self)
7702 
7703  def get_keys(self):
7704  r"""get_keys(LogNormalMover self) -> IMP::FloatKeys"""
7705  return _IMP_core.LogNormalMover_get_keys(self)
7706 
7707  def get_version_info(self):
7708  r"""get_version_info(LogNormalMover self) -> VersionInfo"""
7709  return _IMP_core.LogNormalMover_get_version_info(self)
7710  __swig_destroy__ = _IMP_core.delete_LogNormalMover
7711 
7712  def __str__(self):
7713  r"""__str__(LogNormalMover self) -> std::string"""
7714  return _IMP_core.LogNormalMover___str__(self)
7715 
7716  def __repr__(self):
7717  r"""__repr__(LogNormalMover self) -> std::string"""
7718  return _IMP_core.LogNormalMover___repr__(self)
7719 
7720  @staticmethod
7721  def get_from(o):
7722  return _object_cast_to_LogNormalMover(o)
7723 
7724 
7725  def _get_as_binary(self):
7726  r"""_get_as_binary(LogNormalMover self) -> PyObject *"""
7727  return _IMP_core.LogNormalMover__get_as_binary(self)
7728 
7729  def _set_from_binary(self, p):
7730  r"""_set_from_binary(LogNormalMover self, PyObject * p)"""
7731  return _IMP_core.LogNormalMover__set_from_binary(self, p)
7732 
7733  def __getstate__(self):
7734  p = self._get_as_binary()
7735  if len(self.__dict__) > 1:
7736  d = self.__dict__.copy()
7737  del d['this']
7738  p = (d, p)
7739  return p
7740 
7741  def __setstate__(self, p):
7742  if not hasattr(self, 'this'):
7743  self.__init__()
7744  if isinstance(p, tuple):
7745  d, p = p
7746  self.__dict__.update(d)
7747  return self._set_from_binary(p)
7748 
7749 
7750  def _get_jax(self, space):
7751  import jax.random
7752  from IMP.core._jax_util import _get_offset_propose_func
7753  keys = self.get_keys()
7754  sigma = self.get_sigma()
7755 
7756  def offset_func(key, shape):
7757  key, subkey = jax.random.split(key)
7758  return key, jax.random.lognormal(subkey, sigma, shape)
7759 
7760  propose_func, keys = _get_offset_propose_func(
7761  self.get_indexes(), keys, offset_func)
7762 
7763  return self._wrap_jax(lambda key: key, propose_func, keys=keys)
7764 
7765 
7766 # Register LogNormalMover in _IMP_core:
7767 _IMP_core.LogNormalMover_swigregister(LogNormalMover)
7768 IMP_CORE_HAS_MONTE_CARLO_MOVER = _IMP_core.IMP_CORE_HAS_MONTE_CARLO_MOVER
7769 
7770 class MonteCarlo(IMP.Optimizer):
7771  r"""Proxy of C++ IMP::core::MonteCarlo class."""
7772 
7773  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7774 
7775  def __init__(self, *args):
7776  r"""
7777  __init__(MonteCarlo self, Model m) -> MonteCarlo
7778  __init__(MonteCarlo self) -> MonteCarlo
7779  """
7780  _IMP_core.MonteCarlo_swiginit(self, _IMP_core.new_MonteCarlo(*args))
7781 
7782  def get_version_info(self):
7783  r"""get_version_info(MonteCarlo self) -> VersionInfo"""
7784  return _IMP_core.MonteCarlo_get_version_info(self)
7785  __swig_destroy__ = _IMP_core.delete_MonteCarlo
7786 
7787  def set_return_best(self, tf):
7788  r"""set_return_best(MonteCarlo self, bool tf)"""
7789  return _IMP_core.MonteCarlo_set_return_best(self, tf)
7790 
7791  def get_return_best(self):
7792  r"""get_return_best(MonteCarlo self) -> bool"""
7793  return _IMP_core.MonteCarlo_get_return_best(self)
7794 
7795  def set_score_moved(self, mv):
7796  r"""set_score_moved(MonteCarlo self, bool mv)"""
7797  return _IMP_core.MonteCarlo_set_score_moved(self, mv)
7798 
7799  def set_kt(self, t):
7800  r"""set_kt(MonteCarlo self, IMP::Float t)"""
7801  return _IMP_core.MonteCarlo_set_kt(self, t)
7802 
7803  def get_kt(self):
7804  r"""get_kt(MonteCarlo self) -> IMP::Float"""
7805  return _IMP_core.MonteCarlo_get_kt(self)
7806 
7807  def get_last_accepted_energy(self):
7808  r"""get_last_accepted_energy(MonteCarlo self) -> double"""
7809  return _IMP_core.MonteCarlo_get_last_accepted_energy(self)
7810 
7811  def set_last_accepted_energy(self, energy):
7812  r"""set_last_accepted_energy(MonteCarlo self, double energy)"""
7813  return _IMP_core.MonteCarlo_set_last_accepted_energy(self, energy)
7814 
7815  def get_best_accepted_energy(self):
7816  r"""get_best_accepted_energy(MonteCarlo self) -> double"""
7817  return _IMP_core.MonteCarlo_get_best_accepted_energy(self)
7818 
7819  def set_best_accepted_energy(self, energy):
7820  r"""set_best_accepted_energy(MonteCarlo self, double energy)"""
7821  return _IMP_core.MonteCarlo_set_best_accepted_energy(self, energy)
7822 
7823  def get_number_of_downward_steps(self):
7824  r"""get_number_of_downward_steps(MonteCarlo self) -> unsigned int"""
7825  return _IMP_core.MonteCarlo_get_number_of_downward_steps(self)
7826 
7827  def get_number_of_upward_steps(self):
7828  r"""get_number_of_upward_steps(MonteCarlo self) -> unsigned int"""
7829  return _IMP_core.MonteCarlo_get_number_of_upward_steps(self)
7830 
7831  def get_number_of_proposed_steps(self):
7832  r"""get_number_of_proposed_steps(MonteCarlo self) -> unsigned int"""
7833  return _IMP_core.MonteCarlo_get_number_of_proposed_steps(self)
7834 
7835  def get_number_of_accepted_steps(self):
7836  r"""get_number_of_accepted_steps(MonteCarlo self) -> unsigned int"""
7837  return _IMP_core.MonteCarlo_get_number_of_accepted_steps(self)
7838 
7839  def set_number_of_downward_steps(self, nsteps):
7840  r"""set_number_of_downward_steps(MonteCarlo self, unsigned int nsteps)"""
7841  return _IMP_core.MonteCarlo_set_number_of_downward_steps(self, nsteps)
7842 
7843  def set_number_of_upward_steps(self, nsteps):
7844  r"""set_number_of_upward_steps(MonteCarlo self, unsigned int nsteps)"""
7845  return _IMP_core.MonteCarlo_set_number_of_upward_steps(self, nsteps)
7846 
7847  def set_number_of_rejected_steps(self, nsteps):
7848  r"""set_number_of_rejected_steps(MonteCarlo self, unsigned int nsteps)"""
7849  return _IMP_core.MonteCarlo_set_number_of_rejected_steps(self, nsteps)
7850 
7851  def reset_statistics(self):
7852  r"""reset_statistics(MonteCarlo self)"""
7853  return _IMP_core.MonteCarlo_reset_statistics(self)
7854 
7855  def set_score_threshold(self, s):
7856  r"""set_score_threshold(MonteCarlo self, double s)"""
7857  return _IMP_core.MonteCarlo_set_score_threshold(self, s)
7858 
7859  def get_score_threshold(self):
7860  r"""get_score_threshold(MonteCarlo self) -> double"""
7861  return _IMP_core.MonteCarlo_get_score_threshold(self)
7862 
7863  def set_maximum_difference(self, d):
7864  r"""set_maximum_difference(MonteCarlo self, double d)"""
7865  return _IMP_core.MonteCarlo_set_maximum_difference(self, d)
7866 
7867  def get_maximum_difference(self):
7868  r"""get_maximum_difference(MonteCarlo self) -> double"""
7869  return _IMP_core.MonteCarlo_get_maximum_difference(self)
7870  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)
7871  def __set_movers(self, obj): IMP._list_util.set_varlist(self.movers, obj)
7872  def __del_movers(self): IMP._list_util.del_varlist(self.movers)
7873  movers = property(__get_movers, __set_movers, __del_movers, doc="List of ##ucnames")
7874 
7875  def remove_mover(self, d):
7876  r"""remove_mover(MonteCarlo self, MonteCarloMover d)"""
7877  return _IMP_core.MonteCarlo_remove_mover(self, d)
7878 
7879  def _python_index_mover(self, d, start, stop):
7880  r"""_python_index_mover(MonteCarlo self, MonteCarloMover d, unsigned int start, unsigned int stop) -> unsigned int"""
7881  return _IMP_core.MonteCarlo__python_index_mover(self, d, start, stop)
7882 
7883  def remove_movers(self, d):
7884  r"""remove_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & d)"""
7885  return _IMP_core.MonteCarlo_remove_movers(self, d)
7886 
7887  def set_movers(self, ps):
7888  r"""set_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & ps)"""
7889  return _IMP_core.MonteCarlo_set_movers(self, ps)
7890 
7891  def set_movers_order(self, objs):
7892  r"""set_movers_order(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7893  return _IMP_core.MonteCarlo_set_movers_order(self, objs)
7894 
7895  def add_mover(self, obj):
7896  r"""add_mover(MonteCarlo self, MonteCarloMover obj) -> unsigned int"""
7897  return _IMP_core.MonteCarlo_add_mover(self, obj)
7898 
7899  def add_movers(self, objs):
7900  r"""add_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7901  return _IMP_core.MonteCarlo_add_movers(self, objs)
7902 
7903  def clear_movers(self):
7904  r"""clear_movers(MonteCarlo self)"""
7905  return _IMP_core.MonteCarlo_clear_movers(self)
7906 
7907  def get_number_of_movers(self):
7908  r"""get_number_of_movers(MonteCarlo self) -> unsigned int"""
7909  return _IMP_core.MonteCarlo_get_number_of_movers(self)
7910 
7911  def get_has_movers(self):
7912  r"""get_has_movers(MonteCarlo self) -> bool"""
7913  return _IMP_core.MonteCarlo_get_has_movers(self)
7914 
7915  def get_mover(self, i):
7916  r"""get_mover(MonteCarlo self, unsigned int i) -> MonteCarloMover"""
7917  return _IMP_core.MonteCarlo_get_mover(self, i)
7918 
7919  def get_movers(self):
7920  r"""get_movers(MonteCarlo self) -> IMP::core::MonteCarloMovers"""
7921  return _IMP_core.MonteCarlo_get_movers(self)
7922 
7923  def erase_mover(self, i):
7924  r"""erase_mover(MonteCarlo self, unsigned int i)"""
7925  return _IMP_core.MonteCarlo_erase_mover(self, i)
7926 
7927  def reserve_movers(self, sz):
7928  r"""reserve_movers(MonteCarlo self, unsigned int sz)"""
7929  return _IMP_core.MonteCarlo_reserve_movers(self, sz)
7930 
7931  def __str__(self):
7932  r"""__str__(MonteCarlo self) -> std::string"""
7933  return _IMP_core.MonteCarlo___str__(self)
7934 
7935  def __repr__(self):
7936  r"""__repr__(MonteCarlo self) -> std::string"""
7937  return _IMP_core.MonteCarlo___repr__(self)
7938 
7939  @staticmethod
7940  def get_from(o):
7941  return _object_cast_to_MonteCarlo(o)
7942 
7943 
7944  def _get_as_binary(self):
7945  r"""_get_as_binary(MonteCarlo self) -> PyObject *"""
7946  return _IMP_core.MonteCarlo__get_as_binary(self)
7947 
7948  def _set_from_binary(self, p):
7949  r"""_set_from_binary(MonteCarlo self, PyObject * p)"""
7950  return _IMP_core.MonteCarlo__set_from_binary(self, p)
7951 
7952  def __getstate__(self):
7953  p = self._get_as_binary()
7954  if len(self.__dict__) > 1:
7955  d = self.__dict__.copy()
7956  del d['this']
7957  p = (d, p)
7958  return p
7959 
7960  def __setstate__(self, p):
7961  if not hasattr(self, 'this'):
7962  self.__init__()
7963  if isinstance(p, tuple):
7964  d, p = p
7965  self.__dict__.update(d)
7966  return self._set_from_binary(p)
7967 
7968 
7969  def _get_jax(self, space=None):
7970  from IMP.core._jax_util import _MCJAXInfo
7971  return _MCJAXInfo(self, space)
7972 
7973  def _get_jax_optimizer(self, max_steps, space=None):
7974  import IMP.core._jax_util
7975  return IMP.core._jax_util._MCJAXOptimizer(self, max_steps, space)
7976 
7977  def _optimize_jax(self, max_steps, space=None):
7978  opt = self._get_jax_optimizer(max_steps, space=space)
7979  score, mc_state = opt.optimize(opt.get_initial_state())
7980  return score
7981 
7982 
7983 # Register MonteCarlo in _IMP_core:
7984 _IMP_core.MonteCarlo_swigregister(MonteCarlo)
7985 class MonteCarloWithLocalOptimization(MonteCarlo):
7986  r"""Proxy of C++ IMP::core::MonteCarloWithLocalOptimization class."""
7987 
7988  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7989 
7990  def __init__(self, opt, steps):
7991  r"""__init__(MonteCarloWithLocalOptimization self, Optimizer opt, unsigned int steps) -> MonteCarloWithLocalOptimization"""
7992  _IMP_core.MonteCarloWithLocalOptimization_swiginit(self, _IMP_core.new_MonteCarloWithLocalOptimization(opt, steps))
7993 
7994  def get_number_of_steps(self):
7995  r"""get_number_of_steps(MonteCarloWithLocalOptimization self) -> unsigned int"""
7996  return _IMP_core.MonteCarloWithLocalOptimization_get_number_of_steps(self)
7997 
7998  def get_local_optimizer(self):
7999  r"""get_local_optimizer(MonteCarloWithLocalOptimization self) -> Optimizer"""
8000  return _IMP_core.MonteCarloWithLocalOptimization_get_local_optimizer(self)
8001  __swig_destroy__ = _IMP_core.delete_MonteCarloWithLocalOptimization
8002 
8003  def __str__(self):
8004  r"""__str__(MonteCarloWithLocalOptimization self) -> std::string"""
8005  return _IMP_core.MonteCarloWithLocalOptimization___str__(self)
8006 
8007  def __repr__(self):
8008  r"""__repr__(MonteCarloWithLocalOptimization self) -> std::string"""
8009  return _IMP_core.MonteCarloWithLocalOptimization___repr__(self)
8010 
8011  @staticmethod
8012  def get_from(o):
8013  return _object_cast_to_MonteCarloWithLocalOptimization(o)
8014 
8015 
8016 # Register MonteCarloWithLocalOptimization in _IMP_core:
8017 _IMP_core.MonteCarloWithLocalOptimization_swigregister(MonteCarloWithLocalOptimization)
8018 class MonteCarloWithBasinHopping(MonteCarloWithLocalOptimization):
8019  r"""Proxy of C++ IMP::core::MonteCarloWithBasinHopping class."""
8020 
8021  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8022 
8023  def __init__(self, opt, ns):
8024  r"""__init__(MonteCarloWithBasinHopping self, Optimizer opt, unsigned int ns) -> MonteCarloWithBasinHopping"""
8025  _IMP_core.MonteCarloWithBasinHopping_swiginit(self, _IMP_core.new_MonteCarloWithBasinHopping(opt, ns))
8026  __swig_destroy__ = _IMP_core.delete_MonteCarloWithBasinHopping
8027 
8028  def __str__(self):
8029  r"""__str__(MonteCarloWithBasinHopping self) -> std::string"""
8030  return _IMP_core.MonteCarloWithBasinHopping___str__(self)
8031 
8032  def __repr__(self):
8033  r"""__repr__(MonteCarloWithBasinHopping self) -> std::string"""
8034  return _IMP_core.MonteCarloWithBasinHopping___repr__(self)
8035 
8036  @staticmethod
8037  def get_from(o):
8038  return _object_cast_to_MonteCarloWithBasinHopping(o)
8039 
8040 
8041 # Register MonteCarloWithBasinHopping in _IMP_core:
8042 _IMP_core.MonteCarloWithBasinHopping_swigregister(MonteCarloWithBasinHopping)
8043 class NeighborsTable(IMP.ScoreState):
8044  r"""Proxy of C++ IMP::core::NeighborsTable class."""
8045 
8046  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8047 
8048  def __init__(self, *args):
8049  r"""__init__(NeighborsTable self, PairContainer input, std::string name="CloseNeighborsTable%1%") -> NeighborsTable"""
8050  _IMP_core.NeighborsTable_swiginit(self, _IMP_core.new_NeighborsTable(*args))
8051 
8052  def get_neighbors(self, pi):
8053  r"""get_neighbors(NeighborsTable self, ParticleIndex pi) -> IMP::ParticleIndexes const &"""
8054  return _IMP_core.NeighborsTable_get_neighbors(self, pi)
8055 
8056  def get_version_info(self):
8057  r"""get_version_info(NeighborsTable self) -> VersionInfo"""
8058  return _IMP_core.NeighborsTable_get_version_info(self)
8059  __swig_destroy__ = _IMP_core.delete_NeighborsTable
8060 
8061  def __str__(self):
8062  r"""__str__(NeighborsTable self) -> std::string"""
8063  return _IMP_core.NeighborsTable___str__(self)
8064 
8065  def __repr__(self):
8066  r"""__repr__(NeighborsTable self) -> std::string"""
8067  return _IMP_core.NeighborsTable___repr__(self)
8068 
8069  @staticmethod
8070  def get_from(o):
8071  return _object_cast_to_NeighborsTable(o)
8072 
8073 
8074 # Register NeighborsTable in _IMP_core:
8075 _IMP_core.NeighborsTable_swigregister(NeighborsTable)
8076 class NormalMover(MonteCarloMover):
8077  r"""Proxy of C++ IMP::core::NormalMover class."""
8078 
8079  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8080 
8081  def __init__(self, *args):
8082  r"""
8083  __init__(NormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> NormalMover
8084  __init__(NormalMover self, Model m, ParticleIndex pi, double stddev) -> NormalMover
8085  __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> NormalMover
8086  __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> NormalMover
8087  __init__(NormalMover self) -> NormalMover
8088  """
8089  _IMP_core.NormalMover_swiginit(self, _IMP_core.new_NormalMover(*args))
8090 
8091  def set_sigma(self, sigma):
8092  r"""set_sigma(NormalMover self, IMP::Float sigma)"""
8093  return _IMP_core.NormalMover_set_sigma(self, sigma)
8094 
8095  def get_sigma(self):
8096  r"""get_sigma(NormalMover self) -> IMP::Float"""
8097  return _IMP_core.NormalMover_get_sigma(self)
8098 
8099  def get_indexes(self):
8100  r"""get_indexes(NormalMover self) -> IMP::ParticleIndexes"""
8101  return _IMP_core.NormalMover_get_indexes(self)
8102 
8103  def get_keys(self):
8104  r"""get_keys(NormalMover self) -> IMP::FloatKeys"""
8105  return _IMP_core.NormalMover_get_keys(self)
8106 
8107  def get_version_info(self):
8108  r"""get_version_info(NormalMover self) -> VersionInfo"""
8109  return _IMP_core.NormalMover_get_version_info(self)
8110  __swig_destroy__ = _IMP_core.delete_NormalMover
8111 
8112  def __str__(self):
8113  r"""__str__(NormalMover self) -> std::string"""
8114  return _IMP_core.NormalMover___str__(self)
8115 
8116  def __repr__(self):
8117  r"""__repr__(NormalMover self) -> std::string"""
8118  return _IMP_core.NormalMover___repr__(self)
8119 
8120  @staticmethod
8121  def get_from(o):
8122  return _object_cast_to_NormalMover(o)
8123 
8124 
8125  def _get_as_binary(self):
8126  r"""_get_as_binary(NormalMover self) -> PyObject *"""
8127  return _IMP_core.NormalMover__get_as_binary(self)
8128 
8129  def _set_from_binary(self, p):
8130  r"""_set_from_binary(NormalMover self, PyObject * p)"""
8131  return _IMP_core.NormalMover__set_from_binary(self, p)
8132 
8133  def __getstate__(self):
8134  p = self._get_as_binary()
8135  if len(self.__dict__) > 1:
8136  d = self.__dict__.copy()
8137  del d['this']
8138  p = (d, p)
8139  return p
8140 
8141  def __setstate__(self, p):
8142  if not hasattr(self, 'this'):
8143  self.__init__()
8144  if isinstance(p, tuple):
8145  d, p = p
8146  self.__dict__.update(d)
8147  return self._set_from_binary(p)
8148 
8149 
8150  def _get_jax(self, space):
8151  import jax.random
8152  from IMP.core._jax_util import _get_offset_propose_func
8153  keys = self.get_keys()
8154  sigma = self.get_sigma()
8155 
8156  def offset_func(key, shape):
8157  key, subkey = jax.random.split(key)
8158  return key, jax.random.normal(subkey, shape) * sigma
8159 
8160  propose_func, keys = _get_offset_propose_func(
8161  self.get_indexes(), keys, offset_func)
8162 
8163  return self._wrap_jax(lambda key: key, propose_func, keys=keys)
8164 
8165 
8166 # Register NormalMover in _IMP_core:
8167 _IMP_core.NormalMover_swigregister(NormalMover)
8168 class OpenCubicSpline(_OpenCubicSplineBase):
8169  r"""Proxy of C++ IMP::core::OpenCubicSpline class."""
8170 
8171  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8172 
8173  def __init__(self, values, minrange, spacing, extend=False):
8174  r"""__init__(OpenCubicSpline self, IMP::Floats const & values, IMP::Float minrange, IMP::Float spacing, bool extend=False) -> OpenCubicSpline"""
8175  _IMP_core.OpenCubicSpline_swiginit(self, _IMP_core.new_OpenCubicSpline(values, minrange, spacing, extend))
8176 
8177  def get_minrange(self):
8178  r"""get_minrange(OpenCubicSpline self) -> IMP::Float"""
8179  return _IMP_core.OpenCubicSpline_get_minrange(self)
8180 
8181  def get_spacing(self):
8182  r"""get_spacing(OpenCubicSpline self) -> IMP::Float"""
8183  return _IMP_core.OpenCubicSpline_get_spacing(self)
8184 
8185  def get_values(self):
8186  r"""get_values(OpenCubicSpline self) -> IMP::Floats"""
8187  return _IMP_core.OpenCubicSpline_get_values(self)
8188 
8189  def get_extend(self):
8190  r"""get_extend(OpenCubicSpline self) -> bool"""
8191  return _IMP_core.OpenCubicSpline_get_extend(self)
8192 
8193  def get_second_derivatives(self):
8194  r"""get_second_derivatives(OpenCubicSpline self) -> IMP::Floats"""
8195  return _IMP_core.OpenCubicSpline_get_second_derivatives(self)
8196 
8197  def __str__(self):
8198  r"""__str__(OpenCubicSpline self) -> std::string"""
8199  return _IMP_core.OpenCubicSpline___str__(self)
8200 
8201  def __repr__(self):
8202  r"""__repr__(OpenCubicSpline self) -> std::string"""
8203  return _IMP_core.OpenCubicSpline___repr__(self)
8204 
8205  @staticmethod
8206  def get_from(o):
8207  return _object_cast_to_OpenCubicSpline(o)
8208 
8209 
8210  def _get_jax(self):
8211  import jax.numpy as jnp
8212  from IMP.core._jax_util import _spline
8213  def score(feature, minrange, maxrange, spacing, values, second_derivs):
8214  # clip feature to range (extend=True behavior)
8215  feature = jnp.clip(feature, minrange, maxrange)
8216  # determine bin index and thus the cubic fragment to use:
8217  lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
8218  return _spline(feature, minrange, lowbin, lowbin + 1, spacing,
8219  values, second_derivs)
8220  spacing = self.get_spacing()
8221  minrange = self.get_minrange()
8222  values = jnp.asarray(self.get_values())
8223  maxrange = minrange + spacing * (len(values) - 1)
8224  return functools.partial(
8225  score, minrange=minrange, maxrange=maxrange,
8226  spacing=spacing, values=values,
8227  second_derivs=jnp.asarray(self.get_second_derivatives()))
8228 
8229  __swig_destroy__ = _IMP_core.delete_OpenCubicSpline
8230 
8231 # Register OpenCubicSpline in _IMP_core:
8232 _IMP_core.OpenCubicSpline_swigregister(OpenCubicSpline)
8233 class QuadraticClosePairsFinder(ClosePairsFinder):
8234  r"""Proxy of C++ IMP::core::QuadraticClosePairsFinder class."""
8235 
8236  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8237 
8238  def __init__(self):
8239  r"""__init__(QuadraticClosePairsFinder self) -> QuadraticClosePairsFinder"""
8240  _IMP_core.QuadraticClosePairsFinder_swiginit(self, _IMP_core.new_QuadraticClosePairsFinder())
8241 
8242  def get_are_close_and_filtered(self, *args):
8243  r"""
8244  get_are_close_and_filtered(QuadraticClosePairsFinder self, Particle a, Particle b) -> bool
8245  get_are_close_and_filtered(QuadraticClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b) -> bool
8246  """
8247  return _IMP_core.QuadraticClosePairsFinder_get_are_close_and_filtered(self, *args)
8248 
8249  def get_close_pairs(self, *args):
8250  r"""
8251  get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8252  get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8253  get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
8254  get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
8255  """
8256  return _IMP_core.QuadraticClosePairsFinder_get_close_pairs(self, *args)
8257 
8258  def do_get_inputs(self, m, pis):
8259  r"""do_get_inputs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8260  return _IMP_core.QuadraticClosePairsFinder_do_get_inputs(self, m, pis)
8261 
8262  def get_version_info(self):
8263  r"""get_version_info(QuadraticClosePairsFinder self) -> VersionInfo"""
8264  return _IMP_core.QuadraticClosePairsFinder_get_version_info(self)
8265  __swig_destroy__ = _IMP_core.delete_QuadraticClosePairsFinder
8266 
8267  def __str__(self):
8268  r"""__str__(QuadraticClosePairsFinder self) -> std::string"""
8269  return _IMP_core.QuadraticClosePairsFinder___str__(self)
8270 
8271  def __repr__(self):
8272  r"""__repr__(QuadraticClosePairsFinder self) -> std::string"""
8273  return _IMP_core.QuadraticClosePairsFinder___repr__(self)
8274 
8275  @staticmethod
8276  def get_from(o):
8277  return _object_cast_to_QuadraticClosePairsFinder(o)
8278 
8279 
8280 # Register QuadraticClosePairsFinder in _IMP_core:
8281 _IMP_core.QuadraticClosePairsFinder_swigregister(QuadraticClosePairsFinder)
8282 class RefinedPairsPairScore(IMP.PairScore):
8283  r"""Proxy of C++ IMP::core::RefinedPairsPairScore class."""
8284 
8285  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8286 
8287  def __init__(self, r, f):
8288  r"""__init__(RefinedPairsPairScore self, Refiner r, PairScore f) -> RefinedPairsPairScore"""
8289  _IMP_core.RefinedPairsPairScore_swiginit(self, _IMP_core.new_RefinedPairsPairScore(r, f))
8290 
8291  def do_get_inputs(self, m, pis):
8292  r"""do_get_inputs(RefinedPairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8293  return _IMP_core.RefinedPairsPairScore_do_get_inputs(self, m, pis)
8294 
8295  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
8296  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"""
8297  return _IMP_core.RefinedPairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
8298 
8299  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
8300  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"""
8301  return _IMP_core.RefinedPairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
8302 
8303  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
8304  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"""
8305  return _IMP_core.RefinedPairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
8306 
8307  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
8308  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"""
8309  return _IMP_core.RefinedPairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
8310 
8311  def get_version_info(self):
8312  r"""get_version_info(RefinedPairsPairScore self) -> VersionInfo"""
8313  return _IMP_core.RefinedPairsPairScore_get_version_info(self)
8314  __swig_destroy__ = _IMP_core.delete_RefinedPairsPairScore
8315 
8316  def __str__(self):
8317  r"""__str__(RefinedPairsPairScore self) -> std::string"""
8318  return _IMP_core.RefinedPairsPairScore___str__(self)
8319 
8320  def __repr__(self):
8321  r"""__repr__(RefinedPairsPairScore self) -> std::string"""
8322  return _IMP_core.RefinedPairsPairScore___repr__(self)
8323 
8324  @staticmethod
8325  def get_from(o):
8326  return _object_cast_to_RefinedPairsPairScore(o)
8327 
8328 
8329 # Register RefinedPairsPairScore in _IMP_core:
8330 _IMP_core.RefinedPairsPairScore_swigregister(RefinedPairsPairScore)
8331 class RigidBody(XYZ):
8332  r"""Proxy of C++ IMP::core::RigidBody class."""
8333 
8334  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8335 
8336  def get_rigid_members(self):
8337  r"""get_rigid_members(RigidBody self) -> IMP::core::RigidMembers"""
8338  return _IMP_core.RigidBody_get_rigid_members(self)
8339 
8340  @staticmethod
8341  def get_rotation_key():
8342  r"""get_rotation_key() -> Vector4DDerivKey"""
8343  return _IMP_core.RigidBody_get_rotation_key()
8344 
8345  def get_member_particle_indexes(self):
8346  r"""get_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8347  return _IMP_core.RigidBody_get_member_particle_indexes(self)
8348 
8349  def get_body_member_particle_indexes(self):
8350  r"""get_body_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8351  return _IMP_core.RigidBody_get_body_member_particle_indexes(self)
8352 
8353  def get_member_indexes(self):
8354  r"""get_member_indexes(RigidBody self) -> IMP::ParticleIndexes"""
8355  return _IMP_core.RigidBody_get_member_indexes(self)
8356 
8357  def show(self, *args):
8358  r"""show(RigidBody self, _ostream out=std::cout)"""
8359  return _IMP_core.RigidBody_show(self, *args)
8360 
8361  @staticmethod
8362  def setup_particle(*args):
8363  r"""
8364  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor ps) -> RigidBody
8365  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor ps) -> RigidBody
8366  setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> RigidBody
8367  setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> RigidBody
8368  """
8369  return _IMP_core.RigidBody_setup_particle(*args)
8370 
8371  @staticmethod
8372  def teardown_particle(rb):
8373  r"""teardown_particle(RigidBody rb)"""
8374  return _IMP_core.RigidBody_teardown_particle(rb)
8375 
8376  def __init__(self, *args):
8377  r"""
8378  __init__(RigidBody self) -> RigidBody
8379  __init__(RigidBody self, Model m, ParticleIndex id) -> RigidBody
8380  __init__(RigidBody self, _ParticleAdaptor d) -> RigidBody
8381  __init__(RigidBody self, RigidBody arg2) -> RigidBody
8382  """
8383  _IMP_core.RigidBody_swiginit(self, _IMP_core.new_RigidBody(*args))
8384  __swig_destroy__ = _IMP_core.delete_RigidBody
8385 
8386  @staticmethod
8387  def get_is_setup(*args):
8388  r"""
8389  get_is_setup(_ParticleAdaptor p) -> bool
8390  get_is_setup(Model m, ParticleIndex pi) -> bool
8391  """
8392  return _IMP_core.RigidBody_get_is_setup(*args)
8393 
8394  def get_coordinates(self):
8395  r"""get_coordinates(RigidBody self) -> Vector3D"""
8396  return _IMP_core.RigidBody_get_coordinates(self)
8397 
8398  def get_rotation(self):
8399  r"""get_rotation(RigidBody self) -> Rotation3D"""
8400  return _IMP_core.RigidBody_get_rotation(self)
8401 
8402  def get_reference_frame(self):
8403  r"""get_reference_frame(RigidBody self) -> ReferenceFrame3D"""
8404  return _IMP_core.RigidBody_get_reference_frame(self)
8405 
8406  def set_reference_frame(self, tr):
8407  r"""set_reference_frame(RigidBody self, ReferenceFrame3D tr)"""
8408  return _IMP_core.RigidBody_set_reference_frame(self, tr)
8409 
8410  def set_reference_frame_lazy(self, tr):
8411  r"""set_reference_frame_lazy(RigidBody self, ReferenceFrame3D tr)"""
8412  return _IMP_core.RigidBody_set_reference_frame_lazy(self, tr)
8413 
8414  def set_reference_frame_from_members(self, members):
8415  r"""set_reference_frame_from_members(RigidBody self, IMP::ParticleIndexes const & members)"""
8416  return _IMP_core.RigidBody_set_reference_frame_from_members(self, members)
8417 
8418  def pull_back_members_adjoints(self, da):
8419  r"""pull_back_members_adjoints(RigidBody self, DerivativeAccumulator da)"""
8420  return _IMP_core.RigidBody_pull_back_members_adjoints(self, da)
8421 
8422  def pull_back_member_adjoints(self, pi, da):
8423  r"""pull_back_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8424  return _IMP_core.RigidBody_pull_back_member_adjoints(self, pi, da)
8425 
8426  def pull_back_body_member_adjoints(self, pi, da):
8427  r"""pull_back_body_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8428  return _IMP_core.RigidBody_pull_back_body_member_adjoints(self, pi, da)
8429 
8430  def add_to_rotational_derivatives(self, qderiv, da):
8431  r"""add_to_rotational_derivatives(RigidBody self, Vector4D qderiv, DerivativeAccumulator da)"""
8432  return _IMP_core.RigidBody_add_to_rotational_derivatives(self, qderiv, da)
8433 
8434  def add_to_torque(self, torque_local, da):
8435  r"""add_to_torque(RigidBody self, Vector3D torque_local, DerivativeAccumulator da)"""
8436  return _IMP_core.RigidBody_add_to_torque(self, torque_local, da)
8437 
8438  def get_torque(self):
8439  r"""get_torque(RigidBody self) -> Vector3D"""
8440  return _IMP_core.RigidBody_get_torque(self)
8441 
8442  def get_coordinates_are_optimized(self):
8443  r"""get_coordinates_are_optimized(RigidBody self) -> bool"""
8444  return _IMP_core.RigidBody_get_coordinates_are_optimized(self)
8445 
8446  def set_coordinates_are_optimized(self, tf):
8447  r"""set_coordinates_are_optimized(RigidBody self, bool tf)"""
8448  return _IMP_core.RigidBody_set_coordinates_are_optimized(self, tf)
8449 
8450  def normalize_rotation(self):
8451  r"""normalize_rotation(RigidBody self)"""
8452  return _IMP_core.RigidBody_normalize_rotation(self)
8453 
8454  def update_members(self):
8455  r"""update_members(RigidBody self)"""
8456  return _IMP_core.RigidBody_update_members(self)
8457 
8458  def get_rotational_derivatives(self):
8459  r"""get_rotational_derivatives(RigidBody self) -> Vector4D"""
8460  return _IMP_core.RigidBody_get_rotational_derivatives(self)
8461 
8462  def get_number_of_members(self):
8463  r"""get_number_of_members(RigidBody self) -> unsigned int"""
8464  return _IMP_core.RigidBody_get_number_of_members(self)
8465 
8466  def get_member(self, i):
8467  r"""get_member(RigidBody self, unsigned int i) -> RigidBodyMember"""
8468  return _IMP_core.RigidBody_get_member(self, i)
8469 
8470  def add_member(self, p):
8471  r"""add_member(RigidBody self, _ParticleIndexAdaptor p)"""
8472  return _IMP_core.RigidBody_add_member(self, p)
8473 
8474  def add_non_rigid_member(self, p):
8475  r"""add_non_rigid_member(RigidBody self, _ParticleIndexAdaptor p)"""
8476  return _IMP_core.RigidBody_add_non_rigid_member(self, p)
8477 
8478  def set_is_rigid_member(self, pi, tf):
8479  r"""set_is_rigid_member(RigidBody self, ParticleIndex pi, bool tf)"""
8480  return _IMP_core.RigidBody_set_is_rigid_member(self, pi, tf)
8481 
8482  def remove_member(self, p):
8483  r"""remove_member(RigidBody self, _ParticleIndexAdaptor p)"""
8484  return _IMP_core.RigidBody_remove_member(self, p)
8485 
8486  def add_attribute(self, *args):
8487  r"""
8488  add_attribute(RigidBody self, FloatKey k, IMP::Float v, bool opt)
8489  add_attribute(RigidBody self, FloatKey a0, IMP::Float a1)
8490  add_attribute(RigidBody self, IntKey a0, IMP::Int a1)
8491  add_attribute(RigidBody self, FloatsKey a0, IMP::Floats a1)
8492  add_attribute(RigidBody self, IntsKey a0, IMP::Ints a1)
8493  add_attribute(RigidBody self, StringKey a0, IMP::String a1)
8494  add_attribute(RigidBody self, ParticleIndexKey a0, Particle a1)
8495  add_attribute(RigidBody self, ObjectKey a0, Object a1)
8496  add_attribute(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8497  add_attribute(RigidBody self, SparseIntKey a0, IMP::Int a1)
8498  add_attribute(RigidBody self, SparseStringKey a0, IMP::String a1)
8499  add_attribute(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8500  """
8501  return _IMP_core.RigidBody_add_attribute(self, *args)
8502 
8503  def get_value(self, *args):
8504  r"""
8505  get_value(RigidBody self, FloatKey a0) -> IMP::Float
8506  get_value(RigidBody self, IntKey a0) -> IMP::Int
8507  get_value(RigidBody self, FloatsKey a0) -> IMP::Floats
8508  get_value(RigidBody self, IntsKey a0) -> IMP::Ints
8509  get_value(RigidBody self, StringKey a0) -> IMP::String
8510  get_value(RigidBody self, ParticleIndexKey a0) -> Particle
8511  get_value(RigidBody self, ObjectKey a0) -> Object
8512  get_value(RigidBody self, SparseFloatKey a0) -> IMP::Float
8513  get_value(RigidBody self, SparseIntKey a0) -> IMP::Int
8514  get_value(RigidBody self, SparseStringKey a0) -> IMP::String
8515  get_value(RigidBody self, SparseParticleIndexKey a0) -> ParticleIndex
8516  """
8517  return _IMP_core.RigidBody_get_value(self, *args)
8518 
8519  def set_value(self, *args):
8520  r"""
8521  set_value(RigidBody self, FloatKey a0, IMP::Float a1)
8522  set_value(RigidBody self, IntKey a0, IMP::Int a1)
8523  set_value(RigidBody self, FloatsKey a0, IMP::Floats a1)
8524  set_value(RigidBody self, IntsKey a0, IMP::Ints a1)
8525  set_value(RigidBody self, StringKey a0, IMP::String a1)
8526  set_value(RigidBody self, ParticleIndexKey a0, Particle a1)
8527  set_value(RigidBody self, ObjectKey a0, Object a1)
8528  set_value(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8529  set_value(RigidBody self, SparseIntKey a0, IMP::Int a1)
8530  set_value(RigidBody self, SparseStringKey a0, IMP::String a1)
8531  set_value(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8532  """
8533  return _IMP_core.RigidBody_set_value(self, *args)
8534 
8535  def remove_attribute(self, *args):
8536  r"""
8537  remove_attribute(RigidBody self, FloatKey a0)
8538  remove_attribute(RigidBody self, IntKey a0)
8539  remove_attribute(RigidBody self, FloatsKey a0)
8540  remove_attribute(RigidBody self, IntsKey a0)
8541  remove_attribute(RigidBody self, StringKey a0)
8542  remove_attribute(RigidBody self, ParticleIndexKey a0)
8543  remove_attribute(RigidBody self, ObjectKey a0)
8544  remove_attribute(RigidBody self, SparseFloatKey a0)
8545  remove_attribute(RigidBody self, SparseIntKey a0)
8546  remove_attribute(RigidBody self, SparseStringKey a0)
8547  remove_attribute(RigidBody self, SparseParticleIndexKey a0)
8548  """
8549  return _IMP_core.RigidBody_remove_attribute(self, *args)
8550 
8551  def has_attribute(self, *args):
8552  r"""
8553  has_attribute(RigidBody self, FloatKey a0) -> bool
8554  has_attribute(RigidBody self, IntKey a0) -> bool
8555  has_attribute(RigidBody self, FloatsKey a0) -> bool
8556  has_attribute(RigidBody self, IntsKey a0) -> bool
8557  has_attribute(RigidBody self, StringKey a0) -> bool
8558  has_attribute(RigidBody self, ParticleIndexKey a0) -> bool
8559  has_attribute(RigidBody self, ObjectKey a0) -> bool
8560  has_attribute(RigidBody self, SparseFloatKey a0) -> bool
8561  has_attribute(RigidBody self, SparseIntKey a0) -> bool
8562  has_attribute(RigidBody self, SparseStringKey a0) -> bool
8563  has_attribute(RigidBody self, SparseParticleIndexKey a0) -> bool
8564  """
8565  return _IMP_core.RigidBody_has_attribute(self, *args)
8566 
8567  def get_derivative(self, a0):
8568  r"""get_derivative(RigidBody self, FloatKey a0) -> double"""
8569  return _IMP_core.RigidBody_get_derivative(self, a0)
8570 
8571  def get_name(self):
8572  r"""get_name(RigidBody self) -> std::string"""
8573  return _IMP_core.RigidBody_get_name(self)
8574 
8575  def clear_caches(self):
8576  r"""clear_caches(RigidBody self)"""
8577  return _IMP_core.RigidBody_clear_caches(self)
8578 
8579  def set_name(self, a0):
8580  r"""set_name(RigidBody self, std::string a0)"""
8581  return _IMP_core.RigidBody_set_name(self, a0)
8582 
8583  def set_check_level(self, a0):
8584  r"""set_check_level(RigidBody self, IMP::CheckLevel a0)"""
8585  return _IMP_core.RigidBody_set_check_level(self, a0)
8586 
8587  def add_to_derivative(self, a0, a1, a2):
8588  r"""add_to_derivative(RigidBody self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8589  return _IMP_core.RigidBody_add_to_derivative(self, a0, a1, a2)
8590 
8591  def set_is_optimized(self, a0, a1):
8592  r"""set_is_optimized(RigidBody self, FloatKey a0, bool a1)"""
8593  return _IMP_core.RigidBody_set_is_optimized(self, a0, a1)
8594 
8595  def get_is_optimized(self, a0):
8596  r"""get_is_optimized(RigidBody self, FloatKey a0) -> bool"""
8597  return _IMP_core.RigidBody_get_is_optimized(self, a0)
8598 
8599  def get_check_level(self):
8600  r"""get_check_level(RigidBody self) -> IMP::CheckLevel"""
8601  return _IMP_core.RigidBody_get_check_level(self)
8602 
8603  def __eq__(self, *args):
8604  r"""
8605  __eq__(RigidBody self, RigidBody o) -> bool
8606  __eq__(RigidBody self, Particle d) -> bool
8607  """
8608  return _IMP_core.RigidBody___eq__(self, *args)
8609 
8610  def __ne__(self, *args):
8611  r"""
8612  __ne__(RigidBody self, RigidBody o) -> bool
8613  __ne__(RigidBody self, Particle d) -> bool
8614  """
8615  return _IMP_core.RigidBody___ne__(self, *args)
8616 
8617  def __le__(self, *args):
8618  r"""
8619  __le__(RigidBody self, RigidBody o) -> bool
8620  __le__(RigidBody self, Particle d) -> bool
8621  """
8622  return _IMP_core.RigidBody___le__(self, *args)
8623 
8624  def __lt__(self, *args):
8625  r"""
8626  __lt__(RigidBody self, RigidBody o) -> bool
8627  __lt__(RigidBody self, Particle d) -> bool
8628  """
8629  return _IMP_core.RigidBody___lt__(self, *args)
8630 
8631  def __ge__(self, *args):
8632  r"""
8633  __ge__(RigidBody self, RigidBody o) -> bool
8634  __ge__(RigidBody self, Particle d) -> bool
8635  """
8636  return _IMP_core.RigidBody___ge__(self, *args)
8637 
8638  def __gt__(self, *args):
8639  r"""
8640  __gt__(RigidBody self, RigidBody o) -> bool
8641  __gt__(RigidBody self, Particle d) -> bool
8642  """
8643  return _IMP_core.RigidBody___gt__(self, *args)
8644 
8645  def __hash__(self):
8646  r"""__hash__(RigidBody self) -> std::size_t"""
8647  return _IMP_core.RigidBody___hash__(self)
8648 
8649  def __str__(self):
8650  r"""__str__(RigidBody self) -> std::string"""
8651  return _IMP_core.RigidBody___str__(self)
8652 
8653  def __repr__(self):
8654  r"""__repr__(RigidBody self) -> std::string"""
8655  return _IMP_core.RigidBody___repr__(self)
8656 
8657  def _get_as_binary(self):
8658  r"""_get_as_binary(RigidBody self) -> PyObject *"""
8659  return _IMP_core.RigidBody__get_as_binary(self)
8660 
8661  def _set_from_binary(self, p):
8662  r"""_set_from_binary(RigidBody self, PyObject * p)"""
8663  return _IMP_core.RigidBody__set_from_binary(self, p)
8664 
8665  def __getstate__(self):
8666  p = self._get_as_binary()
8667  if len(self.__dict__) > 1:
8668  d = self.__dict__.copy()
8669  del d['this']
8670  p = (d, p)
8671  return p
8672 
8673  def __setstate__(self, p):
8674  if not hasattr(self, 'this'):
8675  self.__init__()
8676  if isinstance(p, tuple):
8677  d, p = p
8678  self.__dict__.update(d)
8679  return self._set_from_binary(p)
8680 
8681 
8682 # Register RigidBody in _IMP_core:
8683 _IMP_core.RigidBody_swigregister(RigidBody)
8684 
8686  r"""add_rigid_body_cache_key(ObjectKey k)"""
8687  return _IMP_core.add_rigid_body_cache_key(k)
8688 class RigidBodyMember(XYZ):
8689  r"""Proxy of C++ IMP::core::RigidBodyMember class."""
8690 
8691  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8692 
8693  def show(self, *args):
8694  r"""show(RigidBodyMember self, _ostream out=std::cout)"""
8695  return _IMP_core.RigidBodyMember_show(self, *args)
8696 
8697  def get_rigid_body(self):
8698  r"""get_rigid_body(RigidBodyMember self) -> RigidBody"""
8699  return _IMP_core.RigidBodyMember_get_rigid_body(self)
8700 
8701  def get_internal_coordinates(self):
8702  r"""get_internal_coordinates(RigidBodyMember self) -> Vector3D"""
8703  return _IMP_core.RigidBodyMember_get_internal_coordinates(self)
8704 
8705  def set_internal_coordinates(self, v):
8706  r"""set_internal_coordinates(RigidBodyMember self, Vector3D v)"""
8707  return _IMP_core.RigidBodyMember_set_internal_coordinates(self, v)
8708 
8709  def set_internal_transformation(self, v):
8710  r"""set_internal_transformation(RigidBodyMember self, Transformation3D v)"""
8711  return _IMP_core.RigidBodyMember_set_internal_transformation(self, v)
8712 
8713  def get_internal_transformation(self):
8714  r"""get_internal_transformation(RigidBodyMember self) -> Transformation3D"""
8715  return _IMP_core.RigidBodyMember_get_internal_transformation(self)
8716  __swig_destroy__ = _IMP_core.delete_RigidBodyMember
8717 
8718  def set_coordinates(self, *args):
8719  r"""
8720  set_coordinates(RigidBodyMember self, Vector3D center)
8721  set_coordinates(RigidBodyMember self, Transformation3D tr)
8722  """
8723  return _IMP_core.RigidBodyMember_set_coordinates(self, *args)
8724 
8725  def __init__(self, *args):
8726  r"""
8727  __init__(RigidBodyMember self) -> RigidBodyMember
8728  __init__(RigidBodyMember self, Model m, ParticleIndex id) -> RigidBodyMember
8729  __init__(RigidBodyMember self, _ParticleAdaptor d) -> RigidBodyMember
8730  __init__(RigidBodyMember self, RigidBodyMember arg2) -> RigidBodyMember
8731  """
8732  _IMP_core.RigidBodyMember_swiginit(self, _IMP_core.new_RigidBodyMember(*args))
8733 
8734  @staticmethod
8735  def get_is_setup(*args):
8736  r"""
8737  get_is_setup(_ParticleAdaptor p) -> bool
8738  get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
8739  """
8740  return _IMP_core.RigidBodyMember_get_is_setup(*args)
8741 
8742  @staticmethod
8743  def get_internal_coordinate_keys():
8744  r"""get_internal_coordinate_keys() -> IMP::FloatKeys"""
8745  return _IMP_core.RigidBodyMember_get_internal_coordinate_keys()
8746 
8747  @staticmethod
8748  def get_internal_rotation_key():
8749  r"""get_internal_rotation_key() -> Vector4DDerivKey"""
8750  return _IMP_core.RigidBodyMember_get_internal_rotation_key()
8751 
8752  def add_attribute(self, *args):
8753  r"""
8754  add_attribute(RigidBodyMember self, FloatKey k, IMP::Float v, bool opt)
8755  add_attribute(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8756  add_attribute(RigidBodyMember self, IntKey a0, IMP::Int a1)
8757  add_attribute(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8758  add_attribute(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8759  add_attribute(RigidBodyMember self, StringKey a0, IMP::String a1)
8760  add_attribute(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8761  add_attribute(RigidBodyMember self, ObjectKey a0, Object a1)
8762  add_attribute(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8763  add_attribute(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8764  add_attribute(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8765  add_attribute(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8766  """
8767  return _IMP_core.RigidBodyMember_add_attribute(self, *args)
8768 
8769  def get_value(self, *args):
8770  r"""
8771  get_value(RigidBodyMember self, FloatKey a0) -> IMP::Float
8772  get_value(RigidBodyMember self, IntKey a0) -> IMP::Int
8773  get_value(RigidBodyMember self, FloatsKey a0) -> IMP::Floats
8774  get_value(RigidBodyMember self, IntsKey a0) -> IMP::Ints
8775  get_value(RigidBodyMember self, StringKey a0) -> IMP::String
8776  get_value(RigidBodyMember self, ParticleIndexKey a0) -> Particle
8777  get_value(RigidBodyMember self, ObjectKey a0) -> Object
8778  get_value(RigidBodyMember self, SparseFloatKey a0) -> IMP::Float
8779  get_value(RigidBodyMember self, SparseIntKey a0) -> IMP::Int
8780  get_value(RigidBodyMember self, SparseStringKey a0) -> IMP::String
8781  get_value(RigidBodyMember self, SparseParticleIndexKey a0) -> ParticleIndex
8782  """
8783  return _IMP_core.RigidBodyMember_get_value(self, *args)
8784 
8785  def set_value(self, *args):
8786  r"""
8787  set_value(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8788  set_value(RigidBodyMember self, IntKey a0, IMP::Int a1)
8789  set_value(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8790  set_value(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8791  set_value(RigidBodyMember self, StringKey a0, IMP::String a1)
8792  set_value(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8793  set_value(RigidBodyMember self, ObjectKey a0, Object a1)
8794  set_value(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8795  set_value(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8796  set_value(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8797  set_value(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8798  """
8799  return _IMP_core.RigidBodyMember_set_value(self, *args)
8800 
8801  def remove_attribute(self, *args):
8802  r"""
8803  remove_attribute(RigidBodyMember self, FloatKey a0)
8804  remove_attribute(RigidBodyMember self, IntKey a0)
8805  remove_attribute(RigidBodyMember self, FloatsKey a0)
8806  remove_attribute(RigidBodyMember self, IntsKey a0)
8807  remove_attribute(RigidBodyMember self, StringKey a0)
8808  remove_attribute(RigidBodyMember self, ParticleIndexKey a0)
8809  remove_attribute(RigidBodyMember self, ObjectKey a0)
8810  remove_attribute(RigidBodyMember self, SparseFloatKey a0)
8811  remove_attribute(RigidBodyMember self, SparseIntKey a0)
8812  remove_attribute(RigidBodyMember self, SparseStringKey a0)
8813  remove_attribute(RigidBodyMember self, SparseParticleIndexKey a0)
8814  """
8815  return _IMP_core.RigidBodyMember_remove_attribute(self, *args)
8816 
8817  def has_attribute(self, *args):
8818  r"""
8819  has_attribute(RigidBodyMember self, FloatKey a0) -> bool
8820  has_attribute(RigidBodyMember self, IntKey a0) -> bool
8821  has_attribute(RigidBodyMember self, FloatsKey a0) -> bool
8822  has_attribute(RigidBodyMember self, IntsKey a0) -> bool
8823  has_attribute(RigidBodyMember self, StringKey a0) -> bool
8824  has_attribute(RigidBodyMember self, ParticleIndexKey a0) -> bool
8825  has_attribute(RigidBodyMember self, ObjectKey a0) -> bool
8826  has_attribute(RigidBodyMember self, SparseFloatKey a0) -> bool
8827  has_attribute(RigidBodyMember self, SparseIntKey a0) -> bool
8828  has_attribute(RigidBodyMember self, SparseStringKey a0) -> bool
8829  has_attribute(RigidBodyMember self, SparseParticleIndexKey a0) -> bool
8830  """
8831  return _IMP_core.RigidBodyMember_has_attribute(self, *args)
8832 
8833  def get_derivative(self, a0):
8834  r"""get_derivative(RigidBodyMember self, FloatKey a0) -> double"""
8835  return _IMP_core.RigidBodyMember_get_derivative(self, a0)
8836 
8837  def get_name(self):
8838  r"""get_name(RigidBodyMember self) -> std::string"""
8839  return _IMP_core.RigidBodyMember_get_name(self)
8840 
8841  def clear_caches(self):
8842  r"""clear_caches(RigidBodyMember self)"""
8843  return _IMP_core.RigidBodyMember_clear_caches(self)
8844 
8845  def set_name(self, a0):
8846  r"""set_name(RigidBodyMember self, std::string a0)"""
8847  return _IMP_core.RigidBodyMember_set_name(self, a0)
8848 
8849  def set_check_level(self, a0):
8850  r"""set_check_level(RigidBodyMember self, IMP::CheckLevel a0)"""
8851  return _IMP_core.RigidBodyMember_set_check_level(self, a0)
8852 
8853  def add_to_derivative(self, a0, a1, a2):
8854  r"""add_to_derivative(RigidBodyMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8855  return _IMP_core.RigidBodyMember_add_to_derivative(self, a0, a1, a2)
8856 
8857  def set_is_optimized(self, a0, a1):
8858  r"""set_is_optimized(RigidBodyMember self, FloatKey a0, bool a1)"""
8859  return _IMP_core.RigidBodyMember_set_is_optimized(self, a0, a1)
8860 
8861  def get_is_optimized(self, a0):
8862  r"""get_is_optimized(RigidBodyMember self, FloatKey a0) -> bool"""
8863  return _IMP_core.RigidBodyMember_get_is_optimized(self, a0)
8864 
8865  def get_check_level(self):
8866  r"""get_check_level(RigidBodyMember self) -> IMP::CheckLevel"""
8867  return _IMP_core.RigidBodyMember_get_check_level(self)
8868 
8869  def __eq__(self, *args):
8870  r"""
8871  __eq__(RigidBodyMember self, RigidBodyMember o) -> bool
8872  __eq__(RigidBodyMember self, Particle d) -> bool
8873  """
8874  return _IMP_core.RigidBodyMember___eq__(self, *args)
8875 
8876  def __ne__(self, *args):
8877  r"""
8878  __ne__(RigidBodyMember self, RigidBodyMember o) -> bool
8879  __ne__(RigidBodyMember self, Particle d) -> bool
8880  """
8881  return _IMP_core.RigidBodyMember___ne__(self, *args)
8882 
8883  def __le__(self, *args):
8884  r"""
8885  __le__(RigidBodyMember self, RigidBodyMember o) -> bool
8886  __le__(RigidBodyMember self, Particle d) -> bool
8887  """
8888  return _IMP_core.RigidBodyMember___le__(self, *args)
8889 
8890  def __lt__(self, *args):
8891  r"""
8892  __lt__(RigidBodyMember self, RigidBodyMember o) -> bool
8893  __lt__(RigidBodyMember self, Particle d) -> bool
8894  """
8895  return _IMP_core.RigidBodyMember___lt__(self, *args)
8896 
8897  def __ge__(self, *args):
8898  r"""
8899  __ge__(RigidBodyMember self, RigidBodyMember o) -> bool
8900  __ge__(RigidBodyMember self, Particle d) -> bool
8901  """
8902  return _IMP_core.RigidBodyMember___ge__(self, *args)
8903 
8904  def __gt__(self, *args):
8905  r"""
8906  __gt__(RigidBodyMember self, RigidBodyMember o) -> bool
8907  __gt__(RigidBodyMember self, Particle d) -> bool
8908  """
8909  return _IMP_core.RigidBodyMember___gt__(self, *args)
8910 
8911  def __hash__(self):
8912  r"""__hash__(RigidBodyMember self) -> std::size_t"""
8913  return _IMP_core.RigidBodyMember___hash__(self)
8914 
8915  def __str__(self):
8916  r"""__str__(RigidBodyMember self) -> std::string"""
8917  return _IMP_core.RigidBodyMember___str__(self)
8918 
8919  def __repr__(self):
8920  r"""__repr__(RigidBodyMember self) -> std::string"""
8921  return _IMP_core.RigidBodyMember___repr__(self)
8922 
8923  def _get_as_binary(self):
8924  r"""_get_as_binary(RigidBodyMember self) -> PyObject *"""
8925  return _IMP_core.RigidBodyMember__get_as_binary(self)
8926 
8927  def _set_from_binary(self, p):
8928  r"""_set_from_binary(RigidBodyMember self, PyObject * p)"""
8929  return _IMP_core.RigidBodyMember__set_from_binary(self, p)
8930 
8931  def __getstate__(self):
8932  p = self._get_as_binary()
8933  if len(self.__dict__) > 1:
8934  d = self.__dict__.copy()
8935  del d['this']
8936  p = (d, p)
8937  return p
8938 
8939  def __setstate__(self, p):
8940  if not hasattr(self, 'this'):
8941  self.__init__()
8942  if isinstance(p, tuple):
8943  d, p = p
8944  self.__dict__.update(d)
8945  return self._set_from_binary(p)
8946 
8947 
8948 # Register RigidBodyMember in _IMP_core:
8949 _IMP_core.RigidBodyMember_swigregister(RigidBodyMember)
8950 class RigidMember(RigidBodyMember):
8951  r"""Proxy of C++ IMP::core::RigidMember class."""
8952 
8953  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8954 
8955  def show(self, *args):
8956  r"""show(RigidMember self, _ostream out=std::cout)"""
8957  return _IMP_core.RigidMember_show(self, *args)
8958 
8959  def __init__(self, *args):
8960  r"""
8961  __init__(RigidMember self) -> RigidMember
8962  __init__(RigidMember self, Model m, ParticleIndex id) -> RigidMember
8963  __init__(RigidMember self, _ParticleAdaptor d) -> RigidMember
8964  __init__(RigidMember self, RigidMember arg2) -> RigidMember
8965  """
8966  _IMP_core.RigidMember_swiginit(self, _IMP_core.new_RigidMember(*args))
8967  __swig_destroy__ = _IMP_core.delete_RigidMember
8968 
8969  @staticmethod
8970  def get_is_setup(*args):
8971  r"""
8972  get_is_setup(_ParticleAdaptor p) -> bool
8973  get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
8974  """
8975  return _IMP_core.RigidMember_get_is_setup(*args)
8976 
8977  def add_attribute(self, *args):
8978  r"""
8979  add_attribute(RigidMember self, FloatKey k, IMP::Float v, bool opt)
8980  add_attribute(RigidMember self, FloatKey a0, IMP::Float a1)
8981  add_attribute(RigidMember self, IntKey a0, IMP::Int a1)
8982  add_attribute(RigidMember self, FloatsKey a0, IMP::Floats a1)
8983  add_attribute(RigidMember self, IntsKey a0, IMP::Ints a1)
8984  add_attribute(RigidMember self, StringKey a0, IMP::String a1)
8985  add_attribute(RigidMember self, ParticleIndexKey a0, Particle a1)
8986  add_attribute(RigidMember self, ObjectKey a0, Object a1)
8987  add_attribute(RigidMember self, SparseFloatKey a0, IMP::Float a1)
8988  add_attribute(RigidMember self, SparseIntKey a0, IMP::Int a1)
8989  add_attribute(RigidMember self, SparseStringKey a0, IMP::String a1)
8990  add_attribute(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8991  """
8992  return _IMP_core.RigidMember_add_attribute(self, *args)
8993 
8994  def get_value(self, *args):
8995  r"""
8996  get_value(RigidMember self, FloatKey a0) -> IMP::Float
8997  get_value(RigidMember self, IntKey a0) -> IMP::Int
8998  get_value(RigidMember self, FloatsKey a0) -> IMP::Floats
8999  get_value(RigidMember self, IntsKey a0) -> IMP::Ints
9000  get_value(RigidMember self, StringKey a0) -> IMP::String
9001  get_value(RigidMember self, ParticleIndexKey a0) -> Particle
9002  get_value(RigidMember self, ObjectKey a0) -> Object
9003  get_value(RigidMember self, SparseFloatKey a0) -> IMP::Float
9004  get_value(RigidMember self, SparseIntKey a0) -> IMP::Int
9005  get_value(RigidMember self, SparseStringKey a0) -> IMP::String
9006  get_value(RigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9007  """
9008  return _IMP_core.RigidMember_get_value(self, *args)
9009 
9010  def set_value(self, *args):
9011  r"""
9012  set_value(RigidMember self, FloatKey a0, IMP::Float a1)
9013  set_value(RigidMember self, IntKey a0, IMP::Int a1)
9014  set_value(RigidMember self, FloatsKey a0, IMP::Floats a1)
9015  set_value(RigidMember self, IntsKey a0, IMP::Ints a1)
9016  set_value(RigidMember self, StringKey a0, IMP::String a1)
9017  set_value(RigidMember self, ParticleIndexKey a0, Particle a1)
9018  set_value(RigidMember self, ObjectKey a0, Object a1)
9019  set_value(RigidMember self, SparseFloatKey a0, IMP::Float a1)
9020  set_value(RigidMember self, SparseIntKey a0, IMP::Int a1)
9021  set_value(RigidMember self, SparseStringKey a0, IMP::String a1)
9022  set_value(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9023  """
9024  return _IMP_core.RigidMember_set_value(self, *args)
9025 
9026  def remove_attribute(self, *args):
9027  r"""
9028  remove_attribute(RigidMember self, FloatKey a0)
9029  remove_attribute(RigidMember self, IntKey a0)
9030  remove_attribute(RigidMember self, FloatsKey a0)
9031  remove_attribute(RigidMember self, IntsKey a0)
9032  remove_attribute(RigidMember self, StringKey a0)
9033  remove_attribute(RigidMember self, ParticleIndexKey a0)
9034  remove_attribute(RigidMember self, ObjectKey a0)
9035  remove_attribute(RigidMember self, SparseFloatKey a0)
9036  remove_attribute(RigidMember self, SparseIntKey a0)
9037  remove_attribute(RigidMember self, SparseStringKey a0)
9038  remove_attribute(RigidMember self, SparseParticleIndexKey a0)
9039  """
9040  return _IMP_core.RigidMember_remove_attribute(self, *args)
9041 
9042  def has_attribute(self, *args):
9043  r"""
9044  has_attribute(RigidMember self, FloatKey a0) -> bool
9045  has_attribute(RigidMember self, IntKey a0) -> bool
9046  has_attribute(RigidMember self, FloatsKey a0) -> bool
9047  has_attribute(RigidMember self, IntsKey a0) -> bool
9048  has_attribute(RigidMember self, StringKey a0) -> bool
9049  has_attribute(RigidMember self, ParticleIndexKey a0) -> bool
9050  has_attribute(RigidMember self, ObjectKey a0) -> bool
9051  has_attribute(RigidMember self, SparseFloatKey a0) -> bool
9052  has_attribute(RigidMember self, SparseIntKey a0) -> bool
9053  has_attribute(RigidMember self, SparseStringKey a0) -> bool
9054  has_attribute(RigidMember self, SparseParticleIndexKey a0) -> bool
9055  """
9056  return _IMP_core.RigidMember_has_attribute(self, *args)
9057 
9058  def get_derivative(self, a0):
9059  r"""get_derivative(RigidMember self, FloatKey a0) -> double"""
9060  return _IMP_core.RigidMember_get_derivative(self, a0)
9061 
9062  def get_name(self):
9063  r"""get_name(RigidMember self) -> std::string"""
9064  return _IMP_core.RigidMember_get_name(self)
9065 
9066  def clear_caches(self):
9067  r"""clear_caches(RigidMember self)"""
9068  return _IMP_core.RigidMember_clear_caches(self)
9069 
9070  def set_name(self, a0):
9071  r"""set_name(RigidMember self, std::string a0)"""
9072  return _IMP_core.RigidMember_set_name(self, a0)
9073 
9074  def set_check_level(self, a0):
9075  r"""set_check_level(RigidMember self, IMP::CheckLevel a0)"""
9076  return _IMP_core.RigidMember_set_check_level(self, a0)
9077 
9078  def add_to_derivative(self, a0, a1, a2):
9079  r"""add_to_derivative(RigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9080  return _IMP_core.RigidMember_add_to_derivative(self, a0, a1, a2)
9081 
9082  def set_is_optimized(self, a0, a1):
9083  r"""set_is_optimized(RigidMember self, FloatKey a0, bool a1)"""
9084  return _IMP_core.RigidMember_set_is_optimized(self, a0, a1)
9085 
9086  def get_is_optimized(self, a0):
9087  r"""get_is_optimized(RigidMember self, FloatKey a0) -> bool"""
9088  return _IMP_core.RigidMember_get_is_optimized(self, a0)
9089 
9090  def get_check_level(self):
9091  r"""get_check_level(RigidMember self) -> IMP::CheckLevel"""
9092  return _IMP_core.RigidMember_get_check_level(self)
9093 
9094  def __eq__(self, *args):
9095  r"""
9096  __eq__(RigidMember self, RigidMember o) -> bool
9097  __eq__(RigidMember self, Particle d) -> bool
9098  """
9099  return _IMP_core.RigidMember___eq__(self, *args)
9100 
9101  def __ne__(self, *args):
9102  r"""
9103  __ne__(RigidMember self, RigidMember o) -> bool
9104  __ne__(RigidMember self, Particle d) -> bool
9105  """
9106  return _IMP_core.RigidMember___ne__(self, *args)
9107 
9108  def __le__(self, *args):
9109  r"""
9110  __le__(RigidMember self, RigidMember o) -> bool
9111  __le__(RigidMember self, Particle d) -> bool
9112  """
9113  return _IMP_core.RigidMember___le__(self, *args)
9114 
9115  def __lt__(self, *args):
9116  r"""
9117  __lt__(RigidMember self, RigidMember o) -> bool
9118  __lt__(RigidMember self, Particle d) -> bool
9119  """
9120  return _IMP_core.RigidMember___lt__(self, *args)
9121 
9122  def __ge__(self, *args):
9123  r"""
9124  __ge__(RigidMember self, RigidMember o) -> bool
9125  __ge__(RigidMember self, Particle d) -> bool
9126  """
9127  return _IMP_core.RigidMember___ge__(self, *args)
9128 
9129  def __gt__(self, *args):
9130  r"""
9131  __gt__(RigidMember self, RigidMember o) -> bool
9132  __gt__(RigidMember self, Particle d) -> bool
9133  """
9134  return _IMP_core.RigidMember___gt__(self, *args)
9135 
9136  def __hash__(self):
9137  r"""__hash__(RigidMember self) -> std::size_t"""
9138  return _IMP_core.RigidMember___hash__(self)
9139 
9140  def __str__(self):
9141  r"""__str__(RigidMember self) -> std::string"""
9142  return _IMP_core.RigidMember___str__(self)
9143 
9144  def __repr__(self):
9145  r"""__repr__(RigidMember self) -> std::string"""
9146  return _IMP_core.RigidMember___repr__(self)
9147 
9148  def _get_as_binary(self):
9149  r"""_get_as_binary(RigidMember self) -> PyObject *"""
9150  return _IMP_core.RigidMember__get_as_binary(self)
9151 
9152  def _set_from_binary(self, p):
9153  r"""_set_from_binary(RigidMember self, PyObject * p)"""
9154  return _IMP_core.RigidMember__set_from_binary(self, p)
9155 
9156  def __getstate__(self):
9157  p = self._get_as_binary()
9158  if len(self.__dict__) > 1:
9159  d = self.__dict__.copy()
9160  del d['this']
9161  p = (d, p)
9162  return p
9163 
9164  def __setstate__(self, p):
9165  if not hasattr(self, 'this'):
9166  self.__init__()
9167  if isinstance(p, tuple):
9168  d, p = p
9169  self.__dict__.update(d)
9170  return self._set_from_binary(p)
9171 
9172 
9173 # Register RigidMember in _IMP_core:
9174 _IMP_core.RigidMember_swigregister(RigidMember)
9175 class NonRigidMember(RigidBodyMember):
9176  r"""Proxy of C++ IMP::core::NonRigidMember class."""
9177 
9178  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9179 
9180  def show(self, *args):
9181  r"""show(NonRigidMember self, _ostream out=std::cout)"""
9182  return _IMP_core.NonRigidMember_show(self, *args)
9183 
9184  def __init__(self, *args):
9185  r"""
9186  __init__(NonRigidMember self) -> NonRigidMember
9187  __init__(NonRigidMember self, Model m, ParticleIndex id) -> NonRigidMember
9188  __init__(NonRigidMember self, _ParticleAdaptor d) -> NonRigidMember
9189  __init__(NonRigidMember self, NonRigidMember arg2) -> NonRigidMember
9190  """
9191  _IMP_core.NonRigidMember_swiginit(self, _IMP_core.new_NonRigidMember(*args))
9192  __swig_destroy__ = _IMP_core.delete_NonRigidMember
9193 
9194  @staticmethod
9195  def get_is_setup(*args):
9196  r"""
9197  get_is_setup(_ParticleAdaptor p) -> bool
9198  get_is_setup(Model m, ParticleIndex p) -> bool
9199  """
9200  return _IMP_core.NonRigidMember_get_is_setup(*args)
9201 
9202  def add_to_internal_derivatives(self, deriv_parent, da):
9203  r"""add_to_internal_derivatives(NonRigidMember self, Vector3D deriv_parent, DerivativeAccumulator da)"""
9204  return _IMP_core.NonRigidMember_add_to_internal_derivatives(self, deriv_parent, da)
9205 
9206  def add_to_internal_rotational_derivatives(self, qderiv, da):
9207  r"""add_to_internal_rotational_derivatives(NonRigidMember self, Vector4D qderiv, DerivativeAccumulator da)"""
9208  return _IMP_core.NonRigidMember_add_to_internal_rotational_derivatives(self, qderiv, da)
9209 
9210  def get_internal_derivatives(self):
9211  r"""get_internal_derivatives(NonRigidMember self) -> Vector3D"""
9212  return _IMP_core.NonRigidMember_get_internal_derivatives(self)
9213 
9214  def get_internal_rotational_derivatives(self):
9215  r"""get_internal_rotational_derivatives(NonRigidMember self) -> Vector4D"""
9216  return _IMP_core.NonRigidMember_get_internal_rotational_derivatives(self)
9217 
9218  def add_attribute(self, *args):
9219  r"""
9220  add_attribute(NonRigidMember self, FloatKey k, IMP::Float v, bool opt)
9221  add_attribute(NonRigidMember self, FloatKey a0, IMP::Float a1)
9222  add_attribute(NonRigidMember self, IntKey a0, IMP::Int a1)
9223  add_attribute(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9224  add_attribute(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9225  add_attribute(NonRigidMember self, StringKey a0, IMP::String a1)
9226  add_attribute(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9227  add_attribute(NonRigidMember self, ObjectKey a0, Object a1)
9228  add_attribute(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9229  add_attribute(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9230  add_attribute(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9231  add_attribute(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9232  """
9233  return _IMP_core.NonRigidMember_add_attribute(self, *args)
9234 
9235  def get_value(self, *args):
9236  r"""
9237  get_value(NonRigidMember self, FloatKey a0) -> IMP::Float
9238  get_value(NonRigidMember self, IntKey a0) -> IMP::Int
9239  get_value(NonRigidMember self, FloatsKey a0) -> IMP::Floats
9240  get_value(NonRigidMember self, IntsKey a0) -> IMP::Ints
9241  get_value(NonRigidMember self, StringKey a0) -> IMP::String
9242  get_value(NonRigidMember self, ParticleIndexKey a0) -> Particle
9243  get_value(NonRigidMember self, ObjectKey a0) -> Object
9244  get_value(NonRigidMember self, SparseFloatKey a0) -> IMP::Float
9245  get_value(NonRigidMember self, SparseIntKey a0) -> IMP::Int
9246  get_value(NonRigidMember self, SparseStringKey a0) -> IMP::String
9247  get_value(NonRigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9248  """
9249  return _IMP_core.NonRigidMember_get_value(self, *args)
9250 
9251  def set_value(self, *args):
9252  r"""
9253  set_value(NonRigidMember self, FloatKey a0, IMP::Float a1)
9254  set_value(NonRigidMember self, IntKey a0, IMP::Int a1)
9255  set_value(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9256  set_value(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9257  set_value(NonRigidMember self, StringKey a0, IMP::String a1)
9258  set_value(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9259  set_value(NonRigidMember self, ObjectKey a0, Object a1)
9260  set_value(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9261  set_value(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9262  set_value(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9263  set_value(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9264  """
9265  return _IMP_core.NonRigidMember_set_value(self, *args)
9266 
9267  def remove_attribute(self, *args):
9268  r"""
9269  remove_attribute(NonRigidMember self, FloatKey a0)
9270  remove_attribute(NonRigidMember self, IntKey a0)
9271  remove_attribute(NonRigidMember self, FloatsKey a0)
9272  remove_attribute(NonRigidMember self, IntsKey a0)
9273  remove_attribute(NonRigidMember self, StringKey a0)
9274  remove_attribute(NonRigidMember self, ParticleIndexKey a0)
9275  remove_attribute(NonRigidMember self, ObjectKey a0)
9276  remove_attribute(NonRigidMember self, SparseFloatKey a0)
9277  remove_attribute(NonRigidMember self, SparseIntKey a0)
9278  remove_attribute(NonRigidMember self, SparseStringKey a0)
9279  remove_attribute(NonRigidMember self, SparseParticleIndexKey a0)
9280  """
9281  return _IMP_core.NonRigidMember_remove_attribute(self, *args)
9282 
9283  def has_attribute(self, *args):
9284  r"""
9285  has_attribute(NonRigidMember self, FloatKey a0) -> bool
9286  has_attribute(NonRigidMember self, IntKey a0) -> bool
9287  has_attribute(NonRigidMember self, FloatsKey a0) -> bool
9288  has_attribute(NonRigidMember self, IntsKey a0) -> bool
9289  has_attribute(NonRigidMember self, StringKey a0) -> bool
9290  has_attribute(NonRigidMember self, ParticleIndexKey a0) -> bool
9291  has_attribute(NonRigidMember self, ObjectKey a0) -> bool
9292  has_attribute(NonRigidMember self, SparseFloatKey a0) -> bool
9293  has_attribute(NonRigidMember self, SparseIntKey a0) -> bool
9294  has_attribute(NonRigidMember self, SparseStringKey a0) -> bool
9295  has_attribute(NonRigidMember self, SparseParticleIndexKey a0) -> bool
9296  """
9297  return _IMP_core.NonRigidMember_has_attribute(self, *args)
9298 
9299  def get_derivative(self, a0):
9300  r"""get_derivative(NonRigidMember self, FloatKey a0) -> double"""
9301  return _IMP_core.NonRigidMember_get_derivative(self, a0)
9302 
9303  def get_name(self):
9304  r"""get_name(NonRigidMember self) -> std::string"""
9305  return _IMP_core.NonRigidMember_get_name(self)
9306 
9307  def clear_caches(self):
9308  r"""clear_caches(NonRigidMember self)"""
9309  return _IMP_core.NonRigidMember_clear_caches(self)
9310 
9311  def set_name(self, a0):
9312  r"""set_name(NonRigidMember self, std::string a0)"""
9313  return _IMP_core.NonRigidMember_set_name(self, a0)
9314 
9315  def set_check_level(self, a0):
9316  r"""set_check_level(NonRigidMember self, IMP::CheckLevel a0)"""
9317  return _IMP_core.NonRigidMember_set_check_level(self, a0)
9318 
9319  def add_to_derivative(self, a0, a1, a2):
9320  r"""add_to_derivative(NonRigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9321  return _IMP_core.NonRigidMember_add_to_derivative(self, a0, a1, a2)
9322 
9323  def set_is_optimized(self, a0, a1):
9324  r"""set_is_optimized(NonRigidMember self, FloatKey a0, bool a1)"""
9325  return _IMP_core.NonRigidMember_set_is_optimized(self, a0, a1)
9326 
9327  def get_is_optimized(self, a0):
9328  r"""get_is_optimized(NonRigidMember self, FloatKey a0) -> bool"""
9329  return _IMP_core.NonRigidMember_get_is_optimized(self, a0)
9330 
9331  def get_check_level(self):
9332  r"""get_check_level(NonRigidMember self) -> IMP::CheckLevel"""
9333  return _IMP_core.NonRigidMember_get_check_level(self)
9334 
9335  def __eq__(self, *args):
9336  r"""
9337  __eq__(NonRigidMember self, NonRigidMember o) -> bool
9338  __eq__(NonRigidMember self, Particle d) -> bool
9339  """
9340  return _IMP_core.NonRigidMember___eq__(self, *args)
9341 
9342  def __ne__(self, *args):
9343  r"""
9344  __ne__(NonRigidMember self, NonRigidMember o) -> bool
9345  __ne__(NonRigidMember self, Particle d) -> bool
9346  """
9347  return _IMP_core.NonRigidMember___ne__(self, *args)
9348 
9349  def __le__(self, *args):
9350  r"""
9351  __le__(NonRigidMember self, NonRigidMember o) -> bool
9352  __le__(NonRigidMember self, Particle d) -> bool
9353  """
9354  return _IMP_core.NonRigidMember___le__(self, *args)
9355 
9356  def __lt__(self, *args):
9357  r"""
9358  __lt__(NonRigidMember self, NonRigidMember o) -> bool
9359  __lt__(NonRigidMember self, Particle d) -> bool
9360  """
9361  return _IMP_core.NonRigidMember___lt__(self, *args)
9362 
9363  def __ge__(self, *args):
9364  r"""
9365  __ge__(NonRigidMember self, NonRigidMember o) -> bool
9366  __ge__(NonRigidMember self, Particle d) -> bool
9367  """
9368  return _IMP_core.NonRigidMember___ge__(self, *args)
9369 
9370  def __gt__(self, *args):
9371  r"""
9372  __gt__(NonRigidMember self, NonRigidMember o) -> bool
9373  __gt__(NonRigidMember self, Particle d) -> bool
9374  """
9375  return _IMP_core.NonRigidMember___gt__(self, *args)
9376 
9377  def __hash__(self):
9378  r"""__hash__(NonRigidMember self) -> std::size_t"""
9379  return _IMP_core.NonRigidMember___hash__(self)
9380 
9381  def __str__(self):
9382  r"""__str__(NonRigidMember self) -> std::string"""
9383  return _IMP_core.NonRigidMember___str__(self)
9384 
9385  def __repr__(self):
9386  r"""__repr__(NonRigidMember self) -> std::string"""
9387  return _IMP_core.NonRigidMember___repr__(self)
9388 
9389  def _get_as_binary(self):
9390  r"""_get_as_binary(NonRigidMember self) -> PyObject *"""
9391  return _IMP_core.NonRigidMember__get_as_binary(self)
9392 
9393  def _set_from_binary(self, p):
9394  r"""_set_from_binary(NonRigidMember self, PyObject * p)"""
9395  return _IMP_core.NonRigidMember__set_from_binary(self, p)
9396 
9397  def __getstate__(self):
9398  p = self._get_as_binary()
9399  if len(self.__dict__) > 1:
9400  d = self.__dict__.copy()
9401  del d['this']
9402  p = (d, p)
9403  return p
9404 
9405  def __setstate__(self, p):
9406  if not hasattr(self, 'this'):
9407  self.__init__()
9408  if isinstance(p, tuple):
9409  d, p = p
9410  self.__dict__.update(d)
9411  return self._set_from_binary(p)
9412 
9413 
9414 # Register NonRigidMember in _IMP_core:
9415 _IMP_core.NonRigidMember_swigregister(NonRigidMember)
9416 class RigidMembersRefiner(IMP.Refiner):
9417  r"""Proxy of C++ IMP::core::RigidMembersRefiner class."""
9418 
9419  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9420 
9421  def __init__(self, *args):
9422  r"""__init__(RigidMembersRefiner self, std::string name="RigidMembersRefiner%d") -> RigidMembersRefiner"""
9423  _IMP_core.RigidMembersRefiner_swiginit(self, _IMP_core.new_RigidMembersRefiner(*args))
9424 
9425  def do_get_inputs(self, m, pis):
9426  r"""do_get_inputs(RigidMembersRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9427  return _IMP_core.RigidMembersRefiner_do_get_inputs(self, m, pis)
9428 
9429  def get_version_info(self):
9430  r"""get_version_info(RigidMembersRefiner self) -> VersionInfo"""
9431  return _IMP_core.RigidMembersRefiner_get_version_info(self)
9432  __swig_destroy__ = _IMP_core.delete_RigidMembersRefiner
9433 
9434  def __str__(self):
9435  r"""__str__(RigidMembersRefiner self) -> std::string"""
9436  return _IMP_core.RigidMembersRefiner___str__(self)
9437 
9438  def __repr__(self):
9439  r"""__repr__(RigidMembersRefiner self) -> std::string"""
9440  return _IMP_core.RigidMembersRefiner___repr__(self)
9441 
9442  @staticmethod
9443  def get_from(o):
9444  return _object_cast_to_RigidMembersRefiner(o)
9445 
9446 
9447 # Register RigidMembersRefiner in _IMP_core:
9448 _IMP_core.RigidMembersRefiner_swigregister(RigidMembersRefiner)
9449 
9450 def get_rigid_members_refiner():
9451  r"""get_rigid_members_refiner() -> RigidMembersRefiner"""
9452  return _IMP_core.get_rigid_members_refiner()
9453 
9454 def transform(*args):
9455  r"""
9456  transform(XYZ a, Transformation3D tr)
9457  transform(RigidBody a, Transformation3D tr)
9458  """
9459  return _IMP_core.transform(*args)
9460 
9461 def get_initial_reference_frame(*args):
9462  r"""
9463  get_initial_reference_frame(Model m, IMP::ParticleIndexes const & pis) -> ReferenceFrame3D
9464  get_initial_reference_frame(IMP::ParticlesTemp const & ps) -> ReferenceFrame3D
9465  """
9466  return _IMP_core.get_initial_reference_frame(*args)
9467 
9468 def create_rigid_bodies(m, n, no_members=False):
9469  r"""create_rigid_bodies(Model m, unsigned int n, bool no_members=False) -> IMP::ParticlesTemp"""
9470  return _IMP_core.create_rigid_bodies(m, n, no_members)
9471 
9472 def show_rigid_body_hierarchy(*args):
9473  r"""show_rigid_body_hierarchy(RigidBody rb, TextOutput out=IMP::TextOutput(std::cout))"""
9474  return _IMP_core.show_rigid_body_hierarchy(*args)
9475 
9476 def get_root_rigid_body(m):
9477  r"""get_root_rigid_body(RigidMember m) -> ParticleIndex"""
9478  return _IMP_core.get_root_rigid_body(m)
9479 class _UpdateRigidBodyMembers(IMP.SingletonModifier):
9480  r"""Proxy of C++ IMP::core::internal::_UpdateRigidBodyMembers class."""
9481 
9482  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9483 
9484  def __init__(self, *args):
9485  r"""__init__(_UpdateRigidBodyMembers self, std::string name="UpdateRigidBodyMembers%1%") -> _UpdateRigidBodyMembers"""
9486  _IMP_core._UpdateRigidBodyMembers_swiginit(self, _IMP_core.new__UpdateRigidBodyMembers(*args))
9487 
9488  def do_get_inputs(self, m, pis):
9489  r"""do_get_inputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9490  return _IMP_core._UpdateRigidBodyMembers_do_get_inputs(self, m, pis)
9491 
9492  def do_get_outputs(self, m, pis):
9493  r"""do_get_outputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9494  return _IMP_core._UpdateRigidBodyMembers_do_get_outputs(self, m, pis)
9495 
9496  def get_version_info(self):
9497  r"""get_version_info(_UpdateRigidBodyMembers self) -> VersionInfo"""
9498  return _IMP_core._UpdateRigidBodyMembers_get_version_info(self)
9499  __swig_destroy__ = _IMP_core.delete__UpdateRigidBodyMembers
9500 
9501  def __str__(self):
9502  r"""__str__(_UpdateRigidBodyMembers self) -> std::string"""
9503  return _IMP_core._UpdateRigidBodyMembers___str__(self)
9504 
9505  def __repr__(self):
9506  r"""__repr__(_UpdateRigidBodyMembers self) -> std::string"""
9507  return _IMP_core._UpdateRigidBodyMembers___repr__(self)
9508 
9509  @staticmethod
9510  def get_from(o):
9511  return _object_cast_to__UpdateRigidBodyMembers(o)
9512 
9513 
9514 # Register _UpdateRigidBodyMembers in _IMP_core:
9515 _IMP_core._UpdateRigidBodyMembers_swigregister(_UpdateRigidBodyMembers)
9516 class _AccumulateRigidBodyDerivatives(IMP.SingletonModifier):
9517  r"""Proxy of C++ IMP::core::internal::_AccumulateRigidBodyDerivatives class."""
9518 
9519  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9520 
9521  def __init__(self, *args):
9522  r"""__init__(_AccumulateRigidBodyDerivatives self, std::string name="AccumulateRigidBodyDerivatives%1%") -> _AccumulateRigidBodyDerivatives"""
9523  _IMP_core._AccumulateRigidBodyDerivatives_swiginit(self, _IMP_core.new__AccumulateRigidBodyDerivatives(*args))
9524 
9525  def do_get_inputs(self, m, pis):
9526  r"""do_get_inputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9527  return _IMP_core._AccumulateRigidBodyDerivatives_do_get_inputs(self, m, pis)
9528 
9529  def do_get_outputs(self, m, pis):
9530  r"""do_get_outputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9531  return _IMP_core._AccumulateRigidBodyDerivatives_do_get_outputs(self, m, pis)
9532 
9533  def get_version_info(self):
9534  r"""get_version_info(_AccumulateRigidBodyDerivatives self) -> VersionInfo"""
9535  return _IMP_core._AccumulateRigidBodyDerivatives_get_version_info(self)
9536  __swig_destroy__ = _IMP_core.delete__AccumulateRigidBodyDerivatives
9537 
9538  def __str__(self):
9539  r"""__str__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9540  return _IMP_core._AccumulateRigidBodyDerivatives___str__(self)
9541 
9542  def __repr__(self):
9543  r"""__repr__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9544  return _IMP_core._AccumulateRigidBodyDerivatives___repr__(self)
9545 
9546  @staticmethod
9547  def get_from(o):
9548  return _object_cast_to__AccumulateRigidBodyDerivatives(o)
9549 
9550 
9551 # Register _AccumulateRigidBodyDerivatives in _IMP_core:
9552 _IMP_core._AccumulateRigidBodyDerivatives_swigregister(_AccumulateRigidBodyDerivatives)
9553 class _NormalizeRotation(IMP.SingletonModifier):
9554  r"""Proxy of C++ IMP::core::internal::_NormalizeRotation class."""
9555 
9556  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9557 
9558  def __init__(self, *args):
9559  r"""__init__(_NormalizeRotation self, std::string name="NormalizeRotation%1%") -> _NormalizeRotation"""
9560  _IMP_core._NormalizeRotation_swiginit(self, _IMP_core.new__NormalizeRotation(*args))
9561 
9562  def do_get_inputs(self, m, pis):
9563  r"""do_get_inputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9564  return _IMP_core._NormalizeRotation_do_get_inputs(self, m, pis)
9565 
9566  def do_get_outputs(self, m, pis):
9567  r"""do_get_outputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9568  return _IMP_core._NormalizeRotation_do_get_outputs(self, m, pis)
9569 
9570  def get_version_info(self):
9571  r"""get_version_info(_NormalizeRotation self) -> VersionInfo"""
9572  return _IMP_core._NormalizeRotation_get_version_info(self)
9573  __swig_destroy__ = _IMP_core.delete__NormalizeRotation
9574 
9575  def __str__(self):
9576  r"""__str__(_NormalizeRotation self) -> std::string"""
9577  return _IMP_core._NormalizeRotation___str__(self)
9578 
9579  def __repr__(self):
9580  r"""__repr__(_NormalizeRotation self) -> std::string"""
9581  return _IMP_core._NormalizeRotation___repr__(self)
9582 
9583  @staticmethod
9584  def get_from(o):
9585  return _object_cast_to__NormalizeRotation(o)
9586 
9587 
9588 # Register _NormalizeRotation in _IMP_core:
9589 _IMP_core._NormalizeRotation_swigregister(_NormalizeRotation)
9590 class _RigidBodyNormalizeConstraint(IMP.Constraint):
9591  r"""Proxy of C++ IMP::core::internal::_RigidBodyNormalizeConstraint class."""
9592 
9593  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9594 
9595  def __init__(self, *args, **kwargs):
9596  raise AttributeError("No constructor defined - class is abstract")
9597 
9598  def get_before_modifier(self):
9599  r"""get_before_modifier(_RigidBodyNormalizeConstraint self) -> _NormalizeRotation"""
9600  return _IMP_core._RigidBodyNormalizeConstraint_get_before_modifier(self)
9601 
9602  def get_container(self):
9603  r"""get_container(_RigidBodyNormalizeConstraint self) -> Container"""
9604  return _IMP_core._RigidBodyNormalizeConstraint_get_container(self)
9605 
9606  def get_version_info(self):
9607  r"""get_version_info(_RigidBodyNormalizeConstraint self) -> VersionInfo"""
9608  return _IMP_core._RigidBodyNormalizeConstraint_get_version_info(self)
9609  __swig_destroy__ = _IMP_core.delete__RigidBodyNormalizeConstraint
9610 
9611  def __str__(self):
9612  r"""__str__(_RigidBodyNormalizeConstraint self) -> std::string"""
9613  return _IMP_core._RigidBodyNormalizeConstraint___str__(self)
9614 
9615  def __repr__(self):
9616  r"""__repr__(_RigidBodyNormalizeConstraint self) -> std::string"""
9617  return _IMP_core._RigidBodyNormalizeConstraint___repr__(self)
9618 
9619  @staticmethod
9620  def get_from(o):
9621  return _object_cast_to__RigidBodyNormalizeConstraint(o)
9622 
9623 
9624  def _get_jax(self):
9625  from IMP.algebra._jax_util import _quaternion_normalize
9626  import jax
9627  normalize_rotations = jax.vmap(_quaternion_normalize, in_axes=0)
9628  def apply_func(jm):
9629  # Assume that constraint acts on all rigid bodies
9630  allrbs = jm['rigid_bodies']
9631  allrbs.quaternion = normalize_rotations(allrbs.quaternion)
9632  return jm
9633  return self._wrap_jax(apply_func, keys=['rigid_bodies'])
9634 
9635 
9636 # Register _RigidBodyNormalizeConstraint in _IMP_core:
9637 _IMP_core._RigidBodyNormalizeConstraint_swigregister(_RigidBodyNormalizeConstraint)
9638 class _RigidBodyPositionConstraint(IMP.Constraint):
9639  r"""Proxy of C++ IMP::core::internal::_RigidBodyPositionConstraint class."""
9640 
9641  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9642 
9643  def __init__(self, *args, **kwargs):
9644  raise AttributeError("No constructor defined - class is abstract")
9645 
9646  def get_version_info(self):
9647  r"""get_version_info(_RigidBodyPositionConstraint self) -> VersionInfo"""
9648  return _IMP_core._RigidBodyPositionConstraint_get_version_info(self)
9649  __swig_destroy__ = _IMP_core.delete__RigidBodyPositionConstraint
9650 
9651  def get_before_modifier(self):
9652  r"""get_before_modifier(_RigidBodyPositionConstraint self) -> _UpdateRigidBodyMembers"""
9653  return _IMP_core._RigidBodyPositionConstraint_get_before_modifier(self)
9654 
9655  def get_after_modifier(self):
9656  r"""get_after_modifier(_RigidBodyPositionConstraint self) -> _AccumulateRigidBodyDerivatives"""
9657  return _IMP_core._RigidBodyPositionConstraint_get_after_modifier(self)
9658 
9659  def get_index(self):
9660  r"""get_index(_RigidBodyPositionConstraint self) -> ParticleIndex"""
9661  return _IMP_core._RigidBodyPositionConstraint_get_index(self)
9662 
9663  def __str__(self):
9664  r"""__str__(_RigidBodyPositionConstraint self) -> std::string"""
9665  return _IMP_core._RigidBodyPositionConstraint___str__(self)
9666 
9667  def __repr__(self):
9668  r"""__repr__(_RigidBodyPositionConstraint self) -> std::string"""
9669  return _IMP_core._RigidBodyPositionConstraint___repr__(self)
9670 
9671  @staticmethod
9672  def get_from(o):
9673  return _object_cast_to__RigidBodyPositionConstraint(o)
9674 
9675 
9676  def _get_jax(self):
9677  import jax
9678  from IMP.core import _jax_rigid
9679  def apply_func(jm, index):
9680  body = jm['rigid_bodies'].bodies[index]
9681  # todo: this could perhaps be better parallelized, as in most
9682  # cases (at least, without nested rigid bodies) the update of
9683  # one rigid body does not affect members of another body
9684  return body.update_members(jm)
9685  # Get rigid body index from particle index
9686  pindex = self.get_index()
9687  rbindex = _jax_rigid._get_rigid_body_index(self.get_model(), pindex)
9688  f = functools.partial(apply_func, index=rbindex)
9689  return self._wrap_jax(f, keys=['rigid_bodies'])
9690 
9691 
9692 # Register _RigidBodyPositionConstraint in _IMP_core:
9693 _IMP_core._RigidBodyPositionConstraint_swigregister(_RigidBodyPositionConstraint)
9694 class RigidBodyHierarchyGeometry(IMP.display.SingletonGeometry):
9695  r"""Proxy of C++ IMP::core::RigidBodyHierarchyGeometry class."""
9696 
9697  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9698 
9699  def __init__(self, rb, constituents):
9700  r"""__init__(RigidBodyHierarchyGeometry self, RigidBody rb, IMP::ParticlesTemp const & constituents) -> RigidBodyHierarchyGeometry"""
9701  _IMP_core.RigidBodyHierarchyGeometry_swiginit(self, _IMP_core.new_RigidBodyHierarchyGeometry(rb, constituents))
9702 
9703  def get_version_info(self):
9704  r"""get_version_info(RigidBodyHierarchyGeometry self) -> VersionInfo"""
9705  return _IMP_core.RigidBodyHierarchyGeometry_get_version_info(self)
9706  __swig_destroy__ = _IMP_core.delete_RigidBodyHierarchyGeometry
9707 
9708  def __str__(self):
9709  r"""__str__(RigidBodyHierarchyGeometry self) -> std::string"""
9710  return _IMP_core.RigidBodyHierarchyGeometry___str__(self)
9711 
9712  def __repr__(self):
9713  r"""__repr__(RigidBodyHierarchyGeometry self) -> std::string"""
9714  return _IMP_core.RigidBodyHierarchyGeometry___repr__(self)
9715 
9716  @staticmethod
9717  def get_from(o):
9718  return _object_cast_to_RigidBodyHierarchyGeometry(o)
9719 
9720 
9721 # Register RigidBodyHierarchyGeometry in _IMP_core:
9722 _IMP_core.RigidBodyHierarchyGeometry_swigregister(RigidBodyHierarchyGeometry)
9723 class RigidBodyDerivativeGeometry(IMP.display.SingletonGeometry):
9724  r"""Proxy of C++ IMP::core::RigidBodyDerivativeGeometry class."""
9725 
9726  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9727 
9728  def __init__(self, *args):
9729  r"""
9730  __init__(RigidBodyDerivativeGeometry self, Particle p) -> RigidBodyDerivativeGeometry
9731  __init__(RigidBodyDerivativeGeometry self, RigidBody d) -> RigidBodyDerivativeGeometry
9732  """
9733  _IMP_core.RigidBodyDerivativeGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativeGeometry(*args))
9734 
9735  def get_version_info(self):
9736  r"""get_version_info(RigidBodyDerivativeGeometry self) -> VersionInfo"""
9737  return _IMP_core.RigidBodyDerivativeGeometry_get_version_info(self)
9738  __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativeGeometry
9739 
9740  def __str__(self):
9741  r"""__str__(RigidBodyDerivativeGeometry self) -> std::string"""
9742  return _IMP_core.RigidBodyDerivativeGeometry___str__(self)
9743 
9744  def __repr__(self):
9745  r"""__repr__(RigidBodyDerivativeGeometry self) -> std::string"""
9746  return _IMP_core.RigidBodyDerivativeGeometry___repr__(self)
9747 
9748  @staticmethod
9749  def get_from(o):
9750  return _object_cast_to_RigidBodyDerivativeGeometry(o)
9751 
9752 
9753 # Register RigidBodyDerivativeGeometry in _IMP_core:
9754 _IMP_core.RigidBodyDerivativeGeometry_swigregister(RigidBodyDerivativeGeometry)
9755 class RigidBodyDerivativesGeometry(IMP.display.SingletonsGeometry):
9756  r"""Proxy of C++ IMP::core::RigidBodyDerivativesGeometry class."""
9757 
9758  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9759 
9760  def __init__(self, sc):
9761  r"""__init__(RigidBodyDerivativesGeometry self, SingletonContainer sc) -> RigidBodyDerivativesGeometry"""
9762  _IMP_core.RigidBodyDerivativesGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativesGeometry(sc))
9763 
9764  def get_version_info(self):
9765  r"""get_version_info(RigidBodyDerivativesGeometry self) -> VersionInfo"""
9766  return _IMP_core.RigidBodyDerivativesGeometry_get_version_info(self)
9767  __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativesGeometry
9768 
9769  def __str__(self):
9770  r"""__str__(RigidBodyDerivativesGeometry self) -> std::string"""
9771  return _IMP_core.RigidBodyDerivativesGeometry___str__(self)
9772 
9773  def __repr__(self):
9774  r"""__repr__(RigidBodyDerivativesGeometry self) -> std::string"""
9775  return _IMP_core.RigidBodyDerivativesGeometry___repr__(self)
9776 
9777  @staticmethod
9778  def get_from(o):
9779  return _object_cast_to_RigidBodyDerivativesGeometry(o)
9780 
9781 
9782 # Register RigidBodyDerivativesGeometry in _IMP_core:
9783 _IMP_core.RigidBodyDerivativesGeometry_swigregister(RigidBodyDerivativesGeometry)
9784 class RigidBodyFrameGeometry(IMP.display.SingletonGeometry):
9785  r"""Proxy of C++ IMP::core::RigidBodyFrameGeometry class."""
9786 
9787  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9788 
9789  def __init__(self, *args):
9790  r"""
9791  __init__(RigidBodyFrameGeometry self, Particle p) -> RigidBodyFrameGeometry
9792  __init__(RigidBodyFrameGeometry self, RigidBody d) -> RigidBodyFrameGeometry
9793  """
9794  _IMP_core.RigidBodyFrameGeometry_swiginit(self, _IMP_core.new_RigidBodyFrameGeometry(*args))
9795 
9796  def get_version_info(self):
9797  r"""get_version_info(RigidBodyFrameGeometry self) -> VersionInfo"""
9798  return _IMP_core.RigidBodyFrameGeometry_get_version_info(self)
9799  __swig_destroy__ = _IMP_core.delete_RigidBodyFrameGeometry
9800 
9801  def __str__(self):
9802  r"""__str__(RigidBodyFrameGeometry self) -> std::string"""
9803  return _IMP_core.RigidBodyFrameGeometry___str__(self)
9804 
9805  def __repr__(self):
9806  r"""__repr__(RigidBodyFrameGeometry self) -> std::string"""
9807  return _IMP_core.RigidBodyFrameGeometry___repr__(self)
9808 
9809  @staticmethod
9810  def get_from(o):
9811  return _object_cast_to_RigidBodyFrameGeometry(o)
9812 
9813 
9814 # Register RigidBodyFrameGeometry in _IMP_core:
9815 _IMP_core.RigidBodyFrameGeometry_swigregister(RigidBodyFrameGeometry)
9816 class RigidBodyFramesGeometry(IMP.display.SingletonsGeometry):
9817  r"""Proxy of C++ IMP::core::RigidBodyFramesGeometry class."""
9818 
9819  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9820 
9821  def __init__(self, sc):
9822  r"""__init__(RigidBodyFramesGeometry self, SingletonContainer sc) -> RigidBodyFramesGeometry"""
9823  _IMP_core.RigidBodyFramesGeometry_swiginit(self, _IMP_core.new_RigidBodyFramesGeometry(sc))
9824 
9825  def get_version_info(self):
9826  r"""get_version_info(RigidBodyFramesGeometry self) -> VersionInfo"""
9827  return _IMP_core.RigidBodyFramesGeometry_get_version_info(self)
9828  __swig_destroy__ = _IMP_core.delete_RigidBodyFramesGeometry
9829 
9830  def __str__(self):
9831  r"""__str__(RigidBodyFramesGeometry self) -> std::string"""
9832  return _IMP_core.RigidBodyFramesGeometry___str__(self)
9833 
9834  def __repr__(self):
9835  r"""__repr__(RigidBodyFramesGeometry self) -> std::string"""
9836  return _IMP_core.RigidBodyFramesGeometry___repr__(self)
9837 
9838  @staticmethod
9839  def get_from(o):
9840  return _object_cast_to_RigidBodyFramesGeometry(o)
9841 
9842 
9843 # Register RigidBodyFramesGeometry in _IMP_core:
9844 _IMP_core.RigidBodyFramesGeometry_swigregister(RigidBodyFramesGeometry)
9845 class RigidBodyTorque(IMP.display.SegmentGeometry):
9846  r"""Proxy of C++ IMP::core::RigidBodyTorque class."""
9847 
9848  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9849 
9850  def __init__(self, p):
9851  r"""__init__(RigidBodyTorque self, Particle p) -> RigidBodyTorque"""
9852  _IMP_core.RigidBodyTorque_swiginit(self, _IMP_core.new_RigidBodyTorque(p))
9853 
9854  def __str__(self):
9855  r"""__str__(RigidBodyTorque self) -> std::string"""
9856  return _IMP_core.RigidBodyTorque___str__(self)
9857 
9858  def __repr__(self):
9859  r"""__repr__(RigidBodyTorque self) -> std::string"""
9860  return _IMP_core.RigidBodyTorque___repr__(self)
9861 
9862  @staticmethod
9863  def get_from(o):
9864  return _object_cast_to_RigidBodyTorque(o)
9865 
9866  __swig_destroy__ = _IMP_core.delete_RigidBodyTorque
9867 
9868 # Register RigidBodyTorque in _IMP_core:
9869 _IMP_core.RigidBodyTorque_swigregister(RigidBodyTorque)
9870 class NearestNeighborsClosePairsFinder(ClosePairsFinder):
9871  r"""Proxy of C++ IMP::core::NearestNeighborsClosePairsFinder class."""
9872 
9873  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9874 
9875  def __init__(self):
9876  r"""__init__(NearestNeighborsClosePairsFinder self) -> NearestNeighborsClosePairsFinder"""
9877  _IMP_core.NearestNeighborsClosePairsFinder_swiginit(self, _IMP_core.new_NearestNeighborsClosePairsFinder())
9878 
9879  def get_close_pairs(self, *args):
9880  r"""
9881  get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9882  get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9883  get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
9884  get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
9885  """
9886  return _IMP_core.NearestNeighborsClosePairsFinder_get_close_pairs(self, *args)
9887 
9888  def do_get_inputs(self, m, pis):
9889  r"""do_get_inputs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9890  return _IMP_core.NearestNeighborsClosePairsFinder_do_get_inputs(self, m, pis)
9891 
9892  def get_version_info(self):
9893  r"""get_version_info(NearestNeighborsClosePairsFinder self) -> VersionInfo"""
9894  return _IMP_core.NearestNeighborsClosePairsFinder_get_version_info(self)
9895  __swig_destroy__ = _IMP_core.delete_NearestNeighborsClosePairsFinder
9896 
9897  def __str__(self):
9898  r"""__str__(NearestNeighborsClosePairsFinder self) -> std::string"""
9899  return _IMP_core.NearestNeighborsClosePairsFinder___str__(self)
9900 
9901  def __repr__(self):
9902  r"""__repr__(NearestNeighborsClosePairsFinder self) -> std::string"""
9903  return _IMP_core.NearestNeighborsClosePairsFinder___repr__(self)
9904 
9905  @staticmethod
9906  def get_from(o):
9907  return _object_cast_to_NearestNeighborsClosePairsFinder(o)
9908 
9909 
9910 # Register NearestNeighborsClosePairsFinder in _IMP_core:
9911 _IMP_core.NearestNeighborsClosePairsFinder_swigregister(NearestNeighborsClosePairsFinder)
9912 class RestraintsScoringFunction(IMP.ScoringFunction):
9913  r"""Proxy of C++ IMP::core::RestraintsScoringFunction class."""
9914 
9915  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9916 
9917  def __init__(self, *args):
9918  r"""
9919  __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, double weight=1.0, double max=NO_MAX, std::string name="RestraintsScoringFunction%1%") -> RestraintsScoringFunction
9920  __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, std::string name) -> RestraintsScoringFunction
9921  __init__(RestraintsScoringFunction self) -> RestraintsScoringFunction
9922  """
9923  _IMP_core.RestraintsScoringFunction_swiginit(self, _IMP_core.new_RestraintsScoringFunction(*args))
9924 
9925  def do_add_score_and_derivatives(self, sa, ss):
9926  r"""do_add_score_and_derivatives(RestraintsScoringFunction self, ScoreAccumulator sa, IMP::ScoreStatesTemp const & ss)"""
9927  return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives(self, sa, ss)
9928 
9929  def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss):
9930  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)"""
9931  return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss)
9932 
9933  def do_get_inputs(self):
9934  r"""do_get_inputs(RestraintsScoringFunction self) -> IMP::ModelObjectsTemp"""
9935  return _IMP_core.RestraintsScoringFunction_do_get_inputs(self)
9936 
9937  def get_restraints(self):
9938  r"""get_restraints(RestraintsScoringFunction self) -> IMP::Restraints"""
9939  return _IMP_core.RestraintsScoringFunction_get_restraints(self)
9940 
9941  def set_restraints(self, d):
9942  r"""set_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
9943  return _IMP_core.RestraintsScoringFunction_set_restraints(self, d)
9944 
9945  def get_number_of_restraints(self):
9946  r"""get_number_of_restraints(RestraintsScoringFunction self) -> unsigned int"""
9947  return _IMP_core.RestraintsScoringFunction_get_number_of_restraints(self)
9948 
9949  def clear_restraints(self):
9950  r"""clear_restraints(RestraintsScoringFunction self)"""
9951  return _IMP_core.RestraintsScoringFunction_clear_restraints(self)
9952 
9953  def get_restraint(self, i):
9954  r"""get_restraint(RestraintsScoringFunction self, unsigned int i) -> Restraint"""
9955  return _IMP_core.RestraintsScoringFunction_get_restraint(self, i)
9956 
9957  def erase_restraint(self, i):
9958  r"""erase_restraint(RestraintsScoringFunction self, unsigned int i)"""
9959  return _IMP_core.RestraintsScoringFunction_erase_restraint(self, i)
9960 
9961  def add_restraint(self, d):
9962  r"""add_restraint(RestraintsScoringFunction self, Restraint d) -> unsigned int"""
9963  return _IMP_core.RestraintsScoringFunction_add_restraint(self, d)
9964 
9965  def add_restraints(self, d):
9966  r"""add_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
9967  return _IMP_core.RestraintsScoringFunction_add_restraints(self, d)
9968 
9969  def _python_index_restraint(self, r, start, stop):
9970  r"""_python_index_restraint(RestraintsScoringFunction self, Restraint r, unsigned int start, unsigned int stop) -> unsigned int"""
9971  return _IMP_core.RestraintsScoringFunction__python_index_restraint(self, r, start, stop)
9972  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)
9973  def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
9974  def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
9975  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##Restraints")
9976 
9977  def get_version_info(self):
9978  r"""get_version_info(RestraintsScoringFunction self) -> VersionInfo"""
9979  return _IMP_core.RestraintsScoringFunction_get_version_info(self)
9980  __swig_destroy__ = _IMP_core.delete_RestraintsScoringFunction
9981 
9982  def __str__(self):
9983  r"""__str__(RestraintsScoringFunction self) -> std::string"""
9984  return _IMP_core.RestraintsScoringFunction___str__(self)
9985 
9986  def __repr__(self):
9987  r"""__repr__(RestraintsScoringFunction self) -> std::string"""
9988  return _IMP_core.RestraintsScoringFunction___repr__(self)
9989 
9990  @staticmethod
9991  def get_from(o):
9992  return _object_cast_to_RestraintsScoringFunction(o)
9993 
9994 
9995  def _get_as_binary(self):
9996  r"""_get_as_binary(RestraintsScoringFunction self) -> PyObject *"""
9997  return _IMP_core.RestraintsScoringFunction__get_as_binary(self)
9998 
9999  def _set_from_binary(self, p):
10000  r"""_set_from_binary(RestraintsScoringFunction self, PyObject * p)"""
10001  return _IMP_core.RestraintsScoringFunction__set_from_binary(self, p)
10002 
10003  def __getstate__(self):
10004  p = self._get_as_binary()
10005  if len(self.__dict__) > 1:
10006  d = self.__dict__.copy()
10007  del d['this']
10008  p = (d, p)
10009  return p
10010 
10011  def __setstate__(self, p):
10012  if not hasattr(self, 'this'):
10013  self.__init__()
10014  if isinstance(p, tuple):
10015  d, p = p
10016  self.__dict__.update(d)
10017  return self._set_from_binary(p)
10018 
10019 
10020  def _get_jax(self, space=None):
10021  import IMP.jax
10022  space = space or IMP.jax.FreeSpace
10023  jis = [r.get_derived_object()._get_jax(space=space)
10024  for r in self.restraints]
10025  funcs = [j.score_func for j in jis]
10026  keys = frozenset(x for j in jis for x in j._keys)
10027  def jax_sf(jm):
10028  return sum(f(jm) for f in funcs)
10029  return IMP._jax_util.JAXRestraintInfo(
10030  m=self.get_model(), score_func=jax_sf, weight=1.0, keys=keys)
10031 
10032 
10033 # Register RestraintsScoringFunction in _IMP_core:
10034 _IMP_core.RestraintsScoringFunction_swigregister(RestraintsScoringFunction)
10035 class RigidClosePairsFinder(ClosePairsFinder):
10036  r"""Proxy of C++ IMP::core::RigidClosePairsFinder class."""
10037 
10038  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10039 
10040  def __init__(self, cpf=None):
10041  r"""__init__(RigidClosePairsFinder self, ClosePairsFinder cpf=None) -> RigidClosePairsFinder"""
10042  _IMP_core.RigidClosePairsFinder_swiginit(self, _IMP_core.new_RigidClosePairsFinder(cpf))
10043 
10044  def do_get_inputs(self, m, pis):
10045  r"""do_get_inputs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10046  return _IMP_core.RigidClosePairsFinder_do_get_inputs(self, m, pis)
10047 
10048  def get_close_pairs(self, *args):
10049  r"""
10050  get_close_pairs(RigidClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b, IMP::ParticleIndexes const & pa, IMP::ParticleIndexes const & pb) -> IMP::ParticleIndexPairs
10051  get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
10052  get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
10053  get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
10054  get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
10055  """
10056  return _IMP_core.RigidClosePairsFinder_get_close_pairs(self, *args)
10057 
10058  def get_version_info(self):
10059  r"""get_version_info(RigidClosePairsFinder self) -> VersionInfo"""
10060  return _IMP_core.RigidClosePairsFinder_get_version_info(self)
10061  __swig_destroy__ = _IMP_core.delete_RigidClosePairsFinder
10062 
10063  def __str__(self):
10064  r"""__str__(RigidClosePairsFinder self) -> std::string"""
10065  return _IMP_core.RigidClosePairsFinder___str__(self)
10066 
10067  def __repr__(self):
10068  r"""__repr__(RigidClosePairsFinder self) -> std::string"""
10069  return _IMP_core.RigidClosePairsFinder___repr__(self)
10070 
10071  @staticmethod
10072  def get_from(o):
10073  return _object_cast_to_RigidClosePairsFinder(o)
10074 
10075 
10076  def _get_as_binary(self):
10077  r"""_get_as_binary(RigidClosePairsFinder self) -> PyObject *"""
10078  return _IMP_core.RigidClosePairsFinder__get_as_binary(self)
10079 
10080  def _set_from_binary(self, p):
10081  r"""_set_from_binary(RigidClosePairsFinder self, PyObject * p)"""
10082  return _IMP_core.RigidClosePairsFinder__set_from_binary(self, p)
10083 
10084  def __getstate__(self):
10085  p = self._get_as_binary()
10086  if len(self.__dict__) > 1:
10087  d = self.__dict__.copy()
10088  del d['this']
10089  p = (d, p)
10090  return p
10091 
10092  def __setstate__(self, p):
10093  if not hasattr(self, 'this'):
10094  self.__init__()
10095  if isinstance(p, tuple):
10096  d, p = p
10097  self.__dict__.update(d)
10098  return self._set_from_binary(p)
10099 
10100 
10101 # Register RigidClosePairsFinder in _IMP_core:
10102 _IMP_core.RigidClosePairsFinder_swigregister(RigidClosePairsFinder)
10103 class _SphereDistancePairScore(IMP.PairScore):
10104  r"""Proxy of C++ IMP::core::SphereDistancePairScore class."""
10105 
10106  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10107  __repr__ = _swig_repr
10108 
10109  def __init__(self, *args):
10110  r"""
10111  SphereDistancePairScore(UnaryFunction uf, std::string name="SphereDistancePairScore%1%") -> _SphereDistancePairScore
10112  __init__(_SphereDistancePairScore self) -> _SphereDistancePairScore
10113  """
10114  _IMP_core._SphereDistancePairScore_swiginit(self, _IMP_core.new__SphereDistancePairScore(*args))
10115 
10116  def do_get_inputs(self, m, pis):
10117  r"""do_get_inputs(_SphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10118  return _IMP_core._SphereDistancePairScore_do_get_inputs(self, m, pis)
10119 
10120  def get_score_functor(self, *args):
10121  r"""
10122  get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10123  get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10124  """
10125  return _IMP_core._SphereDistancePairScore_get_score_functor(self, *args)
10126 
10127  def get_version_info(self):
10128  r"""get_version_info(_SphereDistancePairScore self) -> VersionInfo"""
10129  return _IMP_core._SphereDistancePairScore_get_version_info(self)
10130  __swig_destroy__ = _IMP_core.delete__SphereDistancePairScore
10131 
10132  @staticmethod
10133  def get_from(o):
10134  return _object_cast_to__SphereDistancePairScore(o)
10135 
10136 
10137  def _get_as_binary(self):
10138  r"""_get_as_binary(_SphereDistancePairScore self) -> PyObject *"""
10139  return _IMP_core._SphereDistancePairScore__get_as_binary(self)
10140 
10141  def _set_from_binary(self, p):
10142  r"""_set_from_binary(_SphereDistancePairScore self, PyObject * p)"""
10143  return _IMP_core._SphereDistancePairScore__set_from_binary(self, p)
10144 
10145  def __getstate__(self):
10146  p = self._get_as_binary()
10147  if len(self.__dict__) > 1:
10148  d = self.__dict__.copy()
10149  del d['this']
10150  p = (d, p)
10151  return p
10152 
10153  def __setstate__(self, p):
10154  if not hasattr(self, 'this'):
10155  self.__init__()
10156  if isinstance(p, tuple):
10157  d, p = p
10158  self.__dict__.update(d)
10159  return self._set_from_binary(p)
10160 
10161 
10162  def _get_jax(self, m, indexes, space):
10163  import jax.numpy as jnp
10164  def jax_score(jm, uf):
10165  xyzs = jm['xyz'][indexes]
10166  rs = jm['r'][indexes]
10167  diff = xyzs[:,0] - xyzs[:,1]
10168  drs = space.distance(diff) - rs.sum(axis=1)
10169  return uf(drs)
10170  sfnc = self.get_score_functor()
10171  uf = sfnc.get_unary_function().get_derived_object()
10172  f = functools.partial(jax_score, uf=uf._get_jax())
10173  return self._wrap_jax(m, f)
10174 
10175 
10176 # Register _SphereDistancePairScore in _IMP_core:
10177 _IMP_core._SphereDistancePairScore_swigregister(_SphereDistancePairScore)
10178 class HarmonicUpperBoundSphereDistancePairScore(IMP.PairScore):
10179  r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDistancePairScore class."""
10180 
10181  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10182 
10183  def __init__(self, *args):
10184  r"""
10185  __init__(HarmonicUpperBoundSphereDistancePairScore self, double x0, double k, std::string name="HarmonicUpperBoundSphereDistancePairScore%1%") -> HarmonicUpperBoundSphereDistancePairScore
10186  __init__(HarmonicUpperBoundSphereDistancePairScore self) -> HarmonicUpperBoundSphereDistancePairScore
10187  """
10188  _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDistancePairScore(*args))
10189 
10190  def do_get_inputs(self, m, pis):
10191  r"""do_get_inputs(HarmonicUpperBoundSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10192  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_do_get_inputs(self, m, pis)
10193 
10194  def get_score_functor(self, *args):
10195  r"""
10196  get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore
10197  get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore const &
10198  """
10199  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_score_functor(self, *args)
10200 
10201  def get_x0(self):
10202  r"""get_x0(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10203  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_x0(self)
10204 
10205  def get_k(self):
10206  r"""get_k(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10207  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_k(self)
10208 
10209  def get_version_info(self):
10210  r"""get_version_info(HarmonicUpperBoundSphereDistancePairScore self) -> VersionInfo"""
10211  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_version_info(self)
10212  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDistancePairScore
10213 
10214  def __str__(self):
10215  r"""__str__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10216  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___str__(self)
10217 
10218  def __repr__(self):
10219  r"""__repr__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10220  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___repr__(self)
10221 
10222  @staticmethod
10223  def get_from(o):
10224  return _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
10225 
10226 
10227  def _get_as_binary(self):
10228  r"""_get_as_binary(HarmonicUpperBoundSphereDistancePairScore self) -> PyObject *"""
10229  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__get_as_binary(self)
10230 
10231  def _set_from_binary(self, p):
10232  r"""_set_from_binary(HarmonicUpperBoundSphereDistancePairScore self, PyObject * p)"""
10233  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__set_from_binary(self, p)
10234 
10235  def __getstate__(self):
10236  p = self._get_as_binary()
10237  if len(self.__dict__) > 1:
10238  d = self.__dict__.copy()
10239  del d['this']
10240  p = (d, p)
10241  return p
10242 
10243  def __setstate__(self, p):
10244  if not hasattr(self, 'this'):
10245  self.__init__()
10246  if isinstance(p, tuple):
10247  d, p = p
10248  self.__dict__.update(d)
10249  return self._set_from_binary(p)
10250 
10251 
10252  def _get_jax(self, m, indexes, space):
10253  import jax.numpy as jnp
10254  import jax.lax
10255  def jax_score(jm, d, k):
10256  xyzs = jm['xyz'][indexes]
10257  rs = jm['r'][indexes]
10258  diff = xyzs[:,0] - xyzs[:,1]
10259  drs = space.distance(diff) - rs.sum(axis=1)
10260  return 0.5 * k * jax.lax.min(d - drs, 0.0) ** 2
10261  f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10262  return self._wrap_jax(m, f)
10263 
10264 
10265 # Register HarmonicUpperBoundSphereDistancePairScore in _IMP_core:
10266 _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swigregister(HarmonicUpperBoundSphereDistancePairScore)
10267 class HarmonicUpperBoundSphereDiameterPairScore(IMP.PairScore):
10268  r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDiameterPairScore class."""
10269 
10270  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10271 
10272  def __init__(self, d0, k):
10273  r"""__init__(HarmonicUpperBoundSphereDiameterPairScore self, double d0, double k) -> HarmonicUpperBoundSphereDiameterPairScore"""
10274  _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDiameterPairScore(d0, k))
10275 
10276  def get_rest_length(self):
10277  r"""get_rest_length(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10278  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_rest_length(self)
10279 
10280  def get_stiffness(self):
10281  r"""get_stiffness(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10282  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_stiffness(self)
10283 
10284  def do_get_inputs(self, m, pis):
10285  r"""do_get_inputs(HarmonicUpperBoundSphereDiameterPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10286  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_do_get_inputs(self, m, pis)
10287 
10288  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10289  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"""
10290  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10291 
10292  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10293  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"""
10294  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10295 
10296  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10297  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"""
10298  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10299 
10300  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10301  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"""
10302  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10303 
10304  def get_version_info(self):
10305  r"""get_version_info(HarmonicUpperBoundSphereDiameterPairScore self) -> VersionInfo"""
10306  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_version_info(self)
10307  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDiameterPairScore
10308 
10309  def __str__(self):
10310  r"""__str__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10311  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___str__(self)
10312 
10313  def __repr__(self):
10314  r"""__repr__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10315  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___repr__(self)
10316 
10317  @staticmethod
10318  def get_from(o):
10319  return _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
10320 
10321 
10322 # Register HarmonicUpperBoundSphereDiameterPairScore in _IMP_core:
10323 _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swigregister(HarmonicUpperBoundSphereDiameterPairScore)
10324 class HarmonicSphereDistancePairScore(IMP.PairScore):
10325  r"""Proxy of C++ IMP::core::HarmonicSphereDistancePairScore class."""
10326 
10327  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10328 
10329  def __init__(self, *args):
10330  r"""
10331  __init__(HarmonicSphereDistancePairScore self, double x0, double k, std::string name="HarmonicSphereDistancePairScore%1%") -> HarmonicSphereDistancePairScore
10332  __init__(HarmonicSphereDistancePairScore self) -> HarmonicSphereDistancePairScore
10333  """
10334  _IMP_core.HarmonicSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSphereDistancePairScore(*args))
10335 
10336  def do_get_inputs(self, m, pis):
10337  r"""do_get_inputs(HarmonicSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10338  return _IMP_core.HarmonicSphereDistancePairScore_do_get_inputs(self, m, pis)
10339 
10340  def get_score_functor(self, *args):
10341  r"""
10342  get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore
10343  get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore const &
10344  """
10345  return _IMP_core.HarmonicSphereDistancePairScore_get_score_functor(self, *args)
10346 
10347  def get_x0(self):
10348  r"""get_x0(HarmonicSphereDistancePairScore self) -> double"""
10349  return _IMP_core.HarmonicSphereDistancePairScore_get_x0(self)
10350 
10351  def get_k(self):
10352  r"""get_k(HarmonicSphereDistancePairScore self) -> double"""
10353  return _IMP_core.HarmonicSphereDistancePairScore_get_k(self)
10354 
10355  def get_version_info(self):
10356  r"""get_version_info(HarmonicSphereDistancePairScore self) -> VersionInfo"""
10357  return _IMP_core.HarmonicSphereDistancePairScore_get_version_info(self)
10358  __swig_destroy__ = _IMP_core.delete_HarmonicSphereDistancePairScore
10359 
10360  def __str__(self):
10361  r"""__str__(HarmonicSphereDistancePairScore self) -> std::string"""
10362  return _IMP_core.HarmonicSphereDistancePairScore___str__(self)
10363 
10364  def __repr__(self):
10365  r"""__repr__(HarmonicSphereDistancePairScore self) -> std::string"""
10366  return _IMP_core.HarmonicSphereDistancePairScore___repr__(self)
10367 
10368  @staticmethod
10369  def get_from(o):
10370  return _object_cast_to_HarmonicSphereDistancePairScore(o)
10371 
10372 
10373  def _get_as_binary(self):
10374  r"""_get_as_binary(HarmonicSphereDistancePairScore self) -> PyObject *"""
10375  return _IMP_core.HarmonicSphereDistancePairScore__get_as_binary(self)
10376 
10377  def _set_from_binary(self, p):
10378  r"""_set_from_binary(HarmonicSphereDistancePairScore self, PyObject * p)"""
10379  return _IMP_core.HarmonicSphereDistancePairScore__set_from_binary(self, p)
10380 
10381  def __getstate__(self):
10382  p = self._get_as_binary()
10383  if len(self.__dict__) > 1:
10384  d = self.__dict__.copy()
10385  del d['this']
10386  p = (d, p)
10387  return p
10388 
10389  def __setstate__(self, p):
10390  if not hasattr(self, 'this'):
10391  self.__init__()
10392  if isinstance(p, tuple):
10393  d, p = p
10394  self.__dict__.update(d)
10395  return self._set_from_binary(p)
10396 
10397 
10398  def _get_jax(self, m, indexes, space):
10399  import jax.numpy as jnp
10400  def jax_score(jm, d, k):
10401  xyzs = jm['xyz'][indexes]
10402  rs = jm['r'][indexes]
10403  diff = xyzs[:,0] - xyzs[:,1]
10404  drs = space.distance(diff) - rs.sum(axis=1)
10405  return 0.5 * k * (d - drs)**2
10406  f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10407  return self._wrap_jax(m, f)
10408 
10409 
10410 # Register HarmonicSphereDistancePairScore in _IMP_core:
10411 _IMP_core.HarmonicSphereDistancePairScore_swigregister(HarmonicSphereDistancePairScore)
10412 class NormalizedSphereDistancePairScore(IMP.PairScore):
10413  r"""Proxy of C++ IMP::core::NormalizedSphereDistancePairScore class."""
10414 
10415  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10416 
10417  def __init__(self, *args):
10418  r"""__init__(NormalizedSphereDistancePairScore self, UnaryFunction f, FloatKey radius=IMP::FloatKey("radius")) -> NormalizedSphereDistancePairScore"""
10419  _IMP_core.NormalizedSphereDistancePairScore_swiginit(self, _IMP_core.new_NormalizedSphereDistancePairScore(*args))
10420 
10421  def do_get_inputs(self, m, pis):
10422  r"""do_get_inputs(NormalizedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10423  return _IMP_core.NormalizedSphereDistancePairScore_do_get_inputs(self, m, pis)
10424 
10425  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10426  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"""
10427  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10428 
10429  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10430  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"""
10431  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10432 
10433  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10434  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"""
10435  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10436 
10437  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10438  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"""
10439  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10440 
10441  def get_version_info(self):
10442  r"""get_version_info(NormalizedSphereDistancePairScore self) -> VersionInfo"""
10443  return _IMP_core.NormalizedSphereDistancePairScore_get_version_info(self)
10444  __swig_destroy__ = _IMP_core.delete_NormalizedSphereDistancePairScore
10445 
10446  def __str__(self):
10447  r"""__str__(NormalizedSphereDistancePairScore self) -> std::string"""
10448  return _IMP_core.NormalizedSphereDistancePairScore___str__(self)
10449 
10450  def __repr__(self):
10451  r"""__repr__(NormalizedSphereDistancePairScore self) -> std::string"""
10452  return _IMP_core.NormalizedSphereDistancePairScore___repr__(self)
10453 
10454  @staticmethod
10455  def get_from(o):
10456  return _object_cast_to_NormalizedSphereDistancePairScore(o)
10457 
10458 
10459 # Register NormalizedSphereDistancePairScore in _IMP_core:
10460 _IMP_core.NormalizedSphereDistancePairScore_swigregister(NormalizedSphereDistancePairScore)
10461 class WeightedSphereDistancePairScore(IMP.PairScore):
10462  r"""Proxy of C++ IMP::core::WeightedSphereDistancePairScore class."""
10463 
10464  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10465 
10466  def __init__(self, *args):
10467  r"""__init__(WeightedSphereDistancePairScore self, UnaryFunction f, FloatKey weight, FloatKey radius=IMP::FloatKey("radius")) -> WeightedSphereDistancePairScore"""
10468  _IMP_core.WeightedSphereDistancePairScore_swiginit(self, _IMP_core.new_WeightedSphereDistancePairScore(*args))
10469 
10470  def do_get_inputs(self, m, pis):
10471  r"""do_get_inputs(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10472  return _IMP_core.WeightedSphereDistancePairScore_do_get_inputs(self, m, pis)
10473 
10474  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10475  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"""
10476  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10477 
10478  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10479  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"""
10480  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10481 
10482  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10483  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"""
10484  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10485 
10486  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10487  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"""
10488  return _IMP_core.WeightedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10489 
10490  def get_version_info(self):
10491  r"""get_version_info(WeightedSphereDistancePairScore self) -> VersionInfo"""
10492  return _IMP_core.WeightedSphereDistancePairScore_get_version_info(self)
10493  __swig_destroy__ = _IMP_core.delete_WeightedSphereDistancePairScore
10494 
10495  def __str__(self):
10496  r"""__str__(WeightedSphereDistancePairScore self) -> std::string"""
10497  return _IMP_core.WeightedSphereDistancePairScore___str__(self)
10498 
10499  def __repr__(self):
10500  r"""__repr__(WeightedSphereDistancePairScore self) -> std::string"""
10501  return _IMP_core.WeightedSphereDistancePairScore___repr__(self)
10502 
10503  @staticmethod
10504  def get_from(o):
10505  return _object_cast_to_WeightedSphereDistancePairScore(o)
10506 
10507 
10508 # Register WeightedSphereDistancePairScore in _IMP_core:
10509 _IMP_core.WeightedSphereDistancePairScore_swigregister(WeightedSphereDistancePairScore)
10510 class SoftSpherePairScore(IMP.PairScore):
10511  r"""Proxy of C++ IMP::core::SoftSpherePairScore class."""
10512 
10513  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10514 
10515  def __init__(self, *args):
10516  r"""
10517  __init__(SoftSpherePairScore self, double k, std::string name="SoftSpherePairScore%1%") -> SoftSpherePairScore
10518  __init__(SoftSpherePairScore self) -> SoftSpherePairScore
10519  """
10520  _IMP_core.SoftSpherePairScore_swiginit(self, _IMP_core.new_SoftSpherePairScore(*args))
10521 
10522  def do_get_inputs(self, m, pis):
10523  r"""do_get_inputs(SoftSpherePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10524  return _IMP_core.SoftSpherePairScore_do_get_inputs(self, m, pis)
10525 
10526  def get_score_functor(self, *args):
10527  r"""
10528  get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore
10529  get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore const &
10530  """
10531  return _IMP_core.SoftSpherePairScore_get_score_functor(self, *args)
10532 
10533  def get_k(self):
10534  r"""get_k(SoftSpherePairScore self) -> double"""
10535  return _IMP_core.SoftSpherePairScore_get_k(self)
10536 
10537  def get_version_info(self):
10538  r"""get_version_info(SoftSpherePairScore self) -> VersionInfo"""
10539  return _IMP_core.SoftSpherePairScore_get_version_info(self)
10540  __swig_destroy__ = _IMP_core.delete_SoftSpherePairScore
10541 
10542  def __str__(self):
10543  r"""__str__(SoftSpherePairScore self) -> std::string"""
10544  return _IMP_core.SoftSpherePairScore___str__(self)
10545 
10546  def __repr__(self):
10547  r"""__repr__(SoftSpherePairScore self) -> std::string"""
10548  return _IMP_core.SoftSpherePairScore___repr__(self)
10549 
10550  @staticmethod
10551  def get_from(o):
10552  return _object_cast_to_SoftSpherePairScore(o)
10553 
10554 
10555  def _get_as_binary(self):
10556  r"""_get_as_binary(SoftSpherePairScore self) -> PyObject *"""
10557  return _IMP_core.SoftSpherePairScore__get_as_binary(self)
10558 
10559  def _set_from_binary(self, p):
10560  r"""_set_from_binary(SoftSpherePairScore self, PyObject * p)"""
10561  return _IMP_core.SoftSpherePairScore__set_from_binary(self, p)
10562 
10563  def __getstate__(self):
10564  p = self._get_as_binary()
10565  if len(self.__dict__) > 1:
10566  d = self.__dict__.copy()
10567  del d['this']
10568  p = (d, p)
10569  return p
10570 
10571  def __setstate__(self, p):
10572  if not hasattr(self, 'this'):
10573  self.__init__()
10574  if isinstance(p, tuple):
10575  d, p = p
10576  self.__dict__.update(d)
10577  return self._set_from_binary(p)
10578 
10579 
10580  def _get_jax(self, m, indexes, space):
10581  import jax.numpy as jnp
10582  import jax.lax
10583  def jax_score(jm, k):
10584  xyzs = jm['xyz'][indexes]
10585  rs = jm['r'][indexes]
10586  diff = xyzs[:,0] - xyzs[:,1]
10587  drs = space.distance(diff) - rs.sum(axis=1)
10588  return 0.5 * k * jax.lax.min(drs, 0.0) ** 2
10589  f = functools.partial(jax_score, k=self.get_k())
10590  return self._wrap_jax(m, f)
10591 
10592 
10593 # Register SoftSpherePairScore in _IMP_core:
10594 _IMP_core.SoftSpherePairScore_swigregister(SoftSpherePairScore)
10595 class SurfaceDistancePairScore(IMP.PairScore):
10596  r"""Proxy of C++ IMP::core::SurfaceDistancePairScore class."""
10597 
10598  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10599 
10600  def __init__(self, *args):
10601  r"""__init__(SurfaceDistancePairScore self, UnaryFunction uf, std::string name="SurfaceDistancePairScore%1%") -> SurfaceDistancePairScore"""
10602  _IMP_core.SurfaceDistancePairScore_swiginit(self, _IMP_core.new_SurfaceDistancePairScore(*args))
10603 
10604  def do_get_inputs(self, m, pis):
10605  r"""do_get_inputs(SurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10606  return _IMP_core.SurfaceDistancePairScore_do_get_inputs(self, m, pis)
10607 
10608  def get_version_info(self):
10609  r"""get_version_info(SurfaceDistancePairScore self) -> VersionInfo"""
10610  return _IMP_core.SurfaceDistancePairScore_get_version_info(self)
10611  __swig_destroy__ = _IMP_core.delete_SurfaceDistancePairScore
10612 
10613  def __str__(self):
10614  r"""__str__(SurfaceDistancePairScore self) -> std::string"""
10615  return _IMP_core.SurfaceDistancePairScore___str__(self)
10616 
10617  def __repr__(self):
10618  r"""__repr__(SurfaceDistancePairScore self) -> std::string"""
10619  return _IMP_core.SurfaceDistancePairScore___repr__(self)
10620 
10621  @staticmethod
10622  def get_from(o):
10623  return _object_cast_to_SurfaceDistancePairScore(o)
10624 
10625 
10626 # Register SurfaceDistancePairScore in _IMP_core:
10627 _IMP_core.SurfaceDistancePairScore_swigregister(SurfaceDistancePairScore)
10628 class SurfaceHeightPairScore(IMP.PairScore):
10629  r"""Proxy of C++ IMP::core::SurfaceHeightPairScore class."""
10630 
10631  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10632 
10633  def __init__(self, *args):
10634  r"""__init__(SurfaceHeightPairScore self, UnaryFunction uf, std::string name="SurfaceHeightPairScore%1%") -> SurfaceHeightPairScore"""
10635  _IMP_core.SurfaceHeightPairScore_swiginit(self, _IMP_core.new_SurfaceHeightPairScore(*args))
10636 
10637  def do_get_inputs(self, m, pis):
10638  r"""do_get_inputs(SurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10639  return _IMP_core.SurfaceHeightPairScore_do_get_inputs(self, m, pis)
10640 
10641  def get_version_info(self):
10642  r"""get_version_info(SurfaceHeightPairScore self) -> VersionInfo"""
10643  return _IMP_core.SurfaceHeightPairScore_get_version_info(self)
10644  __swig_destroy__ = _IMP_core.delete_SurfaceHeightPairScore
10645 
10646  def __str__(self):
10647  r"""__str__(SurfaceHeightPairScore self) -> std::string"""
10648  return _IMP_core.SurfaceHeightPairScore___str__(self)
10649 
10650  def __repr__(self):
10651  r"""__repr__(SurfaceHeightPairScore self) -> std::string"""
10652  return _IMP_core.SurfaceHeightPairScore___repr__(self)
10653 
10654  @staticmethod
10655  def get_from(o):
10656  return _object_cast_to_SurfaceHeightPairScore(o)
10657 
10658 
10659 # Register SurfaceHeightPairScore in _IMP_core:
10660 _IMP_core.SurfaceHeightPairScore_swigregister(SurfaceHeightPairScore)
10661 class SurfaceDepthPairScore(IMP.PairScore):
10662  r"""Proxy of C++ IMP::core::SurfaceDepthPairScore class."""
10663 
10664  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10665 
10666  def __init__(self, *args):
10667  r"""__init__(SurfaceDepthPairScore self, UnaryFunction uf, std::string name="SurfaceDepthPairScore%1%") -> SurfaceDepthPairScore"""
10668  _IMP_core.SurfaceDepthPairScore_swiginit(self, _IMP_core.new_SurfaceDepthPairScore(*args))
10669 
10670  def do_get_inputs(self, m, pis):
10671  r"""do_get_inputs(SurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10672  return _IMP_core.SurfaceDepthPairScore_do_get_inputs(self, m, pis)
10673 
10674  def get_version_info(self):
10675  r"""get_version_info(SurfaceDepthPairScore self) -> VersionInfo"""
10676  return _IMP_core.SurfaceDepthPairScore_get_version_info(self)
10677  __swig_destroy__ = _IMP_core.delete_SurfaceDepthPairScore
10678 
10679  def __str__(self):
10680  r"""__str__(SurfaceDepthPairScore self) -> std::string"""
10681  return _IMP_core.SurfaceDepthPairScore___str__(self)
10682 
10683  def __repr__(self):
10684  r"""__repr__(SurfaceDepthPairScore self) -> std::string"""
10685  return _IMP_core.SurfaceDepthPairScore___repr__(self)
10686 
10687  @staticmethod
10688  def get_from(o):
10689  return _object_cast_to_SurfaceDepthPairScore(o)
10690 
10691 
10692 # Register SurfaceDepthPairScore in _IMP_core:
10693 _IMP_core.SurfaceDepthPairScore_swigregister(SurfaceDepthPairScore)
10694 class HarmonicSurfaceDistancePairScore(IMP.PairScore):
10695  r"""Proxy of C++ IMP::core::HarmonicSurfaceDistancePairScore class."""
10696 
10697  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10698 
10699  def __init__(self, *args):
10700  r"""__init__(HarmonicSurfaceDistancePairScore self, double x0, double k, std::string name="HarmonicSurfaceDistancePairScore%1%") -> HarmonicSurfaceDistancePairScore"""
10701  _IMP_core.HarmonicSurfaceDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDistancePairScore(*args))
10702 
10703  def do_get_inputs(self, m, pis):
10704  r"""do_get_inputs(HarmonicSurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10705  return _IMP_core.HarmonicSurfaceDistancePairScore_do_get_inputs(self, m, pis)
10706 
10707  def get_version_info(self):
10708  r"""get_version_info(HarmonicSurfaceDistancePairScore self) -> VersionInfo"""
10709  return _IMP_core.HarmonicSurfaceDistancePairScore_get_version_info(self)
10710  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDistancePairScore
10711 
10712  def __str__(self):
10713  r"""__str__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10714  return _IMP_core.HarmonicSurfaceDistancePairScore___str__(self)
10715 
10716  def __repr__(self):
10717  r"""__repr__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10718  return _IMP_core.HarmonicSurfaceDistancePairScore___repr__(self)
10719 
10720  @staticmethod
10721  def get_from(o):
10722  return _object_cast_to_HarmonicSurfaceDistancePairScore(o)
10723 
10724 
10725 # Register HarmonicSurfaceDistancePairScore in _IMP_core:
10726 _IMP_core.HarmonicSurfaceDistancePairScore_swigregister(HarmonicSurfaceDistancePairScore)
10727 class HarmonicSurfaceHeightPairScore(IMP.PairScore):
10728  r"""Proxy of C++ IMP::core::HarmonicSurfaceHeightPairScore class."""
10729 
10730  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10731 
10732  def __init__(self, *args):
10733  r"""__init__(HarmonicSurfaceHeightPairScore self, double x0, double k, std::string name="HarmonicSurfaceHeightPairScore%1%") -> HarmonicSurfaceHeightPairScore"""
10734  _IMP_core.HarmonicSurfaceHeightPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceHeightPairScore(*args))
10735 
10736  def do_get_inputs(self, m, pis):
10737  r"""do_get_inputs(HarmonicSurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10738  return _IMP_core.HarmonicSurfaceHeightPairScore_do_get_inputs(self, m, pis)
10739 
10740  def get_version_info(self):
10741  r"""get_version_info(HarmonicSurfaceHeightPairScore self) -> VersionInfo"""
10742  return _IMP_core.HarmonicSurfaceHeightPairScore_get_version_info(self)
10743  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceHeightPairScore
10744 
10745  def __str__(self):
10746  r"""__str__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10747  return _IMP_core.HarmonicSurfaceHeightPairScore___str__(self)
10748 
10749  def __repr__(self):
10750  r"""__repr__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10751  return _IMP_core.HarmonicSurfaceHeightPairScore___repr__(self)
10752 
10753  @staticmethod
10754  def get_from(o):
10755  return _object_cast_to_HarmonicSurfaceHeightPairScore(o)
10756 
10757 
10758 # Register HarmonicSurfaceHeightPairScore in _IMP_core:
10759 _IMP_core.HarmonicSurfaceHeightPairScore_swigregister(HarmonicSurfaceHeightPairScore)
10760 class HarmonicSurfaceDepthPairScore(IMP.PairScore):
10761  r"""Proxy of C++ IMP::core::HarmonicSurfaceDepthPairScore class."""
10762 
10763  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10764 
10765  def __init__(self, *args):
10766  r"""__init__(HarmonicSurfaceDepthPairScore self, double x0, double k, std::string name="HarmonicSurfaceDepthPairScore%1%") -> HarmonicSurfaceDepthPairScore"""
10767  _IMP_core.HarmonicSurfaceDepthPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDepthPairScore(*args))
10768 
10769  def do_get_inputs(self, m, pis):
10770  r"""do_get_inputs(HarmonicSurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10771  return _IMP_core.HarmonicSurfaceDepthPairScore_do_get_inputs(self, m, pis)
10772 
10773  def get_version_info(self):
10774  r"""get_version_info(HarmonicSurfaceDepthPairScore self) -> VersionInfo"""
10775  return _IMP_core.HarmonicSurfaceDepthPairScore_get_version_info(self)
10776  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDepthPairScore
10777 
10778  def __str__(self):
10779  r"""__str__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10780  return _IMP_core.HarmonicSurfaceDepthPairScore___str__(self)
10781 
10782  def __repr__(self):
10783  r"""__repr__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10784  return _IMP_core.HarmonicSurfaceDepthPairScore___repr__(self)
10785 
10786  @staticmethod
10787  def get_from(o):
10788  return _object_cast_to_HarmonicSurfaceDepthPairScore(o)
10789 
10790 
10791 # Register HarmonicSurfaceDepthPairScore in _IMP_core:
10792 _IMP_core.HarmonicSurfaceDepthPairScore_swigregister(HarmonicSurfaceDepthPairScore)
10793 class SoftSuperSurfacePairScore(IMP.PairScore):
10794  r"""Proxy of C++ IMP::core::SoftSuperSurfacePairScore class."""
10795 
10796  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10797 
10798  def __init__(self, *args):
10799  r"""__init__(SoftSuperSurfacePairScore self, double k, std::string name="SoftSuperSurfacePairScore%1%") -> SoftSuperSurfacePairScore"""
10800  _IMP_core.SoftSuperSurfacePairScore_swiginit(self, _IMP_core.new_SoftSuperSurfacePairScore(*args))
10801 
10802  def do_get_inputs(self, m, pis):
10803  r"""do_get_inputs(SoftSuperSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10804  return _IMP_core.SoftSuperSurfacePairScore_do_get_inputs(self, m, pis)
10805 
10806  def get_version_info(self):
10807  r"""get_version_info(SoftSuperSurfacePairScore self) -> VersionInfo"""
10808  return _IMP_core.SoftSuperSurfacePairScore_get_version_info(self)
10809  __swig_destroy__ = _IMP_core.delete_SoftSuperSurfacePairScore
10810 
10811  def __str__(self):
10812  r"""__str__(SoftSuperSurfacePairScore self) -> std::string"""
10813  return _IMP_core.SoftSuperSurfacePairScore___str__(self)
10814 
10815  def __repr__(self):
10816  r"""__repr__(SoftSuperSurfacePairScore self) -> std::string"""
10817  return _IMP_core.SoftSuperSurfacePairScore___repr__(self)
10818 
10819  @staticmethod
10820  def get_from(o):
10821  return _object_cast_to_SoftSuperSurfacePairScore(o)
10822 
10823 
10824 # Register SoftSuperSurfacePairScore in _IMP_core:
10825 _IMP_core.SoftSuperSurfacePairScore_swigregister(SoftSuperSurfacePairScore)
10826 class SoftSubSurfacePairScore(IMP.PairScore):
10827  r"""Proxy of C++ IMP::core::SoftSubSurfacePairScore class."""
10828 
10829  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10830 
10831  def __init__(self, *args):
10832  r"""__init__(SoftSubSurfacePairScore self, double k, std::string name="SoftSubSurfacePairScore%1%") -> SoftSubSurfacePairScore"""
10833  _IMP_core.SoftSubSurfacePairScore_swiginit(self, _IMP_core.new_SoftSubSurfacePairScore(*args))
10834 
10835  def do_get_inputs(self, m, pis):
10836  r"""do_get_inputs(SoftSubSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10837  return _IMP_core.SoftSubSurfacePairScore_do_get_inputs(self, m, pis)
10838 
10839  def get_version_info(self):
10840  r"""get_version_info(SoftSubSurfacePairScore self) -> VersionInfo"""
10841  return _IMP_core.SoftSubSurfacePairScore_get_version_info(self)
10842  __swig_destroy__ = _IMP_core.delete_SoftSubSurfacePairScore
10843 
10844  def __str__(self):
10845  r"""__str__(SoftSubSurfacePairScore self) -> std::string"""
10846  return _IMP_core.SoftSubSurfacePairScore___str__(self)
10847 
10848  def __repr__(self):
10849  r"""__repr__(SoftSubSurfacePairScore self) -> std::string"""
10850  return _IMP_core.SoftSubSurfacePairScore___repr__(self)
10851 
10852  @staticmethod
10853  def get_from(o):
10854  return _object_cast_to_SoftSubSurfacePairScore(o)
10855 
10856 
10857 # Register SoftSubSurfacePairScore in _IMP_core:
10858 _IMP_core.SoftSubSurfacePairScore_swigregister(SoftSubSurfacePairScore)
10859 class SurfaceTetheredChain(IMP.UnaryFunction):
10860  r"""Proxy of C++ IMP::core::SurfaceTetheredChain class."""
10861 
10862  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10863 
10864  def __init__(self, link_num, link_length):
10865  r"""__init__(SurfaceTetheredChain self, int link_num, double link_length) -> SurfaceTetheredChain"""
10866  _IMP_core.SurfaceTetheredChain_swiginit(self, _IMP_core.new_SurfaceTetheredChain(link_num, link_length))
10867 
10868  def get_version_info(self):
10869  r"""get_version_info(SurfaceTetheredChain self) -> VersionInfo"""
10870  return _IMP_core.SurfaceTetheredChain_get_version_info(self)
10871  __swig_destroy__ = _IMP_core.delete_SurfaceTetheredChain
10872 
10873  def get_link_number(self):
10874  r"""get_link_number(SurfaceTetheredChain self) -> int"""
10875  return _IMP_core.SurfaceTetheredChain_get_link_number(self)
10876 
10877  def get_link_length(self):
10878  r"""get_link_length(SurfaceTetheredChain self) -> double"""
10879  return _IMP_core.SurfaceTetheredChain_get_link_length(self)
10880 
10881  def set_link_number(self, N):
10882  r"""set_link_number(SurfaceTetheredChain self, int N)"""
10883  return _IMP_core.SurfaceTetheredChain_set_link_number(self, N)
10884 
10885  def set_link_length(self, b):
10886  r"""set_link_length(SurfaceTetheredChain self, double b)"""
10887  return _IMP_core.SurfaceTetheredChain_set_link_length(self, b)
10888 
10889  def get_distance_at_minimum(self):
10890  r"""get_distance_at_minimum(SurfaceTetheredChain self) -> double"""
10891  return _IMP_core.SurfaceTetheredChain_get_distance_at_minimum(self)
10892 
10893  def get_average_distance(self):
10894  r"""get_average_distance(SurfaceTetheredChain self) -> double"""
10895  return _IMP_core.SurfaceTetheredChain_get_average_distance(self)
10896 
10897  def __str__(self):
10898  r"""__str__(SurfaceTetheredChain self) -> std::string"""
10899  return _IMP_core.SurfaceTetheredChain___str__(self)
10900 
10901  def __repr__(self):
10902  r"""__repr__(SurfaceTetheredChain self) -> std::string"""
10903  return _IMP_core.SurfaceTetheredChain___repr__(self)
10904 
10905  @staticmethod
10906  def get_from(o):
10907  return _object_cast_to_SurfaceTetheredChain(o)
10908 
10909 
10910 # Register SurfaceTetheredChain in _IMP_core:
10911 _IMP_core.SurfaceTetheredChain_swigregister(SurfaceTetheredChain)
10912 class SurfaceSymmetryConstraint(IMP.Constraint):
10913  r"""Proxy of C++ IMP::core::SurfaceSymmetryConstraint class."""
10914 
10915  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10916 
10917  def __init__(self, m, ss, rbs):
10918  r"""__init__(SurfaceSymmetryConstraint self, Model m, IMP::ParticleIndexPair const & ss, IMP::ParticleIndexPair const & rbs) -> SurfaceSymmetryConstraint"""
10919  _IMP_core.SurfaceSymmetryConstraint_swiginit(self, _IMP_core.new_SurfaceSymmetryConstraint(m, ss, rbs))
10920 
10921  def do_get_inputs(self):
10922  r"""do_get_inputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
10923  return _IMP_core.SurfaceSymmetryConstraint_do_get_inputs(self)
10924 
10925  def do_get_outputs(self):
10926  r"""do_get_outputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
10927  return _IMP_core.SurfaceSymmetryConstraint_do_get_outputs(self)
10928 
10929  def get_version_info(self):
10930  r"""get_version_info(SurfaceSymmetryConstraint self) -> VersionInfo"""
10931  return _IMP_core.SurfaceSymmetryConstraint_get_version_info(self)
10932  __swig_destroy__ = _IMP_core.delete_SurfaceSymmetryConstraint
10933 
10934  def __str__(self):
10935  r"""__str__(SurfaceSymmetryConstraint self) -> std::string"""
10936  return _IMP_core.SurfaceSymmetryConstraint___str__(self)
10937 
10938  def __repr__(self):
10939  r"""__repr__(SurfaceSymmetryConstraint self) -> std::string"""
10940  return _IMP_core.SurfaceSymmetryConstraint___repr__(self)
10941 
10942  @staticmethod
10943  def get_from(o):
10944  return _object_cast_to_SurfaceSymmetryConstraint(o)
10945 
10946 
10947 # Register SurfaceSymmetryConstraint in _IMP_core:
10948 _IMP_core.SurfaceSymmetryConstraint_swigregister(SurfaceSymmetryConstraint)
10949 class SteepestDescent(IMP.AttributeOptimizer):
10950  r"""Proxy of C++ IMP::core::SteepestDescent class."""
10951 
10952  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10953 
10954  def __init__(self, *args):
10955  r"""__init__(SteepestDescent self, Model m, std::string name="SteepestDescent%1%") -> SteepestDescent"""
10956  _IMP_core.SteepestDescent_swiginit(self, _IMP_core.new_SteepestDescent(*args))
10957 
10958  def do_optimize(self, max_steps):
10959  r"""do_optimize(SteepestDescent self, unsigned int max_steps) -> IMP::Float"""
10960  return _IMP_core.SteepestDescent_do_optimize(self, max_steps)
10961 
10962  def get_version_info(self):
10963  r"""get_version_info(SteepestDescent self) -> VersionInfo"""
10964  return _IMP_core.SteepestDescent_get_version_info(self)
10965  __swig_destroy__ = _IMP_core.delete_SteepestDescent
10966 
10967  def set_threshold(self, t):
10968  r"""set_threshold(SteepestDescent self, IMP::Float t)"""
10969  return _IMP_core.SteepestDescent_set_threshold(self, t)
10970 
10971  def set_step_size(self, t):
10972  r"""set_step_size(SteepestDescent self, IMP::Float t)"""
10973  return _IMP_core.SteepestDescent_set_step_size(self, t)
10974 
10975  def set_maximum_step_size(self, t):
10976  r"""set_maximum_step_size(SteepestDescent self, IMP::Float t)"""
10977  return _IMP_core.SteepestDescent_set_maximum_step_size(self, t)
10978 
10979  def __str__(self):
10980  r"""__str__(SteepestDescent self) -> std::string"""
10981  return _IMP_core.SteepestDescent___str__(self)
10982 
10983  def __repr__(self):
10984  r"""__repr__(SteepestDescent self) -> std::string"""
10985  return _IMP_core.SteepestDescent___repr__(self)
10986 
10987  @staticmethod
10988  def get_from(o):
10989  return _object_cast_to_SteepestDescent(o)
10990 
10991 
10992 # Register SteepestDescent in _IMP_core:
10993 _IMP_core.SteepestDescent_swigregister(SteepestDescent)
10994 class TransformedDistancePairScore(IMP.PairScore):
10995  r"""Proxy of C++ IMP::core::TransformedDistancePairScore class."""
10996 
10997  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10998 
10999  def __init__(self, f, transformation):
11000  r"""__init__(TransformedDistancePairScore self, UnaryFunction f, Transformation3D transformation) -> TransformedDistancePairScore"""
11001  _IMP_core.TransformedDistancePairScore_swiginit(self, _IMP_core.new_TransformedDistancePairScore(f, transformation))
11002 
11003  def set_transformation(self, rot):
11004  r"""set_transformation(TransformedDistancePairScore self, Transformation3D rot)"""
11005  return _IMP_core.TransformedDistancePairScore_set_transformation(self, rot)
11006 
11007  def do_get_inputs(self, m, pis):
11008  r"""do_get_inputs(TransformedDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11009  return _IMP_core.TransformedDistancePairScore_do_get_inputs(self, m, pis)
11010 
11011  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11012  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"""
11013  return _IMP_core.TransformedDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11014 
11015  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11016  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"""
11017  return _IMP_core.TransformedDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11018 
11019  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11020  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"""
11021  return _IMP_core.TransformedDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11022 
11023  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11024  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"""
11025  return _IMP_core.TransformedDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11026 
11027  def get_version_info(self):
11028  r"""get_version_info(TransformedDistancePairScore self) -> VersionInfo"""
11029  return _IMP_core.TransformedDistancePairScore_get_version_info(self)
11030  __swig_destroy__ = _IMP_core.delete_TransformedDistancePairScore
11031 
11032  def __str__(self):
11033  r"""__str__(TransformedDistancePairScore self) -> std::string"""
11034  return _IMP_core.TransformedDistancePairScore___str__(self)
11035 
11036  def __repr__(self):
11037  r"""__repr__(TransformedDistancePairScore self) -> std::string"""
11038  return _IMP_core.TransformedDistancePairScore___repr__(self)
11039 
11040  @staticmethod
11041  def get_from(o):
11042  return _object_cast_to_TransformedDistancePairScore(o)
11043 
11044 
11045 # Register TransformedDistancePairScore in _IMP_core:
11046 _IMP_core.TransformedDistancePairScore_swigregister(TransformedDistancePairScore)
11047 class TypedPairScore(IMP.PairScore):
11048  r"""Proxy of C++ IMP::core::TypedPairScore class."""
11049 
11050  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11051 
11052  def __init__(self, typekey, allow_invalid_types=True):
11053  r"""__init__(TypedPairScore self, IntKey typekey, bool allow_invalid_types=True) -> TypedPairScore"""
11054  _IMP_core.TypedPairScore_swiginit(self, _IMP_core.new_TypedPairScore(typekey, allow_invalid_types))
11055 
11056  def set_particle_type(self, arg2):
11057  r"""set_particle_type(TypedPairScore self, Particle arg2)"""
11058  return _IMP_core.TypedPairScore_set_particle_type(self, arg2)
11059 
11060  def set_pair_score(self, ps, atype, btype):
11061  r"""set_pair_score(TypedPairScore self, PairScore ps, IMP::Int atype, IMP::Int btype)"""
11062  return _IMP_core.TypedPairScore_set_pair_score(self, ps, atype, btype)
11063 
11064  def do_get_inputs(self, m, pis):
11065  r"""do_get_inputs(TypedPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11066  return _IMP_core.TypedPairScore_do_get_inputs(self, m, pis)
11067 
11068  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11069  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"""
11070  return _IMP_core.TypedPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11071 
11072  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11073  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"""
11074  return _IMP_core.TypedPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11075 
11076  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11077  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"""
11078  return _IMP_core.TypedPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11079 
11080  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11081  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"""
11082  return _IMP_core.TypedPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11083 
11084  def get_version_info(self):
11085  r"""get_version_info(TypedPairScore self) -> VersionInfo"""
11086  return _IMP_core.TypedPairScore_get_version_info(self)
11087  __swig_destroy__ = _IMP_core.delete_TypedPairScore
11088 
11089  def __str__(self):
11090  r"""__str__(TypedPairScore self) -> std::string"""
11091  return _IMP_core.TypedPairScore___str__(self)
11092 
11093  def __repr__(self):
11094  r"""__repr__(TypedPairScore self) -> std::string"""
11095  return _IMP_core.TypedPairScore___repr__(self)
11096 
11097  @staticmethod
11098  def get_from(o):
11099  return _object_cast_to_TypedPairScore(o)
11100 
11101 
11102 # Register TypedPairScore in _IMP_core:
11103 _IMP_core.TypedPairScore_swigregister(TypedPairScore)
11104 class RigidBodyDistancePairScore(KClosePairsPairScore):
11105  r"""Proxy of C++ IMP::core::RigidBodyDistancePairScore class."""
11106 
11107  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11108 
11109  def __init__(self, ps, r):
11110  r"""__init__(RigidBodyDistancePairScore self, PairScore ps, Refiner r) -> RigidBodyDistancePairScore"""
11111  _IMP_core.RigidBodyDistancePairScore_swiginit(self, _IMP_core.new_RigidBodyDistancePairScore(ps, r))
11112 
11113  def __str__(self):
11114  r"""__str__(RigidBodyDistancePairScore self) -> std::string"""
11115  return _IMP_core.RigidBodyDistancePairScore___str__(self)
11116 
11117  def __repr__(self):
11118  r"""__repr__(RigidBodyDistancePairScore self) -> std::string"""
11119  return _IMP_core.RigidBodyDistancePairScore___repr__(self)
11120 
11121  @staticmethod
11122  def get_from(o):
11123  return _object_cast_to_RigidBodyDistancePairScore(o)
11124 
11125  __swig_destroy__ = _IMP_core.delete_RigidBodyDistancePairScore
11126 
11127 # Register RigidBodyDistancePairScore in _IMP_core:
11128 _IMP_core.RigidBodyDistancePairScore_swigregister(RigidBodyDistancePairScore)
11129 class RigidBodyAnglePairScore(IMP.PairScore):
11130  r"""Proxy of C++ IMP::core::RigidBodyAnglePairScore class."""
11131 
11132  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11133 
11134  def __init__(self, f):
11135  r"""__init__(RigidBodyAnglePairScore self, UnaryFunction f) -> RigidBodyAnglePairScore"""
11136  _IMP_core.RigidBodyAnglePairScore_swiginit(self, _IMP_core.new_RigidBodyAnglePairScore(f))
11137 
11138  def do_get_inputs(self, m, pis):
11139  r"""do_get_inputs(RigidBodyAnglePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11140  return _IMP_core.RigidBodyAnglePairScore_do_get_inputs(self, m, pis)
11141 
11142  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11143  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"""
11144  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11145 
11146  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11147  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"""
11148  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11149 
11150  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11151  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"""
11152  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11153 
11154  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11155  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"""
11156  return _IMP_core.RigidBodyAnglePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11157 
11158  def get_version_info(self):
11159  r"""get_version_info(RigidBodyAnglePairScore self) -> VersionInfo"""
11160  return _IMP_core.RigidBodyAnglePairScore_get_version_info(self)
11161  __swig_destroy__ = _IMP_core.delete_RigidBodyAnglePairScore
11162 
11163  def __str__(self):
11164  r"""__str__(RigidBodyAnglePairScore self) -> std::string"""
11165  return _IMP_core.RigidBodyAnglePairScore___str__(self)
11166 
11167  def __repr__(self):
11168  r"""__repr__(RigidBodyAnglePairScore self) -> std::string"""
11169  return _IMP_core.RigidBodyAnglePairScore___repr__(self)
11170 
11171  @staticmethod
11172  def get_from(o):
11173  return _object_cast_to_RigidBodyAnglePairScore(o)
11174 
11175 
11176 # Register RigidBodyAnglePairScore in _IMP_core:
11177 _IMP_core.RigidBodyAnglePairScore_swigregister(RigidBodyAnglePairScore)
11178 class TableRefiner(IMP.Refiner):
11179  r"""Proxy of C++ IMP::core::TableRefiner class."""
11180 
11181  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11182 
11183  def __init__(self):
11184  r"""__init__(TableRefiner self) -> TableRefiner"""
11185  _IMP_core.TableRefiner_swiginit(self, _IMP_core.new_TableRefiner())
11186 
11187  def add_particle(self, p, ps):
11188  r"""add_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11189  return _IMP_core.TableRefiner_add_particle(self, p, ps)
11190 
11191  def remove_particle(self, p):
11192  r"""remove_particle(TableRefiner self, Particle p)"""
11193  return _IMP_core.TableRefiner_remove_particle(self, p)
11194 
11195  def set_particle(self, p, ps):
11196  r"""set_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11197  return _IMP_core.TableRefiner_set_particle(self, p, ps)
11198 
11199  def do_get_inputs(self, m, pis):
11200  r"""do_get_inputs(TableRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11201  return _IMP_core.TableRefiner_do_get_inputs(self, m, pis)
11202 
11203  def get_version_info(self):
11204  r"""get_version_info(TableRefiner self) -> VersionInfo"""
11205  return _IMP_core.TableRefiner_get_version_info(self)
11206  __swig_destroy__ = _IMP_core.delete_TableRefiner
11207 
11208  def __str__(self):
11209  r"""__str__(TableRefiner self) -> std::string"""
11210  return _IMP_core.TableRefiner___str__(self)
11211 
11212  def __repr__(self):
11213  r"""__repr__(TableRefiner self) -> std::string"""
11214  return _IMP_core.TableRefiner___repr__(self)
11215 
11216  @staticmethod
11217  def get_from(o):
11218  return _object_cast_to_TableRefiner(o)
11219 
11220 
11221 # Register TableRefiner in _IMP_core:
11222 _IMP_core.TableRefiner_swigregister(TableRefiner)
11223 LOWER = _IMP_core.LOWER
11224 
11225 BOTH = _IMP_core.BOTH
11226 
11227 UPPER = _IMP_core.UPPER
11228 
11229 class MCCGSampler(IMP.Sampler):
11230  r"""Proxy of C++ IMP::core::MCCGSampler class."""
11231 
11232  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11233 
11234  def __init__(self, *args):
11235  r"""__init__(MCCGSampler self, Model m, std::string name="MCCG Sampler %1%") -> MCCGSampler"""
11236  _IMP_core.MCCGSampler_swiginit(self, _IMP_core.new_MCCGSampler(*args))
11237 
11238  def set_bounding_box(self, bb):
11239  r"""set_bounding_box(MCCGSampler self, BoundingBox3D bb)"""
11240  return _IMP_core.MCCGSampler_set_bounding_box(self, bb)
11241 
11242  def set_number_of_attempts(self, att):
11243  r"""set_number_of_attempts(MCCGSampler self, unsigned int att)"""
11244  return _IMP_core.MCCGSampler_set_number_of_attempts(self, att)
11245 
11246  def set_number_of_monte_carlo_steps(self, cg):
11247  r"""set_number_of_monte_carlo_steps(MCCGSampler self, unsigned int cg)"""
11248  return _IMP_core.MCCGSampler_set_number_of_monte_carlo_steps(self, cg)
11249 
11250  def set_number_of_conjugate_gradient_steps(self, cg):
11251  r"""set_number_of_conjugate_gradient_steps(MCCGSampler self, unsigned int cg)"""
11252  return _IMP_core.MCCGSampler_set_number_of_conjugate_gradient_steps(self, cg)
11253 
11254  def set_max_monte_carlo_step_size(self, *args):
11255  r"""
11256  set_max_monte_carlo_step_size(MCCGSampler self, double d)
11257  set_max_monte_carlo_step_size(MCCGSampler self, FloatKey k, double d)
11258  """
11259  return _IMP_core.MCCGSampler_set_max_monte_carlo_step_size(self, *args)
11260 
11261  def set_is_refining(self, tf):
11262  r"""set_is_refining(MCCGSampler self, bool tf)"""
11263  return _IMP_core.MCCGSampler_set_is_refining(self, tf)
11264 
11265  def set_local_optimizer(self, opt):
11266  r"""set_local_optimizer(MCCGSampler self, Optimizer opt)"""
11267  return _IMP_core.MCCGSampler_set_local_optimizer(self, opt)
11268 
11269  def set_save_rejected_configurations(self, tf):
11270  r"""set_save_rejected_configurations(MCCGSampler self, bool tf)"""
11271  return _IMP_core.MCCGSampler_set_save_rejected_configurations(self, tf)
11272 
11273  def get_rejected_configurations(self):
11274  r"""get_rejected_configurations(MCCGSampler self) -> ConfigurationSet"""
11275  return _IMP_core.MCCGSampler_get_rejected_configurations(self)
11276  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)
11277  def __set_optimizer_states(self, obj): IMP._list_util.set_varlist(self.optimizer_states, obj)
11278  def __del_optimizer_states(self): IMP._list_util.del_varlist(self.optimizer_states)
11279  optimizer_states = property(__get_optimizer_states, __set_optimizer_states, __del_optimizer_states, doc="List of ##ucnames")
11280 
11281  def remove_optimizer_state(self, d):
11282  r"""remove_optimizer_state(MCCGSampler self, OptimizerState d)"""
11283  return _IMP_core.MCCGSampler_remove_optimizer_state(self, d)
11284 
11285  def _python_index_optimizer_state(self, d, start, stop):
11286  r"""_python_index_optimizer_state(MCCGSampler self, OptimizerState d, unsigned int start, unsigned int stop) -> unsigned int"""
11287  return _IMP_core.MCCGSampler__python_index_optimizer_state(self, d, start, stop)
11288 
11289  def remove_optimizer_states(self, d):
11290  r"""remove_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & d)"""
11291  return _IMP_core.MCCGSampler_remove_optimizer_states(self, d)
11292 
11293  def set_optimizer_states(self, ps):
11294  r"""set_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & ps)"""
11295  return _IMP_core.MCCGSampler_set_optimizer_states(self, ps)
11296 
11297  def set_optimizer_states_order(self, objs):
11298  r"""set_optimizer_states_order(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11299  return _IMP_core.MCCGSampler_set_optimizer_states_order(self, objs)
11300 
11301  def add_optimizer_state(self, obj):
11302  r"""add_optimizer_state(MCCGSampler self, OptimizerState obj) -> unsigned int"""
11303  return _IMP_core.MCCGSampler_add_optimizer_state(self, obj)
11304 
11305  def add_optimizer_states(self, objs):
11306  r"""add_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11307  return _IMP_core.MCCGSampler_add_optimizer_states(self, objs)
11308 
11309  def clear_optimizer_states(self):
11310  r"""clear_optimizer_states(MCCGSampler self)"""
11311  return _IMP_core.MCCGSampler_clear_optimizer_states(self)
11312 
11313  def get_number_of_optimizer_states(self):
11314  r"""get_number_of_optimizer_states(MCCGSampler self) -> unsigned int"""
11315  return _IMP_core.MCCGSampler_get_number_of_optimizer_states(self)
11316 
11317  def get_has_optimizer_states(self):
11318  r"""get_has_optimizer_states(MCCGSampler self) -> bool"""
11319  return _IMP_core.MCCGSampler_get_has_optimizer_states(self)
11320 
11321  def get_optimizer_state(self, i):
11322  r"""get_optimizer_state(MCCGSampler self, unsigned int i) -> OptimizerState"""
11323  return _IMP_core.MCCGSampler_get_optimizer_state(self, i)
11324 
11325  def get_optimizer_states(self):
11326  r"""get_optimizer_states(MCCGSampler self) -> IMP::OptimizerStates"""
11327  return _IMP_core.MCCGSampler_get_optimizer_states(self)
11328 
11329  def erase_optimizer_state(self, i):
11330  r"""erase_optimizer_state(MCCGSampler self, unsigned int i)"""
11331  return _IMP_core.MCCGSampler_erase_optimizer_state(self, i)
11332 
11333  def reserve_optimizer_states(self, sz):
11334  r"""reserve_optimizer_states(MCCGSampler self, unsigned int sz)"""
11335  return _IMP_core.MCCGSampler_reserve_optimizer_states(self, sz)
11336 
11337  def do_sample(self):
11338  r"""do_sample(MCCGSampler self) -> ConfigurationSet"""
11339  return _IMP_core.MCCGSampler_do_sample(self)
11340 
11341  def get_version_info(self):
11342  r"""get_version_info(MCCGSampler self) -> VersionInfo"""
11343  return _IMP_core.MCCGSampler_get_version_info(self)
11344  __swig_destroy__ = _IMP_core.delete_MCCGSampler
11345 
11346  def __str__(self):
11347  r"""__str__(MCCGSampler self) -> std::string"""
11348  return _IMP_core.MCCGSampler___str__(self)
11349 
11350  def __repr__(self):
11351  r"""__repr__(MCCGSampler self) -> std::string"""
11352  return _IMP_core.MCCGSampler___repr__(self)
11353 
11354  @staticmethod
11355  def get_from(o):
11356  return _object_cast_to_MCCGSampler(o)
11357 
11358 
11359 # Register MCCGSampler in _IMP_core:
11360 _IMP_core.MCCGSampler_swigregister(MCCGSampler)
11361 class MinimumRestraint(IMP.Restraint):
11362  r"""Proxy of C++ IMP::core::MinimumRestraint class."""
11363 
11364  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11365 
11366  def __init__(self, *args):
11367  r"""__init__(MinimumRestraint self, unsigned int num, IMP::Restraints const & rs=IMP::Restraints(), std::string name="MinimumRestraint %1%") -> MinimumRestraint"""
11368  _IMP_core.MinimumRestraint_swiginit(self, _IMP_core.new_MinimumRestraint(*args))
11369 
11370  def do_get_inputs(self):
11371  r"""do_get_inputs(MinimumRestraint self) -> IMP::ModelObjectsTemp"""
11372  return _IMP_core.MinimumRestraint_do_get_inputs(self)
11373 
11374  def get_version_info(self):
11375  r"""get_version_info(MinimumRestraint self) -> VersionInfo"""
11376  return _IMP_core.MinimumRestraint_get_version_info(self)
11377  __swig_destroy__ = _IMP_core.delete_MinimumRestraint
11378  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)
11379  def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
11380  def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
11381  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##ucnames")
11382 
11383  def remove_restraint(self, d):
11384  r"""remove_restraint(MinimumRestraint self, Restraint d)"""
11385  return _IMP_core.MinimumRestraint_remove_restraint(self, d)
11386 
11387  def _python_index_restraint(self, d, start, stop):
11388  r"""_python_index_restraint(MinimumRestraint self, Restraint d, unsigned int start, unsigned int stop) -> unsigned int"""
11389  return _IMP_core.MinimumRestraint__python_index_restraint(self, d, start, stop)
11390 
11391  def remove_restraints(self, d):
11392  r"""remove_restraints(MinimumRestraint self, IMP::Restraints const & d)"""
11393  return _IMP_core.MinimumRestraint_remove_restraints(self, d)
11394 
11395  def set_restraints(self, ps):
11396  r"""set_restraints(MinimumRestraint self, IMP::Restraints const & ps)"""
11397  return _IMP_core.MinimumRestraint_set_restraints(self, ps)
11398 
11399  def set_restraints_order(self, objs):
11400  r"""set_restraints_order(MinimumRestraint self, IMP::Restraints const & objs)"""
11401  return _IMP_core.MinimumRestraint_set_restraints_order(self, objs)
11402 
11403  def add_restraint(self, obj):
11404  r"""add_restraint(MinimumRestraint self, Restraint obj) -> unsigned int"""
11405  return _IMP_core.MinimumRestraint_add_restraint(self, obj)
11406 
11407  def add_restraints(self, objs):
11408  r"""add_restraints(MinimumRestraint self, IMP::Restraints const & objs)"""
11409  return _IMP_core.MinimumRestraint_add_restraints(self, objs)
11410 
11411  def clear_restraints(self):
11412  r"""clear_restraints(MinimumRestraint self)"""
11413  return _IMP_core.MinimumRestraint_clear_restraints(self)
11414 
11415  def get_number_of_restraints(self):
11416  r"""get_number_of_restraints(MinimumRestraint self) -> unsigned int"""
11417  return _IMP_core.MinimumRestraint_get_number_of_restraints(self)
11418 
11419  def get_has_restraints(self):
11420  r"""get_has_restraints(MinimumRestraint self) -> bool"""
11421  return _IMP_core.MinimumRestraint_get_has_restraints(self)
11422 
11423  def get_restraint(self, i):
11424  r"""get_restraint(MinimumRestraint self, unsigned int i) -> Restraint"""
11425  return _IMP_core.MinimumRestraint_get_restraint(self, i)
11426 
11427  def get_restraints(self):
11428  r"""get_restraints(MinimumRestraint self) -> IMP::Restraints"""
11429  return _IMP_core.MinimumRestraint_get_restraints(self)
11430 
11431  def erase_restraint(self, i):
11432  r"""erase_restraint(MinimumRestraint self, unsigned int i)"""
11433  return _IMP_core.MinimumRestraint_erase_restraint(self, i)
11434 
11435  def reserve_restraints(self, sz):
11436  r"""reserve_restraints(MinimumRestraint self, unsigned int sz)"""
11437  return _IMP_core.MinimumRestraint_reserve_restraints(self, sz)
11438 
11439  def __str__(self):
11440  r"""__str__(MinimumRestraint self) -> std::string"""
11441  return _IMP_core.MinimumRestraint___str__(self)
11442 
11443  def __repr__(self):
11444  r"""__repr__(MinimumRestraint self) -> std::string"""
11445  return _IMP_core.MinimumRestraint___repr__(self)
11446 
11447  @staticmethod
11448  def get_from(o):
11449  return _object_cast_to_MinimumRestraint(o)
11450 
11451 
11452 # Register MinimumRestraint in _IMP_core:
11453 _IMP_core.MinimumRestraint_swigregister(MinimumRestraint)
11454 class Gaussian(RigidBody):
11455  r"""Proxy of C++ IMP::core::Gaussian class."""
11456 
11457  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11458 
11459  def __init__(self, *args):
11460  r"""
11461  __init__(Gaussian self) -> Gaussian
11462  __init__(Gaussian self, Model m, ParticleIndex id) -> Gaussian
11463  __init__(Gaussian self, _ParticleAdaptor d) -> Gaussian
11464  """
11465  _IMP_core.Gaussian_swiginit(self, _IMP_core.new_Gaussian(*args))
11466 
11467  def show(self, *args):
11468  r"""show(Gaussian self, _ostream out=std::cout)"""
11469  return _IMP_core.Gaussian_show(self, *args)
11470 
11471  @staticmethod
11472  def setup_particle(*args):
11473  r"""
11474  setup_particle(Model m, ParticleIndex pi) -> Gaussian
11475  setup_particle(_ParticleAdaptor pa) -> Gaussian
11476  setup_particle(Model m, ParticleIndex pi, Gaussian3D g) -> Gaussian
11477  setup_particle(_ParticleAdaptor pa, Gaussian3D g) -> Gaussian
11478  """
11479  return _IMP_core.Gaussian_setup_particle(*args)
11480 
11481  @staticmethod
11482  def get_local_covariance_key():
11483  r"""get_local_covariance_key() -> ObjectKey"""
11484  return _IMP_core.Gaussian_get_local_covariance_key()
11485 
11486  @staticmethod
11487  def get_global_covariance_key():
11488  r"""get_global_covariance_key() -> ObjectKey"""
11489  return _IMP_core.Gaussian_get_global_covariance_key()
11490 
11491  @staticmethod
11492  def get_is_setup(*args):
11493  r"""
11494  get_is_setup(_ParticleAdaptor p) -> bool
11495  get_is_setup(Model m, ParticleIndex pi) -> bool
11496  """
11497  return _IMP_core.Gaussian_get_is_setup(*args)
11498 
11499  def get_local_covariance(self):
11500  r"""get_local_covariance(Gaussian self) -> Eigen::Matrix3d"""
11501  return _IMP_core.Gaussian_get_local_covariance(self)
11502 
11503  def get_variances(self):
11504  r"""get_variances(Gaussian self) -> Vector3D"""
11505  return _IMP_core.Gaussian_get_variances(self)
11506 
11507  def get_global_covariance(self):
11508  r"""get_global_covariance(Gaussian self) -> Eigen::Matrix3d"""
11509  return _IMP_core.Gaussian_get_global_covariance(self)
11510 
11511  def get_gaussian(self):
11512  r"""get_gaussian(Gaussian self) -> Gaussian3D"""
11513  return _IMP_core.Gaussian_get_gaussian(self)
11514 
11515  def set_gaussian(self, g):
11516  r"""set_gaussian(Gaussian self, Gaussian3D g)"""
11517  return _IMP_core.Gaussian_set_gaussian(self, g)
11518 
11519  def set_local_covariance(self, covar):
11520  r"""set_local_covariance(Gaussian self, Eigen::Vector3d const covar)"""
11521  return _IMP_core.Gaussian_set_local_covariance(self, covar)
11522 
11523  def set_variances(self, v):
11524  r"""set_variances(Gaussian self, Vector3D v)"""
11525  return _IMP_core.Gaussian_set_variances(self, v)
11526 
11527  def set_global_covariance(self, covar):
11528  r"""set_global_covariance(Gaussian self, Eigen::Matrix3d covar)"""
11529  return _IMP_core.Gaussian_set_global_covariance(self, covar)
11530 
11531  def update_global_covariance(self):
11532  r"""update_global_covariance(Gaussian self)"""
11533  return _IMP_core.Gaussian_update_global_covariance(self)
11534 
11535  def add_attribute(self, *args):
11536  r"""
11537  add_attribute(Gaussian self, FloatKey k, IMP::Float v, bool opt)
11538  add_attribute(Gaussian self, FloatKey a0, IMP::Float a1)
11539  add_attribute(Gaussian self, IntKey a0, IMP::Int a1)
11540  add_attribute(Gaussian self, FloatsKey a0, IMP::Floats a1)
11541  add_attribute(Gaussian self, IntsKey a0, IMP::Ints a1)
11542  add_attribute(Gaussian self, StringKey a0, IMP::String a1)
11543  add_attribute(Gaussian self, ParticleIndexKey a0, Particle a1)
11544  add_attribute(Gaussian self, ObjectKey a0, Object a1)
11545  add_attribute(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11546  add_attribute(Gaussian self, SparseIntKey a0, IMP::Int a1)
11547  add_attribute(Gaussian self, SparseStringKey a0, IMP::String a1)
11548  add_attribute(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11549  """
11550  return _IMP_core.Gaussian_add_attribute(self, *args)
11551 
11552  def get_value(self, *args):
11553  r"""
11554  get_value(Gaussian self, FloatKey a0) -> IMP::Float
11555  get_value(Gaussian self, IntKey a0) -> IMP::Int
11556  get_value(Gaussian self, FloatsKey a0) -> IMP::Floats
11557  get_value(Gaussian self, IntsKey a0) -> IMP::Ints
11558  get_value(Gaussian self, StringKey a0) -> IMP::String
11559  get_value(Gaussian self, ParticleIndexKey a0) -> Particle
11560  get_value(Gaussian self, ObjectKey a0) -> Object
11561  get_value(Gaussian self, SparseFloatKey a0) -> IMP::Float
11562  get_value(Gaussian self, SparseIntKey a0) -> IMP::Int
11563  get_value(Gaussian self, SparseStringKey a0) -> IMP::String
11564  get_value(Gaussian self, SparseParticleIndexKey a0) -> ParticleIndex
11565  """
11566  return _IMP_core.Gaussian_get_value(self, *args)
11567 
11568  def set_value(self, *args):
11569  r"""
11570  set_value(Gaussian self, FloatKey a0, IMP::Float a1)
11571  set_value(Gaussian self, IntKey a0, IMP::Int a1)
11572  set_value(Gaussian self, FloatsKey a0, IMP::Floats a1)
11573  set_value(Gaussian self, IntsKey a0, IMP::Ints a1)
11574  set_value(Gaussian self, StringKey a0, IMP::String a1)
11575  set_value(Gaussian self, ParticleIndexKey a0, Particle a1)
11576  set_value(Gaussian self, ObjectKey a0, Object a1)
11577  set_value(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11578  set_value(Gaussian self, SparseIntKey a0, IMP::Int a1)
11579  set_value(Gaussian self, SparseStringKey a0, IMP::String a1)
11580  set_value(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11581  """
11582  return _IMP_core.Gaussian_set_value(self, *args)
11583 
11584  def remove_attribute(self, *args):
11585  r"""
11586  remove_attribute(Gaussian self, FloatKey a0)
11587  remove_attribute(Gaussian self, IntKey a0)
11588  remove_attribute(Gaussian self, FloatsKey a0)
11589  remove_attribute(Gaussian self, IntsKey a0)
11590  remove_attribute(Gaussian self, StringKey a0)
11591  remove_attribute(Gaussian self, ParticleIndexKey a0)
11592  remove_attribute(Gaussian self, ObjectKey a0)
11593  remove_attribute(Gaussian self, SparseFloatKey a0)
11594  remove_attribute(Gaussian self, SparseIntKey a0)
11595  remove_attribute(Gaussian self, SparseStringKey a0)
11596  remove_attribute(Gaussian self, SparseParticleIndexKey a0)
11597  """
11598  return _IMP_core.Gaussian_remove_attribute(self, *args)
11599 
11600  def has_attribute(self, *args):
11601  r"""
11602  has_attribute(Gaussian self, FloatKey a0) -> bool
11603  has_attribute(Gaussian self, IntKey a0) -> bool
11604  has_attribute(Gaussian self, FloatsKey a0) -> bool
11605  has_attribute(Gaussian self, IntsKey a0) -> bool
11606  has_attribute(Gaussian self, StringKey a0) -> bool
11607  has_attribute(Gaussian self, ParticleIndexKey a0) -> bool
11608  has_attribute(Gaussian self, ObjectKey a0) -> bool
11609  has_attribute(Gaussian self, SparseFloatKey a0) -> bool
11610  has_attribute(Gaussian self, SparseIntKey a0) -> bool
11611  has_attribute(Gaussian self, SparseStringKey a0) -> bool
11612  has_attribute(Gaussian self, SparseParticleIndexKey a0) -> bool
11613  """
11614  return _IMP_core.Gaussian_has_attribute(self, *args)
11615 
11616  def get_derivative(self, a0):
11617  r"""get_derivative(Gaussian self, FloatKey a0) -> double"""
11618  return _IMP_core.Gaussian_get_derivative(self, a0)
11619 
11620  def get_name(self):
11621  r"""get_name(Gaussian self) -> std::string"""
11622  return _IMP_core.Gaussian_get_name(self)
11623 
11624  def clear_caches(self):
11625  r"""clear_caches(Gaussian self)"""
11626  return _IMP_core.Gaussian_clear_caches(self)
11627 
11628  def set_name(self, a0):
11629  r"""set_name(Gaussian self, std::string a0)"""
11630  return _IMP_core.Gaussian_set_name(self, a0)
11631 
11632  def set_check_level(self, a0):
11633  r"""set_check_level(Gaussian self, IMP::CheckLevel a0)"""
11634  return _IMP_core.Gaussian_set_check_level(self, a0)
11635 
11636  def add_to_derivative(self, a0, a1, a2):
11637  r"""add_to_derivative(Gaussian self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
11638  return _IMP_core.Gaussian_add_to_derivative(self, a0, a1, a2)
11639 
11640  def set_is_optimized(self, a0, a1):
11641  r"""set_is_optimized(Gaussian self, FloatKey a0, bool a1)"""
11642  return _IMP_core.Gaussian_set_is_optimized(self, a0, a1)
11643 
11644  def get_is_optimized(self, a0):
11645  r"""get_is_optimized(Gaussian self, FloatKey a0) -> bool"""
11646  return _IMP_core.Gaussian_get_is_optimized(self, a0)
11647 
11648  def get_check_level(self):
11649  r"""get_check_level(Gaussian self) -> IMP::CheckLevel"""
11650  return _IMP_core.Gaussian_get_check_level(self)
11651 
11652  def __eq__(self, *args):
11653  r"""
11654  __eq__(Gaussian self, Gaussian o) -> bool
11655  __eq__(Gaussian self, Particle d) -> bool
11656  """
11657  return _IMP_core.Gaussian___eq__(self, *args)
11658 
11659  def __ne__(self, *args):
11660  r"""
11661  __ne__(Gaussian self, Gaussian o) -> bool
11662  __ne__(Gaussian self, Particle d) -> bool
11663  """
11664  return _IMP_core.Gaussian___ne__(self, *args)
11665 
11666  def __le__(self, *args):
11667  r"""
11668  __le__(Gaussian self, Gaussian o) -> bool
11669  __le__(Gaussian self, Particle d) -> bool
11670  """
11671  return _IMP_core.Gaussian___le__(self, *args)
11672 
11673  def __lt__(self, *args):
11674  r"""
11675  __lt__(Gaussian self, Gaussian o) -> bool
11676  __lt__(Gaussian self, Particle d) -> bool
11677  """
11678  return _IMP_core.Gaussian___lt__(self, *args)
11679 
11680  def __ge__(self, *args):
11681  r"""
11682  __ge__(Gaussian self, Gaussian o) -> bool
11683  __ge__(Gaussian self, Particle d) -> bool
11684  """
11685  return _IMP_core.Gaussian___ge__(self, *args)
11686 
11687  def __gt__(self, *args):
11688  r"""
11689  __gt__(Gaussian self, Gaussian o) -> bool
11690  __gt__(Gaussian self, Particle d) -> bool
11691  """
11692  return _IMP_core.Gaussian___gt__(self, *args)
11693 
11694  def __hash__(self):
11695  r"""__hash__(Gaussian self) -> std::size_t"""
11696  return _IMP_core.Gaussian___hash__(self)
11697 
11698  def __str__(self):
11699  r"""__str__(Gaussian self) -> std::string"""
11700  return _IMP_core.Gaussian___str__(self)
11701 
11702  def __repr__(self):
11703  r"""__repr__(Gaussian self) -> std::string"""
11704  return _IMP_core.Gaussian___repr__(self)
11705 
11706  def _get_as_binary(self):
11707  r"""_get_as_binary(Gaussian self) -> PyObject *"""
11708  return _IMP_core.Gaussian__get_as_binary(self)
11709 
11710  def _set_from_binary(self, p):
11711  r"""_set_from_binary(Gaussian self, PyObject * p)"""
11712  return _IMP_core.Gaussian__set_from_binary(self, p)
11713 
11714  def __getstate__(self):
11715  p = self._get_as_binary()
11716  if len(self.__dict__) > 1:
11717  d = self.__dict__.copy()
11718  del d['this']
11719  p = (d, p)
11720  return p
11721 
11722  def __setstate__(self, p):
11723  if not hasattr(self, 'this'):
11724  self.__init__()
11725  if isinstance(p, tuple):
11726  d, p = p
11727  self.__dict__.update(d)
11728  return self._set_from_binary(p)
11729 
11730  __swig_destroy__ = _IMP_core.delete_Gaussian
11731 
11732 # Register Gaussian in _IMP_core:
11733 _IMP_core.Gaussian_swigregister(Gaussian)
11734 class PairRestraint(IMP.Restraint):
11735  r"""Proxy of C++ IMP::core::PairRestraint class."""
11736 
11737  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11738 
11739  def __init__(self, *args):
11740  r"""
11741  __init__(PairRestraint self, Model m, PairScore ss, IMP::ParticleIndexPair const & vt, std::string name="PairRestraint %1%") -> PairRestraint
11742  __init__(PairRestraint self) -> PairRestraint
11743  """
11744  _IMP_core.PairRestraint_swiginit(self, _IMP_core.new_PairRestraint(*args))
11745 
11746  def get_score_object(self):
11747  r"""get_score_object(PairRestraint self) -> PairScore"""
11748  return _IMP_core.PairRestraint_get_score_object(self)
11749 
11750  def get_index(self):
11751  r"""get_index(PairRestraint self) -> IMP::PairScore::IndexArgument"""
11752  return _IMP_core.PairRestraint_get_index(self)
11753 
11754  def get_version_info(self):
11755  r"""get_version_info(PairRestraint self) -> VersionInfo"""
11756  return _IMP_core.PairRestraint_get_version_info(self)
11757  __swig_destroy__ = _IMP_core.delete_PairRestraint
11758 
11759  def __str__(self):
11760  r"""__str__(PairRestraint self) -> std::string"""
11761  return _IMP_core.PairRestraint___str__(self)
11762 
11763  def __repr__(self):
11764  r"""__repr__(PairRestraint self) -> std::string"""
11765  return _IMP_core.PairRestraint___repr__(self)
11766 
11767  @staticmethod
11768  def get_from(o):
11769  return _object_cast_to_PairRestraint(o)
11770 
11771 
11772  def _get_as_binary(self):
11773  r"""_get_as_binary(PairRestraint self) -> PyObject *"""
11774  return _IMP_core.PairRestraint__get_as_binary(self)
11775 
11776  def _set_from_binary(self, p):
11777  r"""_set_from_binary(PairRestraint self, PyObject * p)"""
11778  return _IMP_core.PairRestraint__set_from_binary(self, p)
11779 
11780  def __getstate__(self):
11781  p = self._get_as_binary()
11782  if len(self.__dict__) > 1:
11783  d = self.__dict__.copy()
11784  del d['this']
11785  p = (d, p)
11786  return p
11787 
11788  def __setstate__(self, p):
11789  if not hasattr(self, 'this'):
11790  self.__init__()
11791  if isinstance(p, tuple):
11792  d, p = p
11793  self.__dict__.update(d)
11794  return self._set_from_binary(p)
11795 
11796 
11797  def _get_jax(self, space):
11798  from . import _jax_util
11799  return _jax_util._get_jax_restraint(self, space)
11800 
11801 
11802 # Register PairRestraint in _IMP_core:
11803 _IMP_core.PairRestraint_swigregister(PairRestraint)
11804 class SingletonRestraint(IMP.Restraint):
11805  r"""Proxy of C++ IMP::core::SingletonRestraint class."""
11806 
11807  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11808 
11809  def __init__(self, *args):
11810  r"""
11811  __init__(SingletonRestraint self, Model m, SingletonScore ss, ParticleIndex vt, std::string name="SingletonRestraint %1%") -> SingletonRestraint
11812  __init__(SingletonRestraint self) -> SingletonRestraint
11813  """
11814  _IMP_core.SingletonRestraint_swiginit(self, _IMP_core.new_SingletonRestraint(*args))
11815 
11816  def get_score_object(self):
11817  r"""get_score_object(SingletonRestraint self) -> SingletonScore"""
11818  return _IMP_core.SingletonRestraint_get_score_object(self)
11819 
11820  def get_index(self):
11821  r"""get_index(SingletonRestraint self) -> ParticleIndex"""
11822  return _IMP_core.SingletonRestraint_get_index(self)
11823 
11824  def get_version_info(self):
11825  r"""get_version_info(SingletonRestraint self) -> VersionInfo"""
11826  return _IMP_core.SingletonRestraint_get_version_info(self)
11827  __swig_destroy__ = _IMP_core.delete_SingletonRestraint
11828 
11829  def __str__(self):
11830  r"""__str__(SingletonRestraint self) -> std::string"""
11831  return _IMP_core.SingletonRestraint___str__(self)
11832 
11833  def __repr__(self):
11834  r"""__repr__(SingletonRestraint self) -> std::string"""
11835  return _IMP_core.SingletonRestraint___repr__(self)
11836 
11837  @staticmethod
11838  def get_from(o):
11839  return _object_cast_to_SingletonRestraint(o)
11840 
11841 
11842  def _get_as_binary(self):
11843  r"""_get_as_binary(SingletonRestraint self) -> PyObject *"""
11844  return _IMP_core.SingletonRestraint__get_as_binary(self)
11845 
11846  def _set_from_binary(self, p):
11847  r"""_set_from_binary(SingletonRestraint self, PyObject * p)"""
11848  return _IMP_core.SingletonRestraint__set_from_binary(self, p)
11849 
11850  def __getstate__(self):
11851  p = self._get_as_binary()
11852  if len(self.__dict__) > 1:
11853  d = self.__dict__.copy()
11854  del d['this']
11855  p = (d, p)
11856  return p
11857 
11858  def __setstate__(self, p):
11859  if not hasattr(self, 'this'):
11860  self.__init__()
11861  if isinstance(p, tuple):
11862  d, p = p
11863  self.__dict__.update(d)
11864  return self._set_from_binary(p)
11865 
11866 
11867  def _get_jax(self, space):
11868  from . import _jax_util
11869  return _jax_util._get_jax_restraint(self, space)
11870 
11871 
11872 # Register SingletonRestraint in _IMP_core:
11873 _IMP_core.SingletonRestraint_swigregister(SingletonRestraint)
11874 class TripletRestraint(IMP.Restraint):
11875  r"""Proxy of C++ IMP::core::TripletRestraint class."""
11876 
11877  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11878 
11879  def __init__(self, *args):
11880  r"""
11881  __init__(TripletRestraint self, Model m, TripletScore ss, IMP::ParticleIndexTriplet const & vt, std::string name="TripletRestraint %1%") -> TripletRestraint
11882  __init__(TripletRestraint self) -> TripletRestraint
11883  """
11884  _IMP_core.TripletRestraint_swiginit(self, _IMP_core.new_TripletRestraint(*args))
11885 
11886  def get_score_object(self):
11887  r"""get_score_object(TripletRestraint self) -> TripletScore"""
11888  return _IMP_core.TripletRestraint_get_score_object(self)
11889 
11890  def get_index(self):
11891  r"""get_index(TripletRestraint self) -> IMP::TripletScore::IndexArgument"""
11892  return _IMP_core.TripletRestraint_get_index(self)
11893 
11894  def get_version_info(self):
11895  r"""get_version_info(TripletRestraint self) -> VersionInfo"""
11896  return _IMP_core.TripletRestraint_get_version_info(self)
11897  __swig_destroy__ = _IMP_core.delete_TripletRestraint
11898 
11899  def __str__(self):
11900  r"""__str__(TripletRestraint self) -> std::string"""
11901  return _IMP_core.TripletRestraint___str__(self)
11902 
11903  def __repr__(self):
11904  r"""__repr__(TripletRestraint self) -> std::string"""
11905  return _IMP_core.TripletRestraint___repr__(self)
11906 
11907  @staticmethod
11908  def get_from(o):
11909  return _object_cast_to_TripletRestraint(o)
11910 
11911 
11912  def _get_as_binary(self):
11913  r"""_get_as_binary(TripletRestraint self) -> PyObject *"""
11914  return _IMP_core.TripletRestraint__get_as_binary(self)
11915 
11916  def _set_from_binary(self, p):
11917  r"""_set_from_binary(TripletRestraint self, PyObject * p)"""
11918  return _IMP_core.TripletRestraint__set_from_binary(self, p)
11919 
11920  def __getstate__(self):
11921  p = self._get_as_binary()
11922  if len(self.__dict__) > 1:
11923  d = self.__dict__.copy()
11924  del d['this']
11925  p = (d, p)
11926  return p
11927 
11928  def __setstate__(self, p):
11929  if not hasattr(self, 'this'):
11930  self.__init__()
11931  if isinstance(p, tuple):
11932  d, p = p
11933  self.__dict__.update(d)
11934  return self._set_from_binary(p)
11935 
11936 
11937 # Register TripletRestraint in _IMP_core:
11938 _IMP_core.TripletRestraint_swigregister(TripletRestraint)
11939 class QuadRestraint(IMP.Restraint):
11940  r"""Proxy of C++ IMP::core::QuadRestraint class."""
11941 
11942  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11943 
11944  def __init__(self, *args):
11945  r"""
11946  __init__(QuadRestraint self, Model m, QuadScore ss, IMP::ParticleIndexQuad const & vt, std::string name="QuadRestraint %1%") -> QuadRestraint
11947  __init__(QuadRestraint self) -> QuadRestraint
11948  """
11949  _IMP_core.QuadRestraint_swiginit(self, _IMP_core.new_QuadRestraint(*args))
11950 
11951  def get_score_object(self):
11952  r"""get_score_object(QuadRestraint self) -> QuadScore"""
11953  return _IMP_core.QuadRestraint_get_score_object(self)
11954 
11955  def get_index(self):
11956  r"""get_index(QuadRestraint self) -> IMP::QuadScore::IndexArgument"""
11957  return _IMP_core.QuadRestraint_get_index(self)
11958 
11959  def get_version_info(self):
11960  r"""get_version_info(QuadRestraint self) -> VersionInfo"""
11961  return _IMP_core.QuadRestraint_get_version_info(self)
11962  __swig_destroy__ = _IMP_core.delete_QuadRestraint
11963 
11964  def __str__(self):
11965  r"""__str__(QuadRestraint self) -> std::string"""
11966  return _IMP_core.QuadRestraint___str__(self)
11967 
11968  def __repr__(self):
11969  r"""__repr__(QuadRestraint self) -> std::string"""
11970  return _IMP_core.QuadRestraint___repr__(self)
11971 
11972  @staticmethod
11973  def get_from(o):
11974  return _object_cast_to_QuadRestraint(o)
11975 
11976 
11977  def _get_as_binary(self):
11978  r"""_get_as_binary(QuadRestraint self) -> PyObject *"""
11979  return _IMP_core.QuadRestraint__get_as_binary(self)
11980 
11981  def _set_from_binary(self, p):
11982  r"""_set_from_binary(QuadRestraint self, PyObject * p)"""
11983  return _IMP_core.QuadRestraint__set_from_binary(self, p)
11984 
11985  def __getstate__(self):
11986  p = self._get_as_binary()
11987  if len(self.__dict__) > 1:
11988  d = self.__dict__.copy()
11989  del d['this']
11990  p = (d, p)
11991  return p
11992 
11993  def __setstate__(self, p):
11994  if not hasattr(self, 'this'):
11995  self.__init__()
11996  if isinstance(p, tuple):
11997  d, p = p
11998  self.__dict__.update(d)
11999  return self._set_from_binary(p)
12000 
12001 
12002 # Register QuadRestraint in _IMP_core:
12003 _IMP_core.QuadRestraint_swigregister(QuadRestraint)
12004 class SingletonConstraint(IMP.Constraint):
12005  r"""Proxy of C++ IMP::core::SingletonConstraint class."""
12006 
12007  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12008 
12009  def __init__(self, *args):
12010  r"""
12011  __init__(SingletonConstraint self, SingletonModifier before, SingletonModifier after, Model m, ParticleIndex vt, std::string name="SingletonConstraint %1%", bool can_skip=False) -> SingletonConstraint
12012  __init__(SingletonConstraint self) -> SingletonConstraint
12013  """
12014  _IMP_core.SingletonConstraint_swiginit(self, _IMP_core.new_SingletonConstraint(*args))
12015 
12016  def get_before_modifier(self):
12017  r"""get_before_modifier(SingletonConstraint self) -> SingletonModifier"""
12018  return _IMP_core.SingletonConstraint_get_before_modifier(self)
12019 
12020  def get_index(self):
12021  r"""get_index(SingletonConstraint self) -> ParticleIndex"""
12022  return _IMP_core.SingletonConstraint_get_index(self)
12023 
12024  def get_version_info(self):
12025  r"""get_version_info(SingletonConstraint self) -> VersionInfo"""
12026  return _IMP_core.SingletonConstraint_get_version_info(self)
12027  __swig_destroy__ = _IMP_core.delete_SingletonConstraint
12028 
12029  def __str__(self):
12030  r"""__str__(SingletonConstraint self) -> std::string"""
12031  return _IMP_core.SingletonConstraint___str__(self)
12032 
12033  def __repr__(self):
12034  r"""__repr__(SingletonConstraint self) -> std::string"""
12035  return _IMP_core.SingletonConstraint___repr__(self)
12036 
12037  @staticmethod
12038  def get_from(o):
12039  return _object_cast_to_SingletonConstraint(o)
12040 
12041 
12042  def _get_as_binary(self):
12043  r"""_get_as_binary(SingletonConstraint self) -> PyObject *"""
12044  return _IMP_core.SingletonConstraint__get_as_binary(self)
12045 
12046  def _set_from_binary(self, p):
12047  r"""_set_from_binary(SingletonConstraint self, PyObject * p)"""
12048  return _IMP_core.SingletonConstraint__set_from_binary(self, p)
12049 
12050  def __getstate__(self):
12051  p = self._get_as_binary()
12052  if len(self.__dict__) > 1:
12053  d = self.__dict__.copy()
12054  del d['this']
12055  p = (d, p)
12056  return p
12057 
12058  def __setstate__(self, p):
12059  if not hasattr(self, 'this'):
12060  self.__init__()
12061  if isinstance(p, tuple):
12062  d, p = p
12063  self.__dict__.update(d)
12064  return self._set_from_binary(p)
12065 
12066 
12067  def _get_jax(self):
12068  import jax.numpy as jnp
12069  indexes = jnp.array([self.get_index()])
12070  mod = self.get_before_modifier().get_derived_object()
12071  ji = mod._get_jax(self.get_model(), indexes)
12072  return self._wrap_jax(ji.apply_func, keys=ji._keys)
12073 
12074 
12075 # Register SingletonConstraint in _IMP_core:
12076 _IMP_core.SingletonConstraint_swigregister(SingletonConstraint)
12077 class PairConstraint(IMP.Constraint):
12078  r"""Proxy of C++ IMP::core::PairConstraint class."""
12079 
12080  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12081 
12082  def __init__(self, *args):
12083  r"""
12084  __init__(PairConstraint self, PairModifier before, PairModifier after, Model m, IMP::ParticleIndexPair const & vt, std::string name="PairConstraint %1%", bool can_skip=False) -> PairConstraint
12085  __init__(PairConstraint self) -> PairConstraint
12086  """
12087  _IMP_core.PairConstraint_swiginit(self, _IMP_core.new_PairConstraint(*args))
12088 
12089  def get_before_modifier(self):
12090  r"""get_before_modifier(PairConstraint self) -> PairModifier"""
12091  return _IMP_core.PairConstraint_get_before_modifier(self)
12092 
12093  def get_index(self):
12094  r"""get_index(PairConstraint self) -> IMP::PairModifier::IndexArgument"""
12095  return _IMP_core.PairConstraint_get_index(self)
12096 
12097  def get_version_info(self):
12098  r"""get_version_info(PairConstraint self) -> VersionInfo"""
12099  return _IMP_core.PairConstraint_get_version_info(self)
12100  __swig_destroy__ = _IMP_core.delete_PairConstraint
12101 
12102  def __str__(self):
12103  r"""__str__(PairConstraint self) -> std::string"""
12104  return _IMP_core.PairConstraint___str__(self)
12105 
12106  def __repr__(self):
12107  r"""__repr__(PairConstraint self) -> std::string"""
12108  return _IMP_core.PairConstraint___repr__(self)
12109 
12110  @staticmethod
12111  def get_from(o):
12112  return _object_cast_to_PairConstraint(o)
12113 
12114 
12115  def _get_as_binary(self):
12116  r"""_get_as_binary(PairConstraint self) -> PyObject *"""
12117  return _IMP_core.PairConstraint__get_as_binary(self)
12118 
12119  def _set_from_binary(self, p):
12120  r"""_set_from_binary(PairConstraint self, PyObject * p)"""
12121  return _IMP_core.PairConstraint__set_from_binary(self, p)
12122 
12123  def __getstate__(self):
12124  p = self._get_as_binary()
12125  if len(self.__dict__) > 1:
12126  d = self.__dict__.copy()
12127  del d['this']
12128  p = (d, p)
12129  return p
12130 
12131  def __setstate__(self, p):
12132  if not hasattr(self, 'this'):
12133  self.__init__()
12134  if isinstance(p, tuple):
12135  d, p = p
12136  self.__dict__.update(d)
12137  return self._set_from_binary(p)
12138 
12139 
12140 # Register PairConstraint in _IMP_core:
12141 _IMP_core.PairConstraint_swigregister(PairConstraint)
12142 class TripletConstraint(IMP.Constraint):
12143  r"""Proxy of C++ IMP::core::TripletConstraint class."""
12144 
12145  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12146 
12147  def __init__(self, *args):
12148  r"""
12149  __init__(TripletConstraint self, TripletModifier before, TripletModifier after, Model m, IMP::ParticleIndexTriplet const & vt, std::string name="TripletConstraint %1%", bool can_skip=False) -> TripletConstraint
12150  __init__(TripletConstraint self) -> TripletConstraint
12151  """
12152  _IMP_core.TripletConstraint_swiginit(self, _IMP_core.new_TripletConstraint(*args))
12153 
12154  def get_before_modifier(self):
12155  r"""get_before_modifier(TripletConstraint self) -> TripletModifier"""
12156  return _IMP_core.TripletConstraint_get_before_modifier(self)
12157 
12158  def get_index(self):
12159  r"""get_index(TripletConstraint self) -> IMP::TripletModifier::IndexArgument"""
12160  return _IMP_core.TripletConstraint_get_index(self)
12161 
12162  def get_version_info(self):
12163  r"""get_version_info(TripletConstraint self) -> VersionInfo"""
12164  return _IMP_core.TripletConstraint_get_version_info(self)
12165  __swig_destroy__ = _IMP_core.delete_TripletConstraint
12166 
12167  def __str__(self):
12168  r"""__str__(TripletConstraint self) -> std::string"""
12169  return _IMP_core.TripletConstraint___str__(self)
12170 
12171  def __repr__(self):
12172  r"""__repr__(TripletConstraint self) -> std::string"""
12173  return _IMP_core.TripletConstraint___repr__(self)
12174 
12175  @staticmethod
12176  def get_from(o):
12177  return _object_cast_to_TripletConstraint(o)
12178 
12179 
12180  def _get_as_binary(self):
12181  r"""_get_as_binary(TripletConstraint self) -> PyObject *"""
12182  return _IMP_core.TripletConstraint__get_as_binary(self)
12183 
12184  def _set_from_binary(self, p):
12185  r"""_set_from_binary(TripletConstraint self, PyObject * p)"""
12186  return _IMP_core.TripletConstraint__set_from_binary(self, p)
12187 
12188  def __getstate__(self):
12189  p = self._get_as_binary()
12190  if len(self.__dict__) > 1:
12191  d = self.__dict__.copy()
12192  del d['this']
12193  p = (d, p)
12194  return p
12195 
12196  def __setstate__(self, p):
12197  if not hasattr(self, 'this'):
12198  self.__init__()
12199  if isinstance(p, tuple):
12200  d, p = p
12201  self.__dict__.update(d)
12202  return self._set_from_binary(p)
12203 
12204 
12205 # Register TripletConstraint in _IMP_core:
12206 _IMP_core.TripletConstraint_swigregister(TripletConstraint)
12207 class QuadConstraint(IMP.Constraint):
12208  r"""Proxy of C++ IMP::core::QuadConstraint class."""
12209 
12210  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12211 
12212  def __init__(self, *args):
12213  r"""
12214  __init__(QuadConstraint self, QuadModifier before, QuadModifier after, Model m, IMP::ParticleIndexQuad const & vt, std::string name="QuadConstraint %1%", bool can_skip=False) -> QuadConstraint
12215  __init__(QuadConstraint self) -> QuadConstraint
12216  """
12217  _IMP_core.QuadConstraint_swiginit(self, _IMP_core.new_QuadConstraint(*args))
12218 
12219  def get_before_modifier(self):
12220  r"""get_before_modifier(QuadConstraint self) -> QuadModifier"""
12221  return _IMP_core.QuadConstraint_get_before_modifier(self)
12222 
12223  def get_index(self):
12224  r"""get_index(QuadConstraint self) -> IMP::QuadModifier::IndexArgument"""
12225  return _IMP_core.QuadConstraint_get_index(self)
12226 
12227  def get_version_info(self):
12228  r"""get_version_info(QuadConstraint self) -> VersionInfo"""
12229  return _IMP_core.QuadConstraint_get_version_info(self)
12230  __swig_destroy__ = _IMP_core.delete_QuadConstraint
12231 
12232  def __str__(self):
12233  r"""__str__(QuadConstraint self) -> std::string"""
12234  return _IMP_core.QuadConstraint___str__(self)
12235 
12236  def __repr__(self):
12237  r"""__repr__(QuadConstraint self) -> std::string"""
12238  return _IMP_core.QuadConstraint___repr__(self)
12239 
12240  @staticmethod
12241  def get_from(o):
12242  return _object_cast_to_QuadConstraint(o)
12243 
12244 
12245  def _get_as_binary(self):
12246  r"""_get_as_binary(QuadConstraint self) -> PyObject *"""
12247  return _IMP_core.QuadConstraint__get_as_binary(self)
12248 
12249  def _set_from_binary(self, p):
12250  r"""_set_from_binary(QuadConstraint self, PyObject * p)"""
12251  return _IMP_core.QuadConstraint__set_from_binary(self, p)
12252 
12253  def __getstate__(self):
12254  p = self._get_as_binary()
12255  if len(self.__dict__) > 1:
12256  d = self.__dict__.copy()
12257  del d['this']
12258  p = (d, p)
12259  return p
12260 
12261  def __setstate__(self, p):
12262  if not hasattr(self, 'this'):
12263  self.__init__()
12264  if isinstance(p, tuple):
12265  d, p = p
12266  self.__dict__.update(d)
12267  return self._set_from_binary(p)
12268 
12269 
12270 # Register QuadConstraint in _IMP_core:
12271 _IMP_core.QuadConstraint_swigregister(QuadConstraint)
12272 class ConstantSingletonPredicate(IMP.SingletonPredicate):
12273  r"""Proxy of C++ IMP::core::ConstantSingletonPredicate class."""
12274 
12275  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12276 
12277  def __init__(self, *args):
12278  r"""
12279  __init__(ConstantSingletonPredicate self, int v, std::string name="ConstSingletonPredicate%1%") -> ConstantSingletonPredicate
12280  __init__(ConstantSingletonPredicate self) -> ConstantSingletonPredicate
12281  """
12282  _IMP_core.ConstantSingletonPredicate_swiginit(self, _IMP_core.new_ConstantSingletonPredicate(*args))
12283 
12284  def do_get_inputs(self, arg2, arg3):
12285  r"""do_get_inputs(ConstantSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12286  return _IMP_core.ConstantSingletonPredicate_do_get_inputs(self, arg2, arg3)
12287 
12288  def get_value(self, *args):
12289  r"""
12290  get_value(ConstantSingletonPredicate self, Particle a) -> int
12291  get_value(ConstantSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12292  """
12293  return _IMP_core.ConstantSingletonPredicate_get_value(self, *args)
12294 
12295  def get_value_index(self, *args):
12296  r"""
12297  get_value_index(ConstantSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12298  get_value_index(ConstantSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12299  """
12300  return _IMP_core.ConstantSingletonPredicate_get_value_index(self, *args)
12301 
12302  def get_version_info(self):
12303  r"""get_version_info(ConstantSingletonPredicate self) -> VersionInfo"""
12304  return _IMP_core.ConstantSingletonPredicate_get_version_info(self)
12305  __swig_destroy__ = _IMP_core.delete_ConstantSingletonPredicate
12306 
12307  def __str__(self):
12308  r"""__str__(ConstantSingletonPredicate self) -> std::string"""
12309  return _IMP_core.ConstantSingletonPredicate___str__(self)
12310 
12311  def __repr__(self):
12312  r"""__repr__(ConstantSingletonPredicate self) -> std::string"""
12313  return _IMP_core.ConstantSingletonPredicate___repr__(self)
12314 
12315  @staticmethod
12316  def get_from(o):
12317  return _object_cast_to_ConstantSingletonPredicate(o)
12318 
12319 
12320  def _get_as_binary(self):
12321  r"""_get_as_binary(ConstantSingletonPredicate self) -> PyObject *"""
12322  return _IMP_core.ConstantSingletonPredicate__get_as_binary(self)
12323 
12324  def _set_from_binary(self, p):
12325  r"""_set_from_binary(ConstantSingletonPredicate self, PyObject * p)"""
12326  return _IMP_core.ConstantSingletonPredicate__set_from_binary(self, p)
12327 
12328  def __getstate__(self):
12329  p = self._get_as_binary()
12330  if len(self.__dict__) > 1:
12331  d = self.__dict__.copy()
12332  del d['this']
12333  p = (d, p)
12334  return p
12335 
12336  def __setstate__(self, p):
12337  if not hasattr(self, 'this'):
12338  self.__init__()
12339  if isinstance(p, tuple):
12340  d, p = p
12341  self.__dict__.update(d)
12342  return self._set_from_binary(p)
12343 
12344 
12345 # Register ConstantSingletonPredicate in _IMP_core:
12346 _IMP_core.ConstantSingletonPredicate_swigregister(ConstantSingletonPredicate)
12347 class UnorderedTypeSingletonPredicate(IMP.SingletonPredicate):
12348  r"""Proxy of C++ IMP::core::UnorderedTypeSingletonPredicate class."""
12349 
12350  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12351 
12352  def __init__(self, *args):
12353  r"""__init__(UnorderedTypeSingletonPredicate self, std::string name="UnorderedTypeSingletonPredicate%1%") -> UnorderedTypeSingletonPredicate"""
12354  _IMP_core.UnorderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_UnorderedTypeSingletonPredicate(*args))
12355 
12356  def do_get_inputs(self, m, pis):
12357  r"""do_get_inputs(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12358  return _IMP_core.UnorderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12359 
12360  def get_value(self, *args):
12361  r"""
12362  get_value(UnorderedTypeSingletonPredicate self, Particle a) -> int
12363  get_value(UnorderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12364  """
12365  return _IMP_core.UnorderedTypeSingletonPredicate_get_value(self, *args)
12366 
12367  def get_value_index(self, *args):
12368  r"""
12369  get_value_index(UnorderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12370  get_value_index(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12371  """
12372  return _IMP_core.UnorderedTypeSingletonPredicate_get_value_index(self, *args)
12373 
12374  def get_version_info(self):
12375  r"""get_version_info(UnorderedTypeSingletonPredicate self) -> VersionInfo"""
12376  return _IMP_core.UnorderedTypeSingletonPredicate_get_version_info(self)
12377  __swig_destroy__ = _IMP_core.delete_UnorderedTypeSingletonPredicate
12378 
12379  def __str__(self):
12380  r"""__str__(UnorderedTypeSingletonPredicate self) -> std::string"""
12381  return _IMP_core.UnorderedTypeSingletonPredicate___str__(self)
12382 
12383  def __repr__(self):
12384  r"""__repr__(UnorderedTypeSingletonPredicate self) -> std::string"""
12385  return _IMP_core.UnorderedTypeSingletonPredicate___repr__(self)
12386 
12387  @staticmethod
12388  def get_from(o):
12389  return _object_cast_to_UnorderedTypeSingletonPredicate(o)
12390 
12391 
12392  def _get_as_binary(self):
12393  r"""_get_as_binary(UnorderedTypeSingletonPredicate self) -> PyObject *"""
12394  return _IMP_core.UnorderedTypeSingletonPredicate__get_as_binary(self)
12395 
12396  def _set_from_binary(self, p):
12397  r"""_set_from_binary(UnorderedTypeSingletonPredicate self, PyObject * p)"""
12398  return _IMP_core.UnorderedTypeSingletonPredicate__set_from_binary(self, p)
12399 
12400  def __getstate__(self):
12401  p = self._get_as_binary()
12402  if len(self.__dict__) > 1:
12403  d = self.__dict__.copy()
12404  del d['this']
12405  p = (d, p)
12406  return p
12407 
12408  def __setstate__(self, p):
12409  if not hasattr(self, 'this'):
12410  self.__init__()
12411  if isinstance(p, tuple):
12412  d, p = p
12413  self.__dict__.update(d)
12414  return self._set_from_binary(p)
12415 
12416 
12417 # Register UnorderedTypeSingletonPredicate in _IMP_core:
12418 _IMP_core.UnorderedTypeSingletonPredicate_swigregister(UnorderedTypeSingletonPredicate)
12419 class OrderedTypeSingletonPredicate(IMP.SingletonPredicate):
12420  r"""Proxy of C++ IMP::core::OrderedTypeSingletonPredicate class."""
12421 
12422  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12423 
12424  def __init__(self, *args):
12425  r"""__init__(OrderedTypeSingletonPredicate self, std::string name="OrderedTypeSingletonPredicate%1%") -> OrderedTypeSingletonPredicate"""
12426  _IMP_core.OrderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_OrderedTypeSingletonPredicate(*args))
12427 
12428  def do_get_inputs(self, m, pis):
12429  r"""do_get_inputs(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12430  return _IMP_core.OrderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12431 
12432  def get_value(self, *args):
12433  r"""
12434  get_value(OrderedTypeSingletonPredicate self, IMP::core::ParticleTypes const & types) -> int
12435  get_value(OrderedTypeSingletonPredicate self, Particle a) -> int
12436  get_value(OrderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12437  """
12438  return _IMP_core.OrderedTypeSingletonPredicate_get_value(self, *args)
12439 
12440  def get_value_index(self, *args):
12441  r"""
12442  get_value_index(OrderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12443  get_value_index(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12444  """
12445  return _IMP_core.OrderedTypeSingletonPredicate_get_value_index(self, *args)
12446 
12447  def get_version_info(self):
12448  r"""get_version_info(OrderedTypeSingletonPredicate self) -> VersionInfo"""
12449  return _IMP_core.OrderedTypeSingletonPredicate_get_version_info(self)
12450  __swig_destroy__ = _IMP_core.delete_OrderedTypeSingletonPredicate
12451 
12452  def __str__(self):
12453  r"""__str__(OrderedTypeSingletonPredicate self) -> std::string"""
12454  return _IMP_core.OrderedTypeSingletonPredicate___str__(self)
12455 
12456  def __repr__(self):
12457  r"""__repr__(OrderedTypeSingletonPredicate self) -> std::string"""
12458  return _IMP_core.OrderedTypeSingletonPredicate___repr__(self)
12459 
12460  @staticmethod
12461  def get_from(o):
12462  return _object_cast_to_OrderedTypeSingletonPredicate(o)
12463 
12464 
12465 # Register OrderedTypeSingletonPredicate in _IMP_core:
12466 _IMP_core.OrderedTypeSingletonPredicate_swigregister(OrderedTypeSingletonPredicate)
12467 class AllSameSingletonPredicate(IMP.SingletonPredicate):
12468  r"""Proxy of C++ IMP::core::AllSameSingletonPredicate class."""
12469 
12470  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12471 
12472  def __init__(self, *args):
12473  r"""__init__(AllSameSingletonPredicate self, std::string name="AllSameSingletonPredicate%1%") -> AllSameSingletonPredicate"""
12474  _IMP_core.AllSameSingletonPredicate_swiginit(self, _IMP_core.new_AllSameSingletonPredicate(*args))
12475 
12476  def do_get_inputs(self, arg2, arg3):
12477  r"""do_get_inputs(AllSameSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12478  return _IMP_core.AllSameSingletonPredicate_do_get_inputs(self, arg2, arg3)
12479 
12480  def get_value(self, *args):
12481  r"""
12482  get_value(AllSameSingletonPredicate self, Particle a) -> int
12483  get_value(AllSameSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12484  """
12485  return _IMP_core.AllSameSingletonPredicate_get_value(self, *args)
12486 
12487  def get_value_index(self, *args):
12488  r"""
12489  get_value_index(AllSameSingletonPredicate self, Model m, ParticleIndex pi) -> int
12490  get_value_index(AllSameSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12491  """
12492  return _IMP_core.AllSameSingletonPredicate_get_value_index(self, *args)
12493 
12494  def get_version_info(self):
12495  r"""get_version_info(AllSameSingletonPredicate self) -> VersionInfo"""
12496  return _IMP_core.AllSameSingletonPredicate_get_version_info(self)
12497  __swig_destroy__ = _IMP_core.delete_AllSameSingletonPredicate
12498 
12499  def __str__(self):
12500  r"""__str__(AllSameSingletonPredicate self) -> std::string"""
12501  return _IMP_core.AllSameSingletonPredicate___str__(self)
12502 
12503  def __repr__(self):
12504  r"""__repr__(AllSameSingletonPredicate self) -> std::string"""
12505  return _IMP_core.AllSameSingletonPredicate___repr__(self)
12506 
12507  @staticmethod
12508  def get_from(o):
12509  return _object_cast_to_AllSameSingletonPredicate(o)
12510 
12511 
12512  def _get_as_binary(self):
12513  r"""_get_as_binary(AllSameSingletonPredicate self) -> PyObject *"""
12514  return _IMP_core.AllSameSingletonPredicate__get_as_binary(self)
12515 
12516  def _set_from_binary(self, p):
12517  r"""_set_from_binary(AllSameSingletonPredicate self, PyObject * p)"""
12518  return _IMP_core.AllSameSingletonPredicate__set_from_binary(self, p)
12519 
12520  def __getstate__(self):
12521  p = self._get_as_binary()
12522  if len(self.__dict__) > 1:
12523  d = self.__dict__.copy()
12524  del d['this']
12525  p = (d, p)
12526  return p
12527 
12528  def __setstate__(self, p):
12529  if not hasattr(self, 'this'):
12530  self.__init__()
12531  if isinstance(p, tuple):
12532  d, p = p
12533  self.__dict__.update(d)
12534  return self._set_from_binary(p)
12535 
12536 
12537 # Register AllSameSingletonPredicate in _IMP_core:
12538 _IMP_core.AllSameSingletonPredicate_swigregister(AllSameSingletonPredicate)
12539 class CoinFlipSingletonPredicate(IMP.SingletonPredicate):
12540  r"""Proxy of C++ IMP::core::CoinFlipSingletonPredicate class."""
12541 
12542  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12543 
12544  def __init__(self, *args):
12545  r"""__init__(CoinFlipSingletonPredicate self, double p, std::string name="CoinFlipSingletonPredicate%1%") -> CoinFlipSingletonPredicate"""
12546  _IMP_core.CoinFlipSingletonPredicate_swiginit(self, _IMP_core.new_CoinFlipSingletonPredicate(*args))
12547 
12548  def do_get_inputs(self, arg2, arg3):
12549  r"""do_get_inputs(CoinFlipSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12550  return _IMP_core.CoinFlipSingletonPredicate_do_get_inputs(self, arg2, arg3)
12551 
12552  def get_value(self, *args):
12553  r"""
12554  get_value(CoinFlipSingletonPredicate self, Particle a) -> int
12555  get_value(CoinFlipSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12556  """
12557  return _IMP_core.CoinFlipSingletonPredicate_get_value(self, *args)
12558 
12559  def get_value_index(self, *args):
12560  r"""
12561  get_value_index(CoinFlipSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12562  get_value_index(CoinFlipSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12563  """
12564  return _IMP_core.CoinFlipSingletonPredicate_get_value_index(self, *args)
12565 
12566  def get_version_info(self):
12567  r"""get_version_info(CoinFlipSingletonPredicate self) -> VersionInfo"""
12568  return _IMP_core.CoinFlipSingletonPredicate_get_version_info(self)
12569  __swig_destroy__ = _IMP_core.delete_CoinFlipSingletonPredicate
12570 
12571  def __str__(self):
12572  r"""__str__(CoinFlipSingletonPredicate self) -> std::string"""
12573  return _IMP_core.CoinFlipSingletonPredicate___str__(self)
12574 
12575  def __repr__(self):
12576  r"""__repr__(CoinFlipSingletonPredicate self) -> std::string"""
12577  return _IMP_core.CoinFlipSingletonPredicate___repr__(self)
12578 
12579  @staticmethod
12580  def get_from(o):
12581  return _object_cast_to_CoinFlipSingletonPredicate(o)
12582 
12583 
12584 # Register CoinFlipSingletonPredicate in _IMP_core:
12585 _IMP_core.CoinFlipSingletonPredicate_swigregister(CoinFlipSingletonPredicate)
12586 class ConstantPairPredicate(IMP.PairPredicate):
12587  r"""Proxy of C++ IMP::core::ConstantPairPredicate class."""
12588 
12589  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12590 
12591  def __init__(self, *args):
12592  r"""
12593  __init__(ConstantPairPredicate self, int v, std::string name="ConstPairPredicate%1%") -> ConstantPairPredicate
12594  __init__(ConstantPairPredicate self) -> ConstantPairPredicate
12595  """
12596  _IMP_core.ConstantPairPredicate_swiginit(self, _IMP_core.new_ConstantPairPredicate(*args))
12597 
12598  def do_get_inputs(self, arg2, arg3):
12599  r"""do_get_inputs(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12600  return _IMP_core.ConstantPairPredicate_do_get_inputs(self, arg2, arg3)
12601 
12602  def get_value(self, *args):
12603  r"""
12604  get_value(ConstantPairPredicate self, IMP::ParticlePair const & a) -> int
12605  get_value(ConstantPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12606  """
12607  return _IMP_core.ConstantPairPredicate_get_value(self, *args)
12608 
12609  def get_value_index(self, *args):
12610  r"""
12611  get_value_index(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12612  get_value_index(ConstantPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12613  """
12614  return _IMP_core.ConstantPairPredicate_get_value_index(self, *args)
12615 
12616  def get_version_info(self):
12617  r"""get_version_info(ConstantPairPredicate self) -> VersionInfo"""
12618  return _IMP_core.ConstantPairPredicate_get_version_info(self)
12619  __swig_destroy__ = _IMP_core.delete_ConstantPairPredicate
12620 
12621  def __str__(self):
12622  r"""__str__(ConstantPairPredicate self) -> std::string"""
12623  return _IMP_core.ConstantPairPredicate___str__(self)
12624 
12625  def __repr__(self):
12626  r"""__repr__(ConstantPairPredicate self) -> std::string"""
12627  return _IMP_core.ConstantPairPredicate___repr__(self)
12628 
12629  @staticmethod
12630  def get_from(o):
12631  return _object_cast_to_ConstantPairPredicate(o)
12632 
12633 
12634  def _get_as_binary(self):
12635  r"""_get_as_binary(ConstantPairPredicate self) -> PyObject *"""
12636  return _IMP_core.ConstantPairPredicate__get_as_binary(self)
12637 
12638  def _set_from_binary(self, p):
12639  r"""_set_from_binary(ConstantPairPredicate self, PyObject * p)"""
12640  return _IMP_core.ConstantPairPredicate__set_from_binary(self, p)
12641 
12642  def __getstate__(self):
12643  p = self._get_as_binary()
12644  if len(self.__dict__) > 1:
12645  d = self.__dict__.copy()
12646  del d['this']
12647  p = (d, p)
12648  return p
12649 
12650  def __setstate__(self, p):
12651  if not hasattr(self, 'this'):
12652  self.__init__()
12653  if isinstance(p, tuple):
12654  d, p = p
12655  self.__dict__.update(d)
12656  return self._set_from_binary(p)
12657 
12658 
12659 # Register ConstantPairPredicate in _IMP_core:
12660 _IMP_core.ConstantPairPredicate_swigregister(ConstantPairPredicate)
12661 class UnorderedTypePairPredicate(IMP.PairPredicate):
12662  r"""Proxy of C++ IMP::core::UnorderedTypePairPredicate class."""
12663 
12664  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12665 
12666  def __init__(self, *args):
12667  r"""__init__(UnorderedTypePairPredicate self, std::string name="UnorderedTypePairPredicate%1%") -> UnorderedTypePairPredicate"""
12668  _IMP_core.UnorderedTypePairPredicate_swiginit(self, _IMP_core.new_UnorderedTypePairPredicate(*args))
12669 
12670  def do_get_inputs(self, m, pis):
12671  r"""do_get_inputs(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12672  return _IMP_core.UnorderedTypePairPredicate_do_get_inputs(self, m, pis)
12673 
12674  def get_value(self, *args):
12675  r"""
12676  get_value(UnorderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12677  get_value(UnorderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12678  """
12679  return _IMP_core.UnorderedTypePairPredicate_get_value(self, *args)
12680 
12681  def get_value_index(self, *args):
12682  r"""
12683  get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12684  get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12685  """
12686  return _IMP_core.UnorderedTypePairPredicate_get_value_index(self, *args)
12687 
12688  def get_version_info(self):
12689  r"""get_version_info(UnorderedTypePairPredicate self) -> VersionInfo"""
12690  return _IMP_core.UnorderedTypePairPredicate_get_version_info(self)
12691  __swig_destroy__ = _IMP_core.delete_UnorderedTypePairPredicate
12692 
12693  def __str__(self):
12694  r"""__str__(UnorderedTypePairPredicate self) -> std::string"""
12695  return _IMP_core.UnorderedTypePairPredicate___str__(self)
12696 
12697  def __repr__(self):
12698  r"""__repr__(UnorderedTypePairPredicate self) -> std::string"""
12699  return _IMP_core.UnorderedTypePairPredicate___repr__(self)
12700 
12701  @staticmethod
12702  def get_from(o):
12703  return _object_cast_to_UnorderedTypePairPredicate(o)
12704 
12705 
12706  def _get_as_binary(self):
12707  r"""_get_as_binary(UnorderedTypePairPredicate self) -> PyObject *"""
12708  return _IMP_core.UnorderedTypePairPredicate__get_as_binary(self)
12709 
12710  def _set_from_binary(self, p):
12711  r"""_set_from_binary(UnorderedTypePairPredicate self, PyObject * p)"""
12712  return _IMP_core.UnorderedTypePairPredicate__set_from_binary(self, p)
12713 
12714  def __getstate__(self):
12715  p = self._get_as_binary()
12716  if len(self.__dict__) > 1:
12717  d = self.__dict__.copy()
12718  del d['this']
12719  p = (d, p)
12720  return p
12721 
12722  def __setstate__(self, p):
12723  if not hasattr(self, 'this'):
12724  self.__init__()
12725  if isinstance(p, tuple):
12726  d, p = p
12727  self.__dict__.update(d)
12728  return self._set_from_binary(p)
12729 
12730 
12731 # Register UnorderedTypePairPredicate in _IMP_core:
12732 _IMP_core.UnorderedTypePairPredicate_swigregister(UnorderedTypePairPredicate)
12733 class OrderedTypePairPredicate(IMP.PairPredicate):
12734  r"""Proxy of C++ IMP::core::OrderedTypePairPredicate class."""
12735 
12736  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12737 
12738  def __init__(self, *args):
12739  r"""__init__(OrderedTypePairPredicate self, std::string name="OrderedTypePairPredicate%1%") -> OrderedTypePairPredicate"""
12740  _IMP_core.OrderedTypePairPredicate_swiginit(self, _IMP_core.new_OrderedTypePairPredicate(*args))
12741 
12742  def do_get_inputs(self, m, pis):
12743  r"""do_get_inputs(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12744  return _IMP_core.OrderedTypePairPredicate_do_get_inputs(self, m, pis)
12745 
12746  def get_value(self, *args):
12747  r"""
12748  get_value(OrderedTypePairPredicate self, IMP::core::ParticleTypes const & types) -> int
12749  get_value(OrderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12750  get_value(OrderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12751  """
12752  return _IMP_core.OrderedTypePairPredicate_get_value(self, *args)
12753 
12754  def get_value_index(self, *args):
12755  r"""
12756  get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12757  get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12758  """
12759  return _IMP_core.OrderedTypePairPredicate_get_value_index(self, *args)
12760 
12761  def get_version_info(self):
12762  r"""get_version_info(OrderedTypePairPredicate self) -> VersionInfo"""
12763  return _IMP_core.OrderedTypePairPredicate_get_version_info(self)
12764  __swig_destroy__ = _IMP_core.delete_OrderedTypePairPredicate
12765 
12766  def __str__(self):
12767  r"""__str__(OrderedTypePairPredicate self) -> std::string"""
12768  return _IMP_core.OrderedTypePairPredicate___str__(self)
12769 
12770  def __repr__(self):
12771  r"""__repr__(OrderedTypePairPredicate self) -> std::string"""
12772  return _IMP_core.OrderedTypePairPredicate___repr__(self)
12773 
12774  @staticmethod
12775  def get_from(o):
12776  return _object_cast_to_OrderedTypePairPredicate(o)
12777 
12778 
12779 # Register OrderedTypePairPredicate in _IMP_core:
12780 _IMP_core.OrderedTypePairPredicate_swigregister(OrderedTypePairPredicate)
12781 class AllSamePairPredicate(IMP.PairPredicate):
12782  r"""Proxy of C++ IMP::core::AllSamePairPredicate class."""
12783 
12784  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12785 
12786  def __init__(self, *args):
12787  r"""__init__(AllSamePairPredicate self, std::string name="AllSamePairPredicate%1%") -> AllSamePairPredicate"""
12788  _IMP_core.AllSamePairPredicate_swiginit(self, _IMP_core.new_AllSamePairPredicate(*args))
12789 
12790  def do_get_inputs(self, arg2, arg3):
12791  r"""do_get_inputs(AllSamePairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12792  return _IMP_core.AllSamePairPredicate_do_get_inputs(self, arg2, arg3)
12793 
12794  def get_value(self, *args):
12795  r"""
12796  get_value(AllSamePairPredicate self, IMP::ParticlePair const & a) -> int
12797  get_value(AllSamePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12798  """
12799  return _IMP_core.AllSamePairPredicate_get_value(self, *args)
12800 
12801  def get_value_index(self, *args):
12802  r"""
12803  get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12804  get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12805  """
12806  return _IMP_core.AllSamePairPredicate_get_value_index(self, *args)
12807 
12808  def get_version_info(self):
12809  r"""get_version_info(AllSamePairPredicate self) -> VersionInfo"""
12810  return _IMP_core.AllSamePairPredicate_get_version_info(self)
12811  __swig_destroy__ = _IMP_core.delete_AllSamePairPredicate
12812 
12813  def __str__(self):
12814  r"""__str__(AllSamePairPredicate self) -> std::string"""
12815  return _IMP_core.AllSamePairPredicate___str__(self)
12816 
12817  def __repr__(self):
12818  r"""__repr__(AllSamePairPredicate self) -> std::string"""
12819  return _IMP_core.AllSamePairPredicate___repr__(self)
12820 
12821  @staticmethod
12822  def get_from(o):
12823  return _object_cast_to_AllSamePairPredicate(o)
12824 
12825 
12826  def _get_as_binary(self):
12827  r"""_get_as_binary(AllSamePairPredicate self) -> PyObject *"""
12828  return _IMP_core.AllSamePairPredicate__get_as_binary(self)
12829 
12830  def _set_from_binary(self, p):
12831  r"""_set_from_binary(AllSamePairPredicate self, PyObject * p)"""
12832  return _IMP_core.AllSamePairPredicate__set_from_binary(self, p)
12833 
12834  def __getstate__(self):
12835  p = self._get_as_binary()
12836  if len(self.__dict__) > 1:
12837  d = self.__dict__.copy()
12838  del d['this']
12839  p = (d, p)
12840  return p
12841 
12842  def __setstate__(self, p):
12843  if not hasattr(self, 'this'):
12844  self.__init__()
12845  if isinstance(p, tuple):
12846  d, p = p
12847  self.__dict__.update(d)
12848  return self._set_from_binary(p)
12849 
12850 
12851 # Register AllSamePairPredicate in _IMP_core:
12852 _IMP_core.AllSamePairPredicate_swigregister(AllSamePairPredicate)
12853 class CoinFlipPairPredicate(IMP.PairPredicate):
12854  r"""Proxy of C++ IMP::core::CoinFlipPairPredicate class."""
12855 
12856  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12857 
12858  def __init__(self, *args):
12859  r"""__init__(CoinFlipPairPredicate self, double p, std::string name="CoinFlipPairPredicate%1%") -> CoinFlipPairPredicate"""
12860  _IMP_core.CoinFlipPairPredicate_swiginit(self, _IMP_core.new_CoinFlipPairPredicate(*args))
12861 
12862  def do_get_inputs(self, arg2, arg3):
12863  r"""do_get_inputs(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12864  return _IMP_core.CoinFlipPairPredicate_do_get_inputs(self, arg2, arg3)
12865 
12866  def get_value(self, *args):
12867  r"""
12868  get_value(CoinFlipPairPredicate self, IMP::ParticlePair const & a) -> int
12869  get_value(CoinFlipPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12870  """
12871  return _IMP_core.CoinFlipPairPredicate_get_value(self, *args)
12872 
12873  def get_value_index(self, *args):
12874  r"""
12875  get_value_index(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12876  get_value_index(CoinFlipPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12877  """
12878  return _IMP_core.CoinFlipPairPredicate_get_value_index(self, *args)
12879 
12880  def get_version_info(self):
12881  r"""get_version_info(CoinFlipPairPredicate self) -> VersionInfo"""
12882  return _IMP_core.CoinFlipPairPredicate_get_version_info(self)
12883  __swig_destroy__ = _IMP_core.delete_CoinFlipPairPredicate
12884 
12885  def __str__(self):
12886  r"""__str__(CoinFlipPairPredicate self) -> std::string"""
12887  return _IMP_core.CoinFlipPairPredicate___str__(self)
12888 
12889  def __repr__(self):
12890  r"""__repr__(CoinFlipPairPredicate self) -> std::string"""
12891  return _IMP_core.CoinFlipPairPredicate___repr__(self)
12892 
12893  @staticmethod
12894  def get_from(o):
12895  return _object_cast_to_CoinFlipPairPredicate(o)
12896 
12897 
12898 # Register CoinFlipPairPredicate in _IMP_core:
12899 _IMP_core.CoinFlipPairPredicate_swigregister(CoinFlipPairPredicate)
12900 class ConstantTripletPredicate(IMP.TripletPredicate):
12901  r"""Proxy of C++ IMP::core::ConstantTripletPredicate class."""
12902 
12903  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12904 
12905  def __init__(self, *args):
12906  r"""
12907  __init__(ConstantTripletPredicate self, int v, std::string name="ConstTripletPredicate%1%") -> ConstantTripletPredicate
12908  __init__(ConstantTripletPredicate self) -> ConstantTripletPredicate
12909  """
12910  _IMP_core.ConstantTripletPredicate_swiginit(self, _IMP_core.new_ConstantTripletPredicate(*args))
12911 
12912  def do_get_inputs(self, arg2, arg3):
12913  r"""do_get_inputs(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12914  return _IMP_core.ConstantTripletPredicate_do_get_inputs(self, arg2, arg3)
12915 
12916  def get_value(self, *args):
12917  r"""
12918  get_value(ConstantTripletPredicate self, IMP::ParticleTriplet const & a) -> int
12919  get_value(ConstantTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
12920  """
12921  return _IMP_core.ConstantTripletPredicate_get_value(self, *args)
12922 
12923  def get_value_index(self, *args):
12924  r"""
12925  get_value_index(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
12926  get_value_index(ConstantTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
12927  """
12928  return _IMP_core.ConstantTripletPredicate_get_value_index(self, *args)
12929 
12930  def get_version_info(self):
12931  r"""get_version_info(ConstantTripletPredicate self) -> VersionInfo"""
12932  return _IMP_core.ConstantTripletPredicate_get_version_info(self)
12933  __swig_destroy__ = _IMP_core.delete_ConstantTripletPredicate
12934 
12935  def __str__(self):
12936  r"""__str__(ConstantTripletPredicate self) -> std::string"""
12937  return _IMP_core.ConstantTripletPredicate___str__(self)
12938 
12939  def __repr__(self):
12940  r"""__repr__(ConstantTripletPredicate self) -> std::string"""
12941  return _IMP_core.ConstantTripletPredicate___repr__(self)
12942 
12943  @staticmethod
12944  def get_from(o):
12945  return _object_cast_to_ConstantTripletPredicate(o)
12946 
12947 
12948  def _get_as_binary(self):
12949  r"""_get_as_binary(ConstantTripletPredicate self) -> PyObject *"""
12950  return _IMP_core.ConstantTripletPredicate__get_as_binary(self)
12951 
12952  def _set_from_binary(self, p):
12953  r"""_set_from_binary(ConstantTripletPredicate self, PyObject * p)"""
12954  return _IMP_core.ConstantTripletPredicate__set_from_binary(self, p)
12955 
12956  def __getstate__(self):
12957  p = self._get_as_binary()
12958  if len(self.__dict__) > 1:
12959  d = self.__dict__.copy()
12960  del d['this']
12961  p = (d, p)
12962  return p
12963 
12964  def __setstate__(self, p):
12965  if not hasattr(self, 'this'):
12966  self.__init__()
12967  if isinstance(p, tuple):
12968  d, p = p
12969  self.__dict__.update(d)
12970  return self._set_from_binary(p)
12971 
12972 
12973 # Register ConstantTripletPredicate in _IMP_core:
12974 _IMP_core.ConstantTripletPredicate_swigregister(ConstantTripletPredicate)
12975 class UnorderedTypeTripletPredicate(IMP.TripletPredicate):
12976  r"""Proxy of C++ IMP::core::UnorderedTypeTripletPredicate class."""
12977 
12978  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12979 
12980  def __init__(self, *args):
12981  r"""__init__(UnorderedTypeTripletPredicate self, std::string name="UnorderedTypeTripletPredicate%1%") -> UnorderedTypeTripletPredicate"""
12982  _IMP_core.UnorderedTypeTripletPredicate_swiginit(self, _IMP_core.new_UnorderedTypeTripletPredicate(*args))
12983 
12984  def do_get_inputs(self, m, pis):
12985  r"""do_get_inputs(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12986  return _IMP_core.UnorderedTypeTripletPredicate_do_get_inputs(self, m, pis)
12987 
12988  def get_value(self, *args):
12989  r"""
12990  get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
12991  get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
12992  """
12993  return _IMP_core.UnorderedTypeTripletPredicate_get_value(self, *args)
12994 
12995  def get_value_index(self, *args):
12996  r"""
12997  get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
12998  get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
12999  """
13000  return _IMP_core.UnorderedTypeTripletPredicate_get_value_index(self, *args)
13001 
13002  def get_version_info(self):
13003  r"""get_version_info(UnorderedTypeTripletPredicate self) -> VersionInfo"""
13004  return _IMP_core.UnorderedTypeTripletPredicate_get_version_info(self)
13005  __swig_destroy__ = _IMP_core.delete_UnorderedTypeTripletPredicate
13006 
13007  def __str__(self):
13008  r"""__str__(UnorderedTypeTripletPredicate self) -> std::string"""
13009  return _IMP_core.UnorderedTypeTripletPredicate___str__(self)
13010 
13011  def __repr__(self):
13012  r"""__repr__(UnorderedTypeTripletPredicate self) -> std::string"""
13013  return _IMP_core.UnorderedTypeTripletPredicate___repr__(self)
13014 
13015  @staticmethod
13016  def get_from(o):
13017  return _object_cast_to_UnorderedTypeTripletPredicate(o)
13018 
13019 
13020  def _get_as_binary(self):
13021  r"""_get_as_binary(UnorderedTypeTripletPredicate self) -> PyObject *"""
13022  return _IMP_core.UnorderedTypeTripletPredicate__get_as_binary(self)
13023 
13024  def _set_from_binary(self, p):
13025  r"""_set_from_binary(UnorderedTypeTripletPredicate self, PyObject * p)"""
13026  return _IMP_core.UnorderedTypeTripletPredicate__set_from_binary(self, p)
13027 
13028  def __getstate__(self):
13029  p = self._get_as_binary()
13030  if len(self.__dict__) > 1:
13031  d = self.__dict__.copy()
13032  del d['this']
13033  p = (d, p)
13034  return p
13035 
13036  def __setstate__(self, p):
13037  if not hasattr(self, 'this'):
13038  self.__init__()
13039  if isinstance(p, tuple):
13040  d, p = p
13041  self.__dict__.update(d)
13042  return self._set_from_binary(p)
13043 
13044 
13045 # Register UnorderedTypeTripletPredicate in _IMP_core:
13046 _IMP_core.UnorderedTypeTripletPredicate_swigregister(UnorderedTypeTripletPredicate)
13047 class OrderedTypeTripletPredicate(IMP.TripletPredicate):
13048  r"""Proxy of C++ IMP::core::OrderedTypeTripletPredicate class."""
13049 
13050  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13051 
13052  def __init__(self, *args):
13053  r"""__init__(OrderedTypeTripletPredicate self, std::string name="OrderedTypeTripletPredicate%1%") -> OrderedTypeTripletPredicate"""
13054  _IMP_core.OrderedTypeTripletPredicate_swiginit(self, _IMP_core.new_OrderedTypeTripletPredicate(*args))
13055 
13056  def do_get_inputs(self, m, pis):
13057  r"""do_get_inputs(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13058  return _IMP_core.OrderedTypeTripletPredicate_do_get_inputs(self, m, pis)
13059 
13060  def get_value(self, *args):
13061  r"""
13062  get_value(OrderedTypeTripletPredicate self, IMP::core::ParticleTypes const & types) -> int
13063  get_value(OrderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13064  get_value(OrderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13065  """
13066  return _IMP_core.OrderedTypeTripletPredicate_get_value(self, *args)
13067 
13068  def get_value_index(self, *args):
13069  r"""
13070  get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13071  get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13072  """
13073  return _IMP_core.OrderedTypeTripletPredicate_get_value_index(self, *args)
13074 
13075  def get_version_info(self):
13076  r"""get_version_info(OrderedTypeTripletPredicate self) -> VersionInfo"""
13077  return _IMP_core.OrderedTypeTripletPredicate_get_version_info(self)
13078  __swig_destroy__ = _IMP_core.delete_OrderedTypeTripletPredicate
13079 
13080  def __str__(self):
13081  r"""__str__(OrderedTypeTripletPredicate self) -> std::string"""
13082  return _IMP_core.OrderedTypeTripletPredicate___str__(self)
13083 
13084  def __repr__(self):
13085  r"""__repr__(OrderedTypeTripletPredicate self) -> std::string"""
13086  return _IMP_core.OrderedTypeTripletPredicate___repr__(self)
13087 
13088  @staticmethod
13089  def get_from(o):
13090  return _object_cast_to_OrderedTypeTripletPredicate(o)
13091 
13092 
13093 # Register OrderedTypeTripletPredicate in _IMP_core:
13094 _IMP_core.OrderedTypeTripletPredicate_swigregister(OrderedTypeTripletPredicate)
13095 class AllSameTripletPredicate(IMP.TripletPredicate):
13096  r"""Proxy of C++ IMP::core::AllSameTripletPredicate class."""
13097 
13098  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13099 
13100  def __init__(self, *args):
13101  r"""__init__(AllSameTripletPredicate self, std::string name="AllSameTripletPredicate%1%") -> AllSameTripletPredicate"""
13102  _IMP_core.AllSameTripletPredicate_swiginit(self, _IMP_core.new_AllSameTripletPredicate(*args))
13103 
13104  def do_get_inputs(self, arg2, arg3):
13105  r"""do_get_inputs(AllSameTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13106  return _IMP_core.AllSameTripletPredicate_do_get_inputs(self, arg2, arg3)
13107 
13108  def get_value(self, *args):
13109  r"""
13110  get_value(AllSameTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13111  get_value(AllSameTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13112  """
13113  return _IMP_core.AllSameTripletPredicate_get_value(self, *args)
13114 
13115  def get_value_index(self, *args):
13116  r"""
13117  get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13118  get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13119  """
13120  return _IMP_core.AllSameTripletPredicate_get_value_index(self, *args)
13121 
13122  def get_version_info(self):
13123  r"""get_version_info(AllSameTripletPredicate self) -> VersionInfo"""
13124  return _IMP_core.AllSameTripletPredicate_get_version_info(self)
13125  __swig_destroy__ = _IMP_core.delete_AllSameTripletPredicate
13126 
13127  def __str__(self):
13128  r"""__str__(AllSameTripletPredicate self) -> std::string"""
13129  return _IMP_core.AllSameTripletPredicate___str__(self)
13130 
13131  def __repr__(self):
13132  r"""__repr__(AllSameTripletPredicate self) -> std::string"""
13133  return _IMP_core.AllSameTripletPredicate___repr__(self)
13134 
13135  @staticmethod
13136  def get_from(o):
13137  return _object_cast_to_AllSameTripletPredicate(o)
13138 
13139 
13140  def _get_as_binary(self):
13141  r"""_get_as_binary(AllSameTripletPredicate self) -> PyObject *"""
13142  return _IMP_core.AllSameTripletPredicate__get_as_binary(self)
13143 
13144  def _set_from_binary(self, p):
13145  r"""_set_from_binary(AllSameTripletPredicate self, PyObject * p)"""
13146  return _IMP_core.AllSameTripletPredicate__set_from_binary(self, p)
13147 
13148  def __getstate__(self):
13149  p = self._get_as_binary()
13150  if len(self.__dict__) > 1:
13151  d = self.__dict__.copy()
13152  del d['this']
13153  p = (d, p)
13154  return p
13155 
13156  def __setstate__(self, p):
13157  if not hasattr(self, 'this'):
13158  self.__init__()
13159  if isinstance(p, tuple):
13160  d, p = p
13161  self.__dict__.update(d)
13162  return self._set_from_binary(p)
13163 
13164 
13165 # Register AllSameTripletPredicate in _IMP_core:
13166 _IMP_core.AllSameTripletPredicate_swigregister(AllSameTripletPredicate)
13167 class CoinFlipTripletPredicate(IMP.TripletPredicate):
13168  r"""Proxy of C++ IMP::core::CoinFlipTripletPredicate class."""
13169 
13170  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13171 
13172  def __init__(self, *args):
13173  r"""__init__(CoinFlipTripletPredicate self, double p, std::string name="CoinFlipTripletPredicate%1%") -> CoinFlipTripletPredicate"""
13174  _IMP_core.CoinFlipTripletPredicate_swiginit(self, _IMP_core.new_CoinFlipTripletPredicate(*args))
13175 
13176  def do_get_inputs(self, arg2, arg3):
13177  r"""do_get_inputs(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13178  return _IMP_core.CoinFlipTripletPredicate_do_get_inputs(self, arg2, arg3)
13179 
13180  def get_value(self, *args):
13181  r"""
13182  get_value(CoinFlipTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13183  get_value(CoinFlipTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13184  """
13185  return _IMP_core.CoinFlipTripletPredicate_get_value(self, *args)
13186 
13187  def get_value_index(self, *args):
13188  r"""
13189  get_value_index(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
13190  get_value_index(CoinFlipTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13191  """
13192  return _IMP_core.CoinFlipTripletPredicate_get_value_index(self, *args)
13193 
13194  def get_version_info(self):
13195  r"""get_version_info(CoinFlipTripletPredicate self) -> VersionInfo"""
13196  return _IMP_core.CoinFlipTripletPredicate_get_version_info(self)
13197  __swig_destroy__ = _IMP_core.delete_CoinFlipTripletPredicate
13198 
13199  def __str__(self):
13200  r"""__str__(CoinFlipTripletPredicate self) -> std::string"""
13201  return _IMP_core.CoinFlipTripletPredicate___str__(self)
13202 
13203  def __repr__(self):
13204  r"""__repr__(CoinFlipTripletPredicate self) -> std::string"""
13205  return _IMP_core.CoinFlipTripletPredicate___repr__(self)
13206 
13207  @staticmethod
13208  def get_from(o):
13209  return _object_cast_to_CoinFlipTripletPredicate(o)
13210 
13211 
13212 # Register CoinFlipTripletPredicate in _IMP_core:
13213 _IMP_core.CoinFlipTripletPredicate_swigregister(CoinFlipTripletPredicate)
13214 class ConstantQuadPredicate(IMP.QuadPredicate):
13215  r"""Proxy of C++ IMP::core::ConstantQuadPredicate class."""
13216 
13217  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13218 
13219  def __init__(self, *args):
13220  r"""
13221  __init__(ConstantQuadPredicate self, int v, std::string name="ConstQuadPredicate%1%") -> ConstantQuadPredicate
13222  __init__(ConstantQuadPredicate self) -> ConstantQuadPredicate
13223  """
13224  _IMP_core.ConstantQuadPredicate_swiginit(self, _IMP_core.new_ConstantQuadPredicate(*args))
13225 
13226  def do_get_inputs(self, arg2, arg3):
13227  r"""do_get_inputs(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13228  return _IMP_core.ConstantQuadPredicate_do_get_inputs(self, arg2, arg3)
13229 
13230  def get_value(self, *args):
13231  r"""
13232  get_value(ConstantQuadPredicate self, IMP::ParticleQuad const & a) -> int
13233  get_value(ConstantQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13234  """
13235  return _IMP_core.ConstantQuadPredicate_get_value(self, *args)
13236 
13237  def get_value_index(self, *args):
13238  r"""
13239  get_value_index(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13240  get_value_index(ConstantQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13241  """
13242  return _IMP_core.ConstantQuadPredicate_get_value_index(self, *args)
13243 
13244  def get_version_info(self):
13245  r"""get_version_info(ConstantQuadPredicate self) -> VersionInfo"""
13246  return _IMP_core.ConstantQuadPredicate_get_version_info(self)
13247  __swig_destroy__ = _IMP_core.delete_ConstantQuadPredicate
13248 
13249  def __str__(self):
13250  r"""__str__(ConstantQuadPredicate self) -> std::string"""
13251  return _IMP_core.ConstantQuadPredicate___str__(self)
13252 
13253  def __repr__(self):
13254  r"""__repr__(ConstantQuadPredicate self) -> std::string"""
13255  return _IMP_core.ConstantQuadPredicate___repr__(self)
13256 
13257  @staticmethod
13258  def get_from(o):
13259  return _object_cast_to_ConstantQuadPredicate(o)
13260 
13261 
13262  def _get_as_binary(self):
13263  r"""_get_as_binary(ConstantQuadPredicate self) -> PyObject *"""
13264  return _IMP_core.ConstantQuadPredicate__get_as_binary(self)
13265 
13266  def _set_from_binary(self, p):
13267  r"""_set_from_binary(ConstantQuadPredicate self, PyObject * p)"""
13268  return _IMP_core.ConstantQuadPredicate__set_from_binary(self, p)
13269 
13270  def __getstate__(self):
13271  p = self._get_as_binary()
13272  if len(self.__dict__) > 1:
13273  d = self.__dict__.copy()
13274  del d['this']
13275  p = (d, p)
13276  return p
13277 
13278  def __setstate__(self, p):
13279  if not hasattr(self, 'this'):
13280  self.__init__()
13281  if isinstance(p, tuple):
13282  d, p = p
13283  self.__dict__.update(d)
13284  return self._set_from_binary(p)
13285 
13286 
13287 # Register ConstantQuadPredicate in _IMP_core:
13288 _IMP_core.ConstantQuadPredicate_swigregister(ConstantQuadPredicate)
13289 class UnorderedTypeQuadPredicate(IMP.QuadPredicate):
13290  r"""Proxy of C++ IMP::core::UnorderedTypeQuadPredicate class."""
13291 
13292  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13293 
13294  def __init__(self, *args):
13295  r"""__init__(UnorderedTypeQuadPredicate self, std::string name="UnorderedTypeQuadPredicate%1%") -> UnorderedTypeQuadPredicate"""
13296  _IMP_core.UnorderedTypeQuadPredicate_swiginit(self, _IMP_core.new_UnorderedTypeQuadPredicate(*args))
13297 
13298  def do_get_inputs(self, m, pis):
13299  r"""do_get_inputs(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13300  return _IMP_core.UnorderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13301 
13302  def get_value(self, *args):
13303  r"""
13304  get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13305  get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13306  """
13307  return _IMP_core.UnorderedTypeQuadPredicate_get_value(self, *args)
13308 
13309  def get_value_index(self, *args):
13310  r"""
13311  get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13312  get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13313  """
13314  return _IMP_core.UnorderedTypeQuadPredicate_get_value_index(self, *args)
13315 
13316  def get_version_info(self):
13317  r"""get_version_info(UnorderedTypeQuadPredicate self) -> VersionInfo"""
13318  return _IMP_core.UnorderedTypeQuadPredicate_get_version_info(self)
13319  __swig_destroy__ = _IMP_core.delete_UnorderedTypeQuadPredicate
13320 
13321  def __str__(self):
13322  r"""__str__(UnorderedTypeQuadPredicate self) -> std::string"""
13323  return _IMP_core.UnorderedTypeQuadPredicate___str__(self)
13324 
13325  def __repr__(self):
13326  r"""__repr__(UnorderedTypeQuadPredicate self) -> std::string"""
13327  return _IMP_core.UnorderedTypeQuadPredicate___repr__(self)
13328 
13329  @staticmethod
13330  def get_from(o):
13331  return _object_cast_to_UnorderedTypeQuadPredicate(o)
13332 
13333 
13334  def _get_as_binary(self):
13335  r"""_get_as_binary(UnorderedTypeQuadPredicate self) -> PyObject *"""
13336  return _IMP_core.UnorderedTypeQuadPredicate__get_as_binary(self)
13337 
13338  def _set_from_binary(self, p):
13339  r"""_set_from_binary(UnorderedTypeQuadPredicate self, PyObject * p)"""
13340  return _IMP_core.UnorderedTypeQuadPredicate__set_from_binary(self, p)
13341 
13342  def __getstate__(self):
13343  p = self._get_as_binary()
13344  if len(self.__dict__) > 1:
13345  d = self.__dict__.copy()
13346  del d['this']
13347  p = (d, p)
13348  return p
13349 
13350  def __setstate__(self, p):
13351  if not hasattr(self, 'this'):
13352  self.__init__()
13353  if isinstance(p, tuple):
13354  d, p = p
13355  self.__dict__.update(d)
13356  return self._set_from_binary(p)
13357 
13358 
13359 # Register UnorderedTypeQuadPredicate in _IMP_core:
13360 _IMP_core.UnorderedTypeQuadPredicate_swigregister(UnorderedTypeQuadPredicate)
13361 class OrderedTypeQuadPredicate(IMP.QuadPredicate):
13362  r"""Proxy of C++ IMP::core::OrderedTypeQuadPredicate class."""
13363 
13364  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13365 
13366  def __init__(self, *args):
13367  r"""__init__(OrderedTypeQuadPredicate self, std::string name="OrderedTypeQuadPredicate%1%") -> OrderedTypeQuadPredicate"""
13368  _IMP_core.OrderedTypeQuadPredicate_swiginit(self, _IMP_core.new_OrderedTypeQuadPredicate(*args))
13369 
13370  def do_get_inputs(self, m, pis):
13371  r"""do_get_inputs(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13372  return _IMP_core.OrderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13373 
13374  def get_value(self, *args):
13375  r"""
13376  get_value(OrderedTypeQuadPredicate self, IMP::core::ParticleTypes const & types) -> int
13377  get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13378  get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13379  """
13380  return _IMP_core.OrderedTypeQuadPredicate_get_value(self, *args)
13381 
13382  def get_value_index(self, *args):
13383  r"""
13384  get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13385  get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13386  """
13387  return _IMP_core.OrderedTypeQuadPredicate_get_value_index(self, *args)
13388 
13389  def get_version_info(self):
13390  r"""get_version_info(OrderedTypeQuadPredicate self) -> VersionInfo"""
13391  return _IMP_core.OrderedTypeQuadPredicate_get_version_info(self)
13392  __swig_destroy__ = _IMP_core.delete_OrderedTypeQuadPredicate
13393 
13394  def __str__(self):
13395  r"""__str__(OrderedTypeQuadPredicate self) -> std::string"""
13396  return _IMP_core.OrderedTypeQuadPredicate___str__(self)
13397 
13398  def __repr__(self):
13399  r"""__repr__(OrderedTypeQuadPredicate self) -> std::string"""
13400  return _IMP_core.OrderedTypeQuadPredicate___repr__(self)
13401 
13402  @staticmethod
13403  def get_from(o):
13404  return _object_cast_to_OrderedTypeQuadPredicate(o)
13405 
13406 
13407 # Register OrderedTypeQuadPredicate in _IMP_core:
13408 _IMP_core.OrderedTypeQuadPredicate_swigregister(OrderedTypeQuadPredicate)
13409 class AllSameQuadPredicate(IMP.QuadPredicate):
13410  r"""Proxy of C++ IMP::core::AllSameQuadPredicate class."""
13411 
13412  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13413 
13414  def __init__(self, *args):
13415  r"""__init__(AllSameQuadPredicate self, std::string name="AllSameQuadPredicate%1%") -> AllSameQuadPredicate"""
13416  _IMP_core.AllSameQuadPredicate_swiginit(self, _IMP_core.new_AllSameQuadPredicate(*args))
13417 
13418  def do_get_inputs(self, arg2, arg3):
13419  r"""do_get_inputs(AllSameQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13420  return _IMP_core.AllSameQuadPredicate_do_get_inputs(self, arg2, arg3)
13421 
13422  def get_value(self, *args):
13423  r"""
13424  get_value(AllSameQuadPredicate self, IMP::ParticleQuad const & a) -> int
13425  get_value(AllSameQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13426  """
13427  return _IMP_core.AllSameQuadPredicate_get_value(self, *args)
13428 
13429  def get_value_index(self, *args):
13430  r"""
13431  get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13432  get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13433  """
13434  return _IMP_core.AllSameQuadPredicate_get_value_index(self, *args)
13435 
13436  def get_version_info(self):
13437  r"""get_version_info(AllSameQuadPredicate self) -> VersionInfo"""
13438  return _IMP_core.AllSameQuadPredicate_get_version_info(self)
13439  __swig_destroy__ = _IMP_core.delete_AllSameQuadPredicate
13440 
13441  def __str__(self):
13442  r"""__str__(AllSameQuadPredicate self) -> std::string"""
13443  return _IMP_core.AllSameQuadPredicate___str__(self)
13444 
13445  def __repr__(self):
13446  r"""__repr__(AllSameQuadPredicate self) -> std::string"""
13447  return _IMP_core.AllSameQuadPredicate___repr__(self)
13448 
13449  @staticmethod
13450  def get_from(o):
13451  return _object_cast_to_AllSameQuadPredicate(o)
13452 
13453 
13454  def _get_as_binary(self):
13455  r"""_get_as_binary(AllSameQuadPredicate self) -> PyObject *"""
13456  return _IMP_core.AllSameQuadPredicate__get_as_binary(self)
13457 
13458  def _set_from_binary(self, p):
13459  r"""_set_from_binary(AllSameQuadPredicate self, PyObject * p)"""
13460  return _IMP_core.AllSameQuadPredicate__set_from_binary(self, p)
13461 
13462  def __getstate__(self):
13463  p = self._get_as_binary()
13464  if len(self.__dict__) > 1:
13465  d = self.__dict__.copy()
13466  del d['this']
13467  p = (d, p)
13468  return p
13469 
13470  def __setstate__(self, p):
13471  if not hasattr(self, 'this'):
13472  self.__init__()
13473  if isinstance(p, tuple):
13474  d, p = p
13475  self.__dict__.update(d)
13476  return self._set_from_binary(p)
13477 
13478 
13479 # Register AllSameQuadPredicate in _IMP_core:
13480 _IMP_core.AllSameQuadPredicate_swigregister(AllSameQuadPredicate)
13481 class CoinFlipQuadPredicate(IMP.QuadPredicate):
13482  r"""Proxy of C++ IMP::core::CoinFlipQuadPredicate class."""
13483 
13484  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13485 
13486  def __init__(self, *args):
13487  r"""__init__(CoinFlipQuadPredicate self, double p, std::string name="CoinFlipQuadPredicate%1%") -> CoinFlipQuadPredicate"""
13488  _IMP_core.CoinFlipQuadPredicate_swiginit(self, _IMP_core.new_CoinFlipQuadPredicate(*args))
13489 
13490  def do_get_inputs(self, arg2, arg3):
13491  r"""do_get_inputs(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13492  return _IMP_core.CoinFlipQuadPredicate_do_get_inputs(self, arg2, arg3)
13493 
13494  def get_value(self, *args):
13495  r"""
13496  get_value(CoinFlipQuadPredicate self, IMP::ParticleQuad const & a) -> int
13497  get_value(CoinFlipQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13498  """
13499  return _IMP_core.CoinFlipQuadPredicate_get_value(self, *args)
13500 
13501  def get_value_index(self, *args):
13502  r"""
13503  get_value_index(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13504  get_value_index(CoinFlipQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13505  """
13506  return _IMP_core.CoinFlipQuadPredicate_get_value_index(self, *args)
13507 
13508  def get_version_info(self):
13509  r"""get_version_info(CoinFlipQuadPredicate self) -> VersionInfo"""
13510  return _IMP_core.CoinFlipQuadPredicate_get_version_info(self)
13511  __swig_destroy__ = _IMP_core.delete_CoinFlipQuadPredicate
13512 
13513  def __str__(self):
13514  r"""__str__(CoinFlipQuadPredicate self) -> std::string"""
13515  return _IMP_core.CoinFlipQuadPredicate___str__(self)
13516 
13517  def __repr__(self):
13518  r"""__repr__(CoinFlipQuadPredicate self) -> std::string"""
13519  return _IMP_core.CoinFlipQuadPredicate___repr__(self)
13520 
13521  @staticmethod
13522  def get_from(o):
13523  return _object_cast_to_CoinFlipQuadPredicate(o)
13524 
13525 
13526 # Register CoinFlipQuadPredicate in _IMP_core:
13527 _IMP_core.CoinFlipQuadPredicate_swigregister(CoinFlipQuadPredicate)
13528 class InBoundingBox3DSingletonPredicate(IMP.SingletonPredicate):
13529  r"""Proxy of C++ IMP::core::InBoundingBox3DSingletonPredicate class."""
13530 
13531  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13532 
13533  def __init__(self, *args):
13534  r"""__init__(InBoundingBox3DSingletonPredicate self, BoundingBox3D bb, std::string name="InBoundingBox3DSingletonPredicate%1%") -> InBoundingBox3DSingletonPredicate"""
13535  _IMP_core.InBoundingBox3DSingletonPredicate_swiginit(self, _IMP_core.new_InBoundingBox3DSingletonPredicate(*args))
13536 
13537  def do_get_inputs(self, m, pi):
13538  r"""do_get_inputs(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13539  return _IMP_core.InBoundingBox3DSingletonPredicate_do_get_inputs(self, m, pi)
13540 
13541  def get_value(self, *args):
13542  r"""
13543  get_value(InBoundingBox3DSingletonPredicate self, Particle a) -> int
13544  get_value(InBoundingBox3DSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13545  """
13546  return _IMP_core.InBoundingBox3DSingletonPredicate_get_value(self, *args)
13547 
13548  def get_value_index(self, *args):
13549  r"""
13550  get_value_index(InBoundingBox3DSingletonPredicate self, Model m, ParticleIndex pi) -> int
13551  get_value_index(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13552  """
13553  return _IMP_core.InBoundingBox3DSingletonPredicate_get_value_index(self, *args)
13554 
13555  def get_version_info(self):
13556  r"""get_version_info(InBoundingBox3DSingletonPredicate self) -> VersionInfo"""
13557  return _IMP_core.InBoundingBox3DSingletonPredicate_get_version_info(self)
13558  __swig_destroy__ = _IMP_core.delete_InBoundingBox3DSingletonPredicate
13559 
13560  def __str__(self):
13561  r"""__str__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13562  return _IMP_core.InBoundingBox3DSingletonPredicate___str__(self)
13563 
13564  def __repr__(self):
13565  r"""__repr__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13566  return _IMP_core.InBoundingBox3DSingletonPredicate___repr__(self)
13567 
13568  @staticmethod
13569  def get_from(o):
13570  return _object_cast_to_InBoundingBox3DSingletonPredicate(o)
13571 
13572 
13573 # Register InBoundingBox3DSingletonPredicate in _IMP_core:
13574 _IMP_core.InBoundingBox3DSingletonPredicate_swigregister(InBoundingBox3DSingletonPredicate)
13575 class AttributeSingletonPredicate(IMP.SingletonPredicate):
13576  r"""Proxy of C++ IMP::core::AttributeSingletonPredicate class."""
13577 
13578  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13579 
13580  def __init__(self, *args):
13581  r"""__init__(AttributeSingletonPredicate self, IntKey bb, std::string name="AttributeSingletonPredicate%1%") -> AttributeSingletonPredicate"""
13582  _IMP_core.AttributeSingletonPredicate_swiginit(self, _IMP_core.new_AttributeSingletonPredicate(*args))
13583 
13584  def do_get_inputs(self, m, pi):
13585  r"""do_get_inputs(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13586  return _IMP_core.AttributeSingletonPredicate_do_get_inputs(self, m, pi)
13587 
13588  def get_value(self, *args):
13589  r"""
13590  get_value(AttributeSingletonPredicate self, Particle a) -> int
13591  get_value(AttributeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13592  """
13593  return _IMP_core.AttributeSingletonPredicate_get_value(self, *args)
13594 
13595  def get_value_index(self, *args):
13596  r"""
13597  get_value_index(AttributeSingletonPredicate self, Model m, ParticleIndex pi) -> int
13598  get_value_index(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13599  """
13600  return _IMP_core.AttributeSingletonPredicate_get_value_index(self, *args)
13601 
13602  def get_version_info(self):
13603  r"""get_version_info(AttributeSingletonPredicate self) -> VersionInfo"""
13604  return _IMP_core.AttributeSingletonPredicate_get_version_info(self)
13605  __swig_destroy__ = _IMP_core.delete_AttributeSingletonPredicate
13606 
13607  def __str__(self):
13608  r"""__str__(AttributeSingletonPredicate self) -> std::string"""
13609  return _IMP_core.AttributeSingletonPredicate___str__(self)
13610 
13611  def __repr__(self):
13612  r"""__repr__(AttributeSingletonPredicate self) -> std::string"""
13613  return _IMP_core.AttributeSingletonPredicate___repr__(self)
13614 
13615  @staticmethod
13616  def get_from(o):
13617  return _object_cast_to_AttributeSingletonPredicate(o)
13618 
13619 
13620 # Register AttributeSingletonPredicate in _IMP_core:
13621 _IMP_core.AttributeSingletonPredicate_swigregister(AttributeSingletonPredicate)
13622 class IsCollisionPairPredicate(IMP.PairPredicate):
13623  r"""Proxy of C++ IMP::core::IsCollisionPairPredicate class."""
13624 
13625  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13626 
13627  def __init__(self, *args):
13628  r"""__init__(IsCollisionPairPredicate self, std::string name="CollisionPairPredicate%1%") -> IsCollisionPairPredicate"""
13629  _IMP_core.IsCollisionPairPredicate_swiginit(self, _IMP_core.new_IsCollisionPairPredicate(*args))
13630 
13631  def do_get_inputs(self, m, pi):
13632  r"""do_get_inputs(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13633  return _IMP_core.IsCollisionPairPredicate_do_get_inputs(self, m, pi)
13634 
13635  def get_value(self, *args):
13636  r"""
13637  get_value(IsCollisionPairPredicate self, IMP::ParticlePair const & a) -> int
13638  get_value(IsCollisionPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
13639  """
13640  return _IMP_core.IsCollisionPairPredicate_get_value(self, *args)
13641 
13642  def get_value_index(self, *args):
13643  r"""
13644  get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
13645  get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
13646  """
13647  return _IMP_core.IsCollisionPairPredicate_get_value_index(self, *args)
13648 
13649  def get_version_info(self):
13650  r"""get_version_info(IsCollisionPairPredicate self) -> VersionInfo"""
13651  return _IMP_core.IsCollisionPairPredicate_get_version_info(self)
13652  __swig_destroy__ = _IMP_core.delete_IsCollisionPairPredicate
13653 
13654  def __str__(self):
13655  r"""__str__(IsCollisionPairPredicate self) -> std::string"""
13656  return _IMP_core.IsCollisionPairPredicate___str__(self)
13657 
13658  def __repr__(self):
13659  r"""__repr__(IsCollisionPairPredicate self) -> std::string"""
13660  return _IMP_core.IsCollisionPairPredicate___repr__(self)
13661 
13662  @staticmethod
13663  def get_from(o):
13664  return _object_cast_to_IsCollisionPairPredicate(o)
13665 
13666 
13667 # Register IsCollisionPairPredicate in _IMP_core:
13668 _IMP_core.IsCollisionPairPredicate_swigregister(IsCollisionPairPredicate)
13669 class AngleRestraint(TripletRestraint):
13670  r"""Proxy of C++ IMP::core::AngleRestraint class."""
13671 
13672  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13673 
13674  def __init__(self, *args):
13675  r"""
13676  __init__(AngleRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3) -> AngleRestraint
13677  __init__(AngleRestraint self) -> AngleRestraint
13678  """
13679  _IMP_core.AngleRestraint_swiginit(self, _IMP_core.new_AngleRestraint(*args))
13680  __swig_destroy__ = _IMP_core.delete_AngleRestraint
13681 
13682  def __str__(self):
13683  r"""__str__(AngleRestraint self) -> std::string"""
13684  return _IMP_core.AngleRestraint___str__(self)
13685 
13686  def __repr__(self):
13687  r"""__repr__(AngleRestraint self) -> std::string"""
13688  return _IMP_core.AngleRestraint___repr__(self)
13689 
13690  @staticmethod
13691  def get_from(o):
13692  return _object_cast_to_AngleRestraint(o)
13693 
13694 
13695  def _get_as_binary(self):
13696  r"""_get_as_binary(AngleRestraint self) -> PyObject *"""
13697  return _IMP_core.AngleRestraint__get_as_binary(self)
13698 
13699  def _set_from_binary(self, p):
13700  r"""_set_from_binary(AngleRestraint self, PyObject * p)"""
13701  return _IMP_core.AngleRestraint__set_from_binary(self, p)
13702 
13703  def __getstate__(self):
13704  p = self._get_as_binary()
13705  if len(self.__dict__) > 1:
13706  d = self.__dict__.copy()
13707  del d['this']
13708  p = (d, p)
13709  return p
13710 
13711  def __setstate__(self, p):
13712  if not hasattr(self, 'this'):
13713  self.__init__()
13714  if isinstance(p, tuple):
13715  d, p = p
13716  self.__dict__.update(d)
13717  return self._set_from_binary(p)
13718 
13719 
13720 # Register AngleRestraint in _IMP_core:
13721 _IMP_core.AngleRestraint_swigregister(AngleRestraint)
13722 class DihedralRestraint(QuadRestraint):
13723  r"""Proxy of C++ IMP::core::DihedralRestraint class."""
13724 
13725  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13726 
13727  def __init__(self, *args):
13728  r"""
13729  __init__(DihedralRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3, _ParticleIndexAdaptor p4) -> DihedralRestraint
13730  __init__(DihedralRestraint self) -> DihedralRestraint
13731  """
13732  _IMP_core.DihedralRestraint_swiginit(self, _IMP_core.new_DihedralRestraint(*args))
13733  __swig_destroy__ = _IMP_core.delete_DihedralRestraint
13734 
13735  def __str__(self):
13736  r"""__str__(DihedralRestraint self) -> std::string"""
13737  return _IMP_core.DihedralRestraint___str__(self)
13738 
13739  def __repr__(self):
13740  r"""__repr__(DihedralRestraint self) -> std::string"""
13741  return _IMP_core.DihedralRestraint___repr__(self)
13742 
13743  @staticmethod
13744  def get_from(o):
13745  return _object_cast_to_DihedralRestraint(o)
13746 
13747 
13748  def _get_as_binary(self):
13749  r"""_get_as_binary(DihedralRestraint self) -> PyObject *"""
13750  return _IMP_core.DihedralRestraint__get_as_binary(self)
13751 
13752  def _set_from_binary(self, p):
13753  r"""_set_from_binary(DihedralRestraint self, PyObject * p)"""
13754  return _IMP_core.DihedralRestraint__set_from_binary(self, p)
13755 
13756  def __getstate__(self):
13757  p = self._get_as_binary()
13758  if len(self.__dict__) > 1:
13759  d = self.__dict__.copy()
13760  del d['this']
13761  p = (d, p)
13762  return p
13763 
13764  def __setstate__(self, p):
13765  if not hasattr(self, 'this'):
13766  self.__init__()
13767  if isinstance(p, tuple):
13768  d, p = p
13769  self.__dict__.update(d)
13770  return self._set_from_binary(p)
13771 
13772 
13773 # Register DihedralRestraint in _IMP_core:
13774 _IMP_core.DihedralRestraint_swigregister(DihedralRestraint)
13775 class RigidBodyMover(MonteCarloMover):
13776  r"""Proxy of C++ IMP::core::RigidBodyMover class."""
13777 
13778  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13779 
13780  def __init__(self, *args):
13781  r"""
13782  __init__(RigidBodyMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation) -> RigidBodyMover
13783  __init__(RigidBodyMover self) -> RigidBodyMover
13784  """
13785  _IMP_core.RigidBodyMover_swiginit(self, _IMP_core.new_RigidBodyMover(*args))
13786 
13787  def set_maximum_translation(self, mt):
13788  r"""set_maximum_translation(RigidBodyMover self, IMP::Float mt)"""
13789  return _IMP_core.RigidBodyMover_set_maximum_translation(self, mt)
13790 
13791  def set_maximum_rotation(self, mr):
13792  r"""set_maximum_rotation(RigidBodyMover self, IMP::Float mr)"""
13793  return _IMP_core.RigidBodyMover_set_maximum_rotation(self, mr)
13794 
13795  def get_maximum_translation(self):
13796  r"""get_maximum_translation(RigidBodyMover self) -> IMP::Float"""
13797  return _IMP_core.RigidBodyMover_get_maximum_translation(self)
13798 
13799  def get_maximum_rotation(self):
13800  r"""get_maximum_rotation(RigidBodyMover self) -> IMP::Float"""
13801  return _IMP_core.RigidBodyMover_get_maximum_rotation(self)
13802 
13803  def get_index(self):
13804  r"""get_index(RigidBodyMover self) -> ParticleIndex"""
13805  return _IMP_core.RigidBodyMover_get_index(self)
13806 
13807  def get_version_info(self):
13808  r"""get_version_info(RigidBodyMover self) -> VersionInfo"""
13809  return _IMP_core.RigidBodyMover_get_version_info(self)
13810  __swig_destroy__ = _IMP_core.delete_RigidBodyMover
13811 
13812  def __str__(self):
13813  r"""__str__(RigidBodyMover self) -> std::string"""
13814  return _IMP_core.RigidBodyMover___str__(self)
13815 
13816  def __repr__(self):
13817  r"""__repr__(RigidBodyMover self) -> std::string"""
13818  return _IMP_core.RigidBodyMover___repr__(self)
13819 
13820  @staticmethod
13821  def get_from(o):
13822  return _object_cast_to_RigidBodyMover(o)
13823 
13824 
13825  def _get_as_binary(self):
13826  r"""_get_as_binary(RigidBodyMover self) -> PyObject *"""
13827  return _IMP_core.RigidBodyMover__get_as_binary(self)
13828 
13829  def _set_from_binary(self, p):
13830  r"""_set_from_binary(RigidBodyMover self, PyObject * p)"""
13831  return _IMP_core.RigidBodyMover__set_from_binary(self, p)
13832 
13833  def __getstate__(self):
13834  p = self._get_as_binary()
13835  if len(self.__dict__) > 1:
13836  d = self.__dict__.copy()
13837  del d['this']
13838  p = (d, p)
13839  return p
13840 
13841  def __setstate__(self, p):
13842  if not hasattr(self, 'this'):
13843  self.__init__()
13844  if isinstance(p, tuple):
13845  d, p = p
13846  self.__dict__.update(d)
13847  return self._set_from_binary(p)
13848 
13849 
13850  def _get_jax(self, space):
13851  import jax.random
13852  import IMP.core._jax_rigid
13853  from IMP.algebra._jax_util import (get_random_vector_on_3d_sphere,
13854  get_random_vector_in_3d_sphere,
13855  get_rotation_about_normalized_axis,
13856  _quaternion_multiply)
13857  max_angle = self.get_maximum_rotation()
13858  max_translation = self.get_maximum_translation()
13859  particle_index = self.get_index()
13860  body_index = IMP.core._jax_rigid._get_rigid_body_index(
13861  self.get_model(), self.get_index())
13862 
13863  def init_func(key):
13864  return key
13865 
13866  def propose_func(jm, key):
13867  body = jm['rigid_bodies'].bodies[body_index]
13868  tf = body.get_transformation(jm)
13869 
13870  if max_translation > 0:
13871  key, subkey = jax.random.split(key)
13872  tf.translation = space.shift(
13873  tf.translation,
13874  get_random_vector_in_3d_sphere(subkey, max_translation)[0])
13875  if max_angle > 0:
13876  key, subkey1, subkey2 = jax.random.split(key, 3)
13877  axis_norm = get_random_vector_on_3d_sphere(subkey1, 1.0)[0]
13878  angle = jax.random.uniform(
13879  subkey2, minval=-max_angle, maxval=max_angle)
13880  rotation = get_rotation_about_normalized_axis(axis_norm, angle)
13881  tf.rotation = _quaternion_multiply(rotation, tf.rotation)
13882  jm = body.set_transformation_lazy(tf, jm)
13883  return jm, key, 1.0
13884 
13885  return self._wrap_jax(init_func, propose_func, keys=['rigid_bodies'])
13886 
13887 
13888 # Register RigidBodyMover in _IMP_core:
13889 _IMP_core.RigidBodyMover_swigregister(RigidBodyMover)
13890 class RigidBodyTunneler(MonteCarloMover):
13891  r"""Proxy of C++ IMP::core::RigidBodyTunneler class."""
13892 
13893  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13894 
13895  def __init__(self, m, pis, ref, k, move_probability=1.):
13896  r"""__init__(RigidBodyTunneler self, Model m, IMP::ParticleIndexes pis, ParticleIndex ref, double k, double move_probability=1.) -> RigidBodyTunneler"""
13897  _IMP_core.RigidBodyTunneler_swiginit(self, _IMP_core.new_RigidBodyTunneler(m, pis, ref, k, move_probability))
13898 
13899  def add_entry_point(self, fl):
13900  r"""add_entry_point(RigidBodyTunneler self, IMP::Floats fl)"""
13901  return _IMP_core.RigidBodyTunneler_add_entry_point(self, fl)
13902 
13903  def reset_stats(self):
13904  r"""reset_stats(RigidBodyTunneler self)"""
13905  return _IMP_core.RigidBodyTunneler_reset_stats(self)
13906 
13907  def get_number_of_rejected_moves(self):
13908  r"""get_number_of_rejected_moves(RigidBodyTunneler self) -> unsigned int"""
13909  return _IMP_core.RigidBodyTunneler_get_number_of_rejected_moves(self)
13910 
13911  def get_number_of_proposed_moves(self):
13912  r"""get_number_of_proposed_moves(RigidBodyTunneler self) -> unsigned int"""
13913  return _IMP_core.RigidBodyTunneler_get_number_of_proposed_moves(self)
13914 
13915  def get_number_of_impossible_moves(self):
13916  r"""get_number_of_impossible_moves(RigidBodyTunneler self) -> unsigned int"""
13917  return _IMP_core.RigidBodyTunneler_get_number_of_impossible_moves(self)
13918 
13919  def get_number_of_calls(self):
13920  r"""get_number_of_calls(RigidBodyTunneler self) -> unsigned int"""
13921  return _IMP_core.RigidBodyTunneler_get_number_of_calls(self)
13922 
13923  @staticmethod
13924  def get_reduced_coordinates(*args):
13925  r"""
13926  get_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref) -> IMP::Floats
13927  get_reduced_coordinates(Model m, ParticleIndex pi) -> IMP::Floats
13928  """
13929  return _IMP_core.RigidBodyTunneler_get_reduced_coordinates(*args)
13930 
13931  @staticmethod
13932  def set_reduced_coordinates(m, target, ref, coords):
13933  r"""set_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref, IMP::Floats coords)"""
13934  return _IMP_core.RigidBodyTunneler_set_reduced_coordinates(m, target, ref, coords)
13935 
13936  def get_version_info(self):
13937  r"""get_version_info(RigidBodyTunneler self) -> VersionInfo"""
13938  return _IMP_core.RigidBodyTunneler_get_version_info(self)
13939  __swig_destroy__ = _IMP_core.delete_RigidBodyTunneler
13940 
13941  def __str__(self):
13942  r"""__str__(RigidBodyTunneler self) -> std::string"""
13943  return _IMP_core.RigidBodyTunneler___str__(self)
13944 
13945  def __repr__(self):
13946  r"""__repr__(RigidBodyTunneler self) -> std::string"""
13947  return _IMP_core.RigidBodyTunneler___repr__(self)
13948 
13949  @staticmethod
13950  def get_from(o):
13951  return _object_cast_to_RigidBodyTunneler(o)
13952 
13953 
13954 # Register RigidBodyTunneler in _IMP_core:
13955 _IMP_core.RigidBodyTunneler_swigregister(RigidBodyTunneler)
13956 class RigidBodyUmbrella(IMP.Restraint):
13957  r"""Proxy of C++ IMP::core::RigidBodyUmbrella class."""
13958 
13959  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13960 
13961  def __init__(self, *args):
13962  r"""
13963  __init__(RigidBodyUmbrella self, Model m, ParticleIndex pi, ParticleIndex ref, IMP::Floats x0, double alpha, double k, std::string name="RigidBodyUmbrella %1%") -> RigidBodyUmbrella
13964  __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
13965  """
13966  _IMP_core.RigidBodyUmbrella_swiginit(self, _IMP_core.new_RigidBodyUmbrella(*args))
13967 
13968  def set_x0(self, *args):
13969  r"""
13970  set_x0(RigidBodyUmbrella self, IMP::Floats x0)
13971  set_x0(RigidBodyUmbrella self, double _lambda, IMP::Floats x1, IMP::Floats x2)
13972  """
13973  return _IMP_core.RigidBodyUmbrella_set_x0(self, *args)
13974 
13975  def get_x0(self):
13976  r"""get_x0(RigidBodyUmbrella self) -> IMP::Floats"""
13977  return _IMP_core.RigidBodyUmbrella_get_x0(self)
13978 
13979  def get_x(self):
13980  r"""get_x(RigidBodyUmbrella self) -> IMP::Floats"""
13981  return _IMP_core.RigidBodyUmbrella_get_x(self)
13982 
13983  def set_alpha(self, alpha):
13984  r"""set_alpha(RigidBodyUmbrella self, double alpha)"""
13985  return _IMP_core.RigidBodyUmbrella_set_alpha(self, alpha)
13986 
13987  def set_k(self, k):
13988  r"""set_k(RigidBodyUmbrella self, double k)"""
13989  return _IMP_core.RigidBodyUmbrella_set_k(self, k)
13990 
13991  def get_version_info(self):
13992  r"""get_version_info(RigidBodyUmbrella self) -> VersionInfo"""
13993  return _IMP_core.RigidBodyUmbrella_get_version_info(self)
13994  __swig_destroy__ = _IMP_core.delete_RigidBodyUmbrella
13995 
13996  def __str__(self):
13997  r"""__str__(RigidBodyUmbrella self) -> std::string"""
13998  return _IMP_core.RigidBodyUmbrella___str__(self)
13999 
14000  def __repr__(self):
14001  r"""__repr__(RigidBodyUmbrella self) -> std::string"""
14002  return _IMP_core.RigidBodyUmbrella___repr__(self)
14003 
14004  @staticmethod
14005  def get_from(o):
14006  return _object_cast_to_RigidBodyUmbrella(o)
14007 
14008 
14009 # Register RigidBodyUmbrella in _IMP_core:
14010 _IMP_core.RigidBodyUmbrella_swigregister(RigidBodyUmbrella)
14011 class VolumeRestraint(IMP.Restraint):
14012  r"""Proxy of C++ IMP::core::VolumeRestraint class."""
14013 
14014  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14015 
14016  def __init__(self, f, sc, volume):
14017  r"""__init__(VolumeRestraint self, UnaryFunction f, SingletonContainer sc, double volume) -> VolumeRestraint"""
14018  _IMP_core.VolumeRestraint_swiginit(self, _IMP_core.new_VolumeRestraint(f, sc, volume))
14019 
14020  def do_get_inputs(self):
14021  r"""do_get_inputs(VolumeRestraint self) -> IMP::ModelObjectsTemp"""
14022  return _IMP_core.VolumeRestraint_do_get_inputs(self)
14023 
14024  def get_version_info(self):
14025  r"""get_version_info(VolumeRestraint self) -> VersionInfo"""
14026  return _IMP_core.VolumeRestraint_get_version_info(self)
14027  __swig_destroy__ = _IMP_core.delete_VolumeRestraint
14028 
14029  def __str__(self):
14030  r"""__str__(VolumeRestraint self) -> std::string"""
14031  return _IMP_core.VolumeRestraint___str__(self)
14032 
14033  def __repr__(self):
14034  r"""__repr__(VolumeRestraint self) -> std::string"""
14035  return _IMP_core.VolumeRestraint___repr__(self)
14036 
14037  @staticmethod
14038  def get_from(o):
14039  return _object_cast_to_VolumeRestraint(o)
14040 
14041 
14042 # Register VolumeRestraint in _IMP_core:
14043 _IMP_core.VolumeRestraint_swigregister(VolumeRestraint)
14044 
14045 def get_centroid(ps):
14046  r"""get_centroid(IMP::core::XYZs const & ps) -> Vector3D"""
14047  return _IMP_core.get_centroid(ps)
14048 
14049 def get_bounding_box(ps):
14050  r"""get_bounding_box(IMP::core::XYZRs const & ps) -> BoundingBox3D"""
14051  return _IMP_core.get_bounding_box(ps)
14052 class MoveStatisticsScoreState(IMP.ScoreState):
14053  r"""Proxy of C++ IMP::core::MoveStatisticsScoreState class."""
14054 
14055  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14056 
14057  def __init__(self, ps):
14058  r"""__init__(MoveStatisticsScoreState self, IMP::ParticlesTemp const & ps) -> MoveStatisticsScoreState"""
14059  _IMP_core.MoveStatisticsScoreState_swiginit(self, _IMP_core.new_MoveStatisticsScoreState(ps))
14060 
14061  def show_statistics(self, *args):
14062  r"""show_statistics(MoveStatisticsScoreState self, _ostream out=std::cout)"""
14063  return _IMP_core.MoveStatisticsScoreState_show_statistics(self, *args)
14064 
14065  def reset(self):
14066  r"""reset(MoveStatisticsScoreState self)"""
14067  return _IMP_core.MoveStatisticsScoreState_reset(self)
14068 
14069  def do_before_evaluate(self):
14070  r"""do_before_evaluate(MoveStatisticsScoreState self)"""
14071  return _IMP_core.MoveStatisticsScoreState_do_before_evaluate(self)
14072 
14073  def do_after_evaluate(self, da):
14074  r"""do_after_evaluate(MoveStatisticsScoreState self, DerivativeAccumulator da)"""
14075  return _IMP_core.MoveStatisticsScoreState_do_after_evaluate(self, da)
14076 
14077  def do_get_inputs(self):
14078  r"""do_get_inputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
14079  return _IMP_core.MoveStatisticsScoreState_do_get_inputs(self)
14080 
14081  def do_get_outputs(self):
14082  r"""do_get_outputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
14083  return _IMP_core.MoveStatisticsScoreState_do_get_outputs(self)
14084 
14085  def get_version_info(self):
14086  r"""get_version_info(MoveStatisticsScoreState self) -> VersionInfo"""
14087  return _IMP_core.MoveStatisticsScoreState_get_version_info(self)
14088  __swig_destroy__ = _IMP_core.delete_MoveStatisticsScoreState
14089 
14090  def __str__(self):
14091  r"""__str__(MoveStatisticsScoreState self) -> std::string"""
14092  return _IMP_core.MoveStatisticsScoreState___str__(self)
14093 
14094  def __repr__(self):
14095  r"""__repr__(MoveStatisticsScoreState self) -> std::string"""
14096  return _IMP_core.MoveStatisticsScoreState___repr__(self)
14097 
14098  @staticmethod
14099  def get_from(o):
14100  return _object_cast_to_MoveStatisticsScoreState(o)
14101 
14102 
14103 # Register MoveStatisticsScoreState in _IMP_core:
14104 _IMP_core.MoveStatisticsScoreState_swigregister(MoveStatisticsScoreState)
14105 IMP_PARTICLE_TYPE_INDEX = _IMP_core.IMP_PARTICLE_TYPE_INDEX
14106 
14107 class Typed(IMP.Decorator):
14108  r"""Proxy of C++ IMP::core::Typed class."""
14109 
14110  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14111 
14112  @staticmethod
14113  def get_type_key():
14114  r"""get_type_key() -> IntKey"""
14115  return _IMP_core.Typed_get_type_key()
14116 
14117  def __init__(self, *args):
14118  r"""
14119  __init__(Typed self) -> Typed
14120  __init__(Typed self, Model m, ParticleIndex id) -> Typed
14121  __init__(Typed self, _ParticleAdaptor d) -> Typed
14122  """
14123  _IMP_core.Typed_swiginit(self, _IMP_core.new_Typed(*args))
14124 
14125  def show(self, *args):
14126  r"""show(Typed self, _ostream out=std::cout)"""
14127  return _IMP_core.Typed_show(self, *args)
14128 
14129  @staticmethod
14130  def setup_particle(*args):
14131  r"""
14132  setup_particle(Model m, ParticleIndex pi, ParticleType t) -> Typed
14133  setup_particle(_ParticleAdaptor pa, ParticleType t) -> Typed
14134  """
14135  return _IMP_core.Typed_setup_particle(*args)
14136 
14137  @staticmethod
14138  def get_is_setup(*args):
14139  r"""
14140  get_is_setup(_ParticleAdaptor p) -> bool
14141  get_is_setup(Model m, ParticleIndex pi) -> bool
14142  """
14143  return _IMP_core.Typed_get_is_setup(*args)
14144 
14145  def get_type(self):
14146  r"""get_type(Typed self) -> ParticleType"""
14147  return _IMP_core.Typed_get_type(self)
14148 
14149  def set_type(self, pt):
14150  r"""set_type(Typed self, ParticleType pt)"""
14151  return _IMP_core.Typed_set_type(self, pt)
14152 
14153  def add_attribute(self, *args):
14154  r"""
14155  add_attribute(Typed self, FloatKey k, IMP::Float v, bool opt)
14156  add_attribute(Typed self, FloatKey a0, IMP::Float a1)
14157  add_attribute(Typed self, IntKey a0, IMP::Int a1)
14158  add_attribute(Typed self, FloatsKey a0, IMP::Floats a1)
14159  add_attribute(Typed self, IntsKey a0, IMP::Ints a1)
14160  add_attribute(Typed self, StringKey a0, IMP::String a1)
14161  add_attribute(Typed self, ParticleIndexKey a0, Particle a1)
14162  add_attribute(Typed self, ObjectKey a0, Object a1)
14163  add_attribute(Typed self, SparseFloatKey a0, IMP::Float a1)
14164  add_attribute(Typed self, SparseIntKey a0, IMP::Int a1)
14165  add_attribute(Typed self, SparseStringKey a0, IMP::String a1)
14166  add_attribute(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14167  """
14168  return _IMP_core.Typed_add_attribute(self, *args)
14169 
14170  def get_value(self, *args):
14171  r"""
14172  get_value(Typed self, FloatKey a0) -> IMP::Float
14173  get_value(Typed self, IntKey a0) -> IMP::Int
14174  get_value(Typed self, FloatsKey a0) -> IMP::Floats
14175  get_value(Typed self, IntsKey a0) -> IMP::Ints
14176  get_value(Typed self, StringKey a0) -> IMP::String
14177  get_value(Typed self, ParticleIndexKey a0) -> Particle
14178  get_value(Typed self, ObjectKey a0) -> Object
14179  get_value(Typed self, SparseFloatKey a0) -> IMP::Float
14180  get_value(Typed self, SparseIntKey a0) -> IMP::Int
14181  get_value(Typed self, SparseStringKey a0) -> IMP::String
14182  get_value(Typed self, SparseParticleIndexKey a0) -> ParticleIndex
14183  """
14184  return _IMP_core.Typed_get_value(self, *args)
14185 
14186  def set_value(self, *args):
14187  r"""
14188  set_value(Typed self, FloatKey a0, IMP::Float a1)
14189  set_value(Typed self, IntKey a0, IMP::Int a1)
14190  set_value(Typed self, FloatsKey a0, IMP::Floats a1)
14191  set_value(Typed self, IntsKey a0, IMP::Ints a1)
14192  set_value(Typed self, StringKey a0, IMP::String a1)
14193  set_value(Typed self, ParticleIndexKey a0, Particle a1)
14194  set_value(Typed self, ObjectKey a0, Object a1)
14195  set_value(Typed self, SparseFloatKey a0, IMP::Float a1)
14196  set_value(Typed self, SparseIntKey a0, IMP::Int a1)
14197  set_value(Typed self, SparseStringKey a0, IMP::String a1)
14198  set_value(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14199  """
14200  return _IMP_core.Typed_set_value(self, *args)
14201 
14202  def remove_attribute(self, *args):
14203  r"""
14204  remove_attribute(Typed self, FloatKey a0)
14205  remove_attribute(Typed self, IntKey a0)
14206  remove_attribute(Typed self, FloatsKey a0)
14207  remove_attribute(Typed self, IntsKey a0)
14208  remove_attribute(Typed self, StringKey a0)
14209  remove_attribute(Typed self, ParticleIndexKey a0)
14210  remove_attribute(Typed self, ObjectKey a0)
14211  remove_attribute(Typed self, SparseFloatKey a0)
14212  remove_attribute(Typed self, SparseIntKey a0)
14213  remove_attribute(Typed self, SparseStringKey a0)
14214  remove_attribute(Typed self, SparseParticleIndexKey a0)
14215  """
14216  return _IMP_core.Typed_remove_attribute(self, *args)
14217 
14218  def has_attribute(self, *args):
14219  r"""
14220  has_attribute(Typed self, FloatKey a0) -> bool
14221  has_attribute(Typed self, IntKey a0) -> bool
14222  has_attribute(Typed self, FloatsKey a0) -> bool
14223  has_attribute(Typed self, IntsKey a0) -> bool
14224  has_attribute(Typed self, StringKey a0) -> bool
14225  has_attribute(Typed self, ParticleIndexKey a0) -> bool
14226  has_attribute(Typed self, ObjectKey a0) -> bool
14227  has_attribute(Typed self, SparseFloatKey a0) -> bool
14228  has_attribute(Typed self, SparseIntKey a0) -> bool
14229  has_attribute(Typed self, SparseStringKey a0) -> bool
14230  has_attribute(Typed self, SparseParticleIndexKey a0) -> bool
14231  """
14232  return _IMP_core.Typed_has_attribute(self, *args)
14233 
14234  def get_derivative(self, a0):
14235  r"""get_derivative(Typed self, FloatKey a0) -> double"""
14236  return _IMP_core.Typed_get_derivative(self, a0)
14237 
14238  def get_name(self):
14239  r"""get_name(Typed self) -> std::string"""
14240  return _IMP_core.Typed_get_name(self)
14241 
14242  def clear_caches(self):
14243  r"""clear_caches(Typed self)"""
14244  return _IMP_core.Typed_clear_caches(self)
14245 
14246  def set_name(self, a0):
14247  r"""set_name(Typed self, std::string a0)"""
14248  return _IMP_core.Typed_set_name(self, a0)
14249 
14250  def set_check_level(self, a0):
14251  r"""set_check_level(Typed self, IMP::CheckLevel a0)"""
14252  return _IMP_core.Typed_set_check_level(self, a0)
14253 
14254  def add_to_derivative(self, a0, a1, a2):
14255  r"""add_to_derivative(Typed self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14256  return _IMP_core.Typed_add_to_derivative(self, a0, a1, a2)
14257 
14258  def set_is_optimized(self, a0, a1):
14259  r"""set_is_optimized(Typed self, FloatKey a0, bool a1)"""
14260  return _IMP_core.Typed_set_is_optimized(self, a0, a1)
14261 
14262  def get_is_optimized(self, a0):
14263  r"""get_is_optimized(Typed self, FloatKey a0) -> bool"""
14264  return _IMP_core.Typed_get_is_optimized(self, a0)
14265 
14266  def get_check_level(self):
14267  r"""get_check_level(Typed self) -> IMP::CheckLevel"""
14268  return _IMP_core.Typed_get_check_level(self)
14269 
14270  def __eq__(self, *args):
14271  r"""
14272  __eq__(Typed self, Typed o) -> bool
14273  __eq__(Typed self, Particle d) -> bool
14274  """
14275  return _IMP_core.Typed___eq__(self, *args)
14276 
14277  def __ne__(self, *args):
14278  r"""
14279  __ne__(Typed self, Typed o) -> bool
14280  __ne__(Typed self, Particle d) -> bool
14281  """
14282  return _IMP_core.Typed___ne__(self, *args)
14283 
14284  def __le__(self, *args):
14285  r"""
14286  __le__(Typed self, Typed o) -> bool
14287  __le__(Typed self, Particle d) -> bool
14288  """
14289  return _IMP_core.Typed___le__(self, *args)
14290 
14291  def __lt__(self, *args):
14292  r"""
14293  __lt__(Typed self, Typed o) -> bool
14294  __lt__(Typed self, Particle d) -> bool
14295  """
14296  return _IMP_core.Typed___lt__(self, *args)
14297 
14298  def __ge__(self, *args):
14299  r"""
14300  __ge__(Typed self, Typed o) -> bool
14301  __ge__(Typed self, Particle d) -> bool
14302  """
14303  return _IMP_core.Typed___ge__(self, *args)
14304 
14305  def __gt__(self, *args):
14306  r"""
14307  __gt__(Typed self, Typed o) -> bool
14308  __gt__(Typed self, Particle d) -> bool
14309  """
14310  return _IMP_core.Typed___gt__(self, *args)
14311 
14312  def __hash__(self):
14313  r"""__hash__(Typed self) -> std::size_t"""
14314  return _IMP_core.Typed___hash__(self)
14315 
14316  def __str__(self):
14317  r"""__str__(Typed self) -> std::string"""
14318  return _IMP_core.Typed___str__(self)
14319 
14320  def __repr__(self):
14321  r"""__repr__(Typed self) -> std::string"""
14322  return _IMP_core.Typed___repr__(self)
14323 
14324  def _get_as_binary(self):
14325  r"""_get_as_binary(Typed self) -> PyObject *"""
14326  return _IMP_core.Typed__get_as_binary(self)
14327 
14328  def _set_from_binary(self, p):
14329  r"""_set_from_binary(Typed self, PyObject * p)"""
14330  return _IMP_core.Typed__set_from_binary(self, p)
14331 
14332  def __getstate__(self):
14333  p = self._get_as_binary()
14334  if len(self.__dict__) > 1:
14335  d = self.__dict__.copy()
14336  del d['this']
14337  p = (d, p)
14338  return p
14339 
14340  def __setstate__(self, p):
14341  if not hasattr(self, 'this'):
14342  self.__init__()
14343  if isinstance(p, tuple):
14344  d, p = p
14345  self.__dict__.update(d)
14346  return self._set_from_binary(p)
14347 
14348  __swig_destroy__ = _IMP_core.delete_Typed
14349 
14350 # Register Typed in _IMP_core:
14351 _IMP_core.Typed_swigregister(Typed)
14352 
14353 def __lshift__(*args):
14354  r"""
14355  __lshift__(_ostream out, XYZ n) -> _ostream
14356  __lshift__(_ostream out, XYZR n) -> _ostream
14357  __lshift__(_ostream out, Direction n) -> _ostream
14358  __lshift__(_ostream out, DirectionAngle n) -> _ostream
14359  __lshift__(_ostream out, Surface n) -> _ostream
14360  __lshift__(_ostream out, Centroid n) -> _ostream
14361  __lshift__(_ostream out, Cover n) -> _ostream
14362  __lshift__(_ostream out, Reference n) -> _ostream
14363  __lshift__(_ostream out, RigidMember n) -> _ostream
14364  __lshift__(_ostream out, RigidBody n) -> _ostream
14365  __lshift__(_ostream out, Gaussian n) -> _ostream
14366  __lshift__(_ostream out, Typed n) -> _ostream
14367  """
14368  return _IMP_core.__lshift__(*args)
14369 class WriteRestraintScoresOptimizerState(IMP.OptimizerState):
14370  r"""Proxy of C++ IMP::core::WriteRestraintScoresOptimizerState class."""
14371 
14372  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14373 
14374  def __init__(self, rs, out):
14375  r"""__init__(WriteRestraintScoresOptimizerState self, IMP::Restraints const & rs, TextOutput out) -> WriteRestraintScoresOptimizerState"""
14376  _IMP_core.WriteRestraintScoresOptimizerState_swiginit(self, _IMP_core.new_WriteRestraintScoresOptimizerState(rs, out))
14377 
14378  def get_version_info(self):
14379  r"""get_version_info(WriteRestraintScoresOptimizerState self) -> VersionInfo"""
14380  return _IMP_core.WriteRestraintScoresOptimizerState_get_version_info(self)
14381  __swig_destroy__ = _IMP_core.delete_WriteRestraintScoresOptimizerState
14382 
14383  def __str__(self):
14384  r"""__str__(WriteRestraintScoresOptimizerState self) -> std::string"""
14385  return _IMP_core.WriteRestraintScoresOptimizerState___str__(self)
14386 
14387  def __repr__(self):
14388  r"""__repr__(WriteRestraintScoresOptimizerState self) -> std::string"""
14389  return _IMP_core.WriteRestraintScoresOptimizerState___repr__(self)
14390 
14391  @staticmethod
14392  def get_from(o):
14393  return _object_cast_to_WriteRestraintScoresOptimizerState(o)
14394 
14395 
14396 # Register WriteRestraintScoresOptimizerState in _IMP_core:
14397 _IMP_core.WriteRestraintScoresOptimizerState_swigregister(WriteRestraintScoresOptimizerState)
14398 
14399 def assign_blame(rs, ps, attribute):
14400  r"""assign_blame(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, FloatKey attribute)"""
14401  return _IMP_core.assign_blame(rs, ps, attribute)
14402 
14403 def create_blame_geometries(*args):
14404  r"""create_blame_geometries(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, double max=NO_MAX, std::string name=std::string()) -> IMP::display::Geometries"""
14405  return _IMP_core.create_blame_geometries(*args)
14406 class MultipleBinormalRestraint(IMP.Restraint):
14407  r"""Proxy of C++ IMP::core::MultipleBinormalRestraint class."""
14408 
14409  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14410 
14411  def __init__(self, m, q1, q2):
14412  r"""__init__(MultipleBinormalRestraint self, Model m, IMP::ParticleIndexQuad const & q1, IMP::ParticleIndexQuad const & q2) -> MultipleBinormalRestraint"""
14413  _IMP_core.MultipleBinormalRestraint_swiginit(self, _IMP_core.new_MultipleBinormalRestraint(m, q1, q2))
14414 
14415  def add_term(self, term):
14416  r"""add_term(MultipleBinormalRestraint self, BinormalTerm term)"""
14417  return _IMP_core.MultipleBinormalRestraint_add_term(self, term)
14418 
14419  def do_get_inputs(self):
14420  r"""do_get_inputs(MultipleBinormalRestraint self) -> IMP::ModelObjectsTemp"""
14421  return _IMP_core.MultipleBinormalRestraint_do_get_inputs(self)
14422 
14423  def get_version_info(self):
14424  r"""get_version_info(MultipleBinormalRestraint self) -> VersionInfo"""
14425  return _IMP_core.MultipleBinormalRestraint_get_version_info(self)
14426  __swig_destroy__ = _IMP_core.delete_MultipleBinormalRestraint
14427 
14428  def __str__(self):
14429  r"""__str__(MultipleBinormalRestraint self) -> std::string"""
14430  return _IMP_core.MultipleBinormalRestraint___str__(self)
14431 
14432  def __repr__(self):
14433  r"""__repr__(MultipleBinormalRestraint self) -> std::string"""
14434  return _IMP_core.MultipleBinormalRestraint___repr__(self)
14435 
14436  @staticmethod
14437  def get_from(o):
14438  return _object_cast_to_MultipleBinormalRestraint(o)
14439 
14440 
14441 # Register MultipleBinormalRestraint in _IMP_core:
14442 _IMP_core.MultipleBinormalRestraint_swigregister(MultipleBinormalRestraint)
14443 class BinormalTerm(object):
14444  r"""Proxy of C++ IMP::core::BinormalTerm class."""
14445 
14446  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14447 
14448  def __init__(self):
14449  r"""__init__(BinormalTerm self) -> BinormalTerm"""
14450  _IMP_core.BinormalTerm_swiginit(self, _IMP_core.new_BinormalTerm())
14451 
14452  def set_correlation(self, correlation):
14453  r"""set_correlation(BinormalTerm self, double correlation)"""
14454  return _IMP_core.BinormalTerm_set_correlation(self, correlation)
14455 
14456  def set_weight(self, weight):
14457  r"""set_weight(BinormalTerm self, double weight)"""
14458  return _IMP_core.BinormalTerm_set_weight(self, weight)
14459 
14460  def set_means(self, means):
14461  r"""set_means(BinormalTerm self, IMP::FloatPair means)"""
14462  return _IMP_core.BinormalTerm_set_means(self, means)
14463 
14464  def set_standard_deviations(self, stdevs):
14465  r"""set_standard_deviations(BinormalTerm self, IMP::FloatPair stdevs)"""
14466  return _IMP_core.BinormalTerm_set_standard_deviations(self, stdevs)
14467 
14468  def show(self, *args):
14469  r"""show(BinormalTerm self, _ostream out=std::cout)"""
14470  return _IMP_core.BinormalTerm_show(self, *args)
14471 
14472  def __str__(self):
14473  r"""__str__(BinormalTerm self) -> std::string"""
14474  return _IMP_core.BinormalTerm___str__(self)
14475 
14476  def __repr__(self):
14477  r"""__repr__(BinormalTerm self) -> std::string"""
14478  return _IMP_core.BinormalTerm___repr__(self)
14479 
14480  def _get_as_binary(self):
14481  r"""_get_as_binary(BinormalTerm self) -> PyObject *"""
14482  return _IMP_core.BinormalTerm__get_as_binary(self)
14483 
14484  def _set_from_binary(self, p):
14485  r"""_set_from_binary(BinormalTerm self, PyObject * p)"""
14486  return _IMP_core.BinormalTerm__set_from_binary(self, p)
14487 
14488  def __getstate__(self):
14489  p = self._get_as_binary()
14490  if len(self.__dict__) > 1:
14491  d = self.__dict__.copy()
14492  del d['this']
14493  p = (d, p)
14494  return p
14495 
14496  def __setstate__(self, p):
14497  if not hasattr(self, 'this'):
14498  self.__init__()
14499  if isinstance(p, tuple):
14500  d, p = p
14501  self.__dict__.update(d)
14502  return self._set_from_binary(p)
14503 
14504  __swig_destroy__ = _IMP_core.delete_BinormalTerm
14505 
14506 # Register BinormalTerm in _IMP_core:
14507 _IMP_core.BinormalTerm_swigregister(BinormalTerm)
14508 class Provenance(IMP.Decorator):
14509  r"""Proxy of C++ IMP::core::Provenance class."""
14510 
14511  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14512 
14513  def get_previous(self):
14514  r"""get_previous(Provenance self) -> Provenance"""
14515  return _IMP_core.Provenance_get_previous(self)
14516 
14517  def set_previous(self, p):
14518  r"""set_previous(Provenance self, Provenance p)"""
14519  return _IMP_core.Provenance_set_previous(self, p)
14520 
14521  def __init__(self, *args):
14522  r"""
14523  __init__(Provenance self) -> Provenance
14524  __init__(Provenance self, Model m, ParticleIndex id) -> Provenance
14525  __init__(Provenance self, _ParticleAdaptor d) -> Provenance
14526  """
14527  _IMP_core.Provenance_swiginit(self, _IMP_core.new_Provenance(*args))
14528 
14529  @staticmethod
14530  def get_is_setup(*args):
14531  r"""
14532  get_is_setup(Model m, ParticleIndex pi) -> bool
14533  get_is_setup(_ParticleAdaptor p) -> bool
14534  """
14535  return _IMP_core.Provenance_get_is_setup(*args)
14536 
14537  def show(self, *args):
14538  r"""show(Provenance self, _ostream out=std::cout)"""
14539  return _IMP_core.Provenance_show(self, *args)
14540 
14541  @staticmethod
14542  def setup_particle(*args):
14543  r"""
14544  setup_particle(Model m, ParticleIndex pi) -> Provenance
14545  setup_particle(_ParticleAdaptor pa) -> Provenance
14546  """
14547  return _IMP_core.Provenance_setup_particle(*args)
14548 
14549  def add_attribute(self, *args):
14550  r"""
14551  add_attribute(Provenance self, FloatKey k, IMP::Float v, bool opt)
14552  add_attribute(Provenance self, FloatKey a0, IMP::Float a1)
14553  add_attribute(Provenance self, IntKey a0, IMP::Int a1)
14554  add_attribute(Provenance self, FloatsKey a0, IMP::Floats a1)
14555  add_attribute(Provenance self, IntsKey a0, IMP::Ints a1)
14556  add_attribute(Provenance self, StringKey a0, IMP::String a1)
14557  add_attribute(Provenance self, ParticleIndexKey a0, Particle a1)
14558  add_attribute(Provenance self, ObjectKey a0, Object a1)
14559  add_attribute(Provenance self, SparseFloatKey a0, IMP::Float a1)
14560  add_attribute(Provenance self, SparseIntKey a0, IMP::Int a1)
14561  add_attribute(Provenance self, SparseStringKey a0, IMP::String a1)
14562  add_attribute(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14563  """
14564  return _IMP_core.Provenance_add_attribute(self, *args)
14565 
14566  def get_value(self, *args):
14567  r"""
14568  get_value(Provenance self, FloatKey a0) -> IMP::Float
14569  get_value(Provenance self, IntKey a0) -> IMP::Int
14570  get_value(Provenance self, FloatsKey a0) -> IMP::Floats
14571  get_value(Provenance self, IntsKey a0) -> IMP::Ints
14572  get_value(Provenance self, StringKey a0) -> IMP::String
14573  get_value(Provenance self, ParticleIndexKey a0) -> Particle
14574  get_value(Provenance self, ObjectKey a0) -> Object
14575  get_value(Provenance self, SparseFloatKey a0) -> IMP::Float
14576  get_value(Provenance self, SparseIntKey a0) -> IMP::Int
14577  get_value(Provenance self, SparseStringKey a0) -> IMP::String
14578  get_value(Provenance self, SparseParticleIndexKey a0) -> ParticleIndex
14579  """
14580  return _IMP_core.Provenance_get_value(self, *args)
14581 
14582  def set_value(self, *args):
14583  r"""
14584  set_value(Provenance self, FloatKey a0, IMP::Float a1)
14585  set_value(Provenance self, IntKey a0, IMP::Int a1)
14586  set_value(Provenance self, FloatsKey a0, IMP::Floats a1)
14587  set_value(Provenance self, IntsKey a0, IMP::Ints a1)
14588  set_value(Provenance self, StringKey a0, IMP::String a1)
14589  set_value(Provenance self, ParticleIndexKey a0, Particle a1)
14590  set_value(Provenance self, ObjectKey a0, Object a1)
14591  set_value(Provenance self, SparseFloatKey a0, IMP::Float a1)
14592  set_value(Provenance self, SparseIntKey a0, IMP::Int a1)
14593  set_value(Provenance self, SparseStringKey a0, IMP::String a1)
14594  set_value(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14595  """
14596  return _IMP_core.Provenance_set_value(self, *args)
14597 
14598  def remove_attribute(self, *args):
14599  r"""
14600  remove_attribute(Provenance self, FloatKey a0)
14601  remove_attribute(Provenance self, IntKey a0)
14602  remove_attribute(Provenance self, FloatsKey a0)
14603  remove_attribute(Provenance self, IntsKey a0)
14604  remove_attribute(Provenance self, StringKey a0)
14605  remove_attribute(Provenance self, ParticleIndexKey a0)
14606  remove_attribute(Provenance self, ObjectKey a0)
14607  remove_attribute(Provenance self, SparseFloatKey a0)
14608  remove_attribute(Provenance self, SparseIntKey a0)
14609  remove_attribute(Provenance self, SparseStringKey a0)
14610  remove_attribute(Provenance self, SparseParticleIndexKey a0)
14611  """
14612  return _IMP_core.Provenance_remove_attribute(self, *args)
14613 
14614  def has_attribute(self, *args):
14615  r"""
14616  has_attribute(Provenance self, FloatKey a0) -> bool
14617  has_attribute(Provenance self, IntKey a0) -> bool
14618  has_attribute(Provenance self, FloatsKey a0) -> bool
14619  has_attribute(Provenance self, IntsKey a0) -> bool
14620  has_attribute(Provenance self, StringKey a0) -> bool
14621  has_attribute(Provenance self, ParticleIndexKey a0) -> bool
14622  has_attribute(Provenance self, ObjectKey a0) -> bool
14623  has_attribute(Provenance self, SparseFloatKey a0) -> bool
14624  has_attribute(Provenance self, SparseIntKey a0) -> bool
14625  has_attribute(Provenance self, SparseStringKey a0) -> bool
14626  has_attribute(Provenance self, SparseParticleIndexKey a0) -> bool
14627  """
14628  return _IMP_core.Provenance_has_attribute(self, *args)
14629 
14630  def get_derivative(self, a0):
14631  r"""get_derivative(Provenance self, FloatKey a0) -> double"""
14632  return _IMP_core.Provenance_get_derivative(self, a0)
14633 
14634  def get_name(self):
14635  r"""get_name(Provenance self) -> std::string"""
14636  return _IMP_core.Provenance_get_name(self)
14637 
14638  def clear_caches(self):
14639  r"""clear_caches(Provenance self)"""
14640  return _IMP_core.Provenance_clear_caches(self)
14641 
14642  def set_name(self, a0):
14643  r"""set_name(Provenance self, std::string a0)"""
14644  return _IMP_core.Provenance_set_name(self, a0)
14645 
14646  def set_check_level(self, a0):
14647  r"""set_check_level(Provenance self, IMP::CheckLevel a0)"""
14648  return _IMP_core.Provenance_set_check_level(self, a0)
14649 
14650  def add_to_derivative(self, a0, a1, a2):
14651  r"""add_to_derivative(Provenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14652  return _IMP_core.Provenance_add_to_derivative(self, a0, a1, a2)
14653 
14654  def set_is_optimized(self, a0, a1):
14655  r"""set_is_optimized(Provenance self, FloatKey a0, bool a1)"""
14656  return _IMP_core.Provenance_set_is_optimized(self, a0, a1)
14657 
14658  def get_is_optimized(self, a0):
14659  r"""get_is_optimized(Provenance self, FloatKey a0) -> bool"""
14660  return _IMP_core.Provenance_get_is_optimized(self, a0)
14661 
14662  def get_check_level(self):
14663  r"""get_check_level(Provenance self) -> IMP::CheckLevel"""
14664  return _IMP_core.Provenance_get_check_level(self)
14665 
14666  def __eq__(self, *args):
14667  r"""
14668  __eq__(Provenance self, Provenance o) -> bool
14669  __eq__(Provenance self, Particle d) -> bool
14670  """
14671  return _IMP_core.Provenance___eq__(self, *args)
14672 
14673  def __ne__(self, *args):
14674  r"""
14675  __ne__(Provenance self, Provenance o) -> bool
14676  __ne__(Provenance self, Particle d) -> bool
14677  """
14678  return _IMP_core.Provenance___ne__(self, *args)
14679 
14680  def __le__(self, *args):
14681  r"""
14682  __le__(Provenance self, Provenance o) -> bool
14683  __le__(Provenance self, Particle d) -> bool
14684  """
14685  return _IMP_core.Provenance___le__(self, *args)
14686 
14687  def __lt__(self, *args):
14688  r"""
14689  __lt__(Provenance self, Provenance o) -> bool
14690  __lt__(Provenance self, Particle d) -> bool
14691  """
14692  return _IMP_core.Provenance___lt__(self, *args)
14693 
14694  def __ge__(self, *args):
14695  r"""
14696  __ge__(Provenance self, Provenance o) -> bool
14697  __ge__(Provenance self, Particle d) -> bool
14698  """
14699  return _IMP_core.Provenance___ge__(self, *args)
14700 
14701  def __gt__(self, *args):
14702  r"""
14703  __gt__(Provenance self, Provenance o) -> bool
14704  __gt__(Provenance self, Particle d) -> bool
14705  """
14706  return _IMP_core.Provenance___gt__(self, *args)
14707 
14708  def __hash__(self):
14709  r"""__hash__(Provenance self) -> std::size_t"""
14710  return _IMP_core.Provenance___hash__(self)
14711 
14712  def __str__(self):
14713  r"""__str__(Provenance self) -> std::string"""
14714  return _IMP_core.Provenance___str__(self)
14715 
14716  def __repr__(self):
14717  r"""__repr__(Provenance self) -> std::string"""
14718  return _IMP_core.Provenance___repr__(self)
14719 
14720  def _get_as_binary(self):
14721  r"""_get_as_binary(Provenance self) -> PyObject *"""
14722  return _IMP_core.Provenance__get_as_binary(self)
14723 
14724  def _set_from_binary(self, p):
14725  r"""_set_from_binary(Provenance self, PyObject * p)"""
14726  return _IMP_core.Provenance__set_from_binary(self, p)
14727 
14728  def __getstate__(self):
14729  p = self._get_as_binary()
14730  if len(self.__dict__) > 1:
14731  d = self.__dict__.copy()
14732  del d['this']
14733  p = (d, p)
14734  return p
14735 
14736  def __setstate__(self, p):
14737  if not hasattr(self, 'this'):
14738  self.__init__()
14739  if isinstance(p, tuple):
14740  d, p = p
14741  self.__dict__.update(d)
14742  return self._set_from_binary(p)
14743 
14744  __swig_destroy__ = _IMP_core.delete_Provenance
14745 
14746 # Register Provenance in _IMP_core:
14747 _IMP_core.Provenance_swigregister(Provenance)
14748 class StructureProvenance(Provenance):
14749  r"""Proxy of C++ IMP::core::StructureProvenance class."""
14750 
14751  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14752 
14753  def set_filename(self, filename):
14754  r"""set_filename(StructureProvenance self, std::string filename)"""
14755  return _IMP_core.StructureProvenance_set_filename(self, filename)
14756 
14757  def get_filename(self):
14758  r"""get_filename(StructureProvenance self) -> std::string"""
14759  return _IMP_core.StructureProvenance_get_filename(self)
14760 
14761  def set_chain_id(self, chain_id):
14762  r"""set_chain_id(StructureProvenance self, std::string chain_id)"""
14763  return _IMP_core.StructureProvenance_set_chain_id(self, chain_id)
14764 
14765  def get_chain_id(self):
14766  r"""get_chain_id(StructureProvenance self) -> std::string"""
14767  return _IMP_core.StructureProvenance_get_chain_id(self)
14768 
14769  def set_residue_offset(self, residue_offset):
14770  r"""set_residue_offset(StructureProvenance self, int residue_offset)"""
14771  return _IMP_core.StructureProvenance_set_residue_offset(self, residue_offset)
14772 
14773  def get_residue_offset(self):
14774  r"""get_residue_offset(StructureProvenance self) -> int"""
14775  return _IMP_core.StructureProvenance_get_residue_offset(self)
14776 
14777  def __init__(self, *args):
14778  r"""
14779  __init__(StructureProvenance self) -> StructureProvenance
14780  __init__(StructureProvenance self, Model m, ParticleIndex id) -> StructureProvenance
14781  __init__(StructureProvenance self, _ParticleAdaptor d) -> StructureProvenance
14782  """
14783  _IMP_core.StructureProvenance_swiginit(self, _IMP_core.new_StructureProvenance(*args))
14784 
14785  @staticmethod
14786  def get_is_setup(*args):
14787  r"""
14788  get_is_setup(Model m, ParticleIndex pi) -> bool
14789  get_is_setup(_ParticleAdaptor p) -> bool
14790  """
14791  return _IMP_core.StructureProvenance_get_is_setup(*args)
14792 
14793  def show(self, *args):
14794  r"""show(StructureProvenance self, _ostream out=std::cout)"""
14795  return _IMP_core.StructureProvenance_show(self, *args)
14796 
14797  @staticmethod
14798  def setup_particle(*args):
14799  r"""
14800  setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14801  setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14802  setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id) -> StructureProvenance
14803  setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id) -> StructureProvenance
14804  setup_particle(Model m, ParticleIndex pi, StructureProvenance o) -> StructureProvenance
14805  setup_particle(_ParticleAdaptor pa, StructureProvenance o) -> StructureProvenance
14806  """
14807  return _IMP_core.StructureProvenance_setup_particle(*args)
14808 
14809  def add_attribute(self, *args):
14810  r"""
14811  add_attribute(StructureProvenance self, FloatKey k, IMP::Float v, bool opt)
14812  add_attribute(StructureProvenance self, FloatKey a0, IMP::Float a1)
14813  add_attribute(StructureProvenance self, IntKey a0, IMP::Int a1)
14814  add_attribute(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14815  add_attribute(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14816  add_attribute(StructureProvenance self, StringKey a0, IMP::String a1)
14817  add_attribute(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14818  add_attribute(StructureProvenance self, ObjectKey a0, Object a1)
14819  add_attribute(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14820  add_attribute(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14821  add_attribute(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14822  add_attribute(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14823  """
14824  return _IMP_core.StructureProvenance_add_attribute(self, *args)
14825 
14826  def get_value(self, *args):
14827  r"""
14828  get_value(StructureProvenance self, FloatKey a0) -> IMP::Float
14829  get_value(StructureProvenance self, IntKey a0) -> IMP::Int
14830  get_value(StructureProvenance self, FloatsKey a0) -> IMP::Floats
14831  get_value(StructureProvenance self, IntsKey a0) -> IMP::Ints
14832  get_value(StructureProvenance self, StringKey a0) -> IMP::String
14833  get_value(StructureProvenance self, ParticleIndexKey a0) -> Particle
14834  get_value(StructureProvenance self, ObjectKey a0) -> Object
14835  get_value(StructureProvenance self, SparseFloatKey a0) -> IMP::Float
14836  get_value(StructureProvenance self, SparseIntKey a0) -> IMP::Int
14837  get_value(StructureProvenance self, SparseStringKey a0) -> IMP::String
14838  get_value(StructureProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
14839  """
14840  return _IMP_core.StructureProvenance_get_value(self, *args)
14841 
14842  def set_value(self, *args):
14843  r"""
14844  set_value(StructureProvenance self, FloatKey a0, IMP::Float a1)
14845  set_value(StructureProvenance self, IntKey a0, IMP::Int a1)
14846  set_value(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14847  set_value(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14848  set_value(StructureProvenance self, StringKey a0, IMP::String a1)
14849  set_value(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14850  set_value(StructureProvenance self, ObjectKey a0, Object a1)
14851  set_value(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14852  set_value(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14853  set_value(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14854  set_value(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14855  """
14856  return _IMP_core.StructureProvenance_set_value(self, *args)
14857 
14858  def remove_attribute(self, *args):
14859  r"""
14860  remove_attribute(StructureProvenance self, FloatKey a0)
14861  remove_attribute(StructureProvenance self, IntKey a0)
14862  remove_attribute(StructureProvenance self, FloatsKey a0)
14863  remove_attribute(StructureProvenance self, IntsKey a0)
14864  remove_attribute(StructureProvenance self, StringKey a0)
14865  remove_attribute(StructureProvenance self, ParticleIndexKey a0)
14866  remove_attribute(StructureProvenance self, ObjectKey a0)
14867  remove_attribute(StructureProvenance self, SparseFloatKey a0)
14868  remove_attribute(StructureProvenance self, SparseIntKey a0)
14869  remove_attribute(StructureProvenance self, SparseStringKey a0)
14870  remove_attribute(StructureProvenance self, SparseParticleIndexKey a0)
14871  """
14872  return _IMP_core.StructureProvenance_remove_attribute(self, *args)
14873 
14874  def has_attribute(self, *args):
14875  r"""
14876  has_attribute(StructureProvenance self, FloatKey a0) -> bool
14877  has_attribute(StructureProvenance self, IntKey a0) -> bool
14878  has_attribute(StructureProvenance self, FloatsKey a0) -> bool
14879  has_attribute(StructureProvenance self, IntsKey a0) -> bool
14880  has_attribute(StructureProvenance self, StringKey a0) -> bool
14881  has_attribute(StructureProvenance self, ParticleIndexKey a0) -> bool
14882  has_attribute(StructureProvenance self, ObjectKey a0) -> bool
14883  has_attribute(StructureProvenance self, SparseFloatKey a0) -> bool
14884  has_attribute(StructureProvenance self, SparseIntKey a0) -> bool
14885  has_attribute(StructureProvenance self, SparseStringKey a0) -> bool
14886  has_attribute(StructureProvenance self, SparseParticleIndexKey a0) -> bool
14887  """
14888  return _IMP_core.StructureProvenance_has_attribute(self, *args)
14889 
14890  def get_derivative(self, a0):
14891  r"""get_derivative(StructureProvenance self, FloatKey a0) -> double"""
14892  return _IMP_core.StructureProvenance_get_derivative(self, a0)
14893 
14894  def get_name(self):
14895  r"""get_name(StructureProvenance self) -> std::string"""
14896  return _IMP_core.StructureProvenance_get_name(self)
14897 
14898  def clear_caches(self):
14899  r"""clear_caches(StructureProvenance self)"""
14900  return _IMP_core.StructureProvenance_clear_caches(self)
14901 
14902  def set_name(self, a0):
14903  r"""set_name(StructureProvenance self, std::string a0)"""
14904  return _IMP_core.StructureProvenance_set_name(self, a0)
14905 
14906  def set_check_level(self, a0):
14907  r"""set_check_level(StructureProvenance self, IMP::CheckLevel a0)"""
14908  return _IMP_core.StructureProvenance_set_check_level(self, a0)
14909 
14910  def add_to_derivative(self, a0, a1, a2):
14911  r"""add_to_derivative(StructureProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14912  return _IMP_core.StructureProvenance_add_to_derivative(self, a0, a1, a2)
14913 
14914  def set_is_optimized(self, a0, a1):
14915  r"""set_is_optimized(StructureProvenance self, FloatKey a0, bool a1)"""
14916  return _IMP_core.StructureProvenance_set_is_optimized(self, a0, a1)
14917 
14918  def get_is_optimized(self, a0):
14919  r"""get_is_optimized(StructureProvenance self, FloatKey a0) -> bool"""
14920  return _IMP_core.StructureProvenance_get_is_optimized(self, a0)
14921 
14922  def get_check_level(self):
14923  r"""get_check_level(StructureProvenance self) -> IMP::CheckLevel"""
14924  return _IMP_core.StructureProvenance_get_check_level(self)
14925 
14926  def __eq__(self, *args):
14927  r"""
14928  __eq__(StructureProvenance self, StructureProvenance o) -> bool
14929  __eq__(StructureProvenance self, Particle d) -> bool
14930  """
14931  return _IMP_core.StructureProvenance___eq__(self, *args)
14932 
14933  def __ne__(self, *args):
14934  r"""
14935  __ne__(StructureProvenance self, StructureProvenance o) -> bool
14936  __ne__(StructureProvenance self, Particle d) -> bool
14937  """
14938  return _IMP_core.StructureProvenance___ne__(self, *args)
14939 
14940  def __le__(self, *args):
14941  r"""
14942  __le__(StructureProvenance self, StructureProvenance o) -> bool
14943  __le__(StructureProvenance self, Particle d) -> bool
14944  """
14945  return _IMP_core.StructureProvenance___le__(self, *args)
14946 
14947  def __lt__(self, *args):
14948  r"""
14949  __lt__(StructureProvenance self, StructureProvenance o) -> bool
14950  __lt__(StructureProvenance self, Particle d) -> bool
14951  """
14952  return _IMP_core.StructureProvenance___lt__(self, *args)
14953 
14954  def __ge__(self, *args):
14955  r"""
14956  __ge__(StructureProvenance self, StructureProvenance o) -> bool
14957  __ge__(StructureProvenance self, Particle d) -> bool
14958  """
14959  return _IMP_core.StructureProvenance___ge__(self, *args)
14960 
14961  def __gt__(self, *args):
14962  r"""
14963  __gt__(StructureProvenance self, StructureProvenance o) -> bool
14964  __gt__(StructureProvenance self, Particle d) -> bool
14965  """
14966  return _IMP_core.StructureProvenance___gt__(self, *args)
14967 
14968  def __hash__(self):
14969  r"""__hash__(StructureProvenance self) -> std::size_t"""
14970  return _IMP_core.StructureProvenance___hash__(self)
14971 
14972  def __str__(self):
14973  r"""__str__(StructureProvenance self) -> std::string"""
14974  return _IMP_core.StructureProvenance___str__(self)
14975 
14976  def __repr__(self):
14977  r"""__repr__(StructureProvenance self) -> std::string"""
14978  return _IMP_core.StructureProvenance___repr__(self)
14979 
14980  def _get_as_binary(self):
14981  r"""_get_as_binary(StructureProvenance self) -> PyObject *"""
14982  return _IMP_core.StructureProvenance__get_as_binary(self)
14983 
14984  def _set_from_binary(self, p):
14985  r"""_set_from_binary(StructureProvenance self, PyObject * p)"""
14986  return _IMP_core.StructureProvenance__set_from_binary(self, p)
14987 
14988  def __getstate__(self):
14989  p = self._get_as_binary()
14990  if len(self.__dict__) > 1:
14991  d = self.__dict__.copy()
14992  del d['this']
14993  p = (d, p)
14994  return p
14995 
14996  def __setstate__(self, p):
14997  if not hasattr(self, 'this'):
14998  self.__init__()
14999  if isinstance(p, tuple):
15000  d, p = p
15001  self.__dict__.update(d)
15002  return self._set_from_binary(p)
15003 
15004  __swig_destroy__ = _IMP_core.delete_StructureProvenance
15005 
15006 # Register StructureProvenance in _IMP_core:
15007 _IMP_core.StructureProvenance_swigregister(StructureProvenance)
15008 class SampleProvenance(Provenance):
15009  r"""Proxy of C++ IMP::core::SampleProvenance class."""
15010 
15011  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15012 
15013  def set_method(self, method):
15014  r"""set_method(SampleProvenance self, std::string method)"""
15015  return _IMP_core.SampleProvenance_set_method(self, method)
15016 
15017  def get_method(self):
15018  r"""get_method(SampleProvenance self) -> std::string"""
15019  return _IMP_core.SampleProvenance_get_method(self)
15020 
15021  def set_number_of_frames(self, frames):
15022  r"""set_number_of_frames(SampleProvenance self, int frames)"""
15023  return _IMP_core.SampleProvenance_set_number_of_frames(self, frames)
15024 
15025  def get_number_of_frames(self):
15026  r"""get_number_of_frames(SampleProvenance self) -> int"""
15027  return _IMP_core.SampleProvenance_get_number_of_frames(self)
15028 
15029  def set_number_of_iterations(self, iterations):
15030  r"""set_number_of_iterations(SampleProvenance self, int iterations)"""
15031  return _IMP_core.SampleProvenance_set_number_of_iterations(self, iterations)
15032 
15033  def get_number_of_iterations(self):
15034  r"""get_number_of_iterations(SampleProvenance self) -> int"""
15035  return _IMP_core.SampleProvenance_get_number_of_iterations(self)
15036 
15037  def set_number_of_replicas(self, replicas):
15038  r"""set_number_of_replicas(SampleProvenance self, int replicas)"""
15039  return _IMP_core.SampleProvenance_set_number_of_replicas(self, replicas)
15040 
15041  def get_number_of_replicas(self):
15042  r"""get_number_of_replicas(SampleProvenance self) -> int"""
15043  return _IMP_core.SampleProvenance_get_number_of_replicas(self)
15044 
15045  def __init__(self, *args):
15046  r"""
15047  __init__(SampleProvenance self) -> SampleProvenance
15048  __init__(SampleProvenance self, Model m, ParticleIndex id) -> SampleProvenance
15049  __init__(SampleProvenance self, _ParticleAdaptor d) -> SampleProvenance
15050  """
15051  _IMP_core.SampleProvenance_swiginit(self, _IMP_core.new_SampleProvenance(*args))
15052 
15053  @staticmethod
15054  def get_is_setup(*args):
15055  r"""
15056  get_is_setup(Model m, ParticleIndex pi) -> bool
15057  get_is_setup(_ParticleAdaptor p) -> bool
15058  """
15059  return _IMP_core.SampleProvenance_get_is_setup(*args)
15060 
15061  def show(self, *args):
15062  r"""show(SampleProvenance self, _ostream out=std::cout)"""
15063  return _IMP_core.SampleProvenance_show(self, *args)
15064 
15065  @staticmethod
15066  def setup_particle(*args):
15067  r"""
15068  setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
15069  setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
15070  setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations) -> SampleProvenance
15071  setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations) -> SampleProvenance
15072  setup_particle(Model m, ParticleIndex pi, SampleProvenance o) -> SampleProvenance
15073  setup_particle(_ParticleAdaptor pa, SampleProvenance o) -> SampleProvenance
15074  """
15075  return _IMP_core.SampleProvenance_setup_particle(*args)
15076 
15077  def add_attribute(self, *args):
15078  r"""
15079  add_attribute(SampleProvenance self, FloatKey k, IMP::Float v, bool opt)
15080  add_attribute(SampleProvenance self, FloatKey a0, IMP::Float a1)
15081  add_attribute(SampleProvenance self, IntKey a0, IMP::Int a1)
15082  add_attribute(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
15083  add_attribute(SampleProvenance self, IntsKey a0, IMP::Ints a1)
15084  add_attribute(SampleProvenance self, StringKey a0, IMP::String a1)
15085  add_attribute(SampleProvenance self, ParticleIndexKey a0, Particle a1)
15086  add_attribute(SampleProvenance self, ObjectKey a0, Object a1)
15087  add_attribute(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
15088  add_attribute(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
15089  add_attribute(SampleProvenance self, SparseStringKey a0, IMP::String a1)
15090  add_attribute(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15091  """
15092  return _IMP_core.SampleProvenance_add_attribute(self, *args)
15093 
15094  def get_value(self, *args):
15095  r"""
15096  get_value(SampleProvenance self, FloatKey a0) -> IMP::Float
15097  get_value(SampleProvenance self, IntKey a0) -> IMP::Int
15098  get_value(SampleProvenance self, FloatsKey a0) -> IMP::Floats
15099  get_value(SampleProvenance self, IntsKey a0) -> IMP::Ints
15100  get_value(SampleProvenance self, StringKey a0) -> IMP::String
15101  get_value(SampleProvenance self, ParticleIndexKey a0) -> Particle
15102  get_value(SampleProvenance self, ObjectKey a0) -> Object
15103  get_value(SampleProvenance self, SparseFloatKey a0) -> IMP::Float
15104  get_value(SampleProvenance self, SparseIntKey a0) -> IMP::Int
15105  get_value(SampleProvenance self, SparseStringKey a0) -> IMP::String
15106  get_value(SampleProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15107  """
15108  return _IMP_core.SampleProvenance_get_value(self, *args)
15109 
15110  def set_value(self, *args):
15111  r"""
15112  set_value(SampleProvenance self, FloatKey a0, IMP::Float a1)
15113  set_value(SampleProvenance self, IntKey a0, IMP::Int a1)
15114  set_value(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
15115  set_value(SampleProvenance self, IntsKey a0, IMP::Ints a1)
15116  set_value(SampleProvenance self, StringKey a0, IMP::String a1)
15117  set_value(SampleProvenance self, ParticleIndexKey a0, Particle a1)
15118  set_value(SampleProvenance self, ObjectKey a0, Object a1)
15119  set_value(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
15120  set_value(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
15121  set_value(SampleProvenance self, SparseStringKey a0, IMP::String a1)
15122  set_value(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15123  """
15124  return _IMP_core.SampleProvenance_set_value(self, *args)
15125 
15126  def remove_attribute(self, *args):
15127  r"""
15128  remove_attribute(SampleProvenance self, FloatKey a0)
15129  remove_attribute(SampleProvenance self, IntKey a0)
15130  remove_attribute(SampleProvenance self, FloatsKey a0)
15131  remove_attribute(SampleProvenance self, IntsKey a0)
15132  remove_attribute(SampleProvenance self, StringKey a0)
15133  remove_attribute(SampleProvenance self, ParticleIndexKey a0)
15134  remove_attribute(SampleProvenance self, ObjectKey a0)
15135  remove_attribute(SampleProvenance self, SparseFloatKey a0)
15136  remove_attribute(SampleProvenance self, SparseIntKey a0)
15137  remove_attribute(SampleProvenance self, SparseStringKey a0)
15138  remove_attribute(SampleProvenance self, SparseParticleIndexKey a0)
15139  """
15140  return _IMP_core.SampleProvenance_remove_attribute(self, *args)
15141 
15142  def has_attribute(self, *args):
15143  r"""
15144  has_attribute(SampleProvenance self, FloatKey a0) -> bool
15145  has_attribute(SampleProvenance self, IntKey a0) -> bool
15146  has_attribute(SampleProvenance self, FloatsKey a0) -> bool
15147  has_attribute(SampleProvenance self, IntsKey a0) -> bool
15148  has_attribute(SampleProvenance self, StringKey a0) -> bool
15149  has_attribute(SampleProvenance self, ParticleIndexKey a0) -> bool
15150  has_attribute(SampleProvenance self, ObjectKey a0) -> bool
15151  has_attribute(SampleProvenance self, SparseFloatKey a0) -> bool
15152  has_attribute(SampleProvenance self, SparseIntKey a0) -> bool
15153  has_attribute(SampleProvenance self, SparseStringKey a0) -> bool
15154  has_attribute(SampleProvenance self, SparseParticleIndexKey a0) -> bool
15155  """
15156  return _IMP_core.SampleProvenance_has_attribute(self, *args)
15157 
15158  def get_derivative(self, a0):
15159  r"""get_derivative(SampleProvenance self, FloatKey a0) -> double"""
15160  return _IMP_core.SampleProvenance_get_derivative(self, a0)
15161 
15162  def get_name(self):
15163  r"""get_name(SampleProvenance self) -> std::string"""
15164  return _IMP_core.SampleProvenance_get_name(self)
15165 
15166  def clear_caches(self):
15167  r"""clear_caches(SampleProvenance self)"""
15168  return _IMP_core.SampleProvenance_clear_caches(self)
15169 
15170  def set_name(self, a0):
15171  r"""set_name(SampleProvenance self, std::string a0)"""
15172  return _IMP_core.SampleProvenance_set_name(self, a0)
15173 
15174  def set_check_level(self, a0):
15175  r"""set_check_level(SampleProvenance self, IMP::CheckLevel a0)"""
15176  return _IMP_core.SampleProvenance_set_check_level(self, a0)
15177 
15178  def add_to_derivative(self, a0, a1, a2):
15179  r"""add_to_derivative(SampleProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15180  return _IMP_core.SampleProvenance_add_to_derivative(self, a0, a1, a2)
15181 
15182  def set_is_optimized(self, a0, a1):
15183  r"""set_is_optimized(SampleProvenance self, FloatKey a0, bool a1)"""
15184  return _IMP_core.SampleProvenance_set_is_optimized(self, a0, a1)
15185 
15186  def get_is_optimized(self, a0):
15187  r"""get_is_optimized(SampleProvenance self, FloatKey a0) -> bool"""
15188  return _IMP_core.SampleProvenance_get_is_optimized(self, a0)
15189 
15190  def get_check_level(self):
15191  r"""get_check_level(SampleProvenance self) -> IMP::CheckLevel"""
15192  return _IMP_core.SampleProvenance_get_check_level(self)
15193 
15194  def __eq__(self, *args):
15195  r"""
15196  __eq__(SampleProvenance self, SampleProvenance o) -> bool
15197  __eq__(SampleProvenance self, Particle d) -> bool
15198  """
15199  return _IMP_core.SampleProvenance___eq__(self, *args)
15200 
15201  def __ne__(self, *args):
15202  r"""
15203  __ne__(SampleProvenance self, SampleProvenance o) -> bool
15204  __ne__(SampleProvenance self, Particle d) -> bool
15205  """
15206  return _IMP_core.SampleProvenance___ne__(self, *args)
15207 
15208  def __le__(self, *args):
15209  r"""
15210  __le__(SampleProvenance self, SampleProvenance o) -> bool
15211  __le__(SampleProvenance self, Particle d) -> bool
15212  """
15213  return _IMP_core.SampleProvenance___le__(self, *args)
15214 
15215  def __lt__(self, *args):
15216  r"""
15217  __lt__(SampleProvenance self, SampleProvenance o) -> bool
15218  __lt__(SampleProvenance self, Particle d) -> bool
15219  """
15220  return _IMP_core.SampleProvenance___lt__(self, *args)
15221 
15222  def __ge__(self, *args):
15223  r"""
15224  __ge__(SampleProvenance self, SampleProvenance o) -> bool
15225  __ge__(SampleProvenance self, Particle d) -> bool
15226  """
15227  return _IMP_core.SampleProvenance___ge__(self, *args)
15228 
15229  def __gt__(self, *args):
15230  r"""
15231  __gt__(SampleProvenance self, SampleProvenance o) -> bool
15232  __gt__(SampleProvenance self, Particle d) -> bool
15233  """
15234  return _IMP_core.SampleProvenance___gt__(self, *args)
15235 
15236  def __hash__(self):
15237  r"""__hash__(SampleProvenance self) -> std::size_t"""
15238  return _IMP_core.SampleProvenance___hash__(self)
15239 
15240  def __str__(self):
15241  r"""__str__(SampleProvenance self) -> std::string"""
15242  return _IMP_core.SampleProvenance___str__(self)
15243 
15244  def __repr__(self):
15245  r"""__repr__(SampleProvenance self) -> std::string"""
15246  return _IMP_core.SampleProvenance___repr__(self)
15247 
15248  def _get_as_binary(self):
15249  r"""_get_as_binary(SampleProvenance self) -> PyObject *"""
15250  return _IMP_core.SampleProvenance__get_as_binary(self)
15251 
15252  def _set_from_binary(self, p):
15253  r"""_set_from_binary(SampleProvenance self, PyObject * p)"""
15254  return _IMP_core.SampleProvenance__set_from_binary(self, p)
15255 
15256  def __getstate__(self):
15257  p = self._get_as_binary()
15258  if len(self.__dict__) > 1:
15259  d = self.__dict__.copy()
15260  del d['this']
15261  p = (d, p)
15262  return p
15263 
15264  def __setstate__(self, p):
15265  if not hasattr(self, 'this'):
15266  self.__init__()
15267  if isinstance(p, tuple):
15268  d, p = p
15269  self.__dict__.update(d)
15270  return self._set_from_binary(p)
15271 
15272  __swig_destroy__ = _IMP_core.delete_SampleProvenance
15273 
15274 # Register SampleProvenance in _IMP_core:
15275 _IMP_core.SampleProvenance_swigregister(SampleProvenance)
15276 class CombineProvenance(Provenance):
15277  r"""Proxy of C++ IMP::core::CombineProvenance class."""
15278 
15279  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15280 
15281  def set_number_of_frames(self, frames):
15282  r"""set_number_of_frames(CombineProvenance self, int frames)"""
15283  return _IMP_core.CombineProvenance_set_number_of_frames(self, frames)
15284 
15285  def get_number_of_frames(self):
15286  r"""get_number_of_frames(CombineProvenance self) -> int"""
15287  return _IMP_core.CombineProvenance_get_number_of_frames(self)
15288 
15289  def set_number_of_runs(self, runs):
15290  r"""set_number_of_runs(CombineProvenance self, int runs)"""
15291  return _IMP_core.CombineProvenance_set_number_of_runs(self, runs)
15292 
15293  def get_number_of_runs(self):
15294  r"""get_number_of_runs(CombineProvenance self) -> int"""
15295  return _IMP_core.CombineProvenance_get_number_of_runs(self)
15296 
15297  def __init__(self, *args):
15298  r"""
15299  __init__(CombineProvenance self) -> CombineProvenance
15300  __init__(CombineProvenance self, Model m, ParticleIndex id) -> CombineProvenance
15301  __init__(CombineProvenance self, _ParticleAdaptor d) -> CombineProvenance
15302  """
15303  _IMP_core.CombineProvenance_swiginit(self, _IMP_core.new_CombineProvenance(*args))
15304 
15305  @staticmethod
15306  def get_is_setup(*args):
15307  r"""
15308  get_is_setup(Model m, ParticleIndex pi) -> bool
15309  get_is_setup(_ParticleAdaptor p) -> bool
15310  """
15311  return _IMP_core.CombineProvenance_get_is_setup(*args)
15312 
15313  def show(self, *args):
15314  r"""show(CombineProvenance self, _ostream out=std::cout)"""
15315  return _IMP_core.CombineProvenance_show(self, *args)
15316 
15317  @staticmethod
15318  def setup_particle(*args):
15319  r"""
15320  setup_particle(Model m, ParticleIndex pi, int runs, int frames) -> CombineProvenance
15321  setup_particle(_ParticleAdaptor pa, int runs, int frames) -> CombineProvenance
15322  setup_particle(Model m, ParticleIndex pi, CombineProvenance o) -> CombineProvenance
15323  setup_particle(_ParticleAdaptor pa, CombineProvenance o) -> CombineProvenance
15324  """
15325  return _IMP_core.CombineProvenance_setup_particle(*args)
15326 
15327  def add_attribute(self, *args):
15328  r"""
15329  add_attribute(CombineProvenance self, FloatKey k, IMP::Float v, bool opt)
15330  add_attribute(CombineProvenance self, FloatKey a0, IMP::Float a1)
15331  add_attribute(CombineProvenance self, IntKey a0, IMP::Int a1)
15332  add_attribute(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15333  add_attribute(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15334  add_attribute(CombineProvenance self, StringKey a0, IMP::String a1)
15335  add_attribute(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15336  add_attribute(CombineProvenance self, ObjectKey a0, Object a1)
15337  add_attribute(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15338  add_attribute(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15339  add_attribute(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15340  add_attribute(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15341  """
15342  return _IMP_core.CombineProvenance_add_attribute(self, *args)
15343 
15344  def get_value(self, *args):
15345  r"""
15346  get_value(CombineProvenance self, FloatKey a0) -> IMP::Float
15347  get_value(CombineProvenance self, IntKey a0) -> IMP::Int
15348  get_value(CombineProvenance self, FloatsKey a0) -> IMP::Floats
15349  get_value(CombineProvenance self, IntsKey a0) -> IMP::Ints
15350  get_value(CombineProvenance self, StringKey a0) -> IMP::String
15351  get_value(CombineProvenance self, ParticleIndexKey a0) -> Particle
15352  get_value(CombineProvenance self, ObjectKey a0) -> Object
15353  get_value(CombineProvenance self, SparseFloatKey a0) -> IMP::Float
15354  get_value(CombineProvenance self, SparseIntKey a0) -> IMP::Int
15355  get_value(CombineProvenance self, SparseStringKey a0) -> IMP::String
15356  get_value(CombineProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15357  """
15358  return _IMP_core.CombineProvenance_get_value(self, *args)
15359 
15360  def set_value(self, *args):
15361  r"""
15362  set_value(CombineProvenance self, FloatKey a0, IMP::Float a1)
15363  set_value(CombineProvenance self, IntKey a0, IMP::Int a1)
15364  set_value(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15365  set_value(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15366  set_value(CombineProvenance self, StringKey a0, IMP::String a1)
15367  set_value(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15368  set_value(CombineProvenance self, ObjectKey a0, Object a1)
15369  set_value(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15370  set_value(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15371  set_value(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15372  set_value(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15373  """
15374  return _IMP_core.CombineProvenance_set_value(self, *args)
15375 
15376  def remove_attribute(self, *args):
15377  r"""
15378  remove_attribute(CombineProvenance self, FloatKey a0)
15379  remove_attribute(CombineProvenance self, IntKey a0)
15380  remove_attribute(CombineProvenance self, FloatsKey a0)
15381  remove_attribute(CombineProvenance self, IntsKey a0)
15382  remove_attribute(CombineProvenance self, StringKey a0)
15383  remove_attribute(CombineProvenance self, ParticleIndexKey a0)
15384  remove_attribute(CombineProvenance self, ObjectKey a0)
15385  remove_attribute(CombineProvenance self, SparseFloatKey a0)
15386  remove_attribute(CombineProvenance self, SparseIntKey a0)
15387  remove_attribute(CombineProvenance self, SparseStringKey a0)
15388  remove_attribute(CombineProvenance self, SparseParticleIndexKey a0)
15389  """
15390  return _IMP_core.CombineProvenance_remove_attribute(self, *args)
15391 
15392  def has_attribute(self, *args):
15393  r"""
15394  has_attribute(CombineProvenance self, FloatKey a0) -> bool
15395  has_attribute(CombineProvenance self, IntKey a0) -> bool
15396  has_attribute(CombineProvenance self, FloatsKey a0) -> bool
15397  has_attribute(CombineProvenance self, IntsKey a0) -> bool
15398  has_attribute(CombineProvenance self, StringKey a0) -> bool
15399  has_attribute(CombineProvenance self, ParticleIndexKey a0) -> bool
15400  has_attribute(CombineProvenance self, ObjectKey a0) -> bool
15401  has_attribute(CombineProvenance self, SparseFloatKey a0) -> bool
15402  has_attribute(CombineProvenance self, SparseIntKey a0) -> bool
15403  has_attribute(CombineProvenance self, SparseStringKey a0) -> bool
15404  has_attribute(CombineProvenance self, SparseParticleIndexKey a0) -> bool
15405  """
15406  return _IMP_core.CombineProvenance_has_attribute(self, *args)
15407 
15408  def get_derivative(self, a0):
15409  r"""get_derivative(CombineProvenance self, FloatKey a0) -> double"""
15410  return _IMP_core.CombineProvenance_get_derivative(self, a0)
15411 
15412  def get_name(self):
15413  r"""get_name(CombineProvenance self) -> std::string"""
15414  return _IMP_core.CombineProvenance_get_name(self)
15415 
15416  def clear_caches(self):
15417  r"""clear_caches(CombineProvenance self)"""
15418  return _IMP_core.CombineProvenance_clear_caches(self)
15419 
15420  def set_name(self, a0):
15421  r"""set_name(CombineProvenance self, std::string a0)"""
15422  return _IMP_core.CombineProvenance_set_name(self, a0)
15423 
15424  def set_check_level(self, a0):
15425  r"""set_check_level(CombineProvenance self, IMP::CheckLevel a0)"""
15426  return _IMP_core.CombineProvenance_set_check_level(self, a0)
15427 
15428  def add_to_derivative(self, a0, a1, a2):
15429  r"""add_to_derivative(CombineProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15430  return _IMP_core.CombineProvenance_add_to_derivative(self, a0, a1, a2)
15431 
15432  def set_is_optimized(self, a0, a1):
15433  r"""set_is_optimized(CombineProvenance self, FloatKey a0, bool a1)"""
15434  return _IMP_core.CombineProvenance_set_is_optimized(self, a0, a1)
15435 
15436  def get_is_optimized(self, a0):
15437  r"""get_is_optimized(CombineProvenance self, FloatKey a0) -> bool"""
15438  return _IMP_core.CombineProvenance_get_is_optimized(self, a0)
15439 
15440  def get_check_level(self):
15441  r"""get_check_level(CombineProvenance self) -> IMP::CheckLevel"""
15442  return _IMP_core.CombineProvenance_get_check_level(self)
15443 
15444  def __eq__(self, *args):
15445  r"""
15446  __eq__(CombineProvenance self, CombineProvenance o) -> bool
15447  __eq__(CombineProvenance self, Particle d) -> bool
15448  """
15449  return _IMP_core.CombineProvenance___eq__(self, *args)
15450 
15451  def __ne__(self, *args):
15452  r"""
15453  __ne__(CombineProvenance self, CombineProvenance o) -> bool
15454  __ne__(CombineProvenance self, Particle d) -> bool
15455  """
15456  return _IMP_core.CombineProvenance___ne__(self, *args)
15457 
15458  def __le__(self, *args):
15459  r"""
15460  __le__(CombineProvenance self, CombineProvenance o) -> bool
15461  __le__(CombineProvenance self, Particle d) -> bool
15462  """
15463  return _IMP_core.CombineProvenance___le__(self, *args)
15464 
15465  def __lt__(self, *args):
15466  r"""
15467  __lt__(CombineProvenance self, CombineProvenance o) -> bool
15468  __lt__(CombineProvenance self, Particle d) -> bool
15469  """
15470  return _IMP_core.CombineProvenance___lt__(self, *args)
15471 
15472  def __ge__(self, *args):
15473  r"""
15474  __ge__(CombineProvenance self, CombineProvenance o) -> bool
15475  __ge__(CombineProvenance self, Particle d) -> bool
15476  """
15477  return _IMP_core.CombineProvenance___ge__(self, *args)
15478 
15479  def __gt__(self, *args):
15480  r"""
15481  __gt__(CombineProvenance self, CombineProvenance o) -> bool
15482  __gt__(CombineProvenance self, Particle d) -> bool
15483  """
15484  return _IMP_core.CombineProvenance___gt__(self, *args)
15485 
15486  def __hash__(self):
15487  r"""__hash__(CombineProvenance self) -> std::size_t"""
15488  return _IMP_core.CombineProvenance___hash__(self)
15489 
15490  def __str__(self):
15491  r"""__str__(CombineProvenance self) -> std::string"""
15492  return _IMP_core.CombineProvenance___str__(self)
15493 
15494  def __repr__(self):
15495  r"""__repr__(CombineProvenance self) -> std::string"""
15496  return _IMP_core.CombineProvenance___repr__(self)
15497 
15498  def _get_as_binary(self):
15499  r"""_get_as_binary(CombineProvenance self) -> PyObject *"""
15500  return _IMP_core.CombineProvenance__get_as_binary(self)
15501 
15502  def _set_from_binary(self, p):
15503  r"""_set_from_binary(CombineProvenance self, PyObject * p)"""
15504  return _IMP_core.CombineProvenance__set_from_binary(self, p)
15505 
15506  def __getstate__(self):
15507  p = self._get_as_binary()
15508  if len(self.__dict__) > 1:
15509  d = self.__dict__.copy()
15510  del d['this']
15511  p = (d, p)
15512  return p
15513 
15514  def __setstate__(self, p):
15515  if not hasattr(self, 'this'):
15516  self.__init__()
15517  if isinstance(p, tuple):
15518  d, p = p
15519  self.__dict__.update(d)
15520  return self._set_from_binary(p)
15521 
15522  __swig_destroy__ = _IMP_core.delete_CombineProvenance
15523 
15524 # Register CombineProvenance in _IMP_core:
15525 _IMP_core.CombineProvenance_swigregister(CombineProvenance)
15526 class FilterProvenance(Provenance):
15527  r"""Proxy of C++ IMP::core::FilterProvenance class."""
15528 
15529  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15530 
15531  def set_method(self, method):
15532  r"""set_method(FilterProvenance self, std::string method)"""
15533  return _IMP_core.FilterProvenance_set_method(self, method)
15534 
15535  def get_method(self):
15536  r"""get_method(FilterProvenance self) -> std::string"""
15537  return _IMP_core.FilterProvenance_get_method(self)
15538 
15539  def set_number_of_frames(self, frames):
15540  r"""set_number_of_frames(FilterProvenance self, int frames)"""
15541  return _IMP_core.FilterProvenance_set_number_of_frames(self, frames)
15542 
15543  def get_number_of_frames(self):
15544  r"""get_number_of_frames(FilterProvenance self) -> int"""
15545  return _IMP_core.FilterProvenance_get_number_of_frames(self)
15546 
15547  def set_threshold(self, threshold):
15548  r"""set_threshold(FilterProvenance self, double threshold)"""
15549  return _IMP_core.FilterProvenance_set_threshold(self, threshold)
15550 
15551  def get_threshold(self):
15552  r"""get_threshold(FilterProvenance self) -> double"""
15553  return _IMP_core.FilterProvenance_get_threshold(self)
15554 
15555  def __init__(self, *args):
15556  r"""
15557  __init__(FilterProvenance self) -> FilterProvenance
15558  __init__(FilterProvenance self, Model m, ParticleIndex id) -> FilterProvenance
15559  __init__(FilterProvenance self, _ParticleAdaptor d) -> FilterProvenance
15560  """
15561  _IMP_core.FilterProvenance_swiginit(self, _IMP_core.new_FilterProvenance(*args))
15562 
15563  @staticmethod
15564  def get_is_setup(*args):
15565  r"""
15566  get_is_setup(Model m, ParticleIndex pi) -> bool
15567  get_is_setup(_ParticleAdaptor p) -> bool
15568  """
15569  return _IMP_core.FilterProvenance_get_is_setup(*args)
15570 
15571  def show(self, *args):
15572  r"""show(FilterProvenance self, _ostream out=std::cout)"""
15573  return _IMP_core.FilterProvenance_show(self, *args)
15574 
15575  @staticmethod
15576  def setup_particle(*args):
15577  r"""
15578  setup_particle(Model m, ParticleIndex pi, std::string method, double threshold, int frames) -> FilterProvenance
15579  setup_particle(_ParticleAdaptor pa, std::string method, double threshold, int frames) -> FilterProvenance
15580  setup_particle(Model m, ParticleIndex pi, FilterProvenance o) -> FilterProvenance
15581  setup_particle(_ParticleAdaptor pa, FilterProvenance o) -> FilterProvenance
15582  """
15583  return _IMP_core.FilterProvenance_setup_particle(*args)
15584 
15585  def add_attribute(self, *args):
15586  r"""
15587  add_attribute(FilterProvenance self, FloatKey k, IMP::Float v, bool opt)
15588  add_attribute(FilterProvenance self, FloatKey a0, IMP::Float a1)
15589  add_attribute(FilterProvenance self, IntKey a0, IMP::Int a1)
15590  add_attribute(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15591  add_attribute(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15592  add_attribute(FilterProvenance self, StringKey a0, IMP::String a1)
15593  add_attribute(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15594  add_attribute(FilterProvenance self, ObjectKey a0, Object a1)
15595  add_attribute(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15596  add_attribute(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15597  add_attribute(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15598  add_attribute(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15599  """
15600  return _IMP_core.FilterProvenance_add_attribute(self, *args)
15601 
15602  def get_value(self, *args):
15603  r"""
15604  get_value(FilterProvenance self, FloatKey a0) -> IMP::Float
15605  get_value(FilterProvenance self, IntKey a0) -> IMP::Int
15606  get_value(FilterProvenance self, FloatsKey a0) -> IMP::Floats
15607  get_value(FilterProvenance self, IntsKey a0) -> IMP::Ints
15608  get_value(FilterProvenance self, StringKey a0) -> IMP::String
15609  get_value(FilterProvenance self, ParticleIndexKey a0) -> Particle
15610  get_value(FilterProvenance self, ObjectKey a0) -> Object
15611  get_value(FilterProvenance self, SparseFloatKey a0) -> IMP::Float
15612  get_value(FilterProvenance self, SparseIntKey a0) -> IMP::Int
15613  get_value(FilterProvenance self, SparseStringKey a0) -> IMP::String
15614  get_value(FilterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15615  """
15616  return _IMP_core.FilterProvenance_get_value(self, *args)
15617 
15618  def set_value(self, *args):
15619  r"""
15620  set_value(FilterProvenance self, FloatKey a0, IMP::Float a1)
15621  set_value(FilterProvenance self, IntKey a0, IMP::Int a1)
15622  set_value(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15623  set_value(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15624  set_value(FilterProvenance self, StringKey a0, IMP::String a1)
15625  set_value(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15626  set_value(FilterProvenance self, ObjectKey a0, Object a1)
15627  set_value(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15628  set_value(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15629  set_value(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15630  set_value(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15631  """
15632  return _IMP_core.FilterProvenance_set_value(self, *args)
15633 
15634  def remove_attribute(self, *args):
15635  r"""
15636  remove_attribute(FilterProvenance self, FloatKey a0)
15637  remove_attribute(FilterProvenance self, IntKey a0)
15638  remove_attribute(FilterProvenance self, FloatsKey a0)
15639  remove_attribute(FilterProvenance self, IntsKey a0)
15640  remove_attribute(FilterProvenance self, StringKey a0)
15641  remove_attribute(FilterProvenance self, ParticleIndexKey a0)
15642  remove_attribute(FilterProvenance self, ObjectKey a0)
15643  remove_attribute(FilterProvenance self, SparseFloatKey a0)
15644  remove_attribute(FilterProvenance self, SparseIntKey a0)
15645  remove_attribute(FilterProvenance self, SparseStringKey a0)
15646  remove_attribute(FilterProvenance self, SparseParticleIndexKey a0)
15647  """
15648  return _IMP_core.FilterProvenance_remove_attribute(self, *args)
15649 
15650  def has_attribute(self, *args):
15651  r"""
15652  has_attribute(FilterProvenance self, FloatKey a0) -> bool
15653  has_attribute(FilterProvenance self, IntKey a0) -> bool
15654  has_attribute(FilterProvenance self, FloatsKey a0) -> bool
15655  has_attribute(FilterProvenance self, IntsKey a0) -> bool
15656  has_attribute(FilterProvenance self, StringKey a0) -> bool
15657  has_attribute(FilterProvenance self, ParticleIndexKey a0) -> bool
15658  has_attribute(FilterProvenance self, ObjectKey a0) -> bool
15659  has_attribute(FilterProvenance self, SparseFloatKey a0) -> bool
15660  has_attribute(FilterProvenance self, SparseIntKey a0) -> bool
15661  has_attribute(FilterProvenance self, SparseStringKey a0) -> bool
15662  has_attribute(FilterProvenance self, SparseParticleIndexKey a0) -> bool
15663  """
15664  return _IMP_core.FilterProvenance_has_attribute(self, *args)
15665 
15666  def get_derivative(self, a0):
15667  r"""get_derivative(FilterProvenance self, FloatKey a0) -> double"""
15668  return _IMP_core.FilterProvenance_get_derivative(self, a0)
15669 
15670  def get_name(self):
15671  r"""get_name(FilterProvenance self) -> std::string"""
15672  return _IMP_core.FilterProvenance_get_name(self)
15673 
15674  def clear_caches(self):
15675  r"""clear_caches(FilterProvenance self)"""
15676  return _IMP_core.FilterProvenance_clear_caches(self)
15677 
15678  def set_name(self, a0):
15679  r"""set_name(FilterProvenance self, std::string a0)"""
15680  return _IMP_core.FilterProvenance_set_name(self, a0)
15681 
15682  def set_check_level(self, a0):
15683  r"""set_check_level(FilterProvenance self, IMP::CheckLevel a0)"""
15684  return _IMP_core.FilterProvenance_set_check_level(self, a0)
15685 
15686  def add_to_derivative(self, a0, a1, a2):
15687  r"""add_to_derivative(FilterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15688  return _IMP_core.FilterProvenance_add_to_derivative(self, a0, a1, a2)
15689 
15690  def set_is_optimized(self, a0, a1):
15691  r"""set_is_optimized(FilterProvenance self, FloatKey a0, bool a1)"""
15692  return _IMP_core.FilterProvenance_set_is_optimized(self, a0, a1)
15693 
15694  def get_is_optimized(self, a0):
15695  r"""get_is_optimized(FilterProvenance self, FloatKey a0) -> bool"""
15696  return _IMP_core.FilterProvenance_get_is_optimized(self, a0)
15697 
15698  def get_check_level(self):
15699  r"""get_check_level(FilterProvenance self) -> IMP::CheckLevel"""
15700  return _IMP_core.FilterProvenance_get_check_level(self)
15701 
15702  def __eq__(self, *args):
15703  r"""
15704  __eq__(FilterProvenance self, FilterProvenance o) -> bool
15705  __eq__(FilterProvenance self, Particle d) -> bool
15706  """
15707  return _IMP_core.FilterProvenance___eq__(self, *args)
15708 
15709  def __ne__(self, *args):
15710  r"""
15711  __ne__(FilterProvenance self, FilterProvenance o) -> bool
15712  __ne__(FilterProvenance self, Particle d) -> bool
15713  """
15714  return _IMP_core.FilterProvenance___ne__(self, *args)
15715 
15716  def __le__(self, *args):
15717  r"""
15718  __le__(FilterProvenance self, FilterProvenance o) -> bool
15719  __le__(FilterProvenance self, Particle d) -> bool
15720  """
15721  return _IMP_core.FilterProvenance___le__(self, *args)
15722 
15723  def __lt__(self, *args):
15724  r"""
15725  __lt__(FilterProvenance self, FilterProvenance o) -> bool
15726  __lt__(FilterProvenance self, Particle d) -> bool
15727  """
15728  return _IMP_core.FilterProvenance___lt__(self, *args)
15729 
15730  def __ge__(self, *args):
15731  r"""
15732  __ge__(FilterProvenance self, FilterProvenance o) -> bool
15733  __ge__(FilterProvenance self, Particle d) -> bool
15734  """
15735  return _IMP_core.FilterProvenance___ge__(self, *args)
15736 
15737  def __gt__(self, *args):
15738  r"""
15739  __gt__(FilterProvenance self, FilterProvenance o) -> bool
15740  __gt__(FilterProvenance self, Particle d) -> bool
15741  """
15742  return _IMP_core.FilterProvenance___gt__(self, *args)
15743 
15744  def __hash__(self):
15745  r"""__hash__(FilterProvenance self) -> std::size_t"""
15746  return _IMP_core.FilterProvenance___hash__(self)
15747 
15748  def __str__(self):
15749  r"""__str__(FilterProvenance self) -> std::string"""
15750  return _IMP_core.FilterProvenance___str__(self)
15751 
15752  def __repr__(self):
15753  r"""__repr__(FilterProvenance self) -> std::string"""
15754  return _IMP_core.FilterProvenance___repr__(self)
15755 
15756  def _get_as_binary(self):
15757  r"""_get_as_binary(FilterProvenance self) -> PyObject *"""
15758  return _IMP_core.FilterProvenance__get_as_binary(self)
15759 
15760  def _set_from_binary(self, p):
15761  r"""_set_from_binary(FilterProvenance self, PyObject * p)"""
15762  return _IMP_core.FilterProvenance__set_from_binary(self, p)
15763 
15764  def __getstate__(self):
15765  p = self._get_as_binary()
15766  if len(self.__dict__) > 1:
15767  d = self.__dict__.copy()
15768  del d['this']
15769  p = (d, p)
15770  return p
15771 
15772  def __setstate__(self, p):
15773  if not hasattr(self, 'this'):
15774  self.__init__()
15775  if isinstance(p, tuple):
15776  d, p = p
15777  self.__dict__.update(d)
15778  return self._set_from_binary(p)
15779 
15780  __swig_destroy__ = _IMP_core.delete_FilterProvenance
15781 
15782 # Register FilterProvenance in _IMP_core:
15783 _IMP_core.FilterProvenance_swigregister(FilterProvenance)
15784 class ClusterProvenance(Provenance):
15785  r"""Proxy of C++ IMP::core::ClusterProvenance class."""
15786 
15787  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15788 
15789  def set_number_of_members(self, members):
15790  r"""set_number_of_members(ClusterProvenance self, int members)"""
15791  return _IMP_core.ClusterProvenance_set_number_of_members(self, members)
15792 
15793  def get_number_of_members(self):
15794  r"""get_number_of_members(ClusterProvenance self) -> int"""
15795  return _IMP_core.ClusterProvenance_get_number_of_members(self)
15796 
15797  def set_precision(self, precision):
15798  r"""set_precision(ClusterProvenance self, double precision)"""
15799  return _IMP_core.ClusterProvenance_set_precision(self, precision)
15800 
15801  def get_precision(self):
15802  r"""get_precision(ClusterProvenance self) -> double"""
15803  return _IMP_core.ClusterProvenance_get_precision(self)
15804 
15805  def set_density(self, density):
15806  r"""set_density(ClusterProvenance self, std::string density)"""
15807  return _IMP_core.ClusterProvenance_set_density(self, density)
15808 
15809  def get_density(self):
15810  r"""get_density(ClusterProvenance self) -> std::string"""
15811  return _IMP_core.ClusterProvenance_get_density(self)
15812 
15813  def __init__(self, *args):
15814  r"""
15815  __init__(ClusterProvenance self) -> ClusterProvenance
15816  __init__(ClusterProvenance self, Model m, ParticleIndex id) -> ClusterProvenance
15817  __init__(ClusterProvenance self, _ParticleAdaptor d) -> ClusterProvenance
15818  """
15819  _IMP_core.ClusterProvenance_swiginit(self, _IMP_core.new_ClusterProvenance(*args))
15820 
15821  @staticmethod
15822  def get_is_setup(*args):
15823  r"""
15824  get_is_setup(Model m, ParticleIndex pi) -> bool
15825  get_is_setup(_ParticleAdaptor p) -> bool
15826  """
15827  return _IMP_core.ClusterProvenance_get_is_setup(*args)
15828 
15829  def show(self, *args):
15830  r"""show(ClusterProvenance self, _ostream out=std::cout)"""
15831  return _IMP_core.ClusterProvenance_show(self, *args)
15832 
15833  @staticmethod
15834  def setup_particle(*args):
15835  r"""
15836  setup_particle(Model m, ParticleIndex pi, int members) -> ClusterProvenance
15837  setup_particle(_ParticleAdaptor pa, int members) -> ClusterProvenance
15838  setup_particle(Model m, ParticleIndex pi, int members, double precision) -> ClusterProvenance
15839  setup_particle(_ParticleAdaptor pa, int members, double precision) -> ClusterProvenance
15840  setup_particle(Model m, ParticleIndex pi, int members, double precision, std::string density) -> ClusterProvenance
15841  setup_particle(_ParticleAdaptor pa, int members, double precision, std::string density) -> ClusterProvenance
15842  setup_particle(Model m, ParticleIndex pi, ClusterProvenance o) -> ClusterProvenance
15843  setup_particle(_ParticleAdaptor pa, ClusterProvenance o) -> ClusterProvenance
15844  """
15845  return _IMP_core.ClusterProvenance_setup_particle(*args)
15846 
15847  def add_attribute(self, *args):
15848  r"""
15849  add_attribute(ClusterProvenance self, FloatKey k, IMP::Float v, bool opt)
15850  add_attribute(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15851  add_attribute(ClusterProvenance self, IntKey a0, IMP::Int a1)
15852  add_attribute(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15853  add_attribute(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15854  add_attribute(ClusterProvenance self, StringKey a0, IMP::String a1)
15855  add_attribute(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15856  add_attribute(ClusterProvenance self, ObjectKey a0, Object a1)
15857  add_attribute(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15858  add_attribute(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15859  add_attribute(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15860  add_attribute(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15861  """
15862  return _IMP_core.ClusterProvenance_add_attribute(self, *args)
15863 
15864  def get_value(self, *args):
15865  r"""
15866  get_value(ClusterProvenance self, FloatKey a0) -> IMP::Float
15867  get_value(ClusterProvenance self, IntKey a0) -> IMP::Int
15868  get_value(ClusterProvenance self, FloatsKey a0) -> IMP::Floats
15869  get_value(ClusterProvenance self, IntsKey a0) -> IMP::Ints
15870  get_value(ClusterProvenance self, StringKey a0) -> IMP::String
15871  get_value(ClusterProvenance self, ParticleIndexKey a0) -> Particle
15872  get_value(ClusterProvenance self, ObjectKey a0) -> Object
15873  get_value(ClusterProvenance self, SparseFloatKey a0) -> IMP::Float
15874  get_value(ClusterProvenance self, SparseIntKey a0) -> IMP::Int
15875  get_value(ClusterProvenance self, SparseStringKey a0) -> IMP::String
15876  get_value(ClusterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15877  """
15878  return _IMP_core.ClusterProvenance_get_value(self, *args)
15879 
15880  def set_value(self, *args):
15881  r"""
15882  set_value(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15883  set_value(ClusterProvenance self, IntKey a0, IMP::Int a1)
15884  set_value(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15885  set_value(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15886  set_value(ClusterProvenance self, StringKey a0, IMP::String a1)
15887  set_value(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15888  set_value(ClusterProvenance self, ObjectKey a0, Object a1)
15889  set_value(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15890  set_value(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15891  set_value(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15892  set_value(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15893  """
15894  return _IMP_core.ClusterProvenance_set_value(self, *args)
15895 
15896  def remove_attribute(self, *args):
15897  r"""
15898  remove_attribute(ClusterProvenance self, FloatKey a0)
15899  remove_attribute(ClusterProvenance self, IntKey a0)
15900  remove_attribute(ClusterProvenance self, FloatsKey a0)
15901  remove_attribute(ClusterProvenance self, IntsKey a0)
15902  remove_attribute(ClusterProvenance self, StringKey a0)
15903  remove_attribute(ClusterProvenance self, ParticleIndexKey a0)
15904  remove_attribute(ClusterProvenance self, ObjectKey a0)
15905  remove_attribute(ClusterProvenance self, SparseFloatKey a0)
15906  remove_attribute(ClusterProvenance self, SparseIntKey a0)
15907  remove_attribute(ClusterProvenance self, SparseStringKey a0)
15908  remove_attribute(ClusterProvenance self, SparseParticleIndexKey a0)
15909  """
15910  return _IMP_core.ClusterProvenance_remove_attribute(self, *args)
15911 
15912  def has_attribute(self, *args):
15913  r"""
15914  has_attribute(ClusterProvenance self, FloatKey a0) -> bool
15915  has_attribute(ClusterProvenance self, IntKey a0) -> bool
15916  has_attribute(ClusterProvenance self, FloatsKey a0) -> bool
15917  has_attribute(ClusterProvenance self, IntsKey a0) -> bool
15918  has_attribute(ClusterProvenance self, StringKey a0) -> bool
15919  has_attribute(ClusterProvenance self, ParticleIndexKey a0) -> bool
15920  has_attribute(ClusterProvenance self, ObjectKey a0) -> bool
15921  has_attribute(ClusterProvenance self, SparseFloatKey a0) -> bool
15922  has_attribute(ClusterProvenance self, SparseIntKey a0) -> bool
15923  has_attribute(ClusterProvenance self, SparseStringKey a0) -> bool
15924  has_attribute(ClusterProvenance self, SparseParticleIndexKey a0) -> bool
15925  """
15926  return _IMP_core.ClusterProvenance_has_attribute(self, *args)
15927 
15928  def get_derivative(self, a0):
15929  r"""get_derivative(ClusterProvenance self, FloatKey a0) -> double"""
15930  return _IMP_core.ClusterProvenance_get_derivative(self, a0)
15931 
15932  def get_name(self):
15933  r"""get_name(ClusterProvenance self) -> std::string"""
15934  return _IMP_core.ClusterProvenance_get_name(self)
15935 
15936  def clear_caches(self):
15937  r"""clear_caches(ClusterProvenance self)"""
15938  return _IMP_core.ClusterProvenance_clear_caches(self)
15939 
15940  def set_name(self, a0):
15941  r"""set_name(ClusterProvenance self, std::string a0)"""
15942  return _IMP_core.ClusterProvenance_set_name(self, a0)
15943 
15944  def set_check_level(self, a0):
15945  r"""set_check_level(ClusterProvenance self, IMP::CheckLevel a0)"""
15946  return _IMP_core.ClusterProvenance_set_check_level(self, a0)
15947 
15948  def add_to_derivative(self, a0, a1, a2):
15949  r"""add_to_derivative(ClusterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15950  return _IMP_core.ClusterProvenance_add_to_derivative(self, a0, a1, a2)
15951 
15952  def set_is_optimized(self, a0, a1):
15953  r"""set_is_optimized(ClusterProvenance self, FloatKey a0, bool a1)"""
15954  return _IMP_core.ClusterProvenance_set_is_optimized(self, a0, a1)
15955 
15956  def get_is_optimized(self, a0):
15957  r"""get_is_optimized(ClusterProvenance self, FloatKey a0) -> bool"""
15958  return _IMP_core.ClusterProvenance_get_is_optimized(self, a0)
15959 
15960  def get_check_level(self):
15961  r"""get_check_level(ClusterProvenance self) -> IMP::CheckLevel"""
15962  return _IMP_core.ClusterProvenance_get_check_level(self)
15963 
15964  def __eq__(self, *args):
15965  r"""
15966  __eq__(ClusterProvenance self, ClusterProvenance o) -> bool
15967  __eq__(ClusterProvenance self, Particle d) -> bool
15968  """
15969  return _IMP_core.ClusterProvenance___eq__(self, *args)
15970 
15971  def __ne__(self, *args):
15972  r"""
15973  __ne__(ClusterProvenance self, ClusterProvenance o) -> bool
15974  __ne__(ClusterProvenance self, Particle d) -> bool
15975  """
15976  return _IMP_core.ClusterProvenance___ne__(self, *args)
15977 
15978  def __le__(self, *args):
15979  r"""
15980  __le__(ClusterProvenance self, ClusterProvenance o) -> bool
15981  __le__(ClusterProvenance self, Particle d) -> bool
15982  """
15983  return _IMP_core.ClusterProvenance___le__(self, *args)
15984 
15985  def __lt__(self, *args):
15986  r"""
15987  __lt__(ClusterProvenance self, ClusterProvenance o) -> bool
15988  __lt__(ClusterProvenance self, Particle d) -> bool
15989  """
15990  return _IMP_core.ClusterProvenance___lt__(self, *args)
15991 
15992  def __ge__(self, *args):
15993  r"""
15994  __ge__(ClusterProvenance self, ClusterProvenance o) -> bool
15995  __ge__(ClusterProvenance self, Particle d) -> bool
15996  """
15997  return _IMP_core.ClusterProvenance___ge__(self, *args)
15998 
15999  def __gt__(self, *args):
16000  r"""
16001  __gt__(ClusterProvenance self, ClusterProvenance o) -> bool
16002  __gt__(ClusterProvenance self, Particle d) -> bool
16003  """
16004  return _IMP_core.ClusterProvenance___gt__(self, *args)
16005 
16006  def __hash__(self):
16007  r"""__hash__(ClusterProvenance self) -> std::size_t"""
16008  return _IMP_core.ClusterProvenance___hash__(self)
16009 
16010  def __str__(self):
16011  r"""__str__(ClusterProvenance self) -> std::string"""
16012  return _IMP_core.ClusterProvenance___str__(self)
16013 
16014  def __repr__(self):
16015  r"""__repr__(ClusterProvenance self) -> std::string"""
16016  return _IMP_core.ClusterProvenance___repr__(self)
16017 
16018  def _get_as_binary(self):
16019  r"""_get_as_binary(ClusterProvenance self) -> PyObject *"""
16020  return _IMP_core.ClusterProvenance__get_as_binary(self)
16021 
16022  def _set_from_binary(self, p):
16023  r"""_set_from_binary(ClusterProvenance self, PyObject * p)"""
16024  return _IMP_core.ClusterProvenance__set_from_binary(self, p)
16025 
16026  def __getstate__(self):
16027  p = self._get_as_binary()
16028  if len(self.__dict__) > 1:
16029  d = self.__dict__.copy()
16030  del d['this']
16031  p = (d, p)
16032  return p
16033 
16034  def __setstate__(self, p):
16035  if not hasattr(self, 'this'):
16036  self.__init__()
16037  if isinstance(p, tuple):
16038  d, p = p
16039  self.__dict__.update(d)
16040  return self._set_from_binary(p)
16041 
16042  __swig_destroy__ = _IMP_core.delete_ClusterProvenance
16043 
16044 # Register ClusterProvenance in _IMP_core:
16045 _IMP_core.ClusterProvenance_swigregister(ClusterProvenance)
16046 class ScriptProvenance(Provenance):
16047  r"""Proxy of C++ IMP::core::ScriptProvenance class."""
16048 
16049  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16050 
16051  def set_filename(self, filename):
16052  r"""set_filename(ScriptProvenance self, std::string filename)"""
16053  return _IMP_core.ScriptProvenance_set_filename(self, filename)
16054 
16055  def get_filename(self):
16056  r"""get_filename(ScriptProvenance self) -> std::string"""
16057  return _IMP_core.ScriptProvenance_get_filename(self)
16058 
16059  def __init__(self, *args):
16060  r"""
16061  __init__(ScriptProvenance self) -> ScriptProvenance
16062  __init__(ScriptProvenance self, Model m, ParticleIndex id) -> ScriptProvenance
16063  __init__(ScriptProvenance self, _ParticleAdaptor d) -> ScriptProvenance
16064  """
16065  _IMP_core.ScriptProvenance_swiginit(self, _IMP_core.new_ScriptProvenance(*args))
16066 
16067  @staticmethod
16068  def get_is_setup(*args):
16069  r"""
16070  get_is_setup(Model m, ParticleIndex pi) -> bool
16071  get_is_setup(_ParticleAdaptor p) -> bool
16072  """
16073  return _IMP_core.ScriptProvenance_get_is_setup(*args)
16074 
16075  def show(self, *args):
16076  r"""show(ScriptProvenance self, _ostream out=std::cout)"""
16077  return _IMP_core.ScriptProvenance_show(self, *args)
16078 
16079  @staticmethod
16080  def setup_particle(*args):
16081  r"""
16082  setup_particle(Model m, ParticleIndex pi, std::string filename) -> ScriptProvenance
16083  setup_particle(_ParticleAdaptor pa, std::string filename) -> ScriptProvenance
16084  setup_particle(Model m, ParticleIndex pi, ScriptProvenance o) -> ScriptProvenance
16085  setup_particle(_ParticleAdaptor pa, ScriptProvenance o) -> ScriptProvenance
16086  """
16087  return _IMP_core.ScriptProvenance_setup_particle(*args)
16088 
16089  def add_attribute(self, *args):
16090  r"""
16091  add_attribute(ScriptProvenance self, FloatKey k, IMP::Float v, bool opt)
16092  add_attribute(ScriptProvenance self, FloatKey a0, IMP::Float a1)
16093  add_attribute(ScriptProvenance self, IntKey a0, IMP::Int a1)
16094  add_attribute(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16095  add_attribute(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16096  add_attribute(ScriptProvenance self, StringKey a0, IMP::String a1)
16097  add_attribute(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16098  add_attribute(ScriptProvenance self, ObjectKey a0, Object a1)
16099  add_attribute(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16100  add_attribute(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16101  add_attribute(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16102  add_attribute(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16103  """
16104  return _IMP_core.ScriptProvenance_add_attribute(self, *args)
16105 
16106  def get_value(self, *args):
16107  r"""
16108  get_value(ScriptProvenance self, FloatKey a0) -> IMP::Float
16109  get_value(ScriptProvenance self, IntKey a0) -> IMP::Int
16110  get_value(ScriptProvenance self, FloatsKey a0) -> IMP::Floats
16111  get_value(ScriptProvenance self, IntsKey a0) -> IMP::Ints
16112  get_value(ScriptProvenance self, StringKey a0) -> IMP::String
16113  get_value(ScriptProvenance self, ParticleIndexKey a0) -> Particle
16114  get_value(ScriptProvenance self, ObjectKey a0) -> Object
16115  get_value(ScriptProvenance self, SparseFloatKey a0) -> IMP::Float
16116  get_value(ScriptProvenance self, SparseIntKey a0) -> IMP::Int
16117  get_value(ScriptProvenance self, SparseStringKey a0) -> IMP::String
16118  get_value(ScriptProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16119  """
16120  return _IMP_core.ScriptProvenance_get_value(self, *args)
16121 
16122  def set_value(self, *args):
16123  r"""
16124  set_value(ScriptProvenance self, FloatKey a0, IMP::Float a1)
16125  set_value(ScriptProvenance self, IntKey a0, IMP::Int a1)
16126  set_value(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16127  set_value(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16128  set_value(ScriptProvenance self, StringKey a0, IMP::String a1)
16129  set_value(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16130  set_value(ScriptProvenance self, ObjectKey a0, Object a1)
16131  set_value(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16132  set_value(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16133  set_value(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16134  set_value(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16135  """
16136  return _IMP_core.ScriptProvenance_set_value(self, *args)
16137 
16138  def remove_attribute(self, *args):
16139  r"""
16140  remove_attribute(ScriptProvenance self, FloatKey a0)
16141  remove_attribute(ScriptProvenance self, IntKey a0)
16142  remove_attribute(ScriptProvenance self, FloatsKey a0)
16143  remove_attribute(ScriptProvenance self, IntsKey a0)
16144  remove_attribute(ScriptProvenance self, StringKey a0)
16145  remove_attribute(ScriptProvenance self, ParticleIndexKey a0)
16146  remove_attribute(ScriptProvenance self, ObjectKey a0)
16147  remove_attribute(ScriptProvenance self, SparseFloatKey a0)
16148  remove_attribute(ScriptProvenance self, SparseIntKey a0)
16149  remove_attribute(ScriptProvenance self, SparseStringKey a0)
16150  remove_attribute(ScriptProvenance self, SparseParticleIndexKey a0)
16151  """
16152  return _IMP_core.ScriptProvenance_remove_attribute(self, *args)
16153 
16154  def has_attribute(self, *args):
16155  r"""
16156  has_attribute(ScriptProvenance self, FloatKey a0) -> bool
16157  has_attribute(ScriptProvenance self, IntKey a0) -> bool
16158  has_attribute(ScriptProvenance self, FloatsKey a0) -> bool
16159  has_attribute(ScriptProvenance self, IntsKey a0) -> bool
16160  has_attribute(ScriptProvenance self, StringKey a0) -> bool
16161  has_attribute(ScriptProvenance self, ParticleIndexKey a0) -> bool
16162  has_attribute(ScriptProvenance self, ObjectKey a0) -> bool
16163  has_attribute(ScriptProvenance self, SparseFloatKey a0) -> bool
16164  has_attribute(ScriptProvenance self, SparseIntKey a0) -> bool
16165  has_attribute(ScriptProvenance self, SparseStringKey a0) -> bool
16166  has_attribute(ScriptProvenance self, SparseParticleIndexKey a0) -> bool
16167  """
16168  return _IMP_core.ScriptProvenance_has_attribute(self, *args)
16169 
16170  def get_derivative(self, a0):
16171  r"""get_derivative(ScriptProvenance self, FloatKey a0) -> double"""
16172  return _IMP_core.ScriptProvenance_get_derivative(self, a0)
16173 
16174  def get_name(self):
16175  r"""get_name(ScriptProvenance self) -> std::string"""
16176  return _IMP_core.ScriptProvenance_get_name(self)
16177 
16178  def clear_caches(self):
16179  r"""clear_caches(ScriptProvenance self)"""
16180  return _IMP_core.ScriptProvenance_clear_caches(self)
16181 
16182  def set_name(self, a0):
16183  r"""set_name(ScriptProvenance self, std::string a0)"""
16184  return _IMP_core.ScriptProvenance_set_name(self, a0)
16185 
16186  def set_check_level(self, a0):
16187  r"""set_check_level(ScriptProvenance self, IMP::CheckLevel a0)"""
16188  return _IMP_core.ScriptProvenance_set_check_level(self, a0)
16189 
16190  def add_to_derivative(self, a0, a1, a2):
16191  r"""add_to_derivative(ScriptProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16192  return _IMP_core.ScriptProvenance_add_to_derivative(self, a0, a1, a2)
16193 
16194  def set_is_optimized(self, a0, a1):
16195  r"""set_is_optimized(ScriptProvenance self, FloatKey a0, bool a1)"""
16196  return _IMP_core.ScriptProvenance_set_is_optimized(self, a0, a1)
16197 
16198  def get_is_optimized(self, a0):
16199  r"""get_is_optimized(ScriptProvenance self, FloatKey a0) -> bool"""
16200  return _IMP_core.ScriptProvenance_get_is_optimized(self, a0)
16201 
16202  def get_check_level(self):
16203  r"""get_check_level(ScriptProvenance self) -> IMP::CheckLevel"""
16204  return _IMP_core.ScriptProvenance_get_check_level(self)
16205 
16206  def __eq__(self, *args):
16207  r"""
16208  __eq__(ScriptProvenance self, ScriptProvenance o) -> bool
16209  __eq__(ScriptProvenance self, Particle d) -> bool
16210  """
16211  return _IMP_core.ScriptProvenance___eq__(self, *args)
16212 
16213  def __ne__(self, *args):
16214  r"""
16215  __ne__(ScriptProvenance self, ScriptProvenance o) -> bool
16216  __ne__(ScriptProvenance self, Particle d) -> bool
16217  """
16218  return _IMP_core.ScriptProvenance___ne__(self, *args)
16219 
16220  def __le__(self, *args):
16221  r"""
16222  __le__(ScriptProvenance self, ScriptProvenance o) -> bool
16223  __le__(ScriptProvenance self, Particle d) -> bool
16224  """
16225  return _IMP_core.ScriptProvenance___le__(self, *args)
16226 
16227  def __lt__(self, *args):
16228  r"""
16229  __lt__(ScriptProvenance self, ScriptProvenance o) -> bool
16230  __lt__(ScriptProvenance self, Particle d) -> bool
16231  """
16232  return _IMP_core.ScriptProvenance___lt__(self, *args)
16233 
16234  def __ge__(self, *args):
16235  r"""
16236  __ge__(ScriptProvenance self, ScriptProvenance o) -> bool
16237  __ge__(ScriptProvenance self, Particle d) -> bool
16238  """
16239  return _IMP_core.ScriptProvenance___ge__(self, *args)
16240 
16241  def __gt__(self, *args):
16242  r"""
16243  __gt__(ScriptProvenance self, ScriptProvenance o) -> bool
16244  __gt__(ScriptProvenance self, Particle d) -> bool
16245  """
16246  return _IMP_core.ScriptProvenance___gt__(self, *args)
16247 
16248  def __hash__(self):
16249  r"""__hash__(ScriptProvenance self) -> std::size_t"""
16250  return _IMP_core.ScriptProvenance___hash__(self)
16251 
16252  def __str__(self):
16253  r"""__str__(ScriptProvenance self) -> std::string"""
16254  return _IMP_core.ScriptProvenance___str__(self)
16255 
16256  def __repr__(self):
16257  r"""__repr__(ScriptProvenance self) -> std::string"""
16258  return _IMP_core.ScriptProvenance___repr__(self)
16259 
16260  def _get_as_binary(self):
16261  r"""_get_as_binary(ScriptProvenance self) -> PyObject *"""
16262  return _IMP_core.ScriptProvenance__get_as_binary(self)
16263 
16264  def _set_from_binary(self, p):
16265  r"""_set_from_binary(ScriptProvenance self, PyObject * p)"""
16266  return _IMP_core.ScriptProvenance__set_from_binary(self, p)
16267 
16268  def __getstate__(self):
16269  p = self._get_as_binary()
16270  if len(self.__dict__) > 1:
16271  d = self.__dict__.copy()
16272  del d['this']
16273  p = (d, p)
16274  return p
16275 
16276  def __setstate__(self, p):
16277  if not hasattr(self, 'this'):
16278  self.__init__()
16279  if isinstance(p, tuple):
16280  d, p = p
16281  self.__dict__.update(d)
16282  return self._set_from_binary(p)
16283 
16284  __swig_destroy__ = _IMP_core.delete_ScriptProvenance
16285 
16286 # Register ScriptProvenance in _IMP_core:
16287 _IMP_core.ScriptProvenance_swigregister(ScriptProvenance)
16288 class SoftwareProvenance(Provenance):
16289  r"""Proxy of C++ IMP::core::SoftwareProvenance class."""
16290 
16291  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16292 
16293  def set_software_name(self, name):
16294  r"""set_software_name(SoftwareProvenance self, std::string name)"""
16295  return _IMP_core.SoftwareProvenance_set_software_name(self, name)
16296 
16297  def get_software_name(self):
16298  r"""get_software_name(SoftwareProvenance self) -> std::string"""
16299  return _IMP_core.SoftwareProvenance_get_software_name(self)
16300 
16301  def set_version(self, version):
16302  r"""set_version(SoftwareProvenance self, std::string version)"""
16303  return _IMP_core.SoftwareProvenance_set_version(self, version)
16304 
16305  def get_version(self):
16306  r"""get_version(SoftwareProvenance self) -> std::string"""
16307  return _IMP_core.SoftwareProvenance_get_version(self)
16308 
16309  def set_location(self, location):
16310  r"""set_location(SoftwareProvenance self, std::string location)"""
16311  return _IMP_core.SoftwareProvenance_set_location(self, location)
16312 
16313  def get_location(self):
16314  r"""get_location(SoftwareProvenance self) -> std::string"""
16315  return _IMP_core.SoftwareProvenance_get_location(self)
16316 
16317  def __init__(self, *args):
16318  r"""
16319  __init__(SoftwareProvenance self) -> SoftwareProvenance
16320  __init__(SoftwareProvenance self, Model m, ParticleIndex id) -> SoftwareProvenance
16321  __init__(SoftwareProvenance self, _ParticleAdaptor d) -> SoftwareProvenance
16322  """
16323  _IMP_core.SoftwareProvenance_swiginit(self, _IMP_core.new_SoftwareProvenance(*args))
16324 
16325  @staticmethod
16326  def get_is_setup(*args):
16327  r"""
16328  get_is_setup(Model m, ParticleIndex pi) -> bool
16329  get_is_setup(_ParticleAdaptor p) -> bool
16330  """
16331  return _IMP_core.SoftwareProvenance_get_is_setup(*args)
16332 
16333  def show(self, *args):
16334  r"""show(SoftwareProvenance self, _ostream out=std::cout)"""
16335  return _IMP_core.SoftwareProvenance_show(self, *args)
16336 
16337  @staticmethod
16338  def setup_particle(*args):
16339  r"""
16340  setup_particle(Model m, ParticleIndex pi, std::string name, std::string version, std::string location) -> SoftwareProvenance
16341  setup_particle(_ParticleAdaptor pa, std::string name, std::string version, std::string location) -> SoftwareProvenance
16342  setup_particle(Model m, ParticleIndex pi, SoftwareProvenance o) -> SoftwareProvenance
16343  setup_particle(_ParticleAdaptor pa, SoftwareProvenance o) -> SoftwareProvenance
16344  """
16345  return _IMP_core.SoftwareProvenance_setup_particle(*args)
16346 
16347  def add_attribute(self, *args):
16348  r"""
16349  add_attribute(SoftwareProvenance self, FloatKey k, IMP::Float v, bool opt)
16350  add_attribute(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16351  add_attribute(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16352  add_attribute(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16353  add_attribute(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16354  add_attribute(SoftwareProvenance self, StringKey a0, IMP::String a1)
16355  add_attribute(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16356  add_attribute(SoftwareProvenance self, ObjectKey a0, Object a1)
16357  add_attribute(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16358  add_attribute(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16359  add_attribute(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16360  add_attribute(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16361  """
16362  return _IMP_core.SoftwareProvenance_add_attribute(self, *args)
16363 
16364  def get_value(self, *args):
16365  r"""
16366  get_value(SoftwareProvenance self, FloatKey a0) -> IMP::Float
16367  get_value(SoftwareProvenance self, IntKey a0) -> IMP::Int
16368  get_value(SoftwareProvenance self, FloatsKey a0) -> IMP::Floats
16369  get_value(SoftwareProvenance self, IntsKey a0) -> IMP::Ints
16370  get_value(SoftwareProvenance self, StringKey a0) -> IMP::String
16371  get_value(SoftwareProvenance self, ParticleIndexKey a0) -> Particle
16372  get_value(SoftwareProvenance self, ObjectKey a0) -> Object
16373  get_value(SoftwareProvenance self, SparseFloatKey a0) -> IMP::Float
16374  get_value(SoftwareProvenance self, SparseIntKey a0) -> IMP::Int
16375  get_value(SoftwareProvenance self, SparseStringKey a0) -> IMP::String
16376  get_value(SoftwareProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16377  """
16378  return _IMP_core.SoftwareProvenance_get_value(self, *args)
16379 
16380  def set_value(self, *args):
16381  r"""
16382  set_value(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16383  set_value(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16384  set_value(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16385  set_value(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16386  set_value(SoftwareProvenance self, StringKey a0, IMP::String a1)
16387  set_value(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16388  set_value(SoftwareProvenance self, ObjectKey a0, Object a1)
16389  set_value(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16390  set_value(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16391  set_value(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16392  set_value(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16393  """
16394  return _IMP_core.SoftwareProvenance_set_value(self, *args)
16395 
16396  def remove_attribute(self, *args):
16397  r"""
16398  remove_attribute(SoftwareProvenance self, FloatKey a0)
16399  remove_attribute(SoftwareProvenance self, IntKey a0)
16400  remove_attribute(SoftwareProvenance self, FloatsKey a0)
16401  remove_attribute(SoftwareProvenance self, IntsKey a0)
16402  remove_attribute(SoftwareProvenance self, StringKey a0)
16403  remove_attribute(SoftwareProvenance self, ParticleIndexKey a0)
16404  remove_attribute(SoftwareProvenance self, ObjectKey a0)
16405  remove_attribute(SoftwareProvenance self, SparseFloatKey a0)
16406  remove_attribute(SoftwareProvenance self, SparseIntKey a0)
16407  remove_attribute(SoftwareProvenance self, SparseStringKey a0)
16408  remove_attribute(SoftwareProvenance self, SparseParticleIndexKey a0)
16409  """
16410  return _IMP_core.SoftwareProvenance_remove_attribute(self, *args)
16411 
16412  def has_attribute(self, *args):
16413  r"""
16414  has_attribute(SoftwareProvenance self, FloatKey a0) -> bool
16415  has_attribute(SoftwareProvenance self, IntKey a0) -> bool
16416  has_attribute(SoftwareProvenance self, FloatsKey a0) -> bool
16417  has_attribute(SoftwareProvenance self, IntsKey a0) -> bool
16418  has_attribute(SoftwareProvenance self, StringKey a0) -> bool
16419  has_attribute(SoftwareProvenance self, ParticleIndexKey a0) -> bool
16420  has_attribute(SoftwareProvenance self, ObjectKey a0) -> bool
16421  has_attribute(SoftwareProvenance self, SparseFloatKey a0) -> bool
16422  has_attribute(SoftwareProvenance self, SparseIntKey a0) -> bool
16423  has_attribute(SoftwareProvenance self, SparseStringKey a0) -> bool
16424  has_attribute(SoftwareProvenance self, SparseParticleIndexKey a0) -> bool
16425  """
16426  return _IMP_core.SoftwareProvenance_has_attribute(self, *args)
16427 
16428  def get_derivative(self, a0):
16429  r"""get_derivative(SoftwareProvenance self, FloatKey a0) -> double"""
16430  return _IMP_core.SoftwareProvenance_get_derivative(self, a0)
16431 
16432  def get_name(self):
16433  r"""get_name(SoftwareProvenance self) -> std::string"""
16434  return _IMP_core.SoftwareProvenance_get_name(self)
16435 
16436  def clear_caches(self):
16437  r"""clear_caches(SoftwareProvenance self)"""
16438  return _IMP_core.SoftwareProvenance_clear_caches(self)
16439 
16440  def set_name(self, a0):
16441  r"""set_name(SoftwareProvenance self, std::string a0)"""
16442  return _IMP_core.SoftwareProvenance_set_name(self, a0)
16443 
16444  def set_check_level(self, a0):
16445  r"""set_check_level(SoftwareProvenance self, IMP::CheckLevel a0)"""
16446  return _IMP_core.SoftwareProvenance_set_check_level(self, a0)
16447 
16448  def add_to_derivative(self, a0, a1, a2):
16449  r"""add_to_derivative(SoftwareProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16450  return _IMP_core.SoftwareProvenance_add_to_derivative(self, a0, a1, a2)
16451 
16452  def set_is_optimized(self, a0, a1):
16453  r"""set_is_optimized(SoftwareProvenance self, FloatKey a0, bool a1)"""
16454  return _IMP_core.SoftwareProvenance_set_is_optimized(self, a0, a1)
16455 
16456  def get_is_optimized(self, a0):
16457  r"""get_is_optimized(SoftwareProvenance self, FloatKey a0) -> bool"""
16458  return _IMP_core.SoftwareProvenance_get_is_optimized(self, a0)
16459 
16460  def get_check_level(self):
16461  r"""get_check_level(SoftwareProvenance self) -> IMP::CheckLevel"""
16462  return _IMP_core.SoftwareProvenance_get_check_level(self)
16463 
16464  def __eq__(self, *args):
16465  r"""
16466  __eq__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16467  __eq__(SoftwareProvenance self, Particle d) -> bool
16468  """
16469  return _IMP_core.SoftwareProvenance___eq__(self, *args)
16470 
16471  def __ne__(self, *args):
16472  r"""
16473  __ne__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16474  __ne__(SoftwareProvenance self, Particle d) -> bool
16475  """
16476  return _IMP_core.SoftwareProvenance___ne__(self, *args)
16477 
16478  def __le__(self, *args):
16479  r"""
16480  __le__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16481  __le__(SoftwareProvenance self, Particle d) -> bool
16482  """
16483  return _IMP_core.SoftwareProvenance___le__(self, *args)
16484 
16485  def __lt__(self, *args):
16486  r"""
16487  __lt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16488  __lt__(SoftwareProvenance self, Particle d) -> bool
16489  """
16490  return _IMP_core.SoftwareProvenance___lt__(self, *args)
16491 
16492  def __ge__(self, *args):
16493  r"""
16494  __ge__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16495  __ge__(SoftwareProvenance self, Particle d) -> bool
16496  """
16497  return _IMP_core.SoftwareProvenance___ge__(self, *args)
16498 
16499  def __gt__(self, *args):
16500  r"""
16501  __gt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16502  __gt__(SoftwareProvenance self, Particle d) -> bool
16503  """
16504  return _IMP_core.SoftwareProvenance___gt__(self, *args)
16505 
16506  def __hash__(self):
16507  r"""__hash__(SoftwareProvenance self) -> std::size_t"""
16508  return _IMP_core.SoftwareProvenance___hash__(self)
16509 
16510  def __str__(self):
16511  r"""__str__(SoftwareProvenance self) -> std::string"""
16512  return _IMP_core.SoftwareProvenance___str__(self)
16513 
16514  def __repr__(self):
16515  r"""__repr__(SoftwareProvenance self) -> std::string"""
16516  return _IMP_core.SoftwareProvenance___repr__(self)
16517 
16518  def _get_as_binary(self):
16519  r"""_get_as_binary(SoftwareProvenance self) -> PyObject *"""
16520  return _IMP_core.SoftwareProvenance__get_as_binary(self)
16521 
16522  def _set_from_binary(self, p):
16523  r"""_set_from_binary(SoftwareProvenance self, PyObject * p)"""
16524  return _IMP_core.SoftwareProvenance__set_from_binary(self, p)
16525 
16526  def __getstate__(self):
16527  p = self._get_as_binary()
16528  if len(self.__dict__) > 1:
16529  d = self.__dict__.copy()
16530  del d['this']
16531  p = (d, p)
16532  return p
16533 
16534  def __setstate__(self, p):
16535  if not hasattr(self, 'this'):
16536  self.__init__()
16537  if isinstance(p, tuple):
16538  d, p = p
16539  self.__dict__.update(d)
16540  return self._set_from_binary(p)
16541 
16542  __swig_destroy__ = _IMP_core.delete_SoftwareProvenance
16543 
16544 # Register SoftwareProvenance in _IMP_core:
16545 _IMP_core.SoftwareProvenance_swigregister(SoftwareProvenance)
16546 class Provenanced(IMP.Decorator):
16547  r"""Proxy of C++ IMP::core::Provenanced class."""
16548 
16549  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16550 
16551  def get_provenance(self):
16552  r"""get_provenance(Provenanced self) -> Provenance"""
16553  return _IMP_core.Provenanced_get_provenance(self)
16554 
16555  def set_provenance(self, p):
16556  r"""set_provenance(Provenanced self, Provenance p)"""
16557  return _IMP_core.Provenanced_set_provenance(self, p)
16558 
16559  def __init__(self, *args):
16560  r"""
16561  __init__(Provenanced self) -> Provenanced
16562  __init__(Provenanced self, Model m, ParticleIndex id) -> Provenanced
16563  __init__(Provenanced self, _ParticleAdaptor d) -> Provenanced
16564  """
16565  _IMP_core.Provenanced_swiginit(self, _IMP_core.new_Provenanced(*args))
16566 
16567  @staticmethod
16568  def get_is_setup(*args):
16569  r"""
16570  get_is_setup(Model m, ParticleIndex pi) -> bool
16571  get_is_setup(_ParticleAdaptor p) -> bool
16572  """
16573  return _IMP_core.Provenanced_get_is_setup(*args)
16574 
16575  def show(self, *args):
16576  r"""show(Provenanced self, _ostream out=std::cout)"""
16577  return _IMP_core.Provenanced_show(self, *args)
16578 
16579  @staticmethod
16580  def setup_particle(*args):
16581  r"""
16582  setup_particle(Model m, ParticleIndex pi, Provenance p) -> Provenanced
16583  setup_particle(_ParticleAdaptor pa, Provenance p) -> Provenanced
16584  """
16585  return _IMP_core.Provenanced_setup_particle(*args)
16586 
16587  def add_attribute(self, *args):
16588  r"""
16589  add_attribute(Provenanced self, FloatKey k, IMP::Float v, bool opt)
16590  add_attribute(Provenanced self, FloatKey a0, IMP::Float a1)
16591  add_attribute(Provenanced self, IntKey a0, IMP::Int a1)
16592  add_attribute(Provenanced self, FloatsKey a0, IMP::Floats a1)
16593  add_attribute(Provenanced self, IntsKey a0, IMP::Ints a1)
16594  add_attribute(Provenanced self, StringKey a0, IMP::String a1)
16595  add_attribute(Provenanced self, ParticleIndexKey a0, Particle a1)
16596  add_attribute(Provenanced self, ObjectKey a0, Object a1)
16597  add_attribute(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16598  add_attribute(Provenanced self, SparseIntKey a0, IMP::Int a1)
16599  add_attribute(Provenanced self, SparseStringKey a0, IMP::String a1)
16600  add_attribute(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16601  """
16602  return _IMP_core.Provenanced_add_attribute(self, *args)
16603 
16604  def get_value(self, *args):
16605  r"""
16606  get_value(Provenanced self, FloatKey a0) -> IMP::Float
16607  get_value(Provenanced self, IntKey a0) -> IMP::Int
16608  get_value(Provenanced self, FloatsKey a0) -> IMP::Floats
16609  get_value(Provenanced self, IntsKey a0) -> IMP::Ints
16610  get_value(Provenanced self, StringKey a0) -> IMP::String
16611  get_value(Provenanced self, ParticleIndexKey a0) -> Particle
16612  get_value(Provenanced self, ObjectKey a0) -> Object
16613  get_value(Provenanced self, SparseFloatKey a0) -> IMP::Float
16614  get_value(Provenanced self, SparseIntKey a0) -> IMP::Int
16615  get_value(Provenanced self, SparseStringKey a0) -> IMP::String
16616  get_value(Provenanced self, SparseParticleIndexKey a0) -> ParticleIndex
16617  """
16618  return _IMP_core.Provenanced_get_value(self, *args)
16619 
16620  def set_value(self, *args):
16621  r"""
16622  set_value(Provenanced self, FloatKey a0, IMP::Float a1)
16623  set_value(Provenanced self, IntKey a0, IMP::Int a1)
16624  set_value(Provenanced self, FloatsKey a0, IMP::Floats a1)
16625  set_value(Provenanced self, IntsKey a0, IMP::Ints a1)
16626  set_value(Provenanced self, StringKey a0, IMP::String a1)
16627  set_value(Provenanced self, ParticleIndexKey a0, Particle a1)
16628  set_value(Provenanced self, ObjectKey a0, Object a1)
16629  set_value(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16630  set_value(Provenanced self, SparseIntKey a0, IMP::Int a1)
16631  set_value(Provenanced self, SparseStringKey a0, IMP::String a1)
16632  set_value(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16633  """
16634  return _IMP_core.Provenanced_set_value(self, *args)
16635 
16636  def remove_attribute(self, *args):
16637  r"""
16638  remove_attribute(Provenanced self, FloatKey a0)
16639  remove_attribute(Provenanced self, IntKey a0)
16640  remove_attribute(Provenanced self, FloatsKey a0)
16641  remove_attribute(Provenanced self, IntsKey a0)
16642  remove_attribute(Provenanced self, StringKey a0)
16643  remove_attribute(Provenanced self, ParticleIndexKey a0)
16644  remove_attribute(Provenanced self, ObjectKey a0)
16645  remove_attribute(Provenanced self, SparseFloatKey a0)
16646  remove_attribute(Provenanced self, SparseIntKey a0)
16647  remove_attribute(Provenanced self, SparseStringKey a0)
16648  remove_attribute(Provenanced self, SparseParticleIndexKey a0)
16649  """
16650  return _IMP_core.Provenanced_remove_attribute(self, *args)
16651 
16652  def has_attribute(self, *args):
16653  r"""
16654  has_attribute(Provenanced self, FloatKey a0) -> bool
16655  has_attribute(Provenanced self, IntKey a0) -> bool
16656  has_attribute(Provenanced self, FloatsKey a0) -> bool
16657  has_attribute(Provenanced self, IntsKey a0) -> bool
16658  has_attribute(Provenanced self, StringKey a0) -> bool
16659  has_attribute(Provenanced self, ParticleIndexKey a0) -> bool
16660  has_attribute(Provenanced self, ObjectKey a0) -> bool
16661  has_attribute(Provenanced self, SparseFloatKey a0) -> bool
16662  has_attribute(Provenanced self, SparseIntKey a0) -> bool
16663  has_attribute(Provenanced self, SparseStringKey a0) -> bool
16664  has_attribute(Provenanced self, SparseParticleIndexKey a0) -> bool
16665  """
16666  return _IMP_core.Provenanced_has_attribute(self, *args)
16667 
16668  def get_derivative(self, a0):
16669  r"""get_derivative(Provenanced self, FloatKey a0) -> double"""
16670  return _IMP_core.Provenanced_get_derivative(self, a0)
16671 
16672  def get_name(self):
16673  r"""get_name(Provenanced self) -> std::string"""
16674  return _IMP_core.Provenanced_get_name(self)
16675 
16676  def clear_caches(self):
16677  r"""clear_caches(Provenanced self)"""
16678  return _IMP_core.Provenanced_clear_caches(self)
16679 
16680  def set_name(self, a0):
16681  r"""set_name(Provenanced self, std::string a0)"""
16682  return _IMP_core.Provenanced_set_name(self, a0)
16683 
16684  def set_check_level(self, a0):
16685  r"""set_check_level(Provenanced self, IMP::CheckLevel a0)"""
16686  return _IMP_core.Provenanced_set_check_level(self, a0)
16687 
16688  def add_to_derivative(self, a0, a1, a2):
16689  r"""add_to_derivative(Provenanced self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16690  return _IMP_core.Provenanced_add_to_derivative(self, a0, a1, a2)
16691 
16692  def set_is_optimized(self, a0, a1):
16693  r"""set_is_optimized(Provenanced self, FloatKey a0, bool a1)"""
16694  return _IMP_core.Provenanced_set_is_optimized(self, a0, a1)
16695 
16696  def get_is_optimized(self, a0):
16697  r"""get_is_optimized(Provenanced self, FloatKey a0) -> bool"""
16698  return _IMP_core.Provenanced_get_is_optimized(self, a0)
16699 
16700  def get_check_level(self):
16701  r"""get_check_level(Provenanced self) -> IMP::CheckLevel"""
16702  return _IMP_core.Provenanced_get_check_level(self)
16703 
16704  def __eq__(self, *args):
16705  r"""
16706  __eq__(Provenanced self, Provenanced o) -> bool
16707  __eq__(Provenanced self, Particle d) -> bool
16708  """
16709  return _IMP_core.Provenanced___eq__(self, *args)
16710 
16711  def __ne__(self, *args):
16712  r"""
16713  __ne__(Provenanced self, Provenanced o) -> bool
16714  __ne__(Provenanced self, Particle d) -> bool
16715  """
16716  return _IMP_core.Provenanced___ne__(self, *args)
16717 
16718  def __le__(self, *args):
16719  r"""
16720  __le__(Provenanced self, Provenanced o) -> bool
16721  __le__(Provenanced self, Particle d) -> bool
16722  """
16723  return _IMP_core.Provenanced___le__(self, *args)
16724 
16725  def __lt__(self, *args):
16726  r"""
16727  __lt__(Provenanced self, Provenanced o) -> bool
16728  __lt__(Provenanced self, Particle d) -> bool
16729  """
16730  return _IMP_core.Provenanced___lt__(self, *args)
16731 
16732  def __ge__(self, *args):
16733  r"""
16734  __ge__(Provenanced self, Provenanced o) -> bool
16735  __ge__(Provenanced self, Particle d) -> bool
16736  """
16737  return _IMP_core.Provenanced___ge__(self, *args)
16738 
16739  def __gt__(self, *args):
16740  r"""
16741  __gt__(Provenanced self, Provenanced o) -> bool
16742  __gt__(Provenanced self, Particle d) -> bool
16743  """
16744  return _IMP_core.Provenanced___gt__(self, *args)
16745 
16746  def __hash__(self):
16747  r"""__hash__(Provenanced self) -> std::size_t"""
16748  return _IMP_core.Provenanced___hash__(self)
16749 
16750  def __str__(self):
16751  r"""__str__(Provenanced self) -> std::string"""
16752  return _IMP_core.Provenanced___str__(self)
16753 
16754  def __repr__(self):
16755  r"""__repr__(Provenanced self) -> std::string"""
16756  return _IMP_core.Provenanced___repr__(self)
16757 
16758  def _get_as_binary(self):
16759  r"""_get_as_binary(Provenanced self) -> PyObject *"""
16760  return _IMP_core.Provenanced__get_as_binary(self)
16761 
16762  def _set_from_binary(self, p):
16763  r"""_set_from_binary(Provenanced self, PyObject * p)"""
16764  return _IMP_core.Provenanced__set_from_binary(self, p)
16765 
16766  def __getstate__(self):
16767  p = self._get_as_binary()
16768  if len(self.__dict__) > 1:
16769  d = self.__dict__.copy()
16770  del d['this']
16771  p = (d, p)
16772  return p
16773 
16774  def __setstate__(self, p):
16775  if not hasattr(self, 'this'):
16776  self.__init__()
16777  if isinstance(p, tuple):
16778  d, p = p
16779  self.__dict__.update(d)
16780  return self._set_from_binary(p)
16781 
16782  __swig_destroy__ = _IMP_core.delete_Provenanced
16783 
16784 # Register Provenanced in _IMP_core:
16785 _IMP_core.Provenanced_swigregister(Provenanced)
16786 
16787 def add_provenance(m, pi, p):
16788  r"""add_provenance(Model m, ParticleIndex pi, Provenance p)"""
16789  return _IMP_core.add_provenance(m, pi, p)
16790 
16791 def create_clone(p, m=None):
16792  r"""create_clone(Provenance p, Model m=None) -> Provenance"""
16793  return _IMP_core.create_clone(p, m)
16794 
16796  r"""
16797  get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16798  get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & b) -> Transformation3D
16799  get_transformation_aligning_first_to_second(IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16800  """
16801  return _IMP_core.get_transformation_aligning_first_to_second(*args)
16802 
16803 def create_restraint(ps, pp):
16804  r"""create_restraint(PairScore ps, IMP::ParticlePair pp) -> Restraint"""
16805  return _IMP_core.create_restraint(ps, pp)
16807  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::LOWER > class."""
16808 
16809  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16810 
16811  def __init__(self, *args):
16812  r"""
16813  __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicLowerBound
16814  __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicLowerBound
16815  """
16816  _IMP_core.TruncatedHarmonicLowerBound_swiginit(self, _IMP_core.new_TruncatedHarmonicLowerBound(*args))
16817 
16818  def get_version_info(self):
16819  r"""get_version_info(TruncatedHarmonicLowerBound self) -> VersionInfo"""
16820  return _IMP_core.TruncatedHarmonicLowerBound_get_version_info(self)
16821  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicLowerBound
16822 
16823  def __str__(self):
16824  r"""__str__(TruncatedHarmonicLowerBound self) -> std::string"""
16825  return _IMP_core.TruncatedHarmonicLowerBound___str__(self)
16826 
16827  def __repr__(self):
16828  r"""__repr__(TruncatedHarmonicLowerBound self) -> std::string"""
16829  return _IMP_core.TruncatedHarmonicLowerBound___repr__(self)
16830 
16831  @staticmethod
16832  def get_from(o):
16833  return _object_cast_to_TruncatedHarmonic(o)
16834 
16835 
16836 # Register TruncatedHarmonicLowerBound in _IMP_core:
16837 _IMP_core.TruncatedHarmonicLowerBound_swigregister(TruncatedHarmonicLowerBound)
16839  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::UPPER > class."""
16840 
16841  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16842 
16843  def __init__(self, *args):
16844  r"""
16845  __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicUpperBound
16846  __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicUpperBound
16847  """
16848  _IMP_core.TruncatedHarmonicUpperBound_swiginit(self, _IMP_core.new_TruncatedHarmonicUpperBound(*args))
16849 
16850  def get_version_info(self):
16851  r"""get_version_info(TruncatedHarmonicUpperBound self) -> VersionInfo"""
16852  return _IMP_core.TruncatedHarmonicUpperBound_get_version_info(self)
16853  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicUpperBound
16854 
16855  def __str__(self):
16856  r"""__str__(TruncatedHarmonicUpperBound self) -> std::string"""
16857  return _IMP_core.TruncatedHarmonicUpperBound___str__(self)
16858 
16859  def __repr__(self):
16860  r"""__repr__(TruncatedHarmonicUpperBound self) -> std::string"""
16861  return _IMP_core.TruncatedHarmonicUpperBound___repr__(self)
16862 
16863  @staticmethod
16864  def get_from(o):
16865  return _object_cast_to_TruncatedHarmonic(o)
16866 
16867 
16868 # Register TruncatedHarmonicUpperBound in _IMP_core:
16869 _IMP_core.TruncatedHarmonicUpperBound_swigregister(TruncatedHarmonicUpperBound)
16871  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::BOTH > class."""
16872 
16873  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16874 
16875  def __init__(self, *args):
16876  r"""
16877  __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicBound
16878  __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicBound
16879  """
16880  _IMP_core.TruncatedHarmonicBound_swiginit(self, _IMP_core.new_TruncatedHarmonicBound(*args))
16881 
16882  def get_version_info(self):
16883  r"""get_version_info(TruncatedHarmonicBound self) -> VersionInfo"""
16884  return _IMP_core.TruncatedHarmonicBound_get_version_info(self)
16885  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicBound
16886 
16887  def __str__(self):
16888  r"""__str__(TruncatedHarmonicBound self) -> std::string"""
16889  return _IMP_core.TruncatedHarmonicBound___str__(self)
16890 
16891  def __repr__(self):
16892  r"""__repr__(TruncatedHarmonicBound self) -> std::string"""
16893  return _IMP_core.TruncatedHarmonicBound___repr__(self)
16894 
16895  @staticmethod
16896  def get_from(o):
16897  return _object_cast_to_TruncatedHarmonic(o)
16898 
16899 
16900 # Register TruncatedHarmonicBound in _IMP_core:
16901 _IMP_core.TruncatedHarmonicBound_swigregister(TruncatedHarmonicBound)
16902 class ParticleType(IMP._Value):
16903  r"""Proxy of C++ IMP::Key< 34897493 > class."""
16904 
16905  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16906 
16907  def __init__(self, *args):
16908  r"""
16909  __init__(ParticleType self) -> ParticleType
16910  __init__(ParticleType self, std::string const & c, bool is_implicit_add_permitted=True) -> ParticleType
16911  __init__(ParticleType self, unsigned int i) -> ParticleType
16912  """
16913  _IMP_core.ParticleType_swiginit(self, _IMP_core.new_ParticleType(*args))
16914 
16915  @staticmethod
16916  def add_key(sc):
16917  r"""add_key(std::string sc) -> unsigned int"""
16918  return _IMP_core.ParticleType_add_key(sc)
16919 
16920  @staticmethod
16921  def get_key_exists(sc):
16922  r"""get_key_exists(std::string sc) -> bool"""
16923  return _IMP_core.ParticleType_get_key_exists(sc)
16924 
16925  def get_string(self):
16926  r"""get_string(ParticleType self) -> std::string const"""
16927  return _IMP_core.ParticleType_get_string(self)
16928 
16929  def __cmp__(self, o):
16930  r"""__cmp__(ParticleType self, ParticleType o) -> int"""
16931  return _IMP_core.ParticleType___cmp__(self, o)
16932 
16933  def __eq__(self, o):
16934  r"""__eq__(ParticleType self, ParticleType o) -> bool"""
16935  return _IMP_core.ParticleType___eq__(self, o)
16936 
16937  def __ne__(self, o):
16938  r"""__ne__(ParticleType self, ParticleType o) -> bool"""
16939  return _IMP_core.ParticleType___ne__(self, o)
16940 
16941  def __lt__(self, o):
16942  r"""__lt__(ParticleType self, ParticleType o) -> bool"""
16943  return _IMP_core.ParticleType___lt__(self, o)
16944 
16945  def __gt__(self, o):
16946  r"""__gt__(ParticleType self, ParticleType o) -> bool"""
16947  return _IMP_core.ParticleType___gt__(self, o)
16948 
16949  def __ge__(self, o):
16950  r"""__ge__(ParticleType self, ParticleType o) -> bool"""
16951  return _IMP_core.ParticleType___ge__(self, o)
16952 
16953  def __le__(self, o):
16954  r"""__le__(ParticleType self, ParticleType o) -> bool"""
16955  return _IMP_core.ParticleType___le__(self, o)
16956 
16957  def __hash__(self):
16958  r"""__hash__(ParticleType self) -> std::size_t"""
16959  return _IMP_core.ParticleType___hash__(self)
16960 
16961  def show(self, *args):
16962  r"""show(ParticleType self, _ostream out=std::cout)"""
16963  return _IMP_core.ParticleType_show(self, *args)
16964 
16965  @staticmethod
16966  def add_alias(old_key, new_name):
16967  r"""add_alias(ParticleType old_key, std::string new_name) -> ParticleType"""
16968  return _IMP_core.ParticleType_add_alias(old_key, new_name)
16969 
16970  @staticmethod
16971  def get_number_of_keys():
16972  r"""get_number_of_keys() -> unsigned int"""
16973  return _IMP_core.ParticleType_get_number_of_keys()
16974 
16975  def get_index(self):
16976  r"""get_index(ParticleType self) -> unsigned int"""
16977  return _IMP_core.ParticleType_get_index(self)
16978 
16979  @staticmethod
16980  def show_all(out):
16981  r"""show_all(_ostream out)"""
16982  return _IMP_core.ParticleType_show_all(out)
16983 
16984  @staticmethod
16985  def get_all_strings():
16986  r"""get_all_strings() -> IMP::Vector< std::string >"""
16987  return _IMP_core.ParticleType_get_all_strings()
16988 
16989  @staticmethod
16990  def get_number_unique():
16991  r"""get_number_unique() -> unsigned int"""
16992  return _IMP_core.ParticleType_get_number_unique()
16993 
16994  def __str__(self):
16995  r"""__str__(ParticleType self) -> std::string"""
16996  return _IMP_core.ParticleType___str__(self)
16997 
16998  def __repr__(self):
16999  r"""__repr__(ParticleType self) -> std::string"""
17000  return _IMP_core.ParticleType___repr__(self)
17001  __swig_destroy__ = _IMP_core.delete_ParticleType
17002 
17003 # Register ParticleType in _IMP_core:
17004 _IMP_core.ParticleType_swigregister(ParticleType)
17006  r"""Proxy of C++ IMP::core::GenericAttributeSingletonScore< UnaryFunction > class."""
17007 
17008  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17009  __repr__ = _swig_repr
17010 
17011  def __init__(self, f, k):
17012  r"""__init__(AttributeSingletonScore self, UnaryFunction f, FloatKey k) -> AttributeSingletonScore"""
17013  _IMP_core.AttributeSingletonScore_swiginit(self, _IMP_core.new_AttributeSingletonScore(f, k))
17014 
17015  def do_get_inputs(self, m, pis):
17016  r"""do_get_inputs(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17017  return _IMP_core.AttributeSingletonScore_do_get_inputs(self, m, pis)
17018 
17019  def get_unary_function(self):
17020  r"""get_unary_function(AttributeSingletonScore self) -> UnaryFunction"""
17021  return _IMP_core.AttributeSingletonScore_get_unary_function(self)
17022 
17023  def get_key(self):
17024  r"""get_key(AttributeSingletonScore self) -> FloatKey"""
17025  return _IMP_core.AttributeSingletonScore_get_key(self)
17026 
17027  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17028  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"""
17029  return _IMP_core.AttributeSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17030 
17031  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17032  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"""
17033  return _IMP_core.AttributeSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17034 
17035  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17036  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"""
17037  return _IMP_core.AttributeSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17038 
17039  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17040  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"""
17041  return _IMP_core.AttributeSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17042 
17043  def get_version_info(self):
17044  r"""get_version_info(AttributeSingletonScore self) -> VersionInfo"""
17045  return _IMP_core.AttributeSingletonScore_get_version_info(self)
17046  __swig_destroy__ = _IMP_core.delete_AttributeSingletonScore
17047 
17048  @staticmethod
17049  def get_from(o):
17050  return _object_cast_to_AttributeSingletonScore(o)
17051 
17052 
17053  def _get_jax(self, m, indexes, space):
17054  def score_float_key(jm, key, uf):
17055  return uf(jm[key][indexes])
17056 
17057  def score_xyz_key(jm, xyz_index, uf):
17058  return uf(jm['xyz'][indexes, xyz_index])
17059 
17060  uf = self.get_unary_function().get_derived_object()._get_jax()
17061  key = self.get_key()
17062  # First 7 FloatKeys are reserved in IMP and have to be handled
17063  # specially
17064  if key.get_index() >= 7:
17065  need_keys = [key]
17066  f = functools.partial(score_float_key, key=key.get_string(), uf=uf)
17067  elif key == XYZR.get_radius_key():
17068  need_keys = [] # We already have the radius in the JAX model
17069  f = functools.partial(score_float_key, key='r', uf=uf)
17070  elif key in XYZ.get_xyz_keys():
17071  need_keys = [] # We already have coordinates in the JAX model
17072  xyz_index = XYZ.get_xyz_keys().index(key)
17073  f = functools.partial(score_xyz_key, xyz_index=xyz_index, uf=uf)
17074  else:
17075  raise NotImplementedError("No support for key %s" % key)
17076  return self._wrap_jax(m, f, keys=need_keys)
17077 
17078 
17079 # Register AttributeSingletonScore in _IMP_core:
17080 _IMP_core.AttributeSingletonScore_swigregister(AttributeSingletonScore)
17081 
17083  r"""create_generic_attribute_singleton_score(UnaryFunction uf, FloatKey k) -> AttributeSingletonScore"""
17084  return _IMP_core.create_generic_attribute_singleton_score(uf, k)
17086  r"""Proxy of C++ IMP::core::GenericBoundingBox3DSingletonScore< UnaryFunction > class."""
17087 
17088  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17089  __repr__ = _swig_repr
17090 
17091  def __init__(self, f, bb):
17092  r"""__init__(BoundingBox3DSingletonScore self, UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17093  _IMP_core.BoundingBox3DSingletonScore_swiginit(self, _IMP_core.new_BoundingBox3DSingletonScore(f, bb))
17094 
17095  def get_unary_function(self):
17096  r"""get_unary_function(BoundingBox3DSingletonScore self) -> UnaryFunction"""
17097  return _IMP_core.BoundingBox3DSingletonScore_get_unary_function(self)
17098 
17099  def get_bounding_box(self):
17100  r"""get_bounding_box(BoundingBox3DSingletonScore self) -> BoundingBox3D"""
17101  return _IMP_core.BoundingBox3DSingletonScore_get_bounding_box(self)
17102 
17103  def do_get_inputs(self, m, pis):
17104  r"""do_get_inputs(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17105  return _IMP_core.BoundingBox3DSingletonScore_do_get_inputs(self, m, pis)
17106 
17107  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17108  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"""
17109  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17110 
17111  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17112  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"""
17113  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17114 
17115  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17116  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"""
17117  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17118 
17119  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17120  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"""
17121  return _IMP_core.BoundingBox3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17122 
17123  def get_version_info(self):
17124  r"""get_version_info(BoundingBox3DSingletonScore self) -> VersionInfo"""
17125  return _IMP_core.BoundingBox3DSingletonScore_get_version_info(self)
17126  __swig_destroy__ = _IMP_core.delete_BoundingBox3DSingletonScore
17127 
17128  @staticmethod
17129  def get_from(o):
17130  return _object_cast_to_BoundingBox3DSingletonScore(o)
17131 
17132 
17133  def _get_jax(self, m, indexes, space):
17134  import jax.numpy as jnp
17135  def score(jm, box_min, box_max, uf):
17136  xyzs = jm['xyz'][indexes]
17137  # This calculates the distance and the score for every point,
17138  # even those inside the box. IMP just returns zero for points
17139  # inside the box, skipping the distance calculation.
17140  # The implementation here is *probably* faster on a GPU since
17141  # we reduce the use of conditionals, and JAX will likely skip
17142  # the sqrt if uf is a harmonic, but this should be benchmarked.
17143  drs = space.distance(xyzs - jnp.clip(xyzs, box_min, box_max))
17144  return uf(drs)
17145  uf = self.get_unary_function().get_derived_object()
17146  bb = self.get_bounding_box()
17147  f = functools.partial(score, box_min=jnp.asarray(bb.get_corner(0)),
17148  box_max=jnp.asarray(bb.get_corner(1)),
17149  uf=uf._get_jax())
17150  return self._wrap_jax(m, f)
17151 
17152 
17153 # Register BoundingBox3DSingletonScore in _IMP_core:
17154 _IMP_core.BoundingBox3DSingletonScore_swigregister(BoundingBox3DSingletonScore)
17155 
17156 def create_bounding_box_3d_singleton_score(f, bb):
17157  r"""create_bounding_box_3d_singleton_score(UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17158  return _IMP_core.create_bounding_box_3d_singleton_score(f, bb)
17160  r"""Proxy of C++ IMP::core::GenericBoundingSphere3DSingletonScore< UnaryFunction > class."""
17161 
17162  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17163  __repr__ = _swig_repr
17164 
17165  def __init__(self, f, sphere):
17166  r"""__init__(BoundingSphere3DSingletonScore self, UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17167  _IMP_core.BoundingSphere3DSingletonScore_swiginit(self, _IMP_core.new_BoundingSphere3DSingletonScore(f, sphere))
17168 
17169  def do_get_inputs(self, m, pis):
17170  r"""do_get_inputs(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17171  return _IMP_core.BoundingSphere3DSingletonScore_do_get_inputs(self, m, pis)
17172 
17173  def get_unary_function(self):
17174  r"""get_unary_function(BoundingSphere3DSingletonScore self) -> UnaryFunction"""
17175  return _IMP_core.BoundingSphere3DSingletonScore_get_unary_function(self)
17176 
17177  def get_sphere(self):
17178  r"""get_sphere(BoundingSphere3DSingletonScore self) -> Sphere3D"""
17179  return _IMP_core.BoundingSphere3DSingletonScore_get_sphere(self)
17180 
17181  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17182  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"""
17183  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17184 
17185  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17186  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"""
17187  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17188 
17189  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17190  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"""
17191  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17192 
17193  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17194  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"""
17195  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17196 
17197  def get_version_info(self):
17198  r"""get_version_info(BoundingSphere3DSingletonScore self) -> VersionInfo"""
17199  return _IMP_core.BoundingSphere3DSingletonScore_get_version_info(self)
17200  __swig_destroy__ = _IMP_core.delete_BoundingSphere3DSingletonScore
17201 
17202  @staticmethod
17203  def get_from(o):
17204  return _object_cast_to_BoundingSphere3DSingletonScore(o)
17205 
17206 
17207  def _get_jax(self, m, indexes, space):
17208  import jax.numpy as jnp
17209  import jax.lax
17210  def score_with_radius(jm, inds, center, radius):
17211  xyzs = jm['xyz'][inds]
17212  radii = jm['r'][inds]
17213  drs = space.distance(xyzs - center) + radii - radius
17214  return jax.lax.select(drs < 0.000001, jnp.zeros_like(drs), uf(drs))
17215  def score_without_radius(jm, inds, center, radius):
17216  xyzs = jm['xyz'][inds]
17217  drs = space.distance(xyzs - center) - radius
17218  return jax.lax.select(drs < 0.000001, jnp.zeros_like(drs), uf(drs))
17219  without_radii_inds = []
17220  with_radii_inds = []
17221  for ind in indexes:
17222  if XYZR.get_is_setup(m, ind):
17223  with_radii_inds.append(ind)
17224  else:
17225  without_radii_inds.append(ind)
17226  without_radii_inds = jnp.asarray(without_radii_inds)
17227  with_radii_inds = jnp.asarray(with_radii_inds)
17228  uf = self.get_unary_function().get_derived_object()._get_jax()
17229  sphere = self.get_sphere()
17230  radius = sphere.get_radius()
17231  center = jnp.asarray(sphere.get_center())
17232  def score(jm):
17233  s = 0.
17234  if without_radii_inds.size > 0:
17235  s += score_without_radius(jm, without_radii_inds,
17236  center, radius)
17237  if with_radii_inds.size > 0:
17238  s += score_with_radius(jm, with_radii_inds, center, radius)
17239  return s
17240  return self._wrap_jax(m, score)
17241 
17242 
17243 # Register BoundingSphere3DSingletonScore in _IMP_core:
17244 _IMP_core.BoundingSphere3DSingletonScore_swigregister(BoundingSphere3DSingletonScore)
17245 
17246 def create_bounding_sphere_3d_singleton_score(f, sphere):
17247  r"""create_bounding_sphere_3d_singleton_score(UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17248  return _IMP_core.create_bounding_sphere_3d_singleton_score(f, sphere)
17250  r"""Proxy of C++ IMP::core::GenericDistanceToSingletonScore< UnaryFunction > class."""
17251 
17252  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17253  __repr__ = _swig_repr
17254 
17255  def __init__(self, *args):
17256  r"""
17257  __init__(DistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore
17258  __init__(DistanceToSingletonScore self) -> DistanceToSingletonScore
17259  """
17260  _IMP_core.DistanceToSingletonScore_swiginit(self, _IMP_core.new_DistanceToSingletonScore(*args))
17261 
17262  def do_get_inputs(self, m, pis):
17263  r"""do_get_inputs(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17264  return _IMP_core.DistanceToSingletonScore_do_get_inputs(self, m, pis)
17265 
17266  def get_unary_function(self):
17267  r"""get_unary_function(DistanceToSingletonScore self) -> UnaryFunction"""
17268  return _IMP_core.DistanceToSingletonScore_get_unary_function(self)
17269 
17270  def get_point(self):
17271  r"""get_point(DistanceToSingletonScore self) -> Vector3D"""
17272  return _IMP_core.DistanceToSingletonScore_get_point(self)
17273 
17274  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17275  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"""
17276  return _IMP_core.DistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17277 
17278  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17279  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"""
17280  return _IMP_core.DistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17281 
17282  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17283  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"""
17284  return _IMP_core.DistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17285 
17286  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17287  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"""
17288  return _IMP_core.DistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17289 
17290  def get_version_info(self):
17291  r"""get_version_info(DistanceToSingletonScore self) -> VersionInfo"""
17292  return _IMP_core.DistanceToSingletonScore_get_version_info(self)
17293  __swig_destroy__ = _IMP_core.delete_DistanceToSingletonScore
17294 
17295  @staticmethod
17296  def get_from(o):
17297  return _object_cast_to_DistanceToSingletonScore(o)
17298 
17299 
17300  def _get_as_binary(self):
17301  r"""_get_as_binary(DistanceToSingletonScore self) -> PyObject *"""
17302  return _IMP_core.DistanceToSingletonScore__get_as_binary(self)
17303 
17304  def _set_from_binary(self, p):
17305  r"""_set_from_binary(DistanceToSingletonScore self, PyObject * p)"""
17306  return _IMP_core.DistanceToSingletonScore__set_from_binary(self, p)
17307 
17308  def __getstate__(self):
17309  p = self._get_as_binary()
17310  if len(self.__dict__) > 1:
17311  d = self.__dict__.copy()
17312  del d['this']
17313  p = (d, p)
17314  return p
17315 
17316  def __setstate__(self, p):
17317  if not hasattr(self, 'this'):
17318  self.__init__()
17319  if isinstance(p, tuple):
17320  d, p = p
17321  self.__dict__.update(d)
17322  return self._set_from_binary(p)
17323 
17324 
17325  def _get_jax(self, m, indexes, space):
17326  import jax.numpy as jnp
17327  def score(jm, point, uf):
17328  xyzs = jm['xyz'][indexes]
17329  drs = space.distance(xyzs - point)
17330  return uf(drs)
17331  uf = self.get_unary_function().get_derived_object()
17332  f = functools.partial(score, point=jnp.array(self.get_point()),
17333  uf=uf._get_jax())
17334  return self._wrap_jax(m, f)
17335 
17336 
17337 # Register DistanceToSingletonScore in _IMP_core:
17338 _IMP_core.DistanceToSingletonScore_swigregister(DistanceToSingletonScore)
17339 
17340 def create_distance_to_singleton_score(f, pt):
17341  r"""create_distance_to_singleton_score(UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore"""
17342  return _IMP_core.create_distance_to_singleton_score(f, pt)
17343 
17344 class SphereDistancePairScore(_SphereDistancePairScore.__bases__[0]):
17345  def __init__(self, uf):
17346  if isinstance(uf, HarmonicUpperBound):
17347  p = HarmonicUpperBoundSphereDistancePairScore(
17348  uf.get_mean(), uf.get_k())
17349  elif isinstance(uf, HarmonicLowerBound):
17350  if uf.get_mean() == 0.0:
17351  p = SoftSpherePairScore(uf.get_k())
17352  else:
17353  p = _SphereDistancePairScore(uf)
17354  elif isinstance(uf, Harmonic):
17355  p = HarmonicSphereDistancePairScore(
17356  uf.get_mean(), uf.get_k())
17357  else:
17358  p = _SphereDistancePairScore(uf)
17359  self.__dict__['_proxied'] = p
17360  def __getattr__(self, key):
17361  return getattr(self._proxied, key)
17362  def __setattr__(self, key, val):
17363  return setattr(self._proxied, key, val)
17364 
17365  def __getstate__(self):
17366  return self.__dict__['_proxied']
17367 
17368  def __setstate__(self, p):
17369  self.__dict__['_proxied'] = p
17370 
17371  def _get_jax(self, *args, **kwargs):
17372  return self._proxied._get_jax(*args, **kwargs)
17373 
17374  @staticmethod
17375  def get_from(o):
17376  try:
17377  p = HarmonicUpperBoundSphereDistancePairScore.get_from(o)
17378  except ValueError:
17379  try:
17380  p = HarmonicSphereDistancePairScore.get_from(o)
17381  except ValueError:
17382  try:
17383  p = SoftSpherePairScore.get_from(o)
17384  except ValueError:
17385  p = _SphereDistancePairScore.get_from(o)
17386  obj = object.__new__(SphereDistancePairScore)
17387  obj.__dict__['_proxied'] = p
17388  return obj
17389 
17390 
17391 
17392 def get_all_provenance(p, types=[StructureProvenance, SampleProvenance,
17393  CombineProvenance, FilterProvenance,
17394  ClusterProvenance, ScriptProvenance,
17395  SoftwareProvenance]):
17396  """Yield all provenance decorators of the given types for the particle.
17397  By default, all provenance types are returned. Provenance is returned
17398  in order, most recent first. If the particle has no provenance
17399  information, an empty generator is returned."""
17400  if Provenanced.get_is_setup(p):
17401  prov = Provenanced(p).get_provenance()
17402  while prov:
17403  for c in types:
17404  if c.get_is_setup(prov):
17405  yield c(prov)
17406  prov = prov.get_previous()
17407 
17409  """Tag the given particle with the current Python script.
17410  This is a noop if the particle is already so tagged."""
17411  main = sys.modules['__main__']
17412 # Can't do anything if running from an interactive interpreter
17413  if not hasattr(main, '__file__'):
17414  return
17415  f = IMP.get_absolute_path(main.__file__)
17416  for prov in get_all_provenance(p, types=[ScriptProvenance]):
17417  if prov.get_filename() == f:
17418  return
17419  m = p.get_model()
17420  provp = IMP.Particle(m)
17421  provp.set_name('script')
17422  prov = ScriptProvenance.setup_particle(provp, f)
17423  add_provenance(m, p, prov)
17424 
17425 def add_software_provenance(p, name, version, location):
17426  """Tag the given particle with the software used to create it.
17427  This is a noop if the particle is already so tagged."""
17428  for prov in get_all_provenance(p, types=[SoftwareProvenance]):
17429  if prov.get_software_name() == name and prov.get_version() == version \
17430  and prov.get_location() == location:
17431  return
17432  m = p.get_model()
17433  provp = IMP.Particle(m)
17434  provp.set_name('software')
17435  prov = SoftwareProvenance.setup_particle(provp, name, version, location)
17436  add_provenance(m, p, prov)
17437 
17439  """Tag the given particle as being created by the current version of IMP."""
17440  add_software_provenance(p, name="Integrative Modeling Platform (IMP)",
17441  version=IMP.get_module_version(),
17442  location="https://integrativemodeling.org")
17443 
17444 
17445 def get_module_name():
17446  r"""get_module_name() -> std::string const"""
17447  return _IMP_core.get_module_name()
17448 
17449 def get_module_version():
17450  r"""get_module_version() -> std::string const"""
17451  return _IMP_core.get_module_version()
17452 
17453 def get_example_path(fname):
17454  r"""get_example_path(std::string fname) -> std::string"""
17455  return _IMP_core.get_example_path(fname)
17456 
17457 def get_data_path(fname):
17458  r"""get_data_path(std::string fname) -> std::string"""
17459  return _IMP_core.get_data_path(fname)
17460 
17461 from . import _version_check
17462 _version_check.check_version(get_module_version())
17463 __version__ = get_module_version()
17464 
17465 
F visit_breadth_first(HD d, F f)
Apply the visitor to each particle, breadth first.
A base class for geometry contained in particles.
A base class for modifiers of ParticlesTemp.
GenericDistanceToSingletonScore< UnaryFunction > DistanceToSingletonScore
Rotation3D get_rotation_about_normalized_axis(const Vector3D &axis_norm, double angle)
Definition: Rotation3D.h:391
double get_kt(double T)
Return kT for a given temperature in units of [kcal/mol].
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:44
double get_height(const Surface &s, const XYZR &d)
Get height of sphere above surface.
Definition: Surface.h:129
algebra::Transformation3D get_transformation_aligning_first_to_second(XYZsOrVector3ds a, XYZsOrVector3ds b)
double get_mean(const cv::Mat &mat, const cvIntMat &mask)
CheckLevel get_check_level()
Get the current audit mode.
Definition: exception.h:80
def add_script_provenance
Tag the given particle with the current Python script.
GenericBoundingSphere3DSingletonScore< UnaryFunction > BoundingSphere3DSingletonScore
Abstract predicate function.
Definition: QuadPredicate.h:31
Restraint * create_restraint(Score *s, const typename Score::Argument &t, std::string name=std::string())
Definition: generic.h:36
ParticleIndex get_root_rigid_body(RigidMember m)
Return the index of the outer-most rigid body containing the member.
algebra::ReferenceFrame3D get_initial_reference_frame(Model *m, const ParticleIndexes &pis)
The base class for geometry.
F visit_depth_first(HD d, F &f)
Apply functor F to each particle, traversing the hierarchy depth first.
XYZRs create_xyzr_particles(Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
A base class for geometry contained in particles.
double get_angle(Direction a, Direction b)
Get angle between directions.
A base class for geometry from a set of particles.
double get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d)
Compute the dihedral angle (in radians) between the four particles.
Make CGAL functionality available to IMP.
ParticlesTemp create_rigid_bodies(Model *m, unsigned int n, bool no_members=false)
An unbounded space with no periodic boundary conditions.
Definition: jax.py:37
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
void add_rigid_body_cache_key(ObjectKey k)
Base class for all samplers.
Definition: Sampler.h:31
Key< 34897493 > ParticleType
An IMP::Key object for identifying types of particles by strings.
Definition: Typed.h:28
algebra::Vector3D get_centroid(const XYZs &ps)
Get the centroid.
void add_particle(RMF::FileHandle fh, Particle *hs)
GenericHierarchies get_leaves(Hierarchy mhd)
Get all the leaves of the bit of hierarchy.
static FloatKeys get_internal_coordinate_keys()
Definition: rigid_bodies.h:618
Composable functors to implement scores via compile-time composition.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
GenericHierarchies get_all_descendants(Hierarchy mhd)
Get all the particles in the subtree.
A base class for geometry from a set of particles.
def add_imp_provenance
Tag the given particle as being created by the current version of IMP.
display::Geometries create_blame_geometries(const RestraintsTemp &rs, const ParticlesTemp &ps, double max=NO_MAX, std::string name=std::string())
void show_rigid_body_hierarchy(RigidBody rb, TextOutput out=TextOutput(std::cout))
Implement a constraint on the Model.
Definition: Constraint.h:49
void add_restraint(RMF::FileHandle fh, Restraint *hs)
def add_software_provenance
Tag the given particle with the software used to create it.
Abstract class for scoring object(s) of type ParticleIndexQuad.
Definition: QuadScore.h:44
Base class for objects in a Model that depend on other objects.
Definition: ModelObject.h:28
Abstract predicate function.
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Common base class for heavy weight IMP objects.
Definition: Object.h:111
int get_number_of_frames(const ::npctransport_proto::Assignment &config, double time_step)
Abstract class for scoring object(s) of type ParticleIndex.
ScoreStates maintain invariants in the Model.
Definition: ScoreState.h:56
Base class for all optimizers.
Definition: Optimizer.h:48
GenericAttributeSingletonScore< UnaryFunction > AttributeSingletonScore
SurfaceGeometry * create_geometry(const Surface s, std::string name=std::string("SurfaceGeometry%1%"))
Create a geometry from a Surface.
Definition: Surface.h:191
void add_restraints(RMF::FileHandle fh, const Restraints &hs)
algebra::BoundingBoxD< 3 > get_bounding_box(const XYZRs &ps)
Get the bounding box.
const algebra::Vector3D & get_vector_geometry(XYZ d)
Definition: XYZ.h:135
Support for the JAX Python library.
Definition: jax.py:1
GenericHierarchies get_internal(Hierarchy mhd)
Get all the non-leaves of the bit of hierarchy.
Interface to specialized Particle types (e.g. atoms)
Definition: Decorator.h:119
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
std::string get_absolute_path(std::string file)
Convert a possibly relative path to an absolute path.
algebra::Sphere3D get_enclosing_sphere(const XYZs &v)
Get a sphere enclosing the set of XYZRs.
Base class for optimizers that act on individual attributes.
Basic functionality that is expected to be used by a wide variety of IMP users.
SurfaceGeometry * get_constrained_surface_geometry(const Surface s, std::string name="SurfaceGeometry%1%")
Get surface geometry constrained to the surface.
Definition: Surface.h:236
Abstract predicate function.
Definition: PairPredicate.h:31
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
Represents a scoring function on the model.
void set_vector_geometry(XYZ d, const algebra::Vector3D &v)
Definition: XYZ.h:131
Provenance create_clone(Provenance p, Model *m=nullptr)
Clone provenance (including previous provenance)
Shared optimizer state that is invoked upon commitment of new coordinates.
Hierarchy get_root(Hierarchy h)
Return the root of the hierarchy.
Abstract predicate function.
GenericBoundingBox3DSingletonScore< UnaryFunction > BoundingBox3DSingletonScore
Abstract class to implement hierarchical methods.
Definition: Refiner.h:36
double get_depth(const Surface &s, const XYZR &d)
Get depth of sphere below surface.
Definition: Surface.h:143
void set_enclosing_radius(XYZR b, const XYZs &v)
Set the radius of the first to enclose the list.
Class to handle individual particles of a Model object.
Definition: Particle.h:45
GenericAttributeSingletonScore< UF > * create_generic_attribute_singleton_score(UF *uf, FloatKey k)
void transform(RigidBody a, const algebra::Transformation3D &tr)
Transform a rigid body.
Definition: rigid_bodies.h:748
void assign_blame(const RestraintsTemp &rs, const ParticlesTemp &ps, FloatKey attribute)
std::string get_module_version()
Return the version of this module, as a string.
TruncatedHarmonic< BOTH > TruncatedHarmonicBound
TruncatedHarmonic< UPPER > TruncatedHarmonicUpperBound
static const FloatKeys & get_xyz_keys()
Get a vector containing the keys for x,y,z.
BallMover
Definition: BallMover.py:1
Output IMP model data in various file formats.
std::string get_chain_id(Hierarchy h)
Walk up the hierarchy to determine the chain id.
def get_all_provenance
Yield all provenance decorators of the given types for the particle.
Abstract class for scoring object(s) of type ParticleIndexTriplet.
Definition: TripletScore.h:44
void add_provenance(Model *m, ParticleIndex pi, Provenance p)
Add provenance to part of the model.
Tag part of the system to track how it was created.
Definition: provenance.h:632
double get_distance(const Surface &s, const XYZR &d)
Get distance from sphere to surface.
Definition: Surface.h:153
ParticleIndexes get_indexes(const ParticlesTemp &ps)
Get the indexes from a list of particles.
Abstract single variable functor class for score functions.
Definition: UnaryFunction.h:27
void set_enclosing_sphere(XYZR b, const XYZs &v, double slack=0)
Set the coordinates and radius of the first to enclose the list.
TruncatedHarmonic< LOWER > TruncatedHarmonicLowerBound
void set_check_level(CheckLevel tf)
Control runtime checks in the code.
Definition: exception.h:72
std::string get_module_version()
Return the version of this module, as a string.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56