IMP logo
IMP Reference Guide  develop.0e3808d870,2026/10/23
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 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  if intcoord:
3998  rbs = jm['rigid_bodies']
3999  val = rbs.intcoord
4000  else:
4001  val = jm['xyz']
4002  v = get_random_vector_in_3d_sphere(
4003  subkey, radius, shape=val.shape[:-2] + (1,))
4004  if intcoord:
4005  rbs.intcoord = space.shift_indexes(val, indexes, v)
4006  else:
4007  jm['xyz'] = space.shift_indexes(val, indexes, v)
4008  return jm, key, 1.0
4009  return self._wrap_jax(init_func, propose_func,
4010  keys=['rigid_bodies'] if intcoord else None)
4011 
4012 
4013 # Register BallMover in _IMP_core:
4014 _IMP_core.BallMover_swigregister(BallMover)
4015 class SerialMover(MonteCarloMover):
4016  r"""Proxy of C++ IMP::core::SerialMover class."""
4017 
4018  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4019 
4020  def __init__(self, *args):
4021  r"""
4022  __init__(SerialMover self, IMP::core::MonteCarloMoversTemp const & mvs) -> SerialMover
4023  __init__(SerialMover self) -> SerialMover
4024  """
4025  _IMP_core.SerialMover_swiginit(self, _IMP_core.new_SerialMover(*args))
4026 
4027  def get_movers(self):
4028  r"""get_movers(SerialMover self) -> IMP::core::MonteCarloMovers const &"""
4029  return _IMP_core.SerialMover_get_movers(self)
4030 
4031  def get_version_info(self):
4032  r"""get_version_info(SerialMover self) -> VersionInfo"""
4033  return _IMP_core.SerialMover_get_version_info(self)
4034  __swig_destroy__ = _IMP_core.delete_SerialMover
4035 
4036  def __str__(self):
4037  r"""__str__(SerialMover self) -> std::string"""
4038  return _IMP_core.SerialMover___str__(self)
4039 
4040  def __repr__(self):
4041  r"""__repr__(SerialMover self) -> std::string"""
4042  return _IMP_core.SerialMover___repr__(self)
4043 
4044  @staticmethod
4045  def get_from(o):
4046  return _object_cast_to_SerialMover(o)
4047 
4048 
4049  def _get_as_binary(self):
4050  r"""_get_as_binary(SerialMover self) -> PyObject *"""
4051  return _IMP_core.SerialMover__get_as_binary(self)
4052 
4053  def _set_from_binary(self, p):
4054  r"""_set_from_binary(SerialMover self, PyObject * p)"""
4055  return _IMP_core.SerialMover__set_from_binary(self, p)
4056 
4057  def __getstate__(self):
4058  p = self._get_as_binary()
4059  if len(self.__dict__) > 1:
4060  d = self.__dict__.copy()
4061  del d['this']
4062  p = (d, p)
4063  return p
4064 
4065  def __setstate__(self, p):
4066  if not hasattr(self, 'this'):
4067  self.__init__()
4068  if isinstance(p, tuple):
4069  d, p = p
4070  self.__dict__.update(d)
4071  return self._set_from_binary(p)
4072 
4073 
4074  def _get_jax(self, space):
4075  import jax.random
4076  import jax.lax
4077  import jax.numpy as jnp
4078  from IMP.core._jax_util import _SerialMover
4079  movers = [m.get_derived_object()._get_jax(space)
4080  for m in self.get_movers()]
4081 
4082  def sub_propose_func(jm, sms, i):
4083  """Call the propose_func of the ith mover"""
4084  jm, sms.mover_state[i], ratio = movers[i].propose_func(
4085  jm, sms.mover_state[i])
4086  sms.proposed_mover_steps = sms.proposed_mover_steps.at[i].add(1)
4087  return jm, sms, ratio
4088 
4089  sub_propose_funcs = [functools.partial(sub_propose_func, i=i)
4090  for i in range(len(movers))]
4091 
4092  def init_func(key):
4093  # Initialize all movers and store their state in ours
4094  mover_state = []
4095  for m in movers:
4096  key, subkey = jax.random.split(key)
4097  mover_state.append(m.init_func(subkey))
4098  return _SerialMover(
4099  imov=-1, mover_state=mover_state,
4100  proposed_mover_steps=jnp.zeros(len(movers), dtype=int),
4101  accepted_mover_steps=jnp.zeros(len(movers), dtype=int))
4102 
4103  def reset_stats_func(sms):
4104  sms.mover_state = [m.reset_stats_func(ms)
4105  if m.reset_stats_func else ms
4106  for (m, ms) in zip(movers, sms.mover_state)]
4107  sms.proposed_mover_steps = jnp.zeros(len(movers), dtype=int)
4108  sms.accepted_mover_steps = jnp.zeros(len(movers), dtype=int)
4109  return sms
4110 
4111  def propose_func(jm, sms):
4112  sms.imov = jnp.mod(sms.imov + 1, len(movers))
4113  return jax.lax.switch(sms.imov, sub_propose_funcs, jm, sms)
4114 
4115  def accept_func(sms):
4116  # Update statistics for the chosen mover
4117  sms.accepted_mover_steps = \
4118  sms.accepted_mover_steps.at[sms.imov].add(1)
4119  return sms
4120 
4121  def sync_func(imp_mover, sms):
4122  # Copy submover statistics back to IMP Movers
4123  for i, mover in enumerate(imp_mover.get_movers()):
4124  mover.add_to_statistics(
4125  sms.proposed_mover_steps[i],
4126  sms.proposed_mover_steps[i] - sms.accepted_mover_steps[i])
4127 
4128  return self._wrap_jax(
4129  init_func, propose_func, accept_func, sync_func,
4130  reset_stats_func=reset_stats_func,
4131  keys=frozenset(x for m in movers for x in m._keys))
4132 
4133 
4134 # Register SerialMover in _IMP_core:
4135 _IMP_core.SerialMover_swigregister(SerialMover)
4136 class SubsetMover(MonteCarloMover):
4137  r"""Proxy of C++ IMP::core::SubsetMover class."""
4138 
4139  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4140 
4141  def __init__(self, *args):
4142  r"""
4143  __init__(SubsetMover self, IMP::core::MonteCarloMoversTemp const & mvs, unsigned int n) -> SubsetMover
4144  __init__(SubsetMover self) -> SubsetMover
4145  """
4146  _IMP_core.SubsetMover_swiginit(self, _IMP_core.new_SubsetMover(*args))
4147 
4148  def get_movers(self):
4149  r"""get_movers(SubsetMover self) -> IMP::core::MonteCarloMovers const &"""
4150  return _IMP_core.SubsetMover_get_movers(self)
4151 
4152  def get_subset_size(self):
4153  r"""get_subset_size(SubsetMover self) -> unsigned int"""
4154  return _IMP_core.SubsetMover_get_subset_size(self)
4155 
4156  def get_version_info(self):
4157  r"""get_version_info(SubsetMover self) -> VersionInfo"""
4158  return _IMP_core.SubsetMover_get_version_info(self)
4159  __swig_destroy__ = _IMP_core.delete_SubsetMover
4160 
4161  def __str__(self):
4162  r"""__str__(SubsetMover self) -> std::string"""
4163  return _IMP_core.SubsetMover___str__(self)
4164 
4165  def __repr__(self):
4166  r"""__repr__(SubsetMover self) -> std::string"""
4167  return _IMP_core.SubsetMover___repr__(self)
4168 
4169  @staticmethod
4170  def get_from(o):
4171  return _object_cast_to_SubsetMover(o)
4172 
4173 
4174  def _get_as_binary(self):
4175  r"""_get_as_binary(SubsetMover self) -> PyObject *"""
4176  return _IMP_core.SubsetMover__get_as_binary(self)
4177 
4178  def _set_from_binary(self, p):
4179  r"""_set_from_binary(SubsetMover self, PyObject * p)"""
4180  return _IMP_core.SubsetMover__set_from_binary(self, p)
4181 
4182  def __getstate__(self):
4183  p = self._get_as_binary()
4184  if len(self.__dict__) > 1:
4185  d = self.__dict__.copy()
4186  del d['this']
4187  p = (d, p)
4188  return p
4189 
4190  def __setstate__(self, p):
4191  if not hasattr(self, 'this'):
4192  self.__init__()
4193  if isinstance(p, tuple):
4194  d, p = p
4195  self.__dict__.update(d)
4196  return self._set_from_binary(p)
4197 
4198 
4199 # Register SubsetMover in _IMP_core:
4200 _IMP_core.SubsetMover_swigregister(SubsetMover)
4201 class DirectionMover(MonteCarloMover):
4202  r"""Proxy of C++ IMP::core::DirectionMover class."""
4203 
4204  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4205 
4206  def __init__(self, *args):
4207  r"""
4208  __init__(DirectionMover self, Model m, ParticleIndex pi, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4209  __init__(DirectionMover self, Direction d, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4210  __init__(DirectionMover self) -> DirectionMover
4211  """
4212  _IMP_core.DirectionMover_swiginit(self, _IMP_core.new_DirectionMover(*args))
4213 
4214  def set_maximum_rotation(self, mr):
4215  r"""set_maximum_rotation(DirectionMover self, IMP::Float mr)"""
4216  return _IMP_core.DirectionMover_set_maximum_rotation(self, mr)
4217 
4218  def set_reflect_probability(self, rp):
4219  r"""set_reflect_probability(DirectionMover self, IMP::Float rp)"""
4220  return _IMP_core.DirectionMover_set_reflect_probability(self, rp)
4221 
4222  def get_maximum_rotation(self):
4223  r"""get_maximum_rotation(DirectionMover self) -> IMP::Float"""
4224  return _IMP_core.DirectionMover_get_maximum_rotation(self)
4225 
4226  def get_reflect_probability(self):
4227  r"""get_reflect_probability(DirectionMover self) -> IMP::Float"""
4228  return _IMP_core.DirectionMover_get_reflect_probability(self)
4229 
4230  def get_direction(self):
4231  r"""get_direction(DirectionMover self) -> Direction"""
4232  return _IMP_core.DirectionMover_get_direction(self)
4233 
4234  def get_version_info(self):
4235  r"""get_version_info(DirectionMover self) -> VersionInfo"""
4236  return _IMP_core.DirectionMover_get_version_info(self)
4237  __swig_destroy__ = _IMP_core.delete_DirectionMover
4238 
4239  def __str__(self):
4240  r"""__str__(DirectionMover self) -> std::string"""
4241  return _IMP_core.DirectionMover___str__(self)
4242 
4243  def __repr__(self):
4244  r"""__repr__(DirectionMover self) -> std::string"""
4245  return _IMP_core.DirectionMover___repr__(self)
4246 
4247  @staticmethod
4248  def get_from(o):
4249  return _object_cast_to_DirectionMover(o)
4250 
4251 
4252  def _get_as_binary(self):
4253  r"""_get_as_binary(DirectionMover self) -> PyObject *"""
4254  return _IMP_core.DirectionMover__get_as_binary(self)
4255 
4256  def _set_from_binary(self, p):
4257  r"""_set_from_binary(DirectionMover self, PyObject * p)"""
4258  return _IMP_core.DirectionMover__set_from_binary(self, p)
4259 
4260  def __getstate__(self):
4261  p = self._get_as_binary()
4262  if len(self.__dict__) > 1:
4263  d = self.__dict__.copy()
4264  del d['this']
4265  p = (d, p)
4266  return p
4267 
4268  def __setstate__(self, p):
4269  if not hasattr(self, 'this'):
4270  self.__init__()
4271  if isinstance(p, tuple):
4272  d, p = p
4273  self.__dict__.update(d)
4274  return self._set_from_binary(p)
4275 
4276 
4277 # Register DirectionMover in _IMP_core:
4278 _IMP_core.DirectionMover_swigregister(DirectionMover)
4279 class SurfaceMover(MonteCarloMover):
4280  r"""Proxy of C++ IMP::core::SurfaceMover class."""
4281 
4282  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4283 
4284  def __init__(self, *args):
4285  r"""
4286  __init__(SurfaceMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4287  __init__(SurfaceMover self, Surface s, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4288  __init__(SurfaceMover self) -> SurfaceMover
4289  """
4290  _IMP_core.SurfaceMover_swiginit(self, _IMP_core.new_SurfaceMover(*args))
4291 
4292  def set_maximum_translation(self, mt):
4293  r"""set_maximum_translation(SurfaceMover self, IMP::Float mt)"""
4294  return _IMP_core.SurfaceMover_set_maximum_translation(self, mt)
4295 
4296  def set_maximum_rotation(self, mr):
4297  r"""set_maximum_rotation(SurfaceMover self, IMP::Float mr)"""
4298  return _IMP_core.SurfaceMover_set_maximum_rotation(self, mr)
4299 
4300  def set_reflect_probability(self, rp):
4301  r"""set_reflect_probability(SurfaceMover self, IMP::Float rp)"""
4302  return _IMP_core.SurfaceMover_set_reflect_probability(self, rp)
4303 
4304  def get_maximum_translation(self):
4305  r"""get_maximum_translation(SurfaceMover self) -> IMP::Float"""
4306  return _IMP_core.SurfaceMover_get_maximum_translation(self)
4307 
4308  def get_maximum_rotation(self):
4309  r"""get_maximum_rotation(SurfaceMover self) -> IMP::Float"""
4310  return _IMP_core.SurfaceMover_get_maximum_rotation(self)
4311 
4312  def get_reflect_probability(self):
4313  r"""get_reflect_probability(SurfaceMover self) -> IMP::Float"""
4314  return _IMP_core.SurfaceMover_get_reflect_probability(self)
4315 
4316  def get_surface(self):
4317  r"""get_surface(SurfaceMover self) -> Surface"""
4318  return _IMP_core.SurfaceMover_get_surface(self)
4319 
4320  def get_version_info(self):
4321  r"""get_version_info(SurfaceMover self) -> VersionInfo"""
4322  return _IMP_core.SurfaceMover_get_version_info(self)
4323  __swig_destroy__ = _IMP_core.delete_SurfaceMover
4324 
4325  def __str__(self):
4326  r"""__str__(SurfaceMover self) -> std::string"""
4327  return _IMP_core.SurfaceMover___str__(self)
4328 
4329  def __repr__(self):
4330  r"""__repr__(SurfaceMover self) -> std::string"""
4331  return _IMP_core.SurfaceMover___repr__(self)
4332 
4333  @staticmethod
4334  def get_from(o):
4335  return _object_cast_to_SurfaceMover(o)
4336 
4337 
4338  def _get_as_binary(self):
4339  r"""_get_as_binary(SurfaceMover self) -> PyObject *"""
4340  return _IMP_core.SurfaceMover__get_as_binary(self)
4341 
4342  def _set_from_binary(self, p):
4343  r"""_set_from_binary(SurfaceMover self, PyObject * p)"""
4344  return _IMP_core.SurfaceMover__set_from_binary(self, p)
4345 
4346  def __getstate__(self):
4347  p = self._get_as_binary()
4348  if len(self.__dict__) > 1:
4349  d = self.__dict__.copy()
4350  del d['this']
4351  p = (d, p)
4352  return p
4353 
4354  def __setstate__(self, p):
4355  if not hasattr(self, 'this'):
4356  self.__init__()
4357  if isinstance(p, tuple):
4358  d, p = p
4359  self.__dict__.update(d)
4360  return self._set_from_binary(p)
4361 
4362 
4363 # Register SurfaceMover in _IMP_core:
4364 _IMP_core.SurfaceMover_swigregister(SurfaceMover)
4365 class BoxSweepClosePairsFinder(ClosePairsFinder):
4366  r"""Proxy of C++ IMP::core::BoxSweepClosePairsFinder class."""
4367 
4368  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4369 
4370  def __init__(self):
4371  r"""__init__(BoxSweepClosePairsFinder self) -> BoxSweepClosePairsFinder"""
4372  _IMP_core.BoxSweepClosePairsFinder_swiginit(self, _IMP_core.new_BoxSweepClosePairsFinder())
4373 
4374  def get_close_pairs(self, *args):
4375  r"""
4376  get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4377  get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4378  get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
4379  get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
4380  """
4381  return _IMP_core.BoxSweepClosePairsFinder_get_close_pairs(self, *args)
4382 
4383  def do_get_inputs(self, m, pis):
4384  r"""do_get_inputs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4385  return _IMP_core.BoxSweepClosePairsFinder_do_get_inputs(self, m, pis)
4386 
4387  def get_version_info(self):
4388  r"""get_version_info(BoxSweepClosePairsFinder self) -> VersionInfo"""
4389  return _IMP_core.BoxSweepClosePairsFinder_get_version_info(self)
4390  __swig_destroy__ = _IMP_core.delete_BoxSweepClosePairsFinder
4391 
4392  def __str__(self):
4393  r"""__str__(BoxSweepClosePairsFinder self) -> std::string"""
4394  return _IMP_core.BoxSweepClosePairsFinder___str__(self)
4395 
4396  def __repr__(self):
4397  r"""__repr__(BoxSweepClosePairsFinder self) -> std::string"""
4398  return _IMP_core.BoxSweepClosePairsFinder___repr__(self)
4399 
4400  @staticmethod
4401  def get_from(o):
4402  return _object_cast_to_BoxSweepClosePairsFinder(o)
4403 
4404 
4405 # Register BoxSweepClosePairsFinder in _IMP_core:
4406 _IMP_core.BoxSweepClosePairsFinder_swigregister(BoxSweepClosePairsFinder)
4407 class CentroidOfRefined(IMP.SingletonModifier):
4408  r"""Proxy of C++ IMP::core::CentroidOfRefined class."""
4409 
4410  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4411 
4412  def __init__(self, *args):
4413  r"""
4414  __init__(CentroidOfRefined self, Refiner r, FloatKey weight=IMP::FloatKey(), IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> CentroidOfRefined
4415  __init__(CentroidOfRefined self) -> CentroidOfRefined
4416  """
4417  _IMP_core.CentroidOfRefined_swiginit(self, _IMP_core.new_CentroidOfRefined(*args))
4418 
4419  def get_refiner(self):
4420  r"""get_refiner(CentroidOfRefined self) -> Refiner"""
4421  return _IMP_core.CentroidOfRefined_get_refiner(self)
4422 
4423  def get_weight(self):
4424  r"""get_weight(CentroidOfRefined self) -> FloatKey"""
4425  return _IMP_core.CentroidOfRefined_get_weight(self)
4426 
4427  def get_keys(self):
4428  r"""get_keys(CentroidOfRefined self) -> IMP::FloatKeys"""
4429  return _IMP_core.CentroidOfRefined_get_keys(self)
4430 
4431  def get_is_weight_null(self):
4432  r"""get_is_weight_null(CentroidOfRefined self) -> bool"""
4433  return _IMP_core.CentroidOfRefined_get_is_weight_null(self)
4434 
4435  def do_get_inputs(self, m, pis):
4436  r"""do_get_inputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4437  return _IMP_core.CentroidOfRefined_do_get_inputs(self, m, pis)
4438 
4439  def do_get_outputs(self, m, pis):
4440  r"""do_get_outputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4441  return _IMP_core.CentroidOfRefined_do_get_outputs(self, m, pis)
4442 
4443  def get_version_info(self):
4444  r"""get_version_info(CentroidOfRefined self) -> VersionInfo"""
4445  return _IMP_core.CentroidOfRefined_get_version_info(self)
4446  __swig_destroy__ = _IMP_core.delete_CentroidOfRefined
4447 
4448  def __str__(self):
4449  r"""__str__(CentroidOfRefined self) -> std::string"""
4450  return _IMP_core.CentroidOfRefined___str__(self)
4451 
4452  def __repr__(self):
4453  r"""__repr__(CentroidOfRefined self) -> std::string"""
4454  return _IMP_core.CentroidOfRefined___repr__(self)
4455 
4456  @staticmethod
4457  def get_from(o):
4458  return _object_cast_to_CentroidOfRefined(o)
4459 
4460 
4461  def _get_as_binary(self):
4462  r"""_get_as_binary(CentroidOfRefined self) -> PyObject *"""
4463  return _IMP_core.CentroidOfRefined__get_as_binary(self)
4464 
4465  def _set_from_binary(self, p):
4466  r"""_set_from_binary(CentroidOfRefined self, PyObject * p)"""
4467  return _IMP_core.CentroidOfRefined__set_from_binary(self, p)
4468 
4469  def __getstate__(self):
4470  p = self._get_as_binary()
4471  if len(self.__dict__) > 1:
4472  d = self.__dict__.copy()
4473  del d['this']
4474  p = (d, p)
4475  return p
4476 
4477  def __setstate__(self, p):
4478  if not hasattr(self, 'this'):
4479  self.__init__()
4480  if isinstance(p, tuple):
4481  d, p = p
4482  self.__dict__.update(d)
4483  return self._set_from_binary(p)
4484 
4485 
4486  def _get_jax(self, m, indexes):
4487  import jax.numpy as jnp
4488  refined = [
4489  self.get_refiner().get_refined_indexes(m, IMP.ParticleIndex(index))
4490  for index in indexes]
4491 
4492  def apply_func_unweighted(jm):
4493  for ind, ref in zip(indexes, refined):
4494  xyz = jm['xyz']
4495  jm['xyz'] = xyz.at[ind].set(jnp.average(xyz[ref], axis=0))
4496  return jm
4497 
4498  def apply_func_weighted(jm, weight_key):
4499  for ind, ref in zip(indexes, refined):
4500  xyz = jm['xyz']
4501  weights = jm[weight_key][ref]
4502  jm['xyz'] = xyz.at[ind].set(
4503  jnp.average(xyz[ref], axis=0, weights=weights))
4504  return jm
4505 
4506  keys = frozenset(self.get_keys())
4507  if keys != frozenset(IMP.core.XYZ.get_xyz_keys()):
4508  raise NotImplementedError("Only works for XYZ")
4509 
4510  if self.get_is_weight_null():
4511  return self._wrap_jax(apply_func_unweighted)
4512  else:
4513  weight_key = self.get_weight()
4514  return self._wrap_jax(
4515  functools.partial(apply_func_weighted,
4516  weight_key=weight_key.get_string()),
4517  keys=(weight_key,))
4518 
4519 
4520 # Register CentroidOfRefined in _IMP_core:
4521 _IMP_core.CentroidOfRefined_swigregister(CentroidOfRefined)
4522 class Centroid(XYZ):
4523  r"""Proxy of C++ IMP::core::Centroid class."""
4524 
4525  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4526 
4527  def get_constraint(self):
4528  r"""get_constraint(Centroid self) -> Constraint"""
4529  return _IMP_core.Centroid_get_constraint(self)
4530 
4531  def __init__(self, *args):
4532  r"""
4533  __init__(Centroid self) -> Centroid
4534  __init__(Centroid self, Model m, ParticleIndex id) -> Centroid
4535  __init__(Centroid self, _ParticleAdaptor d) -> Centroid
4536  """
4537  _IMP_core.Centroid_swiginit(self, _IMP_core.new_Centroid(*args))
4538 
4539  def show(self, *args):
4540  r"""show(Centroid self, _ostream out=std::cout)"""
4541  return _IMP_core.Centroid_show(self, *args)
4542 
4543  @staticmethod
4544  def setup_particle(*args):
4545  r"""
4546  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Centroid
4547  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Centroid
4548  setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Centroid
4549  setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Centroid
4550  """
4551  return _IMP_core.Centroid_setup_particle(*args)
4552 
4553  @staticmethod
4554  def get_is_setup(*args):
4555  r"""
4556  get_is_setup(_ParticleAdaptor p) -> bool
4557  get_is_setup(Model m, ParticleIndex pi) -> bool
4558  """
4559  return _IMP_core.Centroid_get_is_setup(*args)
4560 
4561  def add_attribute(self, *args):
4562  r"""
4563  add_attribute(Centroid self, FloatKey k, IMP::Float v, bool opt)
4564  add_attribute(Centroid self, FloatKey a0, IMP::Float a1)
4565  add_attribute(Centroid self, IntKey a0, IMP::Int a1)
4566  add_attribute(Centroid self, FloatsKey a0, IMP::Floats a1)
4567  add_attribute(Centroid self, IntsKey a0, IMP::Ints a1)
4568  add_attribute(Centroid self, StringKey a0, IMP::String a1)
4569  add_attribute(Centroid self, ParticleIndexKey a0, Particle a1)
4570  add_attribute(Centroid self, ObjectKey a0, Object a1)
4571  add_attribute(Centroid self, SparseFloatKey a0, IMP::Float a1)
4572  add_attribute(Centroid self, SparseIntKey a0, IMP::Int a1)
4573  add_attribute(Centroid self, SparseStringKey a0, IMP::String a1)
4574  add_attribute(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4575  """
4576  return _IMP_core.Centroid_add_attribute(self, *args)
4577 
4578  def get_value(self, *args):
4579  r"""
4580  get_value(Centroid self, FloatKey a0) -> IMP::Float
4581  get_value(Centroid self, IntKey a0) -> IMP::Int
4582  get_value(Centroid self, FloatsKey a0) -> IMP::Floats
4583  get_value(Centroid self, IntsKey a0) -> IMP::Ints
4584  get_value(Centroid self, StringKey a0) -> IMP::String
4585  get_value(Centroid self, ParticleIndexKey a0) -> Particle
4586  get_value(Centroid self, ObjectKey a0) -> Object
4587  get_value(Centroid self, SparseFloatKey a0) -> IMP::Float
4588  get_value(Centroid self, SparseIntKey a0) -> IMP::Int
4589  get_value(Centroid self, SparseStringKey a0) -> IMP::String
4590  get_value(Centroid self, SparseParticleIndexKey a0) -> ParticleIndex
4591  """
4592  return _IMP_core.Centroid_get_value(self, *args)
4593 
4594  def set_value(self, *args):
4595  r"""
4596  set_value(Centroid self, FloatKey a0, IMP::Float a1)
4597  set_value(Centroid self, IntKey a0, IMP::Int a1)
4598  set_value(Centroid self, FloatsKey a0, IMP::Floats a1)
4599  set_value(Centroid self, IntsKey a0, IMP::Ints a1)
4600  set_value(Centroid self, StringKey a0, IMP::String a1)
4601  set_value(Centroid self, ParticleIndexKey a0, Particle a1)
4602  set_value(Centroid self, ObjectKey a0, Object a1)
4603  set_value(Centroid self, SparseFloatKey a0, IMP::Float a1)
4604  set_value(Centroid self, SparseIntKey a0, IMP::Int a1)
4605  set_value(Centroid self, SparseStringKey a0, IMP::String a1)
4606  set_value(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4607  """
4608  return _IMP_core.Centroid_set_value(self, *args)
4609 
4610  def remove_attribute(self, *args):
4611  r"""
4612  remove_attribute(Centroid self, FloatKey a0)
4613  remove_attribute(Centroid self, IntKey a0)
4614  remove_attribute(Centroid self, FloatsKey a0)
4615  remove_attribute(Centroid self, IntsKey a0)
4616  remove_attribute(Centroid self, StringKey a0)
4617  remove_attribute(Centroid self, ParticleIndexKey a0)
4618  remove_attribute(Centroid self, ObjectKey a0)
4619  remove_attribute(Centroid self, SparseFloatKey a0)
4620  remove_attribute(Centroid self, SparseIntKey a0)
4621  remove_attribute(Centroid self, SparseStringKey a0)
4622  remove_attribute(Centroid self, SparseParticleIndexKey a0)
4623  """
4624  return _IMP_core.Centroid_remove_attribute(self, *args)
4625 
4626  def has_attribute(self, *args):
4627  r"""
4628  has_attribute(Centroid self, FloatKey a0) -> bool
4629  has_attribute(Centroid self, IntKey a0) -> bool
4630  has_attribute(Centroid self, FloatsKey a0) -> bool
4631  has_attribute(Centroid self, IntsKey a0) -> bool
4632  has_attribute(Centroid self, StringKey a0) -> bool
4633  has_attribute(Centroid self, ParticleIndexKey a0) -> bool
4634  has_attribute(Centroid self, ObjectKey a0) -> bool
4635  has_attribute(Centroid self, SparseFloatKey a0) -> bool
4636  has_attribute(Centroid self, SparseIntKey a0) -> bool
4637  has_attribute(Centroid self, SparseStringKey a0) -> bool
4638  has_attribute(Centroid self, SparseParticleIndexKey a0) -> bool
4639  """
4640  return _IMP_core.Centroid_has_attribute(self, *args)
4641 
4642  def get_derivative(self, a0):
4643  r"""get_derivative(Centroid self, FloatKey a0) -> double"""
4644  return _IMP_core.Centroid_get_derivative(self, a0)
4645 
4646  def get_name(self):
4647  r"""get_name(Centroid self) -> std::string"""
4648  return _IMP_core.Centroid_get_name(self)
4649 
4650  def clear_caches(self):
4651  r"""clear_caches(Centroid self)"""
4652  return _IMP_core.Centroid_clear_caches(self)
4653 
4654  def set_name(self, a0):
4655  r"""set_name(Centroid self, std::string a0)"""
4656  return _IMP_core.Centroid_set_name(self, a0)
4657 
4658  def set_check_level(self, a0):
4659  r"""set_check_level(Centroid self, IMP::CheckLevel a0)"""
4660  return _IMP_core.Centroid_set_check_level(self, a0)
4661 
4662  def add_to_derivative(self, a0, a1, a2):
4663  r"""add_to_derivative(Centroid self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
4664  return _IMP_core.Centroid_add_to_derivative(self, a0, a1, a2)
4665 
4666  def set_is_optimized(self, a0, a1):
4667  r"""set_is_optimized(Centroid self, FloatKey a0, bool a1)"""
4668  return _IMP_core.Centroid_set_is_optimized(self, a0, a1)
4669 
4670  def get_is_optimized(self, a0):
4671  r"""get_is_optimized(Centroid self, FloatKey a0) -> bool"""
4672  return _IMP_core.Centroid_get_is_optimized(self, a0)
4673 
4674  def get_check_level(self):
4675  r"""get_check_level(Centroid self) -> IMP::CheckLevel"""
4676  return _IMP_core.Centroid_get_check_level(self)
4677 
4678  def __eq__(self, *args):
4679  r"""
4680  __eq__(Centroid self, Centroid o) -> bool
4681  __eq__(Centroid self, Particle d) -> bool
4682  """
4683  return _IMP_core.Centroid___eq__(self, *args)
4684 
4685  def __ne__(self, *args):
4686  r"""
4687  __ne__(Centroid self, Centroid o) -> bool
4688  __ne__(Centroid self, Particle d) -> bool
4689  """
4690  return _IMP_core.Centroid___ne__(self, *args)
4691 
4692  def __le__(self, *args):
4693  r"""
4694  __le__(Centroid self, Centroid o) -> bool
4695  __le__(Centroid self, Particle d) -> bool
4696  """
4697  return _IMP_core.Centroid___le__(self, *args)
4698 
4699  def __lt__(self, *args):
4700  r"""
4701  __lt__(Centroid self, Centroid o) -> bool
4702  __lt__(Centroid self, Particle d) -> bool
4703  """
4704  return _IMP_core.Centroid___lt__(self, *args)
4705 
4706  def __ge__(self, *args):
4707  r"""
4708  __ge__(Centroid self, Centroid o) -> bool
4709  __ge__(Centroid self, Particle d) -> bool
4710  """
4711  return _IMP_core.Centroid___ge__(self, *args)
4712 
4713  def __gt__(self, *args):
4714  r"""
4715  __gt__(Centroid self, Centroid o) -> bool
4716  __gt__(Centroid self, Particle d) -> bool
4717  """
4718  return _IMP_core.Centroid___gt__(self, *args)
4719 
4720  def __hash__(self):
4721  r"""__hash__(Centroid self) -> std::size_t"""
4722  return _IMP_core.Centroid___hash__(self)
4723 
4724  def __str__(self):
4725  r"""__str__(Centroid self) -> std::string"""
4726  return _IMP_core.Centroid___str__(self)
4727 
4728  def __repr__(self):
4729  r"""__repr__(Centroid self) -> std::string"""
4730  return _IMP_core.Centroid___repr__(self)
4731 
4732  def _get_as_binary(self):
4733  r"""_get_as_binary(Centroid self) -> PyObject *"""
4734  return _IMP_core.Centroid__get_as_binary(self)
4735 
4736  def _set_from_binary(self, p):
4737  r"""_set_from_binary(Centroid self, PyObject * p)"""
4738  return _IMP_core.Centroid__set_from_binary(self, p)
4739 
4740  def __getstate__(self):
4741  p = self._get_as_binary()
4742  if len(self.__dict__) > 1:
4743  d = self.__dict__.copy()
4744  del d['this']
4745  p = (d, p)
4746  return p
4747 
4748  def __setstate__(self, p):
4749  if not hasattr(self, 'this'):
4750  self.__init__()
4751  if isinstance(p, tuple):
4752  d, p = p
4753  self.__dict__.update(d)
4754  return self._set_from_binary(p)
4755 
4756  __swig_destroy__ = _IMP_core.delete_Centroid
4757 
4758 # Register Centroid in _IMP_core:
4759 _IMP_core.Centroid_swigregister(Centroid)
4760 class ChecksScoreState(IMP.ScoreState):
4761  r"""Proxy of C++ IMP::core::ChecksScoreState class."""
4762 
4763  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4764 
4765  def __init__(self, *args):
4766  r"""
4767  __init__(ChecksScoreState self, Model m, double probability) -> ChecksScoreState
4768  __init__(ChecksScoreState self) -> ChecksScoreState
4769  """
4770  _IMP_core.ChecksScoreState_swiginit(self, _IMP_core.new_ChecksScoreState(*args))
4771 
4772  def get_number_of_checked(self):
4773  r"""get_number_of_checked(ChecksScoreState self) -> unsigned int"""
4774  return _IMP_core.ChecksScoreState_get_number_of_checked(self)
4775 
4776  def do_before_evaluate(self):
4777  r"""do_before_evaluate(ChecksScoreState self)"""
4778  return _IMP_core.ChecksScoreState_do_before_evaluate(self)
4779 
4780  def do_after_evaluate(self, da):
4781  r"""do_after_evaluate(ChecksScoreState self, DerivativeAccumulator da)"""
4782  return _IMP_core.ChecksScoreState_do_after_evaluate(self, da)
4783 
4784  def do_get_outputs(self):
4785  r"""do_get_outputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4786  return _IMP_core.ChecksScoreState_do_get_outputs(self)
4787 
4788  def do_get_inputs(self):
4789  r"""do_get_inputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4790  return _IMP_core.ChecksScoreState_do_get_inputs(self)
4791 
4792  def get_version_info(self):
4793  r"""get_version_info(ChecksScoreState self) -> VersionInfo"""
4794  return _IMP_core.ChecksScoreState_get_version_info(self)
4795  __swig_destroy__ = _IMP_core.delete_ChecksScoreState
4796 
4797  def __str__(self):
4798  r"""__str__(ChecksScoreState self) -> std::string"""
4799  return _IMP_core.ChecksScoreState___str__(self)
4800 
4801  def __repr__(self):
4802  r"""__repr__(ChecksScoreState self) -> std::string"""
4803  return _IMP_core.ChecksScoreState___repr__(self)
4804 
4805  @staticmethod
4806  def get_from(o):
4807  return _object_cast_to_ChecksScoreState(o)
4808 
4809 
4810  def _get_as_binary(self):
4811  r"""_get_as_binary(ChecksScoreState self) -> PyObject *"""
4812  return _IMP_core.ChecksScoreState__get_as_binary(self)
4813 
4814  def _set_from_binary(self, p):
4815  r"""_set_from_binary(ChecksScoreState self, PyObject * p)"""
4816  return _IMP_core.ChecksScoreState__set_from_binary(self, p)
4817 
4818  def __getstate__(self):
4819  p = self._get_as_binary()
4820  if len(self.__dict__) > 1:
4821  d = self.__dict__.copy()
4822  del d['this']
4823  p = (d, p)
4824  return p
4825 
4826  def __setstate__(self, p):
4827  if not hasattr(self, 'this'):
4828  self.__init__()
4829  if isinstance(p, tuple):
4830  d, p = p
4831  self.__dict__.update(d)
4832  return self._set_from_binary(p)
4833 
4834 
4835 # Register ChecksScoreState in _IMP_core:
4836 _IMP_core.ChecksScoreState_swigregister(ChecksScoreState)
4837 class ChildrenRefiner(IMP.Refiner):
4838  r"""Proxy of C++ IMP::core::ChildrenRefiner class."""
4839 
4840  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4841 
4842  def __init__(self, tr):
4843  r"""__init__(ChildrenRefiner self, HierarchyTraits tr) -> ChildrenRefiner"""
4844  _IMP_core.ChildrenRefiner_swiginit(self, _IMP_core.new_ChildrenRefiner(tr))
4845 
4846  def do_get_inputs(self, m, pis):
4847  r"""do_get_inputs(ChildrenRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4848  return _IMP_core.ChildrenRefiner_do_get_inputs(self, m, pis)
4849 
4850  def get_version_info(self):
4851  r"""get_version_info(ChildrenRefiner self) -> VersionInfo"""
4852  return _IMP_core.ChildrenRefiner_get_version_info(self)
4853  __swig_destroy__ = _IMP_core.delete_ChildrenRefiner
4854 
4855  def __str__(self):
4856  r"""__str__(ChildrenRefiner self) -> std::string"""
4857  return _IMP_core.ChildrenRefiner___str__(self)
4858 
4859  def __repr__(self):
4860  r"""__repr__(ChildrenRefiner self) -> std::string"""
4861  return _IMP_core.ChildrenRefiner___repr__(self)
4862 
4863  @staticmethod
4864  def get_from(o):
4865  return _object_cast_to_ChildrenRefiner(o)
4866 
4867 
4868 # Register ChildrenRefiner in _IMP_core:
4869 _IMP_core.ChildrenRefiner_swigregister(ChildrenRefiner)
4870 class ClosedCubicSpline(IMP.UnaryFunction):
4871  r"""Proxy of C++ IMP::core::ClosedCubicSpline class."""
4872 
4873  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4874 
4875  def __init__(self, values, minrange, spacing):
4876  r"""__init__(ClosedCubicSpline self, IMP::Floats const & values, double minrange, double spacing) -> ClosedCubicSpline"""
4877  _IMP_core.ClosedCubicSpline_swiginit(self, _IMP_core.new_ClosedCubicSpline(values, minrange, spacing))
4878 
4879  def get_version_info(self):
4880  r"""get_version_info(ClosedCubicSpline self) -> VersionInfo"""
4881  return _IMP_core.ClosedCubicSpline_get_version_info(self)
4882  __swig_destroy__ = _IMP_core.delete_ClosedCubicSpline
4883 
4884  def do_show(self, out):
4885  r"""do_show(ClosedCubicSpline self, _ostream out)"""
4886  return _IMP_core.ClosedCubicSpline_do_show(self, out)
4887 
4888  def get_minrange(self):
4889  r"""get_minrange(ClosedCubicSpline self) -> IMP::Float"""
4890  return _IMP_core.ClosedCubicSpline_get_minrange(self)
4891 
4892  def get_spacing(self):
4893  r"""get_spacing(ClosedCubicSpline self) -> IMP::Float"""
4894  return _IMP_core.ClosedCubicSpline_get_spacing(self)
4895 
4896  def get_values(self):
4897  r"""get_values(ClosedCubicSpline self) -> IMP::Floats"""
4898  return _IMP_core.ClosedCubicSpline_get_values(self)
4899 
4900  def get_second_derivatives(self):
4901  r"""get_second_derivatives(ClosedCubicSpline self) -> IMP::Floats"""
4902  return _IMP_core.ClosedCubicSpline_get_second_derivatives(self)
4903 
4904  def __str__(self):
4905  r"""__str__(ClosedCubicSpline self) -> std::string"""
4906  return _IMP_core.ClosedCubicSpline___str__(self)
4907 
4908  def __repr__(self):
4909  r"""__repr__(ClosedCubicSpline self) -> std::string"""
4910  return _IMP_core.ClosedCubicSpline___repr__(self)
4911 
4912  @staticmethod
4913  def get_from(o):
4914  return _object_cast_to_ClosedCubicSpline(o)
4915 
4916 
4917  def _get_jax(self):
4918  import jax.numpy as jnp
4919  from IMP.core._jax_util import _spline
4920  def score(feature, minrange, spacing, values, second_derivs):
4921  # determine bin index and thus the cubic fragment to use:
4922  lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
4923  # enforce periodicity - wrap around from n to 0
4924  highbin = jnp.remainder(lowbin + 1, len(values))
4925  return _spline(feature, minrange, lowbin, highbin, spacing,
4926  values, second_derivs)
4927  return functools.partial(
4928  score, minrange=self.get_minrange(),
4929  spacing=self.get_spacing(), values=jnp.asarray(self.get_values()),
4930  second_derivs=jnp.asarray(self.get_second_derivatives()))
4931 
4932 
4933 # Register ClosedCubicSpline in _IMP_core:
4934 _IMP_core.ClosedCubicSpline_swigregister(ClosedCubicSpline)
4935 class KClosePairsPairScore(IMP.PairScore):
4936  r"""Proxy of C++ IMP::core::KClosePairsPairScore class."""
4937 
4938  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4939 
4940  def __init__(self, f, r, k=1):
4941  r"""__init__(KClosePairsPairScore self, PairScore f, Refiner r, int k=1) -> KClosePairsPairScore"""
4942  _IMP_core.KClosePairsPairScore_swiginit(self, _IMP_core.new_KClosePairsPairScore(f, r, k))
4943 
4944  def get_close_pairs(self, pp):
4945  r"""get_close_pairs(KClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
4946  return _IMP_core.KClosePairsPairScore_get_close_pairs(self, pp)
4947 
4948  def create_current_decomposition(self, m, vt):
4949  r"""create_current_decomposition(KClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
4950  return _IMP_core.KClosePairsPairScore_create_current_decomposition(self, m, vt)
4951 
4952  def do_get_inputs(self, m, pis):
4953  r"""do_get_inputs(KClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4954  return _IMP_core.KClosePairsPairScore_do_get_inputs(self, m, pis)
4955 
4956  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
4957  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"""
4958  return _IMP_core.KClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
4959 
4960  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
4961  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"""
4962  return _IMP_core.KClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
4963 
4964  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
4965  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"""
4966  return _IMP_core.KClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
4967 
4968  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
4969  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"""
4970  return _IMP_core.KClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
4971 
4972  def get_version_info(self):
4973  r"""get_version_info(KClosePairsPairScore self) -> VersionInfo"""
4974  return _IMP_core.KClosePairsPairScore_get_version_info(self)
4975  __swig_destroy__ = _IMP_core.delete_KClosePairsPairScore
4976 
4977  def __str__(self):
4978  r"""__str__(KClosePairsPairScore self) -> std::string"""
4979  return _IMP_core.KClosePairsPairScore___str__(self)
4980 
4981  def __repr__(self):
4982  r"""__repr__(KClosePairsPairScore self) -> std::string"""
4983  return _IMP_core.KClosePairsPairScore___repr__(self)
4984 
4985  @staticmethod
4986  def get_from(o):
4987  return _object_cast_to_KClosePairsPairScore(o)
4988 
4989 
4990 # Register KClosePairsPairScore in _IMP_core:
4991 _IMP_core.KClosePairsPairScore_swigregister(KClosePairsPairScore)
4992 class ClosePairsPairScore(IMP.PairScore):
4993  r"""Proxy of C++ IMP::core::ClosePairsPairScore class."""
4994 
4995  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4996 
4997  def __init__(self, f, r, max_distance):
4998  r"""__init__(ClosePairsPairScore self, PairScore f, Refiner r, IMP::Float max_distance) -> ClosePairsPairScore"""
4999  _IMP_core.ClosePairsPairScore_swiginit(self, _IMP_core.new_ClosePairsPairScore(f, r, max_distance))
5000 
5001  def get_close_pairs(self, pp):
5002  r"""get_close_pairs(ClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
5003  return _IMP_core.ClosePairsPairScore_get_close_pairs(self, pp)
5004 
5005  def create_current_decomposition(self, m, vt):
5006  r"""create_current_decomposition(ClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
5007  return _IMP_core.ClosePairsPairScore_create_current_decomposition(self, m, vt)
5008 
5009  def do_get_inputs(self, m, pis):
5010  r"""do_get_inputs(ClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5011  return _IMP_core.ClosePairsPairScore_do_get_inputs(self, m, pis)
5012 
5013  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
5014  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"""
5015  return _IMP_core.ClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
5016 
5017  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
5018  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"""
5019  return _IMP_core.ClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
5020 
5021  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
5022  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"""
5023  return _IMP_core.ClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
5024 
5025  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
5026  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"""
5027  return _IMP_core.ClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
5028 
5029  def get_version_info(self):
5030  r"""get_version_info(ClosePairsPairScore self) -> VersionInfo"""
5031  return _IMP_core.ClosePairsPairScore_get_version_info(self)
5032  __swig_destroy__ = _IMP_core.delete_ClosePairsPairScore
5033 
5034  def __str__(self):
5035  r"""__str__(ClosePairsPairScore self) -> std::string"""
5036  return _IMP_core.ClosePairsPairScore___str__(self)
5037 
5038  def __repr__(self):
5039  r"""__repr__(ClosePairsPairScore self) -> std::string"""
5040  return _IMP_core.ClosePairsPairScore___repr__(self)
5041 
5042  @staticmethod
5043  def get_from(o):
5044  return _object_cast_to_ClosePairsPairScore(o)
5045 
5046 
5047 # Register ClosePairsPairScore in _IMP_core:
5048 _IMP_core.ClosePairsPairScore_swigregister(ClosePairsPairScore)
5049 class ConjugateGradients(IMP.AttributeOptimizer):
5050  r"""Proxy of C++ IMP::core::ConjugateGradients class."""
5051 
5052  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5053 
5054  def __init__(self, *args):
5055  r"""
5056  __init__(ConjugateGradients self, Model m, std::string name="ConjugateGradients%1%") -> ConjugateGradients
5057  __init__(ConjugateGradients self) -> ConjugateGradients
5058  """
5059  _IMP_core.ConjugateGradients_swiginit(self, _IMP_core.new_ConjugateGradients(*args))
5060 
5061  def set_gradient_threshold(self, t):
5062  r"""set_gradient_threshold(ConjugateGradients self, IMP::Float t)"""
5063  return _IMP_core.ConjugateGradients_set_gradient_threshold(self, t)
5064 
5065  def set_max_change(self, t):
5066  r"""set_max_change(ConjugateGradients self, IMP::Float t)"""
5067  return _IMP_core.ConjugateGradients_set_max_change(self, t)
5068 
5069  def do_optimize(self, max_steps):
5070  r"""do_optimize(ConjugateGradients self, unsigned int max_steps) -> IMP::Float"""
5071  return _IMP_core.ConjugateGradients_do_optimize(self, max_steps)
5072 
5073  def get_version_info(self):
5074  r"""get_version_info(ConjugateGradients self) -> VersionInfo"""
5075  return _IMP_core.ConjugateGradients_get_version_info(self)
5076  __swig_destroy__ = _IMP_core.delete_ConjugateGradients
5077 
5078  def __str__(self):
5079  r"""__str__(ConjugateGradients self) -> std::string"""
5080  return _IMP_core.ConjugateGradients___str__(self)
5081 
5082  def __repr__(self):
5083  r"""__repr__(ConjugateGradients self) -> std::string"""
5084  return _IMP_core.ConjugateGradients___repr__(self)
5085 
5086  @staticmethod
5087  def get_from(o):
5088  return _object_cast_to_ConjugateGradients(o)
5089 
5090 
5091  def _get_as_binary(self):
5092  r"""_get_as_binary(ConjugateGradients self) -> PyObject *"""
5093  return _IMP_core.ConjugateGradients__get_as_binary(self)
5094 
5095  def _set_from_binary(self, p):
5096  r"""_set_from_binary(ConjugateGradients self, PyObject * p)"""
5097  return _IMP_core.ConjugateGradients__set_from_binary(self, p)
5098 
5099  def __getstate__(self):
5100  p = self._get_as_binary()
5101  if len(self.__dict__) > 1:
5102  d = self.__dict__.copy()
5103  del d['this']
5104  p = (d, p)
5105  return p
5106 
5107  def __setstate__(self, p):
5108  if not hasattr(self, 'this'):
5109  self.__init__()
5110  if isinstance(p, tuple):
5111  d, p = p
5112  self.__dict__.update(d)
5113  return self._set_from_binary(p)
5114 
5115 
5116 # Register ConjugateGradients in _IMP_core:
5117 _IMP_core.ConjugateGradients_swigregister(ConjugateGradients)
5118 class ConnectivityRestraint(IMP.Restraint):
5119  r"""Proxy of C++ IMP::core::ConnectivityRestraint class."""
5120 
5121  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5122 
5123  def __init__(self, ps, sc):
5124  r"""__init__(ConnectivityRestraint self, PairScore ps, _SingletonContainerAdaptor sc) -> ConnectivityRestraint"""
5125  _IMP_core.ConnectivityRestraint_swiginit(self, _IMP_core.new_ConnectivityRestraint(ps, sc))
5126 
5127  def get_connected_index_pairs(self):
5128  r"""get_connected_index_pairs(ConnectivityRestraint self) -> IMP::ParticleIndexPairs"""
5129  return _IMP_core.ConnectivityRestraint_get_connected_index_pairs(self)
5130 
5131  def get_pair_score(self):
5132  r"""get_pair_score(ConnectivityRestraint self) -> PairScore"""
5133  return _IMP_core.ConnectivityRestraint_get_pair_score(self)
5134 
5135  def do_create_current_decomposition(self):
5136  r"""do_create_current_decomposition(ConnectivityRestraint self) -> IMP::Restraints"""
5137  return _IMP_core.ConnectivityRestraint_do_create_current_decomposition(self)
5138 
5139  def do_get_inputs(self):
5140  r"""do_get_inputs(ConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
5141  return _IMP_core.ConnectivityRestraint_do_get_inputs(self)
5142 
5143  def get_version_info(self):
5144  r"""get_version_info(ConnectivityRestraint self) -> VersionInfo"""
5145  return _IMP_core.ConnectivityRestraint_get_version_info(self)
5146  __swig_destroy__ = _IMP_core.delete_ConnectivityRestraint
5147 
5148  def __str__(self):
5149  r"""__str__(ConnectivityRestraint self) -> std::string"""
5150  return _IMP_core.ConnectivityRestraint___str__(self)
5151 
5152  def __repr__(self):
5153  r"""__repr__(ConnectivityRestraint self) -> std::string"""
5154  return _IMP_core.ConnectivityRestraint___repr__(self)
5155 
5156  @staticmethod
5157  def get_from(o):
5158  return _object_cast_to_ConnectivityRestraint(o)
5159 
5160 
5161 # Register ConnectivityRestraint in _IMP_core:
5162 _IMP_core.ConnectivityRestraint_swigregister(ConnectivityRestraint)
5163 class ConstantRestraint(IMP.Restraint):
5164  r"""Proxy of C++ IMP::core::ConstantRestraint class."""
5165 
5166  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5167 
5168  def __init__(self, *args):
5169  r"""
5170  __init__(ConstantRestraint self, Model m, IMP::Float v) -> ConstantRestraint
5171  __init__(ConstantRestraint self) -> ConstantRestraint
5172  """
5173  _IMP_core.ConstantRestraint_swiginit(self, _IMP_core.new_ConstantRestraint(*args))
5174 
5175  def do_get_inputs(self):
5176  r"""do_get_inputs(ConstantRestraint self) -> IMP::ModelObjectsTemp"""
5177  return _IMP_core.ConstantRestraint_do_get_inputs(self)
5178 
5179  def get_version_info(self):
5180  r"""get_version_info(ConstantRestraint self) -> VersionInfo"""
5181  return _IMP_core.ConstantRestraint_get_version_info(self)
5182  __swig_destroy__ = _IMP_core.delete_ConstantRestraint
5183 
5184  def __str__(self):
5185  r"""__str__(ConstantRestraint self) -> std::string"""
5186  return _IMP_core.ConstantRestraint___str__(self)
5187 
5188  def __repr__(self):
5189  r"""__repr__(ConstantRestraint self) -> std::string"""
5190  return _IMP_core.ConstantRestraint___repr__(self)
5191 
5192  @staticmethod
5193  def get_from(o):
5194  return _object_cast_to_ConstantRestraint(o)
5195 
5196 
5197  def _get_as_binary(self):
5198  r"""_get_as_binary(ConstantRestraint self) -> PyObject *"""
5199  return _IMP_core.ConstantRestraint__get_as_binary(self)
5200 
5201  def _set_from_binary(self, p):
5202  r"""_set_from_binary(ConstantRestraint self, PyObject * p)"""
5203  return _IMP_core.ConstantRestraint__set_from_binary(self, p)
5204 
5205  def __getstate__(self):
5206  p = self._get_as_binary()
5207  if len(self.__dict__) > 1:
5208  d = self.__dict__.copy()
5209  del d['this']
5210  p = (d, p)
5211  return p
5212 
5213  def __setstate__(self, p):
5214  if not hasattr(self, 'this'):
5215  self.__init__()
5216  if isinstance(p, tuple):
5217  d, p = p
5218  self.__dict__.update(d)
5219  return self._set_from_binary(p)
5220 
5221 
5222 # Register ConstantRestraint in _IMP_core:
5223 _IMP_core.ConstantRestraint_swigregister(ConstantRestraint)
5224 class Cosine(IMP.UnaryFunction):
5225  r"""Proxy of C++ IMP::core::Cosine class."""
5226 
5227  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5228 
5229  def __init__(self, *args):
5230  r"""
5231  __init__(Cosine self, IMP::Float force_constant, int periodicity, IMP::Float phase) -> Cosine
5232  __init__(Cosine self) -> Cosine
5233  """
5234  _IMP_core.Cosine_swiginit(self, _IMP_core.new_Cosine(*args))
5235 
5236  def get_force_constant(self):
5237  r"""get_force_constant(Cosine self) -> IMP::Float"""
5238  return _IMP_core.Cosine_get_force_constant(self)
5239 
5240  def get_periodicity(self):
5241  r"""get_periodicity(Cosine self) -> int"""
5242  return _IMP_core.Cosine_get_periodicity(self)
5243 
5244  def get_phase(self):
5245  r"""get_phase(Cosine self) -> IMP::Float"""
5246  return _IMP_core.Cosine_get_phase(self)
5247 
5248  def get_version_info(self):
5249  r"""get_version_info(Cosine self) -> VersionInfo"""
5250  return _IMP_core.Cosine_get_version_info(self)
5251  __swig_destroy__ = _IMP_core.delete_Cosine
5252 
5253  def do_show(self, out):
5254  r"""do_show(Cosine self, _ostream out)"""
5255  return _IMP_core.Cosine_do_show(self, out)
5256 
5257  def __str__(self):
5258  r"""__str__(Cosine self) -> std::string"""
5259  return _IMP_core.Cosine___str__(self)
5260 
5261  def __repr__(self):
5262  r"""__repr__(Cosine self) -> std::string"""
5263  return _IMP_core.Cosine___repr__(self)
5264 
5265  @staticmethod
5266  def get_from(o):
5267  return _object_cast_to_Cosine(o)
5268 
5269 
5270  def _get_as_binary(self):
5271  r"""_get_as_binary(Cosine self) -> PyObject *"""
5272  return _IMP_core.Cosine__get_as_binary(self)
5273 
5274  def _set_from_binary(self, p):
5275  r"""_set_from_binary(Cosine self, PyObject * p)"""
5276  return _IMP_core.Cosine__set_from_binary(self, p)
5277 
5278  def __getstate__(self):
5279  p = self._get_as_binary()
5280  if len(self.__dict__) > 1:
5281  d = self.__dict__.copy()
5282  del d['this']
5283  p = (d, p)
5284  return p
5285 
5286  def __setstate__(self, p):
5287  if not hasattr(self, 'this'):
5288  self.__init__()
5289  if isinstance(p, tuple):
5290  d, p = p
5291  self.__dict__.update(d)
5292  return self._set_from_binary(p)
5293 
5294 
5295  def _get_jax(self):
5296  import jax.numpy as jnp
5297  def score(val, k, period, phase):
5298  return jnp.abs(k) - k * jnp.cos(period * val + phase)
5299  return functools.partial(score, k=self.get_force_constant(),
5300  period=self.get_periodicity(),
5301  phase=self.get_phase())
5302 
5303 
5304 # Register Cosine in _IMP_core:
5305 _IMP_core.Cosine_swigregister(Cosine)
5306 class CoverRefined(IMP.SingletonModifier):
5307  r"""Proxy of C++ IMP::core::CoverRefined class."""
5308 
5309  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5310 
5311  def __init__(self, ref, slack=0):
5312  r"""__init__(CoverRefined self, Refiner ref, IMP::Float slack=0) -> CoverRefined"""
5313  _IMP_core.CoverRefined_swiginit(self, _IMP_core.new_CoverRefined(ref, slack))
5314 
5315  def set_slack(self, slack):
5316  r"""set_slack(CoverRefined self, IMP::Float slack)"""
5317  return _IMP_core.CoverRefined_set_slack(self, slack)
5318 
5319  def do_get_inputs(self, m, pis):
5320  r"""do_get_inputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5321  return _IMP_core.CoverRefined_do_get_inputs(self, m, pis)
5322 
5323  def do_get_outputs(self, m, pis):
5324  r"""do_get_outputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5325  return _IMP_core.CoverRefined_do_get_outputs(self, m, pis)
5326 
5327  def get_version_info(self):
5328  r"""get_version_info(CoverRefined self) -> VersionInfo"""
5329  return _IMP_core.CoverRefined_get_version_info(self)
5330  __swig_destroy__ = _IMP_core.delete_CoverRefined
5331 
5332  def __str__(self):
5333  r"""__str__(CoverRefined self) -> std::string"""
5334  return _IMP_core.CoverRefined___str__(self)
5335 
5336  def __repr__(self):
5337  r"""__repr__(CoverRefined self) -> std::string"""
5338  return _IMP_core.CoverRefined___repr__(self)
5339 
5340  @staticmethod
5341  def get_from(o):
5342  return _object_cast_to_CoverRefined(o)
5343 
5344 
5345 # Register CoverRefined in _IMP_core:
5346 _IMP_core.CoverRefined_swigregister(CoverRefined)
5347 class Cover(XYZR):
5348  r"""Proxy of C++ IMP::core::Cover class."""
5349 
5350  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5351 
5352  def get_constraint(self):
5353  r"""get_constraint(Cover self) -> Constraint"""
5354  return _IMP_core.Cover_get_constraint(self)
5355 
5356  def __init__(self, *args):
5357  r"""
5358  __init__(Cover self) -> Cover
5359  __init__(Cover self, Model m, ParticleIndex id) -> Cover
5360  __init__(Cover self, _ParticleAdaptor d) -> Cover
5361  """
5362  _IMP_core.Cover_swiginit(self, _IMP_core.new_Cover(*args))
5363 
5364  def show(self, *args):
5365  r"""show(Cover self, _ostream out=std::cout)"""
5366  return _IMP_core.Cover_show(self, *args)
5367 
5368  @staticmethod
5369  def setup_particle(*args):
5370  r"""
5371  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Cover
5372  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Cover
5373  setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Cover
5374  setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Cover
5375  """
5376  return _IMP_core.Cover_setup_particle(*args)
5377 
5378  @staticmethod
5379  def get_is_setup(*args):
5380  r"""
5381  get_is_setup(_ParticleAdaptor p) -> bool
5382  get_is_setup(Model m, ParticleIndex pi) -> bool
5383  """
5384  return _IMP_core.Cover_get_is_setup(*args)
5385 
5386  def add_attribute(self, *args):
5387  r"""
5388  add_attribute(Cover self, FloatKey k, IMP::Float v, bool opt)
5389  add_attribute(Cover self, FloatKey a0, IMP::Float a1)
5390  add_attribute(Cover self, IntKey a0, IMP::Int a1)
5391  add_attribute(Cover self, FloatsKey a0, IMP::Floats a1)
5392  add_attribute(Cover self, IntsKey a0, IMP::Ints a1)
5393  add_attribute(Cover self, StringKey a0, IMP::String a1)
5394  add_attribute(Cover self, ParticleIndexKey a0, Particle a1)
5395  add_attribute(Cover self, ObjectKey a0, Object a1)
5396  add_attribute(Cover self, SparseFloatKey a0, IMP::Float a1)
5397  add_attribute(Cover self, SparseIntKey a0, IMP::Int a1)
5398  add_attribute(Cover self, SparseStringKey a0, IMP::String a1)
5399  add_attribute(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5400  """
5401  return _IMP_core.Cover_add_attribute(self, *args)
5402 
5403  def get_value(self, *args):
5404  r"""
5405  get_value(Cover self, FloatKey a0) -> IMP::Float
5406  get_value(Cover self, IntKey a0) -> IMP::Int
5407  get_value(Cover self, FloatsKey a0) -> IMP::Floats
5408  get_value(Cover self, IntsKey a0) -> IMP::Ints
5409  get_value(Cover self, StringKey a0) -> IMP::String
5410  get_value(Cover self, ParticleIndexKey a0) -> Particle
5411  get_value(Cover self, ObjectKey a0) -> Object
5412  get_value(Cover self, SparseFloatKey a0) -> IMP::Float
5413  get_value(Cover self, SparseIntKey a0) -> IMP::Int
5414  get_value(Cover self, SparseStringKey a0) -> IMP::String
5415  get_value(Cover self, SparseParticleIndexKey a0) -> ParticleIndex
5416  """
5417  return _IMP_core.Cover_get_value(self, *args)
5418 
5419  def set_value(self, *args):
5420  r"""
5421  set_value(Cover self, FloatKey a0, IMP::Float a1)
5422  set_value(Cover self, IntKey a0, IMP::Int a1)
5423  set_value(Cover self, FloatsKey a0, IMP::Floats a1)
5424  set_value(Cover self, IntsKey a0, IMP::Ints a1)
5425  set_value(Cover self, StringKey a0, IMP::String a1)
5426  set_value(Cover self, ParticleIndexKey a0, Particle a1)
5427  set_value(Cover self, ObjectKey a0, Object a1)
5428  set_value(Cover self, SparseFloatKey a0, IMP::Float a1)
5429  set_value(Cover self, SparseIntKey a0, IMP::Int a1)
5430  set_value(Cover self, SparseStringKey a0, IMP::String a1)
5431  set_value(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5432  """
5433  return _IMP_core.Cover_set_value(self, *args)
5434 
5435  def remove_attribute(self, *args):
5436  r"""
5437  remove_attribute(Cover self, FloatKey a0)
5438  remove_attribute(Cover self, IntKey a0)
5439  remove_attribute(Cover self, FloatsKey a0)
5440  remove_attribute(Cover self, IntsKey a0)
5441  remove_attribute(Cover self, StringKey a0)
5442  remove_attribute(Cover self, ParticleIndexKey a0)
5443  remove_attribute(Cover self, ObjectKey a0)
5444  remove_attribute(Cover self, SparseFloatKey a0)
5445  remove_attribute(Cover self, SparseIntKey a0)
5446  remove_attribute(Cover self, SparseStringKey a0)
5447  remove_attribute(Cover self, SparseParticleIndexKey a0)
5448  """
5449  return _IMP_core.Cover_remove_attribute(self, *args)
5450 
5451  def has_attribute(self, *args):
5452  r"""
5453  has_attribute(Cover self, FloatKey a0) -> bool
5454  has_attribute(Cover self, IntKey a0) -> bool
5455  has_attribute(Cover self, FloatsKey a0) -> bool
5456  has_attribute(Cover self, IntsKey a0) -> bool
5457  has_attribute(Cover self, StringKey a0) -> bool
5458  has_attribute(Cover self, ParticleIndexKey a0) -> bool
5459  has_attribute(Cover self, ObjectKey a0) -> bool
5460  has_attribute(Cover self, SparseFloatKey a0) -> bool
5461  has_attribute(Cover self, SparseIntKey a0) -> bool
5462  has_attribute(Cover self, SparseStringKey a0) -> bool
5463  has_attribute(Cover self, SparseParticleIndexKey a0) -> bool
5464  """
5465  return _IMP_core.Cover_has_attribute(self, *args)
5466 
5467  def get_derivative(self, a0):
5468  r"""get_derivative(Cover self, FloatKey a0) -> double"""
5469  return _IMP_core.Cover_get_derivative(self, a0)
5470 
5471  def get_name(self):
5472  r"""get_name(Cover self) -> std::string"""
5473  return _IMP_core.Cover_get_name(self)
5474 
5475  def clear_caches(self):
5476  r"""clear_caches(Cover self)"""
5477  return _IMP_core.Cover_clear_caches(self)
5478 
5479  def set_name(self, a0):
5480  r"""set_name(Cover self, std::string a0)"""
5481  return _IMP_core.Cover_set_name(self, a0)
5482 
5483  def set_check_level(self, a0):
5484  r"""set_check_level(Cover self, IMP::CheckLevel a0)"""
5485  return _IMP_core.Cover_set_check_level(self, a0)
5486 
5487  def add_to_derivative(self, a0, a1, a2):
5488  r"""add_to_derivative(Cover self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5489  return _IMP_core.Cover_add_to_derivative(self, a0, a1, a2)
5490 
5491  def set_is_optimized(self, a0, a1):
5492  r"""set_is_optimized(Cover self, FloatKey a0, bool a1)"""
5493  return _IMP_core.Cover_set_is_optimized(self, a0, a1)
5494 
5495  def get_is_optimized(self, a0):
5496  r"""get_is_optimized(Cover self, FloatKey a0) -> bool"""
5497  return _IMP_core.Cover_get_is_optimized(self, a0)
5498 
5499  def get_check_level(self):
5500  r"""get_check_level(Cover self) -> IMP::CheckLevel"""
5501  return _IMP_core.Cover_get_check_level(self)
5502 
5503  def __eq__(self, *args):
5504  r"""
5505  __eq__(Cover self, Cover o) -> bool
5506  __eq__(Cover self, Particle d) -> bool
5507  """
5508  return _IMP_core.Cover___eq__(self, *args)
5509 
5510  def __ne__(self, *args):
5511  r"""
5512  __ne__(Cover self, Cover o) -> bool
5513  __ne__(Cover self, Particle d) -> bool
5514  """
5515  return _IMP_core.Cover___ne__(self, *args)
5516 
5517  def __le__(self, *args):
5518  r"""
5519  __le__(Cover self, Cover o) -> bool
5520  __le__(Cover self, Particle d) -> bool
5521  """
5522  return _IMP_core.Cover___le__(self, *args)
5523 
5524  def __lt__(self, *args):
5525  r"""
5526  __lt__(Cover self, Cover o) -> bool
5527  __lt__(Cover self, Particle d) -> bool
5528  """
5529  return _IMP_core.Cover___lt__(self, *args)
5530 
5531  def __ge__(self, *args):
5532  r"""
5533  __ge__(Cover self, Cover o) -> bool
5534  __ge__(Cover self, Particle d) -> bool
5535  """
5536  return _IMP_core.Cover___ge__(self, *args)
5537 
5538  def __gt__(self, *args):
5539  r"""
5540  __gt__(Cover self, Cover o) -> bool
5541  __gt__(Cover self, Particle d) -> bool
5542  """
5543  return _IMP_core.Cover___gt__(self, *args)
5544 
5545  def __hash__(self):
5546  r"""__hash__(Cover self) -> std::size_t"""
5547  return _IMP_core.Cover___hash__(self)
5548 
5549  def __str__(self):
5550  r"""__str__(Cover self) -> std::string"""
5551  return _IMP_core.Cover___str__(self)
5552 
5553  def __repr__(self):
5554  r"""__repr__(Cover self) -> std::string"""
5555  return _IMP_core.Cover___repr__(self)
5556 
5557  def _get_as_binary(self):
5558  r"""_get_as_binary(Cover self) -> PyObject *"""
5559  return _IMP_core.Cover__get_as_binary(self)
5560 
5561  def _set_from_binary(self, p):
5562  r"""_set_from_binary(Cover self, PyObject * p)"""
5563  return _IMP_core.Cover__set_from_binary(self, p)
5564 
5565  def __getstate__(self):
5566  p = self._get_as_binary()
5567  if len(self.__dict__) > 1:
5568  d = self.__dict__.copy()
5569  del d['this']
5570  p = (d, p)
5571  return p
5572 
5573  def __setstate__(self, p):
5574  if not hasattr(self, 'this'):
5575  self.__init__()
5576  if isinstance(p, tuple):
5577  d, p = p
5578  self.__dict__.update(d)
5579  return self._set_from_binary(p)
5580 
5581  __swig_destroy__ = _IMP_core.delete_Cover
5582 
5583 # Register Cover in _IMP_core:
5584 _IMP_core.Cover_swigregister(Cover)
5585 class DerivativesFromRefined(IMP.SingletonModifier):
5586  r"""Proxy of C++ IMP::core::DerivativesFromRefined class."""
5587 
5588  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5589 
5590  def __init__(self, *args):
5591  r"""__init__(DerivativesFromRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesFromRefined"""
5592  _IMP_core.DerivativesFromRefined_swiginit(self, _IMP_core.new_DerivativesFromRefined(*args))
5593 
5594  def do_get_inputs(self, m, pis):
5595  r"""do_get_inputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5596  return _IMP_core.DerivativesFromRefined_do_get_inputs(self, m, pis)
5597 
5598  def do_get_outputs(self, m, pis):
5599  r"""do_get_outputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5600  return _IMP_core.DerivativesFromRefined_do_get_outputs(self, m, pis)
5601 
5602  def get_version_info(self):
5603  r"""get_version_info(DerivativesFromRefined self) -> VersionInfo"""
5604  return _IMP_core.DerivativesFromRefined_get_version_info(self)
5605  __swig_destroy__ = _IMP_core.delete_DerivativesFromRefined
5606 
5607  def __str__(self):
5608  r"""__str__(DerivativesFromRefined self) -> std::string"""
5609  return _IMP_core.DerivativesFromRefined___str__(self)
5610 
5611  def __repr__(self):
5612  r"""__repr__(DerivativesFromRefined self) -> std::string"""
5613  return _IMP_core.DerivativesFromRefined___repr__(self)
5614 
5615  @staticmethod
5616  def get_from(o):
5617  return _object_cast_to_DerivativesFromRefined(o)
5618 
5619 
5620 # Register DerivativesFromRefined in _IMP_core:
5621 _IMP_core.DerivativesFromRefined_swigregister(DerivativesFromRefined)
5622 class DerivativesToRefined(IMP.SingletonModifier):
5623  r"""Proxy of C++ IMP::core::DerivativesToRefined class."""
5624 
5625  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5626 
5627  def __init__(self, *args):
5628  r"""
5629  __init__(DerivativesToRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesToRefined
5630  __init__(DerivativesToRefined self) -> DerivativesToRefined
5631  """
5632  _IMP_core.DerivativesToRefined_swiginit(self, _IMP_core.new_DerivativesToRefined(*args))
5633 
5634  def do_get_inputs(self, m, pis):
5635  r"""do_get_inputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5636  return _IMP_core.DerivativesToRefined_do_get_inputs(self, m, pis)
5637 
5638  def do_get_outputs(self, m, pis):
5639  r"""do_get_outputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5640  return _IMP_core.DerivativesToRefined_do_get_outputs(self, m, pis)
5641 
5642  def get_version_info(self):
5643  r"""get_version_info(DerivativesToRefined self) -> VersionInfo"""
5644  return _IMP_core.DerivativesToRefined_get_version_info(self)
5645  __swig_destroy__ = _IMP_core.delete_DerivativesToRefined
5646 
5647  def __str__(self):
5648  r"""__str__(DerivativesToRefined self) -> std::string"""
5649  return _IMP_core.DerivativesToRefined___str__(self)
5650 
5651  def __repr__(self):
5652  r"""__repr__(DerivativesToRefined self) -> std::string"""
5653  return _IMP_core.DerivativesToRefined___repr__(self)
5654 
5655  @staticmethod
5656  def get_from(o):
5657  return _object_cast_to_DerivativesToRefined(o)
5658 
5659 
5660  def _get_as_binary(self):
5661  r"""_get_as_binary(DerivativesToRefined self) -> PyObject *"""
5662  return _IMP_core.DerivativesToRefined__get_as_binary(self)
5663 
5664  def _set_from_binary(self, p):
5665  r"""_set_from_binary(DerivativesToRefined self, PyObject * p)"""
5666  return _IMP_core.DerivativesToRefined__set_from_binary(self, p)
5667 
5668  def __getstate__(self):
5669  p = self._get_as_binary()
5670  if len(self.__dict__) > 1:
5671  d = self.__dict__.copy()
5672  del d['this']
5673  p = (d, p)
5674  return p
5675 
5676  def __setstate__(self, p):
5677  if not hasattr(self, 'this'):
5678  self.__init__()
5679  if isinstance(p, tuple):
5680  d, p = p
5681  self.__dict__.update(d)
5682  return self._set_from_binary(p)
5683 
5684 
5685 # Register DerivativesToRefined in _IMP_core:
5686 _IMP_core.DerivativesToRefined_swigregister(DerivativesToRefined)
5687 class DiameterRestraint(IMP.Restraint):
5688  r"""Proxy of C++ IMP::core::DiameterRestraint class."""
5689 
5690  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5691 
5692  def __init__(self, f, sc, diameter):
5693  r"""__init__(DiameterRestraint self, UnaryFunction f, SingletonContainer sc, IMP::Float diameter) -> DiameterRestraint"""
5694  _IMP_core.DiameterRestraint_swiginit(self, _IMP_core.new_DiameterRestraint(f, sc, diameter))
5695 
5696  def do_get_inputs(self):
5697  r"""do_get_inputs(DiameterRestraint self) -> IMP::ModelObjectsTemp"""
5698  return _IMP_core.DiameterRestraint_do_get_inputs(self)
5699 
5700  def get_version_info(self):
5701  r"""get_version_info(DiameterRestraint self) -> VersionInfo"""
5702  return _IMP_core.DiameterRestraint_get_version_info(self)
5703  __swig_destroy__ = _IMP_core.delete_DiameterRestraint
5704 
5705  def do_create_decomposition(self):
5706  r"""do_create_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5707  return _IMP_core.DiameterRestraint_do_create_decomposition(self)
5708 
5709  def do_create_current_decomposition(self):
5710  r"""do_create_current_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5711  return _IMP_core.DiameterRestraint_do_create_current_decomposition(self)
5712 
5713  def __str__(self):
5714  r"""__str__(DiameterRestraint self) -> std::string"""
5715  return _IMP_core.DiameterRestraint___str__(self)
5716 
5717  def __repr__(self):
5718  r"""__repr__(DiameterRestraint self) -> std::string"""
5719  return _IMP_core.DiameterRestraint___repr__(self)
5720 
5721  @staticmethod
5722  def get_from(o):
5723  return _object_cast_to_DiameterRestraint(o)
5724 
5725 
5726 # Register DiameterRestraint in _IMP_core:
5727 _IMP_core.DiameterRestraint_swigregister(DiameterRestraint)
5728 class Transform(IMP.SingletonModifier):
5729  r"""Proxy of C++ IMP::core::Transform class."""
5730 
5731  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5732 
5733  def __init__(self, *args):
5734  r"""
5735  __init__(Transform self, Transformation3D t, bool ignore_non_xyz=False) -> Transform
5736  __init__(Transform self) -> Transform
5737  """
5738  _IMP_core.Transform_swiginit(self, _IMP_core.new_Transform(*args))
5739 
5740  def do_get_inputs(self, m, pis):
5741  r"""do_get_inputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5742  return _IMP_core.Transform_do_get_inputs(self, m, pis)
5743 
5744  def do_get_outputs(self, m, pis):
5745  r"""do_get_outputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5746  return _IMP_core.Transform_do_get_outputs(self, m, pis)
5747 
5748  def get_version_info(self):
5749  r"""get_version_info(Transform self) -> VersionInfo"""
5750  return _IMP_core.Transform_get_version_info(self)
5751  __swig_destroy__ = _IMP_core.delete_Transform
5752 
5753  def __str__(self):
5754  r"""__str__(Transform self) -> std::string"""
5755  return _IMP_core.Transform___str__(self)
5756 
5757  def __repr__(self):
5758  r"""__repr__(Transform self) -> std::string"""
5759  return _IMP_core.Transform___repr__(self)
5760 
5761  @staticmethod
5762  def get_from(o):
5763  return _object_cast_to_Transform(o)
5764 
5765 
5766  def _get_as_binary(self):
5767  r"""_get_as_binary(Transform self) -> PyObject *"""
5768  return _IMP_core.Transform__get_as_binary(self)
5769 
5770  def _set_from_binary(self, p):
5771  r"""_set_from_binary(Transform self, PyObject * p)"""
5772  return _IMP_core.Transform__set_from_binary(self, p)
5773 
5774  def __getstate__(self):
5775  p = self._get_as_binary()
5776  if len(self.__dict__) > 1:
5777  d = self.__dict__.copy()
5778  del d['this']
5779  p = (d, p)
5780  return p
5781 
5782  def __setstate__(self, p):
5783  if not hasattr(self, 'this'):
5784  self.__init__()
5785  if isinstance(p, tuple):
5786  d, p = p
5787  self.__dict__.update(d)
5788  return self._set_from_binary(p)
5789 
5790 
5791 # Register Transform in _IMP_core:
5792 _IMP_core.Transform_swigregister(Transform)
5793 class Reference(IMP.Decorator):
5794  r"""Proxy of C++ IMP::core::Reference class."""
5795 
5796  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5797 
5798  def __init__(self, *args):
5799  r"""
5800  __init__(Reference self) -> Reference
5801  __init__(Reference self, Model m, ParticleIndex id) -> Reference
5802  __init__(Reference self, _ParticleAdaptor d) -> Reference
5803  """
5804  _IMP_core.Reference_swiginit(self, _IMP_core.new_Reference(*args))
5805 
5806  def show(self, *args):
5807  r"""show(Reference self, _ostream out=std::cout)"""
5808  return _IMP_core.Reference_show(self, *args)
5809 
5810  @staticmethod
5811  def setup_particle(*args):
5812  r"""
5813  setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor reference) -> Reference
5814  setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor reference) -> Reference
5815  """
5816  return _IMP_core.Reference_setup_particle(*args)
5817 
5818  def get_reference_particle(self):
5819  r"""get_reference_particle(Reference self) -> Particle"""
5820  return _IMP_core.Reference_get_reference_particle(self)
5821 
5822  @staticmethod
5823  def get_is_setup(*args):
5824  r"""
5825  get_is_setup(_ParticleAdaptor p) -> bool
5826  get_is_setup(Model m, ParticleIndex pi) -> bool
5827  """
5828  return _IMP_core.Reference_get_is_setup(*args)
5829 
5830  @staticmethod
5831  def get_reference_key():
5832  r"""get_reference_key() -> ParticleIndexKey"""
5833  return _IMP_core.Reference_get_reference_key()
5834 
5835  def add_attribute(self, *args):
5836  r"""
5837  add_attribute(Reference self, FloatKey k, IMP::Float v, bool opt)
5838  add_attribute(Reference self, FloatKey a0, IMP::Float a1)
5839  add_attribute(Reference self, IntKey a0, IMP::Int a1)
5840  add_attribute(Reference self, FloatsKey a0, IMP::Floats a1)
5841  add_attribute(Reference self, IntsKey a0, IMP::Ints a1)
5842  add_attribute(Reference self, StringKey a0, IMP::String a1)
5843  add_attribute(Reference self, ParticleIndexKey a0, Particle a1)
5844  add_attribute(Reference self, ObjectKey a0, Object a1)
5845  add_attribute(Reference self, SparseFloatKey a0, IMP::Float a1)
5846  add_attribute(Reference self, SparseIntKey a0, IMP::Int a1)
5847  add_attribute(Reference self, SparseStringKey a0, IMP::String a1)
5848  add_attribute(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5849  """
5850  return _IMP_core.Reference_add_attribute(self, *args)
5851 
5852  def get_value(self, *args):
5853  r"""
5854  get_value(Reference self, FloatKey a0) -> IMP::Float
5855  get_value(Reference self, IntKey a0) -> IMP::Int
5856  get_value(Reference self, FloatsKey a0) -> IMP::Floats
5857  get_value(Reference self, IntsKey a0) -> IMP::Ints
5858  get_value(Reference self, StringKey a0) -> IMP::String
5859  get_value(Reference self, ParticleIndexKey a0) -> Particle
5860  get_value(Reference self, ObjectKey a0) -> Object
5861  get_value(Reference self, SparseFloatKey a0) -> IMP::Float
5862  get_value(Reference self, SparseIntKey a0) -> IMP::Int
5863  get_value(Reference self, SparseStringKey a0) -> IMP::String
5864  get_value(Reference self, SparseParticleIndexKey a0) -> ParticleIndex
5865  """
5866  return _IMP_core.Reference_get_value(self, *args)
5867 
5868  def set_value(self, *args):
5869  r"""
5870  set_value(Reference self, FloatKey a0, IMP::Float a1)
5871  set_value(Reference self, IntKey a0, IMP::Int a1)
5872  set_value(Reference self, FloatsKey a0, IMP::Floats a1)
5873  set_value(Reference self, IntsKey a0, IMP::Ints a1)
5874  set_value(Reference self, StringKey a0, IMP::String a1)
5875  set_value(Reference self, ParticleIndexKey a0, Particle a1)
5876  set_value(Reference self, ObjectKey a0, Object a1)
5877  set_value(Reference self, SparseFloatKey a0, IMP::Float a1)
5878  set_value(Reference self, SparseIntKey a0, IMP::Int a1)
5879  set_value(Reference self, SparseStringKey a0, IMP::String a1)
5880  set_value(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5881  """
5882  return _IMP_core.Reference_set_value(self, *args)
5883 
5884  def remove_attribute(self, *args):
5885  r"""
5886  remove_attribute(Reference self, FloatKey a0)
5887  remove_attribute(Reference self, IntKey a0)
5888  remove_attribute(Reference self, FloatsKey a0)
5889  remove_attribute(Reference self, IntsKey a0)
5890  remove_attribute(Reference self, StringKey a0)
5891  remove_attribute(Reference self, ParticleIndexKey a0)
5892  remove_attribute(Reference self, ObjectKey a0)
5893  remove_attribute(Reference self, SparseFloatKey a0)
5894  remove_attribute(Reference self, SparseIntKey a0)
5895  remove_attribute(Reference self, SparseStringKey a0)
5896  remove_attribute(Reference self, SparseParticleIndexKey a0)
5897  """
5898  return _IMP_core.Reference_remove_attribute(self, *args)
5899 
5900  def has_attribute(self, *args):
5901  r"""
5902  has_attribute(Reference self, FloatKey a0) -> bool
5903  has_attribute(Reference self, IntKey a0) -> bool
5904  has_attribute(Reference self, FloatsKey a0) -> bool
5905  has_attribute(Reference self, IntsKey a0) -> bool
5906  has_attribute(Reference self, StringKey a0) -> bool
5907  has_attribute(Reference self, ParticleIndexKey a0) -> bool
5908  has_attribute(Reference self, ObjectKey a0) -> bool
5909  has_attribute(Reference self, SparseFloatKey a0) -> bool
5910  has_attribute(Reference self, SparseIntKey a0) -> bool
5911  has_attribute(Reference self, SparseStringKey a0) -> bool
5912  has_attribute(Reference self, SparseParticleIndexKey a0) -> bool
5913  """
5914  return _IMP_core.Reference_has_attribute(self, *args)
5915 
5916  def get_derivative(self, a0):
5917  r"""get_derivative(Reference self, FloatKey a0) -> double"""
5918  return _IMP_core.Reference_get_derivative(self, a0)
5919 
5920  def get_name(self):
5921  r"""get_name(Reference self) -> std::string"""
5922  return _IMP_core.Reference_get_name(self)
5923 
5924  def clear_caches(self):
5925  r"""clear_caches(Reference self)"""
5926  return _IMP_core.Reference_clear_caches(self)
5927 
5928  def set_name(self, a0):
5929  r"""set_name(Reference self, std::string a0)"""
5930  return _IMP_core.Reference_set_name(self, a0)
5931 
5932  def set_check_level(self, a0):
5933  r"""set_check_level(Reference self, IMP::CheckLevel a0)"""
5934  return _IMP_core.Reference_set_check_level(self, a0)
5935 
5936  def add_to_derivative(self, a0, a1, a2):
5937  r"""add_to_derivative(Reference self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5938  return _IMP_core.Reference_add_to_derivative(self, a0, a1, a2)
5939 
5940  def set_is_optimized(self, a0, a1):
5941  r"""set_is_optimized(Reference self, FloatKey a0, bool a1)"""
5942  return _IMP_core.Reference_set_is_optimized(self, a0, a1)
5943 
5944  def get_is_optimized(self, a0):
5945  r"""get_is_optimized(Reference self, FloatKey a0) -> bool"""
5946  return _IMP_core.Reference_get_is_optimized(self, a0)
5947 
5948  def get_check_level(self):
5949  r"""get_check_level(Reference self) -> IMP::CheckLevel"""
5950  return _IMP_core.Reference_get_check_level(self)
5951 
5952  def __eq__(self, *args):
5953  r"""
5954  __eq__(Reference self, Reference o) -> bool
5955  __eq__(Reference self, Particle d) -> bool
5956  """
5957  return _IMP_core.Reference___eq__(self, *args)
5958 
5959  def __ne__(self, *args):
5960  r"""
5961  __ne__(Reference self, Reference o) -> bool
5962  __ne__(Reference self, Particle d) -> bool
5963  """
5964  return _IMP_core.Reference___ne__(self, *args)
5965 
5966  def __le__(self, *args):
5967  r"""
5968  __le__(Reference self, Reference o) -> bool
5969  __le__(Reference self, Particle d) -> bool
5970  """
5971  return _IMP_core.Reference___le__(self, *args)
5972 
5973  def __lt__(self, *args):
5974  r"""
5975  __lt__(Reference self, Reference o) -> bool
5976  __lt__(Reference self, Particle d) -> bool
5977  """
5978  return _IMP_core.Reference___lt__(self, *args)
5979 
5980  def __ge__(self, *args):
5981  r"""
5982  __ge__(Reference self, Reference o) -> bool
5983  __ge__(Reference self, Particle d) -> bool
5984  """
5985  return _IMP_core.Reference___ge__(self, *args)
5986 
5987  def __gt__(self, *args):
5988  r"""
5989  __gt__(Reference self, Reference o) -> bool
5990  __gt__(Reference self, Particle d) -> bool
5991  """
5992  return _IMP_core.Reference___gt__(self, *args)
5993 
5994  def __hash__(self):
5995  r"""__hash__(Reference self) -> std::size_t"""
5996  return _IMP_core.Reference___hash__(self)
5997 
5998  def __str__(self):
5999  r"""__str__(Reference self) -> std::string"""
6000  return _IMP_core.Reference___str__(self)
6001 
6002  def __repr__(self):
6003  r"""__repr__(Reference self) -> std::string"""
6004  return _IMP_core.Reference___repr__(self)
6005 
6006  def _get_as_binary(self):
6007  r"""_get_as_binary(Reference self) -> PyObject *"""
6008  return _IMP_core.Reference__get_as_binary(self)
6009 
6010  def _set_from_binary(self, p):
6011  r"""_set_from_binary(Reference self, PyObject * p)"""
6012  return _IMP_core.Reference__set_from_binary(self, p)
6013 
6014  def __getstate__(self):
6015  p = self._get_as_binary()
6016  if len(self.__dict__) > 1:
6017  d = self.__dict__.copy()
6018  del d['this']
6019  p = (d, p)
6020  return p
6021 
6022  def __setstate__(self, p):
6023  if not hasattr(self, 'this'):
6024  self.__init__()
6025  if isinstance(p, tuple):
6026  d, p = p
6027  self.__dict__.update(d)
6028  return self._set_from_binary(p)
6029 
6030  __swig_destroy__ = _IMP_core.delete_Reference
6031 
6032 # Register Reference in _IMP_core:
6033 _IMP_core.Reference_swigregister(Reference)
6034 class TransformationAndReflectionSymmetry(IMP.SingletonModifier):
6035  r"""Proxy of C++ IMP::core::TransformationAndReflectionSymmetry class."""
6036 
6037  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6038 
6039  def __init__(self, t, r):
6040  r"""__init__(TransformationAndReflectionSymmetry self, Transformation3D t, Reflection3D r) -> TransformationAndReflectionSymmetry"""
6041  _IMP_core.TransformationAndReflectionSymmetry_swiginit(self, _IMP_core.new_TransformationAndReflectionSymmetry(t, r))
6042 
6043  def do_get_inputs(self, m, pis):
6044  r"""do_get_inputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6045  return _IMP_core.TransformationAndReflectionSymmetry_do_get_inputs(self, m, pis)
6046 
6047  def do_get_outputs(self, m, pis):
6048  r"""do_get_outputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6049  return _IMP_core.TransformationAndReflectionSymmetry_do_get_outputs(self, m, pis)
6050 
6051  def get_version_info(self):
6052  r"""get_version_info(TransformationAndReflectionSymmetry self) -> VersionInfo"""
6053  return _IMP_core.TransformationAndReflectionSymmetry_get_version_info(self)
6054  __swig_destroy__ = _IMP_core.delete_TransformationAndReflectionSymmetry
6055 
6056  def __str__(self):
6057  r"""__str__(TransformationAndReflectionSymmetry self) -> std::string"""
6058  return _IMP_core.TransformationAndReflectionSymmetry___str__(self)
6059 
6060  def __repr__(self):
6061  r"""__repr__(TransformationAndReflectionSymmetry self) -> std::string"""
6062  return _IMP_core.TransformationAndReflectionSymmetry___repr__(self)
6063 
6064  @staticmethod
6065  def get_from(o):
6066  return _object_cast_to_TransformationAndReflectionSymmetry(o)
6067 
6068 
6069 # Register TransformationAndReflectionSymmetry in _IMP_core:
6070 _IMP_core.TransformationAndReflectionSymmetry_swigregister(TransformationAndReflectionSymmetry)
6071 class TransformationSymmetry(IMP.SingletonModifier):
6072  r"""Proxy of C++ IMP::core::TransformationSymmetry class."""
6073 
6074  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6075 
6076  def __init__(self, *args):
6077  r"""
6078  __init__(TransformationSymmetry self, Transformation3D t) -> TransformationSymmetry
6079  __init__(TransformationSymmetry self, ParticleIndex rb_pi) -> TransformationSymmetry
6080  """
6081  _IMP_core.TransformationSymmetry_swiginit(self, _IMP_core.new_TransformationSymmetry(*args))
6082 
6083  def get_transformation(self):
6084  r"""get_transformation(TransformationSymmetry self) -> Transformation3D"""
6085  return _IMP_core.TransformationSymmetry_get_transformation(self)
6086 
6087  def set_transformation(self, t):
6088  r"""set_transformation(TransformationSymmetry self, Transformation3D t)"""
6089  return _IMP_core.TransformationSymmetry_set_transformation(self, t)
6090 
6091  def do_get_inputs(self, m, pis):
6092  r"""do_get_inputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6093  return _IMP_core.TransformationSymmetry_do_get_inputs(self, m, pis)
6094 
6095  def do_get_outputs(self, m, pis):
6096  r"""do_get_outputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6097  return _IMP_core.TransformationSymmetry_do_get_outputs(self, m, pis)
6098 
6099  def get_version_info(self):
6100  r"""get_version_info(TransformationSymmetry self) -> VersionInfo"""
6101  return _IMP_core.TransformationSymmetry_get_version_info(self)
6102  __swig_destroy__ = _IMP_core.delete_TransformationSymmetry
6103 
6104  def __str__(self):
6105  r"""__str__(TransformationSymmetry self) -> std::string"""
6106  return _IMP_core.TransformationSymmetry___str__(self)
6107 
6108  def __repr__(self):
6109  r"""__repr__(TransformationSymmetry self) -> std::string"""
6110  return _IMP_core.TransformationSymmetry___repr__(self)
6111 
6112  @staticmethod
6113  def get_from(o):
6114  return _object_cast_to_TransformationSymmetry(o)
6115 
6116 
6117 # Register TransformationSymmetry in _IMP_core:
6118 _IMP_core.TransformationSymmetry_swigregister(TransformationSymmetry)
6119 class TransformationSymmetryMover(MonteCarloMover):
6120  r"""Proxy of C++ IMP::core::TransformationSymmetryMover class."""
6121 
6122  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6123 
6124  def __init__(self, m, symm, pivot, max_translation, max_rotation):
6125  r"""__init__(TransformationSymmetryMover self, Model m, TransformationSymmetry symm, ParticleIndex pivot, IMP::Float max_translation, IMP::Float max_rotation) -> TransformationSymmetryMover"""
6126  _IMP_core.TransformationSymmetryMover_swiginit(self, _IMP_core.new_TransformationSymmetryMover(m, symm, pivot, max_translation, max_rotation))
6127 
6128  def set_maximum_translation(self, mt):
6129  r"""set_maximum_translation(TransformationSymmetryMover self, IMP::Float mt)"""
6130  return _IMP_core.TransformationSymmetryMover_set_maximum_translation(self, mt)
6131 
6132  def set_maximum_rotation(self, mr):
6133  r"""set_maximum_rotation(TransformationSymmetryMover self, IMP::Float mr)"""
6134  return _IMP_core.TransformationSymmetryMover_set_maximum_rotation(self, mr)
6135 
6136  def get_maximum_translation(self):
6137  r"""get_maximum_translation(TransformationSymmetryMover self) -> IMP::Float"""
6138  return _IMP_core.TransformationSymmetryMover_get_maximum_translation(self)
6139 
6140  def get_maximum_rotation(self):
6141  r"""get_maximum_rotation(TransformationSymmetryMover self) -> IMP::Float"""
6142  return _IMP_core.TransformationSymmetryMover_get_maximum_rotation(self)
6143 
6144  def get_version_info(self):
6145  r"""get_version_info(TransformationSymmetryMover self) -> VersionInfo"""
6146  return _IMP_core.TransformationSymmetryMover_get_version_info(self)
6147  __swig_destroy__ = _IMP_core.delete_TransformationSymmetryMover
6148 
6149  def __str__(self):
6150  r"""__str__(TransformationSymmetryMover self) -> std::string"""
6151  return _IMP_core.TransformationSymmetryMover___str__(self)
6152 
6153  def __repr__(self):
6154  r"""__repr__(TransformationSymmetryMover self) -> std::string"""
6155  return _IMP_core.TransformationSymmetryMover___repr__(self)
6156 
6157  @staticmethod
6158  def get_from(o):
6159  return _object_cast_to_TransformationSymmetryMover(o)
6160 
6161 
6162 # Register TransformationSymmetryMover in _IMP_core:
6163 _IMP_core.TransformationSymmetryMover_swigregister(TransformationSymmetryMover)
6164 class DistancePairScore(IMP.PairScore):
6165  r"""Proxy of C++ IMP::core::DistancePairScore class."""
6166 
6167  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6168 
6169  def __init__(self, *args):
6170  r"""
6171  __init__(DistancePairScore self, UnaryFunction uf, std::string name="DistancePairScore%1%") -> DistancePairScore
6172  __init__(DistancePairScore self) -> DistancePairScore
6173  """
6174  _IMP_core.DistancePairScore_swiginit(self, _IMP_core.new_DistancePairScore(*args))
6175 
6176  def do_get_inputs(self, m, pis):
6177  r"""do_get_inputs(DistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6178  return _IMP_core.DistancePairScore_do_get_inputs(self, m, pis)
6179 
6180  def get_score_functor(self, *args):
6181  r"""
6182  get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6183  get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6184  """
6185  return _IMP_core.DistancePairScore_get_score_functor(self, *args)
6186 
6187  def get_version_info(self):
6188  r"""get_version_info(DistancePairScore self) -> VersionInfo"""
6189  return _IMP_core.DistancePairScore_get_version_info(self)
6190  __swig_destroy__ = _IMP_core.delete_DistancePairScore
6191 
6192  def __str__(self):
6193  r"""__str__(DistancePairScore self) -> std::string"""
6194  return _IMP_core.DistancePairScore___str__(self)
6195 
6196  def __repr__(self):
6197  r"""__repr__(DistancePairScore self) -> std::string"""
6198  return _IMP_core.DistancePairScore___repr__(self)
6199 
6200  @staticmethod
6201  def get_from(o):
6202  return _object_cast_to_DistancePairScore(o)
6203 
6204 
6205  def _get_as_binary(self):
6206  r"""_get_as_binary(DistancePairScore self) -> PyObject *"""
6207  return _IMP_core.DistancePairScore__get_as_binary(self)
6208 
6209  def _set_from_binary(self, p):
6210  r"""_set_from_binary(DistancePairScore self, PyObject * p)"""
6211  return _IMP_core.DistancePairScore__set_from_binary(self, p)
6212 
6213  def __getstate__(self):
6214  p = self._get_as_binary()
6215  if len(self.__dict__) > 1:
6216  d = self.__dict__.copy()
6217  del d['this']
6218  p = (d, p)
6219  return p
6220 
6221  def __setstate__(self, p):
6222  if not hasattr(self, 'this'):
6223  self.__init__()
6224  if isinstance(p, tuple):
6225  d, p = p
6226  self.__dict__.update(d)
6227  return self._set_from_binary(p)
6228 
6229 
6230  def _get_jax(self, m, indexes, space):
6231  import jax.numpy as jnp
6232  def jax_score(jm, uf):
6233  xyzs = jm['xyz'][indexes]
6234  diff = xyzs[:,0] - xyzs[:,1]
6235  drs = space.distance(diff)
6236  return uf(drs)
6237  sfnc = self.get_score_functor()
6238  uf = sfnc.get_unary_function().get_derived_object()
6239  f = functools.partial(jax_score, uf=uf._get_jax())
6240  return self._wrap_jax(m, f)
6241 
6242 
6243 # Register DistancePairScore in _IMP_core:
6244 _IMP_core.DistancePairScore_swigregister(DistancePairScore)
6245 class HarmonicDistancePairScore(IMP.PairScore):
6246  r"""Proxy of C++ IMP::core::HarmonicDistancePairScore class."""
6247 
6248  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6249 
6250  def __init__(self, *args):
6251  r"""
6252  __init__(HarmonicDistancePairScore self, double x0, double k, std::string name="HarmonicDistancePairScore%1%") -> HarmonicDistancePairScore
6253  __init__(HarmonicDistancePairScore self) -> HarmonicDistancePairScore
6254  """
6255  _IMP_core.HarmonicDistancePairScore_swiginit(self, _IMP_core.new_HarmonicDistancePairScore(*args))
6256 
6257  def do_get_inputs(self, m, pis):
6258  r"""do_get_inputs(HarmonicDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6259  return _IMP_core.HarmonicDistancePairScore_do_get_inputs(self, m, pis)
6260 
6261  def get_score_functor(self, *args):
6262  r"""
6263  get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore
6264  get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore const &
6265  """
6266  return _IMP_core.HarmonicDistancePairScore_get_score_functor(self, *args)
6267 
6268  def get_x0(self):
6269  r"""get_x0(HarmonicDistancePairScore self) -> double"""
6270  return _IMP_core.HarmonicDistancePairScore_get_x0(self)
6271 
6272  def get_k(self):
6273  r"""get_k(HarmonicDistancePairScore self) -> double"""
6274  return _IMP_core.HarmonicDistancePairScore_get_k(self)
6275 
6276  def get_version_info(self):
6277  r"""get_version_info(HarmonicDistancePairScore self) -> VersionInfo"""
6278  return _IMP_core.HarmonicDistancePairScore_get_version_info(self)
6279  __swig_destroy__ = _IMP_core.delete_HarmonicDistancePairScore
6280 
6281  def __str__(self):
6282  r"""__str__(HarmonicDistancePairScore self) -> std::string"""
6283  return _IMP_core.HarmonicDistancePairScore___str__(self)
6284 
6285  def __repr__(self):
6286  r"""__repr__(HarmonicDistancePairScore self) -> std::string"""
6287  return _IMP_core.HarmonicDistancePairScore___repr__(self)
6288 
6289  @staticmethod
6290  def get_from(o):
6291  return _object_cast_to_HarmonicDistancePairScore(o)
6292 
6293 
6294  def _get_as_binary(self):
6295  r"""_get_as_binary(HarmonicDistancePairScore self) -> PyObject *"""
6296  return _IMP_core.HarmonicDistancePairScore__get_as_binary(self)
6297 
6298  def _set_from_binary(self, p):
6299  r"""_set_from_binary(HarmonicDistancePairScore self, PyObject * p)"""
6300  return _IMP_core.HarmonicDistancePairScore__set_from_binary(self, p)
6301 
6302  def __getstate__(self):
6303  p = self._get_as_binary()
6304  if len(self.__dict__) > 1:
6305  d = self.__dict__.copy()
6306  del d['this']
6307  p = (d, p)
6308  return p
6309 
6310  def __setstate__(self, p):
6311  if not hasattr(self, 'this'):
6312  self.__init__()
6313  if isinstance(p, tuple):
6314  d, p = p
6315  self.__dict__.update(d)
6316  return self._set_from_binary(p)
6317 
6318 
6319  def _get_jax(self, m, indexes, space):
6320  import jax.numpy as jnp
6321  def jax_harmonic_distance_pair_score(jm, d, k):
6322  xyzs = jm['xyz'][indexes]
6323  diff = xyzs[:,0] - xyzs[:,1]
6324  drs = space.distance(diff)
6325  return 0.5 * k * (d - drs)**2
6326  f = functools.partial(jax_harmonic_distance_pair_score,
6327  d=self.get_x0(), k=self.get_k())
6328  return self._wrap_jax(m, f)
6329 
6330 
6331 # Register HarmonicDistancePairScore in _IMP_core:
6332 _IMP_core.HarmonicDistancePairScore_swigregister(HarmonicDistancePairScore)
6333 class DistanceRestraint(IMP.Restraint):
6334  r"""Proxy of C++ IMP::core::DistanceRestraint class."""
6335 
6336  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6337 
6338  def __init__(self, *args):
6339  r"""
6340  __init__(DistanceRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor a, _ParticleIndexAdaptor b, std::string name="DistanceRestraint %1%") -> DistanceRestraint
6341  __init__(DistanceRestraint self) -> DistanceRestraint
6342  """
6343  _IMP_core.DistanceRestraint_swiginit(self, _IMP_core.new_DistanceRestraint(*args))
6344 
6345  def get_score_object(self):
6346  r"""get_score_object(DistanceRestraint self) -> DistancePairScore"""
6347  return _IMP_core.DistanceRestraint_get_score_object(self)
6348 
6349  def get_index(self):
6350  r"""get_index(DistanceRestraint self) -> IMP::core::DistancePairScore::IndexArgument"""
6351  return _IMP_core.DistanceRestraint_get_index(self)
6352 
6353  def get_version_info(self):
6354  r"""get_version_info(DistanceRestraint self) -> VersionInfo"""
6355  return _IMP_core.DistanceRestraint_get_version_info(self)
6356  __swig_destroy__ = _IMP_core.delete_DistanceRestraint
6357 
6358  def __str__(self):
6359  r"""__str__(DistanceRestraint self) -> std::string"""
6360  return _IMP_core.DistanceRestraint___str__(self)
6361 
6362  def __repr__(self):
6363  r"""__repr__(DistanceRestraint self) -> std::string"""
6364  return _IMP_core.DistanceRestraint___repr__(self)
6365 
6366  @staticmethod
6367  def get_from(o):
6368  return _object_cast_to_DistanceRestraint(o)
6369 
6370 
6371  def _get_as_binary(self):
6372  r"""_get_as_binary(DistanceRestraint self) -> PyObject *"""
6373  return _IMP_core.DistanceRestraint__get_as_binary(self)
6374 
6375  def _set_from_binary(self, p):
6376  r"""_set_from_binary(DistanceRestraint self, PyObject * p)"""
6377  return _IMP_core.DistanceRestraint__set_from_binary(self, p)
6378 
6379  def __getstate__(self):
6380  p = self._get_as_binary()
6381  if len(self.__dict__) > 1:
6382  d = self.__dict__.copy()
6383  del d['this']
6384  p = (d, p)
6385  return p
6386 
6387  def __setstate__(self, p):
6388  if not hasattr(self, 'this'):
6389  self.__init__()
6390  if isinstance(p, tuple):
6391  d, p = p
6392  self.__dict__.update(d)
6393  return self._set_from_binary(p)
6394 
6395 
6396  def _get_jax(self, space):
6397  import jax.numpy as jnp
6398  import IMP._jax_util
6399  ps = self.get_score_object()
6400  indexes = jnp.array([self.get_index()])
6401  ji = ps._get_jax(self.get_model(), indexes, space=space)
6402  def score(jm):
6403  return jnp.sum(ji.score_func(jm), axis=-1)
6404  return self._wrap_jax(score)
6405 
6406 
6407 # Register DistanceRestraint in _IMP_core:
6408 _IMP_core.DistanceRestraint_swigregister(DistanceRestraint)
6409 class SphereDistanceToSingletonScore(IMP.SingletonScore):
6410  r"""Proxy of C++ IMP::core::SphereDistanceToSingletonScore class."""
6411 
6412  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6413 
6414  def __init__(self, f, pt):
6415  r"""__init__(SphereDistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> SphereDistanceToSingletonScore"""
6416  _IMP_core.SphereDistanceToSingletonScore_swiginit(self, _IMP_core.new_SphereDistanceToSingletonScore(f, pt))
6417 
6418  def do_get_inputs(self, m, pis):
6419  r"""do_get_inputs(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6420  return _IMP_core.SphereDistanceToSingletonScore_do_get_inputs(self, m, pis)
6421 
6422  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
6423  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"""
6424  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
6425 
6426  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
6427  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"""
6428  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
6429 
6430  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
6431  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"""
6432  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
6433 
6434  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
6435  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"""
6436  return _IMP_core.SphereDistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
6437 
6438  def get_version_info(self):
6439  r"""get_version_info(SphereDistanceToSingletonScore self) -> VersionInfo"""
6440  return _IMP_core.SphereDistanceToSingletonScore_get_version_info(self)
6441  __swig_destroy__ = _IMP_core.delete_SphereDistanceToSingletonScore
6442 
6443  def __str__(self):
6444  r"""__str__(SphereDistanceToSingletonScore self) -> std::string"""
6445  return _IMP_core.SphereDistanceToSingletonScore___str__(self)
6446 
6447  def __repr__(self):
6448  r"""__repr__(SphereDistanceToSingletonScore self) -> std::string"""
6449  return _IMP_core.SphereDistanceToSingletonScore___repr__(self)
6450 
6451  @staticmethod
6452  def get_from(o):
6453  return _object_cast_to_SphereDistanceToSingletonScore(o)
6454 
6455 
6456 # Register SphereDistanceToSingletonScore in _IMP_core:
6457 _IMP_core.SphereDistanceToSingletonScore_swigregister(SphereDistanceToSingletonScore)
6458 class ExcludedVolumeRestraint(IMP.Restraint):
6459  r"""Proxy of C++ IMP::core::ExcludedVolumeRestraint class."""
6460 
6461  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6462 
6463  def __init__(self, *args):
6464  r"""__init__(ExcludedVolumeRestraint self, _SingletonContainerAdaptor sc, double k=1, double slack=10, std::string name="ExcludedVolumeRestraint%1%") -> ExcludedVolumeRestraint"""
6465  _IMP_core.ExcludedVolumeRestraint_swiginit(self, _IMP_core.new_ExcludedVolumeRestraint(*args))
6466 
6467  def do_get_inputs(self):
6468  r"""do_get_inputs(ExcludedVolumeRestraint self) -> IMP::ModelObjectsTemp"""
6469  return _IMP_core.ExcludedVolumeRestraint_do_get_inputs(self)
6470 
6471  def get_version_info(self):
6472  r"""get_version_info(ExcludedVolumeRestraint self) -> VersionInfo"""
6473  return _IMP_core.ExcludedVolumeRestraint_get_version_info(self)
6474  __swig_destroy__ = _IMP_core.delete_ExcludedVolumeRestraint
6475 
6476  def do_create_decomposition(self):
6477  r"""do_create_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6478  return _IMP_core.ExcludedVolumeRestraint_do_create_decomposition(self)
6479 
6480  def do_create_current_decomposition(self):
6481  r"""do_create_current_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6482  return _IMP_core.ExcludedVolumeRestraint_do_create_current_decomposition(self)
6483 
6484  def get_indexes(self):
6485  r"""get_indexes(ExcludedVolumeRestraint self) -> IMP::ParticleIndexPairs const &"""
6486  return _IMP_core.ExcludedVolumeRestraint_get_indexes(self)
6487  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)
6488  def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
6489  def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
6490  pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
6491 
6492  def remove_pair_filter(self, d):
6493  r"""remove_pair_filter(ExcludedVolumeRestraint self, PairPredicate d)"""
6494  return _IMP_core.ExcludedVolumeRestraint_remove_pair_filter(self, d)
6495 
6496  def _python_index_pair_filter(self, d, start, stop):
6497  r"""_python_index_pair_filter(ExcludedVolumeRestraint self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
6498  return _IMP_core.ExcludedVolumeRestraint__python_index_pair_filter(self, d, start, stop)
6499 
6500  def remove_pair_filters(self, d):
6501  r"""remove_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & d)"""
6502  return _IMP_core.ExcludedVolumeRestraint_remove_pair_filters(self, d)
6503 
6504  def set_pair_filters(self, ps):
6505  r"""set_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & ps)"""
6506  return _IMP_core.ExcludedVolumeRestraint_set_pair_filters(self, ps)
6507 
6508  def set_pair_filters_order(self, objs):
6509  r"""set_pair_filters_order(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6510  return _IMP_core.ExcludedVolumeRestraint_set_pair_filters_order(self, objs)
6511 
6512  def add_pair_filter(self, obj):
6513  r"""add_pair_filter(ExcludedVolumeRestraint self, PairPredicate obj) -> unsigned int"""
6514  return _IMP_core.ExcludedVolumeRestraint_add_pair_filter(self, obj)
6515 
6516  def add_pair_filters(self, objs):
6517  r"""add_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6518  return _IMP_core.ExcludedVolumeRestraint_add_pair_filters(self, objs)
6519 
6520  def clear_pair_filters(self):
6521  r"""clear_pair_filters(ExcludedVolumeRestraint self)"""
6522  return _IMP_core.ExcludedVolumeRestraint_clear_pair_filters(self)
6523 
6524  def get_number_of_pair_filters(self):
6525  r"""get_number_of_pair_filters(ExcludedVolumeRestraint self) -> unsigned int"""
6526  return _IMP_core.ExcludedVolumeRestraint_get_number_of_pair_filters(self)
6527 
6528  def get_has_pair_filters(self):
6529  r"""get_has_pair_filters(ExcludedVolumeRestraint self) -> bool"""
6530  return _IMP_core.ExcludedVolumeRestraint_get_has_pair_filters(self)
6531 
6532  def get_pair_filter(self, i):
6533  r"""get_pair_filter(ExcludedVolumeRestraint self, unsigned int i) -> PairPredicate"""
6534  return _IMP_core.ExcludedVolumeRestraint_get_pair_filter(self, i)
6535 
6536  def get_pair_filters(self):
6537  r"""get_pair_filters(ExcludedVolumeRestraint self) -> IMP::PairPredicates"""
6538  return _IMP_core.ExcludedVolumeRestraint_get_pair_filters(self)
6539 
6540  def erase_pair_filter(self, i):
6541  r"""erase_pair_filter(ExcludedVolumeRestraint self, unsigned int i)"""
6542  return _IMP_core.ExcludedVolumeRestraint_erase_pair_filter(self, i)
6543 
6544  def reserve_pair_filters(self, sz):
6545  r"""reserve_pair_filters(ExcludedVolumeRestraint self, unsigned int sz)"""
6546  return _IMP_core.ExcludedVolumeRestraint_reserve_pair_filters(self, sz)
6547 
6548  def __str__(self):
6549  r"""__str__(ExcludedVolumeRestraint self) -> std::string"""
6550  return _IMP_core.ExcludedVolumeRestraint___str__(self)
6551 
6552  def __repr__(self):
6553  r"""__repr__(ExcludedVolumeRestraint self) -> std::string"""
6554  return _IMP_core.ExcludedVolumeRestraint___repr__(self)
6555 
6556  @staticmethod
6557  def get_from(o):
6558  return _object_cast_to_ExcludedVolumeRestraint(o)
6559 
6560 
6561 # Register ExcludedVolumeRestraint in _IMP_core:
6562 _IMP_core.ExcludedVolumeRestraint_swigregister(ExcludedVolumeRestraint)
6563 class FixedRefiner(IMP.Refiner):
6564  r"""Proxy of C++ IMP::core::FixedRefiner class."""
6565 
6566  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6567 
6568  def __init__(self, *args):
6569  r"""
6570  __init__(FixedRefiner self, IMP::ParticlesTemp const & ps) -> FixedRefiner
6571  __init__(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> FixedRefiner
6572  __init__(FixedRefiner self) -> FixedRefiner
6573  """
6574  _IMP_core.FixedRefiner_swiginit(self, _IMP_core.new_FixedRefiner(*args))
6575 
6576  def do_get_inputs(self, m, pis):
6577  r"""do_get_inputs(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6578  return _IMP_core.FixedRefiner_do_get_inputs(self, m, pis)
6579 
6580  def get_version_info(self):
6581  r"""get_version_info(FixedRefiner self) -> VersionInfo"""
6582  return _IMP_core.FixedRefiner_get_version_info(self)
6583  __swig_destroy__ = _IMP_core.delete_FixedRefiner
6584 
6585  def __str__(self):
6586  r"""__str__(FixedRefiner self) -> std::string"""
6587  return _IMP_core.FixedRefiner___str__(self)
6588 
6589  def __repr__(self):
6590  r"""__repr__(FixedRefiner self) -> std::string"""
6591  return _IMP_core.FixedRefiner___repr__(self)
6592 
6593  @staticmethod
6594  def get_from(o):
6595  return _object_cast_to_FixedRefiner(o)
6596 
6597 
6598  def _get_as_binary(self):
6599  r"""_get_as_binary(FixedRefiner self) -> PyObject *"""
6600  return _IMP_core.FixedRefiner__get_as_binary(self)
6601 
6602  def _set_from_binary(self, p):
6603  r"""_set_from_binary(FixedRefiner self, PyObject * p)"""
6604  return _IMP_core.FixedRefiner__set_from_binary(self, p)
6605 
6606  def __getstate__(self):
6607  p = self._get_as_binary()
6608  if len(self.__dict__) > 1:
6609  d = self.__dict__.copy()
6610  del d['this']
6611  p = (d, p)
6612  return p
6613 
6614  def __setstate__(self, p):
6615  if not hasattr(self, 'this'):
6616  self.__init__()
6617  if isinstance(p, tuple):
6618  d, p = p
6619  self.__dict__.update(d)
6620  return self._set_from_binary(p)
6621 
6622 
6623 # Register FixedRefiner in _IMP_core:
6624 _IMP_core.FixedRefiner_swigregister(FixedRefiner)
6625 class GridClosePairsFinder(ClosePairsFinder):
6626  r"""Proxy of C++ IMP::core::GridClosePairsFinder class."""
6627 
6628  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6629 
6630  def __init__(self):
6631  r"""__init__(GridClosePairsFinder self) -> GridClosePairsFinder"""
6632  _IMP_core.GridClosePairsFinder_swiginit(self, _IMP_core.new_GridClosePairsFinder())
6633 
6634  def get_close_pairs(self, *args):
6635  r"""
6636  get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6637  get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6638  get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
6639  get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
6640  """
6641  return _IMP_core.GridClosePairsFinder_get_close_pairs(self, *args)
6642 
6643  def do_get_inputs(self, m, pis):
6644  r"""do_get_inputs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6645  return _IMP_core.GridClosePairsFinder_do_get_inputs(self, m, pis)
6646 
6647  def get_version_info(self):
6648  r"""get_version_info(GridClosePairsFinder self) -> VersionInfo"""
6649  return _IMP_core.GridClosePairsFinder_get_version_info(self)
6650  __swig_destroy__ = _IMP_core.delete_GridClosePairsFinder
6651 
6652  def __str__(self):
6653  r"""__str__(GridClosePairsFinder self) -> std::string"""
6654  return _IMP_core.GridClosePairsFinder___str__(self)
6655 
6656  def __repr__(self):
6657  r"""__repr__(GridClosePairsFinder self) -> std::string"""
6658  return _IMP_core.GridClosePairsFinder___repr__(self)
6659 
6660  @staticmethod
6661  def get_from(o):
6662  return _object_cast_to_GridClosePairsFinder(o)
6663 
6664 
6665  def _get_as_binary(self):
6666  r"""_get_as_binary(GridClosePairsFinder self) -> PyObject *"""
6667  return _IMP_core.GridClosePairsFinder__get_as_binary(self)
6668 
6669  def _set_from_binary(self, p):
6670  r"""_set_from_binary(GridClosePairsFinder self, PyObject * p)"""
6671  return _IMP_core.GridClosePairsFinder__set_from_binary(self, p)
6672 
6673  def __getstate__(self):
6674  p = self._get_as_binary()
6675  if len(self.__dict__) > 1:
6676  d = self.__dict__.copy()
6677  del d['this']
6678  p = (d, p)
6679  return p
6680 
6681  def __setstate__(self, p):
6682  if not hasattr(self, 'this'):
6683  self.__init__()
6684  if isinstance(p, tuple):
6685  d, p = p
6686  self.__dict__.update(d)
6687  return self._set_from_binary(p)
6688 
6689 
6690 # Register GridClosePairsFinder in _IMP_core:
6691 _IMP_core.GridClosePairsFinder_swigregister(GridClosePairsFinder)
6692 class Harmonic(IMP.UnaryFunction):
6693  r"""Proxy of C++ IMP::core::Harmonic class."""
6694 
6695  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6696 
6697  def __init__(self, *args):
6698  r"""
6699  __init__(Harmonic self, IMP::Float mean, IMP::Float k) -> Harmonic
6700  __init__(Harmonic self) -> Harmonic
6701  """
6702  _IMP_core.Harmonic_swiginit(self, _IMP_core.new_Harmonic(*args))
6703 
6704  def get_version_info(self):
6705  r"""get_version_info(Harmonic self) -> VersionInfo"""
6706  return _IMP_core.Harmonic_get_version_info(self)
6707  __swig_destroy__ = _IMP_core.delete_Harmonic
6708 
6709  def get_mean(self):
6710  r"""get_mean(Harmonic self) -> IMP::Float"""
6711  return _IMP_core.Harmonic_get_mean(self)
6712 
6713  def get_k(self):
6714  r"""get_k(Harmonic self) -> IMP::Float"""
6715  return _IMP_core.Harmonic_get_k(self)
6716 
6717  def set_mean(self, mean):
6718  r"""set_mean(Harmonic self, IMP::Float mean)"""
6719  return _IMP_core.Harmonic_set_mean(self, mean)
6720 
6721  def set_k(self, k):
6722  r"""set_k(Harmonic self, IMP::Float k)"""
6723  return _IMP_core.Harmonic_set_k(self, k)
6724 
6725  @staticmethod
6726  def get_k_from_standard_deviation(sd, t=297.15):
6727  r"""get_k_from_standard_deviation(IMP::Float sd, IMP::Float t=297.15) -> IMP::Float"""
6728  return _IMP_core.Harmonic_get_k_from_standard_deviation(sd, t)
6729 
6730  def __str__(self):
6731  r"""__str__(Harmonic self) -> std::string"""
6732  return _IMP_core.Harmonic___str__(self)
6733 
6734  def __repr__(self):
6735  r"""__repr__(Harmonic self) -> std::string"""
6736  return _IMP_core.Harmonic___repr__(self)
6737 
6738  @staticmethod
6739  def get_from(o):
6740  return _object_cast_to_Harmonic(o)
6741 
6742 
6743  def _get_as_binary(self):
6744  r"""_get_as_binary(Harmonic self) -> PyObject *"""
6745  return _IMP_core.Harmonic__get_as_binary(self)
6746 
6747  def _set_from_binary(self, p):
6748  r"""_set_from_binary(Harmonic self, PyObject * p)"""
6749  return _IMP_core.Harmonic__set_from_binary(self, p)
6750 
6751  def __getstate__(self):
6752  p = self._get_as_binary()
6753  if len(self.__dict__) > 1:
6754  d = self.__dict__.copy()
6755  del d['this']
6756  p = (d, p)
6757  return p
6758 
6759  def __setstate__(self, p):
6760  if not hasattr(self, 'this'):
6761  self.__init__()
6762  if isinstance(p, tuple):
6763  d, p = p
6764  self.__dict__.update(d)
6765  return self._set_from_binary(p)
6766 
6767 
6768  def _get_jax(self):
6769  def score(val, mean, k):
6770  return 0.5 * k * (mean - val) ** 2
6771  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6772 
6773 
6774 # Register Harmonic in _IMP_core:
6775 _IMP_core.Harmonic_swigregister(Harmonic)
6776 class HarmonicWell(IMP.UnaryFunction):
6777  r"""Proxy of C++ IMP::core::HarmonicWell class."""
6778 
6779  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6780 
6781  def __init__(self, well, k):
6782  r"""__init__(HarmonicWell self, IMP::FloatRange const & well, double k) -> HarmonicWell"""
6783  _IMP_core.HarmonicWell_swiginit(self, _IMP_core.new_HarmonicWell(well, k))
6784 
6785  def get_well(self):
6786  r"""get_well(HarmonicWell self) -> IMP::FloatRange"""
6787  return _IMP_core.HarmonicWell_get_well(self)
6788 
6789  def get_k(self):
6790  r"""get_k(HarmonicWell self) -> double"""
6791  return _IMP_core.HarmonicWell_get_k(self)
6792 
6793  def get_version_info(self):
6794  r"""get_version_info(HarmonicWell self) -> VersionInfo"""
6795  return _IMP_core.HarmonicWell_get_version_info(self)
6796  __swig_destroy__ = _IMP_core.delete_HarmonicWell
6797 
6798  def __str__(self):
6799  r"""__str__(HarmonicWell self) -> std::string"""
6800  return _IMP_core.HarmonicWell___str__(self)
6801 
6802  def __repr__(self):
6803  r"""__repr__(HarmonicWell self) -> std::string"""
6804  return _IMP_core.HarmonicWell___repr__(self)
6805 
6806  @staticmethod
6807  def get_from(o):
6808  return _object_cast_to_HarmonicWell(o)
6809 
6810 
6811  def _get_jax(self):
6812  import jax.numpy as jnp
6813  def score(val, lb, ub, k):
6814  return 0.5 * k * (val - jnp.clip(val, lb, ub)) ** 2
6815  well = self.get_well()
6816  return functools.partial(score, lb=well[0], ub=well[1], k=self.get_k())
6817 
6818 
6819 # Register HarmonicWell in _IMP_core:
6820 _IMP_core.HarmonicWell_swigregister(HarmonicWell)
6821 class HarmonicLowerBound(Harmonic):
6822  r"""Proxy of C++ IMP::core::HarmonicLowerBound class."""
6823 
6824  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6825 
6826  def __init__(self, *args):
6827  r"""
6828  __init__(HarmonicLowerBound self, IMP::Float mean, IMP::Float k) -> HarmonicLowerBound
6829  __init__(HarmonicLowerBound self) -> HarmonicLowerBound
6830  """
6831  _IMP_core.HarmonicLowerBound_swiginit(self, _IMP_core.new_HarmonicLowerBound(*args))
6832  __swig_destroy__ = _IMP_core.delete_HarmonicLowerBound
6833 
6834  def __str__(self):
6835  r"""__str__(HarmonicLowerBound self) -> std::string"""
6836  return _IMP_core.HarmonicLowerBound___str__(self)
6837 
6838  def __repr__(self):
6839  r"""__repr__(HarmonicLowerBound self) -> std::string"""
6840  return _IMP_core.HarmonicLowerBound___repr__(self)
6841 
6842  @staticmethod
6843  def get_from(o):
6844  return _object_cast_to_HarmonicLowerBound(o)
6845 
6846 
6847  def _get_as_binary(self):
6848  r"""_get_as_binary(HarmonicLowerBound self) -> PyObject *"""
6849  return _IMP_core.HarmonicLowerBound__get_as_binary(self)
6850 
6851  def _set_from_binary(self, p):
6852  r"""_set_from_binary(HarmonicLowerBound self, PyObject * p)"""
6853  return _IMP_core.HarmonicLowerBound__set_from_binary(self, p)
6854 
6855  def __getstate__(self):
6856  p = self._get_as_binary()
6857  if len(self.__dict__) > 1:
6858  d = self.__dict__.copy()
6859  del d['this']
6860  p = (d, p)
6861  return p
6862 
6863  def __setstate__(self, p):
6864  if not hasattr(self, 'this'):
6865  self.__init__()
6866  if isinstance(p, tuple):
6867  d, p = p
6868  self.__dict__.update(d)
6869  return self._set_from_binary(p)
6870 
6871 
6872  def _get_jax(self):
6873  import jax.lax
6874  def score(val, mean, k):
6875  return 0.5 * k * jax.lax.max(mean - val, 0.0) ** 2
6876  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6877 
6878 
6879 # Register HarmonicLowerBound in _IMP_core:
6880 _IMP_core.HarmonicLowerBound_swigregister(HarmonicLowerBound)
6881 class HarmonicUpperBound(Harmonic):
6882  r"""Proxy of C++ IMP::core::HarmonicUpperBound class."""
6883 
6884  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6885 
6886  def __init__(self, *args):
6887  r"""
6888  __init__(HarmonicUpperBound self, IMP::Float mean, IMP::Float k) -> HarmonicUpperBound
6889  __init__(HarmonicUpperBound self) -> HarmonicUpperBound
6890  """
6891  _IMP_core.HarmonicUpperBound_swiginit(self, _IMP_core.new_HarmonicUpperBound(*args))
6892  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBound
6893 
6894  def __str__(self):
6895  r"""__str__(HarmonicUpperBound self) -> std::string"""
6896  return _IMP_core.HarmonicUpperBound___str__(self)
6897 
6898  def __repr__(self):
6899  r"""__repr__(HarmonicUpperBound self) -> std::string"""
6900  return _IMP_core.HarmonicUpperBound___repr__(self)
6901 
6902  @staticmethod
6903  def get_from(o):
6904  return _object_cast_to_HarmonicUpperBound(o)
6905 
6906 
6907  def _get_as_binary(self):
6908  r"""_get_as_binary(HarmonicUpperBound self) -> PyObject *"""
6909  return _IMP_core.HarmonicUpperBound__get_as_binary(self)
6910 
6911  def _set_from_binary(self, p):
6912  r"""_set_from_binary(HarmonicUpperBound self, PyObject * p)"""
6913  return _IMP_core.HarmonicUpperBound__set_from_binary(self, p)
6914 
6915  def __getstate__(self):
6916  p = self._get_as_binary()
6917  if len(self.__dict__) > 1:
6918  d = self.__dict__.copy()
6919  del d['this']
6920  p = (d, p)
6921  return p
6922 
6923  def __setstate__(self, p):
6924  if not hasattr(self, 'this'):
6925  self.__init__()
6926  if isinstance(p, tuple):
6927  d, p = p
6928  self.__dict__.update(d)
6929  return self._set_from_binary(p)
6930 
6931 
6932  def _get_jax(self):
6933  import jax.lax
6934  def score(val, mean, k):
6935  return 0.5 * k * jax.lax.min(mean - val, 0.0) ** 2
6936  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6937 
6938 
6939 # Register HarmonicUpperBound in _IMP_core:
6940 _IMP_core.HarmonicUpperBound_swigregister(HarmonicUpperBound)
6941 class WeightedSum(IMP.UnaryFunction):
6942  r"""Proxy of C++ IMP::core::WeightedSum class."""
6943 
6944  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6945 
6946  def __init__(self, funcs, weights):
6947  r"""__init__(WeightedSum self, IMP::UnaryFunctions funcs, IMP::Floats weights) -> WeightedSum"""
6948  _IMP_core.WeightedSum_swiginit(self, _IMP_core.new_WeightedSum(funcs, weights))
6949 
6950  def get_function_number(self):
6951  r"""get_function_number(WeightedSum self) -> unsigned int"""
6952  return _IMP_core.WeightedSum_get_function_number(self)
6953 
6954  def set_weights(self, weights):
6955  r"""set_weights(WeightedSum self, IMP::Floats weights)"""
6956  return _IMP_core.WeightedSum_set_weights(self, weights)
6957 
6958  def get_weights(self):
6959  r"""get_weights(WeightedSum self) -> IMP::Floats"""
6960  return _IMP_core.WeightedSum_get_weights(self)
6961 
6962  def get_weight(self, i):
6963  r"""get_weight(WeightedSum self, unsigned int i) -> double"""
6964  return _IMP_core.WeightedSum_get_weight(self, i)
6965 
6966  def get_function(self, i):
6967  r"""get_function(WeightedSum self, unsigned int i) -> UnaryFunction"""
6968  return _IMP_core.WeightedSum_get_function(self, i)
6969 
6970  def get_version_info(self):
6971  r"""get_version_info(WeightedSum self) -> VersionInfo"""
6972  return _IMP_core.WeightedSum_get_version_info(self)
6973  __swig_destroy__ = _IMP_core.delete_WeightedSum
6974 
6975  def __str__(self):
6976  r"""__str__(WeightedSum self) -> std::string"""
6977  return _IMP_core.WeightedSum___str__(self)
6978 
6979  def __repr__(self):
6980  r"""__repr__(WeightedSum self) -> std::string"""
6981  return _IMP_core.WeightedSum___repr__(self)
6982 
6983  @staticmethod
6984  def get_from(o):
6985  return _object_cast_to_WeightedSum(o)
6986 
6987 
6988  def _get_jax(self):
6989  import jax.numpy as jnp
6990  def score(val, funcs, weights):
6991  return sum(f(val) * weight for (f, weight) in zip(funcs, weights))
6992  nfunc = self.get_function_number()
6993  funcs = [self.get_function(i).get_derived_object()._get_jax()
6994  for i in range(nfunc)]
6995  return functools.partial(score, funcs=funcs,
6996  weights=self.get_weights())
6997 
6998 
6999 # Register WeightedSum in _IMP_core:
7000 _IMP_core.WeightedSum_swigregister(WeightedSum)
7001 class WeightedSumOfExponential(IMP.UnaryFunction):
7002  r"""Proxy of C++ IMP::core::WeightedSumOfExponential class."""
7003 
7004  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7005 
7006  def __init__(self, funcs, weights, denom=1.0):
7007  r"""__init__(WeightedSumOfExponential self, IMP::UnaryFunctions funcs, IMP::Floats weights, IMP::Float denom=1.0) -> WeightedSumOfExponential"""
7008  _IMP_core.WeightedSumOfExponential_swiginit(self, _IMP_core.new_WeightedSumOfExponential(funcs, weights, denom))
7009 
7010  def get_function_number(self):
7011  r"""get_function_number(WeightedSumOfExponential self) -> unsigned int"""
7012  return _IMP_core.WeightedSumOfExponential_get_function_number(self)
7013 
7014  def set_weights(self, weights):
7015  r"""set_weights(WeightedSumOfExponential self, IMP::Floats weights)"""
7016  return _IMP_core.WeightedSumOfExponential_set_weights(self, weights)
7017 
7018  def get_weights(self):
7019  r"""get_weights(WeightedSumOfExponential self) -> IMP::Floats"""
7020  return _IMP_core.WeightedSumOfExponential_get_weights(self)
7021 
7022  def get_weight(self, i):
7023  r"""get_weight(WeightedSumOfExponential self, unsigned int i) -> double"""
7024  return _IMP_core.WeightedSumOfExponential_get_weight(self, i)
7025 
7026  def get_function(self, i):
7027  r"""get_function(WeightedSumOfExponential self, unsigned int i) -> UnaryFunction"""
7028  return _IMP_core.WeightedSumOfExponential_get_function(self, i)
7029 
7030  def set_denominator(self, denom):
7031  r"""set_denominator(WeightedSumOfExponential self, double denom)"""
7032  return _IMP_core.WeightedSumOfExponential_set_denominator(self, denom)
7033 
7034  def get_denominator(self):
7035  r"""get_denominator(WeightedSumOfExponential self) -> double"""
7036  return _IMP_core.WeightedSumOfExponential_get_denominator(self)
7037 
7038  def get_version_info(self):
7039  r"""get_version_info(WeightedSumOfExponential self) -> VersionInfo"""
7040  return _IMP_core.WeightedSumOfExponential_get_version_info(self)
7041  __swig_destroy__ = _IMP_core.delete_WeightedSumOfExponential
7042 
7043  def __str__(self):
7044  r"""__str__(WeightedSumOfExponential self) -> std::string"""
7045  return _IMP_core.WeightedSumOfExponential___str__(self)
7046 
7047  def __repr__(self):
7048  r"""__repr__(WeightedSumOfExponential self) -> std::string"""
7049  return _IMP_core.WeightedSumOfExponential___repr__(self)
7050 
7051  @staticmethod
7052  def get_from(o):
7053  return _object_cast_to_WeightedSumOfExponential(o)
7054 
7055 
7056  def _get_jax(self):
7057  import jax.numpy as jnp
7058  def score(val, funcs, weights, denom):
7059  exp_sum = sum(weight * jnp.exp(-f(val) / denom)
7060  for (f, weight) in zip(funcs, weights))
7061  return -jnp.log(exp_sum) * denom
7062  nfunc = self.get_function_number()
7063  funcs = [self.get_function(i).get_derived_object()._get_jax()
7064  for i in range(nfunc)]
7065  return functools.partial(score, funcs=funcs,
7066  weights=self.get_weights(),
7067  denom=self.get_denominator())
7068 
7069 
7070 # Register WeightedSumOfExponential in _IMP_core:
7071 _IMP_core.WeightedSumOfExponential_swigregister(WeightedSumOfExponential)
7072 class MSConnectivityRestraint(IMP.Restraint):
7073  r"""Proxy of C++ IMP::core::MSConnectivityRestraint class."""
7074 
7075  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7076 
7077  def __init__(self, m, ps, eps=0.1):
7078  r"""__init__(MSConnectivityRestraint self, Model m, PairScore ps, double eps=0.1) -> MSConnectivityRestraint"""
7079  _IMP_core.MSConnectivityRestraint_swiginit(self, _IMP_core.new_MSConnectivityRestraint(m, ps, eps))
7080 
7081  def add_type(self, ps):
7082  r"""add_type(MSConnectivityRestraint self, IMP::ParticlesTemp const & ps) -> unsigned int"""
7083  return _IMP_core.MSConnectivityRestraint_add_type(self, ps)
7084 
7085  def add_composite(self, *args):
7086  r"""
7087  add_composite(MSConnectivityRestraint self, IMP::Ints const & components) -> unsigned int
7088  add_composite(MSConnectivityRestraint self, IMP::Ints const & components, unsigned int parent) -> unsigned int
7089  """
7090  return _IMP_core.MSConnectivityRestraint_add_composite(self, *args)
7091 
7092  def get_connected_pairs(self):
7093  r"""get_connected_pairs(MSConnectivityRestraint self) -> IMP::ParticlePairsTemp"""
7094  return _IMP_core.MSConnectivityRestraint_get_connected_pairs(self)
7095 
7096  def get_pair_score(self):
7097  r"""get_pair_score(MSConnectivityRestraint self) -> PairScore"""
7098  return _IMP_core.MSConnectivityRestraint_get_pair_score(self)
7099 
7100  def do_create_current_decomposition(self):
7101  r"""do_create_current_decomposition(MSConnectivityRestraint self) -> IMP::Restraints"""
7102  return _IMP_core.MSConnectivityRestraint_do_create_current_decomposition(self)
7103 
7104  def do_get_inputs(self):
7105  r"""do_get_inputs(MSConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
7106  return _IMP_core.MSConnectivityRestraint_do_get_inputs(self)
7107 
7108  def get_version_info(self):
7109  r"""get_version_info(MSConnectivityRestraint self) -> VersionInfo"""
7110  return _IMP_core.MSConnectivityRestraint_get_version_info(self)
7111  __swig_destroy__ = _IMP_core.delete_MSConnectivityRestraint
7112 
7113  def __str__(self):
7114  r"""__str__(MSConnectivityRestraint self) -> std::string"""
7115  return _IMP_core.MSConnectivityRestraint___str__(self)
7116 
7117  def __repr__(self):
7118  r"""__repr__(MSConnectivityRestraint self) -> std::string"""
7119  return _IMP_core.MSConnectivityRestraint___repr__(self)
7120 
7121  @staticmethod
7122  def get_from(o):
7123  return _object_cast_to_MSConnectivityRestraint(o)
7124 
7125 
7126 # Register MSConnectivityRestraint in _IMP_core:
7127 _IMP_core.MSConnectivityRestraint_swigregister(MSConnectivityRestraint)
7128 class HierarchyTraits(object):
7129  r"""Proxy of C++ IMP::core::HierarchyTraits class."""
7130 
7131  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7132 
7133  def __init__(self, *args):
7134  r"""
7135  __init__(HierarchyTraits self) -> HierarchyTraits
7136  __init__(HierarchyTraits self, std::string name) -> HierarchyTraits
7137  """
7138  _IMP_core.HierarchyTraits_swiginit(self, _IMP_core.new_HierarchyTraits(*args))
7139 
7140  def get_children_key(self):
7141  r"""get_children_key(HierarchyTraits self) -> ParticleIndexesKey"""
7142  return _IMP_core.HierarchyTraits_get_children_key(self)
7143 
7144  def get_parent_key(self):
7145  r"""get_parent_key(HierarchyTraits self) -> ParticleIndexKey"""
7146  return _IMP_core.HierarchyTraits_get_parent_key(self)
7147 
7148  def __eq__(self, o):
7149  r"""__eq__(HierarchyTraits self, HierarchyTraits o) -> bool"""
7150  return _IMP_core.HierarchyTraits___eq__(self, o)
7151 
7152  def show(self, *args):
7153  r"""show(HierarchyTraits self, _ostream out=std::cout)"""
7154  return _IMP_core.HierarchyTraits_show(self, *args)
7155 
7156  def __str__(self):
7157  r"""__str__(HierarchyTraits self) -> std::string"""
7158  return _IMP_core.HierarchyTraits___str__(self)
7159 
7160  def __repr__(self):
7161  r"""__repr__(HierarchyTraits self) -> std::string"""
7162  return _IMP_core.HierarchyTraits___repr__(self)
7163  __swig_destroy__ = _IMP_core.delete_HierarchyTraits
7164 
7165 # Register HierarchyTraits in _IMP_core:
7166 _IMP_core.HierarchyTraits_swigregister(HierarchyTraits)
7167 class Hierarchy(IMP.Decorator):
7168  r"""Proxy of C++ IMP::core::Hierarchy class."""
7169 
7170  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7171 
7172  def get_decorator_traits(self):
7173  r"""get_decorator_traits(Hierarchy self) -> HierarchyTraits"""
7174  return _IMP_core.Hierarchy_get_decorator_traits(self)
7175 
7176  @staticmethod
7177  def get_default_decorator_traits():
7178  r"""get_default_decorator_traits() -> HierarchyTraits"""
7179  return _IMP_core.Hierarchy_get_default_decorator_traits()
7180 
7181  def __init__(self, *args):
7182  r"""
7183  __init__(Hierarchy self) -> Hierarchy
7184  __init__(Hierarchy self, Model m, ParticleIndex id, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7185  __init__(Hierarchy self, _ParticleAdaptor d, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7186  """
7187  _IMP_core.Hierarchy_swiginit(self, _IMP_core.new_Hierarchy(*args))
7188 
7189  def show(self, *args):
7190  r"""show(Hierarchy self, _ostream out=std::cout)"""
7191  return _IMP_core.Hierarchy_show(self, *args)
7192 
7193  @staticmethod
7194  def setup_particle(*args):
7195  r"""
7196  setup_particle(Model m, ParticleIndex pi, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7197  setup_particle(_ParticleAdaptor d, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7198  setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7199  setup_particle(_ParticleAdaptor d, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7200  setup_particle(Model m, ParticleIndex pi, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7201  setup_particle(_ParticleAdaptor d, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7202  """
7203  return _IMP_core.Hierarchy_setup_particle(*args)
7204 
7205  @staticmethod
7206  def get_is_setup(*args):
7207  r"""
7208  get_is_setup(_ParticleAdaptor p, HierarchyTraits tr=get_default_traits()) -> bool
7209  get_is_setup(Model arg1, ParticleIndex arg2, HierarchyTraits arg3=Hierarchy::get_default_traits()) -> bool
7210  """
7211  return _IMP_core.Hierarchy_get_is_setup(*args)
7212 
7213  @staticmethod
7214  def get_changed_key():
7215  r"""get_changed_key() -> TriggerKey"""
7216  return _IMP_core.Hierarchy_get_changed_key()
7217 
7218  def get_parent(self):
7219  r"""get_parent(Hierarchy self) -> Hierarchy"""
7220  return _IMP_core.Hierarchy_get_parent(self)
7221 
7222  def get_number_of_children(self):
7223  r"""get_number_of_children(Hierarchy self) -> unsigned int"""
7224  return _IMP_core.Hierarchy_get_number_of_children(self)
7225 
7226  def get_child(self, i):
7227  r"""get_child(Hierarchy self, unsigned int i) -> Hierarchy"""
7228  return _IMP_core.Hierarchy_get_child(self, i)
7229 
7230  def get_children_indexes(self):
7231  r"""get_children_indexes(Hierarchy self) -> IMP::ParticleIndexes"""
7232  return _IMP_core.Hierarchy_get_children_indexes(self)
7233 
7234  def get_children(self):
7235  r"""get_children(Hierarchy self) -> IMP::core::GenericHierarchies"""
7236  return _IMP_core.Hierarchy_get_children(self)
7237 
7238  def remove_child(self, *args):
7239  r"""
7240  remove_child(Hierarchy self, unsigned int i)
7241  remove_child(Hierarchy self, Hierarchy h)
7242  """
7243  return _IMP_core.Hierarchy_remove_child(self, *args)
7244 
7245  def clear_children(self):
7246  r"""clear_children(Hierarchy self)"""
7247  return _IMP_core.Hierarchy_clear_children(self)
7248 
7249  def add_child(self, h):
7250  r"""add_child(Hierarchy self, Hierarchy h)"""
7251  return _IMP_core.Hierarchy_add_child(self, h)
7252 
7253  def add_child_at(self, h, pos):
7254  r"""add_child_at(Hierarchy self, Hierarchy h, unsigned int pos)"""
7255  return _IMP_core.Hierarchy_add_child_at(self, h, pos)
7256 
7257  def get_child_index(self, *args):
7258  r"""
7259  get_child_index(Hierarchy self, unsigned int i) -> ParticleIndex
7260  get_child_index(Hierarchy self) -> int
7261  """
7262  return _IMP_core.Hierarchy_get_child_index(self, *args)
7263 
7264  @staticmethod
7265  def get_default_traits():
7266  r"""get_default_traits() -> HierarchyTraits"""
7267  return _IMP_core.Hierarchy_get_default_traits()
7268 
7269  def get_traits(self):
7270  r"""get_traits(Hierarchy self) -> HierarchyTraits"""
7271  return _IMP_core.Hierarchy_get_traits(self)
7272 
7273  def add_attribute(self, *args):
7274  r"""
7275  add_attribute(Hierarchy self, FloatKey k, IMP::Float v, bool opt)
7276  add_attribute(Hierarchy self, FloatKey a0, IMP::Float a1)
7277  add_attribute(Hierarchy self, IntKey a0, IMP::Int a1)
7278  add_attribute(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7279  add_attribute(Hierarchy self, IntsKey a0, IMP::Ints a1)
7280  add_attribute(Hierarchy self, StringKey a0, IMP::String a1)
7281  add_attribute(Hierarchy self, ParticleIndexKey a0, Particle a1)
7282  add_attribute(Hierarchy self, ObjectKey a0, Object a1)
7283  add_attribute(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7284  add_attribute(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7285  add_attribute(Hierarchy self, SparseStringKey a0, IMP::String a1)
7286  add_attribute(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7287  """
7288  return _IMP_core.Hierarchy_add_attribute(self, *args)
7289 
7290  def get_value(self, *args):
7291  r"""
7292  get_value(Hierarchy self, FloatKey a0) -> IMP::Float
7293  get_value(Hierarchy self, IntKey a0) -> IMP::Int
7294  get_value(Hierarchy self, FloatsKey a0) -> IMP::Floats
7295  get_value(Hierarchy self, IntsKey a0) -> IMP::Ints
7296  get_value(Hierarchy self, StringKey a0) -> IMP::String
7297  get_value(Hierarchy self, ParticleIndexKey a0) -> Particle
7298  get_value(Hierarchy self, ObjectKey a0) -> Object
7299  get_value(Hierarchy self, SparseFloatKey a0) -> IMP::Float
7300  get_value(Hierarchy self, SparseIntKey a0) -> IMP::Int
7301  get_value(Hierarchy self, SparseStringKey a0) -> IMP::String
7302  get_value(Hierarchy self, SparseParticleIndexKey a0) -> ParticleIndex
7303  """
7304  return _IMP_core.Hierarchy_get_value(self, *args)
7305 
7306  def set_value(self, *args):
7307  r"""
7308  set_value(Hierarchy self, FloatKey a0, IMP::Float a1)
7309  set_value(Hierarchy self, IntKey a0, IMP::Int a1)
7310  set_value(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7311  set_value(Hierarchy self, IntsKey a0, IMP::Ints a1)
7312  set_value(Hierarchy self, StringKey a0, IMP::String a1)
7313  set_value(Hierarchy self, ParticleIndexKey a0, Particle a1)
7314  set_value(Hierarchy self, ObjectKey a0, Object a1)
7315  set_value(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7316  set_value(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7317  set_value(Hierarchy self, SparseStringKey a0, IMP::String a1)
7318  set_value(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7319  """
7320  return _IMP_core.Hierarchy_set_value(self, *args)
7321 
7322  def remove_attribute(self, *args):
7323  r"""
7324  remove_attribute(Hierarchy self, FloatKey a0)
7325  remove_attribute(Hierarchy self, IntKey a0)
7326  remove_attribute(Hierarchy self, FloatsKey a0)
7327  remove_attribute(Hierarchy self, IntsKey a0)
7328  remove_attribute(Hierarchy self, StringKey a0)
7329  remove_attribute(Hierarchy self, ParticleIndexKey a0)
7330  remove_attribute(Hierarchy self, ObjectKey a0)
7331  remove_attribute(Hierarchy self, SparseFloatKey a0)
7332  remove_attribute(Hierarchy self, SparseIntKey a0)
7333  remove_attribute(Hierarchy self, SparseStringKey a0)
7334  remove_attribute(Hierarchy self, SparseParticleIndexKey a0)
7335  """
7336  return _IMP_core.Hierarchy_remove_attribute(self, *args)
7337 
7338  def has_attribute(self, *args):
7339  r"""
7340  has_attribute(Hierarchy self, FloatKey a0) -> bool
7341  has_attribute(Hierarchy self, IntKey a0) -> bool
7342  has_attribute(Hierarchy self, FloatsKey a0) -> bool
7343  has_attribute(Hierarchy self, IntsKey a0) -> bool
7344  has_attribute(Hierarchy self, StringKey a0) -> bool
7345  has_attribute(Hierarchy self, ParticleIndexKey a0) -> bool
7346  has_attribute(Hierarchy self, ObjectKey a0) -> bool
7347  has_attribute(Hierarchy self, SparseFloatKey a0) -> bool
7348  has_attribute(Hierarchy self, SparseIntKey a0) -> bool
7349  has_attribute(Hierarchy self, SparseStringKey a0) -> bool
7350  has_attribute(Hierarchy self, SparseParticleIndexKey a0) -> bool
7351  """
7352  return _IMP_core.Hierarchy_has_attribute(self, *args)
7353 
7354  def get_derivative(self, a0):
7355  r"""get_derivative(Hierarchy self, FloatKey a0) -> double"""
7356  return _IMP_core.Hierarchy_get_derivative(self, a0)
7357 
7358  def get_name(self):
7359  r"""get_name(Hierarchy self) -> std::string"""
7360  return _IMP_core.Hierarchy_get_name(self)
7361 
7362  def clear_caches(self):
7363  r"""clear_caches(Hierarchy self)"""
7364  return _IMP_core.Hierarchy_clear_caches(self)
7365 
7366  def set_name(self, a0):
7367  r"""set_name(Hierarchy self, std::string a0)"""
7368  return _IMP_core.Hierarchy_set_name(self, a0)
7369 
7370  def set_check_level(self, a0):
7371  r"""set_check_level(Hierarchy self, IMP::CheckLevel a0)"""
7372  return _IMP_core.Hierarchy_set_check_level(self, a0)
7373 
7374  def add_to_derivative(self, a0, a1, a2):
7375  r"""add_to_derivative(Hierarchy self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
7376  return _IMP_core.Hierarchy_add_to_derivative(self, a0, a1, a2)
7377 
7378  def set_is_optimized(self, a0, a1):
7379  r"""set_is_optimized(Hierarchy self, FloatKey a0, bool a1)"""
7380  return _IMP_core.Hierarchy_set_is_optimized(self, a0, a1)
7381 
7382  def get_is_optimized(self, a0):
7383  r"""get_is_optimized(Hierarchy self, FloatKey a0) -> bool"""
7384  return _IMP_core.Hierarchy_get_is_optimized(self, a0)
7385 
7386  def get_check_level(self):
7387  r"""get_check_level(Hierarchy self) -> IMP::CheckLevel"""
7388  return _IMP_core.Hierarchy_get_check_level(self)
7389 
7390  def __eq__(self, *args):
7391  r"""
7392  __eq__(Hierarchy self, Hierarchy o) -> bool
7393  __eq__(Hierarchy self, Particle d) -> bool
7394  """
7395  return _IMP_core.Hierarchy___eq__(self, *args)
7396 
7397  def __ne__(self, *args):
7398  r"""
7399  __ne__(Hierarchy self, Hierarchy o) -> bool
7400  __ne__(Hierarchy self, Particle d) -> bool
7401  """
7402  return _IMP_core.Hierarchy___ne__(self, *args)
7403 
7404  def __le__(self, *args):
7405  r"""
7406  __le__(Hierarchy self, Hierarchy o) -> bool
7407  __le__(Hierarchy self, Particle d) -> bool
7408  """
7409  return _IMP_core.Hierarchy___le__(self, *args)
7410 
7411  def __lt__(self, *args):
7412  r"""
7413  __lt__(Hierarchy self, Hierarchy o) -> bool
7414  __lt__(Hierarchy self, Particle d) -> bool
7415  """
7416  return _IMP_core.Hierarchy___lt__(self, *args)
7417 
7418  def __ge__(self, *args):
7419  r"""
7420  __ge__(Hierarchy self, Hierarchy o) -> bool
7421  __ge__(Hierarchy self, Particle d) -> bool
7422  """
7423  return _IMP_core.Hierarchy___ge__(self, *args)
7424 
7425  def __gt__(self, *args):
7426  r"""
7427  __gt__(Hierarchy self, Hierarchy o) -> bool
7428  __gt__(Hierarchy self, Particle d) -> bool
7429  """
7430  return _IMP_core.Hierarchy___gt__(self, *args)
7431 
7432  def __hash__(self):
7433  r"""__hash__(Hierarchy self) -> std::size_t"""
7434  return _IMP_core.Hierarchy___hash__(self)
7435 
7436  def __str__(self):
7437  r"""__str__(Hierarchy self) -> std::string"""
7438  return _IMP_core.Hierarchy___str__(self)
7439 
7440  def __repr__(self):
7441  r"""__repr__(Hierarchy self) -> std::string"""
7442  return _IMP_core.Hierarchy___repr__(self)
7443  __swig_destroy__ = _IMP_core.delete_Hierarchy
7444 
7445 # Register Hierarchy in _IMP_core:
7446 _IMP_core.Hierarchy_swigregister(Hierarchy)
7447 class HierarchyVisitor(object):
7448  r"""Proxy of C++ IMP::core::HierarchyVisitor class."""
7449 
7450  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7451  __repr__ = _swig_repr
7452 
7453  def __init__(self):
7454  r"""__init__(HierarchyVisitor self) -> HierarchyVisitor"""
7455  if self.__class__ == HierarchyVisitor:
7456  _self = None
7457  else:
7458  _self = self
7459  _IMP_core.HierarchyVisitor_swiginit(self, _IMP_core.new_HierarchyVisitor(_self, ))
7460 
7461  if self.__class__ != HierarchyVisitor:
7462  _director_objects.register(self)
7463 
7464 
7465 
7466 
7467  def __call__(self, p):
7468  r"""__call__(HierarchyVisitor self, Hierarchy p) -> bool"""
7469  return _IMP_core.HierarchyVisitor___call__(self, p)
7470  __swig_destroy__ = _IMP_core.delete_HierarchyVisitor
7471  def __disown__(self):
7472  self.this.disown()
7473  _IMP_core.disown_HierarchyVisitor(self)
7474  return weakref.proxy(self)
7475 
7476 # Register HierarchyVisitor in _IMP_core:
7477 _IMP_core.HierarchyVisitor_swigregister(HierarchyVisitor)
7478 class ModifierVisitor(HierarchyVisitor):
7479  r"""Proxy of C++ IMP::core::ModifierVisitor class."""
7480 
7481  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7482  __repr__ = _swig_repr
7483 
7484  def __init__(self, sm):
7485  r"""__init__(ModifierVisitor self, SingletonModifier sm) -> ModifierVisitor"""
7486  _IMP_core.ModifierVisitor_swiginit(self, _IMP_core.new_ModifierVisitor(sm))
7487  __swig_destroy__ = _IMP_core.delete_ModifierVisitor
7488 
7489 # Register ModifierVisitor in _IMP_core:
7490 _IMP_core.ModifierVisitor_swigregister(ModifierVisitor)
7491 class HierarchyCounter(HierarchyVisitor):
7492  r"""Proxy of C++ IMP::core::HierarchyCounter class."""
7493 
7494  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7495 
7496  def __init__(self):
7497  r"""__init__(HierarchyCounter self) -> HierarchyCounter"""
7498  _IMP_core.HierarchyCounter_swiginit(self, _IMP_core.new_HierarchyCounter())
7499 
7500  def get_count(self):
7501  r"""get_count(HierarchyCounter self) -> unsigned int"""
7502  return _IMP_core.HierarchyCounter_get_count(self)
7503 
7504  def show(self, *args):
7505  r"""show(HierarchyCounter self, _ostream out=std::cout)"""
7506  return _IMP_core.HierarchyCounter_show(self, *args)
7507 
7508  def __str__(self):
7509  r"""__str__(HierarchyCounter self) -> std::string"""
7510  return _IMP_core.HierarchyCounter___str__(self)
7511 
7512  def __repr__(self):
7513  r"""__repr__(HierarchyCounter self) -> std::string"""
7514  return _IMP_core.HierarchyCounter___repr__(self)
7515 
7516  def _get_as_binary(self):
7517  r"""_get_as_binary(HierarchyCounter self) -> PyObject *"""
7518  return _IMP_core.HierarchyCounter__get_as_binary(self)
7519 
7520  def _set_from_binary(self, p):
7521  r"""_set_from_binary(HierarchyCounter self, PyObject * p)"""
7522  return _IMP_core.HierarchyCounter__set_from_binary(self, p)
7523 
7524  def __getstate__(self):
7525  p = self._get_as_binary()
7526  if len(self.__dict__) > 1:
7527  d = self.__dict__.copy()
7528  del d['this']
7529  p = (d, p)
7530  return p
7531 
7532  def __setstate__(self, p):
7533  if not hasattr(self, 'this'):
7534  self.__init__()
7535  if isinstance(p, tuple):
7536  d, p = p
7537  self.__dict__.update(d)
7538  return self._set_from_binary(p)
7539 
7540  __swig_destroy__ = _IMP_core.delete_HierarchyCounter
7541 
7542 # Register HierarchyCounter in _IMP_core:
7543 _IMP_core.HierarchyCounter_swigregister(HierarchyCounter)
7544 
7545 def get_leaves(mhd):
7546  r"""get_leaves(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7547  return _IMP_core.get_leaves(mhd)
7548 
7549 def get_internal(mhd):
7550  r"""get_internal(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7551  return _IMP_core.get_internal(mhd)
7552 
7553 def get_all_descendants(mhd):
7554  r"""get_all_descendants(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7555  return _IMP_core.get_all_descendants(mhd)
7556 
7557 def get_root(h):
7558  r"""get_root(Hierarchy h) -> Hierarchy"""
7559  return _IMP_core.get_root(h)
7560 
7561 def visit_breadth_first(d, f):
7562  r"""visit_breadth_first(Hierarchy d, HierarchyVisitor f)"""
7563  return _IMP_core.visit_breadth_first(d, f)
7564 
7565 def visit_depth_first(d, f):
7566  r"""visit_depth_first(Hierarchy d, HierarchyVisitor f)"""
7567  return _IMP_core.visit_depth_first(d, f)
7568 class LeavesRefiner(IMP.Refiner):
7569  r"""Proxy of C++ IMP::core::LeavesRefiner class."""
7570 
7571  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7572 
7573  def __init__(self, tr):
7574  r"""__init__(LeavesRefiner self, HierarchyTraits tr) -> LeavesRefiner"""
7575  _IMP_core.LeavesRefiner_swiginit(self, _IMP_core.new_LeavesRefiner(tr))
7576 
7577  def do_get_inputs(self, m, pis):
7578  r"""do_get_inputs(LeavesRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7579  return _IMP_core.LeavesRefiner_do_get_inputs(self, m, pis)
7580 
7581  def get_version_info(self):
7582  r"""get_version_info(LeavesRefiner self) -> VersionInfo"""
7583  return _IMP_core.LeavesRefiner_get_version_info(self)
7584  __swig_destroy__ = _IMP_core.delete_LeavesRefiner
7585 
7586  def __str__(self):
7587  r"""__str__(LeavesRefiner self) -> std::string"""
7588  return _IMP_core.LeavesRefiner___str__(self)
7589 
7590  def __repr__(self):
7591  r"""__repr__(LeavesRefiner self) -> std::string"""
7592  return _IMP_core.LeavesRefiner___repr__(self)
7593 
7594  @staticmethod
7595  def get_from(o):
7596  return _object_cast_to_LeavesRefiner(o)
7597 
7598 
7599 # Register LeavesRefiner in _IMP_core:
7600 _IMP_core.LeavesRefiner_swigregister(LeavesRefiner)
7601 class Linear(IMP.UnaryFunction):
7602  r"""Proxy of C++ IMP::core::Linear class."""
7603 
7604  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7605 
7606  def __init__(self, *args):
7607  r"""
7608  __init__(Linear self, double offset, double slope) -> Linear
7609  __init__(Linear self) -> Linear
7610  """
7611  _IMP_core.Linear_swiginit(self, _IMP_core.new_Linear(*args))
7612 
7613  def set_slope(self, f):
7614  r"""set_slope(Linear self, double f)"""
7615  return _IMP_core.Linear_set_slope(self, f)
7616 
7617  def get_slope(self):
7618  r"""get_slope(Linear self) -> double"""
7619  return _IMP_core.Linear_get_slope(self)
7620 
7621  def set_offset(self, f):
7622  r"""set_offset(Linear self, double f)"""
7623  return _IMP_core.Linear_set_offset(self, f)
7624 
7625  def get_offset(self):
7626  r"""get_offset(Linear self) -> double"""
7627  return _IMP_core.Linear_get_offset(self)
7628 
7629  def get_version_info(self):
7630  r"""get_version_info(Linear self) -> VersionInfo"""
7631  return _IMP_core.Linear_get_version_info(self)
7632  __swig_destroy__ = _IMP_core.delete_Linear
7633 
7634  def __str__(self):
7635  r"""__str__(Linear self) -> std::string"""
7636  return _IMP_core.Linear___str__(self)
7637 
7638  def __repr__(self):
7639  r"""__repr__(Linear self) -> std::string"""
7640  return _IMP_core.Linear___repr__(self)
7641 
7642  @staticmethod
7643  def get_from(o):
7644  return _object_cast_to_Linear(o)
7645 
7646 
7647  def _get_as_binary(self):
7648  r"""_get_as_binary(Linear self) -> PyObject *"""
7649  return _IMP_core.Linear__get_as_binary(self)
7650 
7651  def _set_from_binary(self, p):
7652  r"""_set_from_binary(Linear self, PyObject * p)"""
7653  return _IMP_core.Linear__set_from_binary(self, p)
7654 
7655  def __getstate__(self):
7656  p = self._get_as_binary()
7657  if len(self.__dict__) > 1:
7658  d = self.__dict__.copy()
7659  del d['this']
7660  p = (d, p)
7661  return p
7662 
7663  def __setstate__(self, p):
7664  if not hasattr(self, 'this'):
7665  self.__init__()
7666  if isinstance(p, tuple):
7667  d, p = p
7668  self.__dict__.update(d)
7669  return self._set_from_binary(p)
7670 
7671 
7672  def _get_jax(self):
7673  def score(val, slope, offset):
7674  return (val - offset) * slope
7675  return functools.partial(score, slope=self.get_slope(),
7676  offset=self.get_offset())
7677 
7678 
7679 # Register Linear in _IMP_core:
7680 _IMP_core.Linear_swigregister(Linear)
7681 class LogNormalMover(MonteCarloMover):
7682  r"""Proxy of C++ IMP::core::LogNormalMover class."""
7683 
7684  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7685 
7686  def __init__(self, *args):
7687  r"""
7688  __init__(LogNormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> LogNormalMover
7689  __init__(LogNormalMover self, Model m, ParticleIndex pi, double stddev) -> LogNormalMover
7690  __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> LogNormalMover
7691  __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> LogNormalMover
7692  __init__(LogNormalMover self) -> LogNormalMover
7693  """
7694  _IMP_core.LogNormalMover_swiginit(self, _IMP_core.new_LogNormalMover(*args))
7695 
7696  def set_sigma(self, sigma):
7697  r"""set_sigma(LogNormalMover self, IMP::Float sigma)"""
7698  return _IMP_core.LogNormalMover_set_sigma(self, sigma)
7699 
7700  def get_sigma(self):
7701  r"""get_sigma(LogNormalMover self) -> IMP::Float"""
7702  return _IMP_core.LogNormalMover_get_sigma(self)
7703 
7704  def get_indexes(self):
7705  r"""get_indexes(LogNormalMover self) -> IMP::ParticleIndexes"""
7706  return _IMP_core.LogNormalMover_get_indexes(self)
7707 
7708  def get_keys(self):
7709  r"""get_keys(LogNormalMover self) -> IMP::FloatKeys"""
7710  return _IMP_core.LogNormalMover_get_keys(self)
7711 
7712  def get_version_info(self):
7713  r"""get_version_info(LogNormalMover self) -> VersionInfo"""
7714  return _IMP_core.LogNormalMover_get_version_info(self)
7715  __swig_destroy__ = _IMP_core.delete_LogNormalMover
7716 
7717  def __str__(self):
7718  r"""__str__(LogNormalMover self) -> std::string"""
7719  return _IMP_core.LogNormalMover___str__(self)
7720 
7721  def __repr__(self):
7722  r"""__repr__(LogNormalMover self) -> std::string"""
7723  return _IMP_core.LogNormalMover___repr__(self)
7724 
7725  @staticmethod
7726  def get_from(o):
7727  return _object_cast_to_LogNormalMover(o)
7728 
7729 
7730  def _get_as_binary(self):
7731  r"""_get_as_binary(LogNormalMover self) -> PyObject *"""
7732  return _IMP_core.LogNormalMover__get_as_binary(self)
7733 
7734  def _set_from_binary(self, p):
7735  r"""_set_from_binary(LogNormalMover self, PyObject * p)"""
7736  return _IMP_core.LogNormalMover__set_from_binary(self, p)
7737 
7738  def __getstate__(self):
7739  p = self._get_as_binary()
7740  if len(self.__dict__) > 1:
7741  d = self.__dict__.copy()
7742  del d['this']
7743  p = (d, p)
7744  return p
7745 
7746  def __setstate__(self, p):
7747  if not hasattr(self, 'this'):
7748  self.__init__()
7749  if isinstance(p, tuple):
7750  d, p = p
7751  self.__dict__.update(d)
7752  return self._set_from_binary(p)
7753 
7754 
7755  def _get_jax(self, space):
7756  import jax.random
7757  from IMP.core._jax_util import _get_offset_propose_func
7758  keys = self.get_keys()
7759  sigma = self.get_sigma()
7760 
7761  def offset_func(key, shape):
7762  key, subkey = jax.random.split(key)
7763  return key, jax.random.lognormal(subkey, sigma, shape)
7764 
7765  propose_func, keys = _get_offset_propose_func(
7766  self.get_indexes(), keys, offset_func)
7767 
7768  return self._wrap_jax(lambda key: key, propose_func, keys=keys)
7769 
7770 
7771 # Register LogNormalMover in _IMP_core:
7772 _IMP_core.LogNormalMover_swigregister(LogNormalMover)
7773 IMP_CORE_HAS_MONTE_CARLO_MOVER = _IMP_core.IMP_CORE_HAS_MONTE_CARLO_MOVER
7774 
7775 class MonteCarlo(IMP.Optimizer):
7776  r"""Proxy of C++ IMP::core::MonteCarlo class."""
7777 
7778  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7779 
7780  def __init__(self, *args):
7781  r"""
7782  __init__(MonteCarlo self, Model m) -> MonteCarlo
7783  __init__(MonteCarlo self) -> MonteCarlo
7784  """
7785  _IMP_core.MonteCarlo_swiginit(self, _IMP_core.new_MonteCarlo(*args))
7786 
7787  def get_version_info(self):
7788  r"""get_version_info(MonteCarlo self) -> VersionInfo"""
7789  return _IMP_core.MonteCarlo_get_version_info(self)
7790  __swig_destroy__ = _IMP_core.delete_MonteCarlo
7791 
7792  def set_return_best(self, tf):
7793  r"""set_return_best(MonteCarlo self, bool tf)"""
7794  return _IMP_core.MonteCarlo_set_return_best(self, tf)
7795 
7796  def get_return_best(self):
7797  r"""get_return_best(MonteCarlo self) -> bool"""
7798  return _IMP_core.MonteCarlo_get_return_best(self)
7799 
7800  def set_score_moved(self, mv):
7801  r"""set_score_moved(MonteCarlo self, bool mv)"""
7802  return _IMP_core.MonteCarlo_set_score_moved(self, mv)
7803 
7804  def set_kt(self, t):
7805  r"""set_kt(MonteCarlo self, IMP::Float t)"""
7806  return _IMP_core.MonteCarlo_set_kt(self, t)
7807 
7808  def get_kt(self):
7809  r"""get_kt(MonteCarlo self) -> IMP::Float"""
7810  return _IMP_core.MonteCarlo_get_kt(self)
7811 
7812  def get_last_accepted_energy(self):
7813  r"""get_last_accepted_energy(MonteCarlo self) -> double"""
7814  return _IMP_core.MonteCarlo_get_last_accepted_energy(self)
7815 
7816  def set_last_accepted_energy(self, energy):
7817  r"""set_last_accepted_energy(MonteCarlo self, double energy)"""
7818  return _IMP_core.MonteCarlo_set_last_accepted_energy(self, energy)
7819 
7820  def get_best_accepted_energy(self):
7821  r"""get_best_accepted_energy(MonteCarlo self) -> double"""
7822  return _IMP_core.MonteCarlo_get_best_accepted_energy(self)
7823 
7824  def set_best_accepted_energy(self, energy):
7825  r"""set_best_accepted_energy(MonteCarlo self, double energy)"""
7826  return _IMP_core.MonteCarlo_set_best_accepted_energy(self, energy)
7827 
7828  def get_number_of_downward_steps(self):
7829  r"""get_number_of_downward_steps(MonteCarlo self) -> unsigned int"""
7830  return _IMP_core.MonteCarlo_get_number_of_downward_steps(self)
7831 
7832  def get_number_of_upward_steps(self):
7833  r"""get_number_of_upward_steps(MonteCarlo self) -> unsigned int"""
7834  return _IMP_core.MonteCarlo_get_number_of_upward_steps(self)
7835 
7836  def get_number_of_proposed_steps(self):
7837  r"""get_number_of_proposed_steps(MonteCarlo self) -> unsigned int"""
7838  return _IMP_core.MonteCarlo_get_number_of_proposed_steps(self)
7839 
7840  def get_number_of_accepted_steps(self):
7841  r"""get_number_of_accepted_steps(MonteCarlo self) -> unsigned int"""
7842  return _IMP_core.MonteCarlo_get_number_of_accepted_steps(self)
7843 
7844  def set_number_of_downward_steps(self, nsteps):
7845  r"""set_number_of_downward_steps(MonteCarlo self, unsigned int nsteps)"""
7846  return _IMP_core.MonteCarlo_set_number_of_downward_steps(self, nsteps)
7847 
7848  def set_number_of_upward_steps(self, nsteps):
7849  r"""set_number_of_upward_steps(MonteCarlo self, unsigned int nsteps)"""
7850  return _IMP_core.MonteCarlo_set_number_of_upward_steps(self, nsteps)
7851 
7852  def set_number_of_rejected_steps(self, nsteps):
7853  r"""set_number_of_rejected_steps(MonteCarlo self, unsigned int nsteps)"""
7854  return _IMP_core.MonteCarlo_set_number_of_rejected_steps(self, nsteps)
7855 
7856  def reset_statistics(self):
7857  r"""reset_statistics(MonteCarlo self)"""
7858  return _IMP_core.MonteCarlo_reset_statistics(self)
7859 
7860  def set_score_threshold(self, s):
7861  r"""set_score_threshold(MonteCarlo self, double s)"""
7862  return _IMP_core.MonteCarlo_set_score_threshold(self, s)
7863 
7864  def get_score_threshold(self):
7865  r"""get_score_threshold(MonteCarlo self) -> double"""
7866  return _IMP_core.MonteCarlo_get_score_threshold(self)
7867 
7868  def set_maximum_difference(self, d):
7869  r"""set_maximum_difference(MonteCarlo self, double d)"""
7870  return _IMP_core.MonteCarlo_set_maximum_difference(self, d)
7871 
7872  def get_maximum_difference(self):
7873  r"""get_maximum_difference(MonteCarlo self) -> double"""
7874  return _IMP_core.MonteCarlo_get_maximum_difference(self)
7875  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)
7876  def __set_movers(self, obj): IMP._list_util.set_varlist(self.movers, obj)
7877  def __del_movers(self): IMP._list_util.del_varlist(self.movers)
7878  movers = property(__get_movers, __set_movers, __del_movers, doc="List of ##ucnames")
7879 
7880  def remove_mover(self, d):
7881  r"""remove_mover(MonteCarlo self, MonteCarloMover d)"""
7882  return _IMP_core.MonteCarlo_remove_mover(self, d)
7883 
7884  def _python_index_mover(self, d, start, stop):
7885  r"""_python_index_mover(MonteCarlo self, MonteCarloMover d, unsigned int start, unsigned int stop) -> unsigned int"""
7886  return _IMP_core.MonteCarlo__python_index_mover(self, d, start, stop)
7887 
7888  def remove_movers(self, d):
7889  r"""remove_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & d)"""
7890  return _IMP_core.MonteCarlo_remove_movers(self, d)
7891 
7892  def set_movers(self, ps):
7893  r"""set_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & ps)"""
7894  return _IMP_core.MonteCarlo_set_movers(self, ps)
7895 
7896  def set_movers_order(self, objs):
7897  r"""set_movers_order(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7898  return _IMP_core.MonteCarlo_set_movers_order(self, objs)
7899 
7900  def add_mover(self, obj):
7901  r"""add_mover(MonteCarlo self, MonteCarloMover obj) -> unsigned int"""
7902  return _IMP_core.MonteCarlo_add_mover(self, obj)
7903 
7904  def add_movers(self, objs):
7905  r"""add_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7906  return _IMP_core.MonteCarlo_add_movers(self, objs)
7907 
7908  def clear_movers(self):
7909  r"""clear_movers(MonteCarlo self)"""
7910  return _IMP_core.MonteCarlo_clear_movers(self)
7911 
7912  def get_number_of_movers(self):
7913  r"""get_number_of_movers(MonteCarlo self) -> unsigned int"""
7914  return _IMP_core.MonteCarlo_get_number_of_movers(self)
7915 
7916  def get_has_movers(self):
7917  r"""get_has_movers(MonteCarlo self) -> bool"""
7918  return _IMP_core.MonteCarlo_get_has_movers(self)
7919 
7920  def get_mover(self, i):
7921  r"""get_mover(MonteCarlo self, unsigned int i) -> MonteCarloMover"""
7922  return _IMP_core.MonteCarlo_get_mover(self, i)
7923 
7924  def get_movers(self):
7925  r"""get_movers(MonteCarlo self) -> IMP::core::MonteCarloMovers"""
7926  return _IMP_core.MonteCarlo_get_movers(self)
7927 
7928  def erase_mover(self, i):
7929  r"""erase_mover(MonteCarlo self, unsigned int i)"""
7930  return _IMP_core.MonteCarlo_erase_mover(self, i)
7931 
7932  def reserve_movers(self, sz):
7933  r"""reserve_movers(MonteCarlo self, unsigned int sz)"""
7934  return _IMP_core.MonteCarlo_reserve_movers(self, sz)
7935 
7936  def __str__(self):
7937  r"""__str__(MonteCarlo self) -> std::string"""
7938  return _IMP_core.MonteCarlo___str__(self)
7939 
7940  def __repr__(self):
7941  r"""__repr__(MonteCarlo self) -> std::string"""
7942  return _IMP_core.MonteCarlo___repr__(self)
7943 
7944  @staticmethod
7945  def get_from(o):
7946  return _object_cast_to_MonteCarlo(o)
7947 
7948 
7949  def _get_as_binary(self):
7950  r"""_get_as_binary(MonteCarlo self) -> PyObject *"""
7951  return _IMP_core.MonteCarlo__get_as_binary(self)
7952 
7953  def _set_from_binary(self, p):
7954  r"""_set_from_binary(MonteCarlo self, PyObject * p)"""
7955  return _IMP_core.MonteCarlo__set_from_binary(self, p)
7956 
7957  def __getstate__(self):
7958  p = self._get_as_binary()
7959  if len(self.__dict__) > 1:
7960  d = self.__dict__.copy()
7961  del d['this']
7962  p = (d, p)
7963  return p
7964 
7965  def __setstate__(self, p):
7966  if not hasattr(self, 'this'):
7967  self.__init__()
7968  if isinstance(p, tuple):
7969  d, p = p
7970  self.__dict__.update(d)
7971  return self._set_from_binary(p)
7972 
7973 
7974  def _get_jax(self, space=None):
7975  from IMP.core._jax_util import _MCJAXInfo
7976  return _MCJAXInfo(self, space)
7977 
7978  def _get_jax_optimizer(self, max_steps, space=None):
7979  import IMP.core._jax_util
7980  return IMP.core._jax_util._MCJAXOptimizer(self, max_steps, space)
7981 
7982  def _optimize_jax(self, max_steps, space=None):
7983  opt = self._get_jax_optimizer(max_steps, space=space)
7984  score, mc_state = opt.optimize(opt.get_initial_state())
7985  return score
7986 
7987 
7988 # Register MonteCarlo in _IMP_core:
7989 _IMP_core.MonteCarlo_swigregister(MonteCarlo)
7990 class MonteCarloWithLocalOptimization(MonteCarlo):
7991  r"""Proxy of C++ IMP::core::MonteCarloWithLocalOptimization class."""
7992 
7993  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7994 
7995  def __init__(self, opt, steps):
7996  r"""__init__(MonteCarloWithLocalOptimization self, Optimizer opt, unsigned int steps) -> MonteCarloWithLocalOptimization"""
7997  _IMP_core.MonteCarloWithLocalOptimization_swiginit(self, _IMP_core.new_MonteCarloWithLocalOptimization(opt, steps))
7998 
7999  def get_number_of_steps(self):
8000  r"""get_number_of_steps(MonteCarloWithLocalOptimization self) -> unsigned int"""
8001  return _IMP_core.MonteCarloWithLocalOptimization_get_number_of_steps(self)
8002 
8003  def get_local_optimizer(self):
8004  r"""get_local_optimizer(MonteCarloWithLocalOptimization self) -> Optimizer"""
8005  return _IMP_core.MonteCarloWithLocalOptimization_get_local_optimizer(self)
8006  __swig_destroy__ = _IMP_core.delete_MonteCarloWithLocalOptimization
8007 
8008  def __str__(self):
8009  r"""__str__(MonteCarloWithLocalOptimization self) -> std::string"""
8010  return _IMP_core.MonteCarloWithLocalOptimization___str__(self)
8011 
8012  def __repr__(self):
8013  r"""__repr__(MonteCarloWithLocalOptimization self) -> std::string"""
8014  return _IMP_core.MonteCarloWithLocalOptimization___repr__(self)
8015 
8016  @staticmethod
8017  def get_from(o):
8018  return _object_cast_to_MonteCarloWithLocalOptimization(o)
8019 
8020 
8021 # Register MonteCarloWithLocalOptimization in _IMP_core:
8022 _IMP_core.MonteCarloWithLocalOptimization_swigregister(MonteCarloWithLocalOptimization)
8023 class MonteCarloWithBasinHopping(MonteCarloWithLocalOptimization):
8024  r"""Proxy of C++ IMP::core::MonteCarloWithBasinHopping class."""
8025 
8026  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8027 
8028  def __init__(self, opt, ns):
8029  r"""__init__(MonteCarloWithBasinHopping self, Optimizer opt, unsigned int ns) -> MonteCarloWithBasinHopping"""
8030  _IMP_core.MonteCarloWithBasinHopping_swiginit(self, _IMP_core.new_MonteCarloWithBasinHopping(opt, ns))
8031  __swig_destroy__ = _IMP_core.delete_MonteCarloWithBasinHopping
8032 
8033  def __str__(self):
8034  r"""__str__(MonteCarloWithBasinHopping self) -> std::string"""
8035  return _IMP_core.MonteCarloWithBasinHopping___str__(self)
8036 
8037  def __repr__(self):
8038  r"""__repr__(MonteCarloWithBasinHopping self) -> std::string"""
8039  return _IMP_core.MonteCarloWithBasinHopping___repr__(self)
8040 
8041  @staticmethod
8042  def get_from(o):
8043  return _object_cast_to_MonteCarloWithBasinHopping(o)
8044 
8045 
8046 # Register MonteCarloWithBasinHopping in _IMP_core:
8047 _IMP_core.MonteCarloWithBasinHopping_swigregister(MonteCarloWithBasinHopping)
8048 class NeighborsTable(IMP.ScoreState):
8049  r"""Proxy of C++ IMP::core::NeighborsTable class."""
8050 
8051  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8052 
8053  def __init__(self, *args):
8054  r"""__init__(NeighborsTable self, PairContainer input, std::string name="CloseNeighborsTable%1%") -> NeighborsTable"""
8055  _IMP_core.NeighborsTable_swiginit(self, _IMP_core.new_NeighborsTable(*args))
8056 
8057  def get_neighbors(self, pi):
8058  r"""get_neighbors(NeighborsTable self, ParticleIndex pi) -> IMP::ParticleIndexes const &"""
8059  return _IMP_core.NeighborsTable_get_neighbors(self, pi)
8060 
8061  def get_version_info(self):
8062  r"""get_version_info(NeighborsTable self) -> VersionInfo"""
8063  return _IMP_core.NeighborsTable_get_version_info(self)
8064  __swig_destroy__ = _IMP_core.delete_NeighborsTable
8065 
8066  def __str__(self):
8067  r"""__str__(NeighborsTable self) -> std::string"""
8068  return _IMP_core.NeighborsTable___str__(self)
8069 
8070  def __repr__(self):
8071  r"""__repr__(NeighborsTable self) -> std::string"""
8072  return _IMP_core.NeighborsTable___repr__(self)
8073 
8074  @staticmethod
8075  def get_from(o):
8076  return _object_cast_to_NeighborsTable(o)
8077 
8078 
8079 # Register NeighborsTable in _IMP_core:
8080 _IMP_core.NeighborsTable_swigregister(NeighborsTable)
8081 class NormalMover(MonteCarloMover):
8082  r"""Proxy of C++ IMP::core::NormalMover class."""
8083 
8084  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8085 
8086  def __init__(self, *args):
8087  r"""
8088  __init__(NormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> NormalMover
8089  __init__(NormalMover self, Model m, ParticleIndex pi, double stddev) -> NormalMover
8090  __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> NormalMover
8091  __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> NormalMover
8092  __init__(NormalMover self) -> NormalMover
8093  """
8094  _IMP_core.NormalMover_swiginit(self, _IMP_core.new_NormalMover(*args))
8095 
8096  def set_sigma(self, sigma):
8097  r"""set_sigma(NormalMover self, IMP::Float sigma)"""
8098  return _IMP_core.NormalMover_set_sigma(self, sigma)
8099 
8100  def get_sigma(self):
8101  r"""get_sigma(NormalMover self) -> IMP::Float"""
8102  return _IMP_core.NormalMover_get_sigma(self)
8103 
8104  def get_indexes(self):
8105  r"""get_indexes(NormalMover self) -> IMP::ParticleIndexes"""
8106  return _IMP_core.NormalMover_get_indexes(self)
8107 
8108  def get_keys(self):
8109  r"""get_keys(NormalMover self) -> IMP::FloatKeys"""
8110  return _IMP_core.NormalMover_get_keys(self)
8111 
8112  def get_version_info(self):
8113  r"""get_version_info(NormalMover self) -> VersionInfo"""
8114  return _IMP_core.NormalMover_get_version_info(self)
8115  __swig_destroy__ = _IMP_core.delete_NormalMover
8116 
8117  def __str__(self):
8118  r"""__str__(NormalMover self) -> std::string"""
8119  return _IMP_core.NormalMover___str__(self)
8120 
8121  def __repr__(self):
8122  r"""__repr__(NormalMover self) -> std::string"""
8123  return _IMP_core.NormalMover___repr__(self)
8124 
8125  @staticmethod
8126  def get_from(o):
8127  return _object_cast_to_NormalMover(o)
8128 
8129 
8130  def _get_as_binary(self):
8131  r"""_get_as_binary(NormalMover self) -> PyObject *"""
8132  return _IMP_core.NormalMover__get_as_binary(self)
8133 
8134  def _set_from_binary(self, p):
8135  r"""_set_from_binary(NormalMover self, PyObject * p)"""
8136  return _IMP_core.NormalMover__set_from_binary(self, p)
8137 
8138  def __getstate__(self):
8139  p = self._get_as_binary()
8140  if len(self.__dict__) > 1:
8141  d = self.__dict__.copy()
8142  del d['this']
8143  p = (d, p)
8144  return p
8145 
8146  def __setstate__(self, p):
8147  if not hasattr(self, 'this'):
8148  self.__init__()
8149  if isinstance(p, tuple):
8150  d, p = p
8151  self.__dict__.update(d)
8152  return self._set_from_binary(p)
8153 
8154 
8155  def _get_jax(self, space):
8156  import jax.random
8157  from IMP.core._jax_util import _get_offset_propose_func
8158  keys = self.get_keys()
8159  sigma = self.get_sigma()
8160 
8161  def offset_func(key, shape):
8162  key, subkey = jax.random.split(key)
8163  return key, jax.random.normal(subkey, shape) * sigma
8164 
8165  propose_func, keys = _get_offset_propose_func(
8166  self.get_indexes(), keys, offset_func)
8167 
8168  return self._wrap_jax(lambda key: key, propose_func, keys=keys)
8169 
8170 
8171 # Register NormalMover in _IMP_core:
8172 _IMP_core.NormalMover_swigregister(NormalMover)
8173 class OpenCubicSpline(_OpenCubicSplineBase):
8174  r"""Proxy of C++ IMP::core::OpenCubicSpline class."""
8175 
8176  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8177 
8178  def __init__(self, values, minrange, spacing, extend=False):
8179  r"""__init__(OpenCubicSpline self, IMP::Floats const & values, IMP::Float minrange, IMP::Float spacing, bool extend=False) -> OpenCubicSpline"""
8180  _IMP_core.OpenCubicSpline_swiginit(self, _IMP_core.new_OpenCubicSpline(values, minrange, spacing, extend))
8181 
8182  def get_minrange(self):
8183  r"""get_minrange(OpenCubicSpline self) -> IMP::Float"""
8184  return _IMP_core.OpenCubicSpline_get_minrange(self)
8185 
8186  def get_spacing(self):
8187  r"""get_spacing(OpenCubicSpline self) -> IMP::Float"""
8188  return _IMP_core.OpenCubicSpline_get_spacing(self)
8189 
8190  def get_values(self):
8191  r"""get_values(OpenCubicSpline self) -> IMP::Floats"""
8192  return _IMP_core.OpenCubicSpline_get_values(self)
8193 
8194  def get_extend(self):
8195  r"""get_extend(OpenCubicSpline self) -> bool"""
8196  return _IMP_core.OpenCubicSpline_get_extend(self)
8197 
8198  def get_second_derivatives(self):
8199  r"""get_second_derivatives(OpenCubicSpline self) -> IMP::Floats"""
8200  return _IMP_core.OpenCubicSpline_get_second_derivatives(self)
8201  __swig_destroy__ = _IMP_core.delete_OpenCubicSpline
8202 
8203  def __str__(self):
8204  r"""__str__(OpenCubicSpline self) -> std::string"""
8205  return _IMP_core.OpenCubicSpline___str__(self)
8206 
8207  def __repr__(self):
8208  r"""__repr__(OpenCubicSpline self) -> std::string"""
8209  return _IMP_core.OpenCubicSpline___repr__(self)
8210 
8211  @staticmethod
8212  def get_from(o):
8213  return _object_cast_to_OpenCubicSpline(o)
8214 
8215 
8216  def _get_jax(self):
8217  import jax.numpy as jnp
8218  from IMP.core._jax_util import _spline
8219  def score(feature, minrange, maxrange, spacing, values, second_derivs):
8220  # clip feature to range (extend=True behavior)
8221  feature = jnp.clip(feature, minrange, maxrange)
8222  # determine bin index and thus the cubic fragment to use:
8223  lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
8224  return _spline(feature, minrange, lowbin, lowbin + 1, spacing,
8225  values, second_derivs)
8226  spacing = self.get_spacing()
8227  minrange = self.get_minrange()
8228  values = jnp.asarray(self.get_values())
8229  maxrange = minrange + spacing * (len(values) - 1)
8230  return functools.partial(
8231  score, minrange=minrange, maxrange=maxrange,
8232  spacing=spacing, values=values,
8233  second_derivs=jnp.asarray(self.get_second_derivatives()))
8234 
8235 
8236 # Register OpenCubicSpline in _IMP_core:
8237 _IMP_core.OpenCubicSpline_swigregister(OpenCubicSpline)
8238 class QuadraticClosePairsFinder(ClosePairsFinder):
8239  r"""Proxy of C++ IMP::core::QuadraticClosePairsFinder class."""
8240 
8241  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8242 
8243  def __init__(self):
8244  r"""__init__(QuadraticClosePairsFinder self) -> QuadraticClosePairsFinder"""
8245  _IMP_core.QuadraticClosePairsFinder_swiginit(self, _IMP_core.new_QuadraticClosePairsFinder())
8246 
8247  def get_are_close_and_filtered(self, *args):
8248  r"""
8249  get_are_close_and_filtered(QuadraticClosePairsFinder self, Particle a, Particle b) -> bool
8250  get_are_close_and_filtered(QuadraticClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b) -> bool
8251  """
8252  return _IMP_core.QuadraticClosePairsFinder_get_are_close_and_filtered(self, *args)
8253 
8254  def get_close_pairs(self, *args):
8255  r"""
8256  get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8257  get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8258  get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
8259  get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
8260  """
8261  return _IMP_core.QuadraticClosePairsFinder_get_close_pairs(self, *args)
8262 
8263  def do_get_inputs(self, m, pis):
8264  r"""do_get_inputs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8265  return _IMP_core.QuadraticClosePairsFinder_do_get_inputs(self, m, pis)
8266 
8267  def get_version_info(self):
8268  r"""get_version_info(QuadraticClosePairsFinder self) -> VersionInfo"""
8269  return _IMP_core.QuadraticClosePairsFinder_get_version_info(self)
8270  __swig_destroy__ = _IMP_core.delete_QuadraticClosePairsFinder
8271 
8272  def __str__(self):
8273  r"""__str__(QuadraticClosePairsFinder self) -> std::string"""
8274  return _IMP_core.QuadraticClosePairsFinder___str__(self)
8275 
8276  def __repr__(self):
8277  r"""__repr__(QuadraticClosePairsFinder self) -> std::string"""
8278  return _IMP_core.QuadraticClosePairsFinder___repr__(self)
8279 
8280  @staticmethod
8281  def get_from(o):
8282  return _object_cast_to_QuadraticClosePairsFinder(o)
8283 
8284 
8285 # Register QuadraticClosePairsFinder in _IMP_core:
8286 _IMP_core.QuadraticClosePairsFinder_swigregister(QuadraticClosePairsFinder)
8287 class RefinedPairsPairScore(IMP.PairScore):
8288  r"""Proxy of C++ IMP::core::RefinedPairsPairScore class."""
8289 
8290  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8291 
8292  def __init__(self, r, f):
8293  r"""__init__(RefinedPairsPairScore self, Refiner r, PairScore f) -> RefinedPairsPairScore"""
8294  _IMP_core.RefinedPairsPairScore_swiginit(self, _IMP_core.new_RefinedPairsPairScore(r, f))
8295 
8296  def do_get_inputs(self, m, pis):
8297  r"""do_get_inputs(RefinedPairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8298  return _IMP_core.RefinedPairsPairScore_do_get_inputs(self, m, pis)
8299 
8300  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
8301  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"""
8302  return _IMP_core.RefinedPairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
8303 
8304  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
8305  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"""
8306  return _IMP_core.RefinedPairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
8307 
8308  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
8309  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"""
8310  return _IMP_core.RefinedPairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
8311 
8312  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
8313  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"""
8314  return _IMP_core.RefinedPairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
8315 
8316  def get_version_info(self):
8317  r"""get_version_info(RefinedPairsPairScore self) -> VersionInfo"""
8318  return _IMP_core.RefinedPairsPairScore_get_version_info(self)
8319  __swig_destroy__ = _IMP_core.delete_RefinedPairsPairScore
8320 
8321  def __str__(self):
8322  r"""__str__(RefinedPairsPairScore self) -> std::string"""
8323  return _IMP_core.RefinedPairsPairScore___str__(self)
8324 
8325  def __repr__(self):
8326  r"""__repr__(RefinedPairsPairScore self) -> std::string"""
8327  return _IMP_core.RefinedPairsPairScore___repr__(self)
8328 
8329  @staticmethod
8330  def get_from(o):
8331  return _object_cast_to_RefinedPairsPairScore(o)
8332 
8333 
8334 # Register RefinedPairsPairScore in _IMP_core:
8335 _IMP_core.RefinedPairsPairScore_swigregister(RefinedPairsPairScore)
8336 class RigidBody(XYZ):
8337  r"""Proxy of C++ IMP::core::RigidBody class."""
8338 
8339  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8340 
8341  def get_rigid_members(self):
8342  r"""get_rigid_members(RigidBody self) -> IMP::core::RigidMembers"""
8343  return _IMP_core.RigidBody_get_rigid_members(self)
8344 
8345  @staticmethod
8346  def get_rotation_key():
8347  r"""get_rotation_key() -> Vector4DDerivKey"""
8348  return _IMP_core.RigidBody_get_rotation_key()
8349 
8350  def get_member_particle_indexes(self):
8351  r"""get_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8352  return _IMP_core.RigidBody_get_member_particle_indexes(self)
8353 
8354  def get_body_member_particle_indexes(self):
8355  r"""get_body_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8356  return _IMP_core.RigidBody_get_body_member_particle_indexes(self)
8357 
8358  def get_member_indexes(self):
8359  r"""get_member_indexes(RigidBody self) -> IMP::ParticleIndexes"""
8360  return _IMP_core.RigidBody_get_member_indexes(self)
8361 
8362  def show(self, *args):
8363  r"""show(RigidBody self, _ostream out=std::cout)"""
8364  return _IMP_core.RigidBody_show(self, *args)
8365 
8366  @staticmethod
8367  def setup_particle(*args):
8368  r"""
8369  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor ps) -> RigidBody
8370  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor ps) -> RigidBody
8371  setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> RigidBody
8372  setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> RigidBody
8373  """
8374  return _IMP_core.RigidBody_setup_particle(*args)
8375 
8376  @staticmethod
8377  def teardown_particle(rb):
8378  r"""teardown_particle(RigidBody rb)"""
8379  return _IMP_core.RigidBody_teardown_particle(rb)
8380 
8381  def __init__(self, *args):
8382  r"""
8383  __init__(RigidBody self) -> RigidBody
8384  __init__(RigidBody self, Model m, ParticleIndex id) -> RigidBody
8385  __init__(RigidBody self, _ParticleAdaptor d) -> RigidBody
8386  __init__(RigidBody self, RigidBody arg2) -> RigidBody
8387  """
8388  _IMP_core.RigidBody_swiginit(self, _IMP_core.new_RigidBody(*args))
8389  __swig_destroy__ = _IMP_core.delete_RigidBody
8390 
8391  @staticmethod
8392  def get_is_setup(*args):
8393  r"""
8394  get_is_setup(_ParticleAdaptor p) -> bool
8395  get_is_setup(Model m, ParticleIndex pi) -> bool
8396  """
8397  return _IMP_core.RigidBody_get_is_setup(*args)
8398 
8399  def get_coordinates(self):
8400  r"""get_coordinates(RigidBody self) -> Vector3D"""
8401  return _IMP_core.RigidBody_get_coordinates(self)
8402 
8403  def get_rotation(self):
8404  r"""get_rotation(RigidBody self) -> Rotation3D"""
8405  return _IMP_core.RigidBody_get_rotation(self)
8406 
8407  def get_reference_frame(self):
8408  r"""get_reference_frame(RigidBody self) -> ReferenceFrame3D"""
8409  return _IMP_core.RigidBody_get_reference_frame(self)
8410 
8411  def set_reference_frame(self, tr):
8412  r"""set_reference_frame(RigidBody self, ReferenceFrame3D tr)"""
8413  return _IMP_core.RigidBody_set_reference_frame(self, tr)
8414 
8415  def set_reference_frame_lazy(self, tr):
8416  r"""set_reference_frame_lazy(RigidBody self, ReferenceFrame3D tr)"""
8417  return _IMP_core.RigidBody_set_reference_frame_lazy(self, tr)
8418 
8419  def set_reference_frame_from_members(self, members):
8420  r"""set_reference_frame_from_members(RigidBody self, IMP::ParticleIndexes const & members)"""
8421  return _IMP_core.RigidBody_set_reference_frame_from_members(self, members)
8422 
8423  def pull_back_members_adjoints(self, da):
8424  r"""pull_back_members_adjoints(RigidBody self, DerivativeAccumulator da)"""
8425  return _IMP_core.RigidBody_pull_back_members_adjoints(self, da)
8426 
8427  def pull_back_member_adjoints(self, pi, da):
8428  r"""pull_back_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8429  return _IMP_core.RigidBody_pull_back_member_adjoints(self, pi, da)
8430 
8431  def pull_back_body_member_adjoints(self, pi, da):
8432  r"""pull_back_body_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8433  return _IMP_core.RigidBody_pull_back_body_member_adjoints(self, pi, da)
8434 
8435  def add_to_rotational_derivatives(self, qderiv, da):
8436  r"""add_to_rotational_derivatives(RigidBody self, Vector4D qderiv, DerivativeAccumulator da)"""
8437  return _IMP_core.RigidBody_add_to_rotational_derivatives(self, qderiv, da)
8438 
8439  def add_to_torque(self, torque_local, da):
8440  r"""add_to_torque(RigidBody self, Vector3D torque_local, DerivativeAccumulator da)"""
8441  return _IMP_core.RigidBody_add_to_torque(self, torque_local, da)
8442 
8443  def get_torque(self):
8444  r"""get_torque(RigidBody self) -> Vector3D"""
8445  return _IMP_core.RigidBody_get_torque(self)
8446 
8447  def get_coordinates_are_optimized(self):
8448  r"""get_coordinates_are_optimized(RigidBody self) -> bool"""
8449  return _IMP_core.RigidBody_get_coordinates_are_optimized(self)
8450 
8451  def set_coordinates_are_optimized(self, tf):
8452  r"""set_coordinates_are_optimized(RigidBody self, bool tf)"""
8453  return _IMP_core.RigidBody_set_coordinates_are_optimized(self, tf)
8454 
8455  def normalize_rotation(self):
8456  r"""normalize_rotation(RigidBody self)"""
8457  return _IMP_core.RigidBody_normalize_rotation(self)
8458 
8459  def update_members(self):
8460  r"""update_members(RigidBody self)"""
8461  return _IMP_core.RigidBody_update_members(self)
8462 
8463  def get_rotational_derivatives(self):
8464  r"""get_rotational_derivatives(RigidBody self) -> Vector4D"""
8465  return _IMP_core.RigidBody_get_rotational_derivatives(self)
8466 
8467  def get_number_of_members(self):
8468  r"""get_number_of_members(RigidBody self) -> unsigned int"""
8469  return _IMP_core.RigidBody_get_number_of_members(self)
8470 
8471  def get_member(self, i):
8472  r"""get_member(RigidBody self, unsigned int i) -> RigidBodyMember"""
8473  return _IMP_core.RigidBody_get_member(self, i)
8474 
8475  def add_member(self, p):
8476  r"""add_member(RigidBody self, _ParticleIndexAdaptor p)"""
8477  return _IMP_core.RigidBody_add_member(self, p)
8478 
8479  def add_non_rigid_member(self, p):
8480  r"""add_non_rigid_member(RigidBody self, _ParticleIndexAdaptor p)"""
8481  return _IMP_core.RigidBody_add_non_rigid_member(self, p)
8482 
8483  def set_is_rigid_member(self, pi, tf):
8484  r"""set_is_rigid_member(RigidBody self, ParticleIndex pi, bool tf)"""
8485  return _IMP_core.RigidBody_set_is_rigid_member(self, pi, tf)
8486 
8487  def remove_member(self, p):
8488  r"""remove_member(RigidBody self, _ParticleIndexAdaptor p)"""
8489  return _IMP_core.RigidBody_remove_member(self, p)
8490 
8491  def add_attribute(self, *args):
8492  r"""
8493  add_attribute(RigidBody self, FloatKey k, IMP::Float v, bool opt)
8494  add_attribute(RigidBody self, FloatKey a0, IMP::Float a1)
8495  add_attribute(RigidBody self, IntKey a0, IMP::Int a1)
8496  add_attribute(RigidBody self, FloatsKey a0, IMP::Floats a1)
8497  add_attribute(RigidBody self, IntsKey a0, IMP::Ints a1)
8498  add_attribute(RigidBody self, StringKey a0, IMP::String a1)
8499  add_attribute(RigidBody self, ParticleIndexKey a0, Particle a1)
8500  add_attribute(RigidBody self, ObjectKey a0, Object a1)
8501  add_attribute(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8502  add_attribute(RigidBody self, SparseIntKey a0, IMP::Int a1)
8503  add_attribute(RigidBody self, SparseStringKey a0, IMP::String a1)
8504  add_attribute(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8505  """
8506  return _IMP_core.RigidBody_add_attribute(self, *args)
8507 
8508  def get_value(self, *args):
8509  r"""
8510  get_value(RigidBody self, FloatKey a0) -> IMP::Float
8511  get_value(RigidBody self, IntKey a0) -> IMP::Int
8512  get_value(RigidBody self, FloatsKey a0) -> IMP::Floats
8513  get_value(RigidBody self, IntsKey a0) -> IMP::Ints
8514  get_value(RigidBody self, StringKey a0) -> IMP::String
8515  get_value(RigidBody self, ParticleIndexKey a0) -> Particle
8516  get_value(RigidBody self, ObjectKey a0) -> Object
8517  get_value(RigidBody self, SparseFloatKey a0) -> IMP::Float
8518  get_value(RigidBody self, SparseIntKey a0) -> IMP::Int
8519  get_value(RigidBody self, SparseStringKey a0) -> IMP::String
8520  get_value(RigidBody self, SparseParticleIndexKey a0) -> ParticleIndex
8521  """
8522  return _IMP_core.RigidBody_get_value(self, *args)
8523 
8524  def set_value(self, *args):
8525  r"""
8526  set_value(RigidBody self, FloatKey a0, IMP::Float a1)
8527  set_value(RigidBody self, IntKey a0, IMP::Int a1)
8528  set_value(RigidBody self, FloatsKey a0, IMP::Floats a1)
8529  set_value(RigidBody self, IntsKey a0, IMP::Ints a1)
8530  set_value(RigidBody self, StringKey a0, IMP::String a1)
8531  set_value(RigidBody self, ParticleIndexKey a0, Particle a1)
8532  set_value(RigidBody self, ObjectKey a0, Object a1)
8533  set_value(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8534  set_value(RigidBody self, SparseIntKey a0, IMP::Int a1)
8535  set_value(RigidBody self, SparseStringKey a0, IMP::String a1)
8536  set_value(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8537  """
8538  return _IMP_core.RigidBody_set_value(self, *args)
8539 
8540  def remove_attribute(self, *args):
8541  r"""
8542  remove_attribute(RigidBody self, FloatKey a0)
8543  remove_attribute(RigidBody self, IntKey a0)
8544  remove_attribute(RigidBody self, FloatsKey a0)
8545  remove_attribute(RigidBody self, IntsKey a0)
8546  remove_attribute(RigidBody self, StringKey a0)
8547  remove_attribute(RigidBody self, ParticleIndexKey a0)
8548  remove_attribute(RigidBody self, ObjectKey a0)
8549  remove_attribute(RigidBody self, SparseFloatKey a0)
8550  remove_attribute(RigidBody self, SparseIntKey a0)
8551  remove_attribute(RigidBody self, SparseStringKey a0)
8552  remove_attribute(RigidBody self, SparseParticleIndexKey a0)
8553  """
8554  return _IMP_core.RigidBody_remove_attribute(self, *args)
8555 
8556  def has_attribute(self, *args):
8557  r"""
8558  has_attribute(RigidBody self, FloatKey a0) -> bool
8559  has_attribute(RigidBody self, IntKey a0) -> bool
8560  has_attribute(RigidBody self, FloatsKey a0) -> bool
8561  has_attribute(RigidBody self, IntsKey a0) -> bool
8562  has_attribute(RigidBody self, StringKey a0) -> bool
8563  has_attribute(RigidBody self, ParticleIndexKey a0) -> bool
8564  has_attribute(RigidBody self, ObjectKey a0) -> bool
8565  has_attribute(RigidBody self, SparseFloatKey a0) -> bool
8566  has_attribute(RigidBody self, SparseIntKey a0) -> bool
8567  has_attribute(RigidBody self, SparseStringKey a0) -> bool
8568  has_attribute(RigidBody self, SparseParticleIndexKey a0) -> bool
8569  """
8570  return _IMP_core.RigidBody_has_attribute(self, *args)
8571 
8572  def get_derivative(self, a0):
8573  r"""get_derivative(RigidBody self, FloatKey a0) -> double"""
8574  return _IMP_core.RigidBody_get_derivative(self, a0)
8575 
8576  def get_name(self):
8577  r"""get_name(RigidBody self) -> std::string"""
8578  return _IMP_core.RigidBody_get_name(self)
8579 
8580  def clear_caches(self):
8581  r"""clear_caches(RigidBody self)"""
8582  return _IMP_core.RigidBody_clear_caches(self)
8583 
8584  def set_name(self, a0):
8585  r"""set_name(RigidBody self, std::string a0)"""
8586  return _IMP_core.RigidBody_set_name(self, a0)
8587 
8588  def set_check_level(self, a0):
8589  r"""set_check_level(RigidBody self, IMP::CheckLevel a0)"""
8590  return _IMP_core.RigidBody_set_check_level(self, a0)
8591 
8592  def add_to_derivative(self, a0, a1, a2):
8593  r"""add_to_derivative(RigidBody self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8594  return _IMP_core.RigidBody_add_to_derivative(self, a0, a1, a2)
8595 
8596  def set_is_optimized(self, a0, a1):
8597  r"""set_is_optimized(RigidBody self, FloatKey a0, bool a1)"""
8598  return _IMP_core.RigidBody_set_is_optimized(self, a0, a1)
8599 
8600  def get_is_optimized(self, a0):
8601  r"""get_is_optimized(RigidBody self, FloatKey a0) -> bool"""
8602  return _IMP_core.RigidBody_get_is_optimized(self, a0)
8603 
8604  def get_check_level(self):
8605  r"""get_check_level(RigidBody self) -> IMP::CheckLevel"""
8606  return _IMP_core.RigidBody_get_check_level(self)
8607 
8608  def __eq__(self, *args):
8609  r"""
8610  __eq__(RigidBody self, RigidBody o) -> bool
8611  __eq__(RigidBody self, Particle d) -> bool
8612  """
8613  return _IMP_core.RigidBody___eq__(self, *args)
8614 
8615  def __ne__(self, *args):
8616  r"""
8617  __ne__(RigidBody self, RigidBody o) -> bool
8618  __ne__(RigidBody self, Particle d) -> bool
8619  """
8620  return _IMP_core.RigidBody___ne__(self, *args)
8621 
8622  def __le__(self, *args):
8623  r"""
8624  __le__(RigidBody self, RigidBody o) -> bool
8625  __le__(RigidBody self, Particle d) -> bool
8626  """
8627  return _IMP_core.RigidBody___le__(self, *args)
8628 
8629  def __lt__(self, *args):
8630  r"""
8631  __lt__(RigidBody self, RigidBody o) -> bool
8632  __lt__(RigidBody self, Particle d) -> bool
8633  """
8634  return _IMP_core.RigidBody___lt__(self, *args)
8635 
8636  def __ge__(self, *args):
8637  r"""
8638  __ge__(RigidBody self, RigidBody o) -> bool
8639  __ge__(RigidBody self, Particle d) -> bool
8640  """
8641  return _IMP_core.RigidBody___ge__(self, *args)
8642 
8643  def __gt__(self, *args):
8644  r"""
8645  __gt__(RigidBody self, RigidBody o) -> bool
8646  __gt__(RigidBody self, Particle d) -> bool
8647  """
8648  return _IMP_core.RigidBody___gt__(self, *args)
8649 
8650  def __hash__(self):
8651  r"""__hash__(RigidBody self) -> std::size_t"""
8652  return _IMP_core.RigidBody___hash__(self)
8653 
8654  def __str__(self):
8655  r"""__str__(RigidBody self) -> std::string"""
8656  return _IMP_core.RigidBody___str__(self)
8657 
8658  def __repr__(self):
8659  r"""__repr__(RigidBody self) -> std::string"""
8660  return _IMP_core.RigidBody___repr__(self)
8661 
8662  def _get_as_binary(self):
8663  r"""_get_as_binary(RigidBody self) -> PyObject *"""
8664  return _IMP_core.RigidBody__get_as_binary(self)
8665 
8666  def _set_from_binary(self, p):
8667  r"""_set_from_binary(RigidBody self, PyObject * p)"""
8668  return _IMP_core.RigidBody__set_from_binary(self, p)
8669 
8670  def __getstate__(self):
8671  p = self._get_as_binary()
8672  if len(self.__dict__) > 1:
8673  d = self.__dict__.copy()
8674  del d['this']
8675  p = (d, p)
8676  return p
8677 
8678  def __setstate__(self, p):
8679  if not hasattr(self, 'this'):
8680  self.__init__()
8681  if isinstance(p, tuple):
8682  d, p = p
8683  self.__dict__.update(d)
8684  return self._set_from_binary(p)
8685 
8686 
8687 # Register RigidBody in _IMP_core:
8688 _IMP_core.RigidBody_swigregister(RigidBody)
8689 
8691  r"""add_rigid_body_cache_key(ObjectKey k)"""
8692  return _IMP_core.add_rigid_body_cache_key(k)
8693 class RigidBodyMember(XYZ):
8694  r"""Proxy of C++ IMP::core::RigidBodyMember class."""
8695 
8696  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8697 
8698  def show(self, *args):
8699  r"""show(RigidBodyMember self, _ostream out=std::cout)"""
8700  return _IMP_core.RigidBodyMember_show(self, *args)
8701 
8702  def get_rigid_body(self):
8703  r"""get_rigid_body(RigidBodyMember self) -> RigidBody"""
8704  return _IMP_core.RigidBodyMember_get_rigid_body(self)
8705 
8706  def get_internal_coordinates(self):
8707  r"""get_internal_coordinates(RigidBodyMember self) -> Vector3D"""
8708  return _IMP_core.RigidBodyMember_get_internal_coordinates(self)
8709 
8710  def set_internal_coordinates(self, v):
8711  r"""set_internal_coordinates(RigidBodyMember self, Vector3D v)"""
8712  return _IMP_core.RigidBodyMember_set_internal_coordinates(self, v)
8713 
8714  def set_internal_transformation(self, v):
8715  r"""set_internal_transformation(RigidBodyMember self, Transformation3D v)"""
8716  return _IMP_core.RigidBodyMember_set_internal_transformation(self, v)
8717 
8718  def get_internal_transformation(self):
8719  r"""get_internal_transformation(RigidBodyMember self) -> Transformation3D"""
8720  return _IMP_core.RigidBodyMember_get_internal_transformation(self)
8721  __swig_destroy__ = _IMP_core.delete_RigidBodyMember
8722 
8723  def set_coordinates(self, *args):
8724  r"""
8725  set_coordinates(RigidBodyMember self, Vector3D center)
8726  set_coordinates(RigidBodyMember self, Transformation3D tr)
8727  """
8728  return _IMP_core.RigidBodyMember_set_coordinates(self, *args)
8729 
8730  def __init__(self, *args):
8731  r"""
8732  __init__(RigidBodyMember self) -> RigidBodyMember
8733  __init__(RigidBodyMember self, Model m, ParticleIndex id) -> RigidBodyMember
8734  __init__(RigidBodyMember self, _ParticleAdaptor d) -> RigidBodyMember
8735  __init__(RigidBodyMember self, RigidBodyMember arg2) -> RigidBodyMember
8736  """
8737  _IMP_core.RigidBodyMember_swiginit(self, _IMP_core.new_RigidBodyMember(*args))
8738 
8739  @staticmethod
8740  def get_is_setup(*args):
8741  r"""
8742  get_is_setup(_ParticleAdaptor p) -> bool
8743  get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
8744  """
8745  return _IMP_core.RigidBodyMember_get_is_setup(*args)
8746 
8747  @staticmethod
8748  def get_internal_coordinate_keys():
8749  r"""get_internal_coordinate_keys() -> IMP::FloatKeys"""
8750  return _IMP_core.RigidBodyMember_get_internal_coordinate_keys()
8751 
8752  @staticmethod
8753  def get_internal_rotation_key():
8754  r"""get_internal_rotation_key() -> Vector4DDerivKey"""
8755  return _IMP_core.RigidBodyMember_get_internal_rotation_key()
8756 
8757  def add_attribute(self, *args):
8758  r"""
8759  add_attribute(RigidBodyMember self, FloatKey k, IMP::Float v, bool opt)
8760  add_attribute(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8761  add_attribute(RigidBodyMember self, IntKey a0, IMP::Int a1)
8762  add_attribute(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8763  add_attribute(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8764  add_attribute(RigidBodyMember self, StringKey a0, IMP::String a1)
8765  add_attribute(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8766  add_attribute(RigidBodyMember self, ObjectKey a0, Object a1)
8767  add_attribute(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8768  add_attribute(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8769  add_attribute(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8770  add_attribute(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8771  """
8772  return _IMP_core.RigidBodyMember_add_attribute(self, *args)
8773 
8774  def get_value(self, *args):
8775  r"""
8776  get_value(RigidBodyMember self, FloatKey a0) -> IMP::Float
8777  get_value(RigidBodyMember self, IntKey a0) -> IMP::Int
8778  get_value(RigidBodyMember self, FloatsKey a0) -> IMP::Floats
8779  get_value(RigidBodyMember self, IntsKey a0) -> IMP::Ints
8780  get_value(RigidBodyMember self, StringKey a0) -> IMP::String
8781  get_value(RigidBodyMember self, ParticleIndexKey a0) -> Particle
8782  get_value(RigidBodyMember self, ObjectKey a0) -> Object
8783  get_value(RigidBodyMember self, SparseFloatKey a0) -> IMP::Float
8784  get_value(RigidBodyMember self, SparseIntKey a0) -> IMP::Int
8785  get_value(RigidBodyMember self, SparseStringKey a0) -> IMP::String
8786  get_value(RigidBodyMember self, SparseParticleIndexKey a0) -> ParticleIndex
8787  """
8788  return _IMP_core.RigidBodyMember_get_value(self, *args)
8789 
8790  def set_value(self, *args):
8791  r"""
8792  set_value(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8793  set_value(RigidBodyMember self, IntKey a0, IMP::Int a1)
8794  set_value(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8795  set_value(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8796  set_value(RigidBodyMember self, StringKey a0, IMP::String a1)
8797  set_value(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8798  set_value(RigidBodyMember self, ObjectKey a0, Object a1)
8799  set_value(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8800  set_value(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8801  set_value(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8802  set_value(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8803  """
8804  return _IMP_core.RigidBodyMember_set_value(self, *args)
8805 
8806  def remove_attribute(self, *args):
8807  r"""
8808  remove_attribute(RigidBodyMember self, FloatKey a0)
8809  remove_attribute(RigidBodyMember self, IntKey a0)
8810  remove_attribute(RigidBodyMember self, FloatsKey a0)
8811  remove_attribute(RigidBodyMember self, IntsKey a0)
8812  remove_attribute(RigidBodyMember self, StringKey a0)
8813  remove_attribute(RigidBodyMember self, ParticleIndexKey a0)
8814  remove_attribute(RigidBodyMember self, ObjectKey a0)
8815  remove_attribute(RigidBodyMember self, SparseFloatKey a0)
8816  remove_attribute(RigidBodyMember self, SparseIntKey a0)
8817  remove_attribute(RigidBodyMember self, SparseStringKey a0)
8818  remove_attribute(RigidBodyMember self, SparseParticleIndexKey a0)
8819  """
8820  return _IMP_core.RigidBodyMember_remove_attribute(self, *args)
8821 
8822  def has_attribute(self, *args):
8823  r"""
8824  has_attribute(RigidBodyMember self, FloatKey a0) -> bool
8825  has_attribute(RigidBodyMember self, IntKey a0) -> bool
8826  has_attribute(RigidBodyMember self, FloatsKey a0) -> bool
8827  has_attribute(RigidBodyMember self, IntsKey a0) -> bool
8828  has_attribute(RigidBodyMember self, StringKey a0) -> bool
8829  has_attribute(RigidBodyMember self, ParticleIndexKey a0) -> bool
8830  has_attribute(RigidBodyMember self, ObjectKey a0) -> bool
8831  has_attribute(RigidBodyMember self, SparseFloatKey a0) -> bool
8832  has_attribute(RigidBodyMember self, SparseIntKey a0) -> bool
8833  has_attribute(RigidBodyMember self, SparseStringKey a0) -> bool
8834  has_attribute(RigidBodyMember self, SparseParticleIndexKey a0) -> bool
8835  """
8836  return _IMP_core.RigidBodyMember_has_attribute(self, *args)
8837 
8838  def get_derivative(self, a0):
8839  r"""get_derivative(RigidBodyMember self, FloatKey a0) -> double"""
8840  return _IMP_core.RigidBodyMember_get_derivative(self, a0)
8841 
8842  def get_name(self):
8843  r"""get_name(RigidBodyMember self) -> std::string"""
8844  return _IMP_core.RigidBodyMember_get_name(self)
8845 
8846  def clear_caches(self):
8847  r"""clear_caches(RigidBodyMember self)"""
8848  return _IMP_core.RigidBodyMember_clear_caches(self)
8849 
8850  def set_name(self, a0):
8851  r"""set_name(RigidBodyMember self, std::string a0)"""
8852  return _IMP_core.RigidBodyMember_set_name(self, a0)
8853 
8854  def set_check_level(self, a0):
8855  r"""set_check_level(RigidBodyMember self, IMP::CheckLevel a0)"""
8856  return _IMP_core.RigidBodyMember_set_check_level(self, a0)
8857 
8858  def add_to_derivative(self, a0, a1, a2):
8859  r"""add_to_derivative(RigidBodyMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8860  return _IMP_core.RigidBodyMember_add_to_derivative(self, a0, a1, a2)
8861 
8862  def set_is_optimized(self, a0, a1):
8863  r"""set_is_optimized(RigidBodyMember self, FloatKey a0, bool a1)"""
8864  return _IMP_core.RigidBodyMember_set_is_optimized(self, a0, a1)
8865 
8866  def get_is_optimized(self, a0):
8867  r"""get_is_optimized(RigidBodyMember self, FloatKey a0) -> bool"""
8868  return _IMP_core.RigidBodyMember_get_is_optimized(self, a0)
8869 
8870  def get_check_level(self):
8871  r"""get_check_level(RigidBodyMember self) -> IMP::CheckLevel"""
8872  return _IMP_core.RigidBodyMember_get_check_level(self)
8873 
8874  def __eq__(self, *args):
8875  r"""
8876  __eq__(RigidBodyMember self, RigidBodyMember o) -> bool
8877  __eq__(RigidBodyMember self, Particle d) -> bool
8878  """
8879  return _IMP_core.RigidBodyMember___eq__(self, *args)
8880 
8881  def __ne__(self, *args):
8882  r"""
8883  __ne__(RigidBodyMember self, RigidBodyMember o) -> bool
8884  __ne__(RigidBodyMember self, Particle d) -> bool
8885  """
8886  return _IMP_core.RigidBodyMember___ne__(self, *args)
8887 
8888  def __le__(self, *args):
8889  r"""
8890  __le__(RigidBodyMember self, RigidBodyMember o) -> bool
8891  __le__(RigidBodyMember self, Particle d) -> bool
8892  """
8893  return _IMP_core.RigidBodyMember___le__(self, *args)
8894 
8895  def __lt__(self, *args):
8896  r"""
8897  __lt__(RigidBodyMember self, RigidBodyMember o) -> bool
8898  __lt__(RigidBodyMember self, Particle d) -> bool
8899  """
8900  return _IMP_core.RigidBodyMember___lt__(self, *args)
8901 
8902  def __ge__(self, *args):
8903  r"""
8904  __ge__(RigidBodyMember self, RigidBodyMember o) -> bool
8905  __ge__(RigidBodyMember self, Particle d) -> bool
8906  """
8907  return _IMP_core.RigidBodyMember___ge__(self, *args)
8908 
8909  def __gt__(self, *args):
8910  r"""
8911  __gt__(RigidBodyMember self, RigidBodyMember o) -> bool
8912  __gt__(RigidBodyMember self, Particle d) -> bool
8913  """
8914  return _IMP_core.RigidBodyMember___gt__(self, *args)
8915 
8916  def __hash__(self):
8917  r"""__hash__(RigidBodyMember self) -> std::size_t"""
8918  return _IMP_core.RigidBodyMember___hash__(self)
8919 
8920  def __str__(self):
8921  r"""__str__(RigidBodyMember self) -> std::string"""
8922  return _IMP_core.RigidBodyMember___str__(self)
8923 
8924  def __repr__(self):
8925  r"""__repr__(RigidBodyMember self) -> std::string"""
8926  return _IMP_core.RigidBodyMember___repr__(self)
8927 
8928  def _get_as_binary(self):
8929  r"""_get_as_binary(RigidBodyMember self) -> PyObject *"""
8930  return _IMP_core.RigidBodyMember__get_as_binary(self)
8931 
8932  def _set_from_binary(self, p):
8933  r"""_set_from_binary(RigidBodyMember self, PyObject * p)"""
8934  return _IMP_core.RigidBodyMember__set_from_binary(self, p)
8935 
8936  def __getstate__(self):
8937  p = self._get_as_binary()
8938  if len(self.__dict__) > 1:
8939  d = self.__dict__.copy()
8940  del d['this']
8941  p = (d, p)
8942  return p
8943 
8944  def __setstate__(self, p):
8945  if not hasattr(self, 'this'):
8946  self.__init__()
8947  if isinstance(p, tuple):
8948  d, p = p
8949  self.__dict__.update(d)
8950  return self._set_from_binary(p)
8951 
8952 
8953 # Register RigidBodyMember in _IMP_core:
8954 _IMP_core.RigidBodyMember_swigregister(RigidBodyMember)
8955 class RigidMember(RigidBodyMember):
8956  r"""Proxy of C++ IMP::core::RigidMember class."""
8957 
8958  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8959 
8960  def show(self, *args):
8961  r"""show(RigidMember self, _ostream out=std::cout)"""
8962  return _IMP_core.RigidMember_show(self, *args)
8963 
8964  def __init__(self, *args):
8965  r"""
8966  __init__(RigidMember self) -> RigidMember
8967  __init__(RigidMember self, Model m, ParticleIndex id) -> RigidMember
8968  __init__(RigidMember self, _ParticleAdaptor d) -> RigidMember
8969  __init__(RigidMember self, RigidMember arg2) -> RigidMember
8970  """
8971  _IMP_core.RigidMember_swiginit(self, _IMP_core.new_RigidMember(*args))
8972  __swig_destroy__ = _IMP_core.delete_RigidMember
8973 
8974  @staticmethod
8975  def get_is_setup(*args):
8976  r"""
8977  get_is_setup(_ParticleAdaptor p) -> bool
8978  get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
8979  """
8980  return _IMP_core.RigidMember_get_is_setup(*args)
8981 
8982  def add_attribute(self, *args):
8983  r"""
8984  add_attribute(RigidMember self, FloatKey k, IMP::Float v, bool opt)
8985  add_attribute(RigidMember self, FloatKey a0, IMP::Float a1)
8986  add_attribute(RigidMember self, IntKey a0, IMP::Int a1)
8987  add_attribute(RigidMember self, FloatsKey a0, IMP::Floats a1)
8988  add_attribute(RigidMember self, IntsKey a0, IMP::Ints a1)
8989  add_attribute(RigidMember self, StringKey a0, IMP::String a1)
8990  add_attribute(RigidMember self, ParticleIndexKey a0, Particle a1)
8991  add_attribute(RigidMember self, ObjectKey a0, Object a1)
8992  add_attribute(RigidMember self, SparseFloatKey a0, IMP::Float a1)
8993  add_attribute(RigidMember self, SparseIntKey a0, IMP::Int a1)
8994  add_attribute(RigidMember self, SparseStringKey a0, IMP::String a1)
8995  add_attribute(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8996  """
8997  return _IMP_core.RigidMember_add_attribute(self, *args)
8998 
8999  def get_value(self, *args):
9000  r"""
9001  get_value(RigidMember self, FloatKey a0) -> IMP::Float
9002  get_value(RigidMember self, IntKey a0) -> IMP::Int
9003  get_value(RigidMember self, FloatsKey a0) -> IMP::Floats
9004  get_value(RigidMember self, IntsKey a0) -> IMP::Ints
9005  get_value(RigidMember self, StringKey a0) -> IMP::String
9006  get_value(RigidMember self, ParticleIndexKey a0) -> Particle
9007  get_value(RigidMember self, ObjectKey a0) -> Object
9008  get_value(RigidMember self, SparseFloatKey a0) -> IMP::Float
9009  get_value(RigidMember self, SparseIntKey a0) -> IMP::Int
9010  get_value(RigidMember self, SparseStringKey a0) -> IMP::String
9011  get_value(RigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9012  """
9013  return _IMP_core.RigidMember_get_value(self, *args)
9014 
9015  def set_value(self, *args):
9016  r"""
9017  set_value(RigidMember self, FloatKey a0, IMP::Float a1)
9018  set_value(RigidMember self, IntKey a0, IMP::Int a1)
9019  set_value(RigidMember self, FloatsKey a0, IMP::Floats a1)
9020  set_value(RigidMember self, IntsKey a0, IMP::Ints a1)
9021  set_value(RigidMember self, StringKey a0, IMP::String a1)
9022  set_value(RigidMember self, ParticleIndexKey a0, Particle a1)
9023  set_value(RigidMember self, ObjectKey a0, Object a1)
9024  set_value(RigidMember self, SparseFloatKey a0, IMP::Float a1)
9025  set_value(RigidMember self, SparseIntKey a0, IMP::Int a1)
9026  set_value(RigidMember self, SparseStringKey a0, IMP::String a1)
9027  set_value(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9028  """
9029  return _IMP_core.RigidMember_set_value(self, *args)
9030 
9031  def remove_attribute(self, *args):
9032  r"""
9033  remove_attribute(RigidMember self, FloatKey a0)
9034  remove_attribute(RigidMember self, IntKey a0)
9035  remove_attribute(RigidMember self, FloatsKey a0)
9036  remove_attribute(RigidMember self, IntsKey a0)
9037  remove_attribute(RigidMember self, StringKey a0)
9038  remove_attribute(RigidMember self, ParticleIndexKey a0)
9039  remove_attribute(RigidMember self, ObjectKey a0)
9040  remove_attribute(RigidMember self, SparseFloatKey a0)
9041  remove_attribute(RigidMember self, SparseIntKey a0)
9042  remove_attribute(RigidMember self, SparseStringKey a0)
9043  remove_attribute(RigidMember self, SparseParticleIndexKey a0)
9044  """
9045  return _IMP_core.RigidMember_remove_attribute(self, *args)
9046 
9047  def has_attribute(self, *args):
9048  r"""
9049  has_attribute(RigidMember self, FloatKey a0) -> bool
9050  has_attribute(RigidMember self, IntKey a0) -> bool
9051  has_attribute(RigidMember self, FloatsKey a0) -> bool
9052  has_attribute(RigidMember self, IntsKey a0) -> bool
9053  has_attribute(RigidMember self, StringKey a0) -> bool
9054  has_attribute(RigidMember self, ParticleIndexKey a0) -> bool
9055  has_attribute(RigidMember self, ObjectKey a0) -> bool
9056  has_attribute(RigidMember self, SparseFloatKey a0) -> bool
9057  has_attribute(RigidMember self, SparseIntKey a0) -> bool
9058  has_attribute(RigidMember self, SparseStringKey a0) -> bool
9059  has_attribute(RigidMember self, SparseParticleIndexKey a0) -> bool
9060  """
9061  return _IMP_core.RigidMember_has_attribute(self, *args)
9062 
9063  def get_derivative(self, a0):
9064  r"""get_derivative(RigidMember self, FloatKey a0) -> double"""
9065  return _IMP_core.RigidMember_get_derivative(self, a0)
9066 
9067  def get_name(self):
9068  r"""get_name(RigidMember self) -> std::string"""
9069  return _IMP_core.RigidMember_get_name(self)
9070 
9071  def clear_caches(self):
9072  r"""clear_caches(RigidMember self)"""
9073  return _IMP_core.RigidMember_clear_caches(self)
9074 
9075  def set_name(self, a0):
9076  r"""set_name(RigidMember self, std::string a0)"""
9077  return _IMP_core.RigidMember_set_name(self, a0)
9078 
9079  def set_check_level(self, a0):
9080  r"""set_check_level(RigidMember self, IMP::CheckLevel a0)"""
9081  return _IMP_core.RigidMember_set_check_level(self, a0)
9082 
9083  def add_to_derivative(self, a0, a1, a2):
9084  r"""add_to_derivative(RigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9085  return _IMP_core.RigidMember_add_to_derivative(self, a0, a1, a2)
9086 
9087  def set_is_optimized(self, a0, a1):
9088  r"""set_is_optimized(RigidMember self, FloatKey a0, bool a1)"""
9089  return _IMP_core.RigidMember_set_is_optimized(self, a0, a1)
9090 
9091  def get_is_optimized(self, a0):
9092  r"""get_is_optimized(RigidMember self, FloatKey a0) -> bool"""
9093  return _IMP_core.RigidMember_get_is_optimized(self, a0)
9094 
9095  def get_check_level(self):
9096  r"""get_check_level(RigidMember self) -> IMP::CheckLevel"""
9097  return _IMP_core.RigidMember_get_check_level(self)
9098 
9099  def __eq__(self, *args):
9100  r"""
9101  __eq__(RigidMember self, RigidMember o) -> bool
9102  __eq__(RigidMember self, Particle d) -> bool
9103  """
9104  return _IMP_core.RigidMember___eq__(self, *args)
9105 
9106  def __ne__(self, *args):
9107  r"""
9108  __ne__(RigidMember self, RigidMember o) -> bool
9109  __ne__(RigidMember self, Particle d) -> bool
9110  """
9111  return _IMP_core.RigidMember___ne__(self, *args)
9112 
9113  def __le__(self, *args):
9114  r"""
9115  __le__(RigidMember self, RigidMember o) -> bool
9116  __le__(RigidMember self, Particle d) -> bool
9117  """
9118  return _IMP_core.RigidMember___le__(self, *args)
9119 
9120  def __lt__(self, *args):
9121  r"""
9122  __lt__(RigidMember self, RigidMember o) -> bool
9123  __lt__(RigidMember self, Particle d) -> bool
9124  """
9125  return _IMP_core.RigidMember___lt__(self, *args)
9126 
9127  def __ge__(self, *args):
9128  r"""
9129  __ge__(RigidMember self, RigidMember o) -> bool
9130  __ge__(RigidMember self, Particle d) -> bool
9131  """
9132  return _IMP_core.RigidMember___ge__(self, *args)
9133 
9134  def __gt__(self, *args):
9135  r"""
9136  __gt__(RigidMember self, RigidMember o) -> bool
9137  __gt__(RigidMember self, Particle d) -> bool
9138  """
9139  return _IMP_core.RigidMember___gt__(self, *args)
9140 
9141  def __hash__(self):
9142  r"""__hash__(RigidMember self) -> std::size_t"""
9143  return _IMP_core.RigidMember___hash__(self)
9144 
9145  def __str__(self):
9146  r"""__str__(RigidMember self) -> std::string"""
9147  return _IMP_core.RigidMember___str__(self)
9148 
9149  def __repr__(self):
9150  r"""__repr__(RigidMember self) -> std::string"""
9151  return _IMP_core.RigidMember___repr__(self)
9152 
9153  def _get_as_binary(self):
9154  r"""_get_as_binary(RigidMember self) -> PyObject *"""
9155  return _IMP_core.RigidMember__get_as_binary(self)
9156 
9157  def _set_from_binary(self, p):
9158  r"""_set_from_binary(RigidMember self, PyObject * p)"""
9159  return _IMP_core.RigidMember__set_from_binary(self, p)
9160 
9161  def __getstate__(self):
9162  p = self._get_as_binary()
9163  if len(self.__dict__) > 1:
9164  d = self.__dict__.copy()
9165  del d['this']
9166  p = (d, p)
9167  return p
9168 
9169  def __setstate__(self, p):
9170  if not hasattr(self, 'this'):
9171  self.__init__()
9172  if isinstance(p, tuple):
9173  d, p = p
9174  self.__dict__.update(d)
9175  return self._set_from_binary(p)
9176 
9177 
9178 # Register RigidMember in _IMP_core:
9179 _IMP_core.RigidMember_swigregister(RigidMember)
9180 class NonRigidMember(RigidBodyMember):
9181  r"""Proxy of C++ IMP::core::NonRigidMember class."""
9182 
9183  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9184 
9185  def show(self, *args):
9186  r"""show(NonRigidMember self, _ostream out=std::cout)"""
9187  return _IMP_core.NonRigidMember_show(self, *args)
9188 
9189  def __init__(self, *args):
9190  r"""
9191  __init__(NonRigidMember self) -> NonRigidMember
9192  __init__(NonRigidMember self, Model m, ParticleIndex id) -> NonRigidMember
9193  __init__(NonRigidMember self, _ParticleAdaptor d) -> NonRigidMember
9194  __init__(NonRigidMember self, NonRigidMember arg2) -> NonRigidMember
9195  """
9196  _IMP_core.NonRigidMember_swiginit(self, _IMP_core.new_NonRigidMember(*args))
9197  __swig_destroy__ = _IMP_core.delete_NonRigidMember
9198 
9199  @staticmethod
9200  def get_is_setup(*args):
9201  r"""
9202  get_is_setup(_ParticleAdaptor p) -> bool
9203  get_is_setup(Model m, ParticleIndex p) -> bool
9204  """
9205  return _IMP_core.NonRigidMember_get_is_setup(*args)
9206 
9207  def add_to_internal_derivatives(self, deriv_parent, da):
9208  r"""add_to_internal_derivatives(NonRigidMember self, Vector3D deriv_parent, DerivativeAccumulator da)"""
9209  return _IMP_core.NonRigidMember_add_to_internal_derivatives(self, deriv_parent, da)
9210 
9211  def add_to_internal_rotational_derivatives(self, qderiv, da):
9212  r"""add_to_internal_rotational_derivatives(NonRigidMember self, Vector4D qderiv, DerivativeAccumulator da)"""
9213  return _IMP_core.NonRigidMember_add_to_internal_rotational_derivatives(self, qderiv, da)
9214 
9215  def get_internal_derivatives(self):
9216  r"""get_internal_derivatives(NonRigidMember self) -> Vector3D"""
9217  return _IMP_core.NonRigidMember_get_internal_derivatives(self)
9218 
9219  def get_internal_rotational_derivatives(self):
9220  r"""get_internal_rotational_derivatives(NonRigidMember self) -> Vector4D"""
9221  return _IMP_core.NonRigidMember_get_internal_rotational_derivatives(self)
9222 
9223  def add_attribute(self, *args):
9224  r"""
9225  add_attribute(NonRigidMember self, FloatKey k, IMP::Float v, bool opt)
9226  add_attribute(NonRigidMember self, FloatKey a0, IMP::Float a1)
9227  add_attribute(NonRigidMember self, IntKey a0, IMP::Int a1)
9228  add_attribute(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9229  add_attribute(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9230  add_attribute(NonRigidMember self, StringKey a0, IMP::String a1)
9231  add_attribute(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9232  add_attribute(NonRigidMember self, ObjectKey a0, Object a1)
9233  add_attribute(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9234  add_attribute(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9235  add_attribute(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9236  add_attribute(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9237  """
9238  return _IMP_core.NonRigidMember_add_attribute(self, *args)
9239 
9240  def get_value(self, *args):
9241  r"""
9242  get_value(NonRigidMember self, FloatKey a0) -> IMP::Float
9243  get_value(NonRigidMember self, IntKey a0) -> IMP::Int
9244  get_value(NonRigidMember self, FloatsKey a0) -> IMP::Floats
9245  get_value(NonRigidMember self, IntsKey a0) -> IMP::Ints
9246  get_value(NonRigidMember self, StringKey a0) -> IMP::String
9247  get_value(NonRigidMember self, ParticleIndexKey a0) -> Particle
9248  get_value(NonRigidMember self, ObjectKey a0) -> Object
9249  get_value(NonRigidMember self, SparseFloatKey a0) -> IMP::Float
9250  get_value(NonRigidMember self, SparseIntKey a0) -> IMP::Int
9251  get_value(NonRigidMember self, SparseStringKey a0) -> IMP::String
9252  get_value(NonRigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9253  """
9254  return _IMP_core.NonRigidMember_get_value(self, *args)
9255 
9256  def set_value(self, *args):
9257  r"""
9258  set_value(NonRigidMember self, FloatKey a0, IMP::Float a1)
9259  set_value(NonRigidMember self, IntKey a0, IMP::Int a1)
9260  set_value(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9261  set_value(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9262  set_value(NonRigidMember self, StringKey a0, IMP::String a1)
9263  set_value(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9264  set_value(NonRigidMember self, ObjectKey a0, Object a1)
9265  set_value(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9266  set_value(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9267  set_value(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9268  set_value(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9269  """
9270  return _IMP_core.NonRigidMember_set_value(self, *args)
9271 
9272  def remove_attribute(self, *args):
9273  r"""
9274  remove_attribute(NonRigidMember self, FloatKey a0)
9275  remove_attribute(NonRigidMember self, IntKey a0)
9276  remove_attribute(NonRigidMember self, FloatsKey a0)
9277  remove_attribute(NonRigidMember self, IntsKey a0)
9278  remove_attribute(NonRigidMember self, StringKey a0)
9279  remove_attribute(NonRigidMember self, ParticleIndexKey a0)
9280  remove_attribute(NonRigidMember self, ObjectKey a0)
9281  remove_attribute(NonRigidMember self, SparseFloatKey a0)
9282  remove_attribute(NonRigidMember self, SparseIntKey a0)
9283  remove_attribute(NonRigidMember self, SparseStringKey a0)
9284  remove_attribute(NonRigidMember self, SparseParticleIndexKey a0)
9285  """
9286  return _IMP_core.NonRigidMember_remove_attribute(self, *args)
9287 
9288  def has_attribute(self, *args):
9289  r"""
9290  has_attribute(NonRigidMember self, FloatKey a0) -> bool
9291  has_attribute(NonRigidMember self, IntKey a0) -> bool
9292  has_attribute(NonRigidMember self, FloatsKey a0) -> bool
9293  has_attribute(NonRigidMember self, IntsKey a0) -> bool
9294  has_attribute(NonRigidMember self, StringKey a0) -> bool
9295  has_attribute(NonRigidMember self, ParticleIndexKey a0) -> bool
9296  has_attribute(NonRigidMember self, ObjectKey a0) -> bool
9297  has_attribute(NonRigidMember self, SparseFloatKey a0) -> bool
9298  has_attribute(NonRigidMember self, SparseIntKey a0) -> bool
9299  has_attribute(NonRigidMember self, SparseStringKey a0) -> bool
9300  has_attribute(NonRigidMember self, SparseParticleIndexKey a0) -> bool
9301  """
9302  return _IMP_core.NonRigidMember_has_attribute(self, *args)
9303 
9304  def get_derivative(self, a0):
9305  r"""get_derivative(NonRigidMember self, FloatKey a0) -> double"""
9306  return _IMP_core.NonRigidMember_get_derivative(self, a0)
9307 
9308  def get_name(self):
9309  r"""get_name(NonRigidMember self) -> std::string"""
9310  return _IMP_core.NonRigidMember_get_name(self)
9311 
9312  def clear_caches(self):
9313  r"""clear_caches(NonRigidMember self)"""
9314  return _IMP_core.NonRigidMember_clear_caches(self)
9315 
9316  def set_name(self, a0):
9317  r"""set_name(NonRigidMember self, std::string a0)"""
9318  return _IMP_core.NonRigidMember_set_name(self, a0)
9319 
9320  def set_check_level(self, a0):
9321  r"""set_check_level(NonRigidMember self, IMP::CheckLevel a0)"""
9322  return _IMP_core.NonRigidMember_set_check_level(self, a0)
9323 
9324  def add_to_derivative(self, a0, a1, a2):
9325  r"""add_to_derivative(NonRigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9326  return _IMP_core.NonRigidMember_add_to_derivative(self, a0, a1, a2)
9327 
9328  def set_is_optimized(self, a0, a1):
9329  r"""set_is_optimized(NonRigidMember self, FloatKey a0, bool a1)"""
9330  return _IMP_core.NonRigidMember_set_is_optimized(self, a0, a1)
9331 
9332  def get_is_optimized(self, a0):
9333  r"""get_is_optimized(NonRigidMember self, FloatKey a0) -> bool"""
9334  return _IMP_core.NonRigidMember_get_is_optimized(self, a0)
9335 
9336  def get_check_level(self):
9337  r"""get_check_level(NonRigidMember self) -> IMP::CheckLevel"""
9338  return _IMP_core.NonRigidMember_get_check_level(self)
9339 
9340  def __eq__(self, *args):
9341  r"""
9342  __eq__(NonRigidMember self, NonRigidMember o) -> bool
9343  __eq__(NonRigidMember self, Particle d) -> bool
9344  """
9345  return _IMP_core.NonRigidMember___eq__(self, *args)
9346 
9347  def __ne__(self, *args):
9348  r"""
9349  __ne__(NonRigidMember self, NonRigidMember o) -> bool
9350  __ne__(NonRigidMember self, Particle d) -> bool
9351  """
9352  return _IMP_core.NonRigidMember___ne__(self, *args)
9353 
9354  def __le__(self, *args):
9355  r"""
9356  __le__(NonRigidMember self, NonRigidMember o) -> bool
9357  __le__(NonRigidMember self, Particle d) -> bool
9358  """
9359  return _IMP_core.NonRigidMember___le__(self, *args)
9360 
9361  def __lt__(self, *args):
9362  r"""
9363  __lt__(NonRigidMember self, NonRigidMember o) -> bool
9364  __lt__(NonRigidMember self, Particle d) -> bool
9365  """
9366  return _IMP_core.NonRigidMember___lt__(self, *args)
9367 
9368  def __ge__(self, *args):
9369  r"""
9370  __ge__(NonRigidMember self, NonRigidMember o) -> bool
9371  __ge__(NonRigidMember self, Particle d) -> bool
9372  """
9373  return _IMP_core.NonRigidMember___ge__(self, *args)
9374 
9375  def __gt__(self, *args):
9376  r"""
9377  __gt__(NonRigidMember self, NonRigidMember o) -> bool
9378  __gt__(NonRigidMember self, Particle d) -> bool
9379  """
9380  return _IMP_core.NonRigidMember___gt__(self, *args)
9381 
9382  def __hash__(self):
9383  r"""__hash__(NonRigidMember self) -> std::size_t"""
9384  return _IMP_core.NonRigidMember___hash__(self)
9385 
9386  def __str__(self):
9387  r"""__str__(NonRigidMember self) -> std::string"""
9388  return _IMP_core.NonRigidMember___str__(self)
9389 
9390  def __repr__(self):
9391  r"""__repr__(NonRigidMember self) -> std::string"""
9392  return _IMP_core.NonRigidMember___repr__(self)
9393 
9394  def _get_as_binary(self):
9395  r"""_get_as_binary(NonRigidMember self) -> PyObject *"""
9396  return _IMP_core.NonRigidMember__get_as_binary(self)
9397 
9398  def _set_from_binary(self, p):
9399  r"""_set_from_binary(NonRigidMember self, PyObject * p)"""
9400  return _IMP_core.NonRigidMember__set_from_binary(self, p)
9401 
9402  def __getstate__(self):
9403  p = self._get_as_binary()
9404  if len(self.__dict__) > 1:
9405  d = self.__dict__.copy()
9406  del d['this']
9407  p = (d, p)
9408  return p
9409 
9410  def __setstate__(self, p):
9411  if not hasattr(self, 'this'):
9412  self.__init__()
9413  if isinstance(p, tuple):
9414  d, p = p
9415  self.__dict__.update(d)
9416  return self._set_from_binary(p)
9417 
9418 
9419 # Register NonRigidMember in _IMP_core:
9420 _IMP_core.NonRigidMember_swigregister(NonRigidMember)
9421 class RigidMembersRefiner(IMP.Refiner):
9422  r"""Proxy of C++ IMP::core::RigidMembersRefiner class."""
9423 
9424  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9425 
9426  def __init__(self, *args):
9427  r"""__init__(RigidMembersRefiner self, std::string name="RigidMembersRefiner%d") -> RigidMembersRefiner"""
9428  _IMP_core.RigidMembersRefiner_swiginit(self, _IMP_core.new_RigidMembersRefiner(*args))
9429 
9430  def do_get_inputs(self, m, pis):
9431  r"""do_get_inputs(RigidMembersRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9432  return _IMP_core.RigidMembersRefiner_do_get_inputs(self, m, pis)
9433 
9434  def get_version_info(self):
9435  r"""get_version_info(RigidMembersRefiner self) -> VersionInfo"""
9436  return _IMP_core.RigidMembersRefiner_get_version_info(self)
9437  __swig_destroy__ = _IMP_core.delete_RigidMembersRefiner
9438 
9439  def __str__(self):
9440  r"""__str__(RigidMembersRefiner self) -> std::string"""
9441  return _IMP_core.RigidMembersRefiner___str__(self)
9442 
9443  def __repr__(self):
9444  r"""__repr__(RigidMembersRefiner self) -> std::string"""
9445  return _IMP_core.RigidMembersRefiner___repr__(self)
9446 
9447  @staticmethod
9448  def get_from(o):
9449  return _object_cast_to_RigidMembersRefiner(o)
9450 
9451 
9452 # Register RigidMembersRefiner in _IMP_core:
9453 _IMP_core.RigidMembersRefiner_swigregister(RigidMembersRefiner)
9454 
9455 def get_rigid_members_refiner():
9456  r"""get_rigid_members_refiner() -> RigidMembersRefiner"""
9457  return _IMP_core.get_rigid_members_refiner()
9458 
9459 def transform(*args):
9460  r"""
9461  transform(XYZ a, Transformation3D tr)
9462  transform(RigidBody a, Transformation3D tr)
9463  """
9464  return _IMP_core.transform(*args)
9465 
9466 def get_initial_reference_frame(*args):
9467  r"""
9468  get_initial_reference_frame(Model m, IMP::ParticleIndexes const & pis) -> ReferenceFrame3D
9469  get_initial_reference_frame(IMP::ParticlesTemp const & ps) -> ReferenceFrame3D
9470  """
9471  return _IMP_core.get_initial_reference_frame(*args)
9472 
9473 def create_rigid_bodies(m, n, no_members=False):
9474  r"""create_rigid_bodies(Model m, unsigned int n, bool no_members=False) -> IMP::ParticlesTemp"""
9475  return _IMP_core.create_rigid_bodies(m, n, no_members)
9476 
9477 def show_rigid_body_hierarchy(*args):
9478  r"""show_rigid_body_hierarchy(RigidBody rb, TextOutput out=IMP::TextOutput(std::cout))"""
9479  return _IMP_core.show_rigid_body_hierarchy(*args)
9480 
9481 def get_root_rigid_body(m):
9482  r"""get_root_rigid_body(RigidMember m) -> ParticleIndex"""
9483  return _IMP_core.get_root_rigid_body(m)
9484 class _UpdateRigidBodyMembers(IMP.SingletonModifier):
9485  r"""Proxy of C++ IMP::core::internal::_UpdateRigidBodyMembers class."""
9486 
9487  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9488 
9489  def __init__(self, *args):
9490  r"""__init__(_UpdateRigidBodyMembers self, std::string name="UpdateRigidBodyMembers%1%") -> _UpdateRigidBodyMembers"""
9491  _IMP_core._UpdateRigidBodyMembers_swiginit(self, _IMP_core.new__UpdateRigidBodyMembers(*args))
9492 
9493  def do_get_inputs(self, m, pis):
9494  r"""do_get_inputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9495  return _IMP_core._UpdateRigidBodyMembers_do_get_inputs(self, m, pis)
9496 
9497  def do_get_outputs(self, m, pis):
9498  r"""do_get_outputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9499  return _IMP_core._UpdateRigidBodyMembers_do_get_outputs(self, m, pis)
9500 
9501  def get_version_info(self):
9502  r"""get_version_info(_UpdateRigidBodyMembers self) -> VersionInfo"""
9503  return _IMP_core._UpdateRigidBodyMembers_get_version_info(self)
9504  __swig_destroy__ = _IMP_core.delete__UpdateRigidBodyMembers
9505 
9506  def __str__(self):
9507  r"""__str__(_UpdateRigidBodyMembers self) -> std::string"""
9508  return _IMP_core._UpdateRigidBodyMembers___str__(self)
9509 
9510  def __repr__(self):
9511  r"""__repr__(_UpdateRigidBodyMembers self) -> std::string"""
9512  return _IMP_core._UpdateRigidBodyMembers___repr__(self)
9513 
9514  @staticmethod
9515  def get_from(o):
9516  return _object_cast_to__UpdateRigidBodyMembers(o)
9517 
9518 
9519 # Register _UpdateRigidBodyMembers in _IMP_core:
9520 _IMP_core._UpdateRigidBodyMembers_swigregister(_UpdateRigidBodyMembers)
9521 class _AccumulateRigidBodyDerivatives(IMP.SingletonModifier):
9522  r"""Proxy of C++ IMP::core::internal::_AccumulateRigidBodyDerivatives class."""
9523 
9524  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9525 
9526  def __init__(self, *args):
9527  r"""__init__(_AccumulateRigidBodyDerivatives self, std::string name="AccumulateRigidBodyDerivatives%1%") -> _AccumulateRigidBodyDerivatives"""
9528  _IMP_core._AccumulateRigidBodyDerivatives_swiginit(self, _IMP_core.new__AccumulateRigidBodyDerivatives(*args))
9529 
9530  def do_get_inputs(self, m, pis):
9531  r"""do_get_inputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9532  return _IMP_core._AccumulateRigidBodyDerivatives_do_get_inputs(self, m, pis)
9533 
9534  def do_get_outputs(self, m, pis):
9535  r"""do_get_outputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9536  return _IMP_core._AccumulateRigidBodyDerivatives_do_get_outputs(self, m, pis)
9537 
9538  def get_version_info(self):
9539  r"""get_version_info(_AccumulateRigidBodyDerivatives self) -> VersionInfo"""
9540  return _IMP_core._AccumulateRigidBodyDerivatives_get_version_info(self)
9541  __swig_destroy__ = _IMP_core.delete__AccumulateRigidBodyDerivatives
9542 
9543  def __str__(self):
9544  r"""__str__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9545  return _IMP_core._AccumulateRigidBodyDerivatives___str__(self)
9546 
9547  def __repr__(self):
9548  r"""__repr__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9549  return _IMP_core._AccumulateRigidBodyDerivatives___repr__(self)
9550 
9551  @staticmethod
9552  def get_from(o):
9553  return _object_cast_to__AccumulateRigidBodyDerivatives(o)
9554 
9555 
9556 # Register _AccumulateRigidBodyDerivatives in _IMP_core:
9557 _IMP_core._AccumulateRigidBodyDerivatives_swigregister(_AccumulateRigidBodyDerivatives)
9558 class _NormalizeRotation(IMP.SingletonModifier):
9559  r"""Proxy of C++ IMP::core::internal::_NormalizeRotation class."""
9560 
9561  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9562 
9563  def __init__(self, *args):
9564  r"""__init__(_NormalizeRotation self, std::string name="NormalizeRotation%1%") -> _NormalizeRotation"""
9565  _IMP_core._NormalizeRotation_swiginit(self, _IMP_core.new__NormalizeRotation(*args))
9566 
9567  def do_get_inputs(self, m, pis):
9568  r"""do_get_inputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9569  return _IMP_core._NormalizeRotation_do_get_inputs(self, m, pis)
9570 
9571  def do_get_outputs(self, m, pis):
9572  r"""do_get_outputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9573  return _IMP_core._NormalizeRotation_do_get_outputs(self, m, pis)
9574 
9575  def get_version_info(self):
9576  r"""get_version_info(_NormalizeRotation self) -> VersionInfo"""
9577  return _IMP_core._NormalizeRotation_get_version_info(self)
9578  __swig_destroy__ = _IMP_core.delete__NormalizeRotation
9579 
9580  def __str__(self):
9581  r"""__str__(_NormalizeRotation self) -> std::string"""
9582  return _IMP_core._NormalizeRotation___str__(self)
9583 
9584  def __repr__(self):
9585  r"""__repr__(_NormalizeRotation self) -> std::string"""
9586  return _IMP_core._NormalizeRotation___repr__(self)
9587 
9588  @staticmethod
9589  def get_from(o):
9590  return _object_cast_to__NormalizeRotation(o)
9591 
9592 
9593 # Register _NormalizeRotation in _IMP_core:
9594 _IMP_core._NormalizeRotation_swigregister(_NormalizeRotation)
9595 class _RigidBodyNormalizeConstraint(IMP.Constraint):
9596  r"""Proxy of C++ IMP::core::internal::_RigidBodyNormalizeConstraint class."""
9597 
9598  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9599 
9600  def __init__(self, *args, **kwargs):
9601  raise AttributeError("No constructor defined - class is abstract")
9602 
9603  def get_before_modifier(self):
9604  r"""get_before_modifier(_RigidBodyNormalizeConstraint self) -> _NormalizeRotation"""
9605  return _IMP_core._RigidBodyNormalizeConstraint_get_before_modifier(self)
9606 
9607  def get_container(self):
9608  r"""get_container(_RigidBodyNormalizeConstraint self) -> Container"""
9609  return _IMP_core._RigidBodyNormalizeConstraint_get_container(self)
9610 
9611  def get_version_info(self):
9612  r"""get_version_info(_RigidBodyNormalizeConstraint self) -> VersionInfo"""
9613  return _IMP_core._RigidBodyNormalizeConstraint_get_version_info(self)
9614  __swig_destroy__ = _IMP_core.delete__RigidBodyNormalizeConstraint
9615 
9616  def __str__(self):
9617  r"""__str__(_RigidBodyNormalizeConstraint self) -> std::string"""
9618  return _IMP_core._RigidBodyNormalizeConstraint___str__(self)
9619 
9620  def __repr__(self):
9621  r"""__repr__(_RigidBodyNormalizeConstraint self) -> std::string"""
9622  return _IMP_core._RigidBodyNormalizeConstraint___repr__(self)
9623 
9624  @staticmethod
9625  def get_from(o):
9626  return _object_cast_to__RigidBodyNormalizeConstraint(o)
9627 
9628 
9629  def _get_jax(self):
9630  from IMP.algebra.jax import _quaternion_normalize
9631  import jax
9632  def apply_func(jm):
9633  # Assume that constraint acts on all rigid bodies
9634  allrbs = jm['rigid_bodies']
9635  allrbs.quaternion = _quaternion_normalize(allrbs.quaternion)
9636  return jm
9637  return self._wrap_jax(apply_func, keys=['rigid_bodies'])
9638 
9639 
9640 # Register _RigidBodyNormalizeConstraint in _IMP_core:
9641 _IMP_core._RigidBodyNormalizeConstraint_swigregister(_RigidBodyNormalizeConstraint)
9642 class _RigidBodyPositionConstraint(IMP.Constraint):
9643  r"""Proxy of C++ IMP::core::internal::_RigidBodyPositionConstraint class."""
9644 
9645  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9646 
9647  def __init__(self, *args, **kwargs):
9648  raise AttributeError("No constructor defined - class is abstract")
9649 
9650  def get_version_info(self):
9651  r"""get_version_info(_RigidBodyPositionConstraint self) -> VersionInfo"""
9652  return _IMP_core._RigidBodyPositionConstraint_get_version_info(self)
9653  __swig_destroy__ = _IMP_core.delete__RigidBodyPositionConstraint
9654 
9655  def get_before_modifier(self):
9656  r"""get_before_modifier(_RigidBodyPositionConstraint self) -> _UpdateRigidBodyMembers"""
9657  return _IMP_core._RigidBodyPositionConstraint_get_before_modifier(self)
9658 
9659  def get_after_modifier(self):
9660  r"""get_after_modifier(_RigidBodyPositionConstraint self) -> _AccumulateRigidBodyDerivatives"""
9661  return _IMP_core._RigidBodyPositionConstraint_get_after_modifier(self)
9662 
9663  def get_index(self):
9664  r"""get_index(_RigidBodyPositionConstraint self) -> ParticleIndex"""
9665  return _IMP_core._RigidBodyPositionConstraint_get_index(self)
9666 
9667  def __str__(self):
9668  r"""__str__(_RigidBodyPositionConstraint self) -> std::string"""
9669  return _IMP_core._RigidBodyPositionConstraint___str__(self)
9670 
9671  def __repr__(self):
9672  r"""__repr__(_RigidBodyPositionConstraint self) -> std::string"""
9673  return _IMP_core._RigidBodyPositionConstraint___repr__(self)
9674 
9675  @staticmethod
9676  def get_from(o):
9677  return _object_cast_to__RigidBodyPositionConstraint(o)
9678 
9679 
9680  def _get_jax(self):
9681  import jax
9682  from IMP.core import _jax_rigid
9683  def apply_func(jm, index):
9684  body = jm['rigid_bodies'].bodies[index]
9685  # todo: this could perhaps be better parallelized, as in most
9686  # cases (at least, without nested rigid bodies) the update of
9687  # one rigid body does not affect members of another body
9688  return body.update_members(jm)
9689  # Get rigid body index from particle index
9690  pindex = self.get_index()
9691  rbindex = _jax_rigid._get_rigid_body_index(self.get_model(), pindex)
9692  f = functools.partial(apply_func, index=rbindex)
9693  return self._wrap_jax(f, keys=['rigid_bodies'])
9694 
9695 
9696 # Register _RigidBodyPositionConstraint in _IMP_core:
9697 _IMP_core._RigidBodyPositionConstraint_swigregister(_RigidBodyPositionConstraint)
9698 class RigidBodyHierarchyGeometry(IMP.display.SingletonGeometry):
9699  r"""Proxy of C++ IMP::core::RigidBodyHierarchyGeometry class."""
9700 
9701  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9702 
9703  def __init__(self, rb, constituents):
9704  r"""__init__(RigidBodyHierarchyGeometry self, RigidBody rb, IMP::ParticlesTemp const & constituents) -> RigidBodyHierarchyGeometry"""
9705  _IMP_core.RigidBodyHierarchyGeometry_swiginit(self, _IMP_core.new_RigidBodyHierarchyGeometry(rb, constituents))
9706 
9707  def get_version_info(self):
9708  r"""get_version_info(RigidBodyHierarchyGeometry self) -> VersionInfo"""
9709  return _IMP_core.RigidBodyHierarchyGeometry_get_version_info(self)
9710  __swig_destroy__ = _IMP_core.delete_RigidBodyHierarchyGeometry
9711 
9712  def __str__(self):
9713  r"""__str__(RigidBodyHierarchyGeometry self) -> std::string"""
9714  return _IMP_core.RigidBodyHierarchyGeometry___str__(self)
9715 
9716  def __repr__(self):
9717  r"""__repr__(RigidBodyHierarchyGeometry self) -> std::string"""
9718  return _IMP_core.RigidBodyHierarchyGeometry___repr__(self)
9719 
9720  @staticmethod
9721  def get_from(o):
9722  return _object_cast_to_RigidBodyHierarchyGeometry(o)
9723 
9724 
9725 # Register RigidBodyHierarchyGeometry in _IMP_core:
9726 _IMP_core.RigidBodyHierarchyGeometry_swigregister(RigidBodyHierarchyGeometry)
9727 class RigidBodyDerivativeGeometry(IMP.display.SingletonGeometry):
9728  r"""Proxy of C++ IMP::core::RigidBodyDerivativeGeometry class."""
9729 
9730  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9731 
9732  def __init__(self, *args):
9733  r"""
9734  __init__(RigidBodyDerivativeGeometry self, Particle p) -> RigidBodyDerivativeGeometry
9735  __init__(RigidBodyDerivativeGeometry self, RigidBody d) -> RigidBodyDerivativeGeometry
9736  """
9737  _IMP_core.RigidBodyDerivativeGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativeGeometry(*args))
9738 
9739  def get_version_info(self):
9740  r"""get_version_info(RigidBodyDerivativeGeometry self) -> VersionInfo"""
9741  return _IMP_core.RigidBodyDerivativeGeometry_get_version_info(self)
9742  __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativeGeometry
9743 
9744  def __str__(self):
9745  r"""__str__(RigidBodyDerivativeGeometry self) -> std::string"""
9746  return _IMP_core.RigidBodyDerivativeGeometry___str__(self)
9747 
9748  def __repr__(self):
9749  r"""__repr__(RigidBodyDerivativeGeometry self) -> std::string"""
9750  return _IMP_core.RigidBodyDerivativeGeometry___repr__(self)
9751 
9752  @staticmethod
9753  def get_from(o):
9754  return _object_cast_to_RigidBodyDerivativeGeometry(o)
9755 
9756 
9757 # Register RigidBodyDerivativeGeometry in _IMP_core:
9758 _IMP_core.RigidBodyDerivativeGeometry_swigregister(RigidBodyDerivativeGeometry)
9759 class RigidBodyDerivativesGeometry(IMP.display.SingletonsGeometry):
9760  r"""Proxy of C++ IMP::core::RigidBodyDerivativesGeometry class."""
9761 
9762  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9763 
9764  def __init__(self, sc):
9765  r"""__init__(RigidBodyDerivativesGeometry self, SingletonContainer sc) -> RigidBodyDerivativesGeometry"""
9766  _IMP_core.RigidBodyDerivativesGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativesGeometry(sc))
9767 
9768  def get_version_info(self):
9769  r"""get_version_info(RigidBodyDerivativesGeometry self) -> VersionInfo"""
9770  return _IMP_core.RigidBodyDerivativesGeometry_get_version_info(self)
9771  __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativesGeometry
9772 
9773  def __str__(self):
9774  r"""__str__(RigidBodyDerivativesGeometry self) -> std::string"""
9775  return _IMP_core.RigidBodyDerivativesGeometry___str__(self)
9776 
9777  def __repr__(self):
9778  r"""__repr__(RigidBodyDerivativesGeometry self) -> std::string"""
9779  return _IMP_core.RigidBodyDerivativesGeometry___repr__(self)
9780 
9781  @staticmethod
9782  def get_from(o):
9783  return _object_cast_to_RigidBodyDerivativesGeometry(o)
9784 
9785 
9786 # Register RigidBodyDerivativesGeometry in _IMP_core:
9787 _IMP_core.RigidBodyDerivativesGeometry_swigregister(RigidBodyDerivativesGeometry)
9788 class RigidBodyFrameGeometry(IMP.display.SingletonGeometry):
9789  r"""Proxy of C++ IMP::core::RigidBodyFrameGeometry class."""
9790 
9791  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9792 
9793  def __init__(self, *args):
9794  r"""
9795  __init__(RigidBodyFrameGeometry self, Particle p) -> RigidBodyFrameGeometry
9796  __init__(RigidBodyFrameGeometry self, RigidBody d) -> RigidBodyFrameGeometry
9797  """
9798  _IMP_core.RigidBodyFrameGeometry_swiginit(self, _IMP_core.new_RigidBodyFrameGeometry(*args))
9799 
9800  def get_version_info(self):
9801  r"""get_version_info(RigidBodyFrameGeometry self) -> VersionInfo"""
9802  return _IMP_core.RigidBodyFrameGeometry_get_version_info(self)
9803  __swig_destroy__ = _IMP_core.delete_RigidBodyFrameGeometry
9804 
9805  def __str__(self):
9806  r"""__str__(RigidBodyFrameGeometry self) -> std::string"""
9807  return _IMP_core.RigidBodyFrameGeometry___str__(self)
9808 
9809  def __repr__(self):
9810  r"""__repr__(RigidBodyFrameGeometry self) -> std::string"""
9811  return _IMP_core.RigidBodyFrameGeometry___repr__(self)
9812 
9813  @staticmethod
9814  def get_from(o):
9815  return _object_cast_to_RigidBodyFrameGeometry(o)
9816 
9817 
9818 # Register RigidBodyFrameGeometry in _IMP_core:
9819 _IMP_core.RigidBodyFrameGeometry_swigregister(RigidBodyFrameGeometry)
9820 class RigidBodyFramesGeometry(IMP.display.SingletonsGeometry):
9821  r"""Proxy of C++ IMP::core::RigidBodyFramesGeometry class."""
9822 
9823  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9824 
9825  def __init__(self, sc):
9826  r"""__init__(RigidBodyFramesGeometry self, SingletonContainer sc) -> RigidBodyFramesGeometry"""
9827  _IMP_core.RigidBodyFramesGeometry_swiginit(self, _IMP_core.new_RigidBodyFramesGeometry(sc))
9828 
9829  def get_version_info(self):
9830  r"""get_version_info(RigidBodyFramesGeometry self) -> VersionInfo"""
9831  return _IMP_core.RigidBodyFramesGeometry_get_version_info(self)
9832  __swig_destroy__ = _IMP_core.delete_RigidBodyFramesGeometry
9833 
9834  def __str__(self):
9835  r"""__str__(RigidBodyFramesGeometry self) -> std::string"""
9836  return _IMP_core.RigidBodyFramesGeometry___str__(self)
9837 
9838  def __repr__(self):
9839  r"""__repr__(RigidBodyFramesGeometry self) -> std::string"""
9840  return _IMP_core.RigidBodyFramesGeometry___repr__(self)
9841 
9842  @staticmethod
9843  def get_from(o):
9844  return _object_cast_to_RigidBodyFramesGeometry(o)
9845 
9846 
9847 # Register RigidBodyFramesGeometry in _IMP_core:
9848 _IMP_core.RigidBodyFramesGeometry_swigregister(RigidBodyFramesGeometry)
9849 class RigidBodyTorque(IMP.display.SegmentGeometry):
9850  r"""Proxy of C++ IMP::core::RigidBodyTorque class."""
9851 
9852  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9853 
9854  def __init__(self, p):
9855  r"""__init__(RigidBodyTorque self, Particle p) -> RigidBodyTorque"""
9856  _IMP_core.RigidBodyTorque_swiginit(self, _IMP_core.new_RigidBodyTorque(p))
9857 
9858  def __str__(self):
9859  r"""__str__(RigidBodyTorque self) -> std::string"""
9860  return _IMP_core.RigidBodyTorque___str__(self)
9861 
9862  def __repr__(self):
9863  r"""__repr__(RigidBodyTorque self) -> std::string"""
9864  return _IMP_core.RigidBodyTorque___repr__(self)
9865 
9866  @staticmethod
9867  def get_from(o):
9868  return _object_cast_to_RigidBodyTorque(o)
9869 
9870  __swig_destroy__ = _IMP_core.delete_RigidBodyTorque
9871 
9872 # Register RigidBodyTorque in _IMP_core:
9873 _IMP_core.RigidBodyTorque_swigregister(RigidBodyTorque)
9874 class NearestNeighborsClosePairsFinder(ClosePairsFinder):
9875  r"""Proxy of C++ IMP::core::NearestNeighborsClosePairsFinder class."""
9876 
9877  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9878 
9879  def __init__(self):
9880  r"""__init__(NearestNeighborsClosePairsFinder self) -> NearestNeighborsClosePairsFinder"""
9881  _IMP_core.NearestNeighborsClosePairsFinder_swiginit(self, _IMP_core.new_NearestNeighborsClosePairsFinder())
9882 
9883  def get_close_pairs(self, *args):
9884  r"""
9885  get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9886  get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9887  get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
9888  get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
9889  """
9890  return _IMP_core.NearestNeighborsClosePairsFinder_get_close_pairs(self, *args)
9891 
9892  def do_get_inputs(self, m, pis):
9893  r"""do_get_inputs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9894  return _IMP_core.NearestNeighborsClosePairsFinder_do_get_inputs(self, m, pis)
9895 
9896  def get_version_info(self):
9897  r"""get_version_info(NearestNeighborsClosePairsFinder self) -> VersionInfo"""
9898  return _IMP_core.NearestNeighborsClosePairsFinder_get_version_info(self)
9899  __swig_destroy__ = _IMP_core.delete_NearestNeighborsClosePairsFinder
9900 
9901  def __str__(self):
9902  r"""__str__(NearestNeighborsClosePairsFinder self) -> std::string"""
9903  return _IMP_core.NearestNeighborsClosePairsFinder___str__(self)
9904 
9905  def __repr__(self):
9906  r"""__repr__(NearestNeighborsClosePairsFinder self) -> std::string"""
9907  return _IMP_core.NearestNeighborsClosePairsFinder___repr__(self)
9908 
9909  @staticmethod
9910  def get_from(o):
9911  return _object_cast_to_NearestNeighborsClosePairsFinder(o)
9912 
9913 
9914 # Register NearestNeighborsClosePairsFinder in _IMP_core:
9915 _IMP_core.NearestNeighborsClosePairsFinder_swigregister(NearestNeighborsClosePairsFinder)
9916 class RestraintsScoringFunction(IMP.ScoringFunction):
9917  r"""Proxy of C++ IMP::core::RestraintsScoringFunction class."""
9918 
9919  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9920 
9921  def __init__(self, *args):
9922  r"""
9923  __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, double weight=1.0, double max=NO_MAX, std::string name="RestraintsScoringFunction%1%") -> RestraintsScoringFunction
9924  __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, std::string name) -> RestraintsScoringFunction
9925  __init__(RestraintsScoringFunction self) -> RestraintsScoringFunction
9926  """
9927  _IMP_core.RestraintsScoringFunction_swiginit(self, _IMP_core.new_RestraintsScoringFunction(*args))
9928 
9929  def do_add_score_and_derivatives(self, sa, ss):
9930  r"""do_add_score_and_derivatives(RestraintsScoringFunction self, ScoreAccumulator sa, IMP::ScoreStatesTemp const & ss)"""
9931  return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives(self, sa, ss)
9932 
9933  def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss):
9934  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)"""
9935  return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss)
9936 
9937  def do_get_inputs(self):
9938  r"""do_get_inputs(RestraintsScoringFunction self) -> IMP::ModelObjectsTemp"""
9939  return _IMP_core.RestraintsScoringFunction_do_get_inputs(self)
9940 
9941  def get_restraints(self):
9942  r"""get_restraints(RestraintsScoringFunction self) -> IMP::Restraints"""
9943  return _IMP_core.RestraintsScoringFunction_get_restraints(self)
9944 
9945  def set_restraints(self, d):
9946  r"""set_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
9947  return _IMP_core.RestraintsScoringFunction_set_restraints(self, d)
9948 
9949  def get_number_of_restraints(self):
9950  r"""get_number_of_restraints(RestraintsScoringFunction self) -> unsigned int"""
9951  return _IMP_core.RestraintsScoringFunction_get_number_of_restraints(self)
9952 
9953  def clear_restraints(self):
9954  r"""clear_restraints(RestraintsScoringFunction self)"""
9955  return _IMP_core.RestraintsScoringFunction_clear_restraints(self)
9956 
9957  def get_restraint(self, i):
9958  r"""get_restraint(RestraintsScoringFunction self, unsigned int i) -> Restraint"""
9959  return _IMP_core.RestraintsScoringFunction_get_restraint(self, i)
9960 
9961  def erase_restraint(self, i):
9962  r"""erase_restraint(RestraintsScoringFunction self, unsigned int i)"""
9963  return _IMP_core.RestraintsScoringFunction_erase_restraint(self, i)
9964 
9965  def add_restraint(self, d):
9966  r"""add_restraint(RestraintsScoringFunction self, Restraint d) -> unsigned int"""
9967  return _IMP_core.RestraintsScoringFunction_add_restraint(self, d)
9968 
9969  def add_restraints(self, d):
9970  r"""add_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
9971  return _IMP_core.RestraintsScoringFunction_add_restraints(self, d)
9972 
9973  def _python_index_restraint(self, r, start, stop):
9974  r"""_python_index_restraint(RestraintsScoringFunction self, Restraint r, unsigned int start, unsigned int stop) -> unsigned int"""
9975  return _IMP_core.RestraintsScoringFunction__python_index_restraint(self, r, start, stop)
9976  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)
9977  def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
9978  def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
9979  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##Restraints")
9980 
9981  def get_version_info(self):
9982  r"""get_version_info(RestraintsScoringFunction self) -> VersionInfo"""
9983  return _IMP_core.RestraintsScoringFunction_get_version_info(self)
9984  __swig_destroy__ = _IMP_core.delete_RestraintsScoringFunction
9985 
9986  def __str__(self):
9987  r"""__str__(RestraintsScoringFunction self) -> std::string"""
9988  return _IMP_core.RestraintsScoringFunction___str__(self)
9989 
9990  def __repr__(self):
9991  r"""__repr__(RestraintsScoringFunction self) -> std::string"""
9992  return _IMP_core.RestraintsScoringFunction___repr__(self)
9993 
9994  @staticmethod
9995  def get_from(o):
9996  return _object_cast_to_RestraintsScoringFunction(o)
9997 
9998 
9999  def _get_as_binary(self):
10000  r"""_get_as_binary(RestraintsScoringFunction self) -> PyObject *"""
10001  return _IMP_core.RestraintsScoringFunction__get_as_binary(self)
10002 
10003  def _set_from_binary(self, p):
10004  r"""_set_from_binary(RestraintsScoringFunction self, PyObject * p)"""
10005  return _IMP_core.RestraintsScoringFunction__set_from_binary(self, p)
10006 
10007  def __getstate__(self):
10008  p = self._get_as_binary()
10009  if len(self.__dict__) > 1:
10010  d = self.__dict__.copy()
10011  del d['this']
10012  p = (d, p)
10013  return p
10014 
10015  def __setstate__(self, p):
10016  if not hasattr(self, 'this'):
10017  self.__init__()
10018  if isinstance(p, tuple):
10019  d, p = p
10020  self.__dict__.update(d)
10021  return self._set_from_binary(p)
10022 
10023 
10024  def _get_jax(self, space=None):
10025  import jax.numpy as jnp
10026  import IMP.jax
10027  import IMP._jax_util
10028  restraints = [r.get_derived_object() for r in self.restraints]
10029  space = space or IMP.jax.FreeSpace
10030  multi_funcs, funcs, keys = IMP._jax_util.get_restraints_jax_funcs_keys(
10031  restraints, space)
10032  def jax_sf(jm):
10033  rets = [f(jm) for f in multi_funcs]
10034  if funcs:
10035  rets.append(jnp.stack([f(jm) for f in funcs], axis=-1))
10036  scores = jnp.concatenate(rets, axis=-1)
10037  return jnp.sum(scores, axis=-1)
10038  return IMP._jax_util.JAXRestraintInfo(
10039  m=self.get_model(), score_func=jax_sf, weight=1.0, keys=keys)
10040 
10041 
10042 # Register RestraintsScoringFunction in _IMP_core:
10043 _IMP_core.RestraintsScoringFunction_swigregister(RestraintsScoringFunction)
10044 class RigidClosePairsFinder(ClosePairsFinder):
10045  r"""Proxy of C++ IMP::core::RigidClosePairsFinder class."""
10046 
10047  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10048 
10049  def __init__(self, cpf=None):
10050  r"""__init__(RigidClosePairsFinder self, ClosePairsFinder cpf=None) -> RigidClosePairsFinder"""
10051  _IMP_core.RigidClosePairsFinder_swiginit(self, _IMP_core.new_RigidClosePairsFinder(cpf))
10052 
10053  def do_get_inputs(self, m, pis):
10054  r"""do_get_inputs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10055  return _IMP_core.RigidClosePairsFinder_do_get_inputs(self, m, pis)
10056 
10057  def get_close_pairs(self, *args):
10058  r"""
10059  get_close_pairs(RigidClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b, IMP::ParticleIndexes const & pa, IMP::ParticleIndexes const & pb) -> IMP::ParticleIndexPairs
10060  get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
10061  get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
10062  get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
10063  get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
10064  """
10065  return _IMP_core.RigidClosePairsFinder_get_close_pairs(self, *args)
10066 
10067  def get_version_info(self):
10068  r"""get_version_info(RigidClosePairsFinder self) -> VersionInfo"""
10069  return _IMP_core.RigidClosePairsFinder_get_version_info(self)
10070  __swig_destroy__ = _IMP_core.delete_RigidClosePairsFinder
10071 
10072  def __str__(self):
10073  r"""__str__(RigidClosePairsFinder self) -> std::string"""
10074  return _IMP_core.RigidClosePairsFinder___str__(self)
10075 
10076  def __repr__(self):
10077  r"""__repr__(RigidClosePairsFinder self) -> std::string"""
10078  return _IMP_core.RigidClosePairsFinder___repr__(self)
10079 
10080  @staticmethod
10081  def get_from(o):
10082  return _object_cast_to_RigidClosePairsFinder(o)
10083 
10084 
10085  def _get_as_binary(self):
10086  r"""_get_as_binary(RigidClosePairsFinder self) -> PyObject *"""
10087  return _IMP_core.RigidClosePairsFinder__get_as_binary(self)
10088 
10089  def _set_from_binary(self, p):
10090  r"""_set_from_binary(RigidClosePairsFinder self, PyObject * p)"""
10091  return _IMP_core.RigidClosePairsFinder__set_from_binary(self, p)
10092 
10093  def __getstate__(self):
10094  p = self._get_as_binary()
10095  if len(self.__dict__) > 1:
10096  d = self.__dict__.copy()
10097  del d['this']
10098  p = (d, p)
10099  return p
10100 
10101  def __setstate__(self, p):
10102  if not hasattr(self, 'this'):
10103  self.__init__()
10104  if isinstance(p, tuple):
10105  d, p = p
10106  self.__dict__.update(d)
10107  return self._set_from_binary(p)
10108 
10109 
10110 # Register RigidClosePairsFinder in _IMP_core:
10111 _IMP_core.RigidClosePairsFinder_swigregister(RigidClosePairsFinder)
10112 class _SphereDistancePairScore(IMP.PairScore):
10113  r"""Proxy of C++ IMP::core::SphereDistancePairScore class."""
10114 
10115  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10116  __repr__ = _swig_repr
10117 
10118  def __init__(self, *args):
10119  r"""
10120  SphereDistancePairScore(UnaryFunction uf, std::string name="SphereDistancePairScore%1%") -> _SphereDistancePairScore
10121  __init__(_SphereDistancePairScore self) -> _SphereDistancePairScore
10122  """
10123  _IMP_core._SphereDistancePairScore_swiginit(self, _IMP_core.new__SphereDistancePairScore(*args))
10124 
10125  def do_get_inputs(self, m, pis):
10126  r"""do_get_inputs(_SphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10127  return _IMP_core._SphereDistancePairScore_do_get_inputs(self, m, pis)
10128 
10129  def get_score_functor(self, *args):
10130  r"""
10131  get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10132  get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10133  """
10134  return _IMP_core._SphereDistancePairScore_get_score_functor(self, *args)
10135 
10136  def get_version_info(self):
10137  r"""get_version_info(_SphereDistancePairScore self) -> VersionInfo"""
10138  return _IMP_core._SphereDistancePairScore_get_version_info(self)
10139  __swig_destroy__ = _IMP_core.delete__SphereDistancePairScore
10140 
10141  @staticmethod
10142  def get_from(o):
10143  return _object_cast_to__SphereDistancePairScore(o)
10144 
10145 
10146  def _get_as_binary(self):
10147  r"""_get_as_binary(_SphereDistancePairScore self) -> PyObject *"""
10148  return _IMP_core._SphereDistancePairScore__get_as_binary(self)
10149 
10150  def _set_from_binary(self, p):
10151  r"""_set_from_binary(_SphereDistancePairScore self, PyObject * p)"""
10152  return _IMP_core._SphereDistancePairScore__set_from_binary(self, p)
10153 
10154  def __getstate__(self):
10155  p = self._get_as_binary()
10156  if len(self.__dict__) > 1:
10157  d = self.__dict__.copy()
10158  del d['this']
10159  p = (d, p)
10160  return p
10161 
10162  def __setstate__(self, p):
10163  if not hasattr(self, 'this'):
10164  self.__init__()
10165  if isinstance(p, tuple):
10166  d, p = p
10167  self.__dict__.update(d)
10168  return self._set_from_binary(p)
10169 
10170 
10171  def _get_jax(self, m, indexes, space):
10172  import jax.numpy as jnp
10173  def jax_score(jm, uf):
10174  xyzs = jm['xyz'][indexes]
10175  rs = jm['r'][indexes]
10176  diff = xyzs[:,0] - xyzs[:,1]
10177  drs = space.distance(diff) - rs.sum(axis=-1)
10178  return uf(drs)
10179  sfnc = self.get_score_functor()
10180  uf = sfnc.get_unary_function().get_derived_object()
10181  f = functools.partial(jax_score, uf=uf._get_jax())
10182  return self._wrap_jax(m, f)
10183 
10184 
10185 # Register _SphereDistancePairScore in _IMP_core:
10186 _IMP_core._SphereDistancePairScore_swigregister(_SphereDistancePairScore)
10187 class HarmonicUpperBoundSphereDistancePairScore(IMP.PairScore):
10188  r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDistancePairScore class."""
10189 
10190  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10191 
10192  def __init__(self, *args):
10193  r"""
10194  __init__(HarmonicUpperBoundSphereDistancePairScore self, double x0, double k, std::string name="HarmonicUpperBoundSphereDistancePairScore%1%") -> HarmonicUpperBoundSphereDistancePairScore
10195  __init__(HarmonicUpperBoundSphereDistancePairScore self) -> HarmonicUpperBoundSphereDistancePairScore
10196  """
10197  _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDistancePairScore(*args))
10198 
10199  def do_get_inputs(self, m, pis):
10200  r"""do_get_inputs(HarmonicUpperBoundSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10201  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_do_get_inputs(self, m, pis)
10202 
10203  def get_score_functor(self, *args):
10204  r"""
10205  get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore
10206  get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore const &
10207  """
10208  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_score_functor(self, *args)
10209 
10210  def get_x0(self):
10211  r"""get_x0(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10212  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_x0(self)
10213 
10214  def get_k(self):
10215  r"""get_k(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10216  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_k(self)
10217 
10218  def get_version_info(self):
10219  r"""get_version_info(HarmonicUpperBoundSphereDistancePairScore self) -> VersionInfo"""
10220  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_version_info(self)
10221  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDistancePairScore
10222 
10223  def __str__(self):
10224  r"""__str__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10225  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___str__(self)
10226 
10227  def __repr__(self):
10228  r"""__repr__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10229  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___repr__(self)
10230 
10231  @staticmethod
10232  def get_from(o):
10233  return _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
10234 
10235 
10236  def _get_as_binary(self):
10237  r"""_get_as_binary(HarmonicUpperBoundSphereDistancePairScore self) -> PyObject *"""
10238  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__get_as_binary(self)
10239 
10240  def _set_from_binary(self, p):
10241  r"""_set_from_binary(HarmonicUpperBoundSphereDistancePairScore self, PyObject * p)"""
10242  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__set_from_binary(self, p)
10243 
10244  def __getstate__(self):
10245  p = self._get_as_binary()
10246  if len(self.__dict__) > 1:
10247  d = self.__dict__.copy()
10248  del d['this']
10249  p = (d, p)
10250  return p
10251 
10252  def __setstate__(self, p):
10253  if not hasattr(self, 'this'):
10254  self.__init__()
10255  if isinstance(p, tuple):
10256  d, p = p
10257  self.__dict__.update(d)
10258  return self._set_from_binary(p)
10259 
10260 
10261  def _get_jax(self, m, indexes, space):
10262  import jax.numpy as jnp
10263  import jax.lax
10264  def jax_score(jm, d, k):
10265  xyzs = jm['xyz'][indexes]
10266  rs = jm['r'][indexes]
10267  diff = xyzs[:,0] - xyzs[:,1]
10268  drs = space.distance(diff) - rs.sum(axis=-1)
10269  return 0.5 * k * jax.lax.min(d - drs, 0.0) ** 2
10270  f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10271  return self._wrap_jax(m, f)
10272 
10273 
10274 # Register HarmonicUpperBoundSphereDistancePairScore in _IMP_core:
10275 _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swigregister(HarmonicUpperBoundSphereDistancePairScore)
10276 class HarmonicUpperBoundSphereDiameterPairScore(IMP.PairScore):
10277  r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDiameterPairScore class."""
10278 
10279  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10280 
10281  def __init__(self, d0, k):
10282  r"""__init__(HarmonicUpperBoundSphereDiameterPairScore self, double d0, double k) -> HarmonicUpperBoundSphereDiameterPairScore"""
10283  _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDiameterPairScore(d0, k))
10284 
10285  def get_rest_length(self):
10286  r"""get_rest_length(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10287  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_rest_length(self)
10288 
10289  def get_stiffness(self):
10290  r"""get_stiffness(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10291  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_stiffness(self)
10292 
10293  def do_get_inputs(self, m, pis):
10294  r"""do_get_inputs(HarmonicUpperBoundSphereDiameterPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10295  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_do_get_inputs(self, m, pis)
10296 
10297  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10298  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"""
10299  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10300 
10301  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10302  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"""
10303  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10304 
10305  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10306  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"""
10307  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10308 
10309  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10310  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"""
10311  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10312 
10313  def get_version_info(self):
10314  r"""get_version_info(HarmonicUpperBoundSphereDiameterPairScore self) -> VersionInfo"""
10315  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_version_info(self)
10316  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDiameterPairScore
10317 
10318  def __str__(self):
10319  r"""__str__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10320  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___str__(self)
10321 
10322  def __repr__(self):
10323  r"""__repr__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10324  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___repr__(self)
10325 
10326  @staticmethod
10327  def get_from(o):
10328  return _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
10329 
10330 
10331 # Register HarmonicUpperBoundSphereDiameterPairScore in _IMP_core:
10332 _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swigregister(HarmonicUpperBoundSphereDiameterPairScore)
10333 class HarmonicSphereDistancePairScore(IMP.PairScore):
10334  r"""Proxy of C++ IMP::core::HarmonicSphereDistancePairScore class."""
10335 
10336  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10337 
10338  def __init__(self, *args):
10339  r"""
10340  __init__(HarmonicSphereDistancePairScore self, double x0, double k, std::string name="HarmonicSphereDistancePairScore%1%") -> HarmonicSphereDistancePairScore
10341  __init__(HarmonicSphereDistancePairScore self) -> HarmonicSphereDistancePairScore
10342  """
10343  _IMP_core.HarmonicSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSphereDistancePairScore(*args))
10344 
10345  def do_get_inputs(self, m, pis):
10346  r"""do_get_inputs(HarmonicSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10347  return _IMP_core.HarmonicSphereDistancePairScore_do_get_inputs(self, m, pis)
10348 
10349  def get_score_functor(self, *args):
10350  r"""
10351  get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore
10352  get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore const &
10353  """
10354  return _IMP_core.HarmonicSphereDistancePairScore_get_score_functor(self, *args)
10355 
10356  def get_x0(self):
10357  r"""get_x0(HarmonicSphereDistancePairScore self) -> double"""
10358  return _IMP_core.HarmonicSphereDistancePairScore_get_x0(self)
10359 
10360  def get_k(self):
10361  r"""get_k(HarmonicSphereDistancePairScore self) -> double"""
10362  return _IMP_core.HarmonicSphereDistancePairScore_get_k(self)
10363 
10364  def get_version_info(self):
10365  r"""get_version_info(HarmonicSphereDistancePairScore self) -> VersionInfo"""
10366  return _IMP_core.HarmonicSphereDistancePairScore_get_version_info(self)
10367  __swig_destroy__ = _IMP_core.delete_HarmonicSphereDistancePairScore
10368 
10369  def __str__(self):
10370  r"""__str__(HarmonicSphereDistancePairScore self) -> std::string"""
10371  return _IMP_core.HarmonicSphereDistancePairScore___str__(self)
10372 
10373  def __repr__(self):
10374  r"""__repr__(HarmonicSphereDistancePairScore self) -> std::string"""
10375  return _IMP_core.HarmonicSphereDistancePairScore___repr__(self)
10376 
10377  @staticmethod
10378  def get_from(o):
10379  return _object_cast_to_HarmonicSphereDistancePairScore(o)
10380 
10381 
10382  def _get_as_binary(self):
10383  r"""_get_as_binary(HarmonicSphereDistancePairScore self) -> PyObject *"""
10384  return _IMP_core.HarmonicSphereDistancePairScore__get_as_binary(self)
10385 
10386  def _set_from_binary(self, p):
10387  r"""_set_from_binary(HarmonicSphereDistancePairScore self, PyObject * p)"""
10388  return _IMP_core.HarmonicSphereDistancePairScore__set_from_binary(self, p)
10389 
10390  def __getstate__(self):
10391  p = self._get_as_binary()
10392  if len(self.__dict__) > 1:
10393  d = self.__dict__.copy()
10394  del d['this']
10395  p = (d, p)
10396  return p
10397 
10398  def __setstate__(self, p):
10399  if not hasattr(self, 'this'):
10400  self.__init__()
10401  if isinstance(p, tuple):
10402  d, p = p
10403  self.__dict__.update(d)
10404  return self._set_from_binary(p)
10405 
10406 
10407  def _get_jax(self, m, indexes, space):
10408  import jax.numpy as jnp
10409  def jax_score(jm, d, k):
10410  xyzs = jm['xyz'][indexes]
10411  rs = jm['r'][indexes]
10412  diff = xyzs[:,0] - xyzs[:,1]
10413  drs = space.distance(diff) - rs.sum(axis=-1)
10414  return 0.5 * k * (d - drs)**2
10415  f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10416  return self._wrap_jax(m, f)
10417 
10418 
10419 # Register HarmonicSphereDistancePairScore in _IMP_core:
10420 _IMP_core.HarmonicSphereDistancePairScore_swigregister(HarmonicSphereDistancePairScore)
10421 class NormalizedSphereDistancePairScore(IMP.PairScore):
10422  r"""Proxy of C++ IMP::core::NormalizedSphereDistancePairScore class."""
10423 
10424  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10425 
10426  def __init__(self, *args):
10427  r"""__init__(NormalizedSphereDistancePairScore self, UnaryFunction f, FloatKey radius=IMP::FloatKey("radius")) -> NormalizedSphereDistancePairScore"""
10428  _IMP_core.NormalizedSphereDistancePairScore_swiginit(self, _IMP_core.new_NormalizedSphereDistancePairScore(*args))
10429 
10430  def do_get_inputs(self, m, pis):
10431  r"""do_get_inputs(NormalizedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10432  return _IMP_core.NormalizedSphereDistancePairScore_do_get_inputs(self, m, pis)
10433 
10434  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10435  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"""
10436  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10437 
10438  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10439  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"""
10440  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10441 
10442  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10443  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"""
10444  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10445 
10446  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10447  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"""
10448  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10449 
10450  def get_version_info(self):
10451  r"""get_version_info(NormalizedSphereDistancePairScore self) -> VersionInfo"""
10452  return _IMP_core.NormalizedSphereDistancePairScore_get_version_info(self)
10453  __swig_destroy__ = _IMP_core.delete_NormalizedSphereDistancePairScore
10454 
10455  def __str__(self):
10456  r"""__str__(NormalizedSphereDistancePairScore self) -> std::string"""
10457  return _IMP_core.NormalizedSphereDistancePairScore___str__(self)
10458 
10459  def __repr__(self):
10460  r"""__repr__(NormalizedSphereDistancePairScore self) -> std::string"""
10461  return _IMP_core.NormalizedSphereDistancePairScore___repr__(self)
10462 
10463  @staticmethod
10464  def get_from(o):
10465  return _object_cast_to_NormalizedSphereDistancePairScore(o)
10466 
10467 
10468 # Register NormalizedSphereDistancePairScore in _IMP_core:
10469 _IMP_core.NormalizedSphereDistancePairScore_swigregister(NormalizedSphereDistancePairScore)
10470 class WeightedSphereDistancePairScore(IMP.PairScore):
10471  r"""Proxy of C++ IMP::core::WeightedSphereDistancePairScore class."""
10472 
10473  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10474 
10475  def __init__(self, *args):
10476  r"""__init__(WeightedSphereDistancePairScore self, UnaryFunction f, FloatKey weight, FloatKey radius=IMP::FloatKey("radius")) -> WeightedSphereDistancePairScore"""
10477  _IMP_core.WeightedSphereDistancePairScore_swiginit(self, _IMP_core.new_WeightedSphereDistancePairScore(*args))
10478 
10479  def do_get_inputs(self, m, pis):
10480  r"""do_get_inputs(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10481  return _IMP_core.WeightedSphereDistancePairScore_do_get_inputs(self, m, pis)
10482 
10483  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10484  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"""
10485  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10486 
10487  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10488  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"""
10489  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10490 
10491  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10492  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"""
10493  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10494 
10495  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10496  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"""
10497  return _IMP_core.WeightedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10498 
10499  def get_version_info(self):
10500  r"""get_version_info(WeightedSphereDistancePairScore self) -> VersionInfo"""
10501  return _IMP_core.WeightedSphereDistancePairScore_get_version_info(self)
10502  __swig_destroy__ = _IMP_core.delete_WeightedSphereDistancePairScore
10503 
10504  def __str__(self):
10505  r"""__str__(WeightedSphereDistancePairScore self) -> std::string"""
10506  return _IMP_core.WeightedSphereDistancePairScore___str__(self)
10507 
10508  def __repr__(self):
10509  r"""__repr__(WeightedSphereDistancePairScore self) -> std::string"""
10510  return _IMP_core.WeightedSphereDistancePairScore___repr__(self)
10511 
10512  @staticmethod
10513  def get_from(o):
10514  return _object_cast_to_WeightedSphereDistancePairScore(o)
10515 
10516 
10517 # Register WeightedSphereDistancePairScore in _IMP_core:
10518 _IMP_core.WeightedSphereDistancePairScore_swigregister(WeightedSphereDistancePairScore)
10519 class SoftSpherePairScore(IMP.PairScore):
10520  r"""Proxy of C++ IMP::core::SoftSpherePairScore class."""
10521 
10522  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10523 
10524  def __init__(self, *args):
10525  r"""
10526  __init__(SoftSpherePairScore self, double k, std::string name="SoftSpherePairScore%1%") -> SoftSpherePairScore
10527  __init__(SoftSpherePairScore self) -> SoftSpherePairScore
10528  """
10529  _IMP_core.SoftSpherePairScore_swiginit(self, _IMP_core.new_SoftSpherePairScore(*args))
10530 
10531  def do_get_inputs(self, m, pis):
10532  r"""do_get_inputs(SoftSpherePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10533  return _IMP_core.SoftSpherePairScore_do_get_inputs(self, m, pis)
10534 
10535  def get_score_functor(self, *args):
10536  r"""
10537  get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore
10538  get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore const &
10539  """
10540  return _IMP_core.SoftSpherePairScore_get_score_functor(self, *args)
10541 
10542  def get_k(self):
10543  r"""get_k(SoftSpherePairScore self) -> double"""
10544  return _IMP_core.SoftSpherePairScore_get_k(self)
10545 
10546  def get_version_info(self):
10547  r"""get_version_info(SoftSpherePairScore self) -> VersionInfo"""
10548  return _IMP_core.SoftSpherePairScore_get_version_info(self)
10549  __swig_destroy__ = _IMP_core.delete_SoftSpherePairScore
10550 
10551  def __str__(self):
10552  r"""__str__(SoftSpherePairScore self) -> std::string"""
10553  return _IMP_core.SoftSpherePairScore___str__(self)
10554 
10555  def __repr__(self):
10556  r"""__repr__(SoftSpherePairScore self) -> std::string"""
10557  return _IMP_core.SoftSpherePairScore___repr__(self)
10558 
10559  @staticmethod
10560  def get_from(o):
10561  return _object_cast_to_SoftSpherePairScore(o)
10562 
10563 
10564  def _get_as_binary(self):
10565  r"""_get_as_binary(SoftSpherePairScore self) -> PyObject *"""
10566  return _IMP_core.SoftSpherePairScore__get_as_binary(self)
10567 
10568  def _set_from_binary(self, p):
10569  r"""_set_from_binary(SoftSpherePairScore self, PyObject * p)"""
10570  return _IMP_core.SoftSpherePairScore__set_from_binary(self, p)
10571 
10572  def __getstate__(self):
10573  p = self._get_as_binary()
10574  if len(self.__dict__) > 1:
10575  d = self.__dict__.copy()
10576  del d['this']
10577  p = (d, p)
10578  return p
10579 
10580  def __setstate__(self, p):
10581  if not hasattr(self, 'this'):
10582  self.__init__()
10583  if isinstance(p, tuple):
10584  d, p = p
10585  self.__dict__.update(d)
10586  return self._set_from_binary(p)
10587 
10588 
10589  def _get_jax(self, m, indexes, space):
10590  import jax.numpy as jnp
10591  import jax.lax
10592  def jax_score(jm, k):
10593  xyzs = jm['xyz'][indexes]
10594  rs = jm['r'][indexes]
10595  diff = xyzs[:,0] - xyzs[:,1]
10596  drs = space.distance(diff) - rs.sum(axis=-1)
10597  return 0.5 * k * jax.lax.min(drs, 0.0) ** 2
10598  f = functools.partial(jax_score, k=self.get_k())
10599  return self._wrap_jax(m, f)
10600 
10601 
10602 # Register SoftSpherePairScore in _IMP_core:
10603 _IMP_core.SoftSpherePairScore_swigregister(SoftSpherePairScore)
10604 class SurfaceDistancePairScore(IMP.PairScore):
10605  r"""Proxy of C++ IMP::core::SurfaceDistancePairScore class."""
10606 
10607  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10608 
10609  def __init__(self, *args):
10610  r"""__init__(SurfaceDistancePairScore self, UnaryFunction uf, std::string name="SurfaceDistancePairScore%1%") -> SurfaceDistancePairScore"""
10611  _IMP_core.SurfaceDistancePairScore_swiginit(self, _IMP_core.new_SurfaceDistancePairScore(*args))
10612 
10613  def do_get_inputs(self, m, pis):
10614  r"""do_get_inputs(SurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10615  return _IMP_core.SurfaceDistancePairScore_do_get_inputs(self, m, pis)
10616 
10617  def get_version_info(self):
10618  r"""get_version_info(SurfaceDistancePairScore self) -> VersionInfo"""
10619  return _IMP_core.SurfaceDistancePairScore_get_version_info(self)
10620  __swig_destroy__ = _IMP_core.delete_SurfaceDistancePairScore
10621 
10622  def __str__(self):
10623  r"""__str__(SurfaceDistancePairScore self) -> std::string"""
10624  return _IMP_core.SurfaceDistancePairScore___str__(self)
10625 
10626  def __repr__(self):
10627  r"""__repr__(SurfaceDistancePairScore self) -> std::string"""
10628  return _IMP_core.SurfaceDistancePairScore___repr__(self)
10629 
10630  @staticmethod
10631  def get_from(o):
10632  return _object_cast_to_SurfaceDistancePairScore(o)
10633 
10634 
10635 # Register SurfaceDistancePairScore in _IMP_core:
10636 _IMP_core.SurfaceDistancePairScore_swigregister(SurfaceDistancePairScore)
10637 class SurfaceHeightPairScore(IMP.PairScore):
10638  r"""Proxy of C++ IMP::core::SurfaceHeightPairScore class."""
10639 
10640  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10641 
10642  def __init__(self, *args):
10643  r"""__init__(SurfaceHeightPairScore self, UnaryFunction uf, std::string name="SurfaceHeightPairScore%1%") -> SurfaceHeightPairScore"""
10644  _IMP_core.SurfaceHeightPairScore_swiginit(self, _IMP_core.new_SurfaceHeightPairScore(*args))
10645 
10646  def do_get_inputs(self, m, pis):
10647  r"""do_get_inputs(SurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10648  return _IMP_core.SurfaceHeightPairScore_do_get_inputs(self, m, pis)
10649 
10650  def get_version_info(self):
10651  r"""get_version_info(SurfaceHeightPairScore self) -> VersionInfo"""
10652  return _IMP_core.SurfaceHeightPairScore_get_version_info(self)
10653  __swig_destroy__ = _IMP_core.delete_SurfaceHeightPairScore
10654 
10655  def __str__(self):
10656  r"""__str__(SurfaceHeightPairScore self) -> std::string"""
10657  return _IMP_core.SurfaceHeightPairScore___str__(self)
10658 
10659  def __repr__(self):
10660  r"""__repr__(SurfaceHeightPairScore self) -> std::string"""
10661  return _IMP_core.SurfaceHeightPairScore___repr__(self)
10662 
10663  @staticmethod
10664  def get_from(o):
10665  return _object_cast_to_SurfaceHeightPairScore(o)
10666 
10667 
10668 # Register SurfaceHeightPairScore in _IMP_core:
10669 _IMP_core.SurfaceHeightPairScore_swigregister(SurfaceHeightPairScore)
10670 class SurfaceDepthPairScore(IMP.PairScore):
10671  r"""Proxy of C++ IMP::core::SurfaceDepthPairScore class."""
10672 
10673  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10674 
10675  def __init__(self, *args):
10676  r"""__init__(SurfaceDepthPairScore self, UnaryFunction uf, std::string name="SurfaceDepthPairScore%1%") -> SurfaceDepthPairScore"""
10677  _IMP_core.SurfaceDepthPairScore_swiginit(self, _IMP_core.new_SurfaceDepthPairScore(*args))
10678 
10679  def do_get_inputs(self, m, pis):
10680  r"""do_get_inputs(SurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10681  return _IMP_core.SurfaceDepthPairScore_do_get_inputs(self, m, pis)
10682 
10683  def get_version_info(self):
10684  r"""get_version_info(SurfaceDepthPairScore self) -> VersionInfo"""
10685  return _IMP_core.SurfaceDepthPairScore_get_version_info(self)
10686  __swig_destroy__ = _IMP_core.delete_SurfaceDepthPairScore
10687 
10688  def __str__(self):
10689  r"""__str__(SurfaceDepthPairScore self) -> std::string"""
10690  return _IMP_core.SurfaceDepthPairScore___str__(self)
10691 
10692  def __repr__(self):
10693  r"""__repr__(SurfaceDepthPairScore self) -> std::string"""
10694  return _IMP_core.SurfaceDepthPairScore___repr__(self)
10695 
10696  @staticmethod
10697  def get_from(o):
10698  return _object_cast_to_SurfaceDepthPairScore(o)
10699 
10700 
10701 # Register SurfaceDepthPairScore in _IMP_core:
10702 _IMP_core.SurfaceDepthPairScore_swigregister(SurfaceDepthPairScore)
10703 class HarmonicSurfaceDistancePairScore(IMP.PairScore):
10704  r"""Proxy of C++ IMP::core::HarmonicSurfaceDistancePairScore class."""
10705 
10706  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10707 
10708  def __init__(self, *args):
10709  r"""__init__(HarmonicSurfaceDistancePairScore self, double x0, double k, std::string name="HarmonicSurfaceDistancePairScore%1%") -> HarmonicSurfaceDistancePairScore"""
10710  _IMP_core.HarmonicSurfaceDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDistancePairScore(*args))
10711 
10712  def do_get_inputs(self, m, pis):
10713  r"""do_get_inputs(HarmonicSurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10714  return _IMP_core.HarmonicSurfaceDistancePairScore_do_get_inputs(self, m, pis)
10715 
10716  def get_version_info(self):
10717  r"""get_version_info(HarmonicSurfaceDistancePairScore self) -> VersionInfo"""
10718  return _IMP_core.HarmonicSurfaceDistancePairScore_get_version_info(self)
10719  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDistancePairScore
10720 
10721  def __str__(self):
10722  r"""__str__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10723  return _IMP_core.HarmonicSurfaceDistancePairScore___str__(self)
10724 
10725  def __repr__(self):
10726  r"""__repr__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10727  return _IMP_core.HarmonicSurfaceDistancePairScore___repr__(self)
10728 
10729  @staticmethod
10730  def get_from(o):
10731  return _object_cast_to_HarmonicSurfaceDistancePairScore(o)
10732 
10733 
10734 # Register HarmonicSurfaceDistancePairScore in _IMP_core:
10735 _IMP_core.HarmonicSurfaceDistancePairScore_swigregister(HarmonicSurfaceDistancePairScore)
10736 class HarmonicSurfaceHeightPairScore(IMP.PairScore):
10737  r"""Proxy of C++ IMP::core::HarmonicSurfaceHeightPairScore class."""
10738 
10739  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10740 
10741  def __init__(self, *args):
10742  r"""__init__(HarmonicSurfaceHeightPairScore self, double x0, double k, std::string name="HarmonicSurfaceHeightPairScore%1%") -> HarmonicSurfaceHeightPairScore"""
10743  _IMP_core.HarmonicSurfaceHeightPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceHeightPairScore(*args))
10744 
10745  def do_get_inputs(self, m, pis):
10746  r"""do_get_inputs(HarmonicSurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10747  return _IMP_core.HarmonicSurfaceHeightPairScore_do_get_inputs(self, m, pis)
10748 
10749  def get_version_info(self):
10750  r"""get_version_info(HarmonicSurfaceHeightPairScore self) -> VersionInfo"""
10751  return _IMP_core.HarmonicSurfaceHeightPairScore_get_version_info(self)
10752  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceHeightPairScore
10753 
10754  def __str__(self):
10755  r"""__str__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10756  return _IMP_core.HarmonicSurfaceHeightPairScore___str__(self)
10757 
10758  def __repr__(self):
10759  r"""__repr__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10760  return _IMP_core.HarmonicSurfaceHeightPairScore___repr__(self)
10761 
10762  @staticmethod
10763  def get_from(o):
10764  return _object_cast_to_HarmonicSurfaceHeightPairScore(o)
10765 
10766 
10767 # Register HarmonicSurfaceHeightPairScore in _IMP_core:
10768 _IMP_core.HarmonicSurfaceHeightPairScore_swigregister(HarmonicSurfaceHeightPairScore)
10769 class HarmonicSurfaceDepthPairScore(IMP.PairScore):
10770  r"""Proxy of C++ IMP::core::HarmonicSurfaceDepthPairScore class."""
10771 
10772  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10773 
10774  def __init__(self, *args):
10775  r"""__init__(HarmonicSurfaceDepthPairScore self, double x0, double k, std::string name="HarmonicSurfaceDepthPairScore%1%") -> HarmonicSurfaceDepthPairScore"""
10776  _IMP_core.HarmonicSurfaceDepthPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDepthPairScore(*args))
10777 
10778  def do_get_inputs(self, m, pis):
10779  r"""do_get_inputs(HarmonicSurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10780  return _IMP_core.HarmonicSurfaceDepthPairScore_do_get_inputs(self, m, pis)
10781 
10782  def get_version_info(self):
10783  r"""get_version_info(HarmonicSurfaceDepthPairScore self) -> VersionInfo"""
10784  return _IMP_core.HarmonicSurfaceDepthPairScore_get_version_info(self)
10785  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDepthPairScore
10786 
10787  def __str__(self):
10788  r"""__str__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10789  return _IMP_core.HarmonicSurfaceDepthPairScore___str__(self)
10790 
10791  def __repr__(self):
10792  r"""__repr__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10793  return _IMP_core.HarmonicSurfaceDepthPairScore___repr__(self)
10794 
10795  @staticmethod
10796  def get_from(o):
10797  return _object_cast_to_HarmonicSurfaceDepthPairScore(o)
10798 
10799 
10800 # Register HarmonicSurfaceDepthPairScore in _IMP_core:
10801 _IMP_core.HarmonicSurfaceDepthPairScore_swigregister(HarmonicSurfaceDepthPairScore)
10802 class SoftSuperSurfacePairScore(IMP.PairScore):
10803  r"""Proxy of C++ IMP::core::SoftSuperSurfacePairScore class."""
10804 
10805  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10806 
10807  def __init__(self, *args):
10808  r"""__init__(SoftSuperSurfacePairScore self, double k, std::string name="SoftSuperSurfacePairScore%1%") -> SoftSuperSurfacePairScore"""
10809  _IMP_core.SoftSuperSurfacePairScore_swiginit(self, _IMP_core.new_SoftSuperSurfacePairScore(*args))
10810 
10811  def do_get_inputs(self, m, pis):
10812  r"""do_get_inputs(SoftSuperSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10813  return _IMP_core.SoftSuperSurfacePairScore_do_get_inputs(self, m, pis)
10814 
10815  def get_version_info(self):
10816  r"""get_version_info(SoftSuperSurfacePairScore self) -> VersionInfo"""
10817  return _IMP_core.SoftSuperSurfacePairScore_get_version_info(self)
10818  __swig_destroy__ = _IMP_core.delete_SoftSuperSurfacePairScore
10819 
10820  def __str__(self):
10821  r"""__str__(SoftSuperSurfacePairScore self) -> std::string"""
10822  return _IMP_core.SoftSuperSurfacePairScore___str__(self)
10823 
10824  def __repr__(self):
10825  r"""__repr__(SoftSuperSurfacePairScore self) -> std::string"""
10826  return _IMP_core.SoftSuperSurfacePairScore___repr__(self)
10827 
10828  @staticmethod
10829  def get_from(o):
10830  return _object_cast_to_SoftSuperSurfacePairScore(o)
10831 
10832 
10833 # Register SoftSuperSurfacePairScore in _IMP_core:
10834 _IMP_core.SoftSuperSurfacePairScore_swigregister(SoftSuperSurfacePairScore)
10835 class SoftSubSurfacePairScore(IMP.PairScore):
10836  r"""Proxy of C++ IMP::core::SoftSubSurfacePairScore class."""
10837 
10838  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10839 
10840  def __init__(self, *args):
10841  r"""__init__(SoftSubSurfacePairScore self, double k, std::string name="SoftSubSurfacePairScore%1%") -> SoftSubSurfacePairScore"""
10842  _IMP_core.SoftSubSurfacePairScore_swiginit(self, _IMP_core.new_SoftSubSurfacePairScore(*args))
10843 
10844  def do_get_inputs(self, m, pis):
10845  r"""do_get_inputs(SoftSubSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10846  return _IMP_core.SoftSubSurfacePairScore_do_get_inputs(self, m, pis)
10847 
10848  def get_version_info(self):
10849  r"""get_version_info(SoftSubSurfacePairScore self) -> VersionInfo"""
10850  return _IMP_core.SoftSubSurfacePairScore_get_version_info(self)
10851  __swig_destroy__ = _IMP_core.delete_SoftSubSurfacePairScore
10852 
10853  def __str__(self):
10854  r"""__str__(SoftSubSurfacePairScore self) -> std::string"""
10855  return _IMP_core.SoftSubSurfacePairScore___str__(self)
10856 
10857  def __repr__(self):
10858  r"""__repr__(SoftSubSurfacePairScore self) -> std::string"""
10859  return _IMP_core.SoftSubSurfacePairScore___repr__(self)
10860 
10861  @staticmethod
10862  def get_from(o):
10863  return _object_cast_to_SoftSubSurfacePairScore(o)
10864 
10865 
10866 # Register SoftSubSurfacePairScore in _IMP_core:
10867 _IMP_core.SoftSubSurfacePairScore_swigregister(SoftSubSurfacePairScore)
10868 class SurfaceTetheredChain(IMP.UnaryFunction):
10869  r"""Proxy of C++ IMP::core::SurfaceTetheredChain class."""
10870 
10871  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10872 
10873  def __init__(self, link_num, link_length):
10874  r"""__init__(SurfaceTetheredChain self, int link_num, double link_length) -> SurfaceTetheredChain"""
10875  _IMP_core.SurfaceTetheredChain_swiginit(self, _IMP_core.new_SurfaceTetheredChain(link_num, link_length))
10876 
10877  def get_version_info(self):
10878  r"""get_version_info(SurfaceTetheredChain self) -> VersionInfo"""
10879  return _IMP_core.SurfaceTetheredChain_get_version_info(self)
10880  __swig_destroy__ = _IMP_core.delete_SurfaceTetheredChain
10881 
10882  def get_link_number(self):
10883  r"""get_link_number(SurfaceTetheredChain self) -> int"""
10884  return _IMP_core.SurfaceTetheredChain_get_link_number(self)
10885 
10886  def get_link_length(self):
10887  r"""get_link_length(SurfaceTetheredChain self) -> double"""
10888  return _IMP_core.SurfaceTetheredChain_get_link_length(self)
10889 
10890  def set_link_number(self, N):
10891  r"""set_link_number(SurfaceTetheredChain self, int N)"""
10892  return _IMP_core.SurfaceTetheredChain_set_link_number(self, N)
10893 
10894  def set_link_length(self, b):
10895  r"""set_link_length(SurfaceTetheredChain self, double b)"""
10896  return _IMP_core.SurfaceTetheredChain_set_link_length(self, b)
10897 
10898  def get_distance_at_minimum(self):
10899  r"""get_distance_at_minimum(SurfaceTetheredChain self) -> double"""
10900  return _IMP_core.SurfaceTetheredChain_get_distance_at_minimum(self)
10901 
10902  def get_average_distance(self):
10903  r"""get_average_distance(SurfaceTetheredChain self) -> double"""
10904  return _IMP_core.SurfaceTetheredChain_get_average_distance(self)
10905 
10906  def __str__(self):
10907  r"""__str__(SurfaceTetheredChain self) -> std::string"""
10908  return _IMP_core.SurfaceTetheredChain___str__(self)
10909 
10910  def __repr__(self):
10911  r"""__repr__(SurfaceTetheredChain self) -> std::string"""
10912  return _IMP_core.SurfaceTetheredChain___repr__(self)
10913 
10914  @staticmethod
10915  def get_from(o):
10916  return _object_cast_to_SurfaceTetheredChain(o)
10917 
10918 
10919 # Register SurfaceTetheredChain in _IMP_core:
10920 _IMP_core.SurfaceTetheredChain_swigregister(SurfaceTetheredChain)
10921 class SurfaceSymmetryConstraint(IMP.Constraint):
10922  r"""Proxy of C++ IMP::core::SurfaceSymmetryConstraint class."""
10923 
10924  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10925 
10926  def __init__(self, m, ss, rbs):
10927  r"""__init__(SurfaceSymmetryConstraint self, Model m, IMP::ParticleIndexPair const & ss, IMP::ParticleIndexPair const & rbs) -> SurfaceSymmetryConstraint"""
10928  _IMP_core.SurfaceSymmetryConstraint_swiginit(self, _IMP_core.new_SurfaceSymmetryConstraint(m, ss, rbs))
10929 
10930  def do_get_inputs(self):
10931  r"""do_get_inputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
10932  return _IMP_core.SurfaceSymmetryConstraint_do_get_inputs(self)
10933 
10934  def do_get_outputs(self):
10935  r"""do_get_outputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
10936  return _IMP_core.SurfaceSymmetryConstraint_do_get_outputs(self)
10937 
10938  def get_version_info(self):
10939  r"""get_version_info(SurfaceSymmetryConstraint self) -> VersionInfo"""
10940  return _IMP_core.SurfaceSymmetryConstraint_get_version_info(self)
10941  __swig_destroy__ = _IMP_core.delete_SurfaceSymmetryConstraint
10942 
10943  def __str__(self):
10944  r"""__str__(SurfaceSymmetryConstraint self) -> std::string"""
10945  return _IMP_core.SurfaceSymmetryConstraint___str__(self)
10946 
10947  def __repr__(self):
10948  r"""__repr__(SurfaceSymmetryConstraint self) -> std::string"""
10949  return _IMP_core.SurfaceSymmetryConstraint___repr__(self)
10950 
10951  @staticmethod
10952  def get_from(o):
10953  return _object_cast_to_SurfaceSymmetryConstraint(o)
10954 
10955 
10956 # Register SurfaceSymmetryConstraint in _IMP_core:
10957 _IMP_core.SurfaceSymmetryConstraint_swigregister(SurfaceSymmetryConstraint)
10958 class SteepestDescent(IMP.AttributeOptimizer):
10959  r"""Proxy of C++ IMP::core::SteepestDescent class."""
10960 
10961  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10962 
10963  def __init__(self, *args):
10964  r"""__init__(SteepestDescent self, Model m, std::string name="SteepestDescent%1%") -> SteepestDescent"""
10965  _IMP_core.SteepestDescent_swiginit(self, _IMP_core.new_SteepestDescent(*args))
10966 
10967  def do_optimize(self, max_steps):
10968  r"""do_optimize(SteepestDescent self, unsigned int max_steps) -> IMP::Float"""
10969  return _IMP_core.SteepestDescent_do_optimize(self, max_steps)
10970 
10971  def get_version_info(self):
10972  r"""get_version_info(SteepestDescent self) -> VersionInfo"""
10973  return _IMP_core.SteepestDescent_get_version_info(self)
10974  __swig_destroy__ = _IMP_core.delete_SteepestDescent
10975 
10976  def set_threshold(self, t):
10977  r"""set_threshold(SteepestDescent self, IMP::Float t)"""
10978  return _IMP_core.SteepestDescent_set_threshold(self, t)
10979 
10980  def set_step_size(self, t):
10981  r"""set_step_size(SteepestDescent self, IMP::Float t)"""
10982  return _IMP_core.SteepestDescent_set_step_size(self, t)
10983 
10984  def set_maximum_step_size(self, t):
10985  r"""set_maximum_step_size(SteepestDescent self, IMP::Float t)"""
10986  return _IMP_core.SteepestDescent_set_maximum_step_size(self, t)
10987 
10988  def __str__(self):
10989  r"""__str__(SteepestDescent self) -> std::string"""
10990  return _IMP_core.SteepestDescent___str__(self)
10991 
10992  def __repr__(self):
10993  r"""__repr__(SteepestDescent self) -> std::string"""
10994  return _IMP_core.SteepestDescent___repr__(self)
10995 
10996  @staticmethod
10997  def get_from(o):
10998  return _object_cast_to_SteepestDescent(o)
10999 
11000 
11001 # Register SteepestDescent in _IMP_core:
11002 _IMP_core.SteepestDescent_swigregister(SteepestDescent)
11003 class TransformedDistancePairScore(IMP.PairScore):
11004  r"""Proxy of C++ IMP::core::TransformedDistancePairScore class."""
11005 
11006  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11007 
11008  def __init__(self, f, transformation):
11009  r"""__init__(TransformedDistancePairScore self, UnaryFunction f, Transformation3D transformation) -> TransformedDistancePairScore"""
11010  _IMP_core.TransformedDistancePairScore_swiginit(self, _IMP_core.new_TransformedDistancePairScore(f, transformation))
11011 
11012  def set_transformation(self, rot):
11013  r"""set_transformation(TransformedDistancePairScore self, Transformation3D rot)"""
11014  return _IMP_core.TransformedDistancePairScore_set_transformation(self, rot)
11015 
11016  def do_get_inputs(self, m, pis):
11017  r"""do_get_inputs(TransformedDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11018  return _IMP_core.TransformedDistancePairScore_do_get_inputs(self, m, pis)
11019 
11020  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11021  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"""
11022  return _IMP_core.TransformedDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11023 
11024  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11025  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"""
11026  return _IMP_core.TransformedDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11027 
11028  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11029  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"""
11030  return _IMP_core.TransformedDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11031 
11032  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11033  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"""
11034  return _IMP_core.TransformedDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11035 
11036  def get_version_info(self):
11037  r"""get_version_info(TransformedDistancePairScore self) -> VersionInfo"""
11038  return _IMP_core.TransformedDistancePairScore_get_version_info(self)
11039  __swig_destroy__ = _IMP_core.delete_TransformedDistancePairScore
11040 
11041  def __str__(self):
11042  r"""__str__(TransformedDistancePairScore self) -> std::string"""
11043  return _IMP_core.TransformedDistancePairScore___str__(self)
11044 
11045  def __repr__(self):
11046  r"""__repr__(TransformedDistancePairScore self) -> std::string"""
11047  return _IMP_core.TransformedDistancePairScore___repr__(self)
11048 
11049  @staticmethod
11050  def get_from(o):
11051  return _object_cast_to_TransformedDistancePairScore(o)
11052 
11053 
11054 # Register TransformedDistancePairScore in _IMP_core:
11055 _IMP_core.TransformedDistancePairScore_swigregister(TransformedDistancePairScore)
11056 class TypedPairScore(IMP.PairScore):
11057  r"""Proxy of C++ IMP::core::TypedPairScore class."""
11058 
11059  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11060 
11061  def __init__(self, typekey, allow_invalid_types=True):
11062  r"""__init__(TypedPairScore self, IntKey typekey, bool allow_invalid_types=True) -> TypedPairScore"""
11063  _IMP_core.TypedPairScore_swiginit(self, _IMP_core.new_TypedPairScore(typekey, allow_invalid_types))
11064 
11065  def set_particle_type(self, arg2):
11066  r"""set_particle_type(TypedPairScore self, Particle arg2)"""
11067  return _IMP_core.TypedPairScore_set_particle_type(self, arg2)
11068 
11069  def set_pair_score(self, ps, atype, btype):
11070  r"""set_pair_score(TypedPairScore self, PairScore ps, IMP::Int atype, IMP::Int btype)"""
11071  return _IMP_core.TypedPairScore_set_pair_score(self, ps, atype, btype)
11072 
11073  def do_get_inputs(self, m, pis):
11074  r"""do_get_inputs(TypedPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11075  return _IMP_core.TypedPairScore_do_get_inputs(self, m, pis)
11076 
11077  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11078  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"""
11079  return _IMP_core.TypedPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11080 
11081  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11082  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"""
11083  return _IMP_core.TypedPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11084 
11085  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11086  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"""
11087  return _IMP_core.TypedPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11088 
11089  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11090  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"""
11091  return _IMP_core.TypedPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11092 
11093  def get_version_info(self):
11094  r"""get_version_info(TypedPairScore self) -> VersionInfo"""
11095  return _IMP_core.TypedPairScore_get_version_info(self)
11096  __swig_destroy__ = _IMP_core.delete_TypedPairScore
11097 
11098  def __str__(self):
11099  r"""__str__(TypedPairScore self) -> std::string"""
11100  return _IMP_core.TypedPairScore___str__(self)
11101 
11102  def __repr__(self):
11103  r"""__repr__(TypedPairScore self) -> std::string"""
11104  return _IMP_core.TypedPairScore___repr__(self)
11105 
11106  @staticmethod
11107  def get_from(o):
11108  return _object_cast_to_TypedPairScore(o)
11109 
11110 
11111 # Register TypedPairScore in _IMP_core:
11112 _IMP_core.TypedPairScore_swigregister(TypedPairScore)
11113 class RigidBodyDistancePairScore(KClosePairsPairScore):
11114  r"""Proxy of C++ IMP::core::RigidBodyDistancePairScore class."""
11115 
11116  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11117 
11118  def __init__(self, ps, r):
11119  r"""__init__(RigidBodyDistancePairScore self, PairScore ps, Refiner r) -> RigidBodyDistancePairScore"""
11120  _IMP_core.RigidBodyDistancePairScore_swiginit(self, _IMP_core.new_RigidBodyDistancePairScore(ps, r))
11121 
11122  def __str__(self):
11123  r"""__str__(RigidBodyDistancePairScore self) -> std::string"""
11124  return _IMP_core.RigidBodyDistancePairScore___str__(self)
11125 
11126  def __repr__(self):
11127  r"""__repr__(RigidBodyDistancePairScore self) -> std::string"""
11128  return _IMP_core.RigidBodyDistancePairScore___repr__(self)
11129 
11130  @staticmethod
11131  def get_from(o):
11132  return _object_cast_to_RigidBodyDistancePairScore(o)
11133 
11134  __swig_destroy__ = _IMP_core.delete_RigidBodyDistancePairScore
11135 
11136 # Register RigidBodyDistancePairScore in _IMP_core:
11137 _IMP_core.RigidBodyDistancePairScore_swigregister(RigidBodyDistancePairScore)
11138 class RigidBodyAnglePairScore(IMP.PairScore):
11139  r"""Proxy of C++ IMP::core::RigidBodyAnglePairScore class."""
11140 
11141  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11142 
11143  def __init__(self, f):
11144  r"""__init__(RigidBodyAnglePairScore self, UnaryFunction f) -> RigidBodyAnglePairScore"""
11145  _IMP_core.RigidBodyAnglePairScore_swiginit(self, _IMP_core.new_RigidBodyAnglePairScore(f))
11146 
11147  def do_get_inputs(self, m, pis):
11148  r"""do_get_inputs(RigidBodyAnglePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11149  return _IMP_core.RigidBodyAnglePairScore_do_get_inputs(self, m, pis)
11150 
11151  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11152  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"""
11153  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11154 
11155  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11156  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"""
11157  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11158 
11159  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11160  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"""
11161  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11162 
11163  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11164  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"""
11165  return _IMP_core.RigidBodyAnglePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11166 
11167  def get_version_info(self):
11168  r"""get_version_info(RigidBodyAnglePairScore self) -> VersionInfo"""
11169  return _IMP_core.RigidBodyAnglePairScore_get_version_info(self)
11170  __swig_destroy__ = _IMP_core.delete_RigidBodyAnglePairScore
11171 
11172  def __str__(self):
11173  r"""__str__(RigidBodyAnglePairScore self) -> std::string"""
11174  return _IMP_core.RigidBodyAnglePairScore___str__(self)
11175 
11176  def __repr__(self):
11177  r"""__repr__(RigidBodyAnglePairScore self) -> std::string"""
11178  return _IMP_core.RigidBodyAnglePairScore___repr__(self)
11179 
11180  @staticmethod
11181  def get_from(o):
11182  return _object_cast_to_RigidBodyAnglePairScore(o)
11183 
11184 
11185 # Register RigidBodyAnglePairScore in _IMP_core:
11186 _IMP_core.RigidBodyAnglePairScore_swigregister(RigidBodyAnglePairScore)
11187 class TableRefiner(IMP.Refiner):
11188  r"""Proxy of C++ IMP::core::TableRefiner class."""
11189 
11190  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11191 
11192  def __init__(self):
11193  r"""__init__(TableRefiner self) -> TableRefiner"""
11194  _IMP_core.TableRefiner_swiginit(self, _IMP_core.new_TableRefiner())
11195 
11196  def add_particle(self, p, ps):
11197  r"""add_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11198  return _IMP_core.TableRefiner_add_particle(self, p, ps)
11199 
11200  def remove_particle(self, p):
11201  r"""remove_particle(TableRefiner self, Particle p)"""
11202  return _IMP_core.TableRefiner_remove_particle(self, p)
11203 
11204  def set_particle(self, p, ps):
11205  r"""set_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11206  return _IMP_core.TableRefiner_set_particle(self, p, ps)
11207 
11208  def do_get_inputs(self, m, pis):
11209  r"""do_get_inputs(TableRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11210  return _IMP_core.TableRefiner_do_get_inputs(self, m, pis)
11211 
11212  def get_version_info(self):
11213  r"""get_version_info(TableRefiner self) -> VersionInfo"""
11214  return _IMP_core.TableRefiner_get_version_info(self)
11215  __swig_destroy__ = _IMP_core.delete_TableRefiner
11216 
11217  def __str__(self):
11218  r"""__str__(TableRefiner self) -> std::string"""
11219  return _IMP_core.TableRefiner___str__(self)
11220 
11221  def __repr__(self):
11222  r"""__repr__(TableRefiner self) -> std::string"""
11223  return _IMP_core.TableRefiner___repr__(self)
11224 
11225  @staticmethod
11226  def get_from(o):
11227  return _object_cast_to_TableRefiner(o)
11228 
11229 
11230 # Register TableRefiner in _IMP_core:
11231 _IMP_core.TableRefiner_swigregister(TableRefiner)
11232 LOWER = _IMP_core.LOWER
11233 
11234 BOTH = _IMP_core.BOTH
11235 
11236 UPPER = _IMP_core.UPPER
11237 
11238 class MCCGSampler(IMP.Sampler):
11239  r"""Proxy of C++ IMP::core::MCCGSampler class."""
11240 
11241  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11242 
11243  def __init__(self, *args):
11244  r"""__init__(MCCGSampler self, Model m, std::string name="MCCG Sampler %1%") -> MCCGSampler"""
11245  _IMP_core.MCCGSampler_swiginit(self, _IMP_core.new_MCCGSampler(*args))
11246 
11247  def set_bounding_box(self, bb):
11248  r"""set_bounding_box(MCCGSampler self, BoundingBox3D bb)"""
11249  return _IMP_core.MCCGSampler_set_bounding_box(self, bb)
11250 
11251  def set_number_of_attempts(self, att):
11252  r"""set_number_of_attempts(MCCGSampler self, unsigned int att)"""
11253  return _IMP_core.MCCGSampler_set_number_of_attempts(self, att)
11254 
11255  def set_number_of_monte_carlo_steps(self, cg):
11256  r"""set_number_of_monte_carlo_steps(MCCGSampler self, unsigned int cg)"""
11257  return _IMP_core.MCCGSampler_set_number_of_monte_carlo_steps(self, cg)
11258 
11259  def set_number_of_conjugate_gradient_steps(self, cg):
11260  r"""set_number_of_conjugate_gradient_steps(MCCGSampler self, unsigned int cg)"""
11261  return _IMP_core.MCCGSampler_set_number_of_conjugate_gradient_steps(self, cg)
11262 
11263  def set_max_monte_carlo_step_size(self, *args):
11264  r"""
11265  set_max_monte_carlo_step_size(MCCGSampler self, double d)
11266  set_max_monte_carlo_step_size(MCCGSampler self, FloatKey k, double d)
11267  """
11268  return _IMP_core.MCCGSampler_set_max_monte_carlo_step_size(self, *args)
11269 
11270  def set_is_refining(self, tf):
11271  r"""set_is_refining(MCCGSampler self, bool tf)"""
11272  return _IMP_core.MCCGSampler_set_is_refining(self, tf)
11273 
11274  def set_local_optimizer(self, opt):
11275  r"""set_local_optimizer(MCCGSampler self, Optimizer opt)"""
11276  return _IMP_core.MCCGSampler_set_local_optimizer(self, opt)
11277 
11278  def set_save_rejected_configurations(self, tf):
11279  r"""set_save_rejected_configurations(MCCGSampler self, bool tf)"""
11280  return _IMP_core.MCCGSampler_set_save_rejected_configurations(self, tf)
11281 
11282  def get_rejected_configurations(self):
11283  r"""get_rejected_configurations(MCCGSampler self) -> ConfigurationSet"""
11284  return _IMP_core.MCCGSampler_get_rejected_configurations(self)
11285  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)
11286  def __set_optimizer_states(self, obj): IMP._list_util.set_varlist(self.optimizer_states, obj)
11287  def __del_optimizer_states(self): IMP._list_util.del_varlist(self.optimizer_states)
11288  optimizer_states = property(__get_optimizer_states, __set_optimizer_states, __del_optimizer_states, doc="List of ##ucnames")
11289 
11290  def remove_optimizer_state(self, d):
11291  r"""remove_optimizer_state(MCCGSampler self, OptimizerState d)"""
11292  return _IMP_core.MCCGSampler_remove_optimizer_state(self, d)
11293 
11294  def _python_index_optimizer_state(self, d, start, stop):
11295  r"""_python_index_optimizer_state(MCCGSampler self, OptimizerState d, unsigned int start, unsigned int stop) -> unsigned int"""
11296  return _IMP_core.MCCGSampler__python_index_optimizer_state(self, d, start, stop)
11297 
11298  def remove_optimizer_states(self, d):
11299  r"""remove_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & d)"""
11300  return _IMP_core.MCCGSampler_remove_optimizer_states(self, d)
11301 
11302  def set_optimizer_states(self, ps):
11303  r"""set_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & ps)"""
11304  return _IMP_core.MCCGSampler_set_optimizer_states(self, ps)
11305 
11306  def set_optimizer_states_order(self, objs):
11307  r"""set_optimizer_states_order(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11308  return _IMP_core.MCCGSampler_set_optimizer_states_order(self, objs)
11309 
11310  def add_optimizer_state(self, obj):
11311  r"""add_optimizer_state(MCCGSampler self, OptimizerState obj) -> unsigned int"""
11312  return _IMP_core.MCCGSampler_add_optimizer_state(self, obj)
11313 
11314  def add_optimizer_states(self, objs):
11315  r"""add_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11316  return _IMP_core.MCCGSampler_add_optimizer_states(self, objs)
11317 
11318  def clear_optimizer_states(self):
11319  r"""clear_optimizer_states(MCCGSampler self)"""
11320  return _IMP_core.MCCGSampler_clear_optimizer_states(self)
11321 
11322  def get_number_of_optimizer_states(self):
11323  r"""get_number_of_optimizer_states(MCCGSampler self) -> unsigned int"""
11324  return _IMP_core.MCCGSampler_get_number_of_optimizer_states(self)
11325 
11326  def get_has_optimizer_states(self):
11327  r"""get_has_optimizer_states(MCCGSampler self) -> bool"""
11328  return _IMP_core.MCCGSampler_get_has_optimizer_states(self)
11329 
11330  def get_optimizer_state(self, i):
11331  r"""get_optimizer_state(MCCGSampler self, unsigned int i) -> OptimizerState"""
11332  return _IMP_core.MCCGSampler_get_optimizer_state(self, i)
11333 
11334  def get_optimizer_states(self):
11335  r"""get_optimizer_states(MCCGSampler self) -> IMP::OptimizerStates"""
11336  return _IMP_core.MCCGSampler_get_optimizer_states(self)
11337 
11338  def erase_optimizer_state(self, i):
11339  r"""erase_optimizer_state(MCCGSampler self, unsigned int i)"""
11340  return _IMP_core.MCCGSampler_erase_optimizer_state(self, i)
11341 
11342  def reserve_optimizer_states(self, sz):
11343  r"""reserve_optimizer_states(MCCGSampler self, unsigned int sz)"""
11344  return _IMP_core.MCCGSampler_reserve_optimizer_states(self, sz)
11345 
11346  def do_sample(self):
11347  r"""do_sample(MCCGSampler self) -> ConfigurationSet"""
11348  return _IMP_core.MCCGSampler_do_sample(self)
11349 
11350  def get_version_info(self):
11351  r"""get_version_info(MCCGSampler self) -> VersionInfo"""
11352  return _IMP_core.MCCGSampler_get_version_info(self)
11353  __swig_destroy__ = _IMP_core.delete_MCCGSampler
11354 
11355  def __str__(self):
11356  r"""__str__(MCCGSampler self) -> std::string"""
11357  return _IMP_core.MCCGSampler___str__(self)
11358 
11359  def __repr__(self):
11360  r"""__repr__(MCCGSampler self) -> std::string"""
11361  return _IMP_core.MCCGSampler___repr__(self)
11362 
11363  @staticmethod
11364  def get_from(o):
11365  return _object_cast_to_MCCGSampler(o)
11366 
11367 
11368 # Register MCCGSampler in _IMP_core:
11369 _IMP_core.MCCGSampler_swigregister(MCCGSampler)
11370 class MinimumRestraint(IMP.Restraint):
11371  r"""Proxy of C++ IMP::core::MinimumRestraint class."""
11372 
11373  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11374 
11375  def __init__(self, *args):
11376  r"""__init__(MinimumRestraint self, unsigned int num, IMP::Restraints const & rs=IMP::Restraints(), std::string name="MinimumRestraint %1%") -> MinimumRestraint"""
11377  _IMP_core.MinimumRestraint_swiginit(self, _IMP_core.new_MinimumRestraint(*args))
11378 
11379  def do_get_inputs(self):
11380  r"""do_get_inputs(MinimumRestraint self) -> IMP::ModelObjectsTemp"""
11381  return _IMP_core.MinimumRestraint_do_get_inputs(self)
11382 
11383  def get_version_info(self):
11384  r"""get_version_info(MinimumRestraint self) -> VersionInfo"""
11385  return _IMP_core.MinimumRestraint_get_version_info(self)
11386  __swig_destroy__ = _IMP_core.delete_MinimumRestraint
11387  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)
11388  def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
11389  def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
11390  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##ucnames")
11391 
11392  def remove_restraint(self, d):
11393  r"""remove_restraint(MinimumRestraint self, Restraint d)"""
11394  return _IMP_core.MinimumRestraint_remove_restraint(self, d)
11395 
11396  def _python_index_restraint(self, d, start, stop):
11397  r"""_python_index_restraint(MinimumRestraint self, Restraint d, unsigned int start, unsigned int stop) -> unsigned int"""
11398  return _IMP_core.MinimumRestraint__python_index_restraint(self, d, start, stop)
11399 
11400  def remove_restraints(self, d):
11401  r"""remove_restraints(MinimumRestraint self, IMP::Restraints const & d)"""
11402  return _IMP_core.MinimumRestraint_remove_restraints(self, d)
11403 
11404  def set_restraints(self, ps):
11405  r"""set_restraints(MinimumRestraint self, IMP::Restraints const & ps)"""
11406  return _IMP_core.MinimumRestraint_set_restraints(self, ps)
11407 
11408  def set_restraints_order(self, objs):
11409  r"""set_restraints_order(MinimumRestraint self, IMP::Restraints const & objs)"""
11410  return _IMP_core.MinimumRestraint_set_restraints_order(self, objs)
11411 
11412  def add_restraint(self, obj):
11413  r"""add_restraint(MinimumRestraint self, Restraint obj) -> unsigned int"""
11414  return _IMP_core.MinimumRestraint_add_restraint(self, obj)
11415 
11416  def add_restraints(self, objs):
11417  r"""add_restraints(MinimumRestraint self, IMP::Restraints const & objs)"""
11418  return _IMP_core.MinimumRestraint_add_restraints(self, objs)
11419 
11420  def clear_restraints(self):
11421  r"""clear_restraints(MinimumRestraint self)"""
11422  return _IMP_core.MinimumRestraint_clear_restraints(self)
11423 
11424  def get_number_of_restraints(self):
11425  r"""get_number_of_restraints(MinimumRestraint self) -> unsigned int"""
11426  return _IMP_core.MinimumRestraint_get_number_of_restraints(self)
11427 
11428  def get_has_restraints(self):
11429  r"""get_has_restraints(MinimumRestraint self) -> bool"""
11430  return _IMP_core.MinimumRestraint_get_has_restraints(self)
11431 
11432  def get_restraint(self, i):
11433  r"""get_restraint(MinimumRestraint self, unsigned int i) -> Restraint"""
11434  return _IMP_core.MinimumRestraint_get_restraint(self, i)
11435 
11436  def get_restraints(self):
11437  r"""get_restraints(MinimumRestraint self) -> IMP::Restraints"""
11438  return _IMP_core.MinimumRestraint_get_restraints(self)
11439 
11440  def erase_restraint(self, i):
11441  r"""erase_restraint(MinimumRestraint self, unsigned int i)"""
11442  return _IMP_core.MinimumRestraint_erase_restraint(self, i)
11443 
11444  def reserve_restraints(self, sz):
11445  r"""reserve_restraints(MinimumRestraint self, unsigned int sz)"""
11446  return _IMP_core.MinimumRestraint_reserve_restraints(self, sz)
11447 
11448  def __str__(self):
11449  r"""__str__(MinimumRestraint self) -> std::string"""
11450  return _IMP_core.MinimumRestraint___str__(self)
11451 
11452  def __repr__(self):
11453  r"""__repr__(MinimumRestraint self) -> std::string"""
11454  return _IMP_core.MinimumRestraint___repr__(self)
11455 
11456  @staticmethod
11457  def get_from(o):
11458  return _object_cast_to_MinimumRestraint(o)
11459 
11460 
11461 # Register MinimumRestraint in _IMP_core:
11462 _IMP_core.MinimumRestraint_swigregister(MinimumRestraint)
11463 class Gaussian(RigidBody):
11464  r"""Proxy of C++ IMP::core::Gaussian class."""
11465 
11466  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11467 
11468  def __init__(self, *args):
11469  r"""
11470  __init__(Gaussian self) -> Gaussian
11471  __init__(Gaussian self, Model m, ParticleIndex id) -> Gaussian
11472  __init__(Gaussian self, _ParticleAdaptor d) -> Gaussian
11473  """
11474  _IMP_core.Gaussian_swiginit(self, _IMP_core.new_Gaussian(*args))
11475 
11476  def show(self, *args):
11477  r"""show(Gaussian self, _ostream out=std::cout)"""
11478  return _IMP_core.Gaussian_show(self, *args)
11479 
11480  @staticmethod
11481  def setup_particle(*args):
11482  r"""
11483  setup_particle(Model m, ParticleIndex pi) -> Gaussian
11484  setup_particle(_ParticleAdaptor pa) -> Gaussian
11485  setup_particle(Model m, ParticleIndex pi, Gaussian3D g) -> Gaussian
11486  setup_particle(_ParticleAdaptor pa, Gaussian3D g) -> Gaussian
11487  """
11488  return _IMP_core.Gaussian_setup_particle(*args)
11489 
11490  @staticmethod
11491  def get_local_covariance_key():
11492  r"""get_local_covariance_key() -> ObjectKey"""
11493  return _IMP_core.Gaussian_get_local_covariance_key()
11494 
11495  @staticmethod
11496  def get_global_covariance_key():
11497  r"""get_global_covariance_key() -> ObjectKey"""
11498  return _IMP_core.Gaussian_get_global_covariance_key()
11499 
11500  @staticmethod
11501  def get_is_setup(*args):
11502  r"""
11503  get_is_setup(_ParticleAdaptor p) -> bool
11504  get_is_setup(Model m, ParticleIndex pi) -> bool
11505  """
11506  return _IMP_core.Gaussian_get_is_setup(*args)
11507 
11508  def get_local_covariance(self):
11509  r"""get_local_covariance(Gaussian self) -> Eigen::Matrix3d"""
11510  return _IMP_core.Gaussian_get_local_covariance(self)
11511 
11512  def get_variances(self):
11513  r"""get_variances(Gaussian self) -> Vector3D"""
11514  return _IMP_core.Gaussian_get_variances(self)
11515 
11516  def get_global_covariance(self):
11517  r"""get_global_covariance(Gaussian self) -> Eigen::Matrix3d"""
11518  return _IMP_core.Gaussian_get_global_covariance(self)
11519 
11520  def get_gaussian(self):
11521  r"""get_gaussian(Gaussian self) -> Gaussian3D"""
11522  return _IMP_core.Gaussian_get_gaussian(self)
11523 
11524  def set_gaussian(self, g):
11525  r"""set_gaussian(Gaussian self, Gaussian3D g)"""
11526  return _IMP_core.Gaussian_set_gaussian(self, g)
11527 
11528  def set_local_covariance(self, covar):
11529  r"""set_local_covariance(Gaussian self, Eigen::Vector3d const covar)"""
11530  return _IMP_core.Gaussian_set_local_covariance(self, covar)
11531 
11532  def set_variances(self, v):
11533  r"""set_variances(Gaussian self, Vector3D v)"""
11534  return _IMP_core.Gaussian_set_variances(self, v)
11535 
11536  def set_global_covariance(self, covar):
11537  r"""set_global_covariance(Gaussian self, Eigen::Matrix3d covar)"""
11538  return _IMP_core.Gaussian_set_global_covariance(self, covar)
11539 
11540  def update_global_covariance(self):
11541  r"""update_global_covariance(Gaussian self)"""
11542  return _IMP_core.Gaussian_update_global_covariance(self)
11543 
11544  def add_attribute(self, *args):
11545  r"""
11546  add_attribute(Gaussian self, FloatKey k, IMP::Float v, bool opt)
11547  add_attribute(Gaussian self, FloatKey a0, IMP::Float a1)
11548  add_attribute(Gaussian self, IntKey a0, IMP::Int a1)
11549  add_attribute(Gaussian self, FloatsKey a0, IMP::Floats a1)
11550  add_attribute(Gaussian self, IntsKey a0, IMP::Ints a1)
11551  add_attribute(Gaussian self, StringKey a0, IMP::String a1)
11552  add_attribute(Gaussian self, ParticleIndexKey a0, Particle a1)
11553  add_attribute(Gaussian self, ObjectKey a0, Object a1)
11554  add_attribute(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11555  add_attribute(Gaussian self, SparseIntKey a0, IMP::Int a1)
11556  add_attribute(Gaussian self, SparseStringKey a0, IMP::String a1)
11557  add_attribute(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11558  """
11559  return _IMP_core.Gaussian_add_attribute(self, *args)
11560 
11561  def get_value(self, *args):
11562  r"""
11563  get_value(Gaussian self, FloatKey a0) -> IMP::Float
11564  get_value(Gaussian self, IntKey a0) -> IMP::Int
11565  get_value(Gaussian self, FloatsKey a0) -> IMP::Floats
11566  get_value(Gaussian self, IntsKey a0) -> IMP::Ints
11567  get_value(Gaussian self, StringKey a0) -> IMP::String
11568  get_value(Gaussian self, ParticleIndexKey a0) -> Particle
11569  get_value(Gaussian self, ObjectKey a0) -> Object
11570  get_value(Gaussian self, SparseFloatKey a0) -> IMP::Float
11571  get_value(Gaussian self, SparseIntKey a0) -> IMP::Int
11572  get_value(Gaussian self, SparseStringKey a0) -> IMP::String
11573  get_value(Gaussian self, SparseParticleIndexKey a0) -> ParticleIndex
11574  """
11575  return _IMP_core.Gaussian_get_value(self, *args)
11576 
11577  def set_value(self, *args):
11578  r"""
11579  set_value(Gaussian self, FloatKey a0, IMP::Float a1)
11580  set_value(Gaussian self, IntKey a0, IMP::Int a1)
11581  set_value(Gaussian self, FloatsKey a0, IMP::Floats a1)
11582  set_value(Gaussian self, IntsKey a0, IMP::Ints a1)
11583  set_value(Gaussian self, StringKey a0, IMP::String a1)
11584  set_value(Gaussian self, ParticleIndexKey a0, Particle a1)
11585  set_value(Gaussian self, ObjectKey a0, Object a1)
11586  set_value(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11587  set_value(Gaussian self, SparseIntKey a0, IMP::Int a1)
11588  set_value(Gaussian self, SparseStringKey a0, IMP::String a1)
11589  set_value(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11590  """
11591  return _IMP_core.Gaussian_set_value(self, *args)
11592 
11593  def remove_attribute(self, *args):
11594  r"""
11595  remove_attribute(Gaussian self, FloatKey a0)
11596  remove_attribute(Gaussian self, IntKey a0)
11597  remove_attribute(Gaussian self, FloatsKey a0)
11598  remove_attribute(Gaussian self, IntsKey a0)
11599  remove_attribute(Gaussian self, StringKey a0)
11600  remove_attribute(Gaussian self, ParticleIndexKey a0)
11601  remove_attribute(Gaussian self, ObjectKey a0)
11602  remove_attribute(Gaussian self, SparseFloatKey a0)
11603  remove_attribute(Gaussian self, SparseIntKey a0)
11604  remove_attribute(Gaussian self, SparseStringKey a0)
11605  remove_attribute(Gaussian self, SparseParticleIndexKey a0)
11606  """
11607  return _IMP_core.Gaussian_remove_attribute(self, *args)
11608 
11609  def has_attribute(self, *args):
11610  r"""
11611  has_attribute(Gaussian self, FloatKey a0) -> bool
11612  has_attribute(Gaussian self, IntKey a0) -> bool
11613  has_attribute(Gaussian self, FloatsKey a0) -> bool
11614  has_attribute(Gaussian self, IntsKey a0) -> bool
11615  has_attribute(Gaussian self, StringKey a0) -> bool
11616  has_attribute(Gaussian self, ParticleIndexKey a0) -> bool
11617  has_attribute(Gaussian self, ObjectKey a0) -> bool
11618  has_attribute(Gaussian self, SparseFloatKey a0) -> bool
11619  has_attribute(Gaussian self, SparseIntKey a0) -> bool
11620  has_attribute(Gaussian self, SparseStringKey a0) -> bool
11621  has_attribute(Gaussian self, SparseParticleIndexKey a0) -> bool
11622  """
11623  return _IMP_core.Gaussian_has_attribute(self, *args)
11624 
11625  def get_derivative(self, a0):
11626  r"""get_derivative(Gaussian self, FloatKey a0) -> double"""
11627  return _IMP_core.Gaussian_get_derivative(self, a0)
11628 
11629  def get_name(self):
11630  r"""get_name(Gaussian self) -> std::string"""
11631  return _IMP_core.Gaussian_get_name(self)
11632 
11633  def clear_caches(self):
11634  r"""clear_caches(Gaussian self)"""
11635  return _IMP_core.Gaussian_clear_caches(self)
11636 
11637  def set_name(self, a0):
11638  r"""set_name(Gaussian self, std::string a0)"""
11639  return _IMP_core.Gaussian_set_name(self, a0)
11640 
11641  def set_check_level(self, a0):
11642  r"""set_check_level(Gaussian self, IMP::CheckLevel a0)"""
11643  return _IMP_core.Gaussian_set_check_level(self, a0)
11644 
11645  def add_to_derivative(self, a0, a1, a2):
11646  r"""add_to_derivative(Gaussian self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
11647  return _IMP_core.Gaussian_add_to_derivative(self, a0, a1, a2)
11648 
11649  def set_is_optimized(self, a0, a1):
11650  r"""set_is_optimized(Gaussian self, FloatKey a0, bool a1)"""
11651  return _IMP_core.Gaussian_set_is_optimized(self, a0, a1)
11652 
11653  def get_is_optimized(self, a0):
11654  r"""get_is_optimized(Gaussian self, FloatKey a0) -> bool"""
11655  return _IMP_core.Gaussian_get_is_optimized(self, a0)
11656 
11657  def get_check_level(self):
11658  r"""get_check_level(Gaussian self) -> IMP::CheckLevel"""
11659  return _IMP_core.Gaussian_get_check_level(self)
11660 
11661  def __eq__(self, *args):
11662  r"""
11663  __eq__(Gaussian self, Gaussian o) -> bool
11664  __eq__(Gaussian self, Particle d) -> bool
11665  """
11666  return _IMP_core.Gaussian___eq__(self, *args)
11667 
11668  def __ne__(self, *args):
11669  r"""
11670  __ne__(Gaussian self, Gaussian o) -> bool
11671  __ne__(Gaussian self, Particle d) -> bool
11672  """
11673  return _IMP_core.Gaussian___ne__(self, *args)
11674 
11675  def __le__(self, *args):
11676  r"""
11677  __le__(Gaussian self, Gaussian o) -> bool
11678  __le__(Gaussian self, Particle d) -> bool
11679  """
11680  return _IMP_core.Gaussian___le__(self, *args)
11681 
11682  def __lt__(self, *args):
11683  r"""
11684  __lt__(Gaussian self, Gaussian o) -> bool
11685  __lt__(Gaussian self, Particle d) -> bool
11686  """
11687  return _IMP_core.Gaussian___lt__(self, *args)
11688 
11689  def __ge__(self, *args):
11690  r"""
11691  __ge__(Gaussian self, Gaussian o) -> bool
11692  __ge__(Gaussian self, Particle d) -> bool
11693  """
11694  return _IMP_core.Gaussian___ge__(self, *args)
11695 
11696  def __gt__(self, *args):
11697  r"""
11698  __gt__(Gaussian self, Gaussian o) -> bool
11699  __gt__(Gaussian self, Particle d) -> bool
11700  """
11701  return _IMP_core.Gaussian___gt__(self, *args)
11702 
11703  def __hash__(self):
11704  r"""__hash__(Gaussian self) -> std::size_t"""
11705  return _IMP_core.Gaussian___hash__(self)
11706 
11707  def __str__(self):
11708  r"""__str__(Gaussian self) -> std::string"""
11709  return _IMP_core.Gaussian___str__(self)
11710 
11711  def __repr__(self):
11712  r"""__repr__(Gaussian self) -> std::string"""
11713  return _IMP_core.Gaussian___repr__(self)
11714 
11715  def _get_as_binary(self):
11716  r"""_get_as_binary(Gaussian self) -> PyObject *"""
11717  return _IMP_core.Gaussian__get_as_binary(self)
11718 
11719  def _set_from_binary(self, p):
11720  r"""_set_from_binary(Gaussian self, PyObject * p)"""
11721  return _IMP_core.Gaussian__set_from_binary(self, p)
11722 
11723  def __getstate__(self):
11724  p = self._get_as_binary()
11725  if len(self.__dict__) > 1:
11726  d = self.__dict__.copy()
11727  del d['this']
11728  p = (d, p)
11729  return p
11730 
11731  def __setstate__(self, p):
11732  if not hasattr(self, 'this'):
11733  self.__init__()
11734  if isinstance(p, tuple):
11735  d, p = p
11736  self.__dict__.update(d)
11737  return self._set_from_binary(p)
11738 
11739  __swig_destroy__ = _IMP_core.delete_Gaussian
11740 
11741 # Register Gaussian in _IMP_core:
11742 _IMP_core.Gaussian_swigregister(Gaussian)
11743 class PairRestraint(IMP.Restraint):
11744  r"""Proxy of C++ IMP::core::PairRestraint class."""
11745 
11746  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11747 
11748  def __init__(self, *args):
11749  r"""
11750  __init__(PairRestraint self, Model m, PairScore ss, IMP::ParticleIndexPair const & vt, std::string name="PairRestraint %1%") -> PairRestraint
11751  __init__(PairRestraint self) -> PairRestraint
11752  """
11753  _IMP_core.PairRestraint_swiginit(self, _IMP_core.new_PairRestraint(*args))
11754 
11755  def get_score_object(self):
11756  r"""get_score_object(PairRestraint self) -> PairScore"""
11757  return _IMP_core.PairRestraint_get_score_object(self)
11758 
11759  def get_index(self):
11760  r"""get_index(PairRestraint self) -> IMP::PairScore::IndexArgument"""
11761  return _IMP_core.PairRestraint_get_index(self)
11762 
11763  def get_version_info(self):
11764  r"""get_version_info(PairRestraint self) -> VersionInfo"""
11765  return _IMP_core.PairRestraint_get_version_info(self)
11766  __swig_destroy__ = _IMP_core.delete_PairRestraint
11767 
11768  def __str__(self):
11769  r"""__str__(PairRestraint self) -> std::string"""
11770  return _IMP_core.PairRestraint___str__(self)
11771 
11772  def __repr__(self):
11773  r"""__repr__(PairRestraint self) -> std::string"""
11774  return _IMP_core.PairRestraint___repr__(self)
11775 
11776  @staticmethod
11777  def get_from(o):
11778  return _object_cast_to_PairRestraint(o)
11779 
11780 
11781  def _get_as_binary(self):
11782  r"""_get_as_binary(PairRestraint self) -> PyObject *"""
11783  return _IMP_core.PairRestraint__get_as_binary(self)
11784 
11785  def _set_from_binary(self, p):
11786  r"""_set_from_binary(PairRestraint self, PyObject * p)"""
11787  return _IMP_core.PairRestraint__set_from_binary(self, p)
11788 
11789  def __getstate__(self):
11790  p = self._get_as_binary()
11791  if len(self.__dict__) > 1:
11792  d = self.__dict__.copy()
11793  del d['this']
11794  p = (d, p)
11795  return p
11796 
11797  def __setstate__(self, p):
11798  if not hasattr(self, 'this'):
11799  self.__init__()
11800  if isinstance(p, tuple):
11801  d, p = p
11802  self.__dict__.update(d)
11803  return self._set_from_binary(p)
11804 
11805 
11806  def _get_jax(self, space):
11807  from . import _jax_util
11808  return _jax_util._get_jax_restraint(self, space)
11809 
11810  @classmethod
11811  def _get_jax_multiple(cls, restraints, space):
11812  from . import _jax_util
11813  return _jax_util._get_jax_multi_restraint(cls, restraints, space)
11814 
11815 
11816 # Register PairRestraint in _IMP_core:
11817 _IMP_core.PairRestraint_swigregister(PairRestraint)
11818 class SingletonRestraint(IMP.Restraint):
11819  r"""Proxy of C++ IMP::core::SingletonRestraint class."""
11820 
11821  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11822 
11823  def __init__(self, *args):
11824  r"""
11825  __init__(SingletonRestraint self, Model m, SingletonScore ss, ParticleIndex vt, std::string name="SingletonRestraint %1%") -> SingletonRestraint
11826  __init__(SingletonRestraint self) -> SingletonRestraint
11827  """
11828  _IMP_core.SingletonRestraint_swiginit(self, _IMP_core.new_SingletonRestraint(*args))
11829 
11830  def get_score_object(self):
11831  r"""get_score_object(SingletonRestraint self) -> SingletonScore"""
11832  return _IMP_core.SingletonRestraint_get_score_object(self)
11833 
11834  def get_index(self):
11835  r"""get_index(SingletonRestraint self) -> ParticleIndex"""
11836  return _IMP_core.SingletonRestraint_get_index(self)
11837 
11838  def get_version_info(self):
11839  r"""get_version_info(SingletonRestraint self) -> VersionInfo"""
11840  return _IMP_core.SingletonRestraint_get_version_info(self)
11841  __swig_destroy__ = _IMP_core.delete_SingletonRestraint
11842 
11843  def __str__(self):
11844  r"""__str__(SingletonRestraint self) -> std::string"""
11845  return _IMP_core.SingletonRestraint___str__(self)
11846 
11847  def __repr__(self):
11848  r"""__repr__(SingletonRestraint self) -> std::string"""
11849  return _IMP_core.SingletonRestraint___repr__(self)
11850 
11851  @staticmethod
11852  def get_from(o):
11853  return _object_cast_to_SingletonRestraint(o)
11854 
11855 
11856  def _get_as_binary(self):
11857  r"""_get_as_binary(SingletonRestraint self) -> PyObject *"""
11858  return _IMP_core.SingletonRestraint__get_as_binary(self)
11859 
11860  def _set_from_binary(self, p):
11861  r"""_set_from_binary(SingletonRestraint self, PyObject * p)"""
11862  return _IMP_core.SingletonRestraint__set_from_binary(self, p)
11863 
11864  def __getstate__(self):
11865  p = self._get_as_binary()
11866  if len(self.__dict__) > 1:
11867  d = self.__dict__.copy()
11868  del d['this']
11869  p = (d, p)
11870  return p
11871 
11872  def __setstate__(self, p):
11873  if not hasattr(self, 'this'):
11874  self.__init__()
11875  if isinstance(p, tuple):
11876  d, p = p
11877  self.__dict__.update(d)
11878  return self._set_from_binary(p)
11879 
11880 
11881  def _get_jax(self, space):
11882  from . import _jax_util
11883  return _jax_util._get_jax_restraint(self, space)
11884 
11885  @classmethod
11886  def _get_jax_multiple(cls, restraints, space):
11887  from . import _jax_util
11888  return _jax_util._get_jax_multi_restraint(cls, restraints, space)
11889 
11890 
11891 # Register SingletonRestraint in _IMP_core:
11892 _IMP_core.SingletonRestraint_swigregister(SingletonRestraint)
11893 class TripletRestraint(IMP.Restraint):
11894  r"""Proxy of C++ IMP::core::TripletRestraint class."""
11895 
11896  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11897 
11898  def __init__(self, *args):
11899  r"""
11900  __init__(TripletRestraint self, Model m, TripletScore ss, IMP::ParticleIndexTriplet const & vt, std::string name="TripletRestraint %1%") -> TripletRestraint
11901  __init__(TripletRestraint self) -> TripletRestraint
11902  """
11903  _IMP_core.TripletRestraint_swiginit(self, _IMP_core.new_TripletRestraint(*args))
11904 
11905  def get_score_object(self):
11906  r"""get_score_object(TripletRestraint self) -> TripletScore"""
11907  return _IMP_core.TripletRestraint_get_score_object(self)
11908 
11909  def get_index(self):
11910  r"""get_index(TripletRestraint self) -> IMP::TripletScore::IndexArgument"""
11911  return _IMP_core.TripletRestraint_get_index(self)
11912 
11913  def get_version_info(self):
11914  r"""get_version_info(TripletRestraint self) -> VersionInfo"""
11915  return _IMP_core.TripletRestraint_get_version_info(self)
11916  __swig_destroy__ = _IMP_core.delete_TripletRestraint
11917 
11918  def __str__(self):
11919  r"""__str__(TripletRestraint self) -> std::string"""
11920  return _IMP_core.TripletRestraint___str__(self)
11921 
11922  def __repr__(self):
11923  r"""__repr__(TripletRestraint self) -> std::string"""
11924  return _IMP_core.TripletRestraint___repr__(self)
11925 
11926  @staticmethod
11927  def get_from(o):
11928  return _object_cast_to_TripletRestraint(o)
11929 
11930 
11931  def _get_as_binary(self):
11932  r"""_get_as_binary(TripletRestraint self) -> PyObject *"""
11933  return _IMP_core.TripletRestraint__get_as_binary(self)
11934 
11935  def _set_from_binary(self, p):
11936  r"""_set_from_binary(TripletRestraint self, PyObject * p)"""
11937  return _IMP_core.TripletRestraint__set_from_binary(self, p)
11938 
11939  def __getstate__(self):
11940  p = self._get_as_binary()
11941  if len(self.__dict__) > 1:
11942  d = self.__dict__.copy()
11943  del d['this']
11944  p = (d, p)
11945  return p
11946 
11947  def __setstate__(self, p):
11948  if not hasattr(self, 'this'):
11949  self.__init__()
11950  if isinstance(p, tuple):
11951  d, p = p
11952  self.__dict__.update(d)
11953  return self._set_from_binary(p)
11954 
11955 
11956 # Register TripletRestraint in _IMP_core:
11957 _IMP_core.TripletRestraint_swigregister(TripletRestraint)
11958 class QuadRestraint(IMP.Restraint):
11959  r"""Proxy of C++ IMP::core::QuadRestraint class."""
11960 
11961  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11962 
11963  def __init__(self, *args):
11964  r"""
11965  __init__(QuadRestraint self, Model m, QuadScore ss, IMP::ParticleIndexQuad const & vt, std::string name="QuadRestraint %1%") -> QuadRestraint
11966  __init__(QuadRestraint self) -> QuadRestraint
11967  """
11968  _IMP_core.QuadRestraint_swiginit(self, _IMP_core.new_QuadRestraint(*args))
11969 
11970  def get_score_object(self):
11971  r"""get_score_object(QuadRestraint self) -> QuadScore"""
11972  return _IMP_core.QuadRestraint_get_score_object(self)
11973 
11974  def get_index(self):
11975  r"""get_index(QuadRestraint self) -> IMP::QuadScore::IndexArgument"""
11976  return _IMP_core.QuadRestraint_get_index(self)
11977 
11978  def get_version_info(self):
11979  r"""get_version_info(QuadRestraint self) -> VersionInfo"""
11980  return _IMP_core.QuadRestraint_get_version_info(self)
11981  __swig_destroy__ = _IMP_core.delete_QuadRestraint
11982 
11983  def __str__(self):
11984  r"""__str__(QuadRestraint self) -> std::string"""
11985  return _IMP_core.QuadRestraint___str__(self)
11986 
11987  def __repr__(self):
11988  r"""__repr__(QuadRestraint self) -> std::string"""
11989  return _IMP_core.QuadRestraint___repr__(self)
11990 
11991  @staticmethod
11992  def get_from(o):
11993  return _object_cast_to_QuadRestraint(o)
11994 
11995 
11996  def _get_as_binary(self):
11997  r"""_get_as_binary(QuadRestraint self) -> PyObject *"""
11998  return _IMP_core.QuadRestraint__get_as_binary(self)
11999 
12000  def _set_from_binary(self, p):
12001  r"""_set_from_binary(QuadRestraint self, PyObject * p)"""
12002  return _IMP_core.QuadRestraint__set_from_binary(self, p)
12003 
12004  def __getstate__(self):
12005  p = self._get_as_binary()
12006  if len(self.__dict__) > 1:
12007  d = self.__dict__.copy()
12008  del d['this']
12009  p = (d, p)
12010  return p
12011 
12012  def __setstate__(self, p):
12013  if not hasattr(self, 'this'):
12014  self.__init__()
12015  if isinstance(p, tuple):
12016  d, p = p
12017  self.__dict__.update(d)
12018  return self._set_from_binary(p)
12019 
12020 
12021 # Register QuadRestraint in _IMP_core:
12022 _IMP_core.QuadRestraint_swigregister(QuadRestraint)
12023 class SingletonConstraint(IMP.Constraint):
12024  r"""Proxy of C++ IMP::core::SingletonConstraint class."""
12025 
12026  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12027 
12028  def __init__(self, *args):
12029  r"""
12030  __init__(SingletonConstraint self, SingletonModifier before, SingletonModifier after, Model m, ParticleIndex vt, std::string name="SingletonConstraint %1%", bool can_skip=False) -> SingletonConstraint
12031  __init__(SingletonConstraint self) -> SingletonConstraint
12032  """
12033  _IMP_core.SingletonConstraint_swiginit(self, _IMP_core.new_SingletonConstraint(*args))
12034 
12035  def get_before_modifier(self):
12036  r"""get_before_modifier(SingletonConstraint self) -> SingletonModifier"""
12037  return _IMP_core.SingletonConstraint_get_before_modifier(self)
12038 
12039  def get_index(self):
12040  r"""get_index(SingletonConstraint self) -> ParticleIndex"""
12041  return _IMP_core.SingletonConstraint_get_index(self)
12042 
12043  def get_version_info(self):
12044  r"""get_version_info(SingletonConstraint self) -> VersionInfo"""
12045  return _IMP_core.SingletonConstraint_get_version_info(self)
12046  __swig_destroy__ = _IMP_core.delete_SingletonConstraint
12047 
12048  def __str__(self):
12049  r"""__str__(SingletonConstraint self) -> std::string"""
12050  return _IMP_core.SingletonConstraint___str__(self)
12051 
12052  def __repr__(self):
12053  r"""__repr__(SingletonConstraint self) -> std::string"""
12054  return _IMP_core.SingletonConstraint___repr__(self)
12055 
12056  @staticmethod
12057  def get_from(o):
12058  return _object_cast_to_SingletonConstraint(o)
12059 
12060 
12061  def _get_as_binary(self):
12062  r"""_get_as_binary(SingletonConstraint self) -> PyObject *"""
12063  return _IMP_core.SingletonConstraint__get_as_binary(self)
12064 
12065  def _set_from_binary(self, p):
12066  r"""_set_from_binary(SingletonConstraint self, PyObject * p)"""
12067  return _IMP_core.SingletonConstraint__set_from_binary(self, p)
12068 
12069  def __getstate__(self):
12070  p = self._get_as_binary()
12071  if len(self.__dict__) > 1:
12072  d = self.__dict__.copy()
12073  del d['this']
12074  p = (d, p)
12075  return p
12076 
12077  def __setstate__(self, p):
12078  if not hasattr(self, 'this'):
12079  self.__init__()
12080  if isinstance(p, tuple):
12081  d, p = p
12082  self.__dict__.update(d)
12083  return self._set_from_binary(p)
12084 
12085 
12086  def _get_jax(self):
12087  import jax.numpy as jnp
12088  indexes = jnp.array([self.get_index()])
12089  mod = self.get_before_modifier().get_derived_object()
12090  ji = mod._get_jax(self.get_model(), indexes)
12091  return self._wrap_jax(ji.apply_func, keys=ji._keys)
12092 
12093 
12094 # Register SingletonConstraint in _IMP_core:
12095 _IMP_core.SingletonConstraint_swigregister(SingletonConstraint)
12096 class PairConstraint(IMP.Constraint):
12097  r"""Proxy of C++ IMP::core::PairConstraint class."""
12098 
12099  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12100 
12101  def __init__(self, *args):
12102  r"""
12103  __init__(PairConstraint self, PairModifier before, PairModifier after, Model m, IMP::ParticleIndexPair const & vt, std::string name="PairConstraint %1%", bool can_skip=False) -> PairConstraint
12104  __init__(PairConstraint self) -> PairConstraint
12105  """
12106  _IMP_core.PairConstraint_swiginit(self, _IMP_core.new_PairConstraint(*args))
12107 
12108  def get_before_modifier(self):
12109  r"""get_before_modifier(PairConstraint self) -> PairModifier"""
12110  return _IMP_core.PairConstraint_get_before_modifier(self)
12111 
12112  def get_index(self):
12113  r"""get_index(PairConstraint self) -> IMP::PairModifier::IndexArgument"""
12114  return _IMP_core.PairConstraint_get_index(self)
12115 
12116  def get_version_info(self):
12117  r"""get_version_info(PairConstraint self) -> VersionInfo"""
12118  return _IMP_core.PairConstraint_get_version_info(self)
12119  __swig_destroy__ = _IMP_core.delete_PairConstraint
12120 
12121  def __str__(self):
12122  r"""__str__(PairConstraint self) -> std::string"""
12123  return _IMP_core.PairConstraint___str__(self)
12124 
12125  def __repr__(self):
12126  r"""__repr__(PairConstraint self) -> std::string"""
12127  return _IMP_core.PairConstraint___repr__(self)
12128 
12129  @staticmethod
12130  def get_from(o):
12131  return _object_cast_to_PairConstraint(o)
12132 
12133 
12134  def _get_as_binary(self):
12135  r"""_get_as_binary(PairConstraint self) -> PyObject *"""
12136  return _IMP_core.PairConstraint__get_as_binary(self)
12137 
12138  def _set_from_binary(self, p):
12139  r"""_set_from_binary(PairConstraint self, PyObject * p)"""
12140  return _IMP_core.PairConstraint__set_from_binary(self, p)
12141 
12142  def __getstate__(self):
12143  p = self._get_as_binary()
12144  if len(self.__dict__) > 1:
12145  d = self.__dict__.copy()
12146  del d['this']
12147  p = (d, p)
12148  return p
12149 
12150  def __setstate__(self, p):
12151  if not hasattr(self, 'this'):
12152  self.__init__()
12153  if isinstance(p, tuple):
12154  d, p = p
12155  self.__dict__.update(d)
12156  return self._set_from_binary(p)
12157 
12158 
12159 # Register PairConstraint in _IMP_core:
12160 _IMP_core.PairConstraint_swigregister(PairConstraint)
12161 class TripletConstraint(IMP.Constraint):
12162  r"""Proxy of C++ IMP::core::TripletConstraint class."""
12163 
12164  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12165 
12166  def __init__(self, *args):
12167  r"""
12168  __init__(TripletConstraint self, TripletModifier before, TripletModifier after, Model m, IMP::ParticleIndexTriplet const & vt, std::string name="TripletConstraint %1%", bool can_skip=False) -> TripletConstraint
12169  __init__(TripletConstraint self) -> TripletConstraint
12170  """
12171  _IMP_core.TripletConstraint_swiginit(self, _IMP_core.new_TripletConstraint(*args))
12172 
12173  def get_before_modifier(self):
12174  r"""get_before_modifier(TripletConstraint self) -> TripletModifier"""
12175  return _IMP_core.TripletConstraint_get_before_modifier(self)
12176 
12177  def get_index(self):
12178  r"""get_index(TripletConstraint self) -> IMP::TripletModifier::IndexArgument"""
12179  return _IMP_core.TripletConstraint_get_index(self)
12180 
12181  def get_version_info(self):
12182  r"""get_version_info(TripletConstraint self) -> VersionInfo"""
12183  return _IMP_core.TripletConstraint_get_version_info(self)
12184  __swig_destroy__ = _IMP_core.delete_TripletConstraint
12185 
12186  def __str__(self):
12187  r"""__str__(TripletConstraint self) -> std::string"""
12188  return _IMP_core.TripletConstraint___str__(self)
12189 
12190  def __repr__(self):
12191  r"""__repr__(TripletConstraint self) -> std::string"""
12192  return _IMP_core.TripletConstraint___repr__(self)
12193 
12194  @staticmethod
12195  def get_from(o):
12196  return _object_cast_to_TripletConstraint(o)
12197 
12198 
12199  def _get_as_binary(self):
12200  r"""_get_as_binary(TripletConstraint self) -> PyObject *"""
12201  return _IMP_core.TripletConstraint__get_as_binary(self)
12202 
12203  def _set_from_binary(self, p):
12204  r"""_set_from_binary(TripletConstraint self, PyObject * p)"""
12205  return _IMP_core.TripletConstraint__set_from_binary(self, p)
12206 
12207  def __getstate__(self):
12208  p = self._get_as_binary()
12209  if len(self.__dict__) > 1:
12210  d = self.__dict__.copy()
12211  del d['this']
12212  p = (d, p)
12213  return p
12214 
12215  def __setstate__(self, p):
12216  if not hasattr(self, 'this'):
12217  self.__init__()
12218  if isinstance(p, tuple):
12219  d, p = p
12220  self.__dict__.update(d)
12221  return self._set_from_binary(p)
12222 
12223 
12224 # Register TripletConstraint in _IMP_core:
12225 _IMP_core.TripletConstraint_swigregister(TripletConstraint)
12226 class QuadConstraint(IMP.Constraint):
12227  r"""Proxy of C++ IMP::core::QuadConstraint class."""
12228 
12229  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12230 
12231  def __init__(self, *args):
12232  r"""
12233  __init__(QuadConstraint self, QuadModifier before, QuadModifier after, Model m, IMP::ParticleIndexQuad const & vt, std::string name="QuadConstraint %1%", bool can_skip=False) -> QuadConstraint
12234  __init__(QuadConstraint self) -> QuadConstraint
12235  """
12236  _IMP_core.QuadConstraint_swiginit(self, _IMP_core.new_QuadConstraint(*args))
12237 
12238  def get_before_modifier(self):
12239  r"""get_before_modifier(QuadConstraint self) -> QuadModifier"""
12240  return _IMP_core.QuadConstraint_get_before_modifier(self)
12241 
12242  def get_index(self):
12243  r"""get_index(QuadConstraint self) -> IMP::QuadModifier::IndexArgument"""
12244  return _IMP_core.QuadConstraint_get_index(self)
12245 
12246  def get_version_info(self):
12247  r"""get_version_info(QuadConstraint self) -> VersionInfo"""
12248  return _IMP_core.QuadConstraint_get_version_info(self)
12249  __swig_destroy__ = _IMP_core.delete_QuadConstraint
12250 
12251  def __str__(self):
12252  r"""__str__(QuadConstraint self) -> std::string"""
12253  return _IMP_core.QuadConstraint___str__(self)
12254 
12255  def __repr__(self):
12256  r"""__repr__(QuadConstraint self) -> std::string"""
12257  return _IMP_core.QuadConstraint___repr__(self)
12258 
12259  @staticmethod
12260  def get_from(o):
12261  return _object_cast_to_QuadConstraint(o)
12262 
12263 
12264  def _get_as_binary(self):
12265  r"""_get_as_binary(QuadConstraint self) -> PyObject *"""
12266  return _IMP_core.QuadConstraint__get_as_binary(self)
12267 
12268  def _set_from_binary(self, p):
12269  r"""_set_from_binary(QuadConstraint self, PyObject * p)"""
12270  return _IMP_core.QuadConstraint__set_from_binary(self, p)
12271 
12272  def __getstate__(self):
12273  p = self._get_as_binary()
12274  if len(self.__dict__) > 1:
12275  d = self.__dict__.copy()
12276  del d['this']
12277  p = (d, p)
12278  return p
12279 
12280  def __setstate__(self, p):
12281  if not hasattr(self, 'this'):
12282  self.__init__()
12283  if isinstance(p, tuple):
12284  d, p = p
12285  self.__dict__.update(d)
12286  return self._set_from_binary(p)
12287 
12288 
12289 # Register QuadConstraint in _IMP_core:
12290 _IMP_core.QuadConstraint_swigregister(QuadConstraint)
12291 class ConstantSingletonPredicate(IMP.SingletonPredicate):
12292  r"""Proxy of C++ IMP::core::ConstantSingletonPredicate class."""
12293 
12294  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12295 
12296  def __init__(self, *args):
12297  r"""
12298  __init__(ConstantSingletonPredicate self, int v, std::string name="ConstSingletonPredicate%1%") -> ConstantSingletonPredicate
12299  __init__(ConstantSingletonPredicate self) -> ConstantSingletonPredicate
12300  """
12301  _IMP_core.ConstantSingletonPredicate_swiginit(self, _IMP_core.new_ConstantSingletonPredicate(*args))
12302 
12303  def do_get_inputs(self, arg2, arg3):
12304  r"""do_get_inputs(ConstantSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12305  return _IMP_core.ConstantSingletonPredicate_do_get_inputs(self, arg2, arg3)
12306 
12307  def get_value(self, *args):
12308  r"""
12309  get_value(ConstantSingletonPredicate self, Particle a) -> int
12310  get_value(ConstantSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12311  """
12312  return _IMP_core.ConstantSingletonPredicate_get_value(self, *args)
12313 
12314  def get_value_index(self, *args):
12315  r"""
12316  get_value_index(ConstantSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12317  get_value_index(ConstantSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12318  """
12319  return _IMP_core.ConstantSingletonPredicate_get_value_index(self, *args)
12320 
12321  def get_version_info(self):
12322  r"""get_version_info(ConstantSingletonPredicate self) -> VersionInfo"""
12323  return _IMP_core.ConstantSingletonPredicate_get_version_info(self)
12324  __swig_destroy__ = _IMP_core.delete_ConstantSingletonPredicate
12325 
12326  def __str__(self):
12327  r"""__str__(ConstantSingletonPredicate self) -> std::string"""
12328  return _IMP_core.ConstantSingletonPredicate___str__(self)
12329 
12330  def __repr__(self):
12331  r"""__repr__(ConstantSingletonPredicate self) -> std::string"""
12332  return _IMP_core.ConstantSingletonPredicate___repr__(self)
12333 
12334  @staticmethod
12335  def get_from(o):
12336  return _object_cast_to_ConstantSingletonPredicate(o)
12337 
12338 
12339  def _get_as_binary(self):
12340  r"""_get_as_binary(ConstantSingletonPredicate self) -> PyObject *"""
12341  return _IMP_core.ConstantSingletonPredicate__get_as_binary(self)
12342 
12343  def _set_from_binary(self, p):
12344  r"""_set_from_binary(ConstantSingletonPredicate self, PyObject * p)"""
12345  return _IMP_core.ConstantSingletonPredicate__set_from_binary(self, p)
12346 
12347  def __getstate__(self):
12348  p = self._get_as_binary()
12349  if len(self.__dict__) > 1:
12350  d = self.__dict__.copy()
12351  del d['this']
12352  p = (d, p)
12353  return p
12354 
12355  def __setstate__(self, p):
12356  if not hasattr(self, 'this'):
12357  self.__init__()
12358  if isinstance(p, tuple):
12359  d, p = p
12360  self.__dict__.update(d)
12361  return self._set_from_binary(p)
12362 
12363 
12364 # Register ConstantSingletonPredicate in _IMP_core:
12365 _IMP_core.ConstantSingletonPredicate_swigregister(ConstantSingletonPredicate)
12366 class UnorderedTypeSingletonPredicate(IMP.SingletonPredicate):
12367  r"""Proxy of C++ IMP::core::UnorderedTypeSingletonPredicate class."""
12368 
12369  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12370 
12371  def __init__(self, *args):
12372  r"""__init__(UnorderedTypeSingletonPredicate self, std::string name="UnorderedTypeSingletonPredicate%1%") -> UnorderedTypeSingletonPredicate"""
12373  _IMP_core.UnorderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_UnorderedTypeSingletonPredicate(*args))
12374 
12375  def do_get_inputs(self, m, pis):
12376  r"""do_get_inputs(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12377  return _IMP_core.UnorderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12378 
12379  def get_value(self, *args):
12380  r"""
12381  get_value(UnorderedTypeSingletonPredicate self, Particle a) -> int
12382  get_value(UnorderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12383  """
12384  return _IMP_core.UnorderedTypeSingletonPredicate_get_value(self, *args)
12385 
12386  def get_value_index(self, *args):
12387  r"""
12388  get_value_index(UnorderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12389  get_value_index(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12390  """
12391  return _IMP_core.UnorderedTypeSingletonPredicate_get_value_index(self, *args)
12392 
12393  def get_version_info(self):
12394  r"""get_version_info(UnorderedTypeSingletonPredicate self) -> VersionInfo"""
12395  return _IMP_core.UnorderedTypeSingletonPredicate_get_version_info(self)
12396  __swig_destroy__ = _IMP_core.delete_UnorderedTypeSingletonPredicate
12397 
12398  def __str__(self):
12399  r"""__str__(UnorderedTypeSingletonPredicate self) -> std::string"""
12400  return _IMP_core.UnorderedTypeSingletonPredicate___str__(self)
12401 
12402  def __repr__(self):
12403  r"""__repr__(UnorderedTypeSingletonPredicate self) -> std::string"""
12404  return _IMP_core.UnorderedTypeSingletonPredicate___repr__(self)
12405 
12406  @staticmethod
12407  def get_from(o):
12408  return _object_cast_to_UnorderedTypeSingletonPredicate(o)
12409 
12410 
12411  def _get_as_binary(self):
12412  r"""_get_as_binary(UnorderedTypeSingletonPredicate self) -> PyObject *"""
12413  return _IMP_core.UnorderedTypeSingletonPredicate__get_as_binary(self)
12414 
12415  def _set_from_binary(self, p):
12416  r"""_set_from_binary(UnorderedTypeSingletonPredicate self, PyObject * p)"""
12417  return _IMP_core.UnorderedTypeSingletonPredicate__set_from_binary(self, p)
12418 
12419  def __getstate__(self):
12420  p = self._get_as_binary()
12421  if len(self.__dict__) > 1:
12422  d = self.__dict__.copy()
12423  del d['this']
12424  p = (d, p)
12425  return p
12426 
12427  def __setstate__(self, p):
12428  if not hasattr(self, 'this'):
12429  self.__init__()
12430  if isinstance(p, tuple):
12431  d, p = p
12432  self.__dict__.update(d)
12433  return self._set_from_binary(p)
12434 
12435 
12436 # Register UnorderedTypeSingletonPredicate in _IMP_core:
12437 _IMP_core.UnorderedTypeSingletonPredicate_swigregister(UnorderedTypeSingletonPredicate)
12438 class OrderedTypeSingletonPredicate(IMP.SingletonPredicate):
12439  r"""Proxy of C++ IMP::core::OrderedTypeSingletonPredicate class."""
12440 
12441  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12442 
12443  def __init__(self, *args):
12444  r"""__init__(OrderedTypeSingletonPredicate self, std::string name="OrderedTypeSingletonPredicate%1%") -> OrderedTypeSingletonPredicate"""
12445  _IMP_core.OrderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_OrderedTypeSingletonPredicate(*args))
12446 
12447  def do_get_inputs(self, m, pis):
12448  r"""do_get_inputs(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12449  return _IMP_core.OrderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12450 
12451  def get_value(self, *args):
12452  r"""
12453  get_value(OrderedTypeSingletonPredicate self, IMP::core::ParticleTypes const & types) -> int
12454  get_value(OrderedTypeSingletonPredicate self, Particle a) -> int
12455  get_value(OrderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12456  """
12457  return _IMP_core.OrderedTypeSingletonPredicate_get_value(self, *args)
12458 
12459  def get_value_index(self, *args):
12460  r"""
12461  get_value_index(OrderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12462  get_value_index(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12463  """
12464  return _IMP_core.OrderedTypeSingletonPredicate_get_value_index(self, *args)
12465 
12466  def get_version_info(self):
12467  r"""get_version_info(OrderedTypeSingletonPredicate self) -> VersionInfo"""
12468  return _IMP_core.OrderedTypeSingletonPredicate_get_version_info(self)
12469  __swig_destroy__ = _IMP_core.delete_OrderedTypeSingletonPredicate
12470 
12471  def __str__(self):
12472  r"""__str__(OrderedTypeSingletonPredicate self) -> std::string"""
12473  return _IMP_core.OrderedTypeSingletonPredicate___str__(self)
12474 
12475  def __repr__(self):
12476  r"""__repr__(OrderedTypeSingletonPredicate self) -> std::string"""
12477  return _IMP_core.OrderedTypeSingletonPredicate___repr__(self)
12478 
12479  @staticmethod
12480  def get_from(o):
12481  return _object_cast_to_OrderedTypeSingletonPredicate(o)
12482 
12483 
12484 # Register OrderedTypeSingletonPredicate in _IMP_core:
12485 _IMP_core.OrderedTypeSingletonPredicate_swigregister(OrderedTypeSingletonPredicate)
12486 class AllSameSingletonPredicate(IMP.SingletonPredicate):
12487  r"""Proxy of C++ IMP::core::AllSameSingletonPredicate class."""
12488 
12489  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12490 
12491  def __init__(self, *args):
12492  r"""__init__(AllSameSingletonPredicate self, std::string name="AllSameSingletonPredicate%1%") -> AllSameSingletonPredicate"""
12493  _IMP_core.AllSameSingletonPredicate_swiginit(self, _IMP_core.new_AllSameSingletonPredicate(*args))
12494 
12495  def do_get_inputs(self, arg2, arg3):
12496  r"""do_get_inputs(AllSameSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12497  return _IMP_core.AllSameSingletonPredicate_do_get_inputs(self, arg2, arg3)
12498 
12499  def get_value(self, *args):
12500  r"""
12501  get_value(AllSameSingletonPredicate self, Particle a) -> int
12502  get_value(AllSameSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12503  """
12504  return _IMP_core.AllSameSingletonPredicate_get_value(self, *args)
12505 
12506  def get_value_index(self, *args):
12507  r"""
12508  get_value_index(AllSameSingletonPredicate self, Model m, ParticleIndex pi) -> int
12509  get_value_index(AllSameSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12510  """
12511  return _IMP_core.AllSameSingletonPredicate_get_value_index(self, *args)
12512 
12513  def get_version_info(self):
12514  r"""get_version_info(AllSameSingletonPredicate self) -> VersionInfo"""
12515  return _IMP_core.AllSameSingletonPredicate_get_version_info(self)
12516  __swig_destroy__ = _IMP_core.delete_AllSameSingletonPredicate
12517 
12518  def __str__(self):
12519  r"""__str__(AllSameSingletonPredicate self) -> std::string"""
12520  return _IMP_core.AllSameSingletonPredicate___str__(self)
12521 
12522  def __repr__(self):
12523  r"""__repr__(AllSameSingletonPredicate self) -> std::string"""
12524  return _IMP_core.AllSameSingletonPredicate___repr__(self)
12525 
12526  @staticmethod
12527  def get_from(o):
12528  return _object_cast_to_AllSameSingletonPredicate(o)
12529 
12530 
12531  def _get_as_binary(self):
12532  r"""_get_as_binary(AllSameSingletonPredicate self) -> PyObject *"""
12533  return _IMP_core.AllSameSingletonPredicate__get_as_binary(self)
12534 
12535  def _set_from_binary(self, p):
12536  r"""_set_from_binary(AllSameSingletonPredicate self, PyObject * p)"""
12537  return _IMP_core.AllSameSingletonPredicate__set_from_binary(self, p)
12538 
12539  def __getstate__(self):
12540  p = self._get_as_binary()
12541  if len(self.__dict__) > 1:
12542  d = self.__dict__.copy()
12543  del d['this']
12544  p = (d, p)
12545  return p
12546 
12547  def __setstate__(self, p):
12548  if not hasattr(self, 'this'):
12549  self.__init__()
12550  if isinstance(p, tuple):
12551  d, p = p
12552  self.__dict__.update(d)
12553  return self._set_from_binary(p)
12554 
12555 
12556 # Register AllSameSingletonPredicate in _IMP_core:
12557 _IMP_core.AllSameSingletonPredicate_swigregister(AllSameSingletonPredicate)
12558 class CoinFlipSingletonPredicate(IMP.SingletonPredicate):
12559  r"""Proxy of C++ IMP::core::CoinFlipSingletonPredicate class."""
12560 
12561  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12562 
12563  def __init__(self, *args):
12564  r"""__init__(CoinFlipSingletonPredicate self, double p, std::string name="CoinFlipSingletonPredicate%1%") -> CoinFlipSingletonPredicate"""
12565  _IMP_core.CoinFlipSingletonPredicate_swiginit(self, _IMP_core.new_CoinFlipSingletonPredicate(*args))
12566 
12567  def do_get_inputs(self, arg2, arg3):
12568  r"""do_get_inputs(CoinFlipSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12569  return _IMP_core.CoinFlipSingletonPredicate_do_get_inputs(self, arg2, arg3)
12570 
12571  def get_value(self, *args):
12572  r"""
12573  get_value(CoinFlipSingletonPredicate self, Particle a) -> int
12574  get_value(CoinFlipSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12575  """
12576  return _IMP_core.CoinFlipSingletonPredicate_get_value(self, *args)
12577 
12578  def get_value_index(self, *args):
12579  r"""
12580  get_value_index(CoinFlipSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12581  get_value_index(CoinFlipSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12582  """
12583  return _IMP_core.CoinFlipSingletonPredicate_get_value_index(self, *args)
12584 
12585  def get_version_info(self):
12586  r"""get_version_info(CoinFlipSingletonPredicate self) -> VersionInfo"""
12587  return _IMP_core.CoinFlipSingletonPredicate_get_version_info(self)
12588  __swig_destroy__ = _IMP_core.delete_CoinFlipSingletonPredicate
12589 
12590  def __str__(self):
12591  r"""__str__(CoinFlipSingletonPredicate self) -> std::string"""
12592  return _IMP_core.CoinFlipSingletonPredicate___str__(self)
12593 
12594  def __repr__(self):
12595  r"""__repr__(CoinFlipSingletonPredicate self) -> std::string"""
12596  return _IMP_core.CoinFlipSingletonPredicate___repr__(self)
12597 
12598  @staticmethod
12599  def get_from(o):
12600  return _object_cast_to_CoinFlipSingletonPredicate(o)
12601 
12602 
12603 # Register CoinFlipSingletonPredicate in _IMP_core:
12604 _IMP_core.CoinFlipSingletonPredicate_swigregister(CoinFlipSingletonPredicate)
12605 class ConstantPairPredicate(IMP.PairPredicate):
12606  r"""Proxy of C++ IMP::core::ConstantPairPredicate class."""
12607 
12608  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12609 
12610  def __init__(self, *args):
12611  r"""
12612  __init__(ConstantPairPredicate self, int v, std::string name="ConstPairPredicate%1%") -> ConstantPairPredicate
12613  __init__(ConstantPairPredicate self) -> ConstantPairPredicate
12614  """
12615  _IMP_core.ConstantPairPredicate_swiginit(self, _IMP_core.new_ConstantPairPredicate(*args))
12616 
12617  def do_get_inputs(self, arg2, arg3):
12618  r"""do_get_inputs(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12619  return _IMP_core.ConstantPairPredicate_do_get_inputs(self, arg2, arg3)
12620 
12621  def get_value(self, *args):
12622  r"""
12623  get_value(ConstantPairPredicate self, IMP::ParticlePair const & a) -> int
12624  get_value(ConstantPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12625  """
12626  return _IMP_core.ConstantPairPredicate_get_value(self, *args)
12627 
12628  def get_value_index(self, *args):
12629  r"""
12630  get_value_index(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12631  get_value_index(ConstantPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12632  """
12633  return _IMP_core.ConstantPairPredicate_get_value_index(self, *args)
12634 
12635  def get_version_info(self):
12636  r"""get_version_info(ConstantPairPredicate self) -> VersionInfo"""
12637  return _IMP_core.ConstantPairPredicate_get_version_info(self)
12638  __swig_destroy__ = _IMP_core.delete_ConstantPairPredicate
12639 
12640  def __str__(self):
12641  r"""__str__(ConstantPairPredicate self) -> std::string"""
12642  return _IMP_core.ConstantPairPredicate___str__(self)
12643 
12644  def __repr__(self):
12645  r"""__repr__(ConstantPairPredicate self) -> std::string"""
12646  return _IMP_core.ConstantPairPredicate___repr__(self)
12647 
12648  @staticmethod
12649  def get_from(o):
12650  return _object_cast_to_ConstantPairPredicate(o)
12651 
12652 
12653  def _get_as_binary(self):
12654  r"""_get_as_binary(ConstantPairPredicate self) -> PyObject *"""
12655  return _IMP_core.ConstantPairPredicate__get_as_binary(self)
12656 
12657  def _set_from_binary(self, p):
12658  r"""_set_from_binary(ConstantPairPredicate self, PyObject * p)"""
12659  return _IMP_core.ConstantPairPredicate__set_from_binary(self, p)
12660 
12661  def __getstate__(self):
12662  p = self._get_as_binary()
12663  if len(self.__dict__) > 1:
12664  d = self.__dict__.copy()
12665  del d['this']
12666  p = (d, p)
12667  return p
12668 
12669  def __setstate__(self, p):
12670  if not hasattr(self, 'this'):
12671  self.__init__()
12672  if isinstance(p, tuple):
12673  d, p = p
12674  self.__dict__.update(d)
12675  return self._set_from_binary(p)
12676 
12677 
12678 # Register ConstantPairPredicate in _IMP_core:
12679 _IMP_core.ConstantPairPredicate_swigregister(ConstantPairPredicate)
12680 class UnorderedTypePairPredicate(IMP.PairPredicate):
12681  r"""Proxy of C++ IMP::core::UnorderedTypePairPredicate class."""
12682 
12683  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12684 
12685  def __init__(self, *args):
12686  r"""__init__(UnorderedTypePairPredicate self, std::string name="UnorderedTypePairPredicate%1%") -> UnorderedTypePairPredicate"""
12687  _IMP_core.UnorderedTypePairPredicate_swiginit(self, _IMP_core.new_UnorderedTypePairPredicate(*args))
12688 
12689  def do_get_inputs(self, m, pis):
12690  r"""do_get_inputs(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12691  return _IMP_core.UnorderedTypePairPredicate_do_get_inputs(self, m, pis)
12692 
12693  def get_value(self, *args):
12694  r"""
12695  get_value(UnorderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12696  get_value(UnorderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12697  """
12698  return _IMP_core.UnorderedTypePairPredicate_get_value(self, *args)
12699 
12700  def get_value_index(self, *args):
12701  r"""
12702  get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12703  get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12704  """
12705  return _IMP_core.UnorderedTypePairPredicate_get_value_index(self, *args)
12706 
12707  def get_version_info(self):
12708  r"""get_version_info(UnorderedTypePairPredicate self) -> VersionInfo"""
12709  return _IMP_core.UnorderedTypePairPredicate_get_version_info(self)
12710  __swig_destroy__ = _IMP_core.delete_UnorderedTypePairPredicate
12711 
12712  def __str__(self):
12713  r"""__str__(UnorderedTypePairPredicate self) -> std::string"""
12714  return _IMP_core.UnorderedTypePairPredicate___str__(self)
12715 
12716  def __repr__(self):
12717  r"""__repr__(UnorderedTypePairPredicate self) -> std::string"""
12718  return _IMP_core.UnorderedTypePairPredicate___repr__(self)
12719 
12720  @staticmethod
12721  def get_from(o):
12722  return _object_cast_to_UnorderedTypePairPredicate(o)
12723 
12724 
12725  def _get_as_binary(self):
12726  r"""_get_as_binary(UnorderedTypePairPredicate self) -> PyObject *"""
12727  return _IMP_core.UnorderedTypePairPredicate__get_as_binary(self)
12728 
12729  def _set_from_binary(self, p):
12730  r"""_set_from_binary(UnorderedTypePairPredicate self, PyObject * p)"""
12731  return _IMP_core.UnorderedTypePairPredicate__set_from_binary(self, p)
12732 
12733  def __getstate__(self):
12734  p = self._get_as_binary()
12735  if len(self.__dict__) > 1:
12736  d = self.__dict__.copy()
12737  del d['this']
12738  p = (d, p)
12739  return p
12740 
12741  def __setstate__(self, p):
12742  if not hasattr(self, 'this'):
12743  self.__init__()
12744  if isinstance(p, tuple):
12745  d, p = p
12746  self.__dict__.update(d)
12747  return self._set_from_binary(p)
12748 
12749 
12750 # Register UnorderedTypePairPredicate in _IMP_core:
12751 _IMP_core.UnorderedTypePairPredicate_swigregister(UnorderedTypePairPredicate)
12752 class OrderedTypePairPredicate(IMP.PairPredicate):
12753  r"""Proxy of C++ IMP::core::OrderedTypePairPredicate class."""
12754 
12755  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12756 
12757  def __init__(self, *args):
12758  r"""__init__(OrderedTypePairPredicate self, std::string name="OrderedTypePairPredicate%1%") -> OrderedTypePairPredicate"""
12759  _IMP_core.OrderedTypePairPredicate_swiginit(self, _IMP_core.new_OrderedTypePairPredicate(*args))
12760 
12761  def do_get_inputs(self, m, pis):
12762  r"""do_get_inputs(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12763  return _IMP_core.OrderedTypePairPredicate_do_get_inputs(self, m, pis)
12764 
12765  def get_value(self, *args):
12766  r"""
12767  get_value(OrderedTypePairPredicate self, IMP::core::ParticleTypes const & types) -> int
12768  get_value(OrderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12769  get_value(OrderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12770  """
12771  return _IMP_core.OrderedTypePairPredicate_get_value(self, *args)
12772 
12773  def get_value_index(self, *args):
12774  r"""
12775  get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12776  get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12777  """
12778  return _IMP_core.OrderedTypePairPredicate_get_value_index(self, *args)
12779 
12780  def get_version_info(self):
12781  r"""get_version_info(OrderedTypePairPredicate self) -> VersionInfo"""
12782  return _IMP_core.OrderedTypePairPredicate_get_version_info(self)
12783  __swig_destroy__ = _IMP_core.delete_OrderedTypePairPredicate
12784 
12785  def __str__(self):
12786  r"""__str__(OrderedTypePairPredicate self) -> std::string"""
12787  return _IMP_core.OrderedTypePairPredicate___str__(self)
12788 
12789  def __repr__(self):
12790  r"""__repr__(OrderedTypePairPredicate self) -> std::string"""
12791  return _IMP_core.OrderedTypePairPredicate___repr__(self)
12792 
12793  @staticmethod
12794  def get_from(o):
12795  return _object_cast_to_OrderedTypePairPredicate(o)
12796 
12797 
12798 # Register OrderedTypePairPredicate in _IMP_core:
12799 _IMP_core.OrderedTypePairPredicate_swigregister(OrderedTypePairPredicate)
12800 class AllSamePairPredicate(IMP.PairPredicate):
12801  r"""Proxy of C++ IMP::core::AllSamePairPredicate class."""
12802 
12803  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12804 
12805  def __init__(self, *args):
12806  r"""__init__(AllSamePairPredicate self, std::string name="AllSamePairPredicate%1%") -> AllSamePairPredicate"""
12807  _IMP_core.AllSamePairPredicate_swiginit(self, _IMP_core.new_AllSamePairPredicate(*args))
12808 
12809  def do_get_inputs(self, arg2, arg3):
12810  r"""do_get_inputs(AllSamePairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12811  return _IMP_core.AllSamePairPredicate_do_get_inputs(self, arg2, arg3)
12812 
12813  def get_value(self, *args):
12814  r"""
12815  get_value(AllSamePairPredicate self, IMP::ParticlePair const & a) -> int
12816  get_value(AllSamePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12817  """
12818  return _IMP_core.AllSamePairPredicate_get_value(self, *args)
12819 
12820  def get_value_index(self, *args):
12821  r"""
12822  get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12823  get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12824  """
12825  return _IMP_core.AllSamePairPredicate_get_value_index(self, *args)
12826 
12827  def get_version_info(self):
12828  r"""get_version_info(AllSamePairPredicate self) -> VersionInfo"""
12829  return _IMP_core.AllSamePairPredicate_get_version_info(self)
12830  __swig_destroy__ = _IMP_core.delete_AllSamePairPredicate
12831 
12832  def __str__(self):
12833  r"""__str__(AllSamePairPredicate self) -> std::string"""
12834  return _IMP_core.AllSamePairPredicate___str__(self)
12835 
12836  def __repr__(self):
12837  r"""__repr__(AllSamePairPredicate self) -> std::string"""
12838  return _IMP_core.AllSamePairPredicate___repr__(self)
12839 
12840  @staticmethod
12841  def get_from(o):
12842  return _object_cast_to_AllSamePairPredicate(o)
12843 
12844 
12845  def _get_as_binary(self):
12846  r"""_get_as_binary(AllSamePairPredicate self) -> PyObject *"""
12847  return _IMP_core.AllSamePairPredicate__get_as_binary(self)
12848 
12849  def _set_from_binary(self, p):
12850  r"""_set_from_binary(AllSamePairPredicate self, PyObject * p)"""
12851  return _IMP_core.AllSamePairPredicate__set_from_binary(self, p)
12852 
12853  def __getstate__(self):
12854  p = self._get_as_binary()
12855  if len(self.__dict__) > 1:
12856  d = self.__dict__.copy()
12857  del d['this']
12858  p = (d, p)
12859  return p
12860 
12861  def __setstate__(self, p):
12862  if not hasattr(self, 'this'):
12863  self.__init__()
12864  if isinstance(p, tuple):
12865  d, p = p
12866  self.__dict__.update(d)
12867  return self._set_from_binary(p)
12868 
12869 
12870 # Register AllSamePairPredicate in _IMP_core:
12871 _IMP_core.AllSamePairPredicate_swigregister(AllSamePairPredicate)
12872 class CoinFlipPairPredicate(IMP.PairPredicate):
12873  r"""Proxy of C++ IMP::core::CoinFlipPairPredicate class."""
12874 
12875  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12876 
12877  def __init__(self, *args):
12878  r"""__init__(CoinFlipPairPredicate self, double p, std::string name="CoinFlipPairPredicate%1%") -> CoinFlipPairPredicate"""
12879  _IMP_core.CoinFlipPairPredicate_swiginit(self, _IMP_core.new_CoinFlipPairPredicate(*args))
12880 
12881  def do_get_inputs(self, arg2, arg3):
12882  r"""do_get_inputs(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12883  return _IMP_core.CoinFlipPairPredicate_do_get_inputs(self, arg2, arg3)
12884 
12885  def get_value(self, *args):
12886  r"""
12887  get_value(CoinFlipPairPredicate self, IMP::ParticlePair const & a) -> int
12888  get_value(CoinFlipPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12889  """
12890  return _IMP_core.CoinFlipPairPredicate_get_value(self, *args)
12891 
12892  def get_value_index(self, *args):
12893  r"""
12894  get_value_index(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12895  get_value_index(CoinFlipPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12896  """
12897  return _IMP_core.CoinFlipPairPredicate_get_value_index(self, *args)
12898 
12899  def get_version_info(self):
12900  r"""get_version_info(CoinFlipPairPredicate self) -> VersionInfo"""
12901  return _IMP_core.CoinFlipPairPredicate_get_version_info(self)
12902  __swig_destroy__ = _IMP_core.delete_CoinFlipPairPredicate
12903 
12904  def __str__(self):
12905  r"""__str__(CoinFlipPairPredicate self) -> std::string"""
12906  return _IMP_core.CoinFlipPairPredicate___str__(self)
12907 
12908  def __repr__(self):
12909  r"""__repr__(CoinFlipPairPredicate self) -> std::string"""
12910  return _IMP_core.CoinFlipPairPredicate___repr__(self)
12911 
12912  @staticmethod
12913  def get_from(o):
12914  return _object_cast_to_CoinFlipPairPredicate(o)
12915 
12916 
12917 # Register CoinFlipPairPredicate in _IMP_core:
12918 _IMP_core.CoinFlipPairPredicate_swigregister(CoinFlipPairPredicate)
12919 class ConstantTripletPredicate(IMP.TripletPredicate):
12920  r"""Proxy of C++ IMP::core::ConstantTripletPredicate class."""
12921 
12922  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12923 
12924  def __init__(self, *args):
12925  r"""
12926  __init__(ConstantTripletPredicate self, int v, std::string name="ConstTripletPredicate%1%") -> ConstantTripletPredicate
12927  __init__(ConstantTripletPredicate self) -> ConstantTripletPredicate
12928  """
12929  _IMP_core.ConstantTripletPredicate_swiginit(self, _IMP_core.new_ConstantTripletPredicate(*args))
12930 
12931  def do_get_inputs(self, arg2, arg3):
12932  r"""do_get_inputs(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12933  return _IMP_core.ConstantTripletPredicate_do_get_inputs(self, arg2, arg3)
12934 
12935  def get_value(self, *args):
12936  r"""
12937  get_value(ConstantTripletPredicate self, IMP::ParticleTriplet const & a) -> int
12938  get_value(ConstantTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
12939  """
12940  return _IMP_core.ConstantTripletPredicate_get_value(self, *args)
12941 
12942  def get_value_index(self, *args):
12943  r"""
12944  get_value_index(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
12945  get_value_index(ConstantTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
12946  """
12947  return _IMP_core.ConstantTripletPredicate_get_value_index(self, *args)
12948 
12949  def get_version_info(self):
12950  r"""get_version_info(ConstantTripletPredicate self) -> VersionInfo"""
12951  return _IMP_core.ConstantTripletPredicate_get_version_info(self)
12952  __swig_destroy__ = _IMP_core.delete_ConstantTripletPredicate
12953 
12954  def __str__(self):
12955  r"""__str__(ConstantTripletPredicate self) -> std::string"""
12956  return _IMP_core.ConstantTripletPredicate___str__(self)
12957 
12958  def __repr__(self):
12959  r"""__repr__(ConstantTripletPredicate self) -> std::string"""
12960  return _IMP_core.ConstantTripletPredicate___repr__(self)
12961 
12962  @staticmethod
12963  def get_from(o):
12964  return _object_cast_to_ConstantTripletPredicate(o)
12965 
12966 
12967  def _get_as_binary(self):
12968  r"""_get_as_binary(ConstantTripletPredicate self) -> PyObject *"""
12969  return _IMP_core.ConstantTripletPredicate__get_as_binary(self)
12970 
12971  def _set_from_binary(self, p):
12972  r"""_set_from_binary(ConstantTripletPredicate self, PyObject * p)"""
12973  return _IMP_core.ConstantTripletPredicate__set_from_binary(self, p)
12974 
12975  def __getstate__(self):
12976  p = self._get_as_binary()
12977  if len(self.__dict__) > 1:
12978  d = self.__dict__.copy()
12979  del d['this']
12980  p = (d, p)
12981  return p
12982 
12983  def __setstate__(self, p):
12984  if not hasattr(self, 'this'):
12985  self.__init__()
12986  if isinstance(p, tuple):
12987  d, p = p
12988  self.__dict__.update(d)
12989  return self._set_from_binary(p)
12990 
12991 
12992 # Register ConstantTripletPredicate in _IMP_core:
12993 _IMP_core.ConstantTripletPredicate_swigregister(ConstantTripletPredicate)
12994 class UnorderedTypeTripletPredicate(IMP.TripletPredicate):
12995  r"""Proxy of C++ IMP::core::UnorderedTypeTripletPredicate class."""
12996 
12997  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12998 
12999  def __init__(self, *args):
13000  r"""__init__(UnorderedTypeTripletPredicate self, std::string name="UnorderedTypeTripletPredicate%1%") -> UnorderedTypeTripletPredicate"""
13001  _IMP_core.UnorderedTypeTripletPredicate_swiginit(self, _IMP_core.new_UnorderedTypeTripletPredicate(*args))
13002 
13003  def do_get_inputs(self, m, pis):
13004  r"""do_get_inputs(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13005  return _IMP_core.UnorderedTypeTripletPredicate_do_get_inputs(self, m, pis)
13006 
13007  def get_value(self, *args):
13008  r"""
13009  get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13010  get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13011  """
13012  return _IMP_core.UnorderedTypeTripletPredicate_get_value(self, *args)
13013 
13014  def get_value_index(self, *args):
13015  r"""
13016  get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13017  get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13018  """
13019  return _IMP_core.UnorderedTypeTripletPredicate_get_value_index(self, *args)
13020 
13021  def get_version_info(self):
13022  r"""get_version_info(UnorderedTypeTripletPredicate self) -> VersionInfo"""
13023  return _IMP_core.UnorderedTypeTripletPredicate_get_version_info(self)
13024  __swig_destroy__ = _IMP_core.delete_UnorderedTypeTripletPredicate
13025 
13026  def __str__(self):
13027  r"""__str__(UnorderedTypeTripletPredicate self) -> std::string"""
13028  return _IMP_core.UnorderedTypeTripletPredicate___str__(self)
13029 
13030  def __repr__(self):
13031  r"""__repr__(UnorderedTypeTripletPredicate self) -> std::string"""
13032  return _IMP_core.UnorderedTypeTripletPredicate___repr__(self)
13033 
13034  @staticmethod
13035  def get_from(o):
13036  return _object_cast_to_UnorderedTypeTripletPredicate(o)
13037 
13038 
13039  def _get_as_binary(self):
13040  r"""_get_as_binary(UnorderedTypeTripletPredicate self) -> PyObject *"""
13041  return _IMP_core.UnorderedTypeTripletPredicate__get_as_binary(self)
13042 
13043  def _set_from_binary(self, p):
13044  r"""_set_from_binary(UnorderedTypeTripletPredicate self, PyObject * p)"""
13045  return _IMP_core.UnorderedTypeTripletPredicate__set_from_binary(self, p)
13046 
13047  def __getstate__(self):
13048  p = self._get_as_binary()
13049  if len(self.__dict__) > 1:
13050  d = self.__dict__.copy()
13051  del d['this']
13052  p = (d, p)
13053  return p
13054 
13055  def __setstate__(self, p):
13056  if not hasattr(self, 'this'):
13057  self.__init__()
13058  if isinstance(p, tuple):
13059  d, p = p
13060  self.__dict__.update(d)
13061  return self._set_from_binary(p)
13062 
13063 
13064 # Register UnorderedTypeTripletPredicate in _IMP_core:
13065 _IMP_core.UnorderedTypeTripletPredicate_swigregister(UnorderedTypeTripletPredicate)
13066 class OrderedTypeTripletPredicate(IMP.TripletPredicate):
13067  r"""Proxy of C++ IMP::core::OrderedTypeTripletPredicate class."""
13068 
13069  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13070 
13071  def __init__(self, *args):
13072  r"""__init__(OrderedTypeTripletPredicate self, std::string name="OrderedTypeTripletPredicate%1%") -> OrderedTypeTripletPredicate"""
13073  _IMP_core.OrderedTypeTripletPredicate_swiginit(self, _IMP_core.new_OrderedTypeTripletPredicate(*args))
13074 
13075  def do_get_inputs(self, m, pis):
13076  r"""do_get_inputs(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13077  return _IMP_core.OrderedTypeTripletPredicate_do_get_inputs(self, m, pis)
13078 
13079  def get_value(self, *args):
13080  r"""
13081  get_value(OrderedTypeTripletPredicate self, IMP::core::ParticleTypes const & types) -> int
13082  get_value(OrderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13083  get_value(OrderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13084  """
13085  return _IMP_core.OrderedTypeTripletPredicate_get_value(self, *args)
13086 
13087  def get_value_index(self, *args):
13088  r"""
13089  get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13090  get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13091  """
13092  return _IMP_core.OrderedTypeTripletPredicate_get_value_index(self, *args)
13093 
13094  def get_version_info(self):
13095  r"""get_version_info(OrderedTypeTripletPredicate self) -> VersionInfo"""
13096  return _IMP_core.OrderedTypeTripletPredicate_get_version_info(self)
13097  __swig_destroy__ = _IMP_core.delete_OrderedTypeTripletPredicate
13098 
13099  def __str__(self):
13100  r"""__str__(OrderedTypeTripletPredicate self) -> std::string"""
13101  return _IMP_core.OrderedTypeTripletPredicate___str__(self)
13102 
13103  def __repr__(self):
13104  r"""__repr__(OrderedTypeTripletPredicate self) -> std::string"""
13105  return _IMP_core.OrderedTypeTripletPredicate___repr__(self)
13106 
13107  @staticmethod
13108  def get_from(o):
13109  return _object_cast_to_OrderedTypeTripletPredicate(o)
13110 
13111 
13112 # Register OrderedTypeTripletPredicate in _IMP_core:
13113 _IMP_core.OrderedTypeTripletPredicate_swigregister(OrderedTypeTripletPredicate)
13114 class AllSameTripletPredicate(IMP.TripletPredicate):
13115  r"""Proxy of C++ IMP::core::AllSameTripletPredicate class."""
13116 
13117  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13118 
13119  def __init__(self, *args):
13120  r"""__init__(AllSameTripletPredicate self, std::string name="AllSameTripletPredicate%1%") -> AllSameTripletPredicate"""
13121  _IMP_core.AllSameTripletPredicate_swiginit(self, _IMP_core.new_AllSameTripletPredicate(*args))
13122 
13123  def do_get_inputs(self, arg2, arg3):
13124  r"""do_get_inputs(AllSameTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13125  return _IMP_core.AllSameTripletPredicate_do_get_inputs(self, arg2, arg3)
13126 
13127  def get_value(self, *args):
13128  r"""
13129  get_value(AllSameTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13130  get_value(AllSameTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13131  """
13132  return _IMP_core.AllSameTripletPredicate_get_value(self, *args)
13133 
13134  def get_value_index(self, *args):
13135  r"""
13136  get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13137  get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13138  """
13139  return _IMP_core.AllSameTripletPredicate_get_value_index(self, *args)
13140 
13141  def get_version_info(self):
13142  r"""get_version_info(AllSameTripletPredicate self) -> VersionInfo"""
13143  return _IMP_core.AllSameTripletPredicate_get_version_info(self)
13144  __swig_destroy__ = _IMP_core.delete_AllSameTripletPredicate
13145 
13146  def __str__(self):
13147  r"""__str__(AllSameTripletPredicate self) -> std::string"""
13148  return _IMP_core.AllSameTripletPredicate___str__(self)
13149 
13150  def __repr__(self):
13151  r"""__repr__(AllSameTripletPredicate self) -> std::string"""
13152  return _IMP_core.AllSameTripletPredicate___repr__(self)
13153 
13154  @staticmethod
13155  def get_from(o):
13156  return _object_cast_to_AllSameTripletPredicate(o)
13157 
13158 
13159  def _get_as_binary(self):
13160  r"""_get_as_binary(AllSameTripletPredicate self) -> PyObject *"""
13161  return _IMP_core.AllSameTripletPredicate__get_as_binary(self)
13162 
13163  def _set_from_binary(self, p):
13164  r"""_set_from_binary(AllSameTripletPredicate self, PyObject * p)"""
13165  return _IMP_core.AllSameTripletPredicate__set_from_binary(self, p)
13166 
13167  def __getstate__(self):
13168  p = self._get_as_binary()
13169  if len(self.__dict__) > 1:
13170  d = self.__dict__.copy()
13171  del d['this']
13172  p = (d, p)
13173  return p
13174 
13175  def __setstate__(self, p):
13176  if not hasattr(self, 'this'):
13177  self.__init__()
13178  if isinstance(p, tuple):
13179  d, p = p
13180  self.__dict__.update(d)
13181  return self._set_from_binary(p)
13182 
13183 
13184 # Register AllSameTripletPredicate in _IMP_core:
13185 _IMP_core.AllSameTripletPredicate_swigregister(AllSameTripletPredicate)
13186 class CoinFlipTripletPredicate(IMP.TripletPredicate):
13187  r"""Proxy of C++ IMP::core::CoinFlipTripletPredicate class."""
13188 
13189  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13190 
13191  def __init__(self, *args):
13192  r"""__init__(CoinFlipTripletPredicate self, double p, std::string name="CoinFlipTripletPredicate%1%") -> CoinFlipTripletPredicate"""
13193  _IMP_core.CoinFlipTripletPredicate_swiginit(self, _IMP_core.new_CoinFlipTripletPredicate(*args))
13194 
13195  def do_get_inputs(self, arg2, arg3):
13196  r"""do_get_inputs(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13197  return _IMP_core.CoinFlipTripletPredicate_do_get_inputs(self, arg2, arg3)
13198 
13199  def get_value(self, *args):
13200  r"""
13201  get_value(CoinFlipTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13202  get_value(CoinFlipTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13203  """
13204  return _IMP_core.CoinFlipTripletPredicate_get_value(self, *args)
13205 
13206  def get_value_index(self, *args):
13207  r"""
13208  get_value_index(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
13209  get_value_index(CoinFlipTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13210  """
13211  return _IMP_core.CoinFlipTripletPredicate_get_value_index(self, *args)
13212 
13213  def get_version_info(self):
13214  r"""get_version_info(CoinFlipTripletPredicate self) -> VersionInfo"""
13215  return _IMP_core.CoinFlipTripletPredicate_get_version_info(self)
13216  __swig_destroy__ = _IMP_core.delete_CoinFlipTripletPredicate
13217 
13218  def __str__(self):
13219  r"""__str__(CoinFlipTripletPredicate self) -> std::string"""
13220  return _IMP_core.CoinFlipTripletPredicate___str__(self)
13221 
13222  def __repr__(self):
13223  r"""__repr__(CoinFlipTripletPredicate self) -> std::string"""
13224  return _IMP_core.CoinFlipTripletPredicate___repr__(self)
13225 
13226  @staticmethod
13227  def get_from(o):
13228  return _object_cast_to_CoinFlipTripletPredicate(o)
13229 
13230 
13231 # Register CoinFlipTripletPredicate in _IMP_core:
13232 _IMP_core.CoinFlipTripletPredicate_swigregister(CoinFlipTripletPredicate)
13233 class ConstantQuadPredicate(IMP.QuadPredicate):
13234  r"""Proxy of C++ IMP::core::ConstantQuadPredicate class."""
13235 
13236  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13237 
13238  def __init__(self, *args):
13239  r"""
13240  __init__(ConstantQuadPredicate self, int v, std::string name="ConstQuadPredicate%1%") -> ConstantQuadPredicate
13241  __init__(ConstantQuadPredicate self) -> ConstantQuadPredicate
13242  """
13243  _IMP_core.ConstantQuadPredicate_swiginit(self, _IMP_core.new_ConstantQuadPredicate(*args))
13244 
13245  def do_get_inputs(self, arg2, arg3):
13246  r"""do_get_inputs(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13247  return _IMP_core.ConstantQuadPredicate_do_get_inputs(self, arg2, arg3)
13248 
13249  def get_value(self, *args):
13250  r"""
13251  get_value(ConstantQuadPredicate self, IMP::ParticleQuad const & a) -> int
13252  get_value(ConstantQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13253  """
13254  return _IMP_core.ConstantQuadPredicate_get_value(self, *args)
13255 
13256  def get_value_index(self, *args):
13257  r"""
13258  get_value_index(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13259  get_value_index(ConstantQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13260  """
13261  return _IMP_core.ConstantQuadPredicate_get_value_index(self, *args)
13262 
13263  def get_version_info(self):
13264  r"""get_version_info(ConstantQuadPredicate self) -> VersionInfo"""
13265  return _IMP_core.ConstantQuadPredicate_get_version_info(self)
13266  __swig_destroy__ = _IMP_core.delete_ConstantQuadPredicate
13267 
13268  def __str__(self):
13269  r"""__str__(ConstantQuadPredicate self) -> std::string"""
13270  return _IMP_core.ConstantQuadPredicate___str__(self)
13271 
13272  def __repr__(self):
13273  r"""__repr__(ConstantQuadPredicate self) -> std::string"""
13274  return _IMP_core.ConstantQuadPredicate___repr__(self)
13275 
13276  @staticmethod
13277  def get_from(o):
13278  return _object_cast_to_ConstantQuadPredicate(o)
13279 
13280 
13281  def _get_as_binary(self):
13282  r"""_get_as_binary(ConstantQuadPredicate self) -> PyObject *"""
13283  return _IMP_core.ConstantQuadPredicate__get_as_binary(self)
13284 
13285  def _set_from_binary(self, p):
13286  r"""_set_from_binary(ConstantQuadPredicate self, PyObject * p)"""
13287  return _IMP_core.ConstantQuadPredicate__set_from_binary(self, p)
13288 
13289  def __getstate__(self):
13290  p = self._get_as_binary()
13291  if len(self.__dict__) > 1:
13292  d = self.__dict__.copy()
13293  del d['this']
13294  p = (d, p)
13295  return p
13296 
13297  def __setstate__(self, p):
13298  if not hasattr(self, 'this'):
13299  self.__init__()
13300  if isinstance(p, tuple):
13301  d, p = p
13302  self.__dict__.update(d)
13303  return self._set_from_binary(p)
13304 
13305 
13306 # Register ConstantQuadPredicate in _IMP_core:
13307 _IMP_core.ConstantQuadPredicate_swigregister(ConstantQuadPredicate)
13308 class UnorderedTypeQuadPredicate(IMP.QuadPredicate):
13309  r"""Proxy of C++ IMP::core::UnorderedTypeQuadPredicate class."""
13310 
13311  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13312 
13313  def __init__(self, *args):
13314  r"""__init__(UnorderedTypeQuadPredicate self, std::string name="UnorderedTypeQuadPredicate%1%") -> UnorderedTypeQuadPredicate"""
13315  _IMP_core.UnorderedTypeQuadPredicate_swiginit(self, _IMP_core.new_UnorderedTypeQuadPredicate(*args))
13316 
13317  def do_get_inputs(self, m, pis):
13318  r"""do_get_inputs(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13319  return _IMP_core.UnorderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13320 
13321  def get_value(self, *args):
13322  r"""
13323  get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13324  get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13325  """
13326  return _IMP_core.UnorderedTypeQuadPredicate_get_value(self, *args)
13327 
13328  def get_value_index(self, *args):
13329  r"""
13330  get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13331  get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13332  """
13333  return _IMP_core.UnorderedTypeQuadPredicate_get_value_index(self, *args)
13334 
13335  def get_version_info(self):
13336  r"""get_version_info(UnorderedTypeQuadPredicate self) -> VersionInfo"""
13337  return _IMP_core.UnorderedTypeQuadPredicate_get_version_info(self)
13338  __swig_destroy__ = _IMP_core.delete_UnorderedTypeQuadPredicate
13339 
13340  def __str__(self):
13341  r"""__str__(UnorderedTypeQuadPredicate self) -> std::string"""
13342  return _IMP_core.UnorderedTypeQuadPredicate___str__(self)
13343 
13344  def __repr__(self):
13345  r"""__repr__(UnorderedTypeQuadPredicate self) -> std::string"""
13346  return _IMP_core.UnorderedTypeQuadPredicate___repr__(self)
13347 
13348  @staticmethod
13349  def get_from(o):
13350  return _object_cast_to_UnorderedTypeQuadPredicate(o)
13351 
13352 
13353  def _get_as_binary(self):
13354  r"""_get_as_binary(UnorderedTypeQuadPredicate self) -> PyObject *"""
13355  return _IMP_core.UnorderedTypeQuadPredicate__get_as_binary(self)
13356 
13357  def _set_from_binary(self, p):
13358  r"""_set_from_binary(UnorderedTypeQuadPredicate self, PyObject * p)"""
13359  return _IMP_core.UnorderedTypeQuadPredicate__set_from_binary(self, p)
13360 
13361  def __getstate__(self):
13362  p = self._get_as_binary()
13363  if len(self.__dict__) > 1:
13364  d = self.__dict__.copy()
13365  del d['this']
13366  p = (d, p)
13367  return p
13368 
13369  def __setstate__(self, p):
13370  if not hasattr(self, 'this'):
13371  self.__init__()
13372  if isinstance(p, tuple):
13373  d, p = p
13374  self.__dict__.update(d)
13375  return self._set_from_binary(p)
13376 
13377 
13378 # Register UnorderedTypeQuadPredicate in _IMP_core:
13379 _IMP_core.UnorderedTypeQuadPredicate_swigregister(UnorderedTypeQuadPredicate)
13380 class OrderedTypeQuadPredicate(IMP.QuadPredicate):
13381  r"""Proxy of C++ IMP::core::OrderedTypeQuadPredicate class."""
13382 
13383  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13384 
13385  def __init__(self, *args):
13386  r"""__init__(OrderedTypeQuadPredicate self, std::string name="OrderedTypeQuadPredicate%1%") -> OrderedTypeQuadPredicate"""
13387  _IMP_core.OrderedTypeQuadPredicate_swiginit(self, _IMP_core.new_OrderedTypeQuadPredicate(*args))
13388 
13389  def do_get_inputs(self, m, pis):
13390  r"""do_get_inputs(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13391  return _IMP_core.OrderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13392 
13393  def get_value(self, *args):
13394  r"""
13395  get_value(OrderedTypeQuadPredicate self, IMP::core::ParticleTypes const & types) -> int
13396  get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13397  get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13398  """
13399  return _IMP_core.OrderedTypeQuadPredicate_get_value(self, *args)
13400 
13401  def get_value_index(self, *args):
13402  r"""
13403  get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13404  get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13405  """
13406  return _IMP_core.OrderedTypeQuadPredicate_get_value_index(self, *args)
13407 
13408  def get_version_info(self):
13409  r"""get_version_info(OrderedTypeQuadPredicate self) -> VersionInfo"""
13410  return _IMP_core.OrderedTypeQuadPredicate_get_version_info(self)
13411  __swig_destroy__ = _IMP_core.delete_OrderedTypeQuadPredicate
13412 
13413  def __str__(self):
13414  r"""__str__(OrderedTypeQuadPredicate self) -> std::string"""
13415  return _IMP_core.OrderedTypeQuadPredicate___str__(self)
13416 
13417  def __repr__(self):
13418  r"""__repr__(OrderedTypeQuadPredicate self) -> std::string"""
13419  return _IMP_core.OrderedTypeQuadPredicate___repr__(self)
13420 
13421  @staticmethod
13422  def get_from(o):
13423  return _object_cast_to_OrderedTypeQuadPredicate(o)
13424 
13425 
13426 # Register OrderedTypeQuadPredicate in _IMP_core:
13427 _IMP_core.OrderedTypeQuadPredicate_swigregister(OrderedTypeQuadPredicate)
13428 class AllSameQuadPredicate(IMP.QuadPredicate):
13429  r"""Proxy of C++ IMP::core::AllSameQuadPredicate class."""
13430 
13431  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13432 
13433  def __init__(self, *args):
13434  r"""__init__(AllSameQuadPredicate self, std::string name="AllSameQuadPredicate%1%") -> AllSameQuadPredicate"""
13435  _IMP_core.AllSameQuadPredicate_swiginit(self, _IMP_core.new_AllSameQuadPredicate(*args))
13436 
13437  def do_get_inputs(self, arg2, arg3):
13438  r"""do_get_inputs(AllSameQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13439  return _IMP_core.AllSameQuadPredicate_do_get_inputs(self, arg2, arg3)
13440 
13441  def get_value(self, *args):
13442  r"""
13443  get_value(AllSameQuadPredicate self, IMP::ParticleQuad const & a) -> int
13444  get_value(AllSameQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13445  """
13446  return _IMP_core.AllSameQuadPredicate_get_value(self, *args)
13447 
13448  def get_value_index(self, *args):
13449  r"""
13450  get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13451  get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13452  """
13453  return _IMP_core.AllSameQuadPredicate_get_value_index(self, *args)
13454 
13455  def get_version_info(self):
13456  r"""get_version_info(AllSameQuadPredicate self) -> VersionInfo"""
13457  return _IMP_core.AllSameQuadPredicate_get_version_info(self)
13458  __swig_destroy__ = _IMP_core.delete_AllSameQuadPredicate
13459 
13460  def __str__(self):
13461  r"""__str__(AllSameQuadPredicate self) -> std::string"""
13462  return _IMP_core.AllSameQuadPredicate___str__(self)
13463 
13464  def __repr__(self):
13465  r"""__repr__(AllSameQuadPredicate self) -> std::string"""
13466  return _IMP_core.AllSameQuadPredicate___repr__(self)
13467 
13468  @staticmethod
13469  def get_from(o):
13470  return _object_cast_to_AllSameQuadPredicate(o)
13471 
13472 
13473  def _get_as_binary(self):
13474  r"""_get_as_binary(AllSameQuadPredicate self) -> PyObject *"""
13475  return _IMP_core.AllSameQuadPredicate__get_as_binary(self)
13476 
13477  def _set_from_binary(self, p):
13478  r"""_set_from_binary(AllSameQuadPredicate self, PyObject * p)"""
13479  return _IMP_core.AllSameQuadPredicate__set_from_binary(self, p)
13480 
13481  def __getstate__(self):
13482  p = self._get_as_binary()
13483  if len(self.__dict__) > 1:
13484  d = self.__dict__.copy()
13485  del d['this']
13486  p = (d, p)
13487  return p
13488 
13489  def __setstate__(self, p):
13490  if not hasattr(self, 'this'):
13491  self.__init__()
13492  if isinstance(p, tuple):
13493  d, p = p
13494  self.__dict__.update(d)
13495  return self._set_from_binary(p)
13496 
13497 
13498 # Register AllSameQuadPredicate in _IMP_core:
13499 _IMP_core.AllSameQuadPredicate_swigregister(AllSameQuadPredicate)
13500 class CoinFlipQuadPredicate(IMP.QuadPredicate):
13501  r"""Proxy of C++ IMP::core::CoinFlipQuadPredicate class."""
13502 
13503  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13504 
13505  def __init__(self, *args):
13506  r"""__init__(CoinFlipQuadPredicate self, double p, std::string name="CoinFlipQuadPredicate%1%") -> CoinFlipQuadPredicate"""
13507  _IMP_core.CoinFlipQuadPredicate_swiginit(self, _IMP_core.new_CoinFlipQuadPredicate(*args))
13508 
13509  def do_get_inputs(self, arg2, arg3):
13510  r"""do_get_inputs(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13511  return _IMP_core.CoinFlipQuadPredicate_do_get_inputs(self, arg2, arg3)
13512 
13513  def get_value(self, *args):
13514  r"""
13515  get_value(CoinFlipQuadPredicate self, IMP::ParticleQuad const & a) -> int
13516  get_value(CoinFlipQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13517  """
13518  return _IMP_core.CoinFlipQuadPredicate_get_value(self, *args)
13519 
13520  def get_value_index(self, *args):
13521  r"""
13522  get_value_index(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13523  get_value_index(CoinFlipQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13524  """
13525  return _IMP_core.CoinFlipQuadPredicate_get_value_index(self, *args)
13526 
13527  def get_version_info(self):
13528  r"""get_version_info(CoinFlipQuadPredicate self) -> VersionInfo"""
13529  return _IMP_core.CoinFlipQuadPredicate_get_version_info(self)
13530  __swig_destroy__ = _IMP_core.delete_CoinFlipQuadPredicate
13531 
13532  def __str__(self):
13533  r"""__str__(CoinFlipQuadPredicate self) -> std::string"""
13534  return _IMP_core.CoinFlipQuadPredicate___str__(self)
13535 
13536  def __repr__(self):
13537  r"""__repr__(CoinFlipQuadPredicate self) -> std::string"""
13538  return _IMP_core.CoinFlipQuadPredicate___repr__(self)
13539 
13540  @staticmethod
13541  def get_from(o):
13542  return _object_cast_to_CoinFlipQuadPredicate(o)
13543 
13544 
13545 # Register CoinFlipQuadPredicate in _IMP_core:
13546 _IMP_core.CoinFlipQuadPredicate_swigregister(CoinFlipQuadPredicate)
13547 class InBoundingBox3DSingletonPredicate(IMP.SingletonPredicate):
13548  r"""Proxy of C++ IMP::core::InBoundingBox3DSingletonPredicate class."""
13549 
13550  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13551 
13552  def __init__(self, *args):
13553  r"""__init__(InBoundingBox3DSingletonPredicate self, BoundingBox3D bb, std::string name="InBoundingBox3DSingletonPredicate%1%") -> InBoundingBox3DSingletonPredicate"""
13554  _IMP_core.InBoundingBox3DSingletonPredicate_swiginit(self, _IMP_core.new_InBoundingBox3DSingletonPredicate(*args))
13555 
13556  def do_get_inputs(self, m, pi):
13557  r"""do_get_inputs(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13558  return _IMP_core.InBoundingBox3DSingletonPredicate_do_get_inputs(self, m, pi)
13559 
13560  def get_value(self, *args):
13561  r"""
13562  get_value(InBoundingBox3DSingletonPredicate self, Particle a) -> int
13563  get_value(InBoundingBox3DSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13564  """
13565  return _IMP_core.InBoundingBox3DSingletonPredicate_get_value(self, *args)
13566 
13567  def get_value_index(self, *args):
13568  r"""
13569  get_value_index(InBoundingBox3DSingletonPredicate self, Model m, ParticleIndex pi) -> int
13570  get_value_index(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13571  """
13572  return _IMP_core.InBoundingBox3DSingletonPredicate_get_value_index(self, *args)
13573 
13574  def get_version_info(self):
13575  r"""get_version_info(InBoundingBox3DSingletonPredicate self) -> VersionInfo"""
13576  return _IMP_core.InBoundingBox3DSingletonPredicate_get_version_info(self)
13577  __swig_destroy__ = _IMP_core.delete_InBoundingBox3DSingletonPredicate
13578 
13579  def __str__(self):
13580  r"""__str__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13581  return _IMP_core.InBoundingBox3DSingletonPredicate___str__(self)
13582 
13583  def __repr__(self):
13584  r"""__repr__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13585  return _IMP_core.InBoundingBox3DSingletonPredicate___repr__(self)
13586 
13587  @staticmethod
13588  def get_from(o):
13589  return _object_cast_to_InBoundingBox3DSingletonPredicate(o)
13590 
13591 
13592 # Register InBoundingBox3DSingletonPredicate in _IMP_core:
13593 _IMP_core.InBoundingBox3DSingletonPredicate_swigregister(InBoundingBox3DSingletonPredicate)
13594 class AttributeSingletonPredicate(IMP.SingletonPredicate):
13595  r"""Proxy of C++ IMP::core::AttributeSingletonPredicate class."""
13596 
13597  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13598 
13599  def __init__(self, *args):
13600  r"""__init__(AttributeSingletonPredicate self, IntKey bb, std::string name="AttributeSingletonPredicate%1%") -> AttributeSingletonPredicate"""
13601  _IMP_core.AttributeSingletonPredicate_swiginit(self, _IMP_core.new_AttributeSingletonPredicate(*args))
13602 
13603  def do_get_inputs(self, m, pi):
13604  r"""do_get_inputs(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13605  return _IMP_core.AttributeSingletonPredicate_do_get_inputs(self, m, pi)
13606 
13607  def get_value(self, *args):
13608  r"""
13609  get_value(AttributeSingletonPredicate self, Particle a) -> int
13610  get_value(AttributeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13611  """
13612  return _IMP_core.AttributeSingletonPredicate_get_value(self, *args)
13613 
13614  def get_value_index(self, *args):
13615  r"""
13616  get_value_index(AttributeSingletonPredicate self, Model m, ParticleIndex pi) -> int
13617  get_value_index(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13618  """
13619  return _IMP_core.AttributeSingletonPredicate_get_value_index(self, *args)
13620 
13621  def get_version_info(self):
13622  r"""get_version_info(AttributeSingletonPredicate self) -> VersionInfo"""
13623  return _IMP_core.AttributeSingletonPredicate_get_version_info(self)
13624  __swig_destroy__ = _IMP_core.delete_AttributeSingletonPredicate
13625 
13626  def __str__(self):
13627  r"""__str__(AttributeSingletonPredicate self) -> std::string"""
13628  return _IMP_core.AttributeSingletonPredicate___str__(self)
13629 
13630  def __repr__(self):
13631  r"""__repr__(AttributeSingletonPredicate self) -> std::string"""
13632  return _IMP_core.AttributeSingletonPredicate___repr__(self)
13633 
13634  @staticmethod
13635  def get_from(o):
13636  return _object_cast_to_AttributeSingletonPredicate(o)
13637 
13638 
13639 # Register AttributeSingletonPredicate in _IMP_core:
13640 _IMP_core.AttributeSingletonPredicate_swigregister(AttributeSingletonPredicate)
13641 class IsCollisionPairPredicate(IMP.PairPredicate):
13642  r"""Proxy of C++ IMP::core::IsCollisionPairPredicate class."""
13643 
13644  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13645 
13646  def __init__(self, *args):
13647  r"""__init__(IsCollisionPairPredicate self, std::string name="CollisionPairPredicate%1%") -> IsCollisionPairPredicate"""
13648  _IMP_core.IsCollisionPairPredicate_swiginit(self, _IMP_core.new_IsCollisionPairPredicate(*args))
13649 
13650  def do_get_inputs(self, m, pi):
13651  r"""do_get_inputs(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13652  return _IMP_core.IsCollisionPairPredicate_do_get_inputs(self, m, pi)
13653 
13654  def get_value(self, *args):
13655  r"""
13656  get_value(IsCollisionPairPredicate self, IMP::ParticlePair const & a) -> int
13657  get_value(IsCollisionPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
13658  """
13659  return _IMP_core.IsCollisionPairPredicate_get_value(self, *args)
13660 
13661  def get_value_index(self, *args):
13662  r"""
13663  get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
13664  get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
13665  """
13666  return _IMP_core.IsCollisionPairPredicate_get_value_index(self, *args)
13667 
13668  def get_version_info(self):
13669  r"""get_version_info(IsCollisionPairPredicate self) -> VersionInfo"""
13670  return _IMP_core.IsCollisionPairPredicate_get_version_info(self)
13671  __swig_destroy__ = _IMP_core.delete_IsCollisionPairPredicate
13672 
13673  def __str__(self):
13674  r"""__str__(IsCollisionPairPredicate self) -> std::string"""
13675  return _IMP_core.IsCollisionPairPredicate___str__(self)
13676 
13677  def __repr__(self):
13678  r"""__repr__(IsCollisionPairPredicate self) -> std::string"""
13679  return _IMP_core.IsCollisionPairPredicate___repr__(self)
13680 
13681  @staticmethod
13682  def get_from(o):
13683  return _object_cast_to_IsCollisionPairPredicate(o)
13684 
13685 
13686 # Register IsCollisionPairPredicate in _IMP_core:
13687 _IMP_core.IsCollisionPairPredicate_swigregister(IsCollisionPairPredicate)
13688 class AngleRestraint(TripletRestraint):
13689  r"""Proxy of C++ IMP::core::AngleRestraint class."""
13690 
13691  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13692 
13693  def __init__(self, *args):
13694  r"""
13695  __init__(AngleRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3) -> AngleRestraint
13696  __init__(AngleRestraint self) -> AngleRestraint
13697  """
13698  _IMP_core.AngleRestraint_swiginit(self, _IMP_core.new_AngleRestraint(*args))
13699  __swig_destroy__ = _IMP_core.delete_AngleRestraint
13700 
13701  def __str__(self):
13702  r"""__str__(AngleRestraint self) -> std::string"""
13703  return _IMP_core.AngleRestraint___str__(self)
13704 
13705  def __repr__(self):
13706  r"""__repr__(AngleRestraint self) -> std::string"""
13707  return _IMP_core.AngleRestraint___repr__(self)
13708 
13709  @staticmethod
13710  def get_from(o):
13711  return _object_cast_to_AngleRestraint(o)
13712 
13713 
13714  def _get_as_binary(self):
13715  r"""_get_as_binary(AngleRestraint self) -> PyObject *"""
13716  return _IMP_core.AngleRestraint__get_as_binary(self)
13717 
13718  def _set_from_binary(self, p):
13719  r"""_set_from_binary(AngleRestraint self, PyObject * p)"""
13720  return _IMP_core.AngleRestraint__set_from_binary(self, p)
13721 
13722  def __getstate__(self):
13723  p = self._get_as_binary()
13724  if len(self.__dict__) > 1:
13725  d = self.__dict__.copy()
13726  del d['this']
13727  p = (d, p)
13728  return p
13729 
13730  def __setstate__(self, p):
13731  if not hasattr(self, 'this'):
13732  self.__init__()
13733  if isinstance(p, tuple):
13734  d, p = p
13735  self.__dict__.update(d)
13736  return self._set_from_binary(p)
13737 
13738 
13739 # Register AngleRestraint in _IMP_core:
13740 _IMP_core.AngleRestraint_swigregister(AngleRestraint)
13741 class DihedralRestraint(QuadRestraint):
13742  r"""Proxy of C++ IMP::core::DihedralRestraint class."""
13743 
13744  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13745 
13746  def __init__(self, *args):
13747  r"""
13748  __init__(DihedralRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3, _ParticleIndexAdaptor p4) -> DihedralRestraint
13749  __init__(DihedralRestraint self) -> DihedralRestraint
13750  """
13751  _IMP_core.DihedralRestraint_swiginit(self, _IMP_core.new_DihedralRestraint(*args))
13752  __swig_destroy__ = _IMP_core.delete_DihedralRestraint
13753 
13754  def __str__(self):
13755  r"""__str__(DihedralRestraint self) -> std::string"""
13756  return _IMP_core.DihedralRestraint___str__(self)
13757 
13758  def __repr__(self):
13759  r"""__repr__(DihedralRestraint self) -> std::string"""
13760  return _IMP_core.DihedralRestraint___repr__(self)
13761 
13762  @staticmethod
13763  def get_from(o):
13764  return _object_cast_to_DihedralRestraint(o)
13765 
13766 
13767  def _get_as_binary(self):
13768  r"""_get_as_binary(DihedralRestraint self) -> PyObject *"""
13769  return _IMP_core.DihedralRestraint__get_as_binary(self)
13770 
13771  def _set_from_binary(self, p):
13772  r"""_set_from_binary(DihedralRestraint self, PyObject * p)"""
13773  return _IMP_core.DihedralRestraint__set_from_binary(self, p)
13774 
13775  def __getstate__(self):
13776  p = self._get_as_binary()
13777  if len(self.__dict__) > 1:
13778  d = self.__dict__.copy()
13779  del d['this']
13780  p = (d, p)
13781  return p
13782 
13783  def __setstate__(self, p):
13784  if not hasattr(self, 'this'):
13785  self.__init__()
13786  if isinstance(p, tuple):
13787  d, p = p
13788  self.__dict__.update(d)
13789  return self._set_from_binary(p)
13790 
13791 
13792 # Register DihedralRestraint in _IMP_core:
13793 _IMP_core.DihedralRestraint_swigregister(DihedralRestraint)
13794 class RigidBodyMover(MonteCarloMover):
13795  r"""Proxy of C++ IMP::core::RigidBodyMover class."""
13796 
13797  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13798 
13799  def __init__(self, *args):
13800  r"""
13801  __init__(RigidBodyMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation) -> RigidBodyMover
13802  __init__(RigidBodyMover self) -> RigidBodyMover
13803  """
13804  _IMP_core.RigidBodyMover_swiginit(self, _IMP_core.new_RigidBodyMover(*args))
13805 
13806  def set_maximum_translation(self, mt):
13807  r"""set_maximum_translation(RigidBodyMover self, IMP::Float mt)"""
13808  return _IMP_core.RigidBodyMover_set_maximum_translation(self, mt)
13809 
13810  def set_maximum_rotation(self, mr):
13811  r"""set_maximum_rotation(RigidBodyMover self, IMP::Float mr)"""
13812  return _IMP_core.RigidBodyMover_set_maximum_rotation(self, mr)
13813 
13814  def get_maximum_translation(self):
13815  r"""get_maximum_translation(RigidBodyMover self) -> IMP::Float"""
13816  return _IMP_core.RigidBodyMover_get_maximum_translation(self)
13817 
13818  def get_maximum_rotation(self):
13819  r"""get_maximum_rotation(RigidBodyMover self) -> IMP::Float"""
13820  return _IMP_core.RigidBodyMover_get_maximum_rotation(self)
13821 
13822  def get_index(self):
13823  r"""get_index(RigidBodyMover self) -> ParticleIndex"""
13824  return _IMP_core.RigidBodyMover_get_index(self)
13825 
13826  def get_version_info(self):
13827  r"""get_version_info(RigidBodyMover self) -> VersionInfo"""
13828  return _IMP_core.RigidBodyMover_get_version_info(self)
13829  __swig_destroy__ = _IMP_core.delete_RigidBodyMover
13830 
13831  def __str__(self):
13832  r"""__str__(RigidBodyMover self) -> std::string"""
13833  return _IMP_core.RigidBodyMover___str__(self)
13834 
13835  def __repr__(self):
13836  r"""__repr__(RigidBodyMover self) -> std::string"""
13837  return _IMP_core.RigidBodyMover___repr__(self)
13838 
13839  @staticmethod
13840  def get_from(o):
13841  return _object_cast_to_RigidBodyMover(o)
13842 
13843 
13844  def _get_as_binary(self):
13845  r"""_get_as_binary(RigidBodyMover self) -> PyObject *"""
13846  return _IMP_core.RigidBodyMover__get_as_binary(self)
13847 
13848  def _set_from_binary(self, p):
13849  r"""_set_from_binary(RigidBodyMover self, PyObject * p)"""
13850  return _IMP_core.RigidBodyMover__set_from_binary(self, p)
13851 
13852  def __getstate__(self):
13853  p = self._get_as_binary()
13854  if len(self.__dict__) > 1:
13855  d = self.__dict__.copy()
13856  del d['this']
13857  p = (d, p)
13858  return p
13859 
13860  def __setstate__(self, p):
13861  if not hasattr(self, 'this'):
13862  self.__init__()
13863  if isinstance(p, tuple):
13864  d, p = p
13865  self.__dict__.update(d)
13866  return self._set_from_binary(p)
13867 
13868 
13869  def _get_jax(self, space):
13870  import jax.random
13871  import IMP.core._jax_rigid
13872  from IMP.algebra.jax import (get_random_vector_on_3d_sphere,
13873  get_random_vector_in_3d_sphere,
13874  get_rotation_about_normalized_axis,
13875  _quaternion_multiply)
13876  max_angle = self.get_maximum_rotation()
13877  max_translation = self.get_maximum_translation()
13878  particle_index = self.get_index()
13879  body_index = IMP.core._jax_rigid._get_rigid_body_index(
13880  self.get_model(), self.get_index())
13881 
13882  def init_func(key):
13883  return key
13884 
13885  def propose_func(jm, key):
13886  body = jm['rigid_bodies'].bodies[body_index]
13887  tf = body.get_transformation(jm)
13888 
13889  if max_translation > 0:
13890  key, subkey = jax.random.split(key)
13891  tf.translation = space.shift(
13892  tf.translation,
13893  get_random_vector_in_3d_sphere(subkey, max_translation)[0])
13894  if max_angle > 0:
13895  key, subkey1, subkey2 = jax.random.split(key, 3)
13896  axis_norm = get_random_vector_on_3d_sphere(subkey1, 1.0)[0]
13897  angle = jax.random.uniform(
13898  subkey2, minval=-max_angle, maxval=max_angle)
13899  rotation = get_rotation_about_normalized_axis(axis_norm, angle)
13900  tf.rotation = _quaternion_multiply(rotation, tf.rotation)
13901  jm = body.set_transformation_lazy(tf, jm)
13902  return jm, key, 1.0
13903 
13904  return self._wrap_jax(init_func, propose_func, keys=['rigid_bodies'])
13905 
13906 
13907 # Register RigidBodyMover in _IMP_core:
13908 _IMP_core.RigidBodyMover_swigregister(RigidBodyMover)
13909 class RigidBodyTunneler(MonteCarloMover):
13910  r"""Proxy of C++ IMP::core::RigidBodyTunneler class."""
13911 
13912  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13913 
13914  def __init__(self, m, pis, ref, k, move_probability=1.):
13915  r"""__init__(RigidBodyTunneler self, Model m, IMP::ParticleIndexes pis, ParticleIndex ref, double k, double move_probability=1.) -> RigidBodyTunneler"""
13916  _IMP_core.RigidBodyTunneler_swiginit(self, _IMP_core.new_RigidBodyTunneler(m, pis, ref, k, move_probability))
13917 
13918  def add_entry_point(self, fl):
13919  r"""add_entry_point(RigidBodyTunneler self, IMP::Floats fl)"""
13920  return _IMP_core.RigidBodyTunneler_add_entry_point(self, fl)
13921 
13922  def reset_stats(self):
13923  r"""reset_stats(RigidBodyTunneler self)"""
13924  return _IMP_core.RigidBodyTunneler_reset_stats(self)
13925 
13926  def get_number_of_rejected_moves(self):
13927  r"""get_number_of_rejected_moves(RigidBodyTunneler self) -> unsigned int"""
13928  return _IMP_core.RigidBodyTunneler_get_number_of_rejected_moves(self)
13929 
13930  def get_number_of_proposed_moves(self):
13931  r"""get_number_of_proposed_moves(RigidBodyTunneler self) -> unsigned int"""
13932  return _IMP_core.RigidBodyTunneler_get_number_of_proposed_moves(self)
13933 
13934  def get_number_of_impossible_moves(self):
13935  r"""get_number_of_impossible_moves(RigidBodyTunneler self) -> unsigned int"""
13936  return _IMP_core.RigidBodyTunneler_get_number_of_impossible_moves(self)
13937 
13938  def get_number_of_calls(self):
13939  r"""get_number_of_calls(RigidBodyTunneler self) -> unsigned int"""
13940  return _IMP_core.RigidBodyTunneler_get_number_of_calls(self)
13941 
13942  @staticmethod
13943  def get_reduced_coordinates(*args):
13944  r"""
13945  get_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref) -> IMP::Floats
13946  get_reduced_coordinates(Model m, ParticleIndex pi) -> IMP::Floats
13947  """
13948  return _IMP_core.RigidBodyTunneler_get_reduced_coordinates(*args)
13949 
13950  @staticmethod
13951  def set_reduced_coordinates(m, target, ref, coords):
13952  r"""set_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref, IMP::Floats coords)"""
13953  return _IMP_core.RigidBodyTunneler_set_reduced_coordinates(m, target, ref, coords)
13954 
13955  def get_version_info(self):
13956  r"""get_version_info(RigidBodyTunneler self) -> VersionInfo"""
13957  return _IMP_core.RigidBodyTunneler_get_version_info(self)
13958  __swig_destroy__ = _IMP_core.delete_RigidBodyTunneler
13959 
13960  def __str__(self):
13961  r"""__str__(RigidBodyTunneler self) -> std::string"""
13962  return _IMP_core.RigidBodyTunneler___str__(self)
13963 
13964  def __repr__(self):
13965  r"""__repr__(RigidBodyTunneler self) -> std::string"""
13966  return _IMP_core.RigidBodyTunneler___repr__(self)
13967 
13968  @staticmethod
13969  def get_from(o):
13970  return _object_cast_to_RigidBodyTunneler(o)
13971 
13972 
13973 # Register RigidBodyTunneler in _IMP_core:
13974 _IMP_core.RigidBodyTunneler_swigregister(RigidBodyTunneler)
13975 class RigidBodyUmbrella(IMP.Restraint):
13976  r"""Proxy of C++ IMP::core::RigidBodyUmbrella class."""
13977 
13978  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13979 
13980  def __init__(self, *args):
13981  r"""
13982  __init__(RigidBodyUmbrella self, Model m, ParticleIndex pi, ParticleIndex ref, IMP::Floats x0, double alpha, double k, std::string name="RigidBodyUmbrella %1%") -> RigidBodyUmbrella
13983  __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
13984  """
13985  _IMP_core.RigidBodyUmbrella_swiginit(self, _IMP_core.new_RigidBodyUmbrella(*args))
13986 
13987  def set_x0(self, *args):
13988  r"""
13989  set_x0(RigidBodyUmbrella self, IMP::Floats x0)
13990  set_x0(RigidBodyUmbrella self, double _lambda, IMP::Floats x1, IMP::Floats x2)
13991  """
13992  return _IMP_core.RigidBodyUmbrella_set_x0(self, *args)
13993 
13994  def get_x0(self):
13995  r"""get_x0(RigidBodyUmbrella self) -> IMP::Floats"""
13996  return _IMP_core.RigidBodyUmbrella_get_x0(self)
13997 
13998  def get_x(self):
13999  r"""get_x(RigidBodyUmbrella self) -> IMP::Floats"""
14000  return _IMP_core.RigidBodyUmbrella_get_x(self)
14001 
14002  def set_alpha(self, alpha):
14003  r"""set_alpha(RigidBodyUmbrella self, double alpha)"""
14004  return _IMP_core.RigidBodyUmbrella_set_alpha(self, alpha)
14005 
14006  def set_k(self, k):
14007  r"""set_k(RigidBodyUmbrella self, double k)"""
14008  return _IMP_core.RigidBodyUmbrella_set_k(self, k)
14009 
14010  def get_version_info(self):
14011  r"""get_version_info(RigidBodyUmbrella self) -> VersionInfo"""
14012  return _IMP_core.RigidBodyUmbrella_get_version_info(self)
14013  __swig_destroy__ = _IMP_core.delete_RigidBodyUmbrella
14014 
14015  def __str__(self):
14016  r"""__str__(RigidBodyUmbrella self) -> std::string"""
14017  return _IMP_core.RigidBodyUmbrella___str__(self)
14018 
14019  def __repr__(self):
14020  r"""__repr__(RigidBodyUmbrella self) -> std::string"""
14021  return _IMP_core.RigidBodyUmbrella___repr__(self)
14022 
14023  @staticmethod
14024  def get_from(o):
14025  return _object_cast_to_RigidBodyUmbrella(o)
14026 
14027 
14028 # Register RigidBodyUmbrella in _IMP_core:
14029 _IMP_core.RigidBodyUmbrella_swigregister(RigidBodyUmbrella)
14030 class VolumeRestraint(IMP.Restraint):
14031  r"""Proxy of C++ IMP::core::VolumeRestraint class."""
14032 
14033  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14034 
14035  def __init__(self, f, sc, volume):
14036  r"""__init__(VolumeRestraint self, UnaryFunction f, SingletonContainer sc, double volume) -> VolumeRestraint"""
14037  _IMP_core.VolumeRestraint_swiginit(self, _IMP_core.new_VolumeRestraint(f, sc, volume))
14038 
14039  def do_get_inputs(self):
14040  r"""do_get_inputs(VolumeRestraint self) -> IMP::ModelObjectsTemp"""
14041  return _IMP_core.VolumeRestraint_do_get_inputs(self)
14042 
14043  def get_version_info(self):
14044  r"""get_version_info(VolumeRestraint self) -> VersionInfo"""
14045  return _IMP_core.VolumeRestraint_get_version_info(self)
14046  __swig_destroy__ = _IMP_core.delete_VolumeRestraint
14047 
14048  def __str__(self):
14049  r"""__str__(VolumeRestraint self) -> std::string"""
14050  return _IMP_core.VolumeRestraint___str__(self)
14051 
14052  def __repr__(self):
14053  r"""__repr__(VolumeRestraint self) -> std::string"""
14054  return _IMP_core.VolumeRestraint___repr__(self)
14055 
14056  @staticmethod
14057  def get_from(o):
14058  return _object_cast_to_VolumeRestraint(o)
14059 
14060 
14061 # Register VolumeRestraint in _IMP_core:
14062 _IMP_core.VolumeRestraint_swigregister(VolumeRestraint)
14063 
14064 def get_centroid(ps):
14065  r"""get_centroid(IMP::core::XYZs const & ps) -> Vector3D"""
14066  return _IMP_core.get_centroid(ps)
14067 
14068 def get_bounding_box(ps):
14069  r"""get_bounding_box(IMP::core::XYZRs const & ps) -> BoundingBox3D"""
14070  return _IMP_core.get_bounding_box(ps)
14071 class MoveStatisticsScoreState(IMP.ScoreState):
14072  r"""Proxy of C++ IMP::core::MoveStatisticsScoreState class."""
14073 
14074  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14075 
14076  def __init__(self, ps):
14077  r"""__init__(MoveStatisticsScoreState self, IMP::ParticlesTemp const & ps) -> MoveStatisticsScoreState"""
14078  _IMP_core.MoveStatisticsScoreState_swiginit(self, _IMP_core.new_MoveStatisticsScoreState(ps))
14079 
14080  def show_statistics(self, *args):
14081  r"""show_statistics(MoveStatisticsScoreState self, _ostream out=std::cout)"""
14082  return _IMP_core.MoveStatisticsScoreState_show_statistics(self, *args)
14083 
14084  def reset(self):
14085  r"""reset(MoveStatisticsScoreState self)"""
14086  return _IMP_core.MoveStatisticsScoreState_reset(self)
14087 
14088  def do_before_evaluate(self):
14089  r"""do_before_evaluate(MoveStatisticsScoreState self)"""
14090  return _IMP_core.MoveStatisticsScoreState_do_before_evaluate(self)
14091 
14092  def do_after_evaluate(self, da):
14093  r"""do_after_evaluate(MoveStatisticsScoreState self, DerivativeAccumulator da)"""
14094  return _IMP_core.MoveStatisticsScoreState_do_after_evaluate(self, da)
14095 
14096  def do_get_inputs(self):
14097  r"""do_get_inputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
14098  return _IMP_core.MoveStatisticsScoreState_do_get_inputs(self)
14099 
14100  def do_get_outputs(self):
14101  r"""do_get_outputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
14102  return _IMP_core.MoveStatisticsScoreState_do_get_outputs(self)
14103 
14104  def get_version_info(self):
14105  r"""get_version_info(MoveStatisticsScoreState self) -> VersionInfo"""
14106  return _IMP_core.MoveStatisticsScoreState_get_version_info(self)
14107  __swig_destroy__ = _IMP_core.delete_MoveStatisticsScoreState
14108 
14109  def __str__(self):
14110  r"""__str__(MoveStatisticsScoreState self) -> std::string"""
14111  return _IMP_core.MoveStatisticsScoreState___str__(self)
14112 
14113  def __repr__(self):
14114  r"""__repr__(MoveStatisticsScoreState self) -> std::string"""
14115  return _IMP_core.MoveStatisticsScoreState___repr__(self)
14116 
14117  @staticmethod
14118  def get_from(o):
14119  return _object_cast_to_MoveStatisticsScoreState(o)
14120 
14121 
14122 # Register MoveStatisticsScoreState in _IMP_core:
14123 _IMP_core.MoveStatisticsScoreState_swigregister(MoveStatisticsScoreState)
14124 IMP_PARTICLE_TYPE_INDEX = _IMP_core.IMP_PARTICLE_TYPE_INDEX
14125 
14126 class Typed(IMP.Decorator):
14127  r"""Proxy of C++ IMP::core::Typed class."""
14128 
14129  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14130 
14131  @staticmethod
14132  def get_type_key():
14133  r"""get_type_key() -> IntKey"""
14134  return _IMP_core.Typed_get_type_key()
14135 
14136  def __init__(self, *args):
14137  r"""
14138  __init__(Typed self) -> Typed
14139  __init__(Typed self, Model m, ParticleIndex id) -> Typed
14140  __init__(Typed self, _ParticleAdaptor d) -> Typed
14141  """
14142  _IMP_core.Typed_swiginit(self, _IMP_core.new_Typed(*args))
14143 
14144  def show(self, *args):
14145  r"""show(Typed self, _ostream out=std::cout)"""
14146  return _IMP_core.Typed_show(self, *args)
14147 
14148  @staticmethod
14149  def setup_particle(*args):
14150  r"""
14151  setup_particle(Model m, ParticleIndex pi, ParticleType t) -> Typed
14152  setup_particle(_ParticleAdaptor pa, ParticleType t) -> Typed
14153  """
14154  return _IMP_core.Typed_setup_particle(*args)
14155 
14156  @staticmethod
14157  def get_is_setup(*args):
14158  r"""
14159  get_is_setup(_ParticleAdaptor p) -> bool
14160  get_is_setup(Model m, ParticleIndex pi) -> bool
14161  """
14162  return _IMP_core.Typed_get_is_setup(*args)
14163 
14164  def get_type(self):
14165  r"""get_type(Typed self) -> ParticleType"""
14166  return _IMP_core.Typed_get_type(self)
14167 
14168  def set_type(self, pt):
14169  r"""set_type(Typed self, ParticleType pt)"""
14170  return _IMP_core.Typed_set_type(self, pt)
14171 
14172  def add_attribute(self, *args):
14173  r"""
14174  add_attribute(Typed self, FloatKey k, IMP::Float v, bool opt)
14175  add_attribute(Typed self, FloatKey a0, IMP::Float a1)
14176  add_attribute(Typed self, IntKey a0, IMP::Int a1)
14177  add_attribute(Typed self, FloatsKey a0, IMP::Floats a1)
14178  add_attribute(Typed self, IntsKey a0, IMP::Ints a1)
14179  add_attribute(Typed self, StringKey a0, IMP::String a1)
14180  add_attribute(Typed self, ParticleIndexKey a0, Particle a1)
14181  add_attribute(Typed self, ObjectKey a0, Object a1)
14182  add_attribute(Typed self, SparseFloatKey a0, IMP::Float a1)
14183  add_attribute(Typed self, SparseIntKey a0, IMP::Int a1)
14184  add_attribute(Typed self, SparseStringKey a0, IMP::String a1)
14185  add_attribute(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14186  """
14187  return _IMP_core.Typed_add_attribute(self, *args)
14188 
14189  def get_value(self, *args):
14190  r"""
14191  get_value(Typed self, FloatKey a0) -> IMP::Float
14192  get_value(Typed self, IntKey a0) -> IMP::Int
14193  get_value(Typed self, FloatsKey a0) -> IMP::Floats
14194  get_value(Typed self, IntsKey a0) -> IMP::Ints
14195  get_value(Typed self, StringKey a0) -> IMP::String
14196  get_value(Typed self, ParticleIndexKey a0) -> Particle
14197  get_value(Typed self, ObjectKey a0) -> Object
14198  get_value(Typed self, SparseFloatKey a0) -> IMP::Float
14199  get_value(Typed self, SparseIntKey a0) -> IMP::Int
14200  get_value(Typed self, SparseStringKey a0) -> IMP::String
14201  get_value(Typed self, SparseParticleIndexKey a0) -> ParticleIndex
14202  """
14203  return _IMP_core.Typed_get_value(self, *args)
14204 
14205  def set_value(self, *args):
14206  r"""
14207  set_value(Typed self, FloatKey a0, IMP::Float a1)
14208  set_value(Typed self, IntKey a0, IMP::Int a1)
14209  set_value(Typed self, FloatsKey a0, IMP::Floats a1)
14210  set_value(Typed self, IntsKey a0, IMP::Ints a1)
14211  set_value(Typed self, StringKey a0, IMP::String a1)
14212  set_value(Typed self, ParticleIndexKey a0, Particle a1)
14213  set_value(Typed self, ObjectKey a0, Object a1)
14214  set_value(Typed self, SparseFloatKey a0, IMP::Float a1)
14215  set_value(Typed self, SparseIntKey a0, IMP::Int a1)
14216  set_value(Typed self, SparseStringKey a0, IMP::String a1)
14217  set_value(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14218  """
14219  return _IMP_core.Typed_set_value(self, *args)
14220 
14221  def remove_attribute(self, *args):
14222  r"""
14223  remove_attribute(Typed self, FloatKey a0)
14224  remove_attribute(Typed self, IntKey a0)
14225  remove_attribute(Typed self, FloatsKey a0)
14226  remove_attribute(Typed self, IntsKey a0)
14227  remove_attribute(Typed self, StringKey a0)
14228  remove_attribute(Typed self, ParticleIndexKey a0)
14229  remove_attribute(Typed self, ObjectKey a0)
14230  remove_attribute(Typed self, SparseFloatKey a0)
14231  remove_attribute(Typed self, SparseIntKey a0)
14232  remove_attribute(Typed self, SparseStringKey a0)
14233  remove_attribute(Typed self, SparseParticleIndexKey a0)
14234  """
14235  return _IMP_core.Typed_remove_attribute(self, *args)
14236 
14237  def has_attribute(self, *args):
14238  r"""
14239  has_attribute(Typed self, FloatKey a0) -> bool
14240  has_attribute(Typed self, IntKey a0) -> bool
14241  has_attribute(Typed self, FloatsKey a0) -> bool
14242  has_attribute(Typed self, IntsKey a0) -> bool
14243  has_attribute(Typed self, StringKey a0) -> bool
14244  has_attribute(Typed self, ParticleIndexKey a0) -> bool
14245  has_attribute(Typed self, ObjectKey a0) -> bool
14246  has_attribute(Typed self, SparseFloatKey a0) -> bool
14247  has_attribute(Typed self, SparseIntKey a0) -> bool
14248  has_attribute(Typed self, SparseStringKey a0) -> bool
14249  has_attribute(Typed self, SparseParticleIndexKey a0) -> bool
14250  """
14251  return _IMP_core.Typed_has_attribute(self, *args)
14252 
14253  def get_derivative(self, a0):
14254  r"""get_derivative(Typed self, FloatKey a0) -> double"""
14255  return _IMP_core.Typed_get_derivative(self, a0)
14256 
14257  def get_name(self):
14258  r"""get_name(Typed self) -> std::string"""
14259  return _IMP_core.Typed_get_name(self)
14260 
14261  def clear_caches(self):
14262  r"""clear_caches(Typed self)"""
14263  return _IMP_core.Typed_clear_caches(self)
14264 
14265  def set_name(self, a0):
14266  r"""set_name(Typed self, std::string a0)"""
14267  return _IMP_core.Typed_set_name(self, a0)
14268 
14269  def set_check_level(self, a0):
14270  r"""set_check_level(Typed self, IMP::CheckLevel a0)"""
14271  return _IMP_core.Typed_set_check_level(self, a0)
14272 
14273  def add_to_derivative(self, a0, a1, a2):
14274  r"""add_to_derivative(Typed self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14275  return _IMP_core.Typed_add_to_derivative(self, a0, a1, a2)
14276 
14277  def set_is_optimized(self, a0, a1):
14278  r"""set_is_optimized(Typed self, FloatKey a0, bool a1)"""
14279  return _IMP_core.Typed_set_is_optimized(self, a0, a1)
14280 
14281  def get_is_optimized(self, a0):
14282  r"""get_is_optimized(Typed self, FloatKey a0) -> bool"""
14283  return _IMP_core.Typed_get_is_optimized(self, a0)
14284 
14285  def get_check_level(self):
14286  r"""get_check_level(Typed self) -> IMP::CheckLevel"""
14287  return _IMP_core.Typed_get_check_level(self)
14288 
14289  def __eq__(self, *args):
14290  r"""
14291  __eq__(Typed self, Typed o) -> bool
14292  __eq__(Typed self, Particle d) -> bool
14293  """
14294  return _IMP_core.Typed___eq__(self, *args)
14295 
14296  def __ne__(self, *args):
14297  r"""
14298  __ne__(Typed self, Typed o) -> bool
14299  __ne__(Typed self, Particle d) -> bool
14300  """
14301  return _IMP_core.Typed___ne__(self, *args)
14302 
14303  def __le__(self, *args):
14304  r"""
14305  __le__(Typed self, Typed o) -> bool
14306  __le__(Typed self, Particle d) -> bool
14307  """
14308  return _IMP_core.Typed___le__(self, *args)
14309 
14310  def __lt__(self, *args):
14311  r"""
14312  __lt__(Typed self, Typed o) -> bool
14313  __lt__(Typed self, Particle d) -> bool
14314  """
14315  return _IMP_core.Typed___lt__(self, *args)
14316 
14317  def __ge__(self, *args):
14318  r"""
14319  __ge__(Typed self, Typed o) -> bool
14320  __ge__(Typed self, Particle d) -> bool
14321  """
14322  return _IMP_core.Typed___ge__(self, *args)
14323 
14324  def __gt__(self, *args):
14325  r"""
14326  __gt__(Typed self, Typed o) -> bool
14327  __gt__(Typed self, Particle d) -> bool
14328  """
14329  return _IMP_core.Typed___gt__(self, *args)
14330 
14331  def __hash__(self):
14332  r"""__hash__(Typed self) -> std::size_t"""
14333  return _IMP_core.Typed___hash__(self)
14334 
14335  def __str__(self):
14336  r"""__str__(Typed self) -> std::string"""
14337  return _IMP_core.Typed___str__(self)
14338 
14339  def __repr__(self):
14340  r"""__repr__(Typed self) -> std::string"""
14341  return _IMP_core.Typed___repr__(self)
14342 
14343  def _get_as_binary(self):
14344  r"""_get_as_binary(Typed self) -> PyObject *"""
14345  return _IMP_core.Typed__get_as_binary(self)
14346 
14347  def _set_from_binary(self, p):
14348  r"""_set_from_binary(Typed self, PyObject * p)"""
14349  return _IMP_core.Typed__set_from_binary(self, p)
14350 
14351  def __getstate__(self):
14352  p = self._get_as_binary()
14353  if len(self.__dict__) > 1:
14354  d = self.__dict__.copy()
14355  del d['this']
14356  p = (d, p)
14357  return p
14358 
14359  def __setstate__(self, p):
14360  if not hasattr(self, 'this'):
14361  self.__init__()
14362  if isinstance(p, tuple):
14363  d, p = p
14364  self.__dict__.update(d)
14365  return self._set_from_binary(p)
14366 
14367  __swig_destroy__ = _IMP_core.delete_Typed
14368 
14369 # Register Typed in _IMP_core:
14370 _IMP_core.Typed_swigregister(Typed)
14371 
14372 def __lshift__(*args):
14373  r"""
14374  __lshift__(_ostream out, XYZ n) -> _ostream
14375  __lshift__(_ostream out, XYZR n) -> _ostream
14376  __lshift__(_ostream out, Direction n) -> _ostream
14377  __lshift__(_ostream out, DirectionAngle n) -> _ostream
14378  __lshift__(_ostream out, Surface n) -> _ostream
14379  __lshift__(_ostream out, Centroid n) -> _ostream
14380  __lshift__(_ostream out, Cover n) -> _ostream
14381  __lshift__(_ostream out, Reference n) -> _ostream
14382  __lshift__(_ostream out, RigidMember n) -> _ostream
14383  __lshift__(_ostream out, RigidBody n) -> _ostream
14384  __lshift__(_ostream out, Gaussian n) -> _ostream
14385  __lshift__(_ostream out, Typed n) -> _ostream
14386  """
14387  return _IMP_core.__lshift__(*args)
14388 class WriteRestraintScoresOptimizerState(IMP.OptimizerState):
14389  r"""Proxy of C++ IMP::core::WriteRestraintScoresOptimizerState class."""
14390 
14391  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14392 
14393  def __init__(self, rs, out):
14394  r"""__init__(WriteRestraintScoresOptimizerState self, IMP::Restraints const & rs, TextOutput out) -> WriteRestraintScoresOptimizerState"""
14395  _IMP_core.WriteRestraintScoresOptimizerState_swiginit(self, _IMP_core.new_WriteRestraintScoresOptimizerState(rs, out))
14396 
14397  def get_version_info(self):
14398  r"""get_version_info(WriteRestraintScoresOptimizerState self) -> VersionInfo"""
14399  return _IMP_core.WriteRestraintScoresOptimizerState_get_version_info(self)
14400  __swig_destroy__ = _IMP_core.delete_WriteRestraintScoresOptimizerState
14401 
14402  def __str__(self):
14403  r"""__str__(WriteRestraintScoresOptimizerState self) -> std::string"""
14404  return _IMP_core.WriteRestraintScoresOptimizerState___str__(self)
14405 
14406  def __repr__(self):
14407  r"""__repr__(WriteRestraintScoresOptimizerState self) -> std::string"""
14408  return _IMP_core.WriteRestraintScoresOptimizerState___repr__(self)
14409 
14410  @staticmethod
14411  def get_from(o):
14412  return _object_cast_to_WriteRestraintScoresOptimizerState(o)
14413 
14414 
14415 # Register WriteRestraintScoresOptimizerState in _IMP_core:
14416 _IMP_core.WriteRestraintScoresOptimizerState_swigregister(WriteRestraintScoresOptimizerState)
14417 
14418 def assign_blame(rs, ps, attribute):
14419  r"""assign_blame(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, FloatKey attribute)"""
14420  return _IMP_core.assign_blame(rs, ps, attribute)
14421 
14422 def create_blame_geometries(*args):
14423  r"""create_blame_geometries(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, double max=NO_MAX, std::string name=std::string()) -> IMP::display::Geometries"""
14424  return _IMP_core.create_blame_geometries(*args)
14425 class MultipleBinormalRestraint(IMP.Restraint):
14426  r"""Proxy of C++ IMP::core::MultipleBinormalRestraint class."""
14427 
14428  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14429 
14430  def __init__(self, m, q1, q2):
14431  r"""__init__(MultipleBinormalRestraint self, Model m, IMP::ParticleIndexQuad const & q1, IMP::ParticleIndexQuad const & q2) -> MultipleBinormalRestraint"""
14432  _IMP_core.MultipleBinormalRestraint_swiginit(self, _IMP_core.new_MultipleBinormalRestraint(m, q1, q2))
14433 
14434  def add_term(self, term):
14435  r"""add_term(MultipleBinormalRestraint self, BinormalTerm term)"""
14436  return _IMP_core.MultipleBinormalRestraint_add_term(self, term)
14437 
14438  def do_get_inputs(self):
14439  r"""do_get_inputs(MultipleBinormalRestraint self) -> IMP::ModelObjectsTemp"""
14440  return _IMP_core.MultipleBinormalRestraint_do_get_inputs(self)
14441 
14442  def get_version_info(self):
14443  r"""get_version_info(MultipleBinormalRestraint self) -> VersionInfo"""
14444  return _IMP_core.MultipleBinormalRestraint_get_version_info(self)
14445  __swig_destroy__ = _IMP_core.delete_MultipleBinormalRestraint
14446 
14447  def __str__(self):
14448  r"""__str__(MultipleBinormalRestraint self) -> std::string"""
14449  return _IMP_core.MultipleBinormalRestraint___str__(self)
14450 
14451  def __repr__(self):
14452  r"""__repr__(MultipleBinormalRestraint self) -> std::string"""
14453  return _IMP_core.MultipleBinormalRestraint___repr__(self)
14454 
14455  @staticmethod
14456  def get_from(o):
14457  return _object_cast_to_MultipleBinormalRestraint(o)
14458 
14459 
14460 # Register MultipleBinormalRestraint in _IMP_core:
14461 _IMP_core.MultipleBinormalRestraint_swigregister(MultipleBinormalRestraint)
14462 class BinormalTerm(object):
14463  r"""Proxy of C++ IMP::core::BinormalTerm class."""
14464 
14465  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14466 
14467  def __init__(self):
14468  r"""__init__(BinormalTerm self) -> BinormalTerm"""
14469  _IMP_core.BinormalTerm_swiginit(self, _IMP_core.new_BinormalTerm())
14470 
14471  def set_correlation(self, correlation):
14472  r"""set_correlation(BinormalTerm self, double correlation)"""
14473  return _IMP_core.BinormalTerm_set_correlation(self, correlation)
14474 
14475  def set_weight(self, weight):
14476  r"""set_weight(BinormalTerm self, double weight)"""
14477  return _IMP_core.BinormalTerm_set_weight(self, weight)
14478 
14479  def set_means(self, means):
14480  r"""set_means(BinormalTerm self, IMP::FloatPair means)"""
14481  return _IMP_core.BinormalTerm_set_means(self, means)
14482 
14483  def set_standard_deviations(self, stdevs):
14484  r"""set_standard_deviations(BinormalTerm self, IMP::FloatPair stdevs)"""
14485  return _IMP_core.BinormalTerm_set_standard_deviations(self, stdevs)
14486 
14487  def show(self, *args):
14488  r"""show(BinormalTerm self, _ostream out=std::cout)"""
14489  return _IMP_core.BinormalTerm_show(self, *args)
14490 
14491  def __str__(self):
14492  r"""__str__(BinormalTerm self) -> std::string"""
14493  return _IMP_core.BinormalTerm___str__(self)
14494 
14495  def __repr__(self):
14496  r"""__repr__(BinormalTerm self) -> std::string"""
14497  return _IMP_core.BinormalTerm___repr__(self)
14498 
14499  def _get_as_binary(self):
14500  r"""_get_as_binary(BinormalTerm self) -> PyObject *"""
14501  return _IMP_core.BinormalTerm__get_as_binary(self)
14502 
14503  def _set_from_binary(self, p):
14504  r"""_set_from_binary(BinormalTerm self, PyObject * p)"""
14505  return _IMP_core.BinormalTerm__set_from_binary(self, p)
14506 
14507  def __getstate__(self):
14508  p = self._get_as_binary()
14509  if len(self.__dict__) > 1:
14510  d = self.__dict__.copy()
14511  del d['this']
14512  p = (d, p)
14513  return p
14514 
14515  def __setstate__(self, p):
14516  if not hasattr(self, 'this'):
14517  self.__init__()
14518  if isinstance(p, tuple):
14519  d, p = p
14520  self.__dict__.update(d)
14521  return self._set_from_binary(p)
14522 
14523  __swig_destroy__ = _IMP_core.delete_BinormalTerm
14524 
14525 # Register BinormalTerm in _IMP_core:
14526 _IMP_core.BinormalTerm_swigregister(BinormalTerm)
14527 class Provenance(IMP.Decorator):
14528  r"""Proxy of C++ IMP::core::Provenance class."""
14529 
14530  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14531 
14532  def get_previous(self):
14533  r"""get_previous(Provenance self) -> Provenance"""
14534  return _IMP_core.Provenance_get_previous(self)
14535 
14536  def set_previous(self, p):
14537  r"""set_previous(Provenance self, Provenance p)"""
14538  return _IMP_core.Provenance_set_previous(self, p)
14539 
14540  def __init__(self, *args):
14541  r"""
14542  __init__(Provenance self) -> Provenance
14543  __init__(Provenance self, Model m, ParticleIndex id) -> Provenance
14544  __init__(Provenance self, _ParticleAdaptor d) -> Provenance
14545  """
14546  _IMP_core.Provenance_swiginit(self, _IMP_core.new_Provenance(*args))
14547 
14548  @staticmethod
14549  def get_is_setup(*args):
14550  r"""
14551  get_is_setup(Model m, ParticleIndex pi) -> bool
14552  get_is_setup(_ParticleAdaptor p) -> bool
14553  """
14554  return _IMP_core.Provenance_get_is_setup(*args)
14555 
14556  def show(self, *args):
14557  r"""show(Provenance self, _ostream out=std::cout)"""
14558  return _IMP_core.Provenance_show(self, *args)
14559 
14560  @staticmethod
14561  def setup_particle(*args):
14562  r"""
14563  setup_particle(Model m, ParticleIndex pi) -> Provenance
14564  setup_particle(_ParticleAdaptor pa) -> Provenance
14565  """
14566  return _IMP_core.Provenance_setup_particle(*args)
14567 
14568  def add_attribute(self, *args):
14569  r"""
14570  add_attribute(Provenance self, FloatKey k, IMP::Float v, bool opt)
14571  add_attribute(Provenance self, FloatKey a0, IMP::Float a1)
14572  add_attribute(Provenance self, IntKey a0, IMP::Int a1)
14573  add_attribute(Provenance self, FloatsKey a0, IMP::Floats a1)
14574  add_attribute(Provenance self, IntsKey a0, IMP::Ints a1)
14575  add_attribute(Provenance self, StringKey a0, IMP::String a1)
14576  add_attribute(Provenance self, ParticleIndexKey a0, Particle a1)
14577  add_attribute(Provenance self, ObjectKey a0, Object a1)
14578  add_attribute(Provenance self, SparseFloatKey a0, IMP::Float a1)
14579  add_attribute(Provenance self, SparseIntKey a0, IMP::Int a1)
14580  add_attribute(Provenance self, SparseStringKey a0, IMP::String a1)
14581  add_attribute(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14582  """
14583  return _IMP_core.Provenance_add_attribute(self, *args)
14584 
14585  def get_value(self, *args):
14586  r"""
14587  get_value(Provenance self, FloatKey a0) -> IMP::Float
14588  get_value(Provenance self, IntKey a0) -> IMP::Int
14589  get_value(Provenance self, FloatsKey a0) -> IMP::Floats
14590  get_value(Provenance self, IntsKey a0) -> IMP::Ints
14591  get_value(Provenance self, StringKey a0) -> IMP::String
14592  get_value(Provenance self, ParticleIndexKey a0) -> Particle
14593  get_value(Provenance self, ObjectKey a0) -> Object
14594  get_value(Provenance self, SparseFloatKey a0) -> IMP::Float
14595  get_value(Provenance self, SparseIntKey a0) -> IMP::Int
14596  get_value(Provenance self, SparseStringKey a0) -> IMP::String
14597  get_value(Provenance self, SparseParticleIndexKey a0) -> ParticleIndex
14598  """
14599  return _IMP_core.Provenance_get_value(self, *args)
14600 
14601  def set_value(self, *args):
14602  r"""
14603  set_value(Provenance self, FloatKey a0, IMP::Float a1)
14604  set_value(Provenance self, IntKey a0, IMP::Int a1)
14605  set_value(Provenance self, FloatsKey a0, IMP::Floats a1)
14606  set_value(Provenance self, IntsKey a0, IMP::Ints a1)
14607  set_value(Provenance self, StringKey a0, IMP::String a1)
14608  set_value(Provenance self, ParticleIndexKey a0, Particle a1)
14609  set_value(Provenance self, ObjectKey a0, Object a1)
14610  set_value(Provenance self, SparseFloatKey a0, IMP::Float a1)
14611  set_value(Provenance self, SparseIntKey a0, IMP::Int a1)
14612  set_value(Provenance self, SparseStringKey a0, IMP::String a1)
14613  set_value(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14614  """
14615  return _IMP_core.Provenance_set_value(self, *args)
14616 
14617  def remove_attribute(self, *args):
14618  r"""
14619  remove_attribute(Provenance self, FloatKey a0)
14620  remove_attribute(Provenance self, IntKey a0)
14621  remove_attribute(Provenance self, FloatsKey a0)
14622  remove_attribute(Provenance self, IntsKey a0)
14623  remove_attribute(Provenance self, StringKey a0)
14624  remove_attribute(Provenance self, ParticleIndexKey a0)
14625  remove_attribute(Provenance self, ObjectKey a0)
14626  remove_attribute(Provenance self, SparseFloatKey a0)
14627  remove_attribute(Provenance self, SparseIntKey a0)
14628  remove_attribute(Provenance self, SparseStringKey a0)
14629  remove_attribute(Provenance self, SparseParticleIndexKey a0)
14630  """
14631  return _IMP_core.Provenance_remove_attribute(self, *args)
14632 
14633  def has_attribute(self, *args):
14634  r"""
14635  has_attribute(Provenance self, FloatKey a0) -> bool
14636  has_attribute(Provenance self, IntKey a0) -> bool
14637  has_attribute(Provenance self, FloatsKey a0) -> bool
14638  has_attribute(Provenance self, IntsKey a0) -> bool
14639  has_attribute(Provenance self, StringKey a0) -> bool
14640  has_attribute(Provenance self, ParticleIndexKey a0) -> bool
14641  has_attribute(Provenance self, ObjectKey a0) -> bool
14642  has_attribute(Provenance self, SparseFloatKey a0) -> bool
14643  has_attribute(Provenance self, SparseIntKey a0) -> bool
14644  has_attribute(Provenance self, SparseStringKey a0) -> bool
14645  has_attribute(Provenance self, SparseParticleIndexKey a0) -> bool
14646  """
14647  return _IMP_core.Provenance_has_attribute(self, *args)
14648 
14649  def get_derivative(self, a0):
14650  r"""get_derivative(Provenance self, FloatKey a0) -> double"""
14651  return _IMP_core.Provenance_get_derivative(self, a0)
14652 
14653  def get_name(self):
14654  r"""get_name(Provenance self) -> std::string"""
14655  return _IMP_core.Provenance_get_name(self)
14656 
14657  def clear_caches(self):
14658  r"""clear_caches(Provenance self)"""
14659  return _IMP_core.Provenance_clear_caches(self)
14660 
14661  def set_name(self, a0):
14662  r"""set_name(Provenance self, std::string a0)"""
14663  return _IMP_core.Provenance_set_name(self, a0)
14664 
14665  def set_check_level(self, a0):
14666  r"""set_check_level(Provenance self, IMP::CheckLevel a0)"""
14667  return _IMP_core.Provenance_set_check_level(self, a0)
14668 
14669  def add_to_derivative(self, a0, a1, a2):
14670  r"""add_to_derivative(Provenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14671  return _IMP_core.Provenance_add_to_derivative(self, a0, a1, a2)
14672 
14673  def set_is_optimized(self, a0, a1):
14674  r"""set_is_optimized(Provenance self, FloatKey a0, bool a1)"""
14675  return _IMP_core.Provenance_set_is_optimized(self, a0, a1)
14676 
14677  def get_is_optimized(self, a0):
14678  r"""get_is_optimized(Provenance self, FloatKey a0) -> bool"""
14679  return _IMP_core.Provenance_get_is_optimized(self, a0)
14680 
14681  def get_check_level(self):
14682  r"""get_check_level(Provenance self) -> IMP::CheckLevel"""
14683  return _IMP_core.Provenance_get_check_level(self)
14684 
14685  def __eq__(self, *args):
14686  r"""
14687  __eq__(Provenance self, Provenance o) -> bool
14688  __eq__(Provenance self, Particle d) -> bool
14689  """
14690  return _IMP_core.Provenance___eq__(self, *args)
14691 
14692  def __ne__(self, *args):
14693  r"""
14694  __ne__(Provenance self, Provenance o) -> bool
14695  __ne__(Provenance self, Particle d) -> bool
14696  """
14697  return _IMP_core.Provenance___ne__(self, *args)
14698 
14699  def __le__(self, *args):
14700  r"""
14701  __le__(Provenance self, Provenance o) -> bool
14702  __le__(Provenance self, Particle d) -> bool
14703  """
14704  return _IMP_core.Provenance___le__(self, *args)
14705 
14706  def __lt__(self, *args):
14707  r"""
14708  __lt__(Provenance self, Provenance o) -> bool
14709  __lt__(Provenance self, Particle d) -> bool
14710  """
14711  return _IMP_core.Provenance___lt__(self, *args)
14712 
14713  def __ge__(self, *args):
14714  r"""
14715  __ge__(Provenance self, Provenance o) -> bool
14716  __ge__(Provenance self, Particle d) -> bool
14717  """
14718  return _IMP_core.Provenance___ge__(self, *args)
14719 
14720  def __gt__(self, *args):
14721  r"""
14722  __gt__(Provenance self, Provenance o) -> bool
14723  __gt__(Provenance self, Particle d) -> bool
14724  """
14725  return _IMP_core.Provenance___gt__(self, *args)
14726 
14727  def __hash__(self):
14728  r"""__hash__(Provenance self) -> std::size_t"""
14729  return _IMP_core.Provenance___hash__(self)
14730 
14731  def __str__(self):
14732  r"""__str__(Provenance self) -> std::string"""
14733  return _IMP_core.Provenance___str__(self)
14734 
14735  def __repr__(self):
14736  r"""__repr__(Provenance self) -> std::string"""
14737  return _IMP_core.Provenance___repr__(self)
14738 
14739  def _get_as_binary(self):
14740  r"""_get_as_binary(Provenance self) -> PyObject *"""
14741  return _IMP_core.Provenance__get_as_binary(self)
14742 
14743  def _set_from_binary(self, p):
14744  r"""_set_from_binary(Provenance self, PyObject * p)"""
14745  return _IMP_core.Provenance__set_from_binary(self, p)
14746 
14747  def __getstate__(self):
14748  p = self._get_as_binary()
14749  if len(self.__dict__) > 1:
14750  d = self.__dict__.copy()
14751  del d['this']
14752  p = (d, p)
14753  return p
14754 
14755  def __setstate__(self, p):
14756  if not hasattr(self, 'this'):
14757  self.__init__()
14758  if isinstance(p, tuple):
14759  d, p = p
14760  self.__dict__.update(d)
14761  return self._set_from_binary(p)
14762 
14763  __swig_destroy__ = _IMP_core.delete_Provenance
14764 
14765 # Register Provenance in _IMP_core:
14766 _IMP_core.Provenance_swigregister(Provenance)
14767 class StructureProvenance(Provenance):
14768  r"""Proxy of C++ IMP::core::StructureProvenance class."""
14769 
14770  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14771 
14772  def set_filename(self, filename):
14773  r"""set_filename(StructureProvenance self, std::string filename)"""
14774  return _IMP_core.StructureProvenance_set_filename(self, filename)
14775 
14776  def get_filename(self):
14777  r"""get_filename(StructureProvenance self) -> std::string"""
14778  return _IMP_core.StructureProvenance_get_filename(self)
14779 
14780  def set_chain_id(self, chain_id):
14781  r"""set_chain_id(StructureProvenance self, std::string chain_id)"""
14782  return _IMP_core.StructureProvenance_set_chain_id(self, chain_id)
14783 
14784  def get_chain_id(self):
14785  r"""get_chain_id(StructureProvenance self) -> std::string"""
14786  return _IMP_core.StructureProvenance_get_chain_id(self)
14787 
14788  def set_residue_offset(self, residue_offset):
14789  r"""set_residue_offset(StructureProvenance self, int residue_offset)"""
14790  return _IMP_core.StructureProvenance_set_residue_offset(self, residue_offset)
14791 
14792  def get_residue_offset(self):
14793  r"""get_residue_offset(StructureProvenance self) -> int"""
14794  return _IMP_core.StructureProvenance_get_residue_offset(self)
14795 
14796  def __init__(self, *args):
14797  r"""
14798  __init__(StructureProvenance self) -> StructureProvenance
14799  __init__(StructureProvenance self, Model m, ParticleIndex id) -> StructureProvenance
14800  __init__(StructureProvenance self, _ParticleAdaptor d) -> StructureProvenance
14801  """
14802  _IMP_core.StructureProvenance_swiginit(self, _IMP_core.new_StructureProvenance(*args))
14803 
14804  @staticmethod
14805  def get_is_setup(*args):
14806  r"""
14807  get_is_setup(Model m, ParticleIndex pi) -> bool
14808  get_is_setup(_ParticleAdaptor p) -> bool
14809  """
14810  return _IMP_core.StructureProvenance_get_is_setup(*args)
14811 
14812  def show(self, *args):
14813  r"""show(StructureProvenance self, _ostream out=std::cout)"""
14814  return _IMP_core.StructureProvenance_show(self, *args)
14815 
14816  @staticmethod
14817  def setup_particle(*args):
14818  r"""
14819  setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14820  setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14821  setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id) -> StructureProvenance
14822  setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id) -> StructureProvenance
14823  setup_particle(Model m, ParticleIndex pi, StructureProvenance o) -> StructureProvenance
14824  setup_particle(_ParticleAdaptor pa, StructureProvenance o) -> StructureProvenance
14825  """
14826  return _IMP_core.StructureProvenance_setup_particle(*args)
14827 
14828  def add_attribute(self, *args):
14829  r"""
14830  add_attribute(StructureProvenance self, FloatKey k, IMP::Float v, bool opt)
14831  add_attribute(StructureProvenance self, FloatKey a0, IMP::Float a1)
14832  add_attribute(StructureProvenance self, IntKey a0, IMP::Int a1)
14833  add_attribute(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14834  add_attribute(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14835  add_attribute(StructureProvenance self, StringKey a0, IMP::String a1)
14836  add_attribute(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14837  add_attribute(StructureProvenance self, ObjectKey a0, Object a1)
14838  add_attribute(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14839  add_attribute(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14840  add_attribute(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14841  add_attribute(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14842  """
14843  return _IMP_core.StructureProvenance_add_attribute(self, *args)
14844 
14845  def get_value(self, *args):
14846  r"""
14847  get_value(StructureProvenance self, FloatKey a0) -> IMP::Float
14848  get_value(StructureProvenance self, IntKey a0) -> IMP::Int
14849  get_value(StructureProvenance self, FloatsKey a0) -> IMP::Floats
14850  get_value(StructureProvenance self, IntsKey a0) -> IMP::Ints
14851  get_value(StructureProvenance self, StringKey a0) -> IMP::String
14852  get_value(StructureProvenance self, ParticleIndexKey a0) -> Particle
14853  get_value(StructureProvenance self, ObjectKey a0) -> Object
14854  get_value(StructureProvenance self, SparseFloatKey a0) -> IMP::Float
14855  get_value(StructureProvenance self, SparseIntKey a0) -> IMP::Int
14856  get_value(StructureProvenance self, SparseStringKey a0) -> IMP::String
14857  get_value(StructureProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
14858  """
14859  return _IMP_core.StructureProvenance_get_value(self, *args)
14860 
14861  def set_value(self, *args):
14862  r"""
14863  set_value(StructureProvenance self, FloatKey a0, IMP::Float a1)
14864  set_value(StructureProvenance self, IntKey a0, IMP::Int a1)
14865  set_value(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14866  set_value(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14867  set_value(StructureProvenance self, StringKey a0, IMP::String a1)
14868  set_value(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14869  set_value(StructureProvenance self, ObjectKey a0, Object a1)
14870  set_value(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14871  set_value(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14872  set_value(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14873  set_value(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14874  """
14875  return _IMP_core.StructureProvenance_set_value(self, *args)
14876 
14877  def remove_attribute(self, *args):
14878  r"""
14879  remove_attribute(StructureProvenance self, FloatKey a0)
14880  remove_attribute(StructureProvenance self, IntKey a0)
14881  remove_attribute(StructureProvenance self, FloatsKey a0)
14882  remove_attribute(StructureProvenance self, IntsKey a0)
14883  remove_attribute(StructureProvenance self, StringKey a0)
14884  remove_attribute(StructureProvenance self, ParticleIndexKey a0)
14885  remove_attribute(StructureProvenance self, ObjectKey a0)
14886  remove_attribute(StructureProvenance self, SparseFloatKey a0)
14887  remove_attribute(StructureProvenance self, SparseIntKey a0)
14888  remove_attribute(StructureProvenance self, SparseStringKey a0)
14889  remove_attribute(StructureProvenance self, SparseParticleIndexKey a0)
14890  """
14891  return _IMP_core.StructureProvenance_remove_attribute(self, *args)
14892 
14893  def has_attribute(self, *args):
14894  r"""
14895  has_attribute(StructureProvenance self, FloatKey a0) -> bool
14896  has_attribute(StructureProvenance self, IntKey a0) -> bool
14897  has_attribute(StructureProvenance self, FloatsKey a0) -> bool
14898  has_attribute(StructureProvenance self, IntsKey a0) -> bool
14899  has_attribute(StructureProvenance self, StringKey a0) -> bool
14900  has_attribute(StructureProvenance self, ParticleIndexKey a0) -> bool
14901  has_attribute(StructureProvenance self, ObjectKey a0) -> bool
14902  has_attribute(StructureProvenance self, SparseFloatKey a0) -> bool
14903  has_attribute(StructureProvenance self, SparseIntKey a0) -> bool
14904  has_attribute(StructureProvenance self, SparseStringKey a0) -> bool
14905  has_attribute(StructureProvenance self, SparseParticleIndexKey a0) -> bool
14906  """
14907  return _IMP_core.StructureProvenance_has_attribute(self, *args)
14908 
14909  def get_derivative(self, a0):
14910  r"""get_derivative(StructureProvenance self, FloatKey a0) -> double"""
14911  return _IMP_core.StructureProvenance_get_derivative(self, a0)
14912 
14913  def get_name(self):
14914  r"""get_name(StructureProvenance self) -> std::string"""
14915  return _IMP_core.StructureProvenance_get_name(self)
14916 
14917  def clear_caches(self):
14918  r"""clear_caches(StructureProvenance self)"""
14919  return _IMP_core.StructureProvenance_clear_caches(self)
14920 
14921  def set_name(self, a0):
14922  r"""set_name(StructureProvenance self, std::string a0)"""
14923  return _IMP_core.StructureProvenance_set_name(self, a0)
14924 
14925  def set_check_level(self, a0):
14926  r"""set_check_level(StructureProvenance self, IMP::CheckLevel a0)"""
14927  return _IMP_core.StructureProvenance_set_check_level(self, a0)
14928 
14929  def add_to_derivative(self, a0, a1, a2):
14930  r"""add_to_derivative(StructureProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14931  return _IMP_core.StructureProvenance_add_to_derivative(self, a0, a1, a2)
14932 
14933  def set_is_optimized(self, a0, a1):
14934  r"""set_is_optimized(StructureProvenance self, FloatKey a0, bool a1)"""
14935  return _IMP_core.StructureProvenance_set_is_optimized(self, a0, a1)
14936 
14937  def get_is_optimized(self, a0):
14938  r"""get_is_optimized(StructureProvenance self, FloatKey a0) -> bool"""
14939  return _IMP_core.StructureProvenance_get_is_optimized(self, a0)
14940 
14941  def get_check_level(self):
14942  r"""get_check_level(StructureProvenance self) -> IMP::CheckLevel"""
14943  return _IMP_core.StructureProvenance_get_check_level(self)
14944 
14945  def __eq__(self, *args):
14946  r"""
14947  __eq__(StructureProvenance self, StructureProvenance o) -> bool
14948  __eq__(StructureProvenance self, Particle d) -> bool
14949  """
14950  return _IMP_core.StructureProvenance___eq__(self, *args)
14951 
14952  def __ne__(self, *args):
14953  r"""
14954  __ne__(StructureProvenance self, StructureProvenance o) -> bool
14955  __ne__(StructureProvenance self, Particle d) -> bool
14956  """
14957  return _IMP_core.StructureProvenance___ne__(self, *args)
14958 
14959  def __le__(self, *args):
14960  r"""
14961  __le__(StructureProvenance self, StructureProvenance o) -> bool
14962  __le__(StructureProvenance self, Particle d) -> bool
14963  """
14964  return _IMP_core.StructureProvenance___le__(self, *args)
14965 
14966  def __lt__(self, *args):
14967  r"""
14968  __lt__(StructureProvenance self, StructureProvenance o) -> bool
14969  __lt__(StructureProvenance self, Particle d) -> bool
14970  """
14971  return _IMP_core.StructureProvenance___lt__(self, *args)
14972 
14973  def __ge__(self, *args):
14974  r"""
14975  __ge__(StructureProvenance self, StructureProvenance o) -> bool
14976  __ge__(StructureProvenance self, Particle d) -> bool
14977  """
14978  return _IMP_core.StructureProvenance___ge__(self, *args)
14979 
14980  def __gt__(self, *args):
14981  r"""
14982  __gt__(StructureProvenance self, StructureProvenance o) -> bool
14983  __gt__(StructureProvenance self, Particle d) -> bool
14984  """
14985  return _IMP_core.StructureProvenance___gt__(self, *args)
14986 
14987  def __hash__(self):
14988  r"""__hash__(StructureProvenance self) -> std::size_t"""
14989  return _IMP_core.StructureProvenance___hash__(self)
14990 
14991  def __str__(self):
14992  r"""__str__(StructureProvenance self) -> std::string"""
14993  return _IMP_core.StructureProvenance___str__(self)
14994 
14995  def __repr__(self):
14996  r"""__repr__(StructureProvenance self) -> std::string"""
14997  return _IMP_core.StructureProvenance___repr__(self)
14998 
14999  def _get_as_binary(self):
15000  r"""_get_as_binary(StructureProvenance self) -> PyObject *"""
15001  return _IMP_core.StructureProvenance__get_as_binary(self)
15002 
15003  def _set_from_binary(self, p):
15004  r"""_set_from_binary(StructureProvenance self, PyObject * p)"""
15005  return _IMP_core.StructureProvenance__set_from_binary(self, p)
15006 
15007  def __getstate__(self):
15008  p = self._get_as_binary()
15009  if len(self.__dict__) > 1:
15010  d = self.__dict__.copy()
15011  del d['this']
15012  p = (d, p)
15013  return p
15014 
15015  def __setstate__(self, p):
15016  if not hasattr(self, 'this'):
15017  self.__init__()
15018  if isinstance(p, tuple):
15019  d, p = p
15020  self.__dict__.update(d)
15021  return self._set_from_binary(p)
15022 
15023  __swig_destroy__ = _IMP_core.delete_StructureProvenance
15024 
15025 # Register StructureProvenance in _IMP_core:
15026 _IMP_core.StructureProvenance_swigregister(StructureProvenance)
15027 class SampleProvenance(Provenance):
15028  r"""Proxy of C++ IMP::core::SampleProvenance class."""
15029 
15030  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15031 
15032  def set_method(self, method):
15033  r"""set_method(SampleProvenance self, std::string method)"""
15034  return _IMP_core.SampleProvenance_set_method(self, method)
15035 
15036  def get_method(self):
15037  r"""get_method(SampleProvenance self) -> std::string"""
15038  return _IMP_core.SampleProvenance_get_method(self)
15039 
15040  def set_number_of_frames(self, frames):
15041  r"""set_number_of_frames(SampleProvenance self, int frames)"""
15042  return _IMP_core.SampleProvenance_set_number_of_frames(self, frames)
15043 
15044  def get_number_of_frames(self):
15045  r"""get_number_of_frames(SampleProvenance self) -> int"""
15046  return _IMP_core.SampleProvenance_get_number_of_frames(self)
15047 
15048  def set_number_of_iterations(self, iterations):
15049  r"""set_number_of_iterations(SampleProvenance self, int iterations)"""
15050  return _IMP_core.SampleProvenance_set_number_of_iterations(self, iterations)
15051 
15052  def get_number_of_iterations(self):
15053  r"""get_number_of_iterations(SampleProvenance self) -> int"""
15054  return _IMP_core.SampleProvenance_get_number_of_iterations(self)
15055 
15056  def set_number_of_replicas(self, replicas):
15057  r"""set_number_of_replicas(SampleProvenance self, int replicas)"""
15058  return _IMP_core.SampleProvenance_set_number_of_replicas(self, replicas)
15059 
15060  def get_number_of_replicas(self):
15061  r"""get_number_of_replicas(SampleProvenance self) -> int"""
15062  return _IMP_core.SampleProvenance_get_number_of_replicas(self)
15063 
15064  def __init__(self, *args):
15065  r"""
15066  __init__(SampleProvenance self) -> SampleProvenance
15067  __init__(SampleProvenance self, Model m, ParticleIndex id) -> SampleProvenance
15068  __init__(SampleProvenance self, _ParticleAdaptor d) -> SampleProvenance
15069  """
15070  _IMP_core.SampleProvenance_swiginit(self, _IMP_core.new_SampleProvenance(*args))
15071 
15072  @staticmethod
15073  def get_is_setup(*args):
15074  r"""
15075  get_is_setup(Model m, ParticleIndex pi) -> bool
15076  get_is_setup(_ParticleAdaptor p) -> bool
15077  """
15078  return _IMP_core.SampleProvenance_get_is_setup(*args)
15079 
15080  def show(self, *args):
15081  r"""show(SampleProvenance self, _ostream out=std::cout)"""
15082  return _IMP_core.SampleProvenance_show(self, *args)
15083 
15084  @staticmethod
15085  def setup_particle(*args):
15086  r"""
15087  setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
15088  setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
15089  setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations) -> SampleProvenance
15090  setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations) -> SampleProvenance
15091  setup_particle(Model m, ParticleIndex pi, SampleProvenance o) -> SampleProvenance
15092  setup_particle(_ParticleAdaptor pa, SampleProvenance o) -> SampleProvenance
15093  """
15094  return _IMP_core.SampleProvenance_setup_particle(*args)
15095 
15096  def add_attribute(self, *args):
15097  r"""
15098  add_attribute(SampleProvenance self, FloatKey k, IMP::Float v, bool opt)
15099  add_attribute(SampleProvenance self, FloatKey a0, IMP::Float a1)
15100  add_attribute(SampleProvenance self, IntKey a0, IMP::Int a1)
15101  add_attribute(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
15102  add_attribute(SampleProvenance self, IntsKey a0, IMP::Ints a1)
15103  add_attribute(SampleProvenance self, StringKey a0, IMP::String a1)
15104  add_attribute(SampleProvenance self, ParticleIndexKey a0, Particle a1)
15105  add_attribute(SampleProvenance self, ObjectKey a0, Object a1)
15106  add_attribute(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
15107  add_attribute(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
15108  add_attribute(SampleProvenance self, SparseStringKey a0, IMP::String a1)
15109  add_attribute(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15110  """
15111  return _IMP_core.SampleProvenance_add_attribute(self, *args)
15112 
15113  def get_value(self, *args):
15114  r"""
15115  get_value(SampleProvenance self, FloatKey a0) -> IMP::Float
15116  get_value(SampleProvenance self, IntKey a0) -> IMP::Int
15117  get_value(SampleProvenance self, FloatsKey a0) -> IMP::Floats
15118  get_value(SampleProvenance self, IntsKey a0) -> IMP::Ints
15119  get_value(SampleProvenance self, StringKey a0) -> IMP::String
15120  get_value(SampleProvenance self, ParticleIndexKey a0) -> Particle
15121  get_value(SampleProvenance self, ObjectKey a0) -> Object
15122  get_value(SampleProvenance self, SparseFloatKey a0) -> IMP::Float
15123  get_value(SampleProvenance self, SparseIntKey a0) -> IMP::Int
15124  get_value(SampleProvenance self, SparseStringKey a0) -> IMP::String
15125  get_value(SampleProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15126  """
15127  return _IMP_core.SampleProvenance_get_value(self, *args)
15128 
15129  def set_value(self, *args):
15130  r"""
15131  set_value(SampleProvenance self, FloatKey a0, IMP::Float a1)
15132  set_value(SampleProvenance self, IntKey a0, IMP::Int a1)
15133  set_value(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
15134  set_value(SampleProvenance self, IntsKey a0, IMP::Ints a1)
15135  set_value(SampleProvenance self, StringKey a0, IMP::String a1)
15136  set_value(SampleProvenance self, ParticleIndexKey a0, Particle a1)
15137  set_value(SampleProvenance self, ObjectKey a0, Object a1)
15138  set_value(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
15139  set_value(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
15140  set_value(SampleProvenance self, SparseStringKey a0, IMP::String a1)
15141  set_value(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15142  """
15143  return _IMP_core.SampleProvenance_set_value(self, *args)
15144 
15145  def remove_attribute(self, *args):
15146  r"""
15147  remove_attribute(SampleProvenance self, FloatKey a0)
15148  remove_attribute(SampleProvenance self, IntKey a0)
15149  remove_attribute(SampleProvenance self, FloatsKey a0)
15150  remove_attribute(SampleProvenance self, IntsKey a0)
15151  remove_attribute(SampleProvenance self, StringKey a0)
15152  remove_attribute(SampleProvenance self, ParticleIndexKey a0)
15153  remove_attribute(SampleProvenance self, ObjectKey a0)
15154  remove_attribute(SampleProvenance self, SparseFloatKey a0)
15155  remove_attribute(SampleProvenance self, SparseIntKey a0)
15156  remove_attribute(SampleProvenance self, SparseStringKey a0)
15157  remove_attribute(SampleProvenance self, SparseParticleIndexKey a0)
15158  """
15159  return _IMP_core.SampleProvenance_remove_attribute(self, *args)
15160 
15161  def has_attribute(self, *args):
15162  r"""
15163  has_attribute(SampleProvenance self, FloatKey a0) -> bool
15164  has_attribute(SampleProvenance self, IntKey a0) -> bool
15165  has_attribute(SampleProvenance self, FloatsKey a0) -> bool
15166  has_attribute(SampleProvenance self, IntsKey a0) -> bool
15167  has_attribute(SampleProvenance self, StringKey a0) -> bool
15168  has_attribute(SampleProvenance self, ParticleIndexKey a0) -> bool
15169  has_attribute(SampleProvenance self, ObjectKey a0) -> bool
15170  has_attribute(SampleProvenance self, SparseFloatKey a0) -> bool
15171  has_attribute(SampleProvenance self, SparseIntKey a0) -> bool
15172  has_attribute(SampleProvenance self, SparseStringKey a0) -> bool
15173  has_attribute(SampleProvenance self, SparseParticleIndexKey a0) -> bool
15174  """
15175  return _IMP_core.SampleProvenance_has_attribute(self, *args)
15176 
15177  def get_derivative(self, a0):
15178  r"""get_derivative(SampleProvenance self, FloatKey a0) -> double"""
15179  return _IMP_core.SampleProvenance_get_derivative(self, a0)
15180 
15181  def get_name(self):
15182  r"""get_name(SampleProvenance self) -> std::string"""
15183  return _IMP_core.SampleProvenance_get_name(self)
15184 
15185  def clear_caches(self):
15186  r"""clear_caches(SampleProvenance self)"""
15187  return _IMP_core.SampleProvenance_clear_caches(self)
15188 
15189  def set_name(self, a0):
15190  r"""set_name(SampleProvenance self, std::string a0)"""
15191  return _IMP_core.SampleProvenance_set_name(self, a0)
15192 
15193  def set_check_level(self, a0):
15194  r"""set_check_level(SampleProvenance self, IMP::CheckLevel a0)"""
15195  return _IMP_core.SampleProvenance_set_check_level(self, a0)
15196 
15197  def add_to_derivative(self, a0, a1, a2):
15198  r"""add_to_derivative(SampleProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15199  return _IMP_core.SampleProvenance_add_to_derivative(self, a0, a1, a2)
15200 
15201  def set_is_optimized(self, a0, a1):
15202  r"""set_is_optimized(SampleProvenance self, FloatKey a0, bool a1)"""
15203  return _IMP_core.SampleProvenance_set_is_optimized(self, a0, a1)
15204 
15205  def get_is_optimized(self, a0):
15206  r"""get_is_optimized(SampleProvenance self, FloatKey a0) -> bool"""
15207  return _IMP_core.SampleProvenance_get_is_optimized(self, a0)
15208 
15209  def get_check_level(self):
15210  r"""get_check_level(SampleProvenance self) -> IMP::CheckLevel"""
15211  return _IMP_core.SampleProvenance_get_check_level(self)
15212 
15213  def __eq__(self, *args):
15214  r"""
15215  __eq__(SampleProvenance self, SampleProvenance o) -> bool
15216  __eq__(SampleProvenance self, Particle d) -> bool
15217  """
15218  return _IMP_core.SampleProvenance___eq__(self, *args)
15219 
15220  def __ne__(self, *args):
15221  r"""
15222  __ne__(SampleProvenance self, SampleProvenance o) -> bool
15223  __ne__(SampleProvenance self, Particle d) -> bool
15224  """
15225  return _IMP_core.SampleProvenance___ne__(self, *args)
15226 
15227  def __le__(self, *args):
15228  r"""
15229  __le__(SampleProvenance self, SampleProvenance o) -> bool
15230  __le__(SampleProvenance self, Particle d) -> bool
15231  """
15232  return _IMP_core.SampleProvenance___le__(self, *args)
15233 
15234  def __lt__(self, *args):
15235  r"""
15236  __lt__(SampleProvenance self, SampleProvenance o) -> bool
15237  __lt__(SampleProvenance self, Particle d) -> bool
15238  """
15239  return _IMP_core.SampleProvenance___lt__(self, *args)
15240 
15241  def __ge__(self, *args):
15242  r"""
15243  __ge__(SampleProvenance self, SampleProvenance o) -> bool
15244  __ge__(SampleProvenance self, Particle d) -> bool
15245  """
15246  return _IMP_core.SampleProvenance___ge__(self, *args)
15247 
15248  def __gt__(self, *args):
15249  r"""
15250  __gt__(SampleProvenance self, SampleProvenance o) -> bool
15251  __gt__(SampleProvenance self, Particle d) -> bool
15252  """
15253  return _IMP_core.SampleProvenance___gt__(self, *args)
15254 
15255  def __hash__(self):
15256  r"""__hash__(SampleProvenance self) -> std::size_t"""
15257  return _IMP_core.SampleProvenance___hash__(self)
15258 
15259  def __str__(self):
15260  r"""__str__(SampleProvenance self) -> std::string"""
15261  return _IMP_core.SampleProvenance___str__(self)
15262 
15263  def __repr__(self):
15264  r"""__repr__(SampleProvenance self) -> std::string"""
15265  return _IMP_core.SampleProvenance___repr__(self)
15266 
15267  def _get_as_binary(self):
15268  r"""_get_as_binary(SampleProvenance self) -> PyObject *"""
15269  return _IMP_core.SampleProvenance__get_as_binary(self)
15270 
15271  def _set_from_binary(self, p):
15272  r"""_set_from_binary(SampleProvenance self, PyObject * p)"""
15273  return _IMP_core.SampleProvenance__set_from_binary(self, p)
15274 
15275  def __getstate__(self):
15276  p = self._get_as_binary()
15277  if len(self.__dict__) > 1:
15278  d = self.__dict__.copy()
15279  del d['this']
15280  p = (d, p)
15281  return p
15282 
15283  def __setstate__(self, p):
15284  if not hasattr(self, 'this'):
15285  self.__init__()
15286  if isinstance(p, tuple):
15287  d, p = p
15288  self.__dict__.update(d)
15289  return self._set_from_binary(p)
15290 
15291  __swig_destroy__ = _IMP_core.delete_SampleProvenance
15292 
15293 # Register SampleProvenance in _IMP_core:
15294 _IMP_core.SampleProvenance_swigregister(SampleProvenance)
15295 class CombineProvenance(Provenance):
15296  r"""Proxy of C++ IMP::core::CombineProvenance class."""
15297 
15298  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15299 
15300  def set_number_of_frames(self, frames):
15301  r"""set_number_of_frames(CombineProvenance self, int frames)"""
15302  return _IMP_core.CombineProvenance_set_number_of_frames(self, frames)
15303 
15304  def get_number_of_frames(self):
15305  r"""get_number_of_frames(CombineProvenance self) -> int"""
15306  return _IMP_core.CombineProvenance_get_number_of_frames(self)
15307 
15308  def set_number_of_runs(self, runs):
15309  r"""set_number_of_runs(CombineProvenance self, int runs)"""
15310  return _IMP_core.CombineProvenance_set_number_of_runs(self, runs)
15311 
15312  def get_number_of_runs(self):
15313  r"""get_number_of_runs(CombineProvenance self) -> int"""
15314  return _IMP_core.CombineProvenance_get_number_of_runs(self)
15315 
15316  def __init__(self, *args):
15317  r"""
15318  __init__(CombineProvenance self) -> CombineProvenance
15319  __init__(CombineProvenance self, Model m, ParticleIndex id) -> CombineProvenance
15320  __init__(CombineProvenance self, _ParticleAdaptor d) -> CombineProvenance
15321  """
15322  _IMP_core.CombineProvenance_swiginit(self, _IMP_core.new_CombineProvenance(*args))
15323 
15324  @staticmethod
15325  def get_is_setup(*args):
15326  r"""
15327  get_is_setup(Model m, ParticleIndex pi) -> bool
15328  get_is_setup(_ParticleAdaptor p) -> bool
15329  """
15330  return _IMP_core.CombineProvenance_get_is_setup(*args)
15331 
15332  def show(self, *args):
15333  r"""show(CombineProvenance self, _ostream out=std::cout)"""
15334  return _IMP_core.CombineProvenance_show(self, *args)
15335 
15336  @staticmethod
15337  def setup_particle(*args):
15338  r"""
15339  setup_particle(Model m, ParticleIndex pi, int runs, int frames) -> CombineProvenance
15340  setup_particle(_ParticleAdaptor pa, int runs, int frames) -> CombineProvenance
15341  setup_particle(Model m, ParticleIndex pi, CombineProvenance o) -> CombineProvenance
15342  setup_particle(_ParticleAdaptor pa, CombineProvenance o) -> CombineProvenance
15343  """
15344  return _IMP_core.CombineProvenance_setup_particle(*args)
15345 
15346  def add_attribute(self, *args):
15347  r"""
15348  add_attribute(CombineProvenance self, FloatKey k, IMP::Float v, bool opt)
15349  add_attribute(CombineProvenance self, FloatKey a0, IMP::Float a1)
15350  add_attribute(CombineProvenance self, IntKey a0, IMP::Int a1)
15351  add_attribute(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15352  add_attribute(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15353  add_attribute(CombineProvenance self, StringKey a0, IMP::String a1)
15354  add_attribute(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15355  add_attribute(CombineProvenance self, ObjectKey a0, Object a1)
15356  add_attribute(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15357  add_attribute(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15358  add_attribute(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15359  add_attribute(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15360  """
15361  return _IMP_core.CombineProvenance_add_attribute(self, *args)
15362 
15363  def get_value(self, *args):
15364  r"""
15365  get_value(CombineProvenance self, FloatKey a0) -> IMP::Float
15366  get_value(CombineProvenance self, IntKey a0) -> IMP::Int
15367  get_value(CombineProvenance self, FloatsKey a0) -> IMP::Floats
15368  get_value(CombineProvenance self, IntsKey a0) -> IMP::Ints
15369  get_value(CombineProvenance self, StringKey a0) -> IMP::String
15370  get_value(CombineProvenance self, ParticleIndexKey a0) -> Particle
15371  get_value(CombineProvenance self, ObjectKey a0) -> Object
15372  get_value(CombineProvenance self, SparseFloatKey a0) -> IMP::Float
15373  get_value(CombineProvenance self, SparseIntKey a0) -> IMP::Int
15374  get_value(CombineProvenance self, SparseStringKey a0) -> IMP::String
15375  get_value(CombineProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15376  """
15377  return _IMP_core.CombineProvenance_get_value(self, *args)
15378 
15379  def set_value(self, *args):
15380  r"""
15381  set_value(CombineProvenance self, FloatKey a0, IMP::Float a1)
15382  set_value(CombineProvenance self, IntKey a0, IMP::Int a1)
15383  set_value(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15384  set_value(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15385  set_value(CombineProvenance self, StringKey a0, IMP::String a1)
15386  set_value(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15387  set_value(CombineProvenance self, ObjectKey a0, Object a1)
15388  set_value(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15389  set_value(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15390  set_value(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15391  set_value(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15392  """
15393  return _IMP_core.CombineProvenance_set_value(self, *args)
15394 
15395  def remove_attribute(self, *args):
15396  r"""
15397  remove_attribute(CombineProvenance self, FloatKey a0)
15398  remove_attribute(CombineProvenance self, IntKey a0)
15399  remove_attribute(CombineProvenance self, FloatsKey a0)
15400  remove_attribute(CombineProvenance self, IntsKey a0)
15401  remove_attribute(CombineProvenance self, StringKey a0)
15402  remove_attribute(CombineProvenance self, ParticleIndexKey a0)
15403  remove_attribute(CombineProvenance self, ObjectKey a0)
15404  remove_attribute(CombineProvenance self, SparseFloatKey a0)
15405  remove_attribute(CombineProvenance self, SparseIntKey a0)
15406  remove_attribute(CombineProvenance self, SparseStringKey a0)
15407  remove_attribute(CombineProvenance self, SparseParticleIndexKey a0)
15408  """
15409  return _IMP_core.CombineProvenance_remove_attribute(self, *args)
15410 
15411  def has_attribute(self, *args):
15412  r"""
15413  has_attribute(CombineProvenance self, FloatKey a0) -> bool
15414  has_attribute(CombineProvenance self, IntKey a0) -> bool
15415  has_attribute(CombineProvenance self, FloatsKey a0) -> bool
15416  has_attribute(CombineProvenance self, IntsKey a0) -> bool
15417  has_attribute(CombineProvenance self, StringKey a0) -> bool
15418  has_attribute(CombineProvenance self, ParticleIndexKey a0) -> bool
15419  has_attribute(CombineProvenance self, ObjectKey a0) -> bool
15420  has_attribute(CombineProvenance self, SparseFloatKey a0) -> bool
15421  has_attribute(CombineProvenance self, SparseIntKey a0) -> bool
15422  has_attribute(CombineProvenance self, SparseStringKey a0) -> bool
15423  has_attribute(CombineProvenance self, SparseParticleIndexKey a0) -> bool
15424  """
15425  return _IMP_core.CombineProvenance_has_attribute(self, *args)
15426 
15427  def get_derivative(self, a0):
15428  r"""get_derivative(CombineProvenance self, FloatKey a0) -> double"""
15429  return _IMP_core.CombineProvenance_get_derivative(self, a0)
15430 
15431  def get_name(self):
15432  r"""get_name(CombineProvenance self) -> std::string"""
15433  return _IMP_core.CombineProvenance_get_name(self)
15434 
15435  def clear_caches(self):
15436  r"""clear_caches(CombineProvenance self)"""
15437  return _IMP_core.CombineProvenance_clear_caches(self)
15438 
15439  def set_name(self, a0):
15440  r"""set_name(CombineProvenance self, std::string a0)"""
15441  return _IMP_core.CombineProvenance_set_name(self, a0)
15442 
15443  def set_check_level(self, a0):
15444  r"""set_check_level(CombineProvenance self, IMP::CheckLevel a0)"""
15445  return _IMP_core.CombineProvenance_set_check_level(self, a0)
15446 
15447  def add_to_derivative(self, a0, a1, a2):
15448  r"""add_to_derivative(CombineProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15449  return _IMP_core.CombineProvenance_add_to_derivative(self, a0, a1, a2)
15450 
15451  def set_is_optimized(self, a0, a1):
15452  r"""set_is_optimized(CombineProvenance self, FloatKey a0, bool a1)"""
15453  return _IMP_core.CombineProvenance_set_is_optimized(self, a0, a1)
15454 
15455  def get_is_optimized(self, a0):
15456  r"""get_is_optimized(CombineProvenance self, FloatKey a0) -> bool"""
15457  return _IMP_core.CombineProvenance_get_is_optimized(self, a0)
15458 
15459  def get_check_level(self):
15460  r"""get_check_level(CombineProvenance self) -> IMP::CheckLevel"""
15461  return _IMP_core.CombineProvenance_get_check_level(self)
15462 
15463  def __eq__(self, *args):
15464  r"""
15465  __eq__(CombineProvenance self, CombineProvenance o) -> bool
15466  __eq__(CombineProvenance self, Particle d) -> bool
15467  """
15468  return _IMP_core.CombineProvenance___eq__(self, *args)
15469 
15470  def __ne__(self, *args):
15471  r"""
15472  __ne__(CombineProvenance self, CombineProvenance o) -> bool
15473  __ne__(CombineProvenance self, Particle d) -> bool
15474  """
15475  return _IMP_core.CombineProvenance___ne__(self, *args)
15476 
15477  def __le__(self, *args):
15478  r"""
15479  __le__(CombineProvenance self, CombineProvenance o) -> bool
15480  __le__(CombineProvenance self, Particle d) -> bool
15481  """
15482  return _IMP_core.CombineProvenance___le__(self, *args)
15483 
15484  def __lt__(self, *args):
15485  r"""
15486  __lt__(CombineProvenance self, CombineProvenance o) -> bool
15487  __lt__(CombineProvenance self, Particle d) -> bool
15488  """
15489  return _IMP_core.CombineProvenance___lt__(self, *args)
15490 
15491  def __ge__(self, *args):
15492  r"""
15493  __ge__(CombineProvenance self, CombineProvenance o) -> bool
15494  __ge__(CombineProvenance self, Particle d) -> bool
15495  """
15496  return _IMP_core.CombineProvenance___ge__(self, *args)
15497 
15498  def __gt__(self, *args):
15499  r"""
15500  __gt__(CombineProvenance self, CombineProvenance o) -> bool
15501  __gt__(CombineProvenance self, Particle d) -> bool
15502  """
15503  return _IMP_core.CombineProvenance___gt__(self, *args)
15504 
15505  def __hash__(self):
15506  r"""__hash__(CombineProvenance self) -> std::size_t"""
15507  return _IMP_core.CombineProvenance___hash__(self)
15508 
15509  def __str__(self):
15510  r"""__str__(CombineProvenance self) -> std::string"""
15511  return _IMP_core.CombineProvenance___str__(self)
15512 
15513  def __repr__(self):
15514  r"""__repr__(CombineProvenance self) -> std::string"""
15515  return _IMP_core.CombineProvenance___repr__(self)
15516 
15517  def _get_as_binary(self):
15518  r"""_get_as_binary(CombineProvenance self) -> PyObject *"""
15519  return _IMP_core.CombineProvenance__get_as_binary(self)
15520 
15521  def _set_from_binary(self, p):
15522  r"""_set_from_binary(CombineProvenance self, PyObject * p)"""
15523  return _IMP_core.CombineProvenance__set_from_binary(self, p)
15524 
15525  def __getstate__(self):
15526  p = self._get_as_binary()
15527  if len(self.__dict__) > 1:
15528  d = self.__dict__.copy()
15529  del d['this']
15530  p = (d, p)
15531  return p
15532 
15533  def __setstate__(self, p):
15534  if not hasattr(self, 'this'):
15535  self.__init__()
15536  if isinstance(p, tuple):
15537  d, p = p
15538  self.__dict__.update(d)
15539  return self._set_from_binary(p)
15540 
15541  __swig_destroy__ = _IMP_core.delete_CombineProvenance
15542 
15543 # Register CombineProvenance in _IMP_core:
15544 _IMP_core.CombineProvenance_swigregister(CombineProvenance)
15545 class FilterProvenance(Provenance):
15546  r"""Proxy of C++ IMP::core::FilterProvenance class."""
15547 
15548  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15549 
15550  def set_method(self, method):
15551  r"""set_method(FilterProvenance self, std::string method)"""
15552  return _IMP_core.FilterProvenance_set_method(self, method)
15553 
15554  def get_method(self):
15555  r"""get_method(FilterProvenance self) -> std::string"""
15556  return _IMP_core.FilterProvenance_get_method(self)
15557 
15558  def set_number_of_frames(self, frames):
15559  r"""set_number_of_frames(FilterProvenance self, int frames)"""
15560  return _IMP_core.FilterProvenance_set_number_of_frames(self, frames)
15561 
15562  def get_number_of_frames(self):
15563  r"""get_number_of_frames(FilterProvenance self) -> int"""
15564  return _IMP_core.FilterProvenance_get_number_of_frames(self)
15565 
15566  def set_threshold(self, threshold):
15567  r"""set_threshold(FilterProvenance self, double threshold)"""
15568  return _IMP_core.FilterProvenance_set_threshold(self, threshold)
15569 
15570  def get_threshold(self):
15571  r"""get_threshold(FilterProvenance self) -> double"""
15572  return _IMP_core.FilterProvenance_get_threshold(self)
15573 
15574  def __init__(self, *args):
15575  r"""
15576  __init__(FilterProvenance self) -> FilterProvenance
15577  __init__(FilterProvenance self, Model m, ParticleIndex id) -> FilterProvenance
15578  __init__(FilterProvenance self, _ParticleAdaptor d) -> FilterProvenance
15579  """
15580  _IMP_core.FilterProvenance_swiginit(self, _IMP_core.new_FilterProvenance(*args))
15581 
15582  @staticmethod
15583  def get_is_setup(*args):
15584  r"""
15585  get_is_setup(Model m, ParticleIndex pi) -> bool
15586  get_is_setup(_ParticleAdaptor p) -> bool
15587  """
15588  return _IMP_core.FilterProvenance_get_is_setup(*args)
15589 
15590  def show(self, *args):
15591  r"""show(FilterProvenance self, _ostream out=std::cout)"""
15592  return _IMP_core.FilterProvenance_show(self, *args)
15593 
15594  @staticmethod
15595  def setup_particle(*args):
15596  r"""
15597  setup_particle(Model m, ParticleIndex pi, std::string method, double threshold, int frames) -> FilterProvenance
15598  setup_particle(_ParticleAdaptor pa, std::string method, double threshold, int frames) -> FilterProvenance
15599  setup_particle(Model m, ParticleIndex pi, FilterProvenance o) -> FilterProvenance
15600  setup_particle(_ParticleAdaptor pa, FilterProvenance o) -> FilterProvenance
15601  """
15602  return _IMP_core.FilterProvenance_setup_particle(*args)
15603 
15604  def add_attribute(self, *args):
15605  r"""
15606  add_attribute(FilterProvenance self, FloatKey k, IMP::Float v, bool opt)
15607  add_attribute(FilterProvenance self, FloatKey a0, IMP::Float a1)
15608  add_attribute(FilterProvenance self, IntKey a0, IMP::Int a1)
15609  add_attribute(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15610  add_attribute(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15611  add_attribute(FilterProvenance self, StringKey a0, IMP::String a1)
15612  add_attribute(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15613  add_attribute(FilterProvenance self, ObjectKey a0, Object a1)
15614  add_attribute(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15615  add_attribute(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15616  add_attribute(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15617  add_attribute(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15618  """
15619  return _IMP_core.FilterProvenance_add_attribute(self, *args)
15620 
15621  def get_value(self, *args):
15622  r"""
15623  get_value(FilterProvenance self, FloatKey a0) -> IMP::Float
15624  get_value(FilterProvenance self, IntKey a0) -> IMP::Int
15625  get_value(FilterProvenance self, FloatsKey a0) -> IMP::Floats
15626  get_value(FilterProvenance self, IntsKey a0) -> IMP::Ints
15627  get_value(FilterProvenance self, StringKey a0) -> IMP::String
15628  get_value(FilterProvenance self, ParticleIndexKey a0) -> Particle
15629  get_value(FilterProvenance self, ObjectKey a0) -> Object
15630  get_value(FilterProvenance self, SparseFloatKey a0) -> IMP::Float
15631  get_value(FilterProvenance self, SparseIntKey a0) -> IMP::Int
15632  get_value(FilterProvenance self, SparseStringKey a0) -> IMP::String
15633  get_value(FilterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15634  """
15635  return _IMP_core.FilterProvenance_get_value(self, *args)
15636 
15637  def set_value(self, *args):
15638  r"""
15639  set_value(FilterProvenance self, FloatKey a0, IMP::Float a1)
15640  set_value(FilterProvenance self, IntKey a0, IMP::Int a1)
15641  set_value(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15642  set_value(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15643  set_value(FilterProvenance self, StringKey a0, IMP::String a1)
15644  set_value(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15645  set_value(FilterProvenance self, ObjectKey a0, Object a1)
15646  set_value(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15647  set_value(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15648  set_value(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15649  set_value(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15650  """
15651  return _IMP_core.FilterProvenance_set_value(self, *args)
15652 
15653  def remove_attribute(self, *args):
15654  r"""
15655  remove_attribute(FilterProvenance self, FloatKey a0)
15656  remove_attribute(FilterProvenance self, IntKey a0)
15657  remove_attribute(FilterProvenance self, FloatsKey a0)
15658  remove_attribute(FilterProvenance self, IntsKey a0)
15659  remove_attribute(FilterProvenance self, StringKey a0)
15660  remove_attribute(FilterProvenance self, ParticleIndexKey a0)
15661  remove_attribute(FilterProvenance self, ObjectKey a0)
15662  remove_attribute(FilterProvenance self, SparseFloatKey a0)
15663  remove_attribute(FilterProvenance self, SparseIntKey a0)
15664  remove_attribute(FilterProvenance self, SparseStringKey a0)
15665  remove_attribute(FilterProvenance self, SparseParticleIndexKey a0)
15666  """
15667  return _IMP_core.FilterProvenance_remove_attribute(self, *args)
15668 
15669  def has_attribute(self, *args):
15670  r"""
15671  has_attribute(FilterProvenance self, FloatKey a0) -> bool
15672  has_attribute(FilterProvenance self, IntKey a0) -> bool
15673  has_attribute(FilterProvenance self, FloatsKey a0) -> bool
15674  has_attribute(FilterProvenance self, IntsKey a0) -> bool
15675  has_attribute(FilterProvenance self, StringKey a0) -> bool
15676  has_attribute(FilterProvenance self, ParticleIndexKey a0) -> bool
15677  has_attribute(FilterProvenance self, ObjectKey a0) -> bool
15678  has_attribute(FilterProvenance self, SparseFloatKey a0) -> bool
15679  has_attribute(FilterProvenance self, SparseIntKey a0) -> bool
15680  has_attribute(FilterProvenance self, SparseStringKey a0) -> bool
15681  has_attribute(FilterProvenance self, SparseParticleIndexKey a0) -> bool
15682  """
15683  return _IMP_core.FilterProvenance_has_attribute(self, *args)
15684 
15685  def get_derivative(self, a0):
15686  r"""get_derivative(FilterProvenance self, FloatKey a0) -> double"""
15687  return _IMP_core.FilterProvenance_get_derivative(self, a0)
15688 
15689  def get_name(self):
15690  r"""get_name(FilterProvenance self) -> std::string"""
15691  return _IMP_core.FilterProvenance_get_name(self)
15692 
15693  def clear_caches(self):
15694  r"""clear_caches(FilterProvenance self)"""
15695  return _IMP_core.FilterProvenance_clear_caches(self)
15696 
15697  def set_name(self, a0):
15698  r"""set_name(FilterProvenance self, std::string a0)"""
15699  return _IMP_core.FilterProvenance_set_name(self, a0)
15700 
15701  def set_check_level(self, a0):
15702  r"""set_check_level(FilterProvenance self, IMP::CheckLevel a0)"""
15703  return _IMP_core.FilterProvenance_set_check_level(self, a0)
15704 
15705  def add_to_derivative(self, a0, a1, a2):
15706  r"""add_to_derivative(FilterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15707  return _IMP_core.FilterProvenance_add_to_derivative(self, a0, a1, a2)
15708 
15709  def set_is_optimized(self, a0, a1):
15710  r"""set_is_optimized(FilterProvenance self, FloatKey a0, bool a1)"""
15711  return _IMP_core.FilterProvenance_set_is_optimized(self, a0, a1)
15712 
15713  def get_is_optimized(self, a0):
15714  r"""get_is_optimized(FilterProvenance self, FloatKey a0) -> bool"""
15715  return _IMP_core.FilterProvenance_get_is_optimized(self, a0)
15716 
15717  def get_check_level(self):
15718  r"""get_check_level(FilterProvenance self) -> IMP::CheckLevel"""
15719  return _IMP_core.FilterProvenance_get_check_level(self)
15720 
15721  def __eq__(self, *args):
15722  r"""
15723  __eq__(FilterProvenance self, FilterProvenance o) -> bool
15724  __eq__(FilterProvenance self, Particle d) -> bool
15725  """
15726  return _IMP_core.FilterProvenance___eq__(self, *args)
15727 
15728  def __ne__(self, *args):
15729  r"""
15730  __ne__(FilterProvenance self, FilterProvenance o) -> bool
15731  __ne__(FilterProvenance self, Particle d) -> bool
15732  """
15733  return _IMP_core.FilterProvenance___ne__(self, *args)
15734 
15735  def __le__(self, *args):
15736  r"""
15737  __le__(FilterProvenance self, FilterProvenance o) -> bool
15738  __le__(FilterProvenance self, Particle d) -> bool
15739  """
15740  return _IMP_core.FilterProvenance___le__(self, *args)
15741 
15742  def __lt__(self, *args):
15743  r"""
15744  __lt__(FilterProvenance self, FilterProvenance o) -> bool
15745  __lt__(FilterProvenance self, Particle d) -> bool
15746  """
15747  return _IMP_core.FilterProvenance___lt__(self, *args)
15748 
15749  def __ge__(self, *args):
15750  r"""
15751  __ge__(FilterProvenance self, FilterProvenance o) -> bool
15752  __ge__(FilterProvenance self, Particle d) -> bool
15753  """
15754  return _IMP_core.FilterProvenance___ge__(self, *args)
15755 
15756  def __gt__(self, *args):
15757  r"""
15758  __gt__(FilterProvenance self, FilterProvenance o) -> bool
15759  __gt__(FilterProvenance self, Particle d) -> bool
15760  """
15761  return _IMP_core.FilterProvenance___gt__(self, *args)
15762 
15763  def __hash__(self):
15764  r"""__hash__(FilterProvenance self) -> std::size_t"""
15765  return _IMP_core.FilterProvenance___hash__(self)
15766 
15767  def __str__(self):
15768  r"""__str__(FilterProvenance self) -> std::string"""
15769  return _IMP_core.FilterProvenance___str__(self)
15770 
15771  def __repr__(self):
15772  r"""__repr__(FilterProvenance self) -> std::string"""
15773  return _IMP_core.FilterProvenance___repr__(self)
15774 
15775  def _get_as_binary(self):
15776  r"""_get_as_binary(FilterProvenance self) -> PyObject *"""
15777  return _IMP_core.FilterProvenance__get_as_binary(self)
15778 
15779  def _set_from_binary(self, p):
15780  r"""_set_from_binary(FilterProvenance self, PyObject * p)"""
15781  return _IMP_core.FilterProvenance__set_from_binary(self, p)
15782 
15783  def __getstate__(self):
15784  p = self._get_as_binary()
15785  if len(self.__dict__) > 1:
15786  d = self.__dict__.copy()
15787  del d['this']
15788  p = (d, p)
15789  return p
15790 
15791  def __setstate__(self, p):
15792  if not hasattr(self, 'this'):
15793  self.__init__()
15794  if isinstance(p, tuple):
15795  d, p = p
15796  self.__dict__.update(d)
15797  return self._set_from_binary(p)
15798 
15799  __swig_destroy__ = _IMP_core.delete_FilterProvenance
15800 
15801 # Register FilterProvenance in _IMP_core:
15802 _IMP_core.FilterProvenance_swigregister(FilterProvenance)
15803 class ClusterProvenance(Provenance):
15804  r"""Proxy of C++ IMP::core::ClusterProvenance class."""
15805 
15806  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15807 
15808  def set_number_of_members(self, members):
15809  r"""set_number_of_members(ClusterProvenance self, int members)"""
15810  return _IMP_core.ClusterProvenance_set_number_of_members(self, members)
15811 
15812  def get_number_of_members(self):
15813  r"""get_number_of_members(ClusterProvenance self) -> int"""
15814  return _IMP_core.ClusterProvenance_get_number_of_members(self)
15815 
15816  def set_precision(self, precision):
15817  r"""set_precision(ClusterProvenance self, double precision)"""
15818  return _IMP_core.ClusterProvenance_set_precision(self, precision)
15819 
15820  def get_precision(self):
15821  r"""get_precision(ClusterProvenance self) -> double"""
15822  return _IMP_core.ClusterProvenance_get_precision(self)
15823 
15824  def set_density(self, density):
15825  r"""set_density(ClusterProvenance self, std::string density)"""
15826  return _IMP_core.ClusterProvenance_set_density(self, density)
15827 
15828  def get_density(self):
15829  r"""get_density(ClusterProvenance self) -> std::string"""
15830  return _IMP_core.ClusterProvenance_get_density(self)
15831 
15832  def __init__(self, *args):
15833  r"""
15834  __init__(ClusterProvenance self) -> ClusterProvenance
15835  __init__(ClusterProvenance self, Model m, ParticleIndex id) -> ClusterProvenance
15836  __init__(ClusterProvenance self, _ParticleAdaptor d) -> ClusterProvenance
15837  """
15838  _IMP_core.ClusterProvenance_swiginit(self, _IMP_core.new_ClusterProvenance(*args))
15839 
15840  @staticmethod
15841  def get_is_setup(*args):
15842  r"""
15843  get_is_setup(Model m, ParticleIndex pi) -> bool
15844  get_is_setup(_ParticleAdaptor p) -> bool
15845  """
15846  return _IMP_core.ClusterProvenance_get_is_setup(*args)
15847 
15848  def show(self, *args):
15849  r"""show(ClusterProvenance self, _ostream out=std::cout)"""
15850  return _IMP_core.ClusterProvenance_show(self, *args)
15851 
15852  @staticmethod
15853  def setup_particle(*args):
15854  r"""
15855  setup_particle(Model m, ParticleIndex pi, int members) -> ClusterProvenance
15856  setup_particle(_ParticleAdaptor pa, int members) -> ClusterProvenance
15857  setup_particle(Model m, ParticleIndex pi, int members, double precision) -> ClusterProvenance
15858  setup_particle(_ParticleAdaptor pa, int members, double precision) -> ClusterProvenance
15859  setup_particle(Model m, ParticleIndex pi, int members, double precision, std::string density) -> ClusterProvenance
15860  setup_particle(_ParticleAdaptor pa, int members, double precision, std::string density) -> ClusterProvenance
15861  setup_particle(Model m, ParticleIndex pi, ClusterProvenance o) -> ClusterProvenance
15862  setup_particle(_ParticleAdaptor pa, ClusterProvenance o) -> ClusterProvenance
15863  """
15864  return _IMP_core.ClusterProvenance_setup_particle(*args)
15865 
15866  def add_attribute(self, *args):
15867  r"""
15868  add_attribute(ClusterProvenance self, FloatKey k, IMP::Float v, bool opt)
15869  add_attribute(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15870  add_attribute(ClusterProvenance self, IntKey a0, IMP::Int a1)
15871  add_attribute(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15872  add_attribute(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15873  add_attribute(ClusterProvenance self, StringKey a0, IMP::String a1)
15874  add_attribute(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15875  add_attribute(ClusterProvenance self, ObjectKey a0, Object a1)
15876  add_attribute(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15877  add_attribute(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15878  add_attribute(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15879  add_attribute(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15880  """
15881  return _IMP_core.ClusterProvenance_add_attribute(self, *args)
15882 
15883  def get_value(self, *args):
15884  r"""
15885  get_value(ClusterProvenance self, FloatKey a0) -> IMP::Float
15886  get_value(ClusterProvenance self, IntKey a0) -> IMP::Int
15887  get_value(ClusterProvenance self, FloatsKey a0) -> IMP::Floats
15888  get_value(ClusterProvenance self, IntsKey a0) -> IMP::Ints
15889  get_value(ClusterProvenance self, StringKey a0) -> IMP::String
15890  get_value(ClusterProvenance self, ParticleIndexKey a0) -> Particle
15891  get_value(ClusterProvenance self, ObjectKey a0) -> Object
15892  get_value(ClusterProvenance self, SparseFloatKey a0) -> IMP::Float
15893  get_value(ClusterProvenance self, SparseIntKey a0) -> IMP::Int
15894  get_value(ClusterProvenance self, SparseStringKey a0) -> IMP::String
15895  get_value(ClusterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15896  """
15897  return _IMP_core.ClusterProvenance_get_value(self, *args)
15898 
15899  def set_value(self, *args):
15900  r"""
15901  set_value(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15902  set_value(ClusterProvenance self, IntKey a0, IMP::Int a1)
15903  set_value(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15904  set_value(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15905  set_value(ClusterProvenance self, StringKey a0, IMP::String a1)
15906  set_value(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15907  set_value(ClusterProvenance self, ObjectKey a0, Object a1)
15908  set_value(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15909  set_value(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15910  set_value(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15911  set_value(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15912  """
15913  return _IMP_core.ClusterProvenance_set_value(self, *args)
15914 
15915  def remove_attribute(self, *args):
15916  r"""
15917  remove_attribute(ClusterProvenance self, FloatKey a0)
15918  remove_attribute(ClusterProvenance self, IntKey a0)
15919  remove_attribute(ClusterProvenance self, FloatsKey a0)
15920  remove_attribute(ClusterProvenance self, IntsKey a0)
15921  remove_attribute(ClusterProvenance self, StringKey a0)
15922  remove_attribute(ClusterProvenance self, ParticleIndexKey a0)
15923  remove_attribute(ClusterProvenance self, ObjectKey a0)
15924  remove_attribute(ClusterProvenance self, SparseFloatKey a0)
15925  remove_attribute(ClusterProvenance self, SparseIntKey a0)
15926  remove_attribute(ClusterProvenance self, SparseStringKey a0)
15927  remove_attribute(ClusterProvenance self, SparseParticleIndexKey a0)
15928  """
15929  return _IMP_core.ClusterProvenance_remove_attribute(self, *args)
15930 
15931  def has_attribute(self, *args):
15932  r"""
15933  has_attribute(ClusterProvenance self, FloatKey a0) -> bool
15934  has_attribute(ClusterProvenance self, IntKey a0) -> bool
15935  has_attribute(ClusterProvenance self, FloatsKey a0) -> bool
15936  has_attribute(ClusterProvenance self, IntsKey a0) -> bool
15937  has_attribute(ClusterProvenance self, StringKey a0) -> bool
15938  has_attribute(ClusterProvenance self, ParticleIndexKey a0) -> bool
15939  has_attribute(ClusterProvenance self, ObjectKey a0) -> bool
15940  has_attribute(ClusterProvenance self, SparseFloatKey a0) -> bool
15941  has_attribute(ClusterProvenance self, SparseIntKey a0) -> bool
15942  has_attribute(ClusterProvenance self, SparseStringKey a0) -> bool
15943  has_attribute(ClusterProvenance self, SparseParticleIndexKey a0) -> bool
15944  """
15945  return _IMP_core.ClusterProvenance_has_attribute(self, *args)
15946 
15947  def get_derivative(self, a0):
15948  r"""get_derivative(ClusterProvenance self, FloatKey a0) -> double"""
15949  return _IMP_core.ClusterProvenance_get_derivative(self, a0)
15950 
15951  def get_name(self):
15952  r"""get_name(ClusterProvenance self) -> std::string"""
15953  return _IMP_core.ClusterProvenance_get_name(self)
15954 
15955  def clear_caches(self):
15956  r"""clear_caches(ClusterProvenance self)"""
15957  return _IMP_core.ClusterProvenance_clear_caches(self)
15958 
15959  def set_name(self, a0):
15960  r"""set_name(ClusterProvenance self, std::string a0)"""
15961  return _IMP_core.ClusterProvenance_set_name(self, a0)
15962 
15963  def set_check_level(self, a0):
15964  r"""set_check_level(ClusterProvenance self, IMP::CheckLevel a0)"""
15965  return _IMP_core.ClusterProvenance_set_check_level(self, a0)
15966 
15967  def add_to_derivative(self, a0, a1, a2):
15968  r"""add_to_derivative(ClusterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15969  return _IMP_core.ClusterProvenance_add_to_derivative(self, a0, a1, a2)
15970 
15971  def set_is_optimized(self, a0, a1):
15972  r"""set_is_optimized(ClusterProvenance self, FloatKey a0, bool a1)"""
15973  return _IMP_core.ClusterProvenance_set_is_optimized(self, a0, a1)
15974 
15975  def get_is_optimized(self, a0):
15976  r"""get_is_optimized(ClusterProvenance self, FloatKey a0) -> bool"""
15977  return _IMP_core.ClusterProvenance_get_is_optimized(self, a0)
15978 
15979  def get_check_level(self):
15980  r"""get_check_level(ClusterProvenance self) -> IMP::CheckLevel"""
15981  return _IMP_core.ClusterProvenance_get_check_level(self)
15982 
15983  def __eq__(self, *args):
15984  r"""
15985  __eq__(ClusterProvenance self, ClusterProvenance o) -> bool
15986  __eq__(ClusterProvenance self, Particle d) -> bool
15987  """
15988  return _IMP_core.ClusterProvenance___eq__(self, *args)
15989 
15990  def __ne__(self, *args):
15991  r"""
15992  __ne__(ClusterProvenance self, ClusterProvenance o) -> bool
15993  __ne__(ClusterProvenance self, Particle d) -> bool
15994  """
15995  return _IMP_core.ClusterProvenance___ne__(self, *args)
15996 
15997  def __le__(self, *args):
15998  r"""
15999  __le__(ClusterProvenance self, ClusterProvenance o) -> bool
16000  __le__(ClusterProvenance self, Particle d) -> bool
16001  """
16002  return _IMP_core.ClusterProvenance___le__(self, *args)
16003 
16004  def __lt__(self, *args):
16005  r"""
16006  __lt__(ClusterProvenance self, ClusterProvenance o) -> bool
16007  __lt__(ClusterProvenance self, Particle d) -> bool
16008  """
16009  return _IMP_core.ClusterProvenance___lt__(self, *args)
16010 
16011  def __ge__(self, *args):
16012  r"""
16013  __ge__(ClusterProvenance self, ClusterProvenance o) -> bool
16014  __ge__(ClusterProvenance self, Particle d) -> bool
16015  """
16016  return _IMP_core.ClusterProvenance___ge__(self, *args)
16017 
16018  def __gt__(self, *args):
16019  r"""
16020  __gt__(ClusterProvenance self, ClusterProvenance o) -> bool
16021  __gt__(ClusterProvenance self, Particle d) -> bool
16022  """
16023  return _IMP_core.ClusterProvenance___gt__(self, *args)
16024 
16025  def __hash__(self):
16026  r"""__hash__(ClusterProvenance self) -> std::size_t"""
16027  return _IMP_core.ClusterProvenance___hash__(self)
16028 
16029  def __str__(self):
16030  r"""__str__(ClusterProvenance self) -> std::string"""
16031  return _IMP_core.ClusterProvenance___str__(self)
16032 
16033  def __repr__(self):
16034  r"""__repr__(ClusterProvenance self) -> std::string"""
16035  return _IMP_core.ClusterProvenance___repr__(self)
16036 
16037  def _get_as_binary(self):
16038  r"""_get_as_binary(ClusterProvenance self) -> PyObject *"""
16039  return _IMP_core.ClusterProvenance__get_as_binary(self)
16040 
16041  def _set_from_binary(self, p):
16042  r"""_set_from_binary(ClusterProvenance self, PyObject * p)"""
16043  return _IMP_core.ClusterProvenance__set_from_binary(self, p)
16044 
16045  def __getstate__(self):
16046  p = self._get_as_binary()
16047  if len(self.__dict__) > 1:
16048  d = self.__dict__.copy()
16049  del d['this']
16050  p = (d, p)
16051  return p
16052 
16053  def __setstate__(self, p):
16054  if not hasattr(self, 'this'):
16055  self.__init__()
16056  if isinstance(p, tuple):
16057  d, p = p
16058  self.__dict__.update(d)
16059  return self._set_from_binary(p)
16060 
16061  __swig_destroy__ = _IMP_core.delete_ClusterProvenance
16062 
16063 # Register ClusterProvenance in _IMP_core:
16064 _IMP_core.ClusterProvenance_swigregister(ClusterProvenance)
16065 class ScriptProvenance(Provenance):
16066  r"""Proxy of C++ IMP::core::ScriptProvenance class."""
16067 
16068  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16069 
16070  def set_filename(self, filename):
16071  r"""set_filename(ScriptProvenance self, std::string filename)"""
16072  return _IMP_core.ScriptProvenance_set_filename(self, filename)
16073 
16074  def get_filename(self):
16075  r"""get_filename(ScriptProvenance self) -> std::string"""
16076  return _IMP_core.ScriptProvenance_get_filename(self)
16077 
16078  def __init__(self, *args):
16079  r"""
16080  __init__(ScriptProvenance self) -> ScriptProvenance
16081  __init__(ScriptProvenance self, Model m, ParticleIndex id) -> ScriptProvenance
16082  __init__(ScriptProvenance self, _ParticleAdaptor d) -> ScriptProvenance
16083  """
16084  _IMP_core.ScriptProvenance_swiginit(self, _IMP_core.new_ScriptProvenance(*args))
16085 
16086  @staticmethod
16087  def get_is_setup(*args):
16088  r"""
16089  get_is_setup(Model m, ParticleIndex pi) -> bool
16090  get_is_setup(_ParticleAdaptor p) -> bool
16091  """
16092  return _IMP_core.ScriptProvenance_get_is_setup(*args)
16093 
16094  def show(self, *args):
16095  r"""show(ScriptProvenance self, _ostream out=std::cout)"""
16096  return _IMP_core.ScriptProvenance_show(self, *args)
16097 
16098  @staticmethod
16099  def setup_particle(*args):
16100  r"""
16101  setup_particle(Model m, ParticleIndex pi, std::string filename) -> ScriptProvenance
16102  setup_particle(_ParticleAdaptor pa, std::string filename) -> ScriptProvenance
16103  setup_particle(Model m, ParticleIndex pi, ScriptProvenance o) -> ScriptProvenance
16104  setup_particle(_ParticleAdaptor pa, ScriptProvenance o) -> ScriptProvenance
16105  """
16106  return _IMP_core.ScriptProvenance_setup_particle(*args)
16107 
16108  def add_attribute(self, *args):
16109  r"""
16110  add_attribute(ScriptProvenance self, FloatKey k, IMP::Float v, bool opt)
16111  add_attribute(ScriptProvenance self, FloatKey a0, IMP::Float a1)
16112  add_attribute(ScriptProvenance self, IntKey a0, IMP::Int a1)
16113  add_attribute(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16114  add_attribute(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16115  add_attribute(ScriptProvenance self, StringKey a0, IMP::String a1)
16116  add_attribute(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16117  add_attribute(ScriptProvenance self, ObjectKey a0, Object a1)
16118  add_attribute(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16119  add_attribute(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16120  add_attribute(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16121  add_attribute(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16122  """
16123  return _IMP_core.ScriptProvenance_add_attribute(self, *args)
16124 
16125  def get_value(self, *args):
16126  r"""
16127  get_value(ScriptProvenance self, FloatKey a0) -> IMP::Float
16128  get_value(ScriptProvenance self, IntKey a0) -> IMP::Int
16129  get_value(ScriptProvenance self, FloatsKey a0) -> IMP::Floats
16130  get_value(ScriptProvenance self, IntsKey a0) -> IMP::Ints
16131  get_value(ScriptProvenance self, StringKey a0) -> IMP::String
16132  get_value(ScriptProvenance self, ParticleIndexKey a0) -> Particle
16133  get_value(ScriptProvenance self, ObjectKey a0) -> Object
16134  get_value(ScriptProvenance self, SparseFloatKey a0) -> IMP::Float
16135  get_value(ScriptProvenance self, SparseIntKey a0) -> IMP::Int
16136  get_value(ScriptProvenance self, SparseStringKey a0) -> IMP::String
16137  get_value(ScriptProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16138  """
16139  return _IMP_core.ScriptProvenance_get_value(self, *args)
16140 
16141  def set_value(self, *args):
16142  r"""
16143  set_value(ScriptProvenance self, FloatKey a0, IMP::Float a1)
16144  set_value(ScriptProvenance self, IntKey a0, IMP::Int a1)
16145  set_value(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16146  set_value(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16147  set_value(ScriptProvenance self, StringKey a0, IMP::String a1)
16148  set_value(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16149  set_value(ScriptProvenance self, ObjectKey a0, Object a1)
16150  set_value(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16151  set_value(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16152  set_value(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16153  set_value(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16154  """
16155  return _IMP_core.ScriptProvenance_set_value(self, *args)
16156 
16157  def remove_attribute(self, *args):
16158  r"""
16159  remove_attribute(ScriptProvenance self, FloatKey a0)
16160  remove_attribute(ScriptProvenance self, IntKey a0)
16161  remove_attribute(ScriptProvenance self, FloatsKey a0)
16162  remove_attribute(ScriptProvenance self, IntsKey a0)
16163  remove_attribute(ScriptProvenance self, StringKey a0)
16164  remove_attribute(ScriptProvenance self, ParticleIndexKey a0)
16165  remove_attribute(ScriptProvenance self, ObjectKey a0)
16166  remove_attribute(ScriptProvenance self, SparseFloatKey a0)
16167  remove_attribute(ScriptProvenance self, SparseIntKey a0)
16168  remove_attribute(ScriptProvenance self, SparseStringKey a0)
16169  remove_attribute(ScriptProvenance self, SparseParticleIndexKey a0)
16170  """
16171  return _IMP_core.ScriptProvenance_remove_attribute(self, *args)
16172 
16173  def has_attribute(self, *args):
16174  r"""
16175  has_attribute(ScriptProvenance self, FloatKey a0) -> bool
16176  has_attribute(ScriptProvenance self, IntKey a0) -> bool
16177  has_attribute(ScriptProvenance self, FloatsKey a0) -> bool
16178  has_attribute(ScriptProvenance self, IntsKey a0) -> bool
16179  has_attribute(ScriptProvenance self, StringKey a0) -> bool
16180  has_attribute(ScriptProvenance self, ParticleIndexKey a0) -> bool
16181  has_attribute(ScriptProvenance self, ObjectKey a0) -> bool
16182  has_attribute(ScriptProvenance self, SparseFloatKey a0) -> bool
16183  has_attribute(ScriptProvenance self, SparseIntKey a0) -> bool
16184  has_attribute(ScriptProvenance self, SparseStringKey a0) -> bool
16185  has_attribute(ScriptProvenance self, SparseParticleIndexKey a0) -> bool
16186  """
16187  return _IMP_core.ScriptProvenance_has_attribute(self, *args)
16188 
16189  def get_derivative(self, a0):
16190  r"""get_derivative(ScriptProvenance self, FloatKey a0) -> double"""
16191  return _IMP_core.ScriptProvenance_get_derivative(self, a0)
16192 
16193  def get_name(self):
16194  r"""get_name(ScriptProvenance self) -> std::string"""
16195  return _IMP_core.ScriptProvenance_get_name(self)
16196 
16197  def clear_caches(self):
16198  r"""clear_caches(ScriptProvenance self)"""
16199  return _IMP_core.ScriptProvenance_clear_caches(self)
16200 
16201  def set_name(self, a0):
16202  r"""set_name(ScriptProvenance self, std::string a0)"""
16203  return _IMP_core.ScriptProvenance_set_name(self, a0)
16204 
16205  def set_check_level(self, a0):
16206  r"""set_check_level(ScriptProvenance self, IMP::CheckLevel a0)"""
16207  return _IMP_core.ScriptProvenance_set_check_level(self, a0)
16208 
16209  def add_to_derivative(self, a0, a1, a2):
16210  r"""add_to_derivative(ScriptProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16211  return _IMP_core.ScriptProvenance_add_to_derivative(self, a0, a1, a2)
16212 
16213  def set_is_optimized(self, a0, a1):
16214  r"""set_is_optimized(ScriptProvenance self, FloatKey a0, bool a1)"""
16215  return _IMP_core.ScriptProvenance_set_is_optimized(self, a0, a1)
16216 
16217  def get_is_optimized(self, a0):
16218  r"""get_is_optimized(ScriptProvenance self, FloatKey a0) -> bool"""
16219  return _IMP_core.ScriptProvenance_get_is_optimized(self, a0)
16220 
16221  def get_check_level(self):
16222  r"""get_check_level(ScriptProvenance self) -> IMP::CheckLevel"""
16223  return _IMP_core.ScriptProvenance_get_check_level(self)
16224 
16225  def __eq__(self, *args):
16226  r"""
16227  __eq__(ScriptProvenance self, ScriptProvenance o) -> bool
16228  __eq__(ScriptProvenance self, Particle d) -> bool
16229  """
16230  return _IMP_core.ScriptProvenance___eq__(self, *args)
16231 
16232  def __ne__(self, *args):
16233  r"""
16234  __ne__(ScriptProvenance self, ScriptProvenance o) -> bool
16235  __ne__(ScriptProvenance self, Particle d) -> bool
16236  """
16237  return _IMP_core.ScriptProvenance___ne__(self, *args)
16238 
16239  def __le__(self, *args):
16240  r"""
16241  __le__(ScriptProvenance self, ScriptProvenance o) -> bool
16242  __le__(ScriptProvenance self, Particle d) -> bool
16243  """
16244  return _IMP_core.ScriptProvenance___le__(self, *args)
16245 
16246  def __lt__(self, *args):
16247  r"""
16248  __lt__(ScriptProvenance self, ScriptProvenance o) -> bool
16249  __lt__(ScriptProvenance self, Particle d) -> bool
16250  """
16251  return _IMP_core.ScriptProvenance___lt__(self, *args)
16252 
16253  def __ge__(self, *args):
16254  r"""
16255  __ge__(ScriptProvenance self, ScriptProvenance o) -> bool
16256  __ge__(ScriptProvenance self, Particle d) -> bool
16257  """
16258  return _IMP_core.ScriptProvenance___ge__(self, *args)
16259 
16260  def __gt__(self, *args):
16261  r"""
16262  __gt__(ScriptProvenance self, ScriptProvenance o) -> bool
16263  __gt__(ScriptProvenance self, Particle d) -> bool
16264  """
16265  return _IMP_core.ScriptProvenance___gt__(self, *args)
16266 
16267  def __hash__(self):
16268  r"""__hash__(ScriptProvenance self) -> std::size_t"""
16269  return _IMP_core.ScriptProvenance___hash__(self)
16270 
16271  def __str__(self):
16272  r"""__str__(ScriptProvenance self) -> std::string"""
16273  return _IMP_core.ScriptProvenance___str__(self)
16274 
16275  def __repr__(self):
16276  r"""__repr__(ScriptProvenance self) -> std::string"""
16277  return _IMP_core.ScriptProvenance___repr__(self)
16278 
16279  def _get_as_binary(self):
16280  r"""_get_as_binary(ScriptProvenance self) -> PyObject *"""
16281  return _IMP_core.ScriptProvenance__get_as_binary(self)
16282 
16283  def _set_from_binary(self, p):
16284  r"""_set_from_binary(ScriptProvenance self, PyObject * p)"""
16285  return _IMP_core.ScriptProvenance__set_from_binary(self, p)
16286 
16287  def __getstate__(self):
16288  p = self._get_as_binary()
16289  if len(self.__dict__) > 1:
16290  d = self.__dict__.copy()
16291  del d['this']
16292  p = (d, p)
16293  return p
16294 
16295  def __setstate__(self, p):
16296  if not hasattr(self, 'this'):
16297  self.__init__()
16298  if isinstance(p, tuple):
16299  d, p = p
16300  self.__dict__.update(d)
16301  return self._set_from_binary(p)
16302 
16303  __swig_destroy__ = _IMP_core.delete_ScriptProvenance
16304 
16305 # Register ScriptProvenance in _IMP_core:
16306 _IMP_core.ScriptProvenance_swigregister(ScriptProvenance)
16307 class SoftwareProvenance(Provenance):
16308  r"""Proxy of C++ IMP::core::SoftwareProvenance class."""
16309 
16310  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16311 
16312  def set_software_name(self, name):
16313  r"""set_software_name(SoftwareProvenance self, std::string name)"""
16314  return _IMP_core.SoftwareProvenance_set_software_name(self, name)
16315 
16316  def get_software_name(self):
16317  r"""get_software_name(SoftwareProvenance self) -> std::string"""
16318  return _IMP_core.SoftwareProvenance_get_software_name(self)
16319 
16320  def set_version(self, version):
16321  r"""set_version(SoftwareProvenance self, std::string version)"""
16322  return _IMP_core.SoftwareProvenance_set_version(self, version)
16323 
16324  def get_version(self):
16325  r"""get_version(SoftwareProvenance self) -> std::string"""
16326  return _IMP_core.SoftwareProvenance_get_version(self)
16327 
16328  def set_location(self, location):
16329  r"""set_location(SoftwareProvenance self, std::string location)"""
16330  return _IMP_core.SoftwareProvenance_set_location(self, location)
16331 
16332  def get_location(self):
16333  r"""get_location(SoftwareProvenance self) -> std::string"""
16334  return _IMP_core.SoftwareProvenance_get_location(self)
16335 
16336  def __init__(self, *args):
16337  r"""
16338  __init__(SoftwareProvenance self) -> SoftwareProvenance
16339  __init__(SoftwareProvenance self, Model m, ParticleIndex id) -> SoftwareProvenance
16340  __init__(SoftwareProvenance self, _ParticleAdaptor d) -> SoftwareProvenance
16341  """
16342  _IMP_core.SoftwareProvenance_swiginit(self, _IMP_core.new_SoftwareProvenance(*args))
16343 
16344  @staticmethod
16345  def get_is_setup(*args):
16346  r"""
16347  get_is_setup(Model m, ParticleIndex pi) -> bool
16348  get_is_setup(_ParticleAdaptor p) -> bool
16349  """
16350  return _IMP_core.SoftwareProvenance_get_is_setup(*args)
16351 
16352  def show(self, *args):
16353  r"""show(SoftwareProvenance self, _ostream out=std::cout)"""
16354  return _IMP_core.SoftwareProvenance_show(self, *args)
16355 
16356  @staticmethod
16357  def setup_particle(*args):
16358  r"""
16359  setup_particle(Model m, ParticleIndex pi, std::string name, std::string version, std::string location) -> SoftwareProvenance
16360  setup_particle(_ParticleAdaptor pa, std::string name, std::string version, std::string location) -> SoftwareProvenance
16361  setup_particle(Model m, ParticleIndex pi, SoftwareProvenance o) -> SoftwareProvenance
16362  setup_particle(_ParticleAdaptor pa, SoftwareProvenance o) -> SoftwareProvenance
16363  """
16364  return _IMP_core.SoftwareProvenance_setup_particle(*args)
16365 
16366  def add_attribute(self, *args):
16367  r"""
16368  add_attribute(SoftwareProvenance self, FloatKey k, IMP::Float v, bool opt)
16369  add_attribute(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16370  add_attribute(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16371  add_attribute(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16372  add_attribute(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16373  add_attribute(SoftwareProvenance self, StringKey a0, IMP::String a1)
16374  add_attribute(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16375  add_attribute(SoftwareProvenance self, ObjectKey a0, Object a1)
16376  add_attribute(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16377  add_attribute(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16378  add_attribute(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16379  add_attribute(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16380  """
16381  return _IMP_core.SoftwareProvenance_add_attribute(self, *args)
16382 
16383  def get_value(self, *args):
16384  r"""
16385  get_value(SoftwareProvenance self, FloatKey a0) -> IMP::Float
16386  get_value(SoftwareProvenance self, IntKey a0) -> IMP::Int
16387  get_value(SoftwareProvenance self, FloatsKey a0) -> IMP::Floats
16388  get_value(SoftwareProvenance self, IntsKey a0) -> IMP::Ints
16389  get_value(SoftwareProvenance self, StringKey a0) -> IMP::String
16390  get_value(SoftwareProvenance self, ParticleIndexKey a0) -> Particle
16391  get_value(SoftwareProvenance self, ObjectKey a0) -> Object
16392  get_value(SoftwareProvenance self, SparseFloatKey a0) -> IMP::Float
16393  get_value(SoftwareProvenance self, SparseIntKey a0) -> IMP::Int
16394  get_value(SoftwareProvenance self, SparseStringKey a0) -> IMP::String
16395  get_value(SoftwareProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16396  """
16397  return _IMP_core.SoftwareProvenance_get_value(self, *args)
16398 
16399  def set_value(self, *args):
16400  r"""
16401  set_value(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16402  set_value(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16403  set_value(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16404  set_value(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16405  set_value(SoftwareProvenance self, StringKey a0, IMP::String a1)
16406  set_value(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16407  set_value(SoftwareProvenance self, ObjectKey a0, Object a1)
16408  set_value(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16409  set_value(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16410  set_value(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16411  set_value(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16412  """
16413  return _IMP_core.SoftwareProvenance_set_value(self, *args)
16414 
16415  def remove_attribute(self, *args):
16416  r"""
16417  remove_attribute(SoftwareProvenance self, FloatKey a0)
16418  remove_attribute(SoftwareProvenance self, IntKey a0)
16419  remove_attribute(SoftwareProvenance self, FloatsKey a0)
16420  remove_attribute(SoftwareProvenance self, IntsKey a0)
16421  remove_attribute(SoftwareProvenance self, StringKey a0)
16422  remove_attribute(SoftwareProvenance self, ParticleIndexKey a0)
16423  remove_attribute(SoftwareProvenance self, ObjectKey a0)
16424  remove_attribute(SoftwareProvenance self, SparseFloatKey a0)
16425  remove_attribute(SoftwareProvenance self, SparseIntKey a0)
16426  remove_attribute(SoftwareProvenance self, SparseStringKey a0)
16427  remove_attribute(SoftwareProvenance self, SparseParticleIndexKey a0)
16428  """
16429  return _IMP_core.SoftwareProvenance_remove_attribute(self, *args)
16430 
16431  def has_attribute(self, *args):
16432  r"""
16433  has_attribute(SoftwareProvenance self, FloatKey a0) -> bool
16434  has_attribute(SoftwareProvenance self, IntKey a0) -> bool
16435  has_attribute(SoftwareProvenance self, FloatsKey a0) -> bool
16436  has_attribute(SoftwareProvenance self, IntsKey a0) -> bool
16437  has_attribute(SoftwareProvenance self, StringKey a0) -> bool
16438  has_attribute(SoftwareProvenance self, ParticleIndexKey a0) -> bool
16439  has_attribute(SoftwareProvenance self, ObjectKey a0) -> bool
16440  has_attribute(SoftwareProvenance self, SparseFloatKey a0) -> bool
16441  has_attribute(SoftwareProvenance self, SparseIntKey a0) -> bool
16442  has_attribute(SoftwareProvenance self, SparseStringKey a0) -> bool
16443  has_attribute(SoftwareProvenance self, SparseParticleIndexKey a0) -> bool
16444  """
16445  return _IMP_core.SoftwareProvenance_has_attribute(self, *args)
16446 
16447  def get_derivative(self, a0):
16448  r"""get_derivative(SoftwareProvenance self, FloatKey a0) -> double"""
16449  return _IMP_core.SoftwareProvenance_get_derivative(self, a0)
16450 
16451  def get_name(self):
16452  r"""get_name(SoftwareProvenance self) -> std::string"""
16453  return _IMP_core.SoftwareProvenance_get_name(self)
16454 
16455  def clear_caches(self):
16456  r"""clear_caches(SoftwareProvenance self)"""
16457  return _IMP_core.SoftwareProvenance_clear_caches(self)
16458 
16459  def set_name(self, a0):
16460  r"""set_name(SoftwareProvenance self, std::string a0)"""
16461  return _IMP_core.SoftwareProvenance_set_name(self, a0)
16462 
16463  def set_check_level(self, a0):
16464  r"""set_check_level(SoftwareProvenance self, IMP::CheckLevel a0)"""
16465  return _IMP_core.SoftwareProvenance_set_check_level(self, a0)
16466 
16467  def add_to_derivative(self, a0, a1, a2):
16468  r"""add_to_derivative(SoftwareProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16469  return _IMP_core.SoftwareProvenance_add_to_derivative(self, a0, a1, a2)
16470 
16471  def set_is_optimized(self, a0, a1):
16472  r"""set_is_optimized(SoftwareProvenance self, FloatKey a0, bool a1)"""
16473  return _IMP_core.SoftwareProvenance_set_is_optimized(self, a0, a1)
16474 
16475  def get_is_optimized(self, a0):
16476  r"""get_is_optimized(SoftwareProvenance self, FloatKey a0) -> bool"""
16477  return _IMP_core.SoftwareProvenance_get_is_optimized(self, a0)
16478 
16479  def get_check_level(self):
16480  r"""get_check_level(SoftwareProvenance self) -> IMP::CheckLevel"""
16481  return _IMP_core.SoftwareProvenance_get_check_level(self)
16482 
16483  def __eq__(self, *args):
16484  r"""
16485  __eq__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16486  __eq__(SoftwareProvenance self, Particle d) -> bool
16487  """
16488  return _IMP_core.SoftwareProvenance___eq__(self, *args)
16489 
16490  def __ne__(self, *args):
16491  r"""
16492  __ne__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16493  __ne__(SoftwareProvenance self, Particle d) -> bool
16494  """
16495  return _IMP_core.SoftwareProvenance___ne__(self, *args)
16496 
16497  def __le__(self, *args):
16498  r"""
16499  __le__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16500  __le__(SoftwareProvenance self, Particle d) -> bool
16501  """
16502  return _IMP_core.SoftwareProvenance___le__(self, *args)
16503 
16504  def __lt__(self, *args):
16505  r"""
16506  __lt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16507  __lt__(SoftwareProvenance self, Particle d) -> bool
16508  """
16509  return _IMP_core.SoftwareProvenance___lt__(self, *args)
16510 
16511  def __ge__(self, *args):
16512  r"""
16513  __ge__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16514  __ge__(SoftwareProvenance self, Particle d) -> bool
16515  """
16516  return _IMP_core.SoftwareProvenance___ge__(self, *args)
16517 
16518  def __gt__(self, *args):
16519  r"""
16520  __gt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16521  __gt__(SoftwareProvenance self, Particle d) -> bool
16522  """
16523  return _IMP_core.SoftwareProvenance___gt__(self, *args)
16524 
16525  def __hash__(self):
16526  r"""__hash__(SoftwareProvenance self) -> std::size_t"""
16527  return _IMP_core.SoftwareProvenance___hash__(self)
16528 
16529  def __str__(self):
16530  r"""__str__(SoftwareProvenance self) -> std::string"""
16531  return _IMP_core.SoftwareProvenance___str__(self)
16532 
16533  def __repr__(self):
16534  r"""__repr__(SoftwareProvenance self) -> std::string"""
16535  return _IMP_core.SoftwareProvenance___repr__(self)
16536 
16537  def _get_as_binary(self):
16538  r"""_get_as_binary(SoftwareProvenance self) -> PyObject *"""
16539  return _IMP_core.SoftwareProvenance__get_as_binary(self)
16540 
16541  def _set_from_binary(self, p):
16542  r"""_set_from_binary(SoftwareProvenance self, PyObject * p)"""
16543  return _IMP_core.SoftwareProvenance__set_from_binary(self, p)
16544 
16545  def __getstate__(self):
16546  p = self._get_as_binary()
16547  if len(self.__dict__) > 1:
16548  d = self.__dict__.copy()
16549  del d['this']
16550  p = (d, p)
16551  return p
16552 
16553  def __setstate__(self, p):
16554  if not hasattr(self, 'this'):
16555  self.__init__()
16556  if isinstance(p, tuple):
16557  d, p = p
16558  self.__dict__.update(d)
16559  return self._set_from_binary(p)
16560 
16561  __swig_destroy__ = _IMP_core.delete_SoftwareProvenance
16562 
16563 # Register SoftwareProvenance in _IMP_core:
16564 _IMP_core.SoftwareProvenance_swigregister(SoftwareProvenance)
16565 class Provenanced(IMP.Decorator):
16566  r"""Proxy of C++ IMP::core::Provenanced class."""
16567 
16568  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16569 
16570  def get_provenance(self):
16571  r"""get_provenance(Provenanced self) -> Provenance"""
16572  return _IMP_core.Provenanced_get_provenance(self)
16573 
16574  def set_provenance(self, p):
16575  r"""set_provenance(Provenanced self, Provenance p)"""
16576  return _IMP_core.Provenanced_set_provenance(self, p)
16577 
16578  def __init__(self, *args):
16579  r"""
16580  __init__(Provenanced self) -> Provenanced
16581  __init__(Provenanced self, Model m, ParticleIndex id) -> Provenanced
16582  __init__(Provenanced self, _ParticleAdaptor d) -> Provenanced
16583  """
16584  _IMP_core.Provenanced_swiginit(self, _IMP_core.new_Provenanced(*args))
16585 
16586  @staticmethod
16587  def get_is_setup(*args):
16588  r"""
16589  get_is_setup(Model m, ParticleIndex pi) -> bool
16590  get_is_setup(_ParticleAdaptor p) -> bool
16591  """
16592  return _IMP_core.Provenanced_get_is_setup(*args)
16593 
16594  def show(self, *args):
16595  r"""show(Provenanced self, _ostream out=std::cout)"""
16596  return _IMP_core.Provenanced_show(self, *args)
16597 
16598  @staticmethod
16599  def setup_particle(*args):
16600  r"""
16601  setup_particle(Model m, ParticleIndex pi, Provenance p) -> Provenanced
16602  setup_particle(_ParticleAdaptor pa, Provenance p) -> Provenanced
16603  """
16604  return _IMP_core.Provenanced_setup_particle(*args)
16605 
16606  def add_attribute(self, *args):
16607  r"""
16608  add_attribute(Provenanced self, FloatKey k, IMP::Float v, bool opt)
16609  add_attribute(Provenanced self, FloatKey a0, IMP::Float a1)
16610  add_attribute(Provenanced self, IntKey a0, IMP::Int a1)
16611  add_attribute(Provenanced self, FloatsKey a0, IMP::Floats a1)
16612  add_attribute(Provenanced self, IntsKey a0, IMP::Ints a1)
16613  add_attribute(Provenanced self, StringKey a0, IMP::String a1)
16614  add_attribute(Provenanced self, ParticleIndexKey a0, Particle a1)
16615  add_attribute(Provenanced self, ObjectKey a0, Object a1)
16616  add_attribute(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16617  add_attribute(Provenanced self, SparseIntKey a0, IMP::Int a1)
16618  add_attribute(Provenanced self, SparseStringKey a0, IMP::String a1)
16619  add_attribute(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16620  """
16621  return _IMP_core.Provenanced_add_attribute(self, *args)
16622 
16623  def get_value(self, *args):
16624  r"""
16625  get_value(Provenanced self, FloatKey a0) -> IMP::Float
16626  get_value(Provenanced self, IntKey a0) -> IMP::Int
16627  get_value(Provenanced self, FloatsKey a0) -> IMP::Floats
16628  get_value(Provenanced self, IntsKey a0) -> IMP::Ints
16629  get_value(Provenanced self, StringKey a0) -> IMP::String
16630  get_value(Provenanced self, ParticleIndexKey a0) -> Particle
16631  get_value(Provenanced self, ObjectKey a0) -> Object
16632  get_value(Provenanced self, SparseFloatKey a0) -> IMP::Float
16633  get_value(Provenanced self, SparseIntKey a0) -> IMP::Int
16634  get_value(Provenanced self, SparseStringKey a0) -> IMP::String
16635  get_value(Provenanced self, SparseParticleIndexKey a0) -> ParticleIndex
16636  """
16637  return _IMP_core.Provenanced_get_value(self, *args)
16638 
16639  def set_value(self, *args):
16640  r"""
16641  set_value(Provenanced self, FloatKey a0, IMP::Float a1)
16642  set_value(Provenanced self, IntKey a0, IMP::Int a1)
16643  set_value(Provenanced self, FloatsKey a0, IMP::Floats a1)
16644  set_value(Provenanced self, IntsKey a0, IMP::Ints a1)
16645  set_value(Provenanced self, StringKey a0, IMP::String a1)
16646  set_value(Provenanced self, ParticleIndexKey a0, Particle a1)
16647  set_value(Provenanced self, ObjectKey a0, Object a1)
16648  set_value(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16649  set_value(Provenanced self, SparseIntKey a0, IMP::Int a1)
16650  set_value(Provenanced self, SparseStringKey a0, IMP::String a1)
16651  set_value(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16652  """
16653  return _IMP_core.Provenanced_set_value(self, *args)
16654 
16655  def remove_attribute(self, *args):
16656  r"""
16657  remove_attribute(Provenanced self, FloatKey a0)
16658  remove_attribute(Provenanced self, IntKey a0)
16659  remove_attribute(Provenanced self, FloatsKey a0)
16660  remove_attribute(Provenanced self, IntsKey a0)
16661  remove_attribute(Provenanced self, StringKey a0)
16662  remove_attribute(Provenanced self, ParticleIndexKey a0)
16663  remove_attribute(Provenanced self, ObjectKey a0)
16664  remove_attribute(Provenanced self, SparseFloatKey a0)
16665  remove_attribute(Provenanced self, SparseIntKey a0)
16666  remove_attribute(Provenanced self, SparseStringKey a0)
16667  remove_attribute(Provenanced self, SparseParticleIndexKey a0)
16668  """
16669  return _IMP_core.Provenanced_remove_attribute(self, *args)
16670 
16671  def has_attribute(self, *args):
16672  r"""
16673  has_attribute(Provenanced self, FloatKey a0) -> bool
16674  has_attribute(Provenanced self, IntKey a0) -> bool
16675  has_attribute(Provenanced self, FloatsKey a0) -> bool
16676  has_attribute(Provenanced self, IntsKey a0) -> bool
16677  has_attribute(Provenanced self, StringKey a0) -> bool
16678  has_attribute(Provenanced self, ParticleIndexKey a0) -> bool
16679  has_attribute(Provenanced self, ObjectKey a0) -> bool
16680  has_attribute(Provenanced self, SparseFloatKey a0) -> bool
16681  has_attribute(Provenanced self, SparseIntKey a0) -> bool
16682  has_attribute(Provenanced self, SparseStringKey a0) -> bool
16683  has_attribute(Provenanced self, SparseParticleIndexKey a0) -> bool
16684  """
16685  return _IMP_core.Provenanced_has_attribute(self, *args)
16686 
16687  def get_derivative(self, a0):
16688  r"""get_derivative(Provenanced self, FloatKey a0) -> double"""
16689  return _IMP_core.Provenanced_get_derivative(self, a0)
16690 
16691  def get_name(self):
16692  r"""get_name(Provenanced self) -> std::string"""
16693  return _IMP_core.Provenanced_get_name(self)
16694 
16695  def clear_caches(self):
16696  r"""clear_caches(Provenanced self)"""
16697  return _IMP_core.Provenanced_clear_caches(self)
16698 
16699  def set_name(self, a0):
16700  r"""set_name(Provenanced self, std::string a0)"""
16701  return _IMP_core.Provenanced_set_name(self, a0)
16702 
16703  def set_check_level(self, a0):
16704  r"""set_check_level(Provenanced self, IMP::CheckLevel a0)"""
16705  return _IMP_core.Provenanced_set_check_level(self, a0)
16706 
16707  def add_to_derivative(self, a0, a1, a2):
16708  r"""add_to_derivative(Provenanced self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16709  return _IMP_core.Provenanced_add_to_derivative(self, a0, a1, a2)
16710 
16711  def set_is_optimized(self, a0, a1):
16712  r"""set_is_optimized(Provenanced self, FloatKey a0, bool a1)"""
16713  return _IMP_core.Provenanced_set_is_optimized(self, a0, a1)
16714 
16715  def get_is_optimized(self, a0):
16716  r"""get_is_optimized(Provenanced self, FloatKey a0) -> bool"""
16717  return _IMP_core.Provenanced_get_is_optimized(self, a0)
16718 
16719  def get_check_level(self):
16720  r"""get_check_level(Provenanced self) -> IMP::CheckLevel"""
16721  return _IMP_core.Provenanced_get_check_level(self)
16722 
16723  def __eq__(self, *args):
16724  r"""
16725  __eq__(Provenanced self, Provenanced o) -> bool
16726  __eq__(Provenanced self, Particle d) -> bool
16727  """
16728  return _IMP_core.Provenanced___eq__(self, *args)
16729 
16730  def __ne__(self, *args):
16731  r"""
16732  __ne__(Provenanced self, Provenanced o) -> bool
16733  __ne__(Provenanced self, Particle d) -> bool
16734  """
16735  return _IMP_core.Provenanced___ne__(self, *args)
16736 
16737  def __le__(self, *args):
16738  r"""
16739  __le__(Provenanced self, Provenanced o) -> bool
16740  __le__(Provenanced self, Particle d) -> bool
16741  """
16742  return _IMP_core.Provenanced___le__(self, *args)
16743 
16744  def __lt__(self, *args):
16745  r"""
16746  __lt__(Provenanced self, Provenanced o) -> bool
16747  __lt__(Provenanced self, Particle d) -> bool
16748  """
16749  return _IMP_core.Provenanced___lt__(self, *args)
16750 
16751  def __ge__(self, *args):
16752  r"""
16753  __ge__(Provenanced self, Provenanced o) -> bool
16754  __ge__(Provenanced self, Particle d) -> bool
16755  """
16756  return _IMP_core.Provenanced___ge__(self, *args)
16757 
16758  def __gt__(self, *args):
16759  r"""
16760  __gt__(Provenanced self, Provenanced o) -> bool
16761  __gt__(Provenanced self, Particle d) -> bool
16762  """
16763  return _IMP_core.Provenanced___gt__(self, *args)
16764 
16765  def __hash__(self):
16766  r"""__hash__(Provenanced self) -> std::size_t"""
16767  return _IMP_core.Provenanced___hash__(self)
16768 
16769  def __str__(self):
16770  r"""__str__(Provenanced self) -> std::string"""
16771  return _IMP_core.Provenanced___str__(self)
16772 
16773  def __repr__(self):
16774  r"""__repr__(Provenanced self) -> std::string"""
16775  return _IMP_core.Provenanced___repr__(self)
16776 
16777  def _get_as_binary(self):
16778  r"""_get_as_binary(Provenanced self) -> PyObject *"""
16779  return _IMP_core.Provenanced__get_as_binary(self)
16780 
16781  def _set_from_binary(self, p):
16782  r"""_set_from_binary(Provenanced self, PyObject * p)"""
16783  return _IMP_core.Provenanced__set_from_binary(self, p)
16784 
16785  def __getstate__(self):
16786  p = self._get_as_binary()
16787  if len(self.__dict__) > 1:
16788  d = self.__dict__.copy()
16789  del d['this']
16790  p = (d, p)
16791  return p
16792 
16793  def __setstate__(self, p):
16794  if not hasattr(self, 'this'):
16795  self.__init__()
16796  if isinstance(p, tuple):
16797  d, p = p
16798  self.__dict__.update(d)
16799  return self._set_from_binary(p)
16800 
16801  __swig_destroy__ = _IMP_core.delete_Provenanced
16802 
16803 # Register Provenanced in _IMP_core:
16804 _IMP_core.Provenanced_swigregister(Provenanced)
16805 
16806 def add_provenance(m, pi, p):
16807  r"""add_provenance(Model m, ParticleIndex pi, Provenance p)"""
16808  return _IMP_core.add_provenance(m, pi, p)
16809 
16810 def create_clone(p, m=None):
16811  r"""create_clone(Provenance p, Model m=None) -> Provenance"""
16812  return _IMP_core.create_clone(p, m)
16813 
16815  r"""
16816  get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16817  get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & b) -> Transformation3D
16818  get_transformation_aligning_first_to_second(IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16819  """
16820  return _IMP_core.get_transformation_aligning_first_to_second(*args)
16821 
16822 def create_restraint(ps, pp):
16823  r"""create_restraint(PairScore ps, IMP::ParticlePair pp) -> Restraint"""
16824  return _IMP_core.create_restraint(ps, pp)
16826  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::LOWER > class."""
16827 
16828  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16829 
16830  def __init__(self, *args):
16831  r"""
16832  __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicLowerBound
16833  __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicLowerBound
16834  """
16835  _IMP_core.TruncatedHarmonicLowerBound_swiginit(self, _IMP_core.new_TruncatedHarmonicLowerBound(*args))
16836 
16837  def get_version_info(self):
16838  r"""get_version_info(TruncatedHarmonicLowerBound self) -> VersionInfo"""
16839  return _IMP_core.TruncatedHarmonicLowerBound_get_version_info(self)
16840  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicLowerBound
16841 
16842  def __str__(self):
16843  r"""__str__(TruncatedHarmonicLowerBound self) -> std::string"""
16844  return _IMP_core.TruncatedHarmonicLowerBound___str__(self)
16845 
16846  def __repr__(self):
16847  r"""__repr__(TruncatedHarmonicLowerBound self) -> std::string"""
16848  return _IMP_core.TruncatedHarmonicLowerBound___repr__(self)
16849 
16850  @staticmethod
16851  def get_from(o):
16852  return _object_cast_to_TruncatedHarmonic(o)
16853 
16854 
16855 # Register TruncatedHarmonicLowerBound in _IMP_core:
16856 _IMP_core.TruncatedHarmonicLowerBound_swigregister(TruncatedHarmonicLowerBound)
16858  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::UPPER > class."""
16859 
16860  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16861 
16862  def __init__(self, *args):
16863  r"""
16864  __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicUpperBound
16865  __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicUpperBound
16866  """
16867  _IMP_core.TruncatedHarmonicUpperBound_swiginit(self, _IMP_core.new_TruncatedHarmonicUpperBound(*args))
16868 
16869  def get_version_info(self):
16870  r"""get_version_info(TruncatedHarmonicUpperBound self) -> VersionInfo"""
16871  return _IMP_core.TruncatedHarmonicUpperBound_get_version_info(self)
16872  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicUpperBound
16873 
16874  def __str__(self):
16875  r"""__str__(TruncatedHarmonicUpperBound self) -> std::string"""
16876  return _IMP_core.TruncatedHarmonicUpperBound___str__(self)
16877 
16878  def __repr__(self):
16879  r"""__repr__(TruncatedHarmonicUpperBound self) -> std::string"""
16880  return _IMP_core.TruncatedHarmonicUpperBound___repr__(self)
16881 
16882  @staticmethod
16883  def get_from(o):
16884  return _object_cast_to_TruncatedHarmonic(o)
16885 
16886 
16887 # Register TruncatedHarmonicUpperBound in _IMP_core:
16888 _IMP_core.TruncatedHarmonicUpperBound_swigregister(TruncatedHarmonicUpperBound)
16890  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::BOTH > class."""
16891 
16892  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16893 
16894  def __init__(self, *args):
16895  r"""
16896  __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicBound
16897  __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicBound
16898  """
16899  _IMP_core.TruncatedHarmonicBound_swiginit(self, _IMP_core.new_TruncatedHarmonicBound(*args))
16900 
16901  def get_version_info(self):
16902  r"""get_version_info(TruncatedHarmonicBound self) -> VersionInfo"""
16903  return _IMP_core.TruncatedHarmonicBound_get_version_info(self)
16904  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicBound
16905 
16906  def __str__(self):
16907  r"""__str__(TruncatedHarmonicBound self) -> std::string"""
16908  return _IMP_core.TruncatedHarmonicBound___str__(self)
16909 
16910  def __repr__(self):
16911  r"""__repr__(TruncatedHarmonicBound self) -> std::string"""
16912  return _IMP_core.TruncatedHarmonicBound___repr__(self)
16913 
16914  @staticmethod
16915  def get_from(o):
16916  return _object_cast_to_TruncatedHarmonic(o)
16917 
16918 
16919 # Register TruncatedHarmonicBound in _IMP_core:
16920 _IMP_core.TruncatedHarmonicBound_swigregister(TruncatedHarmonicBound)
16921 class ParticleType(IMP._Value):
16922  r"""Proxy of C++ IMP::Key< 34897493 > class."""
16923 
16924  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16925 
16926  def __init__(self, *args):
16927  r"""
16928  __init__(ParticleType self) -> ParticleType
16929  __init__(ParticleType self, std::string const & c, bool is_implicit_add_permitted=True) -> ParticleType
16930  __init__(ParticleType self, unsigned int i) -> ParticleType
16931  """
16932  _IMP_core.ParticleType_swiginit(self, _IMP_core.new_ParticleType(*args))
16933 
16934  @staticmethod
16935  def add_key(sc):
16936  r"""add_key(std::string sc) -> unsigned int"""
16937  return _IMP_core.ParticleType_add_key(sc)
16938 
16939  @staticmethod
16940  def get_key_exists(sc):
16941  r"""get_key_exists(std::string sc) -> bool"""
16942  return _IMP_core.ParticleType_get_key_exists(sc)
16943 
16944  def get_string(self):
16945  r"""get_string(ParticleType self) -> std::string const"""
16946  return _IMP_core.ParticleType_get_string(self)
16947 
16948  def __cmp__(self, o):
16949  r"""__cmp__(ParticleType self, ParticleType o) -> int"""
16950  return _IMP_core.ParticleType___cmp__(self, o)
16951 
16952  def __eq__(self, o):
16953  r"""__eq__(ParticleType self, ParticleType o) -> bool"""
16954  return _IMP_core.ParticleType___eq__(self, o)
16955 
16956  def __ne__(self, o):
16957  r"""__ne__(ParticleType self, ParticleType o) -> bool"""
16958  return _IMP_core.ParticleType___ne__(self, o)
16959 
16960  def __lt__(self, o):
16961  r"""__lt__(ParticleType self, ParticleType o) -> bool"""
16962  return _IMP_core.ParticleType___lt__(self, o)
16963 
16964  def __gt__(self, o):
16965  r"""__gt__(ParticleType self, ParticleType o) -> bool"""
16966  return _IMP_core.ParticleType___gt__(self, o)
16967 
16968  def __ge__(self, o):
16969  r"""__ge__(ParticleType self, ParticleType o) -> bool"""
16970  return _IMP_core.ParticleType___ge__(self, o)
16971 
16972  def __le__(self, o):
16973  r"""__le__(ParticleType self, ParticleType o) -> bool"""
16974  return _IMP_core.ParticleType___le__(self, o)
16975 
16976  def __hash__(self):
16977  r"""__hash__(ParticleType self) -> std::size_t"""
16978  return _IMP_core.ParticleType___hash__(self)
16979 
16980  def show(self, *args):
16981  r"""show(ParticleType self, _ostream out=std::cout)"""
16982  return _IMP_core.ParticleType_show(self, *args)
16983 
16984  @staticmethod
16985  def add_alias(old_key, new_name):
16986  r"""add_alias(ParticleType old_key, std::string new_name) -> ParticleType"""
16987  return _IMP_core.ParticleType_add_alias(old_key, new_name)
16988 
16989  @staticmethod
16990  def get_number_of_keys():
16991  r"""get_number_of_keys() -> unsigned int"""
16992  return _IMP_core.ParticleType_get_number_of_keys()
16993 
16994  def get_index(self):
16995  r"""get_index(ParticleType self) -> unsigned int"""
16996  return _IMP_core.ParticleType_get_index(self)
16997 
16998  @staticmethod
16999  def show_all(out):
17000  r"""show_all(_ostream out)"""
17001  return _IMP_core.ParticleType_show_all(out)
17002 
17003  @staticmethod
17004  def get_all_strings():
17005  r"""get_all_strings() -> IMP::Vector< std::string >"""
17006  return _IMP_core.ParticleType_get_all_strings()
17007 
17008  @staticmethod
17009  def get_number_unique():
17010  r"""get_number_unique() -> unsigned int"""
17011  return _IMP_core.ParticleType_get_number_unique()
17012 
17013  def __str__(self):
17014  r"""__str__(ParticleType self) -> std::string"""
17015  return _IMP_core.ParticleType___str__(self)
17016 
17017  def __repr__(self):
17018  r"""__repr__(ParticleType self) -> std::string"""
17019  return _IMP_core.ParticleType___repr__(self)
17020  __swig_destroy__ = _IMP_core.delete_ParticleType
17021 
17022 # Register ParticleType in _IMP_core:
17023 _IMP_core.ParticleType_swigregister(ParticleType)
17025  r"""Proxy of C++ IMP::core::GenericAttributeSingletonScore< UnaryFunction > class."""
17026 
17027  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17028  __repr__ = _swig_repr
17029 
17030  def __init__(self, f, k):
17031  r"""__init__(AttributeSingletonScore self, UnaryFunction f, FloatKey k) -> AttributeSingletonScore"""
17032  _IMP_core.AttributeSingletonScore_swiginit(self, _IMP_core.new_AttributeSingletonScore(f, k))
17033 
17034  def do_get_inputs(self, m, pis):
17035  r"""do_get_inputs(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17036  return _IMP_core.AttributeSingletonScore_do_get_inputs(self, m, pis)
17037 
17038  def get_unary_function(self):
17039  r"""get_unary_function(AttributeSingletonScore self) -> UnaryFunction"""
17040  return _IMP_core.AttributeSingletonScore_get_unary_function(self)
17041 
17042  def get_key(self):
17043  r"""get_key(AttributeSingletonScore self) -> FloatKey"""
17044  return _IMP_core.AttributeSingletonScore_get_key(self)
17045 
17046  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17047  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"""
17048  return _IMP_core.AttributeSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17049 
17050  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17051  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"""
17052  return _IMP_core.AttributeSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17053 
17054  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17055  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"""
17056  return _IMP_core.AttributeSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17057 
17058  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17059  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"""
17060  return _IMP_core.AttributeSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17061 
17062  def get_version_info(self):
17063  r"""get_version_info(AttributeSingletonScore self) -> VersionInfo"""
17064  return _IMP_core.AttributeSingletonScore_get_version_info(self)
17065  __swig_destroy__ = _IMP_core.delete_AttributeSingletonScore
17066 
17067  @staticmethod
17068  def get_from(o):
17069  return _object_cast_to_AttributeSingletonScore(o)
17070 
17071 
17072  def _get_jax(self, m, indexes, space):
17073  def score_float_key(jm, key, uf):
17074  return uf(jm[key][indexes])
17075 
17076  def score_xyz_key(jm, xyz_index, uf):
17077  return uf(jm['xyz'][indexes, xyz_index])
17078 
17079  uf = self.get_unary_function().get_derived_object()._get_jax()
17080  key = self.get_key()
17081  # First 7 FloatKeys are reserved in IMP and have to be handled
17082  # specially
17083  if key.get_index() >= 7:
17084  need_keys = [key]
17085  f = functools.partial(score_float_key, key=key.get_string(), uf=uf)
17086  elif key == XYZR.get_radius_key():
17087  need_keys = [] # We already have the radius in the JAX model
17088  f = functools.partial(score_float_key, key='r', uf=uf)
17089  elif key in XYZ.get_xyz_keys():
17090  need_keys = [] # We already have coordinates in the JAX model
17091  xyz_index = XYZ.get_xyz_keys().index(key)
17092  f = functools.partial(score_xyz_key, xyz_index=xyz_index, uf=uf)
17093  else:
17094  raise NotImplementedError("No support for key %s" % key)
17095  return self._wrap_jax(m, f, keys=need_keys)
17096 
17097 
17098 # Register AttributeSingletonScore in _IMP_core:
17099 _IMP_core.AttributeSingletonScore_swigregister(AttributeSingletonScore)
17100 
17102  r"""create_generic_attribute_singleton_score(UnaryFunction uf, FloatKey k) -> AttributeSingletonScore"""
17103  return _IMP_core.create_generic_attribute_singleton_score(uf, k)
17105  r"""Proxy of C++ IMP::core::GenericBoundingBox3DSingletonScore< UnaryFunction > class."""
17106 
17107  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17108  __repr__ = _swig_repr
17109 
17110  def __init__(self, f, bb):
17111  r"""__init__(BoundingBox3DSingletonScore self, UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17112  _IMP_core.BoundingBox3DSingletonScore_swiginit(self, _IMP_core.new_BoundingBox3DSingletonScore(f, bb))
17113 
17114  def get_unary_function(self):
17115  r"""get_unary_function(BoundingBox3DSingletonScore self) -> UnaryFunction"""
17116  return _IMP_core.BoundingBox3DSingletonScore_get_unary_function(self)
17117 
17118  def get_bounding_box(self):
17119  r"""get_bounding_box(BoundingBox3DSingletonScore self) -> BoundingBox3D"""
17120  return _IMP_core.BoundingBox3DSingletonScore_get_bounding_box(self)
17121 
17122  def do_get_inputs(self, m, pis):
17123  r"""do_get_inputs(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17124  return _IMP_core.BoundingBox3DSingletonScore_do_get_inputs(self, m, pis)
17125 
17126  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17127  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"""
17128  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17129 
17130  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17131  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"""
17132  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17133 
17134  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17135  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"""
17136  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17137 
17138  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17139  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"""
17140  return _IMP_core.BoundingBox3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17141 
17142  def get_version_info(self):
17143  r"""get_version_info(BoundingBox3DSingletonScore self) -> VersionInfo"""
17144  return _IMP_core.BoundingBox3DSingletonScore_get_version_info(self)
17145  __swig_destroy__ = _IMP_core.delete_BoundingBox3DSingletonScore
17146 
17147  @staticmethod
17148  def get_from(o):
17149  return _object_cast_to_BoundingBox3DSingletonScore(o)
17150 
17151 
17152  def _get_jax(self, m, indexes, space):
17153  import jax.numpy as jnp
17154  def score(jm, box_min, box_max, uf):
17155  xyzs = jm['xyz'][indexes]
17156  # This calculates the distance and the score for every point,
17157  # even those inside the box. IMP just returns zero for points
17158  # inside the box, skipping the distance calculation.
17159  # The implementation here is *probably* faster on a GPU since
17160  # we reduce the use of conditionals, and JAX will likely skip
17161  # the sqrt if uf is a harmonic, but this should be benchmarked.
17162  drs = space.distance(xyzs - jnp.clip(xyzs, box_min, box_max))
17163  return uf(drs)
17164  uf = self.get_unary_function().get_derived_object()
17165  bb = self.get_bounding_box()
17166  f = functools.partial(score, box_min=jnp.asarray(bb.get_corner(0)),
17167  box_max=jnp.asarray(bb.get_corner(1)),
17168  uf=uf._get_jax())
17169  return self._wrap_jax(m, f)
17170 
17171 
17172 # Register BoundingBox3DSingletonScore in _IMP_core:
17173 _IMP_core.BoundingBox3DSingletonScore_swigregister(BoundingBox3DSingletonScore)
17174 
17175 def create_bounding_box_3d_singleton_score(f, bb):
17176  r"""create_bounding_box_3d_singleton_score(UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17177  return _IMP_core.create_bounding_box_3d_singleton_score(f, bb)
17179  r"""Proxy of C++ IMP::core::GenericBoundingSphere3DSingletonScore< UnaryFunction > class."""
17180 
17181  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17182  __repr__ = _swig_repr
17183 
17184  def __init__(self, f, sphere):
17185  r"""__init__(BoundingSphere3DSingletonScore self, UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17186  _IMP_core.BoundingSphere3DSingletonScore_swiginit(self, _IMP_core.new_BoundingSphere3DSingletonScore(f, sphere))
17187 
17188  def do_get_inputs(self, m, pis):
17189  r"""do_get_inputs(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17190  return _IMP_core.BoundingSphere3DSingletonScore_do_get_inputs(self, m, pis)
17191 
17192  def get_unary_function(self):
17193  r"""get_unary_function(BoundingSphere3DSingletonScore self) -> UnaryFunction"""
17194  return _IMP_core.BoundingSphere3DSingletonScore_get_unary_function(self)
17195 
17196  def get_sphere(self):
17197  r"""get_sphere(BoundingSphere3DSingletonScore self) -> Sphere3D"""
17198  return _IMP_core.BoundingSphere3DSingletonScore_get_sphere(self)
17199 
17200  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17201  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"""
17202  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17203 
17204  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17205  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"""
17206  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17207 
17208  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17209  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"""
17210  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17211 
17212  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17213  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"""
17214  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17215 
17216  def get_version_info(self):
17217  r"""get_version_info(BoundingSphere3DSingletonScore self) -> VersionInfo"""
17218  return _IMP_core.BoundingSphere3DSingletonScore_get_version_info(self)
17219  __swig_destroy__ = _IMP_core.delete_BoundingSphere3DSingletonScore
17220 
17221  @staticmethod
17222  def get_from(o):
17223  return _object_cast_to_BoundingSphere3DSingletonScore(o)
17224 
17225 
17226  def _get_jax(self, m, indexes, space):
17227  import numpy as np
17228  import jax.numpy as jnp
17229  def score(jm, use_radii, center, radius, uf):
17230  xyzs = jm['xyz'][indexes]
17231  radii = jnp.where(use_radii, jm['r'][indexes], 0.0)
17232  drs = space.distance(xyzs - center) + radii - radius
17233  return jnp.where(drs < 0.000001, 0.0, uf(drs))
17234  use_radii = np.array([XYZR.get_is_setup(m, IMP.ParticleIndex(ind))
17235  for ind in indexes])
17236  uf = self.get_unary_function().get_derived_object()
17237  sphere = self.get_sphere()
17238  f = functools.partial(score, use_radii=use_radii,
17239  center=jnp.asarray(sphere.get_center()),
17240  radius=sphere.get_radius(), uf=uf._get_jax())
17241  return self._wrap_jax(m, f)
17242 
17243 
17244 # Register BoundingSphere3DSingletonScore in _IMP_core:
17245 _IMP_core.BoundingSphere3DSingletonScore_swigregister(BoundingSphere3DSingletonScore)
17246 
17247 def create_bounding_sphere_3d_singleton_score(f, sphere):
17248  r"""create_bounding_sphere_3d_singleton_score(UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17249  return _IMP_core.create_bounding_sphere_3d_singleton_score(f, sphere)
17251  r"""Proxy of C++ IMP::core::GenericDistanceToSingletonScore< UnaryFunction > class."""
17252 
17253  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17254  __repr__ = _swig_repr
17255 
17256  def __init__(self, *args):
17257  r"""
17258  __init__(DistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore
17259  __init__(DistanceToSingletonScore self) -> DistanceToSingletonScore
17260  """
17261  _IMP_core.DistanceToSingletonScore_swiginit(self, _IMP_core.new_DistanceToSingletonScore(*args))
17262 
17263  def do_get_inputs(self, m, pis):
17264  r"""do_get_inputs(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17265  return _IMP_core.DistanceToSingletonScore_do_get_inputs(self, m, pis)
17266 
17267  def get_unary_function(self):
17268  r"""get_unary_function(DistanceToSingletonScore self) -> UnaryFunction"""
17269  return _IMP_core.DistanceToSingletonScore_get_unary_function(self)
17270 
17271  def get_point(self):
17272  r"""get_point(DistanceToSingletonScore self) -> Vector3D"""
17273  return _IMP_core.DistanceToSingletonScore_get_point(self)
17274 
17275  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17276  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"""
17277  return _IMP_core.DistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17278 
17279  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17280  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"""
17281  return _IMP_core.DistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17282 
17283  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17284  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"""
17285  return _IMP_core.DistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17286 
17287  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17288  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"""
17289  return _IMP_core.DistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17290 
17291  def get_version_info(self):
17292  r"""get_version_info(DistanceToSingletonScore self) -> VersionInfo"""
17293  return _IMP_core.DistanceToSingletonScore_get_version_info(self)
17294  __swig_destroy__ = _IMP_core.delete_DistanceToSingletonScore
17295 
17296  @staticmethod
17297  def get_from(o):
17298  return _object_cast_to_DistanceToSingletonScore(o)
17299 
17300 
17301  def _get_as_binary(self):
17302  r"""_get_as_binary(DistanceToSingletonScore self) -> PyObject *"""
17303  return _IMP_core.DistanceToSingletonScore__get_as_binary(self)
17304 
17305  def _set_from_binary(self, p):
17306  r"""_set_from_binary(DistanceToSingletonScore self, PyObject * p)"""
17307  return _IMP_core.DistanceToSingletonScore__set_from_binary(self, p)
17308 
17309  def __getstate__(self):
17310  p = self._get_as_binary()
17311  if len(self.__dict__) > 1:
17312  d = self.__dict__.copy()
17313  del d['this']
17314  p = (d, p)
17315  return p
17316 
17317  def __setstate__(self, p):
17318  if not hasattr(self, 'this'):
17319  self.__init__()
17320  if isinstance(p, tuple):
17321  d, p = p
17322  self.__dict__.update(d)
17323  return self._set_from_binary(p)
17324 
17325 
17326  def _get_jax(self, m, indexes, space):
17327  import jax.numpy as jnp
17328  def score(jm, point, uf):
17329  xyzs = jm['xyz'][indexes]
17330  drs = space.distance(xyzs - point)
17331  return uf(drs)
17332  uf = self.get_unary_function().get_derived_object()
17333  f = functools.partial(score, point=jnp.array(self.get_point()),
17334  uf=uf._get_jax())
17335  return self._wrap_jax(m, f)
17336 
17337 
17338 # Register DistanceToSingletonScore in _IMP_core:
17339 _IMP_core.DistanceToSingletonScore_swigregister(DistanceToSingletonScore)
17340 
17341 def create_distance_to_singleton_score(f, pt):
17342  r"""create_distance_to_singleton_score(UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore"""
17343  return _IMP_core.create_distance_to_singleton_score(f, pt)
17344 
17345 class SphereDistancePairScore(_SphereDistancePairScore.__bases__[0]):
17346  def __init__(self, uf):
17347  if isinstance(uf, HarmonicUpperBound):
17348  p = HarmonicUpperBoundSphereDistancePairScore(
17349  uf.get_mean(), uf.get_k())
17350  elif isinstance(uf, HarmonicLowerBound):
17351  if uf.get_mean() == 0.0:
17352  p = SoftSpherePairScore(uf.get_k())
17353  else:
17354  p = _SphereDistancePairScore(uf)
17355  elif isinstance(uf, Harmonic):
17356  p = HarmonicSphereDistancePairScore(
17357  uf.get_mean(), uf.get_k())
17358  else:
17359  p = _SphereDistancePairScore(uf)
17360  self.__dict__['_proxied'] = p
17361  def __getattr__(self, key):
17362  return getattr(self._proxied, key)
17363  def __setattr__(self, key, val):
17364  return setattr(self._proxied, key, val)
17365 
17366  def __getstate__(self):
17367  return self.__dict__['_proxied']
17368 
17369  def __setstate__(self, p):
17370  self.__dict__['_proxied'] = p
17371 
17372  def _get_jax(self, *args, **kwargs):
17373  return self._proxied._get_jax(*args, **kwargs)
17374 
17375  @staticmethod
17376  def get_from(o):
17377  try:
17378  p = HarmonicUpperBoundSphereDistancePairScore.get_from(o)
17379  except ValueError:
17380  try:
17381  p = HarmonicSphereDistancePairScore.get_from(o)
17382  except ValueError:
17383  try:
17384  p = SoftSpherePairScore.get_from(o)
17385  except ValueError:
17386  p = _SphereDistancePairScore.get_from(o)
17387  obj = object.__new__(SphereDistancePairScore)
17388  obj.__dict__['_proxied'] = p
17389  return obj
17390 
17391 
17392 
17393 def get_all_provenance(p, types=[StructureProvenance, SampleProvenance,
17394  CombineProvenance, FilterProvenance,
17395  ClusterProvenance, ScriptProvenance,
17396  SoftwareProvenance]):
17397  """Yield all provenance decorators of the given types for the particle.
17398  By default, all provenance types are returned. Provenance is returned
17399  in order, most recent first. If the particle has no provenance
17400  information, an empty generator is returned."""
17401  if Provenanced.get_is_setup(p):
17402  prov = Provenanced(p).get_provenance()
17403  while prov:
17404  for c in types:
17405  if c.get_is_setup(prov):
17406  yield c(prov)
17407  prov = prov.get_previous()
17408 
17410  """Tag the given particle with the current Python script.
17411  This is a noop if the particle is already so tagged."""
17412  main = sys.modules['__main__']
17413 # Can't do anything if running from an interactive interpreter
17414  if not hasattr(main, '__file__'):
17415  return
17416  f = IMP.get_absolute_path(main.__file__)
17417  for prov in get_all_provenance(p, types=[ScriptProvenance]):
17418  if prov.get_filename() == f:
17419  return
17420  m = p.get_model()
17421  provp = IMP.Particle(m)
17422  provp.set_name('script')
17423  prov = ScriptProvenance.setup_particle(provp, f)
17424  add_provenance(m, p, prov)
17425 
17426 def add_software_provenance(p, name, version, location):
17427  """Tag the given particle with the software used to create it.
17428  This is a noop if the particle is already so tagged."""
17429  for prov in get_all_provenance(p, types=[SoftwareProvenance]):
17430  if prov.get_software_name() == name and prov.get_version() == version \
17431  and prov.get_location() == location:
17432  return
17433  m = p.get_model()
17434  provp = IMP.Particle(m)
17435  provp.set_name('software')
17436  prov = SoftwareProvenance.setup_particle(provp, name, version, location)
17437  add_provenance(m, p, prov)
17438 
17440  """Tag the given particle as being created by the current version of IMP."""
17441  add_software_provenance(p, name="Integrative Modeling Platform (IMP)",
17442  version=IMP.get_module_version(),
17443  location="https://integrativemodeling.org")
17444 
17445 
17446 def get_module_name():
17447  r"""get_module_name() -> std::string const"""
17448  return _IMP_core.get_module_name()
17449 
17450 def get_module_version():
17451  r"""get_module_version() -> std::string const"""
17452  return _IMP_core.get_module_version()
17453 
17454 def get_example_path(fname):
17455  r"""get_example_path(std::string fname) -> std::string"""
17456  return _IMP_core.get_example_path(fname)
17457 
17458 def get_data_path(fname):
17459  r"""get_data_path(std::string fname) -> std::string"""
17460  return _IMP_core.get_data_path(fname)
17461 
17462 from . import _version_check
17463 _version_check.check_version(get_module_version())
17464 __version__ = get_module_version()
17465 
17466 
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.
Utility functions for the JAX Python library.
Definition: algebra/jax.py:1
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