IMP logo
IMP Reference Guide  develop.0d0d3c41d6,2026/09/13
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("AttributeSingletonScore")
354 
355 
356 def _object_cast_to_AttributeSingletonScore(o):
357  r"""_object_cast_to_AttributeSingletonScore(Object o) -> AttributeSingletonScore"""
358  return _IMP_core._object_cast_to_AttributeSingletonScore(o)
359 
360 _object_types.append("BallMover")
361 
362 
363 def _object_cast_to_BallMover(o):
364  r"""_object_cast_to_BallMover(Object o) -> BallMover"""
365  return _IMP_core._object_cast_to_BallMover(o)
366 
367 _object_types.append("SerialMover")
368 
369 
370 def _object_cast_to_SerialMover(o):
371  r"""_object_cast_to_SerialMover(Object o) -> SerialMover"""
372  return _IMP_core._object_cast_to_SerialMover(o)
373 
374 _object_types.append("SubsetMover")
375 
376 
377 def _object_cast_to_SubsetMover(o):
378  r"""_object_cast_to_SubsetMover(Object o) -> SubsetMover"""
379  return _IMP_core._object_cast_to_SubsetMover(o)
380 
381 _object_types.append("DirectionMover")
382 
383 
384 def _object_cast_to_DirectionMover(o):
385  r"""_object_cast_to_DirectionMover(Object o) -> DirectionMover"""
386  return _IMP_core._object_cast_to_DirectionMover(o)
387 
388 _object_types.append("SurfaceMover")
389 
390 
391 def _object_cast_to_SurfaceMover(o):
392  r"""_object_cast_to_SurfaceMover(Object o) -> SurfaceMover"""
393  return _IMP_core._object_cast_to_SurfaceMover(o)
394 
395 _object_types.append("BoundingBox3DSingletonScore")
396 
397 
398 def _object_cast_to_BoundingBox3DSingletonScore(o):
399  r"""_object_cast_to_BoundingBox3DSingletonScore(Object o) -> BoundingBox3DSingletonScore"""
400  return _IMP_core._object_cast_to_BoundingBox3DSingletonScore(o)
401 
402 _object_types.append("BoundingSphere3DSingletonScore")
403 
404 
405 def _object_cast_to_BoundingSphere3DSingletonScore(o):
406  r"""_object_cast_to_BoundingSphere3DSingletonScore(Object o) -> BoundingSphere3DSingletonScore"""
407  return _IMP_core._object_cast_to_BoundingSphere3DSingletonScore(o)
408 
409 _object_types.append("BoxSweepClosePairsFinder")
410 
411 
412 def _object_cast_to_BoxSweepClosePairsFinder(o):
413  r"""_object_cast_to_BoxSweepClosePairsFinder(Object o) -> BoxSweepClosePairsFinder"""
414  return _IMP_core._object_cast_to_BoxSweepClosePairsFinder(o)
415 
416 _object_types.append("NearestNeighborsClosePairsFinder")
417 
418 
419 def _object_cast_to_NearestNeighborsClosePairsFinder(o):
420  r"""_object_cast_to_NearestNeighborsClosePairsFinder(Object o) -> NearestNeighborsClosePairsFinder"""
421  return _IMP_core._object_cast_to_NearestNeighborsClosePairsFinder(o)
422 
423 _object_types.append("CentroidOfRefined")
424 
425 
426 def _object_cast_to_CentroidOfRefined(o):
427  r"""_object_cast_to_CentroidOfRefined(Object o) -> CentroidOfRefined"""
428  return _IMP_core._object_cast_to_CentroidOfRefined(o)
429 
430 _object_types.append("ChecksScoreState")
431 
432 
433 def _object_cast_to_ChecksScoreState(o):
434  r"""_object_cast_to_ChecksScoreState(Object o) -> ChecksScoreState"""
435  return _IMP_core._object_cast_to_ChecksScoreState(o)
436 
437 _object_types.append("ChildrenRefiner")
438 
439 
440 def _object_cast_to_ChildrenRefiner(o):
441  r"""_object_cast_to_ChildrenRefiner(Object o) -> ChildrenRefiner"""
442  return _IMP_core._object_cast_to_ChildrenRefiner(o)
443 
444 _object_types.append("ClosePairsFinder")
445 
446 
447 def _object_cast_to_ClosePairsFinder(o):
448  r"""_object_cast_to_ClosePairsFinder(Object o) -> ClosePairsFinder"""
449  return _IMP_core._object_cast_to_ClosePairsFinder(o)
450 
451 _object_types.append("ClosePairsPairScore")
452 
453 
454 def _object_cast_to_ClosePairsPairScore(o):
455  r"""_object_cast_to_ClosePairsPairScore(Object o) -> ClosePairsPairScore"""
456  return _IMP_core._object_cast_to_ClosePairsPairScore(o)
457 
458 _object_types.append("ClosedCubicSpline")
459 
460 
461 def _object_cast_to_ClosedCubicSpline(o):
462  r"""_object_cast_to_ClosedCubicSpline(Object o) -> ClosedCubicSpline"""
463  return _IMP_core._object_cast_to_ClosedCubicSpline(o)
464 
465 _object_types.append("ConjugateGradients")
466 
467 
468 def _object_cast_to_ConjugateGradients(o):
469  r"""_object_cast_to_ConjugateGradients(Object o) -> ConjugateGradients"""
470  return _IMP_core._object_cast_to_ConjugateGradients(o)
471 
472 _object_types.append("ConnectivityRestraint")
473 
474 
475 def _object_cast_to_ConnectivityRestraint(o):
476  r"""_object_cast_to_ConnectivityRestraint(Object o) -> ConnectivityRestraint"""
477  return _IMP_core._object_cast_to_ConnectivityRestraint(o)
478 
479 _object_types.append("ConstantRestraint")
480 
481 
482 def _object_cast_to_ConstantRestraint(o):
483  r"""_object_cast_to_ConstantRestraint(Object o) -> ConstantRestraint"""
484  return _IMP_core._object_cast_to_ConstantRestraint(o)
485 
486 _object_types.append("Cosine")
487 
488 
489 def _object_cast_to_Cosine(o):
490  r"""_object_cast_to_Cosine(Object o) -> Cosine"""
491  return _IMP_core._object_cast_to_Cosine(o)
492 
493 _object_types.append("CoverRefined")
494 
495 
496 def _object_cast_to_CoverRefined(o):
497  r"""_object_cast_to_CoverRefined(Object o) -> CoverRefined"""
498  return _IMP_core._object_cast_to_CoverRefined(o)
499 
500 _object_types.append("DerivativesFromRefined")
501 
502 
503 def _object_cast_to_DerivativesFromRefined(o):
504  r"""_object_cast_to_DerivativesFromRefined(Object o) -> DerivativesFromRefined"""
505  return _IMP_core._object_cast_to_DerivativesFromRefined(o)
506 
507 _object_types.append("DerivativesToRefined")
508 
509 
510 def _object_cast_to_DerivativesToRefined(o):
511  r"""_object_cast_to_DerivativesToRefined(Object o) -> DerivativesToRefined"""
512  return _IMP_core._object_cast_to_DerivativesToRefined(o)
513 
514 _object_types.append("WeightedDerivativesToRefined")
515 
516 
517 def _object_cast_to_WeightedDerivativesToRefined(o):
518  r"""_object_cast_to_WeightedDerivativesToRefined(Object o) -> IMP::core::WeightedDerivativesToRefined *"""
519  return _IMP_core._object_cast_to_WeightedDerivativesToRefined(o)
520 
521 _object_types.append("DiameterRestraint")
522 
523 
524 def _object_cast_to_DiameterRestraint(o):
525  r"""_object_cast_to_DiameterRestraint(Object o) -> DiameterRestraint"""
526  return _IMP_core._object_cast_to_DiameterRestraint(o)
527 
528 _object_types.append("DihedralRestraint")
529 
530 
531 def _object_cast_to_DihedralRestraint(o):
532  r"""_object_cast_to_DihedralRestraint(Object o) -> DihedralRestraint"""
533  return _IMP_core._object_cast_to_DihedralRestraint(o)
534 
535 _object_types.append("DistanceRestraint")
536 
537 
538 def _object_cast_to_DistanceRestraint(o):
539  r"""_object_cast_to_DistanceRestraint(Object o) -> DistanceRestraint"""
540  return _IMP_core._object_cast_to_DistanceRestraint(o)
541 
542 _object_types.append("DistanceToSingletonScore")
543 
544 
545 def _object_cast_to_DistanceToSingletonScore(o):
546  r"""_object_cast_to_DistanceToSingletonScore(Object o) -> DistanceToSingletonScore"""
547  return _IMP_core._object_cast_to_DistanceToSingletonScore(o)
548 
549 _object_types.append("ExcludedVolumeRestraint")
550 
551 
552 def _object_cast_to_ExcludedVolumeRestraint(o):
553  r"""_object_cast_to_ExcludedVolumeRestraint(Object o) -> ExcludedVolumeRestraint"""
554  return _IMP_core._object_cast_to_ExcludedVolumeRestraint(o)
555 
556 _object_types.append("FixedRefiner")
557 
558 
559 def _object_cast_to_FixedRefiner(o):
560  r"""_object_cast_to_FixedRefiner(Object o) -> FixedRefiner"""
561  return _IMP_core._object_cast_to_FixedRefiner(o)
562 
563 _object_types.append("GridClosePairsFinder")
564 
565 
566 def _object_cast_to_GridClosePairsFinder(o):
567  r"""_object_cast_to_GridClosePairsFinder(Object o) -> GridClosePairsFinder"""
568  return _IMP_core._object_cast_to_GridClosePairsFinder(o)
569 
570 _object_types.append("Harmonic")
571 
572 
573 def _object_cast_to_Harmonic(o):
574  r"""_object_cast_to_Harmonic(Object o) -> Harmonic"""
575  return _IMP_core._object_cast_to_Harmonic(o)
576 
577 _object_types.append("HarmonicWell")
578 
579 
580 def _object_cast_to_HarmonicWell(o):
581  r"""_object_cast_to_HarmonicWell(Object o) -> HarmonicWell"""
582  return _IMP_core._object_cast_to_HarmonicWell(o)
583 
584 _object_types.append("HarmonicLowerBound")
585 
586 
587 def _object_cast_to_HarmonicLowerBound(o):
588  r"""_object_cast_to_HarmonicLowerBound(Object o) -> HarmonicLowerBound"""
589  return _IMP_core._object_cast_to_HarmonicLowerBound(o)
590 
591 _object_types.append("HarmonicUpperBound")
592 
593 
594 def _object_cast_to_HarmonicUpperBound(o):
595  r"""_object_cast_to_HarmonicUpperBound(Object o) -> HarmonicUpperBound"""
596  return _IMP_core._object_cast_to_HarmonicUpperBound(o)
597 
598 _object_types.append("HarmonicSphereDistancePairScore")
599 
600 
601 def _object_cast_to_HarmonicSphereDistancePairScore(o):
602  r"""_object_cast_to_HarmonicSphereDistancePairScore(Object o) -> HarmonicSphereDistancePairScore"""
603  return _IMP_core._object_cast_to_HarmonicSphereDistancePairScore(o)
604 
605 _object_types.append("HarmonicUpperBoundSphereDistancePairScore")
606 
607 
608 def _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o):
609  r"""_object_cast_to_HarmonicUpperBoundSphereDistancePairScore(Object o) -> HarmonicUpperBoundSphereDistancePairScore"""
610  return _IMP_core._object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
611 
612 _object_types.append("HarmonicUpperBoundSphereDiameterPairScore")
613 
614 
615 def _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o):
616  r"""_object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(Object o) -> HarmonicUpperBoundSphereDiameterPairScore"""
617  return _IMP_core._object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
618 
619 _object_types.append("HarmonicSurfaceDistancePairScore")
620 
621 
622 def _object_cast_to_HarmonicSurfaceDistancePairScore(o):
623  r"""_object_cast_to_HarmonicSurfaceDistancePairScore(Object o) -> HarmonicSurfaceDistancePairScore"""
624  return _IMP_core._object_cast_to_HarmonicSurfaceDistancePairScore(o)
625 
626 _object_types.append("HarmonicSurfaceHeightPairScore")
627 
628 
629 def _object_cast_to_HarmonicSurfaceHeightPairScore(o):
630  r"""_object_cast_to_HarmonicSurfaceHeightPairScore(Object o) -> HarmonicSurfaceHeightPairScore"""
631  return _IMP_core._object_cast_to_HarmonicSurfaceHeightPairScore(o)
632 
633 _object_types.append("HarmonicSurfaceDepthPairScore")
634 
635 
636 def _object_cast_to_HarmonicSurfaceDepthPairScore(o):
637  r"""_object_cast_to_HarmonicSurfaceDepthPairScore(Object o) -> HarmonicSurfaceDepthPairScore"""
638  return _IMP_core._object_cast_to_HarmonicSurfaceDepthPairScore(o)
639 
640 _object_types.append("WeightedSum")
641 
642 
643 def _object_cast_to_WeightedSum(o):
644  r"""_object_cast_to_WeightedSum(Object o) -> WeightedSum"""
645  return _IMP_core._object_cast_to_WeightedSum(o)
646 
647 _object_types.append("WeightedSumOfExponential")
648 
649 
650 def _object_cast_to_WeightedSumOfExponential(o):
651  r"""_object_cast_to_WeightedSumOfExponential(Object o) -> WeightedSumOfExponential"""
652  return _IMP_core._object_cast_to_WeightedSumOfExponential(o)
653 
654 _object_types.append("KClosePairsPairScore")
655 
656 
657 def _object_cast_to_KClosePairsPairScore(o):
658  r"""_object_cast_to_KClosePairsPairScore(Object o) -> KClosePairsPairScore"""
659  return _IMP_core._object_cast_to_KClosePairsPairScore(o)
660 
661 _object_types.append("LeavesRefiner")
662 
663 
664 def _object_cast_to_LeavesRefiner(o):
665  r"""_object_cast_to_LeavesRefiner(Object o) -> LeavesRefiner"""
666  return _IMP_core._object_cast_to_LeavesRefiner(o)
667 
668 _object_types.append("Linear")
669 
670 
671 def _object_cast_to_Linear(o):
672  r"""_object_cast_to_Linear(Object o) -> Linear"""
673  return _IMP_core._object_cast_to_Linear(o)
674 
675 _object_types.append("LogNormalMover")
676 
677 
678 def _object_cast_to_LogNormalMover(o):
679  r"""_object_cast_to_LogNormalMover(Object o) -> LogNormalMover"""
680  return _IMP_core._object_cast_to_LogNormalMover(o)
681 
682 _object_types.append("MCCGSampler")
683 
684 
685 def _object_cast_to_MCCGSampler(o):
686  r"""_object_cast_to_MCCGSampler(Object o) -> MCCGSampler"""
687  return _IMP_core._object_cast_to_MCCGSampler(o)
688 
689 _object_types.append("MonteCarlo")
690 
691 
692 def _object_cast_to_MonteCarlo(o):
693  r"""_object_cast_to_MonteCarlo(Object o) -> MonteCarlo"""
694  return _IMP_core._object_cast_to_MonteCarlo(o)
695 
696 _object_types.append("MonteCarloWithLocalOptimization")
697 
698 
699 def _object_cast_to_MonteCarloWithLocalOptimization(o):
700  r"""_object_cast_to_MonteCarloWithLocalOptimization(Object o) -> MonteCarloWithLocalOptimization"""
701  return _IMP_core._object_cast_to_MonteCarloWithLocalOptimization(o)
702 
703 _object_types.append("MonteCarloWithBasinHopping")
704 
705 
706 def _object_cast_to_MonteCarloWithBasinHopping(o):
707  r"""_object_cast_to_MonteCarloWithBasinHopping(Object o) -> MonteCarloWithBasinHopping"""
708  return _IMP_core._object_cast_to_MonteCarloWithBasinHopping(o)
709 
710 _object_types.append("MSConnectivityRestraint")
711 
712 
713 def _object_cast_to_MSConnectivityRestraint(o):
714  r"""_object_cast_to_MSConnectivityRestraint(Object o) -> MSConnectivityRestraint"""
715  return _IMP_core._object_cast_to_MSConnectivityRestraint(o)
716 
717 _object_types.append("NeighborsTable")
718 
719 
720 def _object_cast_to_NeighborsTable(o):
721  r"""_object_cast_to_NeighborsTable(Object o) -> NeighborsTable"""
722  return _IMP_core._object_cast_to_NeighborsTable(o)
723 
724 _object_types.append("NormalMover")
725 
726 
727 def _object_cast_to_NormalMover(o):
728  r"""_object_cast_to_NormalMover(Object o) -> NormalMover"""
729  return _IMP_core._object_cast_to_NormalMover(o)
730 
731 _object_types.append("NormalizedSphereDistancePairScore")
732 
733 
734 def _object_cast_to_NormalizedSphereDistancePairScore(o):
735  r"""_object_cast_to_NormalizedSphereDistancePairScore(Object o) -> NormalizedSphereDistancePairScore"""
736  return _IMP_core._object_cast_to_NormalizedSphereDistancePairScore(o)
737 
738 _object_types.append("OpenCubicSpline")
739 
740 
741 def _object_cast_to_OpenCubicSpline(o):
742  r"""_object_cast_to_OpenCubicSpline(Object o) -> OpenCubicSpline"""
743  return _IMP_core._object_cast_to_OpenCubicSpline(o)
744 
745 _object_types.append("PairConstraint")
746 
747 
748 def _object_cast_to_PairConstraint(o):
749  r"""_object_cast_to_PairConstraint(Object o) -> PairConstraint"""
750  return _IMP_core._object_cast_to_PairConstraint(o)
751 
752 _object_types.append("PairRestraint")
753 
754 
755 def _object_cast_to_PairRestraint(o):
756  r"""_object_cast_to_PairRestraint(Object o) -> PairRestraint"""
757  return _IMP_core._object_cast_to_PairRestraint(o)
758 
759 _object_types.append("QuadConstraint")
760 
761 
762 def _object_cast_to_QuadConstraint(o):
763  r"""_object_cast_to_QuadConstraint(Object o) -> QuadConstraint"""
764  return _IMP_core._object_cast_to_QuadConstraint(o)
765 
766 _object_types.append("QuadRestraint")
767 
768 
769 def _object_cast_to_QuadRestraint(o):
770  r"""_object_cast_to_QuadRestraint(Object o) -> QuadRestraint"""
771  return _IMP_core._object_cast_to_QuadRestraint(o)
772 
773 _object_types.append("QuadraticClosePairsFinder")
774 
775 
776 def _object_cast_to_QuadraticClosePairsFinder(o):
777  r"""_object_cast_to_QuadraticClosePairsFinder(Object o) -> QuadraticClosePairsFinder"""
778  return _IMP_core._object_cast_to_QuadraticClosePairsFinder(o)
779 
780 _object_types.append("RefinedPairsPairScore")
781 
782 
783 def _object_cast_to_RefinedPairsPairScore(o):
784  r"""_object_cast_to_RefinedPairsPairScore(Object o) -> RefinedPairsPairScore"""
785  return _IMP_core._object_cast_to_RefinedPairsPairScore(o)
786 
787 _object_types.append("RestraintsScoringFunction")
788 
789 
790 def _object_cast_to_RestraintsScoringFunction(o):
791  r"""_object_cast_to_RestraintsScoringFunction(Object o) -> RestraintsScoringFunction"""
792  return _IMP_core._object_cast_to_RestraintsScoringFunction(o)
793 
794 _object_types.append("RigidBodyDistancePairScore")
795 
796 
797 def _object_cast_to_RigidBodyDistancePairScore(o):
798  r"""_object_cast_to_RigidBodyDistancePairScore(Object o) -> RigidBodyDistancePairScore"""
799  return _IMP_core._object_cast_to_RigidBodyDistancePairScore(o)
800 
801 _object_types.append("RigidBodyAnglePairScore")
802 
803 
804 def _object_cast_to_RigidBodyAnglePairScore(o):
805  r"""_object_cast_to_RigidBodyAnglePairScore(Object o) -> RigidBodyAnglePairScore"""
806  return _IMP_core._object_cast_to_RigidBodyAnglePairScore(o)
807 
808 _object_types.append("RigidBodyMover")
809 
810 
811 def _object_cast_to_RigidBodyMover(o):
812  r"""_object_cast_to_RigidBodyMover(Object o) -> RigidBodyMover"""
813  return _IMP_core._object_cast_to_RigidBodyMover(o)
814 
815 _object_types.append("RigidBodyTunneler")
816 
817 
818 def _object_cast_to_RigidBodyTunneler(o):
819  r"""_object_cast_to_RigidBodyTunneler(Object o) -> RigidBodyTunneler"""
820  return _IMP_core._object_cast_to_RigidBodyTunneler(o)
821 
822 _object_types.append("RigidBodyUmbrella")
823 
824 
825 def _object_cast_to_RigidBodyUmbrella(o):
826  r"""_object_cast_to_RigidBodyUmbrella(Object o) -> RigidBodyUmbrella"""
827  return _IMP_core._object_cast_to_RigidBodyUmbrella(o)
828 
829 _object_types.append("_UpdateRigidBodyMembers")
830 
831 
832 def _object_cast_to__UpdateRigidBodyMembers(o):
833  r"""_object_cast_to__UpdateRigidBodyMembers(Object o) -> _UpdateRigidBodyMembers"""
834  return _IMP_core._object_cast_to__UpdateRigidBodyMembers(o)
835 
836 _object_types.append("_AccumulateRigidBodyDerivatives")
837 
838 
839 def _object_cast_to__AccumulateRigidBodyDerivatives(o):
840  r"""_object_cast_to__AccumulateRigidBodyDerivatives(Object o) -> _AccumulateRigidBodyDerivatives"""
841  return _IMP_core._object_cast_to__AccumulateRigidBodyDerivatives(o)
842 
843 _object_types.append("_RigidBodyNormalizeConstraint")
844 
845 
846 def _object_cast_to__RigidBodyNormalizeConstraint(o):
847  r"""_object_cast_to__RigidBodyNormalizeConstraint(Object o) -> _RigidBodyNormalizeConstraint"""
848  return _IMP_core._object_cast_to__RigidBodyNormalizeConstraint(o)
849 
850 _object_types.append("_NormalizeRotation")
851 
852 
853 def _object_cast_to__NormalizeRotation(o):
854  r"""_object_cast_to__NormalizeRotation(Object o) -> _NormalizeRotation"""
855  return _IMP_core._object_cast_to__NormalizeRotation(o)
856 
857 _object_types.append("_RigidBodyPositionConstraint")
858 
859 
860 def _object_cast_to__RigidBodyPositionConstraint(o):
861  r"""_object_cast_to__RigidBodyPositionConstraint(Object o) -> _RigidBodyPositionConstraint"""
862  return _IMP_core._object_cast_to__RigidBodyPositionConstraint(o)
863 
864 _object_types.append("RigidClosePairsFinder")
865 
866 
867 def _object_cast_to_RigidClosePairsFinder(o):
868  r"""_object_cast_to_RigidClosePairsFinder(Object o) -> RigidClosePairsFinder"""
869  return _IMP_core._object_cast_to_RigidClosePairsFinder(o)
870 
871 _object_types.append("RigidMembersRefiner")
872 
873 
874 def _object_cast_to_RigidMembersRefiner(o):
875  r"""_object_cast_to_RigidMembersRefiner(Object o) -> RigidMembersRefiner"""
876  return _IMP_core._object_cast_to_RigidMembersRefiner(o)
877 
878 _object_types.append("SingletonConstraint")
879 
880 
881 def _object_cast_to_SingletonConstraint(o):
882  r"""_object_cast_to_SingletonConstraint(Object o) -> SingletonConstraint"""
883  return _IMP_core._object_cast_to_SingletonConstraint(o)
884 
885 _object_types.append("SingletonRestraint")
886 
887 
888 def _object_cast_to_SingletonRestraint(o):
889  r"""_object_cast_to_SingletonRestraint(Object o) -> SingletonRestraint"""
890  return _IMP_core._object_cast_to_SingletonRestraint(o)
891 
892 _object_types.append("SoftSpherePairScore")
893 
894 
895 def _object_cast_to_SoftSpherePairScore(o):
896  r"""_object_cast_to_SoftSpherePairScore(Object o) -> SoftSpherePairScore"""
897  return _IMP_core._object_cast_to_SoftSpherePairScore(o)
898 
899 _object_types.append("_SphereDistancePairScore")
900 
901 
902 def _object_cast_to__SphereDistancePairScore(o):
903  r"""_object_cast_to__SphereDistancePairScore(Object o) -> _SphereDistancePairScore"""
904  return _IMP_core._object_cast_to__SphereDistancePairScore(o)
905 
906 _object_types.append("SphereDistanceToSingletonScore")
907 
908 
909 def _object_cast_to_SphereDistanceToSingletonScore(o):
910  r"""_object_cast_to_SphereDistanceToSingletonScore(Object o) -> SphereDistanceToSingletonScore"""
911  return _IMP_core._object_cast_to_SphereDistanceToSingletonScore(o)
912 
913 _object_types.append("SoftSubSurfacePairScore")
914 
915 
916 def _object_cast_to_SoftSubSurfacePairScore(o):
917  r"""_object_cast_to_SoftSubSurfacePairScore(Object o) -> SoftSubSurfacePairScore"""
918  return _IMP_core._object_cast_to_SoftSubSurfacePairScore(o)
919 
920 _object_types.append("SoftSuperSurfacePairScore")
921 
922 
923 def _object_cast_to_SoftSuperSurfacePairScore(o):
924  r"""_object_cast_to_SoftSuperSurfacePairScore(Object o) -> SoftSuperSurfacePairScore"""
925  return _IMP_core._object_cast_to_SoftSuperSurfacePairScore(o)
926 
927 _object_types.append("SurfaceDistancePairScore")
928 
929 
930 def _object_cast_to_SurfaceDistancePairScore(o):
931  r"""_object_cast_to_SurfaceDistancePairScore(Object o) -> SurfaceDistancePairScore"""
932  return _IMP_core._object_cast_to_SurfaceDistancePairScore(o)
933 
934 _object_types.append("SurfaceHeightPairScore")
935 
936 
937 def _object_cast_to_SurfaceHeightPairScore(o):
938  r"""_object_cast_to_SurfaceHeightPairScore(Object o) -> SurfaceHeightPairScore"""
939  return _IMP_core._object_cast_to_SurfaceHeightPairScore(o)
940 
941 _object_types.append("SurfaceDepthPairScore")
942 
943 
944 def _object_cast_to_SurfaceDepthPairScore(o):
945  r"""_object_cast_to_SurfaceDepthPairScore(Object o) -> SurfaceDepthPairScore"""
946  return _IMP_core._object_cast_to_SurfaceDepthPairScore(o)
947 
948 _object_types.append("SurfaceTetheredChain")
949 
950 
951 def _object_cast_to_SurfaceTetheredChain(o):
952  r"""_object_cast_to_SurfaceTetheredChain(Object o) -> SurfaceTetheredChain"""
953  return _IMP_core._object_cast_to_SurfaceTetheredChain(o)
954 
955 _object_types.append("SurfaceSymmetryConstraint")
956 
957 
958 def _object_cast_to_SurfaceSymmetryConstraint(o):
959  r"""_object_cast_to_SurfaceSymmetryConstraint(Object o) -> SurfaceSymmetryConstraint"""
960  return _IMP_core._object_cast_to_SurfaceSymmetryConstraint(o)
961 
962 _object_types.append("SteepestDescent")
963 
964 
965 def _object_cast_to_SteepestDescent(o):
966  r"""_object_cast_to_SteepestDescent(Object o) -> SteepestDescent"""
967  return _IMP_core._object_cast_to_SteepestDescent(o)
968 
969 _object_types.append("TableRefiner")
970 
971 
972 def _object_cast_to_TableRefiner(o):
973  r"""_object_cast_to_TableRefiner(Object o) -> TableRefiner"""
974  return _IMP_core._object_cast_to_TableRefiner(o)
975 
976 _object_types.append("Transform")
977 
978 
979 def _object_cast_to_Transform(o):
980  r"""_object_cast_to_Transform(Object o) -> Transform"""
981  return _IMP_core._object_cast_to_Transform(o)
982 
983 _object_types.append("TransformationAndReflectionSymmetry")
984 
985 
986 def _object_cast_to_TransformationAndReflectionSymmetry(o):
987  r"""_object_cast_to_TransformationAndReflectionSymmetry(Object o) -> TransformationAndReflectionSymmetry"""
988  return _IMP_core._object_cast_to_TransformationAndReflectionSymmetry(o)
989 
990 _object_types.append("TransformationSymmetry")
991 
992 
993 def _object_cast_to_TransformationSymmetry(o):
994  r"""_object_cast_to_TransformationSymmetry(Object o) -> TransformationSymmetry"""
995  return _IMP_core._object_cast_to_TransformationSymmetry(o)
996 
997 _object_types.append("TransformationSymmetryMover")
998 
999 
1000 def _object_cast_to_TransformationSymmetryMover(o):
1001  r"""_object_cast_to_TransformationSymmetryMover(Object o) -> TransformationSymmetryMover"""
1002  return _IMP_core._object_cast_to_TransformationSymmetryMover(o)
1003 
1004 _object_types.append("TransformedDistancePairScore")
1005 
1006 
1007 def _object_cast_to_TransformedDistancePairScore(o):
1008  r"""_object_cast_to_TransformedDistancePairScore(Object o) -> TransformedDistancePairScore"""
1009  return _IMP_core._object_cast_to_TransformedDistancePairScore(o)
1010 
1011 _object_types.append("TripletConstraint")
1012 
1013 
1014 def _object_cast_to_TripletConstraint(o):
1015  r"""_object_cast_to_TripletConstraint(Object o) -> TripletConstraint"""
1016  return _IMP_core._object_cast_to_TripletConstraint(o)
1017 
1018 _object_types.append("TripletRestraint")
1019 
1020 
1021 def _object_cast_to_TripletRestraint(o):
1022  r"""_object_cast_to_TripletRestraint(Object o) -> TripletRestraint"""
1023  return _IMP_core._object_cast_to_TripletRestraint(o)
1024 
1025 _object_types.append("TypedPairScore")
1026 
1027 
1028 def _object_cast_to_TypedPairScore(o):
1029  r"""_object_cast_to_TypedPairScore(Object o) -> TypedPairScore"""
1030  return _IMP_core._object_cast_to_TypedPairScore(o)
1031 
1032 _object_types.append("VolumeRestraint")
1033 
1034 
1035 def _object_cast_to_VolumeRestraint(o):
1036  r"""_object_cast_to_VolumeRestraint(Object o) -> VolumeRestraint"""
1037  return _IMP_core._object_cast_to_VolumeRestraint(o)
1038 
1039 _object_types.append("WeightedSphereDistancePairScore")
1040 
1041 
1042 def _object_cast_to_WeightedSphereDistancePairScore(o):
1043  r"""_object_cast_to_WeightedSphereDistancePairScore(Object o) -> WeightedSphereDistancePairScore"""
1044  return _IMP_core._object_cast_to_WeightedSphereDistancePairScore(o)
1045 
1046 _object_types.append("MoveStatisticsScoreState")
1047 
1048 
1049 def _object_cast_to_MoveStatisticsScoreState(o):
1050  r"""_object_cast_to_MoveStatisticsScoreState(Object o) -> MoveStatisticsScoreState"""
1051  return _IMP_core._object_cast_to_MoveStatisticsScoreState(o)
1052 
1053 _object_types.append("MinimumRestraint")
1054 
1055 
1056 def _object_cast_to_MinimumRestraint(o):
1057  r"""_object_cast_to_MinimumRestraint(Object o) -> MinimumRestraint"""
1058  return _IMP_core._object_cast_to_MinimumRestraint(o)
1059 
1060 _object_types.append("WriteRestraintScoresOptimizerState")
1061 
1062 
1063 def _object_cast_to_WriteRestraintScoresOptimizerState(o):
1064  r"""_object_cast_to_WriteRestraintScoresOptimizerState(Object o) -> WriteRestraintScoresOptimizerState"""
1065  return _IMP_core._object_cast_to_WriteRestraintScoresOptimizerState(o)
1066 
1067 _object_types.append("LateralSurfaceConstraint")
1068 
1069 
1070 def _object_cast_to_LateralSurfaceConstraint(o):
1071  r"""_object_cast_to_LateralSurfaceConstraint(Object o) -> LateralSurfaceConstraint"""
1072  return _IMP_core._object_cast_to_LateralSurfaceConstraint(o)
1073 
1074 _object_types.append("ConstantSingletonPredicate")
1075 
1076 
1077 def _object_cast_to_ConstantSingletonPredicate(o):
1078  r"""_object_cast_to_ConstantSingletonPredicate(Object o) -> ConstantSingletonPredicate"""
1079  return _IMP_core._object_cast_to_ConstantSingletonPredicate(o)
1080 
1081 _object_types.append("ConstantPairPredicate")
1082 
1083 
1084 def _object_cast_to_ConstantPairPredicate(o):
1085  r"""_object_cast_to_ConstantPairPredicate(Object o) -> ConstantPairPredicate"""
1086  return _IMP_core._object_cast_to_ConstantPairPredicate(o)
1087 
1088 _object_types.append("ConstantTripletPredicate")
1089 
1090 
1091 def _object_cast_to_ConstantTripletPredicate(o):
1092  r"""_object_cast_to_ConstantTripletPredicate(Object o) -> ConstantTripletPredicate"""
1093  return _IMP_core._object_cast_to_ConstantTripletPredicate(o)
1094 
1095 _object_types.append("ConstantQuadPredicate")
1096 
1097 
1098 def _object_cast_to_ConstantQuadPredicate(o):
1099  r"""_object_cast_to_ConstantQuadPredicate(Object o) -> ConstantQuadPredicate"""
1100  return _IMP_core._object_cast_to_ConstantQuadPredicate(o)
1101 
1102 _object_types.append("CoinFlipSingletonPredicate")
1103 
1104 
1105 def _object_cast_to_CoinFlipSingletonPredicate(o):
1106  r"""_object_cast_to_CoinFlipSingletonPredicate(Object o) -> CoinFlipSingletonPredicate"""
1107  return _IMP_core._object_cast_to_CoinFlipSingletonPredicate(o)
1108 
1109 _object_types.append("CoinFlipPairPredicate")
1110 
1111 
1112 def _object_cast_to_CoinFlipPairPredicate(o):
1113  r"""_object_cast_to_CoinFlipPairPredicate(Object o) -> CoinFlipPairPredicate"""
1114  return _IMP_core._object_cast_to_CoinFlipPairPredicate(o)
1115 
1116 _object_types.append("CoinFlipTripletPredicate")
1117 
1118 
1119 def _object_cast_to_CoinFlipTripletPredicate(o):
1120  r"""_object_cast_to_CoinFlipTripletPredicate(Object o) -> CoinFlipTripletPredicate"""
1121  return _IMP_core._object_cast_to_CoinFlipTripletPredicate(o)
1122 
1123 _object_types.append("CoinFlipQuadPredicate")
1124 
1125 
1126 def _object_cast_to_CoinFlipQuadPredicate(o):
1127  r"""_object_cast_to_CoinFlipQuadPredicate(Object o) -> CoinFlipQuadPredicate"""
1128  return _IMP_core._object_cast_to_CoinFlipQuadPredicate(o)
1129 
1130 _object_types.append("UnorderedTypeSingletonPredicate")
1131 
1132 
1133 def _object_cast_to_UnorderedTypeSingletonPredicate(o):
1134  r"""_object_cast_to_UnorderedTypeSingletonPredicate(Object o) -> UnorderedTypeSingletonPredicate"""
1135  return _IMP_core._object_cast_to_UnorderedTypeSingletonPredicate(o)
1136 
1137 _object_types.append("UnorderedTypePairPredicate")
1138 
1139 
1140 def _object_cast_to_UnorderedTypePairPredicate(o):
1141  r"""_object_cast_to_UnorderedTypePairPredicate(Object o) -> UnorderedTypePairPredicate"""
1142  return _IMP_core._object_cast_to_UnorderedTypePairPredicate(o)
1143 
1144 _object_types.append("UnorderedTypeTripletPredicate")
1145 
1146 
1147 def _object_cast_to_UnorderedTypeTripletPredicate(o):
1148  r"""_object_cast_to_UnorderedTypeTripletPredicate(Object o) -> UnorderedTypeTripletPredicate"""
1149  return _IMP_core._object_cast_to_UnorderedTypeTripletPredicate(o)
1150 
1151 _object_types.append("UnorderedTypeQuadPredicate")
1152 
1153 
1154 def _object_cast_to_UnorderedTypeQuadPredicate(o):
1155  r"""_object_cast_to_UnorderedTypeQuadPredicate(Object o) -> UnorderedTypeQuadPredicate"""
1156  return _IMP_core._object_cast_to_UnorderedTypeQuadPredicate(o)
1157 
1158 _object_types.append("OrderedTypeSingletonPredicate")
1159 
1160 
1161 def _object_cast_to_OrderedTypeSingletonPredicate(o):
1162  r"""_object_cast_to_OrderedTypeSingletonPredicate(Object o) -> OrderedTypeSingletonPredicate"""
1163  return _IMP_core._object_cast_to_OrderedTypeSingletonPredicate(o)
1164 
1165 _object_types.append("OrderedTypePairPredicate")
1166 
1167 
1168 def _object_cast_to_OrderedTypePairPredicate(o):
1169  r"""_object_cast_to_OrderedTypePairPredicate(Object o) -> OrderedTypePairPredicate"""
1170  return _IMP_core._object_cast_to_OrderedTypePairPredicate(o)
1171 
1172 _object_types.append("OrderedTypeTripletPredicate")
1173 
1174 
1175 def _object_cast_to_OrderedTypeTripletPredicate(o):
1176  r"""_object_cast_to_OrderedTypeTripletPredicate(Object o) -> OrderedTypeTripletPredicate"""
1177  return _IMP_core._object_cast_to_OrderedTypeTripletPredicate(o)
1178 
1179 _object_types.append("OrderedTypeQuadPredicate")
1180 
1181 
1182 def _object_cast_to_OrderedTypeQuadPredicate(o):
1183  r"""_object_cast_to_OrderedTypeQuadPredicate(Object o) -> OrderedTypeQuadPredicate"""
1184  return _IMP_core._object_cast_to_OrderedTypeQuadPredicate(o)
1185 
1186 _object_types.append("AllSameSingletonPredicate")
1187 
1188 
1189 def _object_cast_to_AllSameSingletonPredicate(o):
1190  r"""_object_cast_to_AllSameSingletonPredicate(Object o) -> AllSameSingletonPredicate"""
1191  return _IMP_core._object_cast_to_AllSameSingletonPredicate(o)
1192 
1193 _object_types.append("AllSamePairPredicate")
1194 
1195 
1196 def _object_cast_to_AllSamePairPredicate(o):
1197  r"""_object_cast_to_AllSamePairPredicate(Object o) -> AllSamePairPredicate"""
1198  return _IMP_core._object_cast_to_AllSamePairPredicate(o)
1199 
1200 _object_types.append("AllSameTripletPredicate")
1201 
1202 
1203 def _object_cast_to_AllSameTripletPredicate(o):
1204  r"""_object_cast_to_AllSameTripletPredicate(Object o) -> AllSameTripletPredicate"""
1205  return _IMP_core._object_cast_to_AllSameTripletPredicate(o)
1206 
1207 _object_types.append("AllSameQuadPredicate")
1208 
1209 
1210 def _object_cast_to_AllSameQuadPredicate(o):
1211  r"""_object_cast_to_AllSameQuadPredicate(Object o) -> AllSameQuadPredicate"""
1212  return _IMP_core._object_cast_to_AllSameQuadPredicate(o)
1213 
1214 def XYZs(l=[]):
1215  return [XYZ(x) for x in l]
1216 _plural_types.append("XYZs")
1217 
1218 
1219 _value_types.append("XYZ")
1220 
1221 
1222 def XYZRs(l=[]):
1223  return [XYZR(x) for x in l]
1224 _plural_types.append("XYZRs")
1225 
1226 
1227 _value_types.append("XYZR")
1228 
1229 
1230 def RigidBodies(l=[]):
1231  return [RigidBody(x) for x in l]
1232 _plural_types.append("RigidBodies")
1233 
1234 
1235 _value_types.append("RigidBody")
1236 
1237 
1238 def RigidBodyMembers(l=[]):
1239  return [RigidBodyMember(x) for x in l]
1240 _plural_types.append("RigidBodyMembers")
1241 
1242 
1243 _value_types.append("RigidBodyMember")
1244 
1245 
1246 def RigidMembers(l=[]):
1247  return [RigidMember(x) for x in l]
1248 _plural_types.append("RigidMembers")
1249 
1250 
1251 _value_types.append("RigidMember")
1252 
1253 
1254 def NonRigidMembers(l=[]):
1255  return [NonRigidMember(x) for x in l]
1256 _plural_types.append("NonRigidMembers")
1257 
1258 
1259 _value_types.append("NonRigidMember")
1260 
1261 
1262 def Centroids(l=[]):
1263  return [Centroid(x) for x in l]
1264 _plural_types.append("Centroids")
1265 
1266 
1267 _value_types.append("Centroid")
1268 
1269 
1270 def Covers(l=[]):
1271  return [Cover(x) for x in l]
1272 _plural_types.append("Covers")
1273 
1274 
1275 _value_types.append("Cover")
1276 
1277 
1278 def References(l=[]):
1279  return [Reference(x) for x in l]
1280 _plural_types.append("References")
1281 
1282 
1283 _value_types.append("Reference")
1284 
1285 
1286 ParticleTypes=list
1287 _plural_types.append("ParticleTypes")
1288 _value_types.append("ParticleType")
1289 
1290 
1291 def Typeds(l=[]):
1292  return [Typed(x) for x in l]
1293 _plural_types.append("Typeds")
1294 
1295 
1296 _value_types.append("Typed")
1297 
1298 
1299 def GenericHierarchies(l=[]):
1300  return [Hierarchy(x) for x in l]
1301 _plural_types.append("GenericHierarchies")
1302 
1303 
1304 _value_types.append("Hierarchy")
1305 
1306 
1307 def Gaussians(l=[]):
1308  return [Gaussian(x) for x in l]
1309 _plural_types.append("Gaussians")
1310 
1311 
1312 _value_types.append("Gaussian")
1313 
1314 
1315 def Directions(l=[]):
1316  return [Direction(x) for x in l]
1317 _plural_types.append("Directions")
1318 
1319 
1320 _value_types.append("Direction")
1321 
1322 
1323 def DirectionAngles(l=[]):
1324  return [DirectionAngle(x) for x in l]
1325 _plural_types.append("DirectionAngles")
1326 
1327 
1328 _value_types.append("DirectionAngle")
1329 
1330 
1331 def Surfaces(l=[]):
1332  return [Surface(x) for x in l]
1333 _plural_types.append("Surfaces")
1334 
1335 
1336 _value_types.append("Surface")
1337 
1338 
1339 def Provenances(l=[]):
1340  return [Provenance(x) for x in l]
1341 _plural_types.append("Provenances")
1342 
1343 
1344 _value_types.append("Provenance")
1345 
1346 
1347 def StructureProvenances(l=[]):
1348  return [StructureProvenance(x) for x in l]
1349 _plural_types.append("StructureProvenances")
1350 
1351 
1352 _value_types.append("StructureProvenance")
1353 
1354 
1355 def SampleProvenances(l=[]):
1356  return [SampleProvenance(x) for x in l]
1357 _plural_types.append("SampleProvenances")
1358 
1359 
1360 _value_types.append("SampleProvenance")
1361 
1362 
1363 def ClusterProvenances(l=[]):
1364  return [ClusterProvenance(x) for x in l]
1365 _plural_types.append("ClusterProvenances")
1366 
1367 
1368 _value_types.append("ClusterProvenance")
1369 
1370 
1371 def CombineProvenances(l=[]):
1372  return [CombineProvenance(x) for x in l]
1373 _plural_types.append("CombineProvenances")
1374 
1375 
1376 _value_types.append("CombineProvenance")
1377 
1378 
1379 def FilterProvenances(l=[]):
1380  return [FilterProvenance(x) for x in l]
1381 _plural_types.append("FilterProvenances")
1382 
1383 
1384 _value_types.append("FilterProvenance")
1385 
1386 
1387 def ScriptProvenances(l=[]):
1388  return [ScriptProvenance(x) for x in l]
1389 _plural_types.append("ScriptProvenances")
1390 
1391 
1392 _value_types.append("ScriptProvenance")
1393 
1394 
1395 def SoftwareProvenances(l=[]):
1396  return [SoftwareProvenance(x) for x in l]
1397 _plural_types.append("SoftwareProvenances")
1398 
1399 
1400 _value_types.append("SoftwareProvenance")
1401 
1402 
1403 def Provenanceds(l=[]):
1404  return [Provenanced(x) for x in l]
1405 _plural_types.append("Provenanceds")
1406 
1407 
1408 _value_types.append("Provenanced")
1409 
1410 
1411 HierarchyCounters=list
1412 _plural_types.append("HierarchyCounters")
1413 _value_types.append("HierarchyCounter")
1414 
1415 
1416 HierarchyTraitsList=list
1417 _plural_types.append("HierarchyTraitsList")
1418 _value_types.append("HierarchyTraits")
1419 
1420 
1421 _object_types.append("TruncatedHarmonicBound")
1422 
1423 
1424 def _object_cast_to_TruncatedHarmonicBound(o):
1425  r"""_object_cast_to_TruncatedHarmonicBound(Object o) -> TruncatedHarmonicBound"""
1426  return _IMP_core._object_cast_to_TruncatedHarmonicBound(o)
1427 
1428 _object_types.append("TruncatedHarmonicLowerBound")
1429 
1430 
1431 def _object_cast_to_TruncatedHarmonicLowerBound(o):
1432  r"""_object_cast_to_TruncatedHarmonicLowerBound(Object o) -> TruncatedHarmonicLowerBound"""
1433  return _IMP_core._object_cast_to_TruncatedHarmonicLowerBound(o)
1434 
1435 _object_types.append("TruncatedHarmonicUpperBound")
1436 
1437 
1438 def _object_cast_to_TruncatedHarmonicUpperBound(o):
1439  r"""_object_cast_to_TruncatedHarmonicUpperBound(Object o) -> TruncatedHarmonicUpperBound"""
1440  return _IMP_core._object_cast_to_TruncatedHarmonicUpperBound(o)
1441 
1442 _object_types.append("HarmonicDistancePairScore")
1443 
1444 
1445 def _object_cast_to_HarmonicDistancePairScore(o):
1446  r"""_object_cast_to_HarmonicDistancePairScore(Object o) -> HarmonicDistancePairScore"""
1447  return _IMP_core._object_cast_to_HarmonicDistancePairScore(o)
1448 
1449 _object_types.append("DistancePairScore")
1450 
1451 
1452 def _object_cast_to_DistancePairScore(o):
1453  r"""_object_cast_to_DistancePairScore(Object o) -> DistancePairScore"""
1454  return _IMP_core._object_cast_to_DistancePairScore(o)
1455 
1456 _object_types.append("XYZRGeometry")
1457 
1458 
1459 def _object_cast_to_XYZRGeometry(o):
1460  r"""_object_cast_to_XYZRGeometry(Object o) -> XYZRGeometry"""
1461  return _IMP_core._object_cast_to_XYZRGeometry(o)
1462 
1463 _object_types.append("XYZRsGeometry")
1464 
1465 
1466 def _object_cast_to_XYZRsGeometry(o):
1467  r"""_object_cast_to_XYZRsGeometry(Object o) -> XYZRsGeometry"""
1468  return _IMP_core._object_cast_to_XYZRsGeometry(o)
1469 
1470 _object_types.append("XYZDerivativeGeometry")
1471 
1472 
1473 def _object_cast_to_XYZDerivativeGeometry(o):
1474  r"""_object_cast_to_XYZDerivativeGeometry(Object o) -> XYZDerivativeGeometry"""
1475  return _IMP_core._object_cast_to_XYZDerivativeGeometry(o)
1476 
1477 _object_types.append("XYZDerivativesGeometry")
1478 
1479 
1480 def _object_cast_to_XYZDerivativesGeometry(o):
1481  r"""_object_cast_to_XYZDerivativesGeometry(Object o) -> XYZDerivativesGeometry"""
1482  return _IMP_core._object_cast_to_XYZDerivativesGeometry(o)
1483 
1484 _object_types.append("RigidBodyDerivativeGeometry")
1485 
1486 
1487 def _object_cast_to_RigidBodyDerivativeGeometry(o):
1488  r"""_object_cast_to_RigidBodyDerivativeGeometry(Object o) -> RigidBodyDerivativeGeometry"""
1489  return _IMP_core._object_cast_to_RigidBodyDerivativeGeometry(o)
1490 
1491 _object_types.append("RigidBodyDerivativesGeometry")
1492 
1493 
1494 def _object_cast_to_RigidBodyDerivativesGeometry(o):
1495  r"""_object_cast_to_RigidBodyDerivativesGeometry(Object o) -> RigidBodyDerivativesGeometry"""
1496  return _IMP_core._object_cast_to_RigidBodyDerivativesGeometry(o)
1497 
1498 _object_types.append("RigidBodyHierarchyGeometry")
1499 
1500 
1501 def _object_cast_to_RigidBodyHierarchyGeometry(o):
1502  r"""_object_cast_to_RigidBodyHierarchyGeometry(Object o) -> RigidBodyHierarchyGeometry"""
1503  return _IMP_core._object_cast_to_RigidBodyHierarchyGeometry(o)
1504 
1505 _object_types.append("RigidBodyFrameGeometry")
1506 
1507 
1508 def _object_cast_to_RigidBodyFrameGeometry(o):
1509  r"""_object_cast_to_RigidBodyFrameGeometry(Object o) -> RigidBodyFrameGeometry"""
1510  return _IMP_core._object_cast_to_RigidBodyFrameGeometry(o)
1511 
1512 _object_types.append("RigidBodyFramesGeometry")
1513 
1514 
1515 def _object_cast_to_RigidBodyFramesGeometry(o):
1516  r"""_object_cast_to_RigidBodyFramesGeometry(Object o) -> RigidBodyFramesGeometry"""
1517  return _IMP_core._object_cast_to_RigidBodyFramesGeometry(o)
1518 
1519 _object_types.append("RigidBodyTorque")
1520 
1521 
1522 def _object_cast_to_RigidBodyTorque(o):
1523  r"""_object_cast_to_RigidBodyTorque(Object o) -> RigidBodyTorque"""
1524  return _IMP_core._object_cast_to_RigidBodyTorque(o)
1525 
1526 _object_types.append("EdgePairGeometry")
1527 
1528 
1529 def _object_cast_to_EdgePairGeometry(o):
1530  r"""_object_cast_to_EdgePairGeometry(Object o) -> EdgePairGeometry"""
1531  return _IMP_core._object_cast_to_EdgePairGeometry(o)
1532 
1533 _object_types.append("EdgePairsGeometry")
1534 
1535 
1536 def _object_cast_to_EdgePairsGeometry(o):
1537  r"""_object_cast_to_EdgePairsGeometry(Object o) -> EdgePairsGeometry"""
1538  return _IMP_core._object_cast_to_EdgePairsGeometry(o)
1539 
1540 _object_types.append("SurfaceGeometry")
1541 
1542 
1543 def _object_cast_to_SurfaceGeometry(o):
1544  r"""_object_cast_to_SurfaceGeometry(Object o) -> SurfaceGeometry"""
1545  return _IMP_core._object_cast_to_SurfaceGeometry(o)
1546 
1547 _object_types.append("SurfaceGeometryConstraint")
1548 
1549 
1550 def _object_cast_to_SurfaceGeometryConstraint(o):
1551  r"""_object_cast_to_SurfaceGeometryConstraint(Object o) -> SurfaceGeometryConstraint"""
1552  return _IMP_core._object_cast_to_SurfaceGeometryConstraint(o)
1553 
1554 _object_types.append("AttributeSingletonPredicate")
1555 
1556 
1557 def _object_cast_to_AttributeSingletonPredicate(o):
1558  r"""_object_cast_to_AttributeSingletonPredicate(Object o) -> AttributeSingletonPredicate"""
1559  return _IMP_core._object_cast_to_AttributeSingletonPredicate(o)
1560 
1561 _object_types.append("InBoundingBox3DSingletonPredicate")
1562 
1563 
1564 def _object_cast_to_InBoundingBox3DSingletonPredicate(o):
1565  r"""_object_cast_to_InBoundingBox3DSingletonPredicate(Object o) -> InBoundingBox3DSingletonPredicate"""
1566  return _IMP_core._object_cast_to_InBoundingBox3DSingletonPredicate(o)
1567 
1568 _object_types.append("IsCollisionPairPredicate")
1569 
1570 
1571 def _object_cast_to_IsCollisionPairPredicate(o):
1572  r"""_object_cast_to_IsCollisionPairPredicate(Object o) -> IsCollisionPairPredicate"""
1573  return _IMP_core._object_cast_to_IsCollisionPairPredicate(o)
1574 
1575 BinormalTermList=list
1576 _plural_types.append("BinormalTermList")
1577 _value_types.append("BinormalTerm")
1578 
1579 
1580 _object_types.append("MultipleBinormalRestraint")
1581 
1582 
1583 def _object_cast_to_MultipleBinormalRestraint(o):
1584  r"""_object_cast_to_MultipleBinormalRestraint(Object o) -> MultipleBinormalRestraint"""
1585  return _IMP_core._object_cast_to_MultipleBinormalRestraint(o)
1586 class ClosePairsFinder(IMP._ParticleInputs, IMP.Object):
1587  r"""Proxy of C++ IMP::core::ClosePairsFinder class."""
1588 
1589  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1590 
1591  def __init__(self, *args, **kwargs):
1592  raise AttributeError("No constructor defined - class is abstract")
1593  __swig_destroy__ = _IMP_core.delete_ClosePairsFinder
1594 
1595  def get_close_pairs(self, *args):
1596  r"""
1597  get_close_pairs(ClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
1598  get_close_pairs(ClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
1599  get_close_pairs(ClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
1600  get_close_pairs(ClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
1601  """
1602  return _IMP_core.ClosePairsFinder_get_close_pairs(self, *args)
1603 
1604  def set_distance(self, d):
1605  r"""set_distance(ClosePairsFinder self, double d)"""
1606  return _IMP_core.ClosePairsFinder_set_distance(self, d)
1607 
1608  def get_distance(self):
1609  r"""get_distance(ClosePairsFinder self) -> double"""
1610  return _IMP_core.ClosePairsFinder_get_distance(self)
1611  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)
1612  def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
1613  def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
1614  pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
1615 
1616  def remove_pair_filter(self, d):
1617  r"""remove_pair_filter(ClosePairsFinder self, PairPredicate d)"""
1618  return _IMP_core.ClosePairsFinder_remove_pair_filter(self, d)
1619 
1620  def _python_index_pair_filter(self, d, start, stop):
1621  r"""_python_index_pair_filter(ClosePairsFinder self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
1622  return _IMP_core.ClosePairsFinder__python_index_pair_filter(self, d, start, stop)
1623 
1624  def remove_pair_filters(self, d):
1625  r"""remove_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & d)"""
1626  return _IMP_core.ClosePairsFinder_remove_pair_filters(self, d)
1627 
1628  def set_pair_filters(self, ps):
1629  r"""set_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & ps)"""
1630  return _IMP_core.ClosePairsFinder_set_pair_filters(self, ps)
1631 
1632  def set_pair_filters_order(self, objs):
1633  r"""set_pair_filters_order(ClosePairsFinder self, IMP::PairPredicates const & objs)"""
1634  return _IMP_core.ClosePairsFinder_set_pair_filters_order(self, objs)
1635 
1636  def add_pair_filter(self, obj):
1637  r"""add_pair_filter(ClosePairsFinder self, PairPredicate obj) -> unsigned int"""
1638  return _IMP_core.ClosePairsFinder_add_pair_filter(self, obj)
1639 
1640  def add_pair_filters(self, objs):
1641  r"""add_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & objs)"""
1642  return _IMP_core.ClosePairsFinder_add_pair_filters(self, objs)
1643 
1644  def clear_pair_filters(self):
1645  r"""clear_pair_filters(ClosePairsFinder self)"""
1646  return _IMP_core.ClosePairsFinder_clear_pair_filters(self)
1647 
1648  def get_number_of_pair_filters(self):
1649  r"""get_number_of_pair_filters(ClosePairsFinder self) -> unsigned int"""
1650  return _IMP_core.ClosePairsFinder_get_number_of_pair_filters(self)
1651 
1652  def get_has_pair_filters(self):
1653  r"""get_has_pair_filters(ClosePairsFinder self) -> bool"""
1654  return _IMP_core.ClosePairsFinder_get_has_pair_filters(self)
1655 
1656  def get_pair_filter(self, i):
1657  r"""get_pair_filter(ClosePairsFinder self, unsigned int i) -> PairPredicate"""
1658  return _IMP_core.ClosePairsFinder_get_pair_filter(self, i)
1659 
1660  def get_pair_filters(self):
1661  r"""get_pair_filters(ClosePairsFinder self) -> IMP::PairPredicates"""
1662  return _IMP_core.ClosePairsFinder_get_pair_filters(self)
1663 
1664  def erase_pair_filter(self, i):
1665  r"""erase_pair_filter(ClosePairsFinder self, unsigned int i)"""
1666  return _IMP_core.ClosePairsFinder_erase_pair_filter(self, i)
1667 
1668  def reserve_pair_filters(self, sz):
1669  r"""reserve_pair_filters(ClosePairsFinder self, unsigned int sz)"""
1670  return _IMP_core.ClosePairsFinder_reserve_pair_filters(self, sz)
1671 
1672  def __str__(self):
1673  r"""__str__(ClosePairsFinder self) -> std::string"""
1674  return _IMP_core.ClosePairsFinder___str__(self)
1675 
1676  def __repr__(self):
1677  r"""__repr__(ClosePairsFinder self) -> std::string"""
1678  return _IMP_core.ClosePairsFinder___repr__(self)
1679 
1680  @staticmethod
1681  def get_from(o):
1682  return _object_cast_to_ClosePairsFinder(o)
1683 
1684 
1685 # Register ClosePairsFinder in _IMP_core:
1686 _IMP_core.ClosePairsFinder_swigregister(ClosePairsFinder)
1687 class MonteCarloMoverResult(IMP._Value):
1688  r"""Proxy of C++ IMP::core::MonteCarloMoverResult class."""
1689 
1690  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1691 
1692  def __init__(self, *args):
1693  r"""__init__(MonteCarloMoverResult self, IMP::ParticleIndexes i0=IMP::ParticleIndexes(), double i1=double()) -> MonteCarloMoverResult"""
1694  _IMP_core.MonteCarloMoverResult_swiginit(self, _IMP_core.new_MonteCarloMoverResult(*args))
1695 
1696  def __hash__(self):
1697  r"""__hash__(MonteCarloMoverResult self) -> std::size_t"""
1698  return _IMP_core.MonteCarloMoverResult___hash__(self)
1699 
1700  def show(self, *args):
1701  r"""show(MonteCarloMoverResult self, _ostream out=std::cout)"""
1702  return _IMP_core.MonteCarloMoverResult_show(self, *args)
1703 
1704  def __cmp__(self, o):
1705  r"""__cmp__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> int"""
1706  return _IMP_core.MonteCarloMoverResult___cmp__(self, o)
1707 
1708  def __eq__(self, o):
1709  r"""__eq__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1710  return _IMP_core.MonteCarloMoverResult___eq__(self, o)
1711 
1712  def __ne__(self, o):
1713  r"""__ne__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1714  return _IMP_core.MonteCarloMoverResult___ne__(self, o)
1715 
1716  def __lt__(self, o):
1717  r"""__lt__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1718  return _IMP_core.MonteCarloMoverResult___lt__(self, o)
1719 
1720  def __gt__(self, o):
1721  r"""__gt__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1722  return _IMP_core.MonteCarloMoverResult___gt__(self, o)
1723 
1724  def __ge__(self, o):
1725  r"""__ge__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1726  return _IMP_core.MonteCarloMoverResult___ge__(self, o)
1727 
1728  def __le__(self, o):
1729  r"""__le__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1730  return _IMP_core.MonteCarloMoverResult___le__(self, o)
1731 
1732  def get_moved_particles(self):
1733  r"""get_moved_particles(MonteCarloMoverResult self) -> IMP::ParticleIndexes const &"""
1734  return _IMP_core.MonteCarloMoverResult_get_moved_particles(self)
1735 
1736  def set_moved_particles(self, v):
1737  r"""set_moved_particles(MonteCarloMoverResult self, IMP::ParticleIndexes const & v)"""
1738  return _IMP_core.MonteCarloMoverResult_set_moved_particles(self, v)
1739 
1740  def get_proposal_ratio(self):
1741  r"""get_proposal_ratio(MonteCarloMoverResult self) -> double const &"""
1742  return _IMP_core.MonteCarloMoverResult_get_proposal_ratio(self)
1743 
1744  def set_proposal_ratio(self, v):
1745  r"""set_proposal_ratio(MonteCarloMoverResult self, double const & v)"""
1746  return _IMP_core.MonteCarloMoverResult_set_proposal_ratio(self, v)
1747 
1748  def __str__(self):
1749  r"""__str__(MonteCarloMoverResult self) -> std::string"""
1750  return _IMP_core.MonteCarloMoverResult___str__(self)
1751 
1752  def __repr__(self):
1753  r"""__repr__(MonteCarloMoverResult self) -> std::string"""
1754  return _IMP_core.MonteCarloMoverResult___repr__(self)
1755  __swig_destroy__ = _IMP_core.delete_MonteCarloMoverResult
1756 
1757 # Register MonteCarloMoverResult in _IMP_core:
1758 _IMP_core.MonteCarloMoverResult_swigregister(MonteCarloMoverResult)
1759 class MonteCarloMover(IMP.ModelObject):
1760  r"""Proxy of C++ IMP::core::MonteCarloMover class."""
1761 
1762  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1763 
1764  def __init__(self, *args):
1765  r"""
1766  __init__(MonteCarloMover self, Model m, std::string name) -> MonteCarloMover
1767  __init__(MonteCarloMover self) -> MonteCarloMover
1768  """
1769  if self.__class__ == MonteCarloMover:
1770  _self = None
1771  else:
1772  _self = self
1773  _IMP_core.MonteCarloMover_swiginit(self, _IMP_core.new_MonteCarloMover(_self, *args))
1774 
1775  if self.__class__ != MonteCarloMover:
1776  _director_objects.register(self)
1777 
1778 
1779 
1780 
1781  def propose(self):
1782  r"""propose(MonteCarloMover self) -> MonteCarloMoverResult"""
1783  return _IMP_core.MonteCarloMover_propose(self)
1784 
1785  def reject(self):
1786  r"""reject(MonteCarloMover self)"""
1787  return _IMP_core.MonteCarloMover_reject(self)
1788 
1789  def accept(self):
1790  r"""accept(MonteCarloMover self)"""
1791  return _IMP_core.MonteCarloMover_accept(self)
1792 
1793  def get_number_of_proposed(self):
1794  r"""get_number_of_proposed(MonteCarloMover self) -> unsigned int"""
1795  return _IMP_core.MonteCarloMover_get_number_of_proposed(self)
1796 
1797  def get_number_of_accepted(self):
1798  r"""get_number_of_accepted(MonteCarloMover self) -> unsigned int"""
1799  return _IMP_core.MonteCarloMover_get_number_of_accepted(self)
1800 
1801  def reset_statistics(self):
1802  r"""reset_statistics(MonteCarloMover self)"""
1803  return _IMP_core.MonteCarloMover_reset_statistics(self)
1804 
1805  def add_to_statistics(self, num_proposed, num_rejected):
1806  r"""add_to_statistics(MonteCarloMover self, unsigned int num_proposed, unsigned int num_rejected)"""
1807  return _IMP_core.MonteCarloMover_add_to_statistics(self, num_proposed, num_rejected)
1808 
1809  def do_propose(self):
1810  r"""do_propose(MonteCarloMover self) -> MonteCarloMoverResult"""
1811  return _IMP_core.MonteCarloMover_do_propose(self)
1812 
1813  def do_reject(self):
1814  r"""do_reject(MonteCarloMover self)"""
1815  return _IMP_core.MonteCarloMover_do_reject(self)
1816 
1817  def do_accept(self):
1818  r"""do_accept(MonteCarloMover self)"""
1819  return _IMP_core.MonteCarloMover_do_accept(self)
1820 
1821  def do_get_outputs(self):
1822  r"""do_get_outputs(MonteCarloMover self) -> IMP::ModelObjectsTemp"""
1823  return _IMP_core.MonteCarloMover_do_get_outputs(self)
1824 
1825  def __str__(self):
1826  r"""__str__(MonteCarloMover self) -> std::string"""
1827  return _IMP_core.MonteCarloMover___str__(self)
1828 
1829  def __repr__(self):
1830  r"""__repr__(MonteCarloMover self) -> std::string"""
1831  return _IMP_core.MonteCarloMover___repr__(self)
1832 
1833  @staticmethod
1834  def get_from(o):
1835  return _object_cast_to_MonteCarloMover(o)
1836 
1837 
1838  def do_show(self, out):
1839  pass
1840 
1841  @staticmethod
1842  def get_from(o):
1843  return _object_cast_to_MonteCarloMover(o)
1844 
1845 
1846  def _get_jax(self):
1847  """Return a JAX implementation of this mover.
1848  Implement this method in a MonteCarloMover subclass to provide
1849  equivalent functionality using [JAX](https://docs.jax.dev/).
1850  See _wrap_jax for more information.
1851  """
1852  raise NotImplementedError(f"No JAX implementation for {self}")
1853 
1854  def _wrap_jax(self, init_func, propose_func, accept_func=None,
1855  sync_func=None, keys=None):
1856  """Create the return value for _get_jax.
1857  Use this method in _get_jax() to wrap the JAX functions
1858  with other mover-specific information.
1859 
1860  @param init_func a JAX function which is used to initialize this
1861  mover. It is called with a single argument, a fresh JAX
1862  random key, and should return a persistent state object.
1863  This object may be the key itself, or any other Python object
1864  that JAX understands.
1865  @param propose_func a JAX function which is called with the current
1866  JAX Model and the mover's persistent state object.
1867  It should return a new JAX Model with the move applied,
1868  a new persistent state, and the proposal ratio. If the move
1869  is rejected then the new JAX Model will be discarded.
1870  However, the mover's persistent state is updated for both
1871  accepted and rejected moves.
1872  @param accept_func if provided, a JAX function which is called
1873  after each accepted Monte Carlo move, with the persistent
1874  state object. It should return a new persistent state.
1875  @param sync_func If provided, a Python function which is called
1876  at the end of a Monte Carlo sampling run to sync mover
1877  data back to IMP. It is called with the persistent state
1878  and the IMP Mover object.
1879  @param keys If given, a set of IMP::Key objects describing Model
1880  attributes (other than xyz and radius) that are altered
1881  by this mover.
1882  """
1883  from IMP.core._jax_util import JAXMoverInfo
1884  return JAXMoverInfo(init_func, propose_func, accept_func, sync_func,
1885  keys)
1886 
1887  __swig_destroy__ = _IMP_core.delete_MonteCarloMover
1888  def __disown__(self):
1889  self.this.disown()
1890  _IMP_core.disown_MonteCarloMover(self)
1891  return weakref.proxy(self)
1892 
1893  def do_destroy(self):
1894  r"""do_destroy(MonteCarloMover self)"""
1895  return _IMP_core.MonteCarloMover_do_destroy(self)
1896 
1897  def handle_set_has_required_score_states(self, arg0):
1898  r"""handle_set_has_required_score_states(MonteCarloMover self, bool arg0)"""
1899  return _IMP_core.MonteCarloMover_handle_set_has_required_score_states(self, arg0)
1900 
1901  def do_get_inputs(self):
1902  r"""do_get_inputs(MonteCarloMover self) -> IMP::ModelObjectsTemp"""
1903  return _IMP_core.MonteCarloMover_do_get_inputs(self)
1904 
1905  def do_get_interactions(self):
1906  r"""do_get_interactions(MonteCarloMover self) -> IMP::ModelObjectsTemps"""
1907  return _IMP_core.MonteCarloMover_do_get_interactions(self)
1908 
1909 # Register MonteCarloMover in _IMP_core:
1910 _IMP_core.MonteCarloMover_swigregister(MonteCarloMover)
1911 class XYZ(IMP.Decorator):
1912  r"""Proxy of C++ IMP::core::XYZ class."""
1913 
1914  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1915 
1916  @staticmethod
1917  def get_coordinate_key(i):
1918  r"""get_coordinate_key(unsigned int i) -> FloatKey"""
1919  return _IMP_core.XYZ_get_coordinate_key(i)
1920 
1921  def __init__(self, *args):
1922  r"""
1923  __init__(XYZ self) -> XYZ
1924  __init__(XYZ self, Model m, ParticleIndex id) -> XYZ
1925  __init__(XYZ self, _ParticleAdaptor d) -> XYZ
1926  """
1927  _IMP_core.XYZ_swiginit(self, _IMP_core.new_XYZ(*args))
1928 
1929  def show(self, *args):
1930  r"""show(XYZ self, _ostream out=std::cout)"""
1931  return _IMP_core.XYZ_show(self, *args)
1932 
1933  @staticmethod
1934  def setup_particle(*args):
1935  r"""
1936  setup_particle(Model m, ParticleIndex pi) -> XYZ
1937  setup_particle(_ParticleAdaptor pa) -> XYZ
1938  setup_particle(Model m, ParticleIndex pi, Vector3D v) -> XYZ
1939  setup_particle(_ParticleAdaptor pa, Vector3D v) -> XYZ
1940  """
1941  return _IMP_core.XYZ_setup_particle(*args)
1942 
1943  def get_x(self):
1944  r"""get_x(XYZ self) -> IMP::Float"""
1945  return _IMP_core.XYZ_get_x(self)
1946 
1947  def set_x(self, t):
1948  r"""set_x(XYZ self, IMP::Float t)"""
1949  return _IMP_core.XYZ_set_x(self, t)
1950 
1951  def get_y(self):
1952  r"""get_y(XYZ self) -> IMP::Float"""
1953  return _IMP_core.XYZ_get_y(self)
1954 
1955  def set_y(self, t):
1956  r"""set_y(XYZ self, IMP::Float t)"""
1957  return _IMP_core.XYZ_set_y(self, t)
1958 
1959  def get_z(self):
1960  r"""get_z(XYZ self) -> IMP::Float"""
1961  return _IMP_core.XYZ_get_z(self)
1962 
1963  def set_z(self, t):
1964  r"""set_z(XYZ self, IMP::Float t)"""
1965  return _IMP_core.XYZ_set_z(self, t)
1966 
1967  def set_coordinate(self, i, v):
1968  r"""set_coordinate(XYZ self, unsigned int i, IMP::Float v)"""
1969  return _IMP_core.XYZ_set_coordinate(self, i, v)
1970 
1971  def set_coordinates(self, v):
1972  r"""set_coordinates(XYZ self, Vector3D v)"""
1973  return _IMP_core.XYZ_set_coordinates(self, v)
1974 
1975  def get_coordinate(self, i):
1976  r"""get_coordinate(XYZ self, int i) -> IMP::Float"""
1977  return _IMP_core.XYZ_get_coordinate(self, i)
1978 
1979  def add_to_derivatives(self, v, d):
1980  r"""add_to_derivatives(XYZ self, Vector3D v, DerivativeAccumulator d)"""
1981  return _IMP_core.XYZ_add_to_derivatives(self, v, d)
1982 
1983  def get_coordinates_are_optimized(self):
1984  r"""get_coordinates_are_optimized(XYZ self) -> bool"""
1985  return _IMP_core.XYZ_get_coordinates_are_optimized(self)
1986 
1987  def set_coordinates_are_optimized(self, tf):
1988  r"""set_coordinates_are_optimized(XYZ self, bool tf)"""
1989  return _IMP_core.XYZ_set_coordinates_are_optimized(self, tf)
1990 
1991  def get_vector_to(self, b):
1992  r"""get_vector_to(XYZ self, XYZ b) -> Vector3D"""
1993  return _IMP_core.XYZ_get_vector_to(self, b)
1994 
1995  def get_coordinates(self):
1996  r"""get_coordinates(XYZ self) -> Vector3D"""
1997  return _IMP_core.XYZ_get_coordinates(self)
1998 
1999  def get_derivatives(self):
2000  r"""get_derivatives(XYZ self) -> Vector3D"""
2001  return _IMP_core.XYZ_get_derivatives(self)
2002 
2003  @staticmethod
2004  def get_is_setup(*args):
2005  r"""
2006  get_is_setup(_ParticleAdaptor p) -> bool
2007  get_is_setup(Model m, ParticleIndex pi) -> bool
2008  """
2009  return _IMP_core.XYZ_get_is_setup(*args)
2010 
2011  @staticmethod
2012  def get_xyz_keys():
2013  r"""get_xyz_keys() -> IMP::FloatKeys const &"""
2014  return _IMP_core.XYZ_get_xyz_keys()
2015 
2016  def add_attribute(self, *args):
2017  r"""
2018  add_attribute(XYZ self, FloatKey k, IMP::Float v, bool opt)
2019  add_attribute(XYZ self, FloatKey a0, IMP::Float a1)
2020  add_attribute(XYZ self, IntKey a0, IMP::Int a1)
2021  add_attribute(XYZ self, FloatsKey a0, IMP::Floats a1)
2022  add_attribute(XYZ self, IntsKey a0, IMP::Ints a1)
2023  add_attribute(XYZ self, StringKey a0, IMP::String a1)
2024  add_attribute(XYZ self, ParticleIndexKey a0, Particle a1)
2025  add_attribute(XYZ self, ObjectKey a0, Object a1)
2026  add_attribute(XYZ self, SparseFloatKey a0, IMP::Float a1)
2027  add_attribute(XYZ self, SparseIntKey a0, IMP::Int a1)
2028  add_attribute(XYZ self, SparseStringKey a0, IMP::String a1)
2029  add_attribute(XYZ self, SparseParticleIndexKey a0, ParticleIndex a1)
2030  """
2031  return _IMP_core.XYZ_add_attribute(self, *args)
2032 
2033  def get_value(self, *args):
2034  r"""
2035  get_value(XYZ self, FloatKey a0) -> IMP::Float
2036  get_value(XYZ self, IntKey a0) -> IMP::Int
2037  get_value(XYZ self, FloatsKey a0) -> IMP::Floats
2038  get_value(XYZ self, IntsKey a0) -> IMP::Ints
2039  get_value(XYZ self, StringKey a0) -> IMP::String
2040  get_value(XYZ self, ParticleIndexKey a0) -> Particle
2041  get_value(XYZ self, ObjectKey a0) -> Object
2042  get_value(XYZ self, SparseFloatKey a0) -> IMP::Float
2043  get_value(XYZ self, SparseIntKey a0) -> IMP::Int
2044  get_value(XYZ self, SparseStringKey a0) -> IMP::String
2045  get_value(XYZ self, SparseParticleIndexKey a0) -> ParticleIndex
2046  """
2047  return _IMP_core.XYZ_get_value(self, *args)
2048 
2049  def set_value(self, *args):
2050  r"""
2051  set_value(XYZ self, FloatKey a0, IMP::Float a1)
2052  set_value(XYZ self, IntKey a0, IMP::Int a1)
2053  set_value(XYZ self, FloatsKey a0, IMP::Floats a1)
2054  set_value(XYZ self, IntsKey a0, IMP::Ints a1)
2055  set_value(XYZ self, StringKey a0, IMP::String a1)
2056  set_value(XYZ self, ParticleIndexKey a0, Particle a1)
2057  set_value(XYZ self, ObjectKey a0, Object a1)
2058  set_value(XYZ self, SparseFloatKey a0, IMP::Float a1)
2059  set_value(XYZ self, SparseIntKey a0, IMP::Int a1)
2060  set_value(XYZ self, SparseStringKey a0, IMP::String a1)
2061  set_value(XYZ self, SparseParticleIndexKey a0, ParticleIndex a1)
2062  """
2063  return _IMP_core.XYZ_set_value(self, *args)
2064 
2065  def remove_attribute(self, *args):
2066  r"""
2067  remove_attribute(XYZ self, FloatKey a0)
2068  remove_attribute(XYZ self, IntKey a0)
2069  remove_attribute(XYZ self, FloatsKey a0)
2070  remove_attribute(XYZ self, IntsKey a0)
2071  remove_attribute(XYZ self, StringKey a0)
2072  remove_attribute(XYZ self, ParticleIndexKey a0)
2073  remove_attribute(XYZ self, ObjectKey a0)
2074  remove_attribute(XYZ self, SparseFloatKey a0)
2075  remove_attribute(XYZ self, SparseIntKey a0)
2076  remove_attribute(XYZ self, SparseStringKey a0)
2077  remove_attribute(XYZ self, SparseParticleIndexKey a0)
2078  """
2079  return _IMP_core.XYZ_remove_attribute(self, *args)
2080 
2081  def has_attribute(self, *args):
2082  r"""
2083  has_attribute(XYZ self, FloatKey a0) -> bool
2084  has_attribute(XYZ self, IntKey a0) -> bool
2085  has_attribute(XYZ self, FloatsKey a0) -> bool
2086  has_attribute(XYZ self, IntsKey a0) -> bool
2087  has_attribute(XYZ self, StringKey a0) -> bool
2088  has_attribute(XYZ self, ParticleIndexKey a0) -> bool
2089  has_attribute(XYZ self, ObjectKey a0) -> bool
2090  has_attribute(XYZ self, SparseFloatKey a0) -> bool
2091  has_attribute(XYZ self, SparseIntKey a0) -> bool
2092  has_attribute(XYZ self, SparseStringKey a0) -> bool
2093  has_attribute(XYZ self, SparseParticleIndexKey a0) -> bool
2094  """
2095  return _IMP_core.XYZ_has_attribute(self, *args)
2096 
2097  def get_derivative(self, *args):
2098  r"""
2099  get_derivative(XYZ self, int i) -> IMP::Float
2100  get_derivative(XYZ self, FloatKey a0) -> double
2101  """
2102  return _IMP_core.XYZ_get_derivative(self, *args)
2103 
2104  def get_name(self):
2105  r"""get_name(XYZ self) -> std::string"""
2106  return _IMP_core.XYZ_get_name(self)
2107 
2108  def clear_caches(self):
2109  r"""clear_caches(XYZ self)"""
2110  return _IMP_core.XYZ_clear_caches(self)
2111 
2112  def set_name(self, a0):
2113  r"""set_name(XYZ self, std::string a0)"""
2114  return _IMP_core.XYZ_set_name(self, a0)
2115 
2116  def set_check_level(self, a0):
2117  r"""set_check_level(XYZ self, IMP::CheckLevel a0)"""
2118  return _IMP_core.XYZ_set_check_level(self, a0)
2119 
2120  def add_to_derivative(self, *args):
2121  r"""
2122  add_to_derivative(XYZ self, int i, IMP::Float v, DerivativeAccumulator d)
2123  add_to_derivative(XYZ self, FloatKey a0, double a1, DerivativeAccumulator a2)
2124  """
2125  return _IMP_core.XYZ_add_to_derivative(self, *args)
2126 
2127  def set_is_optimized(self, a0, a1):
2128  r"""set_is_optimized(XYZ self, FloatKey a0, bool a1)"""
2129  return _IMP_core.XYZ_set_is_optimized(self, a0, a1)
2130 
2131  def get_is_optimized(self, a0):
2132  r"""get_is_optimized(XYZ self, FloatKey a0) -> bool"""
2133  return _IMP_core.XYZ_get_is_optimized(self, a0)
2134 
2135  def get_check_level(self):
2136  r"""get_check_level(XYZ self) -> IMP::CheckLevel"""
2137  return _IMP_core.XYZ_get_check_level(self)
2138 
2139  def __eq__(self, *args):
2140  r"""
2141  __eq__(XYZ self, XYZ o) -> bool
2142  __eq__(XYZ self, Particle d) -> bool
2143  """
2144  return _IMP_core.XYZ___eq__(self, *args)
2145 
2146  def __ne__(self, *args):
2147  r"""
2148  __ne__(XYZ self, XYZ o) -> bool
2149  __ne__(XYZ self, Particle d) -> bool
2150  """
2151  return _IMP_core.XYZ___ne__(self, *args)
2152 
2153  def __le__(self, *args):
2154  r"""
2155  __le__(XYZ self, XYZ o) -> bool
2156  __le__(XYZ self, Particle d) -> bool
2157  """
2158  return _IMP_core.XYZ___le__(self, *args)
2159 
2160  def __lt__(self, *args):
2161  r"""
2162  __lt__(XYZ self, XYZ o) -> bool
2163  __lt__(XYZ self, Particle d) -> bool
2164  """
2165  return _IMP_core.XYZ___lt__(self, *args)
2166 
2167  def __ge__(self, *args):
2168  r"""
2169  __ge__(XYZ self, XYZ o) -> bool
2170  __ge__(XYZ self, Particle d) -> bool
2171  """
2172  return _IMP_core.XYZ___ge__(self, *args)
2173 
2174  def __gt__(self, *args):
2175  r"""
2176  __gt__(XYZ self, XYZ o) -> bool
2177  __gt__(XYZ self, Particle d) -> bool
2178  """
2179  return _IMP_core.XYZ___gt__(self, *args)
2180 
2181  def __hash__(self):
2182  r"""__hash__(XYZ self) -> std::size_t"""
2183  return _IMP_core.XYZ___hash__(self)
2184 
2185  def __str__(self):
2186  r"""__str__(XYZ self) -> std::string"""
2187  return _IMP_core.XYZ___str__(self)
2188 
2189  def __repr__(self):
2190  r"""__repr__(XYZ self) -> std::string"""
2191  return _IMP_core.XYZ___repr__(self)
2192 
2193  def _get_as_binary(self):
2194  r"""_get_as_binary(XYZ self) -> PyObject *"""
2195  return _IMP_core.XYZ__get_as_binary(self)
2196 
2197  def _set_from_binary(self, p):
2198  r"""_set_from_binary(XYZ self, PyObject * p)"""
2199  return _IMP_core.XYZ__set_from_binary(self, p)
2200 
2201  def __getstate__(self):
2202  p = self._get_as_binary()
2203  if len(self.__dict__) > 1:
2204  d = self.__dict__.copy()
2205  del d['this']
2206  p = (d, p)
2207  return p
2208 
2209  def __setstate__(self, p):
2210  if not hasattr(self, 'this'):
2211  self.__init__()
2212  if isinstance(p, tuple):
2213  d, p = p
2214  self.__dict__.update(d)
2215  return self._set_from_binary(p)
2216 
2217  __swig_destroy__ = _IMP_core.delete_XYZ
2218 
2219 # Register XYZ in _IMP_core:
2220 _IMP_core.XYZ_swigregister(XYZ)
2221 
2222 def set_vector_geometry(d, v):
2223  r"""set_vector_geometry(XYZ d, Vector3D v)"""
2224  return _IMP_core.set_vector_geometry(d, v)
2225 
2226 def get_vector_geometry(d):
2227  r"""get_vector_geometry(XYZ d) -> Vector3D"""
2228  return _IMP_core.get_vector_geometry(d)
2229 
2230 def get_dihedral(a, b, c, d):
2231  r"""get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d) -> double"""
2232  return _IMP_core.get_dihedral(a, b, c, d)
2233 class XYZR(XYZ):
2234  r"""Proxy of C++ IMP::core::XYZR class."""
2235 
2236  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2237 
2238  def __init__(self, *args):
2239  r"""
2240  __init__(XYZR self) -> XYZR
2241  __init__(XYZR self, Model m, ParticleIndex id) -> XYZR
2242  __init__(XYZR self, _ParticleAdaptor d) -> XYZR
2243  """
2244  _IMP_core.XYZR_swiginit(self, _IMP_core.new_XYZR(*args))
2245 
2246  def show(self, *args):
2247  r"""show(XYZR self, _ostream out=std::cout)"""
2248  return _IMP_core.XYZR_show(self, *args)
2249 
2250  @staticmethod
2251  def setup_particle(*args):
2252  r"""
2253  setup_particle(Model m, ParticleIndex pi) -> XYZR
2254  setup_particle(_ParticleAdaptor pa) -> XYZR
2255  setup_particle(Model m, ParticleIndex pi, IMP::Float radius) -> XYZR
2256  setup_particle(_ParticleAdaptor pa, IMP::Float radius) -> XYZR
2257  setup_particle(Model m, ParticleIndex pi, Sphere3D ball) -> XYZR
2258  setup_particle(_ParticleAdaptor pa, Sphere3D ball) -> XYZR
2259  """
2260  return _IMP_core.XYZR_setup_particle(*args)
2261 
2262  @staticmethod
2263  def get_is_setup(*args):
2264  r"""
2265  get_is_setup(_ParticleAdaptor p) -> bool
2266  get_is_setup(Model m, ParticleIndex pi) -> bool
2267  """
2268  return _IMP_core.XYZR_get_is_setup(*args)
2269 
2270  def get_radius(self):
2271  r"""get_radius(XYZR self) -> double"""
2272  return _IMP_core.XYZR_get_radius(self)
2273 
2274  def set_radius(self, r):
2275  r"""set_radius(XYZR self, double r)"""
2276  return _IMP_core.XYZR_set_radius(self, r)
2277 
2278  def get_sphere(self):
2279  r"""get_sphere(XYZR self) -> Sphere3D"""
2280  return _IMP_core.XYZR_get_sphere(self)
2281 
2282  def set_sphere(self, s):
2283  r"""set_sphere(XYZR self, Sphere3D s)"""
2284  return _IMP_core.XYZR_set_sphere(self, s)
2285 
2286  @staticmethod
2287  def get_radius_key():
2288  r"""get_radius_key() -> FloatKey"""
2289  return _IMP_core.XYZR_get_radius_key()
2290 
2291  def add_to_radius_derivative(self, v, d):
2292  r"""add_to_radius_derivative(XYZR self, double v, DerivativeAccumulator d)"""
2293  return _IMP_core.XYZR_add_to_radius_derivative(self, v, d)
2294 
2295  def add_attribute(self, *args):
2296  r"""
2297  add_attribute(XYZR self, FloatKey k, IMP::Float v, bool opt)
2298  add_attribute(XYZR self, FloatKey a0, IMP::Float a1)
2299  add_attribute(XYZR self, IntKey a0, IMP::Int a1)
2300  add_attribute(XYZR self, FloatsKey a0, IMP::Floats a1)
2301  add_attribute(XYZR self, IntsKey a0, IMP::Ints a1)
2302  add_attribute(XYZR self, StringKey a0, IMP::String a1)
2303  add_attribute(XYZR self, ParticleIndexKey a0, Particle a1)
2304  add_attribute(XYZR self, ObjectKey a0, Object a1)
2305  add_attribute(XYZR self, SparseFloatKey a0, IMP::Float a1)
2306  add_attribute(XYZR self, SparseIntKey a0, IMP::Int a1)
2307  add_attribute(XYZR self, SparseStringKey a0, IMP::String a1)
2308  add_attribute(XYZR self, SparseParticleIndexKey a0, ParticleIndex a1)
2309  """
2310  return _IMP_core.XYZR_add_attribute(self, *args)
2311 
2312  def get_value(self, *args):
2313  r"""
2314  get_value(XYZR self, FloatKey a0) -> IMP::Float
2315  get_value(XYZR self, IntKey a0) -> IMP::Int
2316  get_value(XYZR self, FloatsKey a0) -> IMP::Floats
2317  get_value(XYZR self, IntsKey a0) -> IMP::Ints
2318  get_value(XYZR self, StringKey a0) -> IMP::String
2319  get_value(XYZR self, ParticleIndexKey a0) -> Particle
2320  get_value(XYZR self, ObjectKey a0) -> Object
2321  get_value(XYZR self, SparseFloatKey a0) -> IMP::Float
2322  get_value(XYZR self, SparseIntKey a0) -> IMP::Int
2323  get_value(XYZR self, SparseStringKey a0) -> IMP::String
2324  get_value(XYZR self, SparseParticleIndexKey a0) -> ParticleIndex
2325  """
2326  return _IMP_core.XYZR_get_value(self, *args)
2327 
2328  def set_value(self, *args):
2329  r"""
2330  set_value(XYZR self, FloatKey a0, IMP::Float a1)
2331  set_value(XYZR self, IntKey a0, IMP::Int a1)
2332  set_value(XYZR self, FloatsKey a0, IMP::Floats a1)
2333  set_value(XYZR self, IntsKey a0, IMP::Ints a1)
2334  set_value(XYZR self, StringKey a0, IMP::String a1)
2335  set_value(XYZR self, ParticleIndexKey a0, Particle a1)
2336  set_value(XYZR self, ObjectKey a0, Object a1)
2337  set_value(XYZR self, SparseFloatKey a0, IMP::Float a1)
2338  set_value(XYZR self, SparseIntKey a0, IMP::Int a1)
2339  set_value(XYZR self, SparseStringKey a0, IMP::String a1)
2340  set_value(XYZR self, SparseParticleIndexKey a0, ParticleIndex a1)
2341  """
2342  return _IMP_core.XYZR_set_value(self, *args)
2343 
2344  def remove_attribute(self, *args):
2345  r"""
2346  remove_attribute(XYZR self, FloatKey a0)
2347  remove_attribute(XYZR self, IntKey a0)
2348  remove_attribute(XYZR self, FloatsKey a0)
2349  remove_attribute(XYZR self, IntsKey a0)
2350  remove_attribute(XYZR self, StringKey a0)
2351  remove_attribute(XYZR self, ParticleIndexKey a0)
2352  remove_attribute(XYZR self, ObjectKey a0)
2353  remove_attribute(XYZR self, SparseFloatKey a0)
2354  remove_attribute(XYZR self, SparseIntKey a0)
2355  remove_attribute(XYZR self, SparseStringKey a0)
2356  remove_attribute(XYZR self, SparseParticleIndexKey a0)
2357  """
2358  return _IMP_core.XYZR_remove_attribute(self, *args)
2359 
2360  def has_attribute(self, *args):
2361  r"""
2362  has_attribute(XYZR self, FloatKey a0) -> bool
2363  has_attribute(XYZR self, IntKey a0) -> bool
2364  has_attribute(XYZR self, FloatsKey a0) -> bool
2365  has_attribute(XYZR self, IntsKey a0) -> bool
2366  has_attribute(XYZR self, StringKey a0) -> bool
2367  has_attribute(XYZR self, ParticleIndexKey a0) -> bool
2368  has_attribute(XYZR self, ObjectKey a0) -> bool
2369  has_attribute(XYZR self, SparseFloatKey a0) -> bool
2370  has_attribute(XYZR self, SparseIntKey a0) -> bool
2371  has_attribute(XYZR self, SparseStringKey a0) -> bool
2372  has_attribute(XYZR self, SparseParticleIndexKey a0) -> bool
2373  """
2374  return _IMP_core.XYZR_has_attribute(self, *args)
2375 
2376  def get_derivative(self, a0):
2377  r"""get_derivative(XYZR self, FloatKey a0) -> double"""
2378  return _IMP_core.XYZR_get_derivative(self, a0)
2379 
2380  def get_name(self):
2381  r"""get_name(XYZR self) -> std::string"""
2382  return _IMP_core.XYZR_get_name(self)
2383 
2384  def clear_caches(self):
2385  r"""clear_caches(XYZR self)"""
2386  return _IMP_core.XYZR_clear_caches(self)
2387 
2388  def set_name(self, a0):
2389  r"""set_name(XYZR self, std::string a0)"""
2390  return _IMP_core.XYZR_set_name(self, a0)
2391 
2392  def set_check_level(self, a0):
2393  r"""set_check_level(XYZR self, IMP::CheckLevel a0)"""
2394  return _IMP_core.XYZR_set_check_level(self, a0)
2395 
2396  def add_to_derivative(self, a0, a1, a2):
2397  r"""add_to_derivative(XYZR self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2398  return _IMP_core.XYZR_add_to_derivative(self, a0, a1, a2)
2399 
2400  def set_is_optimized(self, a0, a1):
2401  r"""set_is_optimized(XYZR self, FloatKey a0, bool a1)"""
2402  return _IMP_core.XYZR_set_is_optimized(self, a0, a1)
2403 
2404  def get_is_optimized(self, a0):
2405  r"""get_is_optimized(XYZR self, FloatKey a0) -> bool"""
2406  return _IMP_core.XYZR_get_is_optimized(self, a0)
2407 
2408  def get_check_level(self):
2409  r"""get_check_level(XYZR self) -> IMP::CheckLevel"""
2410  return _IMP_core.XYZR_get_check_level(self)
2411 
2412  def __eq__(self, *args):
2413  r"""
2414  __eq__(XYZR self, XYZR o) -> bool
2415  __eq__(XYZR self, Particle d) -> bool
2416  """
2417  return _IMP_core.XYZR___eq__(self, *args)
2418 
2419  def __ne__(self, *args):
2420  r"""
2421  __ne__(XYZR self, XYZR o) -> bool
2422  __ne__(XYZR self, Particle d) -> bool
2423  """
2424  return _IMP_core.XYZR___ne__(self, *args)
2425 
2426  def __le__(self, *args):
2427  r"""
2428  __le__(XYZR self, XYZR o) -> bool
2429  __le__(XYZR self, Particle d) -> bool
2430  """
2431  return _IMP_core.XYZR___le__(self, *args)
2432 
2433  def __lt__(self, *args):
2434  r"""
2435  __lt__(XYZR self, XYZR o) -> bool
2436  __lt__(XYZR self, Particle d) -> bool
2437  """
2438  return _IMP_core.XYZR___lt__(self, *args)
2439 
2440  def __ge__(self, *args):
2441  r"""
2442  __ge__(XYZR self, XYZR o) -> bool
2443  __ge__(XYZR self, Particle d) -> bool
2444  """
2445  return _IMP_core.XYZR___ge__(self, *args)
2446 
2447  def __gt__(self, *args):
2448  r"""
2449  __gt__(XYZR self, XYZR o) -> bool
2450  __gt__(XYZR self, Particle d) -> bool
2451  """
2452  return _IMP_core.XYZR___gt__(self, *args)
2453 
2454  def __hash__(self):
2455  r"""__hash__(XYZR self) -> std::size_t"""
2456  return _IMP_core.XYZR___hash__(self)
2457 
2458  def __str__(self):
2459  r"""__str__(XYZR self) -> std::string"""
2460  return _IMP_core.XYZR___str__(self)
2461 
2462  def __repr__(self):
2463  r"""__repr__(XYZR self) -> std::string"""
2464  return _IMP_core.XYZR___repr__(self)
2465 
2466  def _get_as_binary(self):
2467  r"""_get_as_binary(XYZR self) -> PyObject *"""
2468  return _IMP_core.XYZR__get_as_binary(self)
2469 
2470  def _set_from_binary(self, p):
2471  r"""_set_from_binary(XYZR self, PyObject * p)"""
2472  return _IMP_core.XYZR__set_from_binary(self, p)
2473 
2474  def __getstate__(self):
2475  p = self._get_as_binary()
2476  if len(self.__dict__) > 1:
2477  d = self.__dict__.copy()
2478  del d['this']
2479  p = (d, p)
2480  return p
2481 
2482  def __setstate__(self, p):
2483  if not hasattr(self, 'this'):
2484  self.__init__()
2485  if isinstance(p, tuple):
2486  d, p = p
2487  self.__dict__.update(d)
2488  return self._set_from_binary(p)
2489 
2490  __swig_destroy__ = _IMP_core.delete_XYZR
2491 
2492 # Register XYZR in _IMP_core:
2493 _IMP_core.XYZR_swigregister(XYZR)
2494 
2495 def set_enclosing_sphere(b, v, slack=0):
2496  r"""set_enclosing_sphere(XYZR b, IMP::core::XYZs const & v, double slack=0)"""
2497  return _IMP_core.set_enclosing_sphere(b, v, slack)
2498 
2499 def set_enclosing_radius(b, v):
2500  r"""set_enclosing_radius(XYZR b, IMP::core::XYZs const & v)"""
2501  return _IMP_core.set_enclosing_radius(b, v)
2502 
2503 def get_enclosing_sphere(v):
2504  r"""get_enclosing_sphere(IMP::core::XYZs const & v) -> Sphere3D"""
2505  return _IMP_core.get_enclosing_sphere(v)
2506 
2507 def create_xyzr_particles(m, num, radius, box_side=10):
2508  r"""create_xyzr_particles(Model m, unsigned int num, IMP::Float radius, IMP::Float box_side=10) -> IMP::core::XYZRs"""
2509  return _IMP_core.create_xyzr_particles(m, num, radius, box_side)
2510 class XYZRGeometry(IMP.display.SingletonGeometry):
2511  r"""Proxy of C++ IMP::core::XYZRGeometry class."""
2512 
2513  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2514 
2515  def __init__(self, *args):
2516  r"""
2517  __init__(XYZRGeometry self, Particle p) -> XYZRGeometry
2518  __init__(XYZRGeometry self, XYZR d) -> XYZRGeometry
2519  """
2520  _IMP_core.XYZRGeometry_swiginit(self, _IMP_core.new_XYZRGeometry(*args))
2521 
2522  def get_version_info(self):
2523  r"""get_version_info(XYZRGeometry self) -> VersionInfo"""
2524  return _IMP_core.XYZRGeometry_get_version_info(self)
2525  __swig_destroy__ = _IMP_core.delete_XYZRGeometry
2526 
2527  def __str__(self):
2528  r"""__str__(XYZRGeometry self) -> std::string"""
2529  return _IMP_core.XYZRGeometry___str__(self)
2530 
2531  def __repr__(self):
2532  r"""__repr__(XYZRGeometry self) -> std::string"""
2533  return _IMP_core.XYZRGeometry___repr__(self)
2534 
2535  @staticmethod
2536  def get_from(o):
2537  return _object_cast_to_XYZRGeometry(o)
2538 
2539 
2540 # Register XYZRGeometry in _IMP_core:
2541 _IMP_core.XYZRGeometry_swigregister(XYZRGeometry)
2542 class XYZRsGeometry(IMP.display.SingletonsGeometry):
2543  r"""Proxy of C++ IMP::core::XYZRsGeometry class."""
2544 
2545  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2546 
2547  def __init__(self, sc):
2548  r"""__init__(XYZRsGeometry self, SingletonContainer sc) -> XYZRsGeometry"""
2549  _IMP_core.XYZRsGeometry_swiginit(self, _IMP_core.new_XYZRsGeometry(sc))
2550 
2551  def get_version_info(self):
2552  r"""get_version_info(XYZRsGeometry self) -> VersionInfo"""
2553  return _IMP_core.XYZRsGeometry_get_version_info(self)
2554  __swig_destroy__ = _IMP_core.delete_XYZRsGeometry
2555 
2556  def __str__(self):
2557  r"""__str__(XYZRsGeometry self) -> std::string"""
2558  return _IMP_core.XYZRsGeometry___str__(self)
2559 
2560  def __repr__(self):
2561  r"""__repr__(XYZRsGeometry self) -> std::string"""
2562  return _IMP_core.XYZRsGeometry___repr__(self)
2563 
2564  @staticmethod
2565  def get_from(o):
2566  return _object_cast_to_XYZRsGeometry(o)
2567 
2568 
2569 # Register XYZRsGeometry in _IMP_core:
2570 _IMP_core.XYZRsGeometry_swigregister(XYZRsGeometry)
2571 class XYZDerivativeGeometry(IMP.display.SingletonGeometry):
2572  r"""Proxy of C++ IMP::core::XYZDerivativeGeometry class."""
2573 
2574  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2575 
2576  def __init__(self, *args):
2577  r"""
2578  __init__(XYZDerivativeGeometry self, Particle p) -> XYZDerivativeGeometry
2579  __init__(XYZDerivativeGeometry self, XYZ d) -> XYZDerivativeGeometry
2580  """
2581  _IMP_core.XYZDerivativeGeometry_swiginit(self, _IMP_core.new_XYZDerivativeGeometry(*args))
2582 
2583  def get_version_info(self):
2584  r"""get_version_info(XYZDerivativeGeometry self) -> VersionInfo"""
2585  return _IMP_core.XYZDerivativeGeometry_get_version_info(self)
2586  __swig_destroy__ = _IMP_core.delete_XYZDerivativeGeometry
2587 
2588  def __str__(self):
2589  r"""__str__(XYZDerivativeGeometry self) -> std::string"""
2590  return _IMP_core.XYZDerivativeGeometry___str__(self)
2591 
2592  def __repr__(self):
2593  r"""__repr__(XYZDerivativeGeometry self) -> std::string"""
2594  return _IMP_core.XYZDerivativeGeometry___repr__(self)
2595 
2596  @staticmethod
2597  def get_from(o):
2598  return _object_cast_to_XYZDerivativeGeometry(o)
2599 
2600 
2601 # Register XYZDerivativeGeometry in _IMP_core:
2602 _IMP_core.XYZDerivativeGeometry_swigregister(XYZDerivativeGeometry)
2603 class XYZDerivativesGeometry(IMP.display.SingletonsGeometry):
2604  r"""Proxy of C++ IMP::core::XYZDerivativesGeometry class."""
2605 
2606  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2607 
2608  def __init__(self, sc):
2609  r"""__init__(XYZDerivativesGeometry self, SingletonContainer sc) -> XYZDerivativesGeometry"""
2610  _IMP_core.XYZDerivativesGeometry_swiginit(self, _IMP_core.new_XYZDerivativesGeometry(sc))
2611 
2612  def get_version_info(self):
2613  r"""get_version_info(XYZDerivativesGeometry self) -> VersionInfo"""
2614  return _IMP_core.XYZDerivativesGeometry_get_version_info(self)
2615  __swig_destroy__ = _IMP_core.delete_XYZDerivativesGeometry
2616 
2617  def __str__(self):
2618  r"""__str__(XYZDerivativesGeometry self) -> std::string"""
2619  return _IMP_core.XYZDerivativesGeometry___str__(self)
2620 
2621  def __repr__(self):
2622  r"""__repr__(XYZDerivativesGeometry self) -> std::string"""
2623  return _IMP_core.XYZDerivativesGeometry___repr__(self)
2624 
2625  @staticmethod
2626  def get_from(o):
2627  return _object_cast_to_XYZDerivativesGeometry(o)
2628 
2629 
2630 # Register XYZDerivativesGeometry in _IMP_core:
2631 _IMP_core.XYZDerivativesGeometry_swigregister(XYZDerivativesGeometry)
2632 class EdgePairGeometry(IMP.display.PairGeometry):
2633  r"""Proxy of C++ IMP::core::EdgePairGeometry class."""
2634 
2635  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2636 
2637  def __init__(self, pp):
2638  r"""__init__(EdgePairGeometry self, IMP::ParticlePair const & pp) -> EdgePairGeometry"""
2639  _IMP_core.EdgePairGeometry_swiginit(self, _IMP_core.new_EdgePairGeometry(pp))
2640 
2641  def get_version_info(self):
2642  r"""get_version_info(EdgePairGeometry self) -> VersionInfo"""
2643  return _IMP_core.EdgePairGeometry_get_version_info(self)
2644  __swig_destroy__ = _IMP_core.delete_EdgePairGeometry
2645 
2646  def __str__(self):
2647  r"""__str__(EdgePairGeometry self) -> std::string"""
2648  return _IMP_core.EdgePairGeometry___str__(self)
2649 
2650  def __repr__(self):
2651  r"""__repr__(EdgePairGeometry self) -> std::string"""
2652  return _IMP_core.EdgePairGeometry___repr__(self)
2653 
2654  @staticmethod
2655  def get_from(o):
2656  return _object_cast_to_EdgePairGeometry(o)
2657 
2658 
2659 # Register EdgePairGeometry in _IMP_core:
2660 _IMP_core.EdgePairGeometry_swigregister(EdgePairGeometry)
2661 class EdgePairsGeometry(IMP.display.PairsGeometry):
2662  r"""Proxy of C++ IMP::core::EdgePairsGeometry class."""
2663 
2664  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2665 
2666  def __init__(self, sc):
2667  r"""__init__(EdgePairsGeometry self, PairContainer sc) -> EdgePairsGeometry"""
2668  _IMP_core.EdgePairsGeometry_swiginit(self, _IMP_core.new_EdgePairsGeometry(sc))
2669 
2670  def get_version_info(self):
2671  r"""get_version_info(EdgePairsGeometry self) -> VersionInfo"""
2672  return _IMP_core.EdgePairsGeometry_get_version_info(self)
2673  __swig_destroy__ = _IMP_core.delete_EdgePairsGeometry
2674 
2675  def __str__(self):
2676  r"""__str__(EdgePairsGeometry self) -> std::string"""
2677  return _IMP_core.EdgePairsGeometry___str__(self)
2678 
2679  def __repr__(self):
2680  r"""__repr__(EdgePairsGeometry self) -> std::string"""
2681  return _IMP_core.EdgePairsGeometry___repr__(self)
2682 
2683  @staticmethod
2684  def get_from(o):
2685  return _object_cast_to_EdgePairsGeometry(o)
2686 
2687 
2688 # Register EdgePairsGeometry in _IMP_core:
2689 _IMP_core.EdgePairsGeometry_swigregister(EdgePairsGeometry)
2690 class Direction(IMP.Decorator):
2691  r"""Proxy of C++ IMP::core::Direction class."""
2692 
2693  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2694 
2695  @staticmethod
2696  def do_setup_particle(m, pi, v):
2697  r"""do_setup_particle(Model m, ParticleIndex pi, Vector3D v)"""
2698  return _IMP_core.Direction_do_setup_particle(m, pi, v)
2699 
2700  def __init__(self, *args):
2701  r"""
2702  __init__(Direction self) -> Direction
2703  __init__(Direction self, Model m, ParticleIndex id) -> Direction
2704  __init__(Direction self, _ParticleAdaptor d) -> Direction
2705  """
2706  _IMP_core.Direction_swiginit(self, _IMP_core.new_Direction(*args))
2707 
2708  def show(self, *args):
2709  r"""show(Direction self, _ostream out=std::cout)"""
2710  return _IMP_core.Direction_show(self, *args)
2711 
2712  @staticmethod
2713  def setup_particle(*args):
2714  r"""
2715  setup_particle(Model m, ParticleIndex pi, Vector3D v) -> Direction
2716  setup_particle(_ParticleAdaptor pa, Vector3D v) -> Direction
2717  """
2718  return _IMP_core.Direction_setup_particle(*args)
2719 
2720  @staticmethod
2721  def get_is_setup(*args):
2722  r"""
2723  get_is_setup(_ParticleAdaptor p) -> bool
2724  get_is_setup(Model m, ParticleIndex pi) -> bool
2725  """
2726  return _IMP_core.Direction_get_is_setup(*args)
2727 
2728  @staticmethod
2729  def get_direction_key(i):
2730  r"""get_direction_key(unsigned int i) -> FloatKey"""
2731  return _IMP_core.Direction_get_direction_key(i)
2732 
2733  def get_direction_derivative(self, i):
2734  r"""get_direction_derivative(Direction self, int i) -> IMP::Float"""
2735  return _IMP_core.Direction_get_direction_derivative(self, i)
2736 
2737  def get_direction_derivatives(self):
2738  r"""get_direction_derivatives(Direction self) -> Vector3D"""
2739  return _IMP_core.Direction_get_direction_derivatives(self)
2740 
2741  def add_to_direction_derivative(self, i, v, d):
2742  r"""add_to_direction_derivative(Direction self, int i, IMP::Float v, DerivativeAccumulator d)"""
2743  return _IMP_core.Direction_add_to_direction_derivative(self, i, v, d)
2744 
2745  def add_to_direction_derivatives(self, v, d):
2746  r"""add_to_direction_derivatives(Direction self, Vector3D v, DerivativeAccumulator d)"""
2747  return _IMP_core.Direction_add_to_direction_derivatives(self, v, d)
2748 
2749  def get_direction_is_optimized(self):
2750  r"""get_direction_is_optimized(Direction self) -> bool"""
2751  return _IMP_core.Direction_get_direction_is_optimized(self)
2752 
2753  def set_direction_is_optimized(self, tf):
2754  r"""set_direction_is_optimized(Direction self, bool tf)"""
2755  return _IMP_core.Direction_set_direction_is_optimized(self, tf)
2756 
2757  def get_direction(self):
2758  r"""get_direction(Direction self) -> Vector3D"""
2759  return _IMP_core.Direction_get_direction(self)
2760 
2761  def set_direction(self, v):
2762  r"""set_direction(Direction self, Vector3D v)"""
2763  return _IMP_core.Direction_set_direction(self, v)
2764 
2765  def reflect(self):
2766  r"""reflect(Direction self)"""
2767  return _IMP_core.Direction_reflect(self)
2768 
2769  def add_attribute(self, *args):
2770  r"""
2771  add_attribute(Direction self, FloatKey k, IMP::Float v, bool opt)
2772  add_attribute(Direction self, FloatKey a0, IMP::Float a1)
2773  add_attribute(Direction self, IntKey a0, IMP::Int a1)
2774  add_attribute(Direction self, FloatsKey a0, IMP::Floats a1)
2775  add_attribute(Direction self, IntsKey a0, IMP::Ints a1)
2776  add_attribute(Direction self, StringKey a0, IMP::String a1)
2777  add_attribute(Direction self, ParticleIndexKey a0, Particle a1)
2778  add_attribute(Direction self, ObjectKey a0, Object a1)
2779  add_attribute(Direction self, SparseFloatKey a0, IMP::Float a1)
2780  add_attribute(Direction self, SparseIntKey a0, IMP::Int a1)
2781  add_attribute(Direction self, SparseStringKey a0, IMP::String a1)
2782  add_attribute(Direction self, SparseParticleIndexKey a0, ParticleIndex a1)
2783  """
2784  return _IMP_core.Direction_add_attribute(self, *args)
2785 
2786  def get_value(self, *args):
2787  r"""
2788  get_value(Direction self, FloatKey a0) -> IMP::Float
2789  get_value(Direction self, IntKey a0) -> IMP::Int
2790  get_value(Direction self, FloatsKey a0) -> IMP::Floats
2791  get_value(Direction self, IntsKey a0) -> IMP::Ints
2792  get_value(Direction self, StringKey a0) -> IMP::String
2793  get_value(Direction self, ParticleIndexKey a0) -> Particle
2794  get_value(Direction self, ObjectKey a0) -> Object
2795  get_value(Direction self, SparseFloatKey a0) -> IMP::Float
2796  get_value(Direction self, SparseIntKey a0) -> IMP::Int
2797  get_value(Direction self, SparseStringKey a0) -> IMP::String
2798  get_value(Direction self, SparseParticleIndexKey a0) -> ParticleIndex
2799  """
2800  return _IMP_core.Direction_get_value(self, *args)
2801 
2802  def set_value(self, *args):
2803  r"""
2804  set_value(Direction self, FloatKey a0, IMP::Float a1)
2805  set_value(Direction self, IntKey a0, IMP::Int a1)
2806  set_value(Direction self, FloatsKey a0, IMP::Floats a1)
2807  set_value(Direction self, IntsKey a0, IMP::Ints a1)
2808  set_value(Direction self, StringKey a0, IMP::String a1)
2809  set_value(Direction self, ParticleIndexKey a0, Particle a1)
2810  set_value(Direction self, ObjectKey a0, Object a1)
2811  set_value(Direction self, SparseFloatKey a0, IMP::Float a1)
2812  set_value(Direction self, SparseIntKey a0, IMP::Int a1)
2813  set_value(Direction self, SparseStringKey a0, IMP::String a1)
2814  set_value(Direction self, SparseParticleIndexKey a0, ParticleIndex a1)
2815  """
2816  return _IMP_core.Direction_set_value(self, *args)
2817 
2818  def remove_attribute(self, *args):
2819  r"""
2820  remove_attribute(Direction self, FloatKey a0)
2821  remove_attribute(Direction self, IntKey a0)
2822  remove_attribute(Direction self, FloatsKey a0)
2823  remove_attribute(Direction self, IntsKey a0)
2824  remove_attribute(Direction self, StringKey a0)
2825  remove_attribute(Direction self, ParticleIndexKey a0)
2826  remove_attribute(Direction self, ObjectKey a0)
2827  remove_attribute(Direction self, SparseFloatKey a0)
2828  remove_attribute(Direction self, SparseIntKey a0)
2829  remove_attribute(Direction self, SparseStringKey a0)
2830  remove_attribute(Direction self, SparseParticleIndexKey a0)
2831  """
2832  return _IMP_core.Direction_remove_attribute(self, *args)
2833 
2834  def has_attribute(self, *args):
2835  r"""
2836  has_attribute(Direction self, FloatKey a0) -> bool
2837  has_attribute(Direction self, IntKey a0) -> bool
2838  has_attribute(Direction self, FloatsKey a0) -> bool
2839  has_attribute(Direction self, IntsKey a0) -> bool
2840  has_attribute(Direction self, StringKey a0) -> bool
2841  has_attribute(Direction self, ParticleIndexKey a0) -> bool
2842  has_attribute(Direction self, ObjectKey a0) -> bool
2843  has_attribute(Direction self, SparseFloatKey a0) -> bool
2844  has_attribute(Direction self, SparseIntKey a0) -> bool
2845  has_attribute(Direction self, SparseStringKey a0) -> bool
2846  has_attribute(Direction self, SparseParticleIndexKey a0) -> bool
2847  """
2848  return _IMP_core.Direction_has_attribute(self, *args)
2849 
2850  def get_derivative(self, a0):
2851  r"""get_derivative(Direction self, FloatKey a0) -> double"""
2852  return _IMP_core.Direction_get_derivative(self, a0)
2853 
2854  def get_name(self):
2855  r"""get_name(Direction self) -> std::string"""
2856  return _IMP_core.Direction_get_name(self)
2857 
2858  def clear_caches(self):
2859  r"""clear_caches(Direction self)"""
2860  return _IMP_core.Direction_clear_caches(self)
2861 
2862  def set_name(self, a0):
2863  r"""set_name(Direction self, std::string a0)"""
2864  return _IMP_core.Direction_set_name(self, a0)
2865 
2866  def set_check_level(self, a0):
2867  r"""set_check_level(Direction self, IMP::CheckLevel a0)"""
2868  return _IMP_core.Direction_set_check_level(self, a0)
2869 
2870  def add_to_derivative(self, a0, a1, a2):
2871  r"""add_to_derivative(Direction self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2872  return _IMP_core.Direction_add_to_derivative(self, a0, a1, a2)
2873 
2874  def set_is_optimized(self, a0, a1):
2875  r"""set_is_optimized(Direction self, FloatKey a0, bool a1)"""
2876  return _IMP_core.Direction_set_is_optimized(self, a0, a1)
2877 
2878  def get_is_optimized(self, a0):
2879  r"""get_is_optimized(Direction self, FloatKey a0) -> bool"""
2880  return _IMP_core.Direction_get_is_optimized(self, a0)
2881 
2882  def get_check_level(self):
2883  r"""get_check_level(Direction self) -> IMP::CheckLevel"""
2884  return _IMP_core.Direction_get_check_level(self)
2885 
2886  def __eq__(self, *args):
2887  r"""
2888  __eq__(Direction self, Direction o) -> bool
2889  __eq__(Direction self, Particle d) -> bool
2890  """
2891  return _IMP_core.Direction___eq__(self, *args)
2892 
2893  def __ne__(self, *args):
2894  r"""
2895  __ne__(Direction self, Direction o) -> bool
2896  __ne__(Direction self, Particle d) -> bool
2897  """
2898  return _IMP_core.Direction___ne__(self, *args)
2899 
2900  def __le__(self, *args):
2901  r"""
2902  __le__(Direction self, Direction o) -> bool
2903  __le__(Direction self, Particle d) -> bool
2904  """
2905  return _IMP_core.Direction___le__(self, *args)
2906 
2907  def __lt__(self, *args):
2908  r"""
2909  __lt__(Direction self, Direction o) -> bool
2910  __lt__(Direction self, Particle d) -> bool
2911  """
2912  return _IMP_core.Direction___lt__(self, *args)
2913 
2914  def __ge__(self, *args):
2915  r"""
2916  __ge__(Direction self, Direction o) -> bool
2917  __ge__(Direction self, Particle d) -> bool
2918  """
2919  return _IMP_core.Direction___ge__(self, *args)
2920 
2921  def __gt__(self, *args):
2922  r"""
2923  __gt__(Direction self, Direction o) -> bool
2924  __gt__(Direction self, Particle d) -> bool
2925  """
2926  return _IMP_core.Direction___gt__(self, *args)
2927 
2928  def __hash__(self):
2929  r"""__hash__(Direction self) -> std::size_t"""
2930  return _IMP_core.Direction___hash__(self)
2931 
2932  def __str__(self):
2933  r"""__str__(Direction self) -> std::string"""
2934  return _IMP_core.Direction___str__(self)
2935 
2936  def __repr__(self):
2937  r"""__repr__(Direction self) -> std::string"""
2938  return _IMP_core.Direction___repr__(self)
2939 
2940  def _get_as_binary(self):
2941  r"""_get_as_binary(Direction self) -> PyObject *"""
2942  return _IMP_core.Direction__get_as_binary(self)
2943 
2944  def _set_from_binary(self, p):
2945  r"""_set_from_binary(Direction self, PyObject * p)"""
2946  return _IMP_core.Direction__set_from_binary(self, p)
2947 
2948  def __getstate__(self):
2949  p = self._get_as_binary()
2950  if len(self.__dict__) > 1:
2951  d = self.__dict__.copy()
2952  del d['this']
2953  p = (d, p)
2954  return p
2955 
2956  def __setstate__(self, p):
2957  if not hasattr(self, 'this'):
2958  self.__init__()
2959  if isinstance(p, tuple):
2960  d, p = p
2961  self.__dict__.update(d)
2962  return self._set_from_binary(p)
2963 
2964  __swig_destroy__ = _IMP_core.delete_Direction
2965 
2966 # Register Direction in _IMP_core:
2967 _IMP_core.Direction_swigregister(Direction)
2968 
2969 def get_angle(a, b):
2970  r"""get_angle(Direction a, Direction b) -> double"""
2971  return _IMP_core.get_angle(a, b)
2972 class DirectionAngle(IMP.Decorator):
2973  r"""Proxy of C++ IMP::core::DirectionAngle class."""
2974 
2975  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2976 
2977  def __init__(self, *args):
2978  r"""
2979  __init__(DirectionAngle self) -> DirectionAngle
2980  __init__(DirectionAngle self, Model m, ParticleIndex id) -> DirectionAngle
2981  __init__(DirectionAngle self, _ParticleAdaptor d) -> DirectionAngle
2982  """
2983  _IMP_core.DirectionAngle_swiginit(self, _IMP_core.new_DirectionAngle(*args))
2984 
2985  def show(self, *args):
2986  r"""show(DirectionAngle self, _ostream out=std::cout)"""
2987  return _IMP_core.DirectionAngle_show(self, *args)
2988 
2989  @staticmethod
2990  def setup_particle(*args):
2991  r"""
2992  setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexPair ds) -> DirectionAngle
2993  setup_particle(_ParticleAdaptor pa, IMP::ParticleIndexPair ds) -> DirectionAngle
2994  setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor d0, _ParticleIndexAdaptor d1) -> DirectionAngle
2995  setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor d0, _ParticleIndexAdaptor d1) -> DirectionAngle
2996  """
2997  return _IMP_core.DirectionAngle_setup_particle(*args)
2998 
2999  @staticmethod
3000  def get_is_setup(*args):
3001  r"""
3002  get_is_setup(_ParticleAdaptor p) -> bool
3003  get_is_setup(Model m, ParticleIndex pi) -> bool
3004  """
3005  return _IMP_core.DirectionAngle_get_is_setup(*args)
3006 
3007  @staticmethod
3008  def get_angle_key():
3009  r"""get_angle_key() -> FloatKey"""
3010  return _IMP_core.DirectionAngle_get_angle_key()
3011 
3012  @staticmethod
3013  def get_particle_key(i):
3014  r"""get_particle_key(unsigned int i) -> ParticleIndexKey"""
3015  return _IMP_core.DirectionAngle_get_particle_key(i)
3016 
3017  def get_particle(self, *args):
3018  r"""
3019  get_particle(DirectionAngle self, unsigned int i) -> Particle
3020  get_particle(DirectionAngle self) -> Particle
3021  """
3022  return _IMP_core.DirectionAngle_get_particle(self, *args)
3023 
3024  def get_particle_index(self, *args):
3025  r"""
3026  get_particle_index(DirectionAngle self, unsigned int i) -> ParticleIndex
3027  get_particle_index(DirectionAngle self) -> ParticleIndex
3028  """
3029  return _IMP_core.DirectionAngle_get_particle_index(self, *args)
3030 
3031  def get_angle(self):
3032  r"""get_angle(DirectionAngle self) -> IMP::Float"""
3033  return _IMP_core.DirectionAngle_get_angle(self)
3034 
3035  def get_angle_derivative(self):
3036  r"""get_angle_derivative(DirectionAngle self) -> IMP::Float"""
3037  return _IMP_core.DirectionAngle_get_angle_derivative(self)
3038 
3039  def add_to_angle_derivative(self, v, d):
3040  r"""add_to_angle_derivative(DirectionAngle self, IMP::Float v, DerivativeAccumulator d)"""
3041  return _IMP_core.DirectionAngle_add_to_angle_derivative(self, v, d)
3042 
3043  def add_attribute(self, *args):
3044  r"""
3045  add_attribute(DirectionAngle self, FloatKey k, IMP::Float v, bool opt)
3046  add_attribute(DirectionAngle self, FloatKey a0, IMP::Float a1)
3047  add_attribute(DirectionAngle self, IntKey a0, IMP::Int a1)
3048  add_attribute(DirectionAngle self, FloatsKey a0, IMP::Floats a1)
3049  add_attribute(DirectionAngle self, IntsKey a0, IMP::Ints a1)
3050  add_attribute(DirectionAngle self, StringKey a0, IMP::String a1)
3051  add_attribute(DirectionAngle self, ParticleIndexKey a0, Particle a1)
3052  add_attribute(DirectionAngle self, ObjectKey a0, Object a1)
3053  add_attribute(DirectionAngle self, SparseFloatKey a0, IMP::Float a1)
3054  add_attribute(DirectionAngle self, SparseIntKey a0, IMP::Int a1)
3055  add_attribute(DirectionAngle self, SparseStringKey a0, IMP::String a1)
3056  add_attribute(DirectionAngle self, SparseParticleIndexKey a0, ParticleIndex a1)
3057  """
3058  return _IMP_core.DirectionAngle_add_attribute(self, *args)
3059 
3060  def get_value(self, *args):
3061  r"""
3062  get_value(DirectionAngle self, FloatKey a0) -> IMP::Float
3063  get_value(DirectionAngle self, IntKey a0) -> IMP::Int
3064  get_value(DirectionAngle self, FloatsKey a0) -> IMP::Floats
3065  get_value(DirectionAngle self, IntsKey a0) -> IMP::Ints
3066  get_value(DirectionAngle self, StringKey a0) -> IMP::String
3067  get_value(DirectionAngle self, ParticleIndexKey a0) -> Particle
3068  get_value(DirectionAngle self, ObjectKey a0) -> Object
3069  get_value(DirectionAngle self, SparseFloatKey a0) -> IMP::Float
3070  get_value(DirectionAngle self, SparseIntKey a0) -> IMP::Int
3071  get_value(DirectionAngle self, SparseStringKey a0) -> IMP::String
3072  get_value(DirectionAngle self, SparseParticleIndexKey a0) -> ParticleIndex
3073  """
3074  return _IMP_core.DirectionAngle_get_value(self, *args)
3075 
3076  def set_value(self, *args):
3077  r"""
3078  set_value(DirectionAngle self, FloatKey a0, IMP::Float a1)
3079  set_value(DirectionAngle self, IntKey a0, IMP::Int a1)
3080  set_value(DirectionAngle self, FloatsKey a0, IMP::Floats a1)
3081  set_value(DirectionAngle self, IntsKey a0, IMP::Ints a1)
3082  set_value(DirectionAngle self, StringKey a0, IMP::String a1)
3083  set_value(DirectionAngle self, ParticleIndexKey a0, Particle a1)
3084  set_value(DirectionAngle self, ObjectKey a0, Object a1)
3085  set_value(DirectionAngle self, SparseFloatKey a0, IMP::Float a1)
3086  set_value(DirectionAngle self, SparseIntKey a0, IMP::Int a1)
3087  set_value(DirectionAngle self, SparseStringKey a0, IMP::String a1)
3088  set_value(DirectionAngle self, SparseParticleIndexKey a0, ParticleIndex a1)
3089  """
3090  return _IMP_core.DirectionAngle_set_value(self, *args)
3091 
3092  def remove_attribute(self, *args):
3093  r"""
3094  remove_attribute(DirectionAngle self, FloatKey a0)
3095  remove_attribute(DirectionAngle self, IntKey a0)
3096  remove_attribute(DirectionAngle self, FloatsKey a0)
3097  remove_attribute(DirectionAngle self, IntsKey a0)
3098  remove_attribute(DirectionAngle self, StringKey a0)
3099  remove_attribute(DirectionAngle self, ParticleIndexKey a0)
3100  remove_attribute(DirectionAngle self, ObjectKey a0)
3101  remove_attribute(DirectionAngle self, SparseFloatKey a0)
3102  remove_attribute(DirectionAngle self, SparseIntKey a0)
3103  remove_attribute(DirectionAngle self, SparseStringKey a0)
3104  remove_attribute(DirectionAngle self, SparseParticleIndexKey a0)
3105  """
3106  return _IMP_core.DirectionAngle_remove_attribute(self, *args)
3107 
3108  def has_attribute(self, *args):
3109  r"""
3110  has_attribute(DirectionAngle self, FloatKey a0) -> bool
3111  has_attribute(DirectionAngle self, IntKey a0) -> bool
3112  has_attribute(DirectionAngle self, FloatsKey a0) -> bool
3113  has_attribute(DirectionAngle self, IntsKey a0) -> bool
3114  has_attribute(DirectionAngle self, StringKey a0) -> bool
3115  has_attribute(DirectionAngle self, ParticleIndexKey a0) -> bool
3116  has_attribute(DirectionAngle self, ObjectKey a0) -> bool
3117  has_attribute(DirectionAngle self, SparseFloatKey a0) -> bool
3118  has_attribute(DirectionAngle self, SparseIntKey a0) -> bool
3119  has_attribute(DirectionAngle self, SparseStringKey a0) -> bool
3120  has_attribute(DirectionAngle self, SparseParticleIndexKey a0) -> bool
3121  """
3122  return _IMP_core.DirectionAngle_has_attribute(self, *args)
3123 
3124  def get_derivative(self, a0):
3125  r"""get_derivative(DirectionAngle self, FloatKey a0) -> double"""
3126  return _IMP_core.DirectionAngle_get_derivative(self, a0)
3127 
3128  def get_name(self):
3129  r"""get_name(DirectionAngle self) -> std::string"""
3130  return _IMP_core.DirectionAngle_get_name(self)
3131 
3132  def clear_caches(self):
3133  r"""clear_caches(DirectionAngle self)"""
3134  return _IMP_core.DirectionAngle_clear_caches(self)
3135 
3136  def set_name(self, a0):
3137  r"""set_name(DirectionAngle self, std::string a0)"""
3138  return _IMP_core.DirectionAngle_set_name(self, a0)
3139 
3140  def set_check_level(self, a0):
3141  r"""set_check_level(DirectionAngle self, IMP::CheckLevel a0)"""
3142  return _IMP_core.DirectionAngle_set_check_level(self, a0)
3143 
3144  def add_to_derivative(self, a0, a1, a2):
3145  r"""add_to_derivative(DirectionAngle self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
3146  return _IMP_core.DirectionAngle_add_to_derivative(self, a0, a1, a2)
3147 
3148  def set_is_optimized(self, a0, a1):
3149  r"""set_is_optimized(DirectionAngle self, FloatKey a0, bool a1)"""
3150  return _IMP_core.DirectionAngle_set_is_optimized(self, a0, a1)
3151 
3152  def get_is_optimized(self, a0):
3153  r"""get_is_optimized(DirectionAngle self, FloatKey a0) -> bool"""
3154  return _IMP_core.DirectionAngle_get_is_optimized(self, a0)
3155 
3156  def get_check_level(self):
3157  r"""get_check_level(DirectionAngle self) -> IMP::CheckLevel"""
3158  return _IMP_core.DirectionAngle_get_check_level(self)
3159 
3160  def __eq__(self, *args):
3161  r"""
3162  __eq__(DirectionAngle self, DirectionAngle o) -> bool
3163  __eq__(DirectionAngle self, Particle d) -> bool
3164  """
3165  return _IMP_core.DirectionAngle___eq__(self, *args)
3166 
3167  def __ne__(self, *args):
3168  r"""
3169  __ne__(DirectionAngle self, DirectionAngle o) -> bool
3170  __ne__(DirectionAngle self, Particle d) -> bool
3171  """
3172  return _IMP_core.DirectionAngle___ne__(self, *args)
3173 
3174  def __le__(self, *args):
3175  r"""
3176  __le__(DirectionAngle self, DirectionAngle o) -> bool
3177  __le__(DirectionAngle self, Particle d) -> bool
3178  """
3179  return _IMP_core.DirectionAngle___le__(self, *args)
3180 
3181  def __lt__(self, *args):
3182  r"""
3183  __lt__(DirectionAngle self, DirectionAngle o) -> bool
3184  __lt__(DirectionAngle self, Particle d) -> bool
3185  """
3186  return _IMP_core.DirectionAngle___lt__(self, *args)
3187 
3188  def __ge__(self, *args):
3189  r"""
3190  __ge__(DirectionAngle self, DirectionAngle o) -> bool
3191  __ge__(DirectionAngle self, Particle d) -> bool
3192  """
3193  return _IMP_core.DirectionAngle___ge__(self, *args)
3194 
3195  def __gt__(self, *args):
3196  r"""
3197  __gt__(DirectionAngle self, DirectionAngle o) -> bool
3198  __gt__(DirectionAngle self, Particle d) -> bool
3199  """
3200  return _IMP_core.DirectionAngle___gt__(self, *args)
3201 
3202  def __hash__(self):
3203  r"""__hash__(DirectionAngle self) -> std::size_t"""
3204  return _IMP_core.DirectionAngle___hash__(self)
3205 
3206  def __str__(self):
3207  r"""__str__(DirectionAngle self) -> std::string"""
3208  return _IMP_core.DirectionAngle___str__(self)
3209 
3210  def __repr__(self):
3211  r"""__repr__(DirectionAngle self) -> std::string"""
3212  return _IMP_core.DirectionAngle___repr__(self)
3213 
3214  def _get_as_binary(self):
3215  r"""_get_as_binary(DirectionAngle self) -> PyObject *"""
3216  return _IMP_core.DirectionAngle__get_as_binary(self)
3217 
3218  def _set_from_binary(self, p):
3219  r"""_set_from_binary(DirectionAngle self, PyObject * p)"""
3220  return _IMP_core.DirectionAngle__set_from_binary(self, p)
3221 
3222  def __getstate__(self):
3223  p = self._get_as_binary()
3224  if len(self.__dict__) > 1:
3225  d = self.__dict__.copy()
3226  del d['this']
3227  p = (d, p)
3228  return p
3229 
3230  def __setstate__(self, p):
3231  if not hasattr(self, 'this'):
3232  self.__init__()
3233  if isinstance(p, tuple):
3234  d, p = p
3235  self.__dict__.update(d)
3236  return self._set_from_binary(p)
3237 
3238  __swig_destroy__ = _IMP_core.delete_DirectionAngle
3239 
3240 # Register DirectionAngle in _IMP_core:
3241 _IMP_core.DirectionAngle_swigregister(DirectionAngle)
3242 class Surface(XYZ):
3243  r"""Proxy of C++ IMP::core::Surface class."""
3244 
3245  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3246 
3247  @staticmethod
3248  def do_setup_particle(*args):
3249  r"""
3250  do_setup_particle(Model m, ParticleIndex pi, Vector3D center=IMP::Vector3D(0, 0, 0), Vector3D normal=IMP::Vector3D(0, 0, 1))
3251  do_setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf)
3252  """
3253  return _IMP_core.Surface_do_setup_particle(*args)
3254 
3255  def __init__(self, *args):
3256  r"""
3257  __init__(Surface self) -> Surface
3258  __init__(Surface self, Model m, ParticleIndex id) -> Surface
3259  __init__(Surface self, _ParticleAdaptor d) -> Surface
3260  """
3261  _IMP_core.Surface_swiginit(self, _IMP_core.new_Surface(*args))
3262 
3263  def show(self, *args):
3264  r"""show(Surface self, _ostream out=std::cout)"""
3265  return _IMP_core.Surface_show(self, *args)
3266 
3267  @staticmethod
3268  def setup_particle(*args):
3269  r"""
3270  setup_particle(Model m, ParticleIndex pi) -> Surface
3271  setup_particle(_ParticleAdaptor pa) -> Surface
3272  setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> Surface
3273  setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> Surface
3274  setup_particle(Model m, ParticleIndex pi, Vector3D center) -> Surface
3275  setup_particle(_ParticleAdaptor pa, Vector3D center) -> Surface
3276  setup_particle(Model m, ParticleIndex pi, Vector3D center, Vector3D normal) -> Surface
3277  setup_particle(_ParticleAdaptor pa, Vector3D center, Vector3D normal) -> Surface
3278  """
3279  return _IMP_core.Surface_setup_particle(*args)
3280 
3281  def get_normal_x(self):
3282  r"""get_normal_x(Surface self) -> IMP::Float"""
3283  return _IMP_core.Surface_get_normal_x(self)
3284 
3285  def set_normal_x(self, t):
3286  r"""set_normal_x(Surface self, IMP::Float t)"""
3287  return _IMP_core.Surface_set_normal_x(self, t)
3288 
3289  def get_normal_y(self):
3290  r"""get_normal_y(Surface self) -> IMP::Float"""
3291  return _IMP_core.Surface_get_normal_y(self)
3292 
3293  def set_normal_y(self, t):
3294  r"""set_normal_y(Surface self, IMP::Float t)"""
3295  return _IMP_core.Surface_set_normal_y(self, t)
3296 
3297  def get_normal_z(self):
3298  r"""get_normal_z(Surface self) -> IMP::Float"""
3299  return _IMP_core.Surface_get_normal_z(self)
3300 
3301  def set_normal_z(self, t):
3302  r"""set_normal_z(Surface self, IMP::Float t)"""
3303  return _IMP_core.Surface_set_normal_z(self, t)
3304 
3305  @staticmethod
3306  def get_is_setup(*args):
3307  r"""
3308  get_is_setup(_ParticleAdaptor p) -> bool
3309  get_is_setup(Model m, ParticleIndex pi) -> bool
3310  """
3311  return _IMP_core.Surface_get_is_setup(*args)
3312 
3313  @staticmethod
3314  def get_normal_key(i):
3315  r"""get_normal_key(unsigned int i) -> FloatKey"""
3316  return _IMP_core.Surface_get_normal_key(i)
3317 
3318  def get_normal_derivative(self, i):
3319  r"""get_normal_derivative(Surface self, int i) -> IMP::Float"""
3320  return _IMP_core.Surface_get_normal_derivative(self, i)
3321 
3322  def get_normal_derivatives(self):
3323  r"""get_normal_derivatives(Surface self) -> Vector3D"""
3324  return _IMP_core.Surface_get_normal_derivatives(self)
3325 
3326  def add_to_normal_derivative(self, i, v, d):
3327  r"""add_to_normal_derivative(Surface self, int i, IMP::Float v, DerivativeAccumulator d)"""
3328  return _IMP_core.Surface_add_to_normal_derivative(self, i, v, d)
3329 
3330  def add_to_normal_derivatives(self, v, d):
3331  r"""add_to_normal_derivatives(Surface self, Vector3D v, DerivativeAccumulator d)"""
3332  return _IMP_core.Surface_add_to_normal_derivatives(self, v, d)
3333 
3334  def get_normal_is_optimized(self):
3335  r"""get_normal_is_optimized(Surface self) -> bool"""
3336  return _IMP_core.Surface_get_normal_is_optimized(self)
3337 
3338  def set_normal_is_optimized(self, tf):
3339  r"""set_normal_is_optimized(Surface self, bool tf)"""
3340  return _IMP_core.Surface_set_normal_is_optimized(self, tf)
3341 
3342  def get_normal(self):
3343  r"""get_normal(Surface self) -> Vector3D"""
3344  return _IMP_core.Surface_get_normal(self)
3345 
3346  def set_normal(self, normal):
3347  r"""set_normal(Surface self, Vector3D normal)"""
3348  return _IMP_core.Surface_set_normal(self, normal)
3349 
3350  def reflect(self):
3351  r"""reflect(Surface self)"""
3352  return _IMP_core.Surface_reflect(self)
3353 
3354  def get_height(self, v):
3355  r"""get_height(Surface self, Vector3D v) -> double"""
3356  return _IMP_core.Surface_get_height(self, v)
3357 
3358  def get_depth(self, v):
3359  r"""get_depth(Surface self, Vector3D v) -> double"""
3360  return _IMP_core.Surface_get_depth(self, v)
3361 
3362  def get_distance_to(self, v):
3363  r"""get_distance_to(Surface self, Vector3D v) -> double"""
3364  return _IMP_core.Surface_get_distance_to(self, v)
3365 
3366  def get_distance_to_center(self, v):
3367  r"""get_distance_to_center(Surface self, Vector3D v) -> double"""
3368  return _IMP_core.Surface_get_distance_to_center(self, v)
3369 
3370  def set_reference_frame(self, rf):
3371  r"""set_reference_frame(Surface self, ReferenceFrame3D rf)"""
3372  return _IMP_core.Surface_set_reference_frame(self, rf)
3373 
3374  def get_reference_frame(self):
3375  r"""get_reference_frame(Surface self) -> ReferenceFrame3D"""
3376  return _IMP_core.Surface_get_reference_frame(self)
3377 
3378  def get_plane(self):
3379  r"""get_plane(Surface self) -> Plane3D"""
3380  return _IMP_core.Surface_get_plane(self)
3381 
3382  def add_attribute(self, *args):
3383  r"""
3384  add_attribute(Surface self, FloatKey k, IMP::Float v, bool opt)
3385  add_attribute(Surface self, FloatKey a0, IMP::Float a1)
3386  add_attribute(Surface self, IntKey a0, IMP::Int a1)
3387  add_attribute(Surface self, FloatsKey a0, IMP::Floats a1)
3388  add_attribute(Surface self, IntsKey a0, IMP::Ints a1)
3389  add_attribute(Surface self, StringKey a0, IMP::String a1)
3390  add_attribute(Surface self, ParticleIndexKey a0, Particle a1)
3391  add_attribute(Surface self, ObjectKey a0, Object a1)
3392  add_attribute(Surface self, SparseFloatKey a0, IMP::Float a1)
3393  add_attribute(Surface self, SparseIntKey a0, IMP::Int a1)
3394  add_attribute(Surface self, SparseStringKey a0, IMP::String a1)
3395  add_attribute(Surface self, SparseParticleIndexKey a0, ParticleIndex a1)
3396  """
3397  return _IMP_core.Surface_add_attribute(self, *args)
3398 
3399  def get_value(self, *args):
3400  r"""
3401  get_value(Surface self, FloatKey a0) -> IMP::Float
3402  get_value(Surface self, IntKey a0) -> IMP::Int
3403  get_value(Surface self, FloatsKey a0) -> IMP::Floats
3404  get_value(Surface self, IntsKey a0) -> IMP::Ints
3405  get_value(Surface self, StringKey a0) -> IMP::String
3406  get_value(Surface self, ParticleIndexKey a0) -> Particle
3407  get_value(Surface self, ObjectKey a0) -> Object
3408  get_value(Surface self, SparseFloatKey a0) -> IMP::Float
3409  get_value(Surface self, SparseIntKey a0) -> IMP::Int
3410  get_value(Surface self, SparseStringKey a0) -> IMP::String
3411  get_value(Surface self, SparseParticleIndexKey a0) -> ParticleIndex
3412  """
3413  return _IMP_core.Surface_get_value(self, *args)
3414 
3415  def set_value(self, *args):
3416  r"""
3417  set_value(Surface self, FloatKey a0, IMP::Float a1)
3418  set_value(Surface self, IntKey a0, IMP::Int a1)
3419  set_value(Surface self, FloatsKey a0, IMP::Floats a1)
3420  set_value(Surface self, IntsKey a0, IMP::Ints a1)
3421  set_value(Surface self, StringKey a0, IMP::String a1)
3422  set_value(Surface self, ParticleIndexKey a0, Particle a1)
3423  set_value(Surface self, ObjectKey a0, Object a1)
3424  set_value(Surface self, SparseFloatKey a0, IMP::Float a1)
3425  set_value(Surface self, SparseIntKey a0, IMP::Int a1)
3426  set_value(Surface self, SparseStringKey a0, IMP::String a1)
3427  set_value(Surface self, SparseParticleIndexKey a0, ParticleIndex a1)
3428  """
3429  return _IMP_core.Surface_set_value(self, *args)
3430 
3431  def remove_attribute(self, *args):
3432  r"""
3433  remove_attribute(Surface self, FloatKey a0)
3434  remove_attribute(Surface self, IntKey a0)
3435  remove_attribute(Surface self, FloatsKey a0)
3436  remove_attribute(Surface self, IntsKey a0)
3437  remove_attribute(Surface self, StringKey a0)
3438  remove_attribute(Surface self, ParticleIndexKey a0)
3439  remove_attribute(Surface self, ObjectKey a0)
3440  remove_attribute(Surface self, SparseFloatKey a0)
3441  remove_attribute(Surface self, SparseIntKey a0)
3442  remove_attribute(Surface self, SparseStringKey a0)
3443  remove_attribute(Surface self, SparseParticleIndexKey a0)
3444  """
3445  return _IMP_core.Surface_remove_attribute(self, *args)
3446 
3447  def has_attribute(self, *args):
3448  r"""
3449  has_attribute(Surface self, FloatKey a0) -> bool
3450  has_attribute(Surface self, IntKey a0) -> bool
3451  has_attribute(Surface self, FloatsKey a0) -> bool
3452  has_attribute(Surface self, IntsKey a0) -> bool
3453  has_attribute(Surface self, StringKey a0) -> bool
3454  has_attribute(Surface self, ParticleIndexKey a0) -> bool
3455  has_attribute(Surface self, ObjectKey a0) -> bool
3456  has_attribute(Surface self, SparseFloatKey a0) -> bool
3457  has_attribute(Surface self, SparseIntKey a0) -> bool
3458  has_attribute(Surface self, SparseStringKey a0) -> bool
3459  has_attribute(Surface self, SparseParticleIndexKey a0) -> bool
3460  """
3461  return _IMP_core.Surface_has_attribute(self, *args)
3462 
3463  def get_derivative(self, a0):
3464  r"""get_derivative(Surface self, FloatKey a0) -> double"""
3465  return _IMP_core.Surface_get_derivative(self, a0)
3466 
3467  def get_name(self):
3468  r"""get_name(Surface self) -> std::string"""
3469  return _IMP_core.Surface_get_name(self)
3470 
3471  def clear_caches(self):
3472  r"""clear_caches(Surface self)"""
3473  return _IMP_core.Surface_clear_caches(self)
3474 
3475  def set_name(self, a0):
3476  r"""set_name(Surface self, std::string a0)"""
3477  return _IMP_core.Surface_set_name(self, a0)
3478 
3479  def set_check_level(self, a0):
3480  r"""set_check_level(Surface self, IMP::CheckLevel a0)"""
3481  return _IMP_core.Surface_set_check_level(self, a0)
3482 
3483  def add_to_derivative(self, a0, a1, a2):
3484  r"""add_to_derivative(Surface self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
3485  return _IMP_core.Surface_add_to_derivative(self, a0, a1, a2)
3486 
3487  def set_is_optimized(self, a0, a1):
3488  r"""set_is_optimized(Surface self, FloatKey a0, bool a1)"""
3489  return _IMP_core.Surface_set_is_optimized(self, a0, a1)
3490 
3491  def get_is_optimized(self, a0):
3492  r"""get_is_optimized(Surface self, FloatKey a0) -> bool"""
3493  return _IMP_core.Surface_get_is_optimized(self, a0)
3494 
3495  def get_check_level(self):
3496  r"""get_check_level(Surface self) -> IMP::CheckLevel"""
3497  return _IMP_core.Surface_get_check_level(self)
3498 
3499  def __eq__(self, *args):
3500  r"""
3501  __eq__(Surface self, Surface o) -> bool
3502  __eq__(Surface self, Particle d) -> bool
3503  """
3504  return _IMP_core.Surface___eq__(self, *args)
3505 
3506  def __ne__(self, *args):
3507  r"""
3508  __ne__(Surface self, Surface o) -> bool
3509  __ne__(Surface self, Particle d) -> bool
3510  """
3511  return _IMP_core.Surface___ne__(self, *args)
3512 
3513  def __le__(self, *args):
3514  r"""
3515  __le__(Surface self, Surface o) -> bool
3516  __le__(Surface self, Particle d) -> bool
3517  """
3518  return _IMP_core.Surface___le__(self, *args)
3519 
3520  def __lt__(self, *args):
3521  r"""
3522  __lt__(Surface self, Surface o) -> bool
3523  __lt__(Surface self, Particle d) -> bool
3524  """
3525  return _IMP_core.Surface___lt__(self, *args)
3526 
3527  def __ge__(self, *args):
3528  r"""
3529  __ge__(Surface self, Surface o) -> bool
3530  __ge__(Surface self, Particle d) -> bool
3531  """
3532  return _IMP_core.Surface___ge__(self, *args)
3533 
3534  def __gt__(self, *args):
3535  r"""
3536  __gt__(Surface self, Surface o) -> bool
3537  __gt__(Surface self, Particle d) -> bool
3538  """
3539  return _IMP_core.Surface___gt__(self, *args)
3540 
3541  def __hash__(self):
3542  r"""__hash__(Surface self) -> std::size_t"""
3543  return _IMP_core.Surface___hash__(self)
3544 
3545  def __str__(self):
3546  r"""__str__(Surface self) -> std::string"""
3547  return _IMP_core.Surface___str__(self)
3548 
3549  def __repr__(self):
3550  r"""__repr__(Surface self) -> std::string"""
3551  return _IMP_core.Surface___repr__(self)
3552 
3553  def _get_as_binary(self):
3554  r"""_get_as_binary(Surface self) -> PyObject *"""
3555  return _IMP_core.Surface__get_as_binary(self)
3556 
3557  def _set_from_binary(self, p):
3558  r"""_set_from_binary(Surface self, PyObject * p)"""
3559  return _IMP_core.Surface__set_from_binary(self, p)
3560 
3561  def __getstate__(self):
3562  p = self._get_as_binary()
3563  if len(self.__dict__) > 1:
3564  d = self.__dict__.copy()
3565  del d['this']
3566  p = (d, p)
3567  return p
3568 
3569  def __setstate__(self, p):
3570  if not hasattr(self, 'this'):
3571  self.__init__()
3572  if isinstance(p, tuple):
3573  d, p = p
3574  self.__dict__.update(d)
3575  return self._set_from_binary(p)
3576 
3577  __swig_destroy__ = _IMP_core.delete_Surface
3578 
3579 # Register Surface in _IMP_core:
3580 _IMP_core.Surface_swigregister(Surface)
3581 
3582 def get_height(*args):
3583  r"""
3584  get_height(Surface s, XYZR d) -> double
3585  get_height(Surface s, XYZ d) -> double
3586  """
3587  return _IMP_core.get_height(*args)
3588 
3589 def get_depth(*args):
3590  r"""
3591  get_depth(Surface s, XYZR d) -> double
3592  get_depth(Surface s, XYZ d) -> double
3593  """
3594  return _IMP_core.get_depth(*args)
3595 
3596 def get_distance(*args):
3597  r"""
3598  get_distance(XYZ a, XYZ b) -> double
3599  get_distance(XYZR a, XYZR b) -> double
3600  get_distance(Surface s, XYZR d) -> double
3601  get_distance(Surface s, XYZ d) -> double
3602  """
3603  return _IMP_core.get_distance(*args)
3604 class SurfaceGeometry(IMP.display.Geometry):
3605  r"""Proxy of C++ IMP::core::SurfaceGeometry class."""
3606 
3607  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3608 
3609  def __init__(self, *args):
3610  r"""
3611  __init__(SurfaceGeometry self, std::string n="SurfaceGeometry") -> SurfaceGeometry
3612  __init__(SurfaceGeometry self, Surface s, std::string const n="SurfaceGeometry") -> SurfaceGeometry
3613  __init__(SurfaceGeometry self, Surface s, Color c, std::string n="SurfaceGeometry") -> SurfaceGeometry
3614  """
3615  _IMP_core.SurfaceGeometry_swiginit(self, _IMP_core.new_SurfaceGeometry(*args))
3616 
3617  def get_geometry(self):
3618  r"""get_geometry(SurfaceGeometry self) -> Surface"""
3619  return _IMP_core.SurfaceGeometry_get_geometry(self)
3620 
3621  def set_geometry(self, s):
3622  r"""set_geometry(SurfaceGeometry self, Surface s)"""
3623  return _IMP_core.SurfaceGeometry_set_geometry(self, s)
3624 
3625  def get_version_info(self):
3626  r"""get_version_info(SurfaceGeometry self) -> VersionInfo"""
3627  return _IMP_core.SurfaceGeometry_get_version_info(self)
3628  __swig_destroy__ = _IMP_core.delete_SurfaceGeometry
3629 
3630  def __str__(self):
3631  r"""__str__(SurfaceGeometry self) -> std::string"""
3632  return _IMP_core.SurfaceGeometry___str__(self)
3633 
3634  def __repr__(self):
3635  r"""__repr__(SurfaceGeometry self) -> std::string"""
3636  return _IMP_core.SurfaceGeometry___repr__(self)
3637 
3638  @staticmethod
3639  def get_from(o):
3640  return _object_cast_to_SurfaceGeometry(o)
3641 
3642 
3643 # Register SurfaceGeometry in _IMP_core:
3644 _IMP_core.SurfaceGeometry_swigregister(SurfaceGeometry)
3645 
3646 def create_geometry(*args):
3647  r"""create_geometry(Surface s, std::string name=std::string("SurfaceGeometry%1%")) -> SurfaceGeometry"""
3648  return _IMP_core.create_geometry(*args)
3649 class SurfaceGeometryConstraint(IMP.Constraint):
3650  r"""Proxy of C++ IMP::core::SurfaceGeometryConstraint class."""
3651 
3652  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3653 
3654  def __init__(self, s, g):
3655  r"""__init__(SurfaceGeometryConstraint self, Surface s, SurfaceGeometry g) -> SurfaceGeometryConstraint"""
3656  _IMP_core.SurfaceGeometryConstraint_swiginit(self, _IMP_core.new_SurfaceGeometryConstraint(s, g))
3657 
3658  def get_surface(self):
3659  r"""get_surface(SurfaceGeometryConstraint self) -> Surface"""
3660  return _IMP_core.SurfaceGeometryConstraint_get_surface(self)
3661 
3662  def get_geometry(self):
3663  r"""get_geometry(SurfaceGeometryConstraint self) -> SurfaceGeometry"""
3664  return _IMP_core.SurfaceGeometryConstraint_get_geometry(self)
3665 
3666  def do_get_inputs(self):
3667  r"""do_get_inputs(SurfaceGeometryConstraint self) -> IMP::ModelObjectsTemp"""
3668  return _IMP_core.SurfaceGeometryConstraint_do_get_inputs(self)
3669 
3670  def do_get_outputs(self):
3671  r"""do_get_outputs(SurfaceGeometryConstraint self) -> IMP::ModelObjectsTemp"""
3672  return _IMP_core.SurfaceGeometryConstraint_do_get_outputs(self)
3673 
3674  def get_version_info(self):
3675  r"""get_version_info(SurfaceGeometryConstraint self) -> VersionInfo"""
3676  return _IMP_core.SurfaceGeometryConstraint_get_version_info(self)
3677  __swig_destroy__ = _IMP_core.delete_SurfaceGeometryConstraint
3678 
3679  def __str__(self):
3680  r"""__str__(SurfaceGeometryConstraint self) -> std::string"""
3681  return _IMP_core.SurfaceGeometryConstraint___str__(self)
3682 
3683  def __repr__(self):
3684  r"""__repr__(SurfaceGeometryConstraint self) -> std::string"""
3685  return _IMP_core.SurfaceGeometryConstraint___repr__(self)
3686 
3687  @staticmethod
3688  def get_from(o):
3689  return _object_cast_to_SurfaceGeometryConstraint(o)
3690 
3691 
3692 # Register SurfaceGeometryConstraint in _IMP_core:
3693 _IMP_core.SurfaceGeometryConstraint_swigregister(SurfaceGeometryConstraint)
3694 
3696  r"""get_constrained_surface_geometry(Surface s, std::string name="SurfaceGeometry%1%") -> SurfaceGeometry"""
3697  return _IMP_core.get_constrained_surface_geometry(*args)
3698 class LateralSurfaceConstraint(IMP.Constraint):
3699  r"""Proxy of C++ IMP::core::LateralSurfaceConstraint class."""
3700 
3701  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3702 
3703  def __init__(self, s, d):
3704  r"""__init__(LateralSurfaceConstraint self, Surface s, XYZ d) -> LateralSurfaceConstraint"""
3705  _IMP_core.LateralSurfaceConstraint_swiginit(self, _IMP_core.new_LateralSurfaceConstraint(s, d))
3706 
3707  def do_get_inputs(self):
3708  r"""do_get_inputs(LateralSurfaceConstraint self) -> IMP::ModelObjectsTemp"""
3709  return _IMP_core.LateralSurfaceConstraint_do_get_inputs(self)
3710 
3711  def do_get_outputs(self):
3712  r"""do_get_outputs(LateralSurfaceConstraint self) -> IMP::ModelObjectsTemp"""
3713  return _IMP_core.LateralSurfaceConstraint_do_get_outputs(self)
3714 
3715  def get_version_info(self):
3716  r"""get_version_info(LateralSurfaceConstraint self) -> VersionInfo"""
3717  return _IMP_core.LateralSurfaceConstraint_get_version_info(self)
3718  __swig_destroy__ = _IMP_core.delete_LateralSurfaceConstraint
3719 
3720  def __str__(self):
3721  r"""__str__(LateralSurfaceConstraint self) -> std::string"""
3722  return _IMP_core.LateralSurfaceConstraint___str__(self)
3723 
3724  def __repr__(self):
3725  r"""__repr__(LateralSurfaceConstraint self) -> std::string"""
3726  return _IMP_core.LateralSurfaceConstraint___repr__(self)
3727 
3728  @staticmethod
3729  def get_from(o):
3730  return _object_cast_to_LateralSurfaceConstraint(o)
3731 
3732 
3733 # Register LateralSurfaceConstraint in _IMP_core:
3734 _IMP_core.LateralSurfaceConstraint_swigregister(LateralSurfaceConstraint)
3735 class AngleTripletScore(IMP.TripletScore):
3736  r"""Proxy of C++ IMP::core::AngleTripletScore class."""
3737 
3738  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3739 
3740  def __init__(self, *args):
3741  r"""
3742  __init__(AngleTripletScore self, UnaryFunction f) -> AngleTripletScore
3743  __init__(AngleTripletScore self) -> AngleTripletScore
3744  """
3745  _IMP_core.AngleTripletScore_swiginit(self, _IMP_core.new_AngleTripletScore(*args))
3746 
3747  def do_get_inputs(self, m, pis):
3748  r"""do_get_inputs(AngleTripletScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3749  return _IMP_core.AngleTripletScore_do_get_inputs(self, m, pis)
3750 
3751  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
3752  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"""
3753  return _IMP_core.AngleTripletScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
3754 
3755  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
3756  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"""
3757  return _IMP_core.AngleTripletScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
3758 
3759  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
3760  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"""
3761  return _IMP_core.AngleTripletScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
3762 
3763  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
3764  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"""
3765  return _IMP_core.AngleTripletScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
3766 
3767  def get_version_info(self):
3768  r"""get_version_info(AngleTripletScore self) -> VersionInfo"""
3769  return _IMP_core.AngleTripletScore_get_version_info(self)
3770  __swig_destroy__ = _IMP_core.delete_AngleTripletScore
3771 
3772  def __str__(self):
3773  r"""__str__(AngleTripletScore self) -> std::string"""
3774  return _IMP_core.AngleTripletScore___str__(self)
3775 
3776  def __repr__(self):
3777  r"""__repr__(AngleTripletScore self) -> std::string"""
3778  return _IMP_core.AngleTripletScore___repr__(self)
3779 
3780  @staticmethod
3781  def get_from(o):
3782  return _object_cast_to_AngleTripletScore(o)
3783 
3784 
3785  def _get_as_binary(self):
3786  r"""_get_as_binary(AngleTripletScore self) -> PyObject *"""
3787  return _IMP_core.AngleTripletScore__get_as_binary(self)
3788 
3789  def _set_from_binary(self, p):
3790  r"""_set_from_binary(AngleTripletScore self, PyObject * p)"""
3791  return _IMP_core.AngleTripletScore__set_from_binary(self, p)
3792 
3793  def __getstate__(self):
3794  p = self._get_as_binary()
3795  if len(self.__dict__) > 1:
3796  d = self.__dict__.copy()
3797  del d['this']
3798  p = (d, p)
3799  return p
3800 
3801  def __setstate__(self, p):
3802  if not hasattr(self, 'this'):
3803  self.__init__()
3804  if isinstance(p, tuple):
3805  d, p = p
3806  self.__dict__.update(d)
3807  return self._set_from_binary(p)
3808 
3809 
3810 # Register AngleTripletScore in _IMP_core:
3811 _IMP_core.AngleTripletScore_swigregister(AngleTripletScore)
3812 class BallMover(MonteCarloMover):
3813  r"""Proxy of C++ IMP::core::BallMover class."""
3814 
3815  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3816 
3817  def __init__(self, *args):
3818  r"""
3819  __init__(BallMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double radius) -> BallMover
3820  __init__(BallMover self, Model m, ParticleIndex pi, double radius) -> BallMover
3821  __init__(BallMover self, Model m, IMP::ParticleIndexes const & pis, IMP::FloatKeys const & vars, IMP::Float radius) -> BallMover
3822  __init__(BallMover self, Model m, IMP::ParticleIndexes const & pis, IMP::Float radius) -> BallMover
3823  __init__(BallMover self) -> BallMover
3824  """
3825  _IMP_core.BallMover_swiginit(self, _IMP_core.new_BallMover(*args))
3826 
3827  def set_radius(self, radius):
3828  r"""set_radius(BallMover self, IMP::Float radius)"""
3829  return _IMP_core.BallMover_set_radius(self, radius)
3830 
3831  def get_radius(self):
3832  r"""get_radius(BallMover self) -> IMP::Float"""
3833  return _IMP_core.BallMover_get_radius(self)
3834 
3835  def get_indexes(self):
3836  r"""get_indexes(BallMover self) -> IMP::ParticleIndexes"""
3837  return _IMP_core.BallMover_get_indexes(self)
3838 
3839  def get_keys(self):
3840  r"""get_keys(BallMover self) -> IMP::FloatKeys"""
3841  return _IMP_core.BallMover_get_keys(self)
3842 
3843  def get_version_info(self):
3844  r"""get_version_info(BallMover self) -> VersionInfo"""
3845  return _IMP_core.BallMover_get_version_info(self)
3846  __swig_destroy__ = _IMP_core.delete_BallMover
3847 
3848  def __str__(self):
3849  r"""__str__(BallMover self) -> std::string"""
3850  return _IMP_core.BallMover___str__(self)
3851 
3852  def __repr__(self):
3853  r"""__repr__(BallMover self) -> std::string"""
3854  return _IMP_core.BallMover___repr__(self)
3855 
3856  @staticmethod
3857  def get_from(o):
3858  return _object_cast_to_BallMover(o)
3859 
3860 
3861  def _get_as_binary(self):
3862  r"""_get_as_binary(BallMover self) -> PyObject *"""
3863  return _IMP_core.BallMover__get_as_binary(self)
3864 
3865  def _set_from_binary(self, p):
3866  r"""_set_from_binary(BallMover self, PyObject * p)"""
3867  return _IMP_core.BallMover__set_from_binary(self, p)
3868 
3869  def __getstate__(self):
3870  p = self._get_as_binary()
3871  if len(self.__dict__) > 1:
3872  d = self.__dict__.copy()
3873  del d['this']
3874  p = (d, p)
3875  return p
3876 
3877  def __setstate__(self, p):
3878  if not hasattr(self, 'this'):
3879  self.__init__()
3880  if isinstance(p, tuple):
3881  d, p = p
3882  self.__dict__.update(d)
3883  return self._set_from_binary(p)
3884 
3885 
3886  def _get_jax(self):
3887  import jax.random
3888  from IMP.algebra._jax_util import get_random_vector_in_3d_sphere
3889  indexes = self.get_indexes()
3890  keys = frozenset(self.get_keys())
3891  if keys == frozenset(IMP.core.XYZ.get_xyz_keys()):
3892  intcoord = False
3893  elif keys == frozenset(
3895  intcoord = True
3896  else:
3897  raise NotImplementedError(
3898  "Only works for XYZ or internal coordinates")
3899  radius = self.get_radius()
3900 
3901  def init_func(key):
3902  return key
3903 
3904  def propose_func(jm, key):
3905  key, subkey = jax.random.split(key)
3906  v = get_random_vector_in_3d_sphere(subkey, radius)
3907  if intcoord:
3908  rbs = jm['rigid_bodies']
3909  rbs.intcoord = rbs.intcoord.at[indexes].add(v)
3910  else:
3911  jm['xyz'] = jm['xyz'].at[indexes].add(v)
3912  return jm, key, 1.0
3913  return self._wrap_jax(init_func, propose_func,
3914  keys=['rigid_bodies'] if intcoord else None)
3915 
3916 
3917 # Register BallMover in _IMP_core:
3918 _IMP_core.BallMover_swigregister(BallMover)
3919 class SerialMover(MonteCarloMover):
3920  r"""Proxy of C++ IMP::core::SerialMover class."""
3921 
3922  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3923 
3924  def __init__(self, *args):
3925  r"""
3926  __init__(SerialMover self, IMP::core::MonteCarloMoversTemp const & mvs) -> SerialMover
3927  __init__(SerialMover self) -> SerialMover
3928  """
3929  _IMP_core.SerialMover_swiginit(self, _IMP_core.new_SerialMover(*args))
3930 
3931  def get_movers(self):
3932  r"""get_movers(SerialMover self) -> IMP::core::MonteCarloMovers const &"""
3933  return _IMP_core.SerialMover_get_movers(self)
3934 
3935  def get_version_info(self):
3936  r"""get_version_info(SerialMover self) -> VersionInfo"""
3937  return _IMP_core.SerialMover_get_version_info(self)
3938  __swig_destroy__ = _IMP_core.delete_SerialMover
3939 
3940  def __str__(self):
3941  r"""__str__(SerialMover self) -> std::string"""
3942  return _IMP_core.SerialMover___str__(self)
3943 
3944  def __repr__(self):
3945  r"""__repr__(SerialMover self) -> std::string"""
3946  return _IMP_core.SerialMover___repr__(self)
3947 
3948  @staticmethod
3949  def get_from(o):
3950  return _object_cast_to_SerialMover(o)
3951 
3952 
3953  def _get_as_binary(self):
3954  r"""_get_as_binary(SerialMover self) -> PyObject *"""
3955  return _IMP_core.SerialMover__get_as_binary(self)
3956 
3957  def _set_from_binary(self, p):
3958  r"""_set_from_binary(SerialMover self, PyObject * p)"""
3959  return _IMP_core.SerialMover__set_from_binary(self, p)
3960 
3961  def __getstate__(self):
3962  p = self._get_as_binary()
3963  if len(self.__dict__) > 1:
3964  d = self.__dict__.copy()
3965  del d['this']
3966  p = (d, p)
3967  return p
3968 
3969  def __setstate__(self, p):
3970  if not hasattr(self, 'this'):
3971  self.__init__()
3972  if isinstance(p, tuple):
3973  d, p = p
3974  self.__dict__.update(d)
3975  return self._set_from_binary(p)
3976 
3977 
3978  def _get_jax(self):
3979  import jax.random
3980  import jax.lax
3981  import jax.numpy as jnp
3982  from IMP.core._jax_util import _SerialMover
3983  movers = [m.get_derived_object()._get_jax()
3984  for m in self.get_movers()]
3985 
3986  def sub_propose_func(jm, sms, i):
3987  """Call the propose_func of the ith mover"""
3988  jm, sms.mover_state[i], ratio = movers[i].propose_func(
3989  jm, sms.mover_state[i])
3990  sms.proposed_mover_steps = sms.proposed_mover_steps.at[i].add(1)
3991  return jm, sms, ratio
3992 
3993  sub_propose_funcs = [functools.partial(sub_propose_func, i=i)
3994  for i in range(len(movers))]
3995 
3996  def init_func(key):
3997  # Initialize all movers and store their state in ours
3998  mover_state = []
3999  for m in movers:
4000  key, subkey = jax.random.split(key)
4001  mover_state.append(m.init_func(subkey))
4002  return _SerialMover(
4003  imov=-1, mover_state=mover_state,
4004  proposed_mover_steps=jnp.zeros(len(movers), dtype=int),
4005  accepted_mover_steps=jnp.zeros(len(movers), dtype=int))
4006 
4007  def propose_func(jm, sms):
4008  sms.imov = jnp.mod(sms.imov + 1, len(movers))
4009  return jax.lax.switch(sms.imov, sub_propose_funcs, jm, sms)
4010 
4011  def accept_func(sms):
4012  # Update statistics for the chosen mover
4013  sms.accepted_mover_steps = \
4014  sms.accepted_mover_steps.at[sms.imov].add(1)
4015  return sms
4016 
4017  def sync_func(imp_mover, sms):
4018  # Copy submover statistics back to IMP Movers
4019  for i, mover in enumerate(imp_mover.get_movers()):
4020  mover.add_to_statistics(
4021  sms.proposed_mover_steps[i],
4022  sms.proposed_mover_steps[i] - sms.accepted_mover_steps[i])
4023 
4024  return self._wrap_jax(
4025  init_func, propose_func, accept_func, sync_func,
4026  keys=frozenset(x for m in movers for x in m._keys))
4027 
4028 
4029 # Register SerialMover in _IMP_core:
4030 _IMP_core.SerialMover_swigregister(SerialMover)
4031 class SubsetMover(MonteCarloMover):
4032  r"""Proxy of C++ IMP::core::SubsetMover class."""
4033 
4034  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4035 
4036  def __init__(self, *args):
4037  r"""
4038  __init__(SubsetMover self, IMP::core::MonteCarloMoversTemp const & mvs, unsigned int n) -> SubsetMover
4039  __init__(SubsetMover self) -> SubsetMover
4040  """
4041  _IMP_core.SubsetMover_swiginit(self, _IMP_core.new_SubsetMover(*args))
4042 
4043  def get_movers(self):
4044  r"""get_movers(SubsetMover self) -> IMP::core::MonteCarloMovers const &"""
4045  return _IMP_core.SubsetMover_get_movers(self)
4046 
4047  def get_subset_size(self):
4048  r"""get_subset_size(SubsetMover self) -> unsigned int"""
4049  return _IMP_core.SubsetMover_get_subset_size(self)
4050 
4051  def get_version_info(self):
4052  r"""get_version_info(SubsetMover self) -> VersionInfo"""
4053  return _IMP_core.SubsetMover_get_version_info(self)
4054  __swig_destroy__ = _IMP_core.delete_SubsetMover
4055 
4056  def __str__(self):
4057  r"""__str__(SubsetMover self) -> std::string"""
4058  return _IMP_core.SubsetMover___str__(self)
4059 
4060  def __repr__(self):
4061  r"""__repr__(SubsetMover self) -> std::string"""
4062  return _IMP_core.SubsetMover___repr__(self)
4063 
4064  @staticmethod
4065  def get_from(o):
4066  return _object_cast_to_SubsetMover(o)
4067 
4068 
4069  def _get_as_binary(self):
4070  r"""_get_as_binary(SubsetMover self) -> PyObject *"""
4071  return _IMP_core.SubsetMover__get_as_binary(self)
4072 
4073  def _set_from_binary(self, p):
4074  r"""_set_from_binary(SubsetMover self, PyObject * p)"""
4075  return _IMP_core.SubsetMover__set_from_binary(self, p)
4076 
4077  def __getstate__(self):
4078  p = self._get_as_binary()
4079  if len(self.__dict__) > 1:
4080  d = self.__dict__.copy()
4081  del d['this']
4082  p = (d, p)
4083  return p
4084 
4085  def __setstate__(self, p):
4086  if not hasattr(self, 'this'):
4087  self.__init__()
4088  if isinstance(p, tuple):
4089  d, p = p
4090  self.__dict__.update(d)
4091  return self._set_from_binary(p)
4092 
4093 
4094 # Register SubsetMover in _IMP_core:
4095 _IMP_core.SubsetMover_swigregister(SubsetMover)
4096 class DirectionMover(MonteCarloMover):
4097  r"""Proxy of C++ IMP::core::DirectionMover class."""
4098 
4099  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4100 
4101  def __init__(self, *args):
4102  r"""
4103  __init__(DirectionMover self, Model m, ParticleIndex pi, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4104  __init__(DirectionMover self, Direction d, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4105  __init__(DirectionMover self) -> DirectionMover
4106  """
4107  _IMP_core.DirectionMover_swiginit(self, _IMP_core.new_DirectionMover(*args))
4108 
4109  def set_maximum_rotation(self, mr):
4110  r"""set_maximum_rotation(DirectionMover self, IMP::Float mr)"""
4111  return _IMP_core.DirectionMover_set_maximum_rotation(self, mr)
4112 
4113  def set_reflect_probability(self, rp):
4114  r"""set_reflect_probability(DirectionMover self, IMP::Float rp)"""
4115  return _IMP_core.DirectionMover_set_reflect_probability(self, rp)
4116 
4117  def get_maximum_rotation(self):
4118  r"""get_maximum_rotation(DirectionMover self) -> IMP::Float"""
4119  return _IMP_core.DirectionMover_get_maximum_rotation(self)
4120 
4121  def get_reflect_probability(self):
4122  r"""get_reflect_probability(DirectionMover self) -> IMP::Float"""
4123  return _IMP_core.DirectionMover_get_reflect_probability(self)
4124 
4125  def get_direction(self):
4126  r"""get_direction(DirectionMover self) -> Direction"""
4127  return _IMP_core.DirectionMover_get_direction(self)
4128 
4129  def get_version_info(self):
4130  r"""get_version_info(DirectionMover self) -> VersionInfo"""
4131  return _IMP_core.DirectionMover_get_version_info(self)
4132  __swig_destroy__ = _IMP_core.delete_DirectionMover
4133 
4134  def __str__(self):
4135  r"""__str__(DirectionMover self) -> std::string"""
4136  return _IMP_core.DirectionMover___str__(self)
4137 
4138  def __repr__(self):
4139  r"""__repr__(DirectionMover self) -> std::string"""
4140  return _IMP_core.DirectionMover___repr__(self)
4141 
4142  @staticmethod
4143  def get_from(o):
4144  return _object_cast_to_DirectionMover(o)
4145 
4146 
4147  def _get_as_binary(self):
4148  r"""_get_as_binary(DirectionMover self) -> PyObject *"""
4149  return _IMP_core.DirectionMover__get_as_binary(self)
4150 
4151  def _set_from_binary(self, p):
4152  r"""_set_from_binary(DirectionMover self, PyObject * p)"""
4153  return _IMP_core.DirectionMover__set_from_binary(self, p)
4154 
4155  def __getstate__(self):
4156  p = self._get_as_binary()
4157  if len(self.__dict__) > 1:
4158  d = self.__dict__.copy()
4159  del d['this']
4160  p = (d, p)
4161  return p
4162 
4163  def __setstate__(self, p):
4164  if not hasattr(self, 'this'):
4165  self.__init__()
4166  if isinstance(p, tuple):
4167  d, p = p
4168  self.__dict__.update(d)
4169  return self._set_from_binary(p)
4170 
4171 
4172 # Register DirectionMover in _IMP_core:
4173 _IMP_core.DirectionMover_swigregister(DirectionMover)
4174 class SurfaceMover(MonteCarloMover):
4175  r"""Proxy of C++ IMP::core::SurfaceMover class."""
4176 
4177  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4178 
4179  def __init__(self, *args):
4180  r"""
4181  __init__(SurfaceMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4182  __init__(SurfaceMover self, Surface s, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4183  __init__(SurfaceMover self) -> SurfaceMover
4184  """
4185  _IMP_core.SurfaceMover_swiginit(self, _IMP_core.new_SurfaceMover(*args))
4186 
4187  def set_maximum_translation(self, mt):
4188  r"""set_maximum_translation(SurfaceMover self, IMP::Float mt)"""
4189  return _IMP_core.SurfaceMover_set_maximum_translation(self, mt)
4190 
4191  def set_maximum_rotation(self, mr):
4192  r"""set_maximum_rotation(SurfaceMover self, IMP::Float mr)"""
4193  return _IMP_core.SurfaceMover_set_maximum_rotation(self, mr)
4194 
4195  def set_reflect_probability(self, rp):
4196  r"""set_reflect_probability(SurfaceMover self, IMP::Float rp)"""
4197  return _IMP_core.SurfaceMover_set_reflect_probability(self, rp)
4198 
4199  def get_maximum_translation(self):
4200  r"""get_maximum_translation(SurfaceMover self) -> IMP::Float"""
4201  return _IMP_core.SurfaceMover_get_maximum_translation(self)
4202 
4203  def get_maximum_rotation(self):
4204  r"""get_maximum_rotation(SurfaceMover self) -> IMP::Float"""
4205  return _IMP_core.SurfaceMover_get_maximum_rotation(self)
4206 
4207  def get_reflect_probability(self):
4208  r"""get_reflect_probability(SurfaceMover self) -> IMP::Float"""
4209  return _IMP_core.SurfaceMover_get_reflect_probability(self)
4210 
4211  def get_surface(self):
4212  r"""get_surface(SurfaceMover self) -> Surface"""
4213  return _IMP_core.SurfaceMover_get_surface(self)
4214 
4215  def get_version_info(self):
4216  r"""get_version_info(SurfaceMover self) -> VersionInfo"""
4217  return _IMP_core.SurfaceMover_get_version_info(self)
4218  __swig_destroy__ = _IMP_core.delete_SurfaceMover
4219 
4220  def __str__(self):
4221  r"""__str__(SurfaceMover self) -> std::string"""
4222  return _IMP_core.SurfaceMover___str__(self)
4223 
4224  def __repr__(self):
4225  r"""__repr__(SurfaceMover self) -> std::string"""
4226  return _IMP_core.SurfaceMover___repr__(self)
4227 
4228  @staticmethod
4229  def get_from(o):
4230  return _object_cast_to_SurfaceMover(o)
4231 
4232 
4233  def _get_as_binary(self):
4234  r"""_get_as_binary(SurfaceMover self) -> PyObject *"""
4235  return _IMP_core.SurfaceMover__get_as_binary(self)
4236 
4237  def _set_from_binary(self, p):
4238  r"""_set_from_binary(SurfaceMover self, PyObject * p)"""
4239  return _IMP_core.SurfaceMover__set_from_binary(self, p)
4240 
4241  def __getstate__(self):
4242  p = self._get_as_binary()
4243  if len(self.__dict__) > 1:
4244  d = self.__dict__.copy()
4245  del d['this']
4246  p = (d, p)
4247  return p
4248 
4249  def __setstate__(self, p):
4250  if not hasattr(self, 'this'):
4251  self.__init__()
4252  if isinstance(p, tuple):
4253  d, p = p
4254  self.__dict__.update(d)
4255  return self._set_from_binary(p)
4256 
4257 
4258 # Register SurfaceMover in _IMP_core:
4259 _IMP_core.SurfaceMover_swigregister(SurfaceMover)
4260 class BoxSweepClosePairsFinder(ClosePairsFinder):
4261  r"""Proxy of C++ IMP::core::BoxSweepClosePairsFinder class."""
4262 
4263  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4264 
4265  def __init__(self):
4266  r"""__init__(BoxSweepClosePairsFinder self) -> BoxSweepClosePairsFinder"""
4267  _IMP_core.BoxSweepClosePairsFinder_swiginit(self, _IMP_core.new_BoxSweepClosePairsFinder())
4268 
4269  def get_close_pairs(self, *args):
4270  r"""
4271  get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4272  get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4273  get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
4274  get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
4275  """
4276  return _IMP_core.BoxSweepClosePairsFinder_get_close_pairs(self, *args)
4277 
4278  def do_get_inputs(self, m, pis):
4279  r"""do_get_inputs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4280  return _IMP_core.BoxSweepClosePairsFinder_do_get_inputs(self, m, pis)
4281 
4282  def get_version_info(self):
4283  r"""get_version_info(BoxSweepClosePairsFinder self) -> VersionInfo"""
4284  return _IMP_core.BoxSweepClosePairsFinder_get_version_info(self)
4285  __swig_destroy__ = _IMP_core.delete_BoxSweepClosePairsFinder
4286 
4287  def __str__(self):
4288  r"""__str__(BoxSweepClosePairsFinder self) -> std::string"""
4289  return _IMP_core.BoxSweepClosePairsFinder___str__(self)
4290 
4291  def __repr__(self):
4292  r"""__repr__(BoxSweepClosePairsFinder self) -> std::string"""
4293  return _IMP_core.BoxSweepClosePairsFinder___repr__(self)
4294 
4295  @staticmethod
4296  def get_from(o):
4297  return _object_cast_to_BoxSweepClosePairsFinder(o)
4298 
4299 
4300 # Register BoxSweepClosePairsFinder in _IMP_core:
4301 _IMP_core.BoxSweepClosePairsFinder_swigregister(BoxSweepClosePairsFinder)
4302 class CentroidOfRefined(IMP.SingletonModifier):
4303  r"""Proxy of C++ IMP::core::CentroidOfRefined class."""
4304 
4305  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4306 
4307  def __init__(self, *args):
4308  r"""
4309  __init__(CentroidOfRefined self, Refiner r, FloatKey weight=IMP::FloatKey(), IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> CentroidOfRefined
4310  __init__(CentroidOfRefined self) -> CentroidOfRefined
4311  """
4312  _IMP_core.CentroidOfRefined_swiginit(self, _IMP_core.new_CentroidOfRefined(*args))
4313 
4314  def get_refiner(self):
4315  r"""get_refiner(CentroidOfRefined self) -> Refiner"""
4316  return _IMP_core.CentroidOfRefined_get_refiner(self)
4317 
4318  def get_weight(self):
4319  r"""get_weight(CentroidOfRefined self) -> FloatKey"""
4320  return _IMP_core.CentroidOfRefined_get_weight(self)
4321 
4322  def get_keys(self):
4323  r"""get_keys(CentroidOfRefined self) -> IMP::FloatKeys"""
4324  return _IMP_core.CentroidOfRefined_get_keys(self)
4325 
4326  def get_is_weight_null(self):
4327  r"""get_is_weight_null(CentroidOfRefined self) -> bool"""
4328  return _IMP_core.CentroidOfRefined_get_is_weight_null(self)
4329 
4330  def do_get_inputs(self, m, pis):
4331  r"""do_get_inputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4332  return _IMP_core.CentroidOfRefined_do_get_inputs(self, m, pis)
4333 
4334  def do_get_outputs(self, m, pis):
4335  r"""do_get_outputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4336  return _IMP_core.CentroidOfRefined_do_get_outputs(self, m, pis)
4337 
4338  def get_version_info(self):
4339  r"""get_version_info(CentroidOfRefined self) -> VersionInfo"""
4340  return _IMP_core.CentroidOfRefined_get_version_info(self)
4341  __swig_destroy__ = _IMP_core.delete_CentroidOfRefined
4342 
4343  def __str__(self):
4344  r"""__str__(CentroidOfRefined self) -> std::string"""
4345  return _IMP_core.CentroidOfRefined___str__(self)
4346 
4347  def __repr__(self):
4348  r"""__repr__(CentroidOfRefined self) -> std::string"""
4349  return _IMP_core.CentroidOfRefined___repr__(self)
4350 
4351  @staticmethod
4352  def get_from(o):
4353  return _object_cast_to_CentroidOfRefined(o)
4354 
4355 
4356  def _get_as_binary(self):
4357  r"""_get_as_binary(CentroidOfRefined self) -> PyObject *"""
4358  return _IMP_core.CentroidOfRefined__get_as_binary(self)
4359 
4360  def _set_from_binary(self, p):
4361  r"""_set_from_binary(CentroidOfRefined self, PyObject * p)"""
4362  return _IMP_core.CentroidOfRefined__set_from_binary(self, p)
4363 
4364  def __getstate__(self):
4365  p = self._get_as_binary()
4366  if len(self.__dict__) > 1:
4367  d = self.__dict__.copy()
4368  del d['this']
4369  p = (d, p)
4370  return p
4371 
4372  def __setstate__(self, p):
4373  if not hasattr(self, 'this'):
4374  self.__init__()
4375  if isinstance(p, tuple):
4376  d, p = p
4377  self.__dict__.update(d)
4378  return self._set_from_binary(p)
4379 
4380 
4381  def _get_jax(self, m, indexes):
4382  import jax.numpy as jnp
4383  refined = [
4384  self.get_refiner().get_refined_indexes(m, IMP.ParticleIndex(index))
4385  for index in indexes]
4386 
4387  def apply_func_unweighted(jm):
4388  for ind, ref in zip(indexes, refined):
4389  xyz = jm['xyz']
4390  jm['xyz'] = xyz.at[ind].set(jnp.average(xyz[ref], axis=0))
4391  return jm
4392 
4393  def apply_func_weighted(jm, weight_key):
4394  for ind, ref in zip(indexes, refined):
4395  xyz = jm['xyz']
4396  weights = jm[weight_key][ref]
4397  jm['xyz'] = xyz.at[ind].set(
4398  jnp.average(xyz[ref], axis=0, weights=weights))
4399  return jm
4400 
4401  keys = frozenset(self.get_keys())
4402  if keys != frozenset(IMP.core.XYZ.get_xyz_keys()):
4403  raise NotImplementedError("Only works for XYZ")
4404 
4405  if self.get_is_weight_null():
4406  return self._wrap_jax(apply_func_unweighted)
4407  else:
4408  weight_key = self.get_weight()
4409  return self._wrap_jax(
4410  functools.partial(apply_func_weighted,
4411  weight_key=weight_key.get_string()),
4412  keys=(weight_key,))
4413 
4414 
4415 # Register CentroidOfRefined in _IMP_core:
4416 _IMP_core.CentroidOfRefined_swigregister(CentroidOfRefined)
4417 class Centroid(XYZ):
4418  r"""Proxy of C++ IMP::core::Centroid class."""
4419 
4420  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4421 
4422  def get_constraint(self):
4423  r"""get_constraint(Centroid self) -> Constraint"""
4424  return _IMP_core.Centroid_get_constraint(self)
4425 
4426  def __init__(self, *args):
4427  r"""
4428  __init__(Centroid self) -> Centroid
4429  __init__(Centroid self, Model m, ParticleIndex id) -> Centroid
4430  __init__(Centroid self, _ParticleAdaptor d) -> Centroid
4431  """
4432  _IMP_core.Centroid_swiginit(self, _IMP_core.new_Centroid(*args))
4433 
4434  def show(self, *args):
4435  r"""show(Centroid self, _ostream out=std::cout)"""
4436  return _IMP_core.Centroid_show(self, *args)
4437 
4438  @staticmethod
4439  def setup_particle(*args):
4440  r"""
4441  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Centroid
4442  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Centroid
4443  setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Centroid
4444  setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Centroid
4445  """
4446  return _IMP_core.Centroid_setup_particle(*args)
4447 
4448  @staticmethod
4449  def get_is_setup(*args):
4450  r"""
4451  get_is_setup(_ParticleAdaptor p) -> bool
4452  get_is_setup(Model m, ParticleIndex pi) -> bool
4453  """
4454  return _IMP_core.Centroid_get_is_setup(*args)
4455 
4456  def add_attribute(self, *args):
4457  r"""
4458  add_attribute(Centroid self, FloatKey k, IMP::Float v, bool opt)
4459  add_attribute(Centroid self, FloatKey a0, IMP::Float a1)
4460  add_attribute(Centroid self, IntKey a0, IMP::Int a1)
4461  add_attribute(Centroid self, FloatsKey a0, IMP::Floats a1)
4462  add_attribute(Centroid self, IntsKey a0, IMP::Ints a1)
4463  add_attribute(Centroid self, StringKey a0, IMP::String a1)
4464  add_attribute(Centroid self, ParticleIndexKey a0, Particle a1)
4465  add_attribute(Centroid self, ObjectKey a0, Object a1)
4466  add_attribute(Centroid self, SparseFloatKey a0, IMP::Float a1)
4467  add_attribute(Centroid self, SparseIntKey a0, IMP::Int a1)
4468  add_attribute(Centroid self, SparseStringKey a0, IMP::String a1)
4469  add_attribute(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4470  """
4471  return _IMP_core.Centroid_add_attribute(self, *args)
4472 
4473  def get_value(self, *args):
4474  r"""
4475  get_value(Centroid self, FloatKey a0) -> IMP::Float
4476  get_value(Centroid self, IntKey a0) -> IMP::Int
4477  get_value(Centroid self, FloatsKey a0) -> IMP::Floats
4478  get_value(Centroid self, IntsKey a0) -> IMP::Ints
4479  get_value(Centroid self, StringKey a0) -> IMP::String
4480  get_value(Centroid self, ParticleIndexKey a0) -> Particle
4481  get_value(Centroid self, ObjectKey a0) -> Object
4482  get_value(Centroid self, SparseFloatKey a0) -> IMP::Float
4483  get_value(Centroid self, SparseIntKey a0) -> IMP::Int
4484  get_value(Centroid self, SparseStringKey a0) -> IMP::String
4485  get_value(Centroid self, SparseParticleIndexKey a0) -> ParticleIndex
4486  """
4487  return _IMP_core.Centroid_get_value(self, *args)
4488 
4489  def set_value(self, *args):
4490  r"""
4491  set_value(Centroid self, FloatKey a0, IMP::Float a1)
4492  set_value(Centroid self, IntKey a0, IMP::Int a1)
4493  set_value(Centroid self, FloatsKey a0, IMP::Floats a1)
4494  set_value(Centroid self, IntsKey a0, IMP::Ints a1)
4495  set_value(Centroid self, StringKey a0, IMP::String a1)
4496  set_value(Centroid self, ParticleIndexKey a0, Particle a1)
4497  set_value(Centroid self, ObjectKey a0, Object a1)
4498  set_value(Centroid self, SparseFloatKey a0, IMP::Float a1)
4499  set_value(Centroid self, SparseIntKey a0, IMP::Int a1)
4500  set_value(Centroid self, SparseStringKey a0, IMP::String a1)
4501  set_value(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4502  """
4503  return _IMP_core.Centroid_set_value(self, *args)
4504 
4505  def remove_attribute(self, *args):
4506  r"""
4507  remove_attribute(Centroid self, FloatKey a0)
4508  remove_attribute(Centroid self, IntKey a0)
4509  remove_attribute(Centroid self, FloatsKey a0)
4510  remove_attribute(Centroid self, IntsKey a0)
4511  remove_attribute(Centroid self, StringKey a0)
4512  remove_attribute(Centroid self, ParticleIndexKey a0)
4513  remove_attribute(Centroid self, ObjectKey a0)
4514  remove_attribute(Centroid self, SparseFloatKey a0)
4515  remove_attribute(Centroid self, SparseIntKey a0)
4516  remove_attribute(Centroid self, SparseStringKey a0)
4517  remove_attribute(Centroid self, SparseParticleIndexKey a0)
4518  """
4519  return _IMP_core.Centroid_remove_attribute(self, *args)
4520 
4521  def has_attribute(self, *args):
4522  r"""
4523  has_attribute(Centroid self, FloatKey a0) -> bool
4524  has_attribute(Centroid self, IntKey a0) -> bool
4525  has_attribute(Centroid self, FloatsKey a0) -> bool
4526  has_attribute(Centroid self, IntsKey a0) -> bool
4527  has_attribute(Centroid self, StringKey a0) -> bool
4528  has_attribute(Centroid self, ParticleIndexKey a0) -> bool
4529  has_attribute(Centroid self, ObjectKey a0) -> bool
4530  has_attribute(Centroid self, SparseFloatKey a0) -> bool
4531  has_attribute(Centroid self, SparseIntKey a0) -> bool
4532  has_attribute(Centroid self, SparseStringKey a0) -> bool
4533  has_attribute(Centroid self, SparseParticleIndexKey a0) -> bool
4534  """
4535  return _IMP_core.Centroid_has_attribute(self, *args)
4536 
4537  def get_derivative(self, a0):
4538  r"""get_derivative(Centroid self, FloatKey a0) -> double"""
4539  return _IMP_core.Centroid_get_derivative(self, a0)
4540 
4541  def get_name(self):
4542  r"""get_name(Centroid self) -> std::string"""
4543  return _IMP_core.Centroid_get_name(self)
4544 
4545  def clear_caches(self):
4546  r"""clear_caches(Centroid self)"""
4547  return _IMP_core.Centroid_clear_caches(self)
4548 
4549  def set_name(self, a0):
4550  r"""set_name(Centroid self, std::string a0)"""
4551  return _IMP_core.Centroid_set_name(self, a0)
4552 
4553  def set_check_level(self, a0):
4554  r"""set_check_level(Centroid self, IMP::CheckLevel a0)"""
4555  return _IMP_core.Centroid_set_check_level(self, a0)
4556 
4557  def add_to_derivative(self, a0, a1, a2):
4558  r"""add_to_derivative(Centroid self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
4559  return _IMP_core.Centroid_add_to_derivative(self, a0, a1, a2)
4560 
4561  def set_is_optimized(self, a0, a1):
4562  r"""set_is_optimized(Centroid self, FloatKey a0, bool a1)"""
4563  return _IMP_core.Centroid_set_is_optimized(self, a0, a1)
4564 
4565  def get_is_optimized(self, a0):
4566  r"""get_is_optimized(Centroid self, FloatKey a0) -> bool"""
4567  return _IMP_core.Centroid_get_is_optimized(self, a0)
4568 
4569  def get_check_level(self):
4570  r"""get_check_level(Centroid self) -> IMP::CheckLevel"""
4571  return _IMP_core.Centroid_get_check_level(self)
4572 
4573  def __eq__(self, *args):
4574  r"""
4575  __eq__(Centroid self, Centroid o) -> bool
4576  __eq__(Centroid self, Particle d) -> bool
4577  """
4578  return _IMP_core.Centroid___eq__(self, *args)
4579 
4580  def __ne__(self, *args):
4581  r"""
4582  __ne__(Centroid self, Centroid o) -> bool
4583  __ne__(Centroid self, Particle d) -> bool
4584  """
4585  return _IMP_core.Centroid___ne__(self, *args)
4586 
4587  def __le__(self, *args):
4588  r"""
4589  __le__(Centroid self, Centroid o) -> bool
4590  __le__(Centroid self, Particle d) -> bool
4591  """
4592  return _IMP_core.Centroid___le__(self, *args)
4593 
4594  def __lt__(self, *args):
4595  r"""
4596  __lt__(Centroid self, Centroid o) -> bool
4597  __lt__(Centroid self, Particle d) -> bool
4598  """
4599  return _IMP_core.Centroid___lt__(self, *args)
4600 
4601  def __ge__(self, *args):
4602  r"""
4603  __ge__(Centroid self, Centroid o) -> bool
4604  __ge__(Centroid self, Particle d) -> bool
4605  """
4606  return _IMP_core.Centroid___ge__(self, *args)
4607 
4608  def __gt__(self, *args):
4609  r"""
4610  __gt__(Centroid self, Centroid o) -> bool
4611  __gt__(Centroid self, Particle d) -> bool
4612  """
4613  return _IMP_core.Centroid___gt__(self, *args)
4614 
4615  def __hash__(self):
4616  r"""__hash__(Centroid self) -> std::size_t"""
4617  return _IMP_core.Centroid___hash__(self)
4618 
4619  def __str__(self):
4620  r"""__str__(Centroid self) -> std::string"""
4621  return _IMP_core.Centroid___str__(self)
4622 
4623  def __repr__(self):
4624  r"""__repr__(Centroid self) -> std::string"""
4625  return _IMP_core.Centroid___repr__(self)
4626 
4627  def _get_as_binary(self):
4628  r"""_get_as_binary(Centroid self) -> PyObject *"""
4629  return _IMP_core.Centroid__get_as_binary(self)
4630 
4631  def _set_from_binary(self, p):
4632  r"""_set_from_binary(Centroid self, PyObject * p)"""
4633  return _IMP_core.Centroid__set_from_binary(self, p)
4634 
4635  def __getstate__(self):
4636  p = self._get_as_binary()
4637  if len(self.__dict__) > 1:
4638  d = self.__dict__.copy()
4639  del d['this']
4640  p = (d, p)
4641  return p
4642 
4643  def __setstate__(self, p):
4644  if not hasattr(self, 'this'):
4645  self.__init__()
4646  if isinstance(p, tuple):
4647  d, p = p
4648  self.__dict__.update(d)
4649  return self._set_from_binary(p)
4650 
4651  __swig_destroy__ = _IMP_core.delete_Centroid
4652 
4653 # Register Centroid in _IMP_core:
4654 _IMP_core.Centroid_swigregister(Centroid)
4655 class ChecksScoreState(IMP.ScoreState):
4656  r"""Proxy of C++ IMP::core::ChecksScoreState class."""
4657 
4658  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4659 
4660  def __init__(self, *args):
4661  r"""
4662  __init__(ChecksScoreState self, Model m, double probability) -> ChecksScoreState
4663  __init__(ChecksScoreState self) -> ChecksScoreState
4664  """
4665  _IMP_core.ChecksScoreState_swiginit(self, _IMP_core.new_ChecksScoreState(*args))
4666 
4667  def get_number_of_checked(self):
4668  r"""get_number_of_checked(ChecksScoreState self) -> unsigned int"""
4669  return _IMP_core.ChecksScoreState_get_number_of_checked(self)
4670 
4671  def do_before_evaluate(self):
4672  r"""do_before_evaluate(ChecksScoreState self)"""
4673  return _IMP_core.ChecksScoreState_do_before_evaluate(self)
4674 
4675  def do_after_evaluate(self, da):
4676  r"""do_after_evaluate(ChecksScoreState self, DerivativeAccumulator da)"""
4677  return _IMP_core.ChecksScoreState_do_after_evaluate(self, da)
4678 
4679  def do_get_outputs(self):
4680  r"""do_get_outputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4681  return _IMP_core.ChecksScoreState_do_get_outputs(self)
4682 
4683  def do_get_inputs(self):
4684  r"""do_get_inputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4685  return _IMP_core.ChecksScoreState_do_get_inputs(self)
4686 
4687  def get_version_info(self):
4688  r"""get_version_info(ChecksScoreState self) -> VersionInfo"""
4689  return _IMP_core.ChecksScoreState_get_version_info(self)
4690  __swig_destroy__ = _IMP_core.delete_ChecksScoreState
4691 
4692  def __str__(self):
4693  r"""__str__(ChecksScoreState self) -> std::string"""
4694  return _IMP_core.ChecksScoreState___str__(self)
4695 
4696  def __repr__(self):
4697  r"""__repr__(ChecksScoreState self) -> std::string"""
4698  return _IMP_core.ChecksScoreState___repr__(self)
4699 
4700  @staticmethod
4701  def get_from(o):
4702  return _object_cast_to_ChecksScoreState(o)
4703 
4704 
4705  def _get_as_binary(self):
4706  r"""_get_as_binary(ChecksScoreState self) -> PyObject *"""
4707  return _IMP_core.ChecksScoreState__get_as_binary(self)
4708 
4709  def _set_from_binary(self, p):
4710  r"""_set_from_binary(ChecksScoreState self, PyObject * p)"""
4711  return _IMP_core.ChecksScoreState__set_from_binary(self, p)
4712 
4713  def __getstate__(self):
4714  p = self._get_as_binary()
4715  if len(self.__dict__) > 1:
4716  d = self.__dict__.copy()
4717  del d['this']
4718  p = (d, p)
4719  return p
4720 
4721  def __setstate__(self, p):
4722  if not hasattr(self, 'this'):
4723  self.__init__()
4724  if isinstance(p, tuple):
4725  d, p = p
4726  self.__dict__.update(d)
4727  return self._set_from_binary(p)
4728 
4729 
4730 # Register ChecksScoreState in _IMP_core:
4731 _IMP_core.ChecksScoreState_swigregister(ChecksScoreState)
4732 class ChildrenRefiner(IMP.Refiner):
4733  r"""Proxy of C++ IMP::core::ChildrenRefiner class."""
4734 
4735  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4736 
4737  def __init__(self, tr):
4738  r"""__init__(ChildrenRefiner self, HierarchyTraits tr) -> ChildrenRefiner"""
4739  _IMP_core.ChildrenRefiner_swiginit(self, _IMP_core.new_ChildrenRefiner(tr))
4740 
4741  def do_get_inputs(self, m, pis):
4742  r"""do_get_inputs(ChildrenRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4743  return _IMP_core.ChildrenRefiner_do_get_inputs(self, m, pis)
4744 
4745  def get_version_info(self):
4746  r"""get_version_info(ChildrenRefiner self) -> VersionInfo"""
4747  return _IMP_core.ChildrenRefiner_get_version_info(self)
4748  __swig_destroy__ = _IMP_core.delete_ChildrenRefiner
4749 
4750  def __str__(self):
4751  r"""__str__(ChildrenRefiner self) -> std::string"""
4752  return _IMP_core.ChildrenRefiner___str__(self)
4753 
4754  def __repr__(self):
4755  r"""__repr__(ChildrenRefiner self) -> std::string"""
4756  return _IMP_core.ChildrenRefiner___repr__(self)
4757 
4758  @staticmethod
4759  def get_from(o):
4760  return _object_cast_to_ChildrenRefiner(o)
4761 
4762 
4763 # Register ChildrenRefiner in _IMP_core:
4764 _IMP_core.ChildrenRefiner_swigregister(ChildrenRefiner)
4765 class ClosedCubicSpline(IMP.UnaryFunction):
4766  r"""Proxy of C++ IMP::core::ClosedCubicSpline class."""
4767 
4768  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4769 
4770  def __init__(self, values, minrange, spacing):
4771  r"""__init__(ClosedCubicSpline self, IMP::Floats const & values, double minrange, double spacing) -> ClosedCubicSpline"""
4772  _IMP_core.ClosedCubicSpline_swiginit(self, _IMP_core.new_ClosedCubicSpline(values, minrange, spacing))
4773 
4774  def get_version_info(self):
4775  r"""get_version_info(ClosedCubicSpline self) -> VersionInfo"""
4776  return _IMP_core.ClosedCubicSpline_get_version_info(self)
4777  __swig_destroy__ = _IMP_core.delete_ClosedCubicSpline
4778 
4779  def do_show(self, out):
4780  r"""do_show(ClosedCubicSpline self, _ostream out)"""
4781  return _IMP_core.ClosedCubicSpline_do_show(self, out)
4782 
4783  def get_minrange(self):
4784  r"""get_minrange(ClosedCubicSpline self) -> IMP::Float"""
4785  return _IMP_core.ClosedCubicSpline_get_minrange(self)
4786 
4787  def get_spacing(self):
4788  r"""get_spacing(ClosedCubicSpline self) -> IMP::Float"""
4789  return _IMP_core.ClosedCubicSpline_get_spacing(self)
4790 
4791  def get_values(self):
4792  r"""get_values(ClosedCubicSpline self) -> IMP::Floats"""
4793  return _IMP_core.ClosedCubicSpline_get_values(self)
4794 
4795  def get_second_derivatives(self):
4796  r"""get_second_derivatives(ClosedCubicSpline self) -> IMP::Floats"""
4797  return _IMP_core.ClosedCubicSpline_get_second_derivatives(self)
4798 
4799  def __str__(self):
4800  r"""__str__(ClosedCubicSpline self) -> std::string"""
4801  return _IMP_core.ClosedCubicSpline___str__(self)
4802 
4803  def __repr__(self):
4804  r"""__repr__(ClosedCubicSpline self) -> std::string"""
4805  return _IMP_core.ClosedCubicSpline___repr__(self)
4806 
4807  @staticmethod
4808  def get_from(o):
4809  return _object_cast_to_ClosedCubicSpline(o)
4810 
4811 
4812  def _get_jax(self):
4813  import jax.numpy as jnp
4814  from IMP.core._jax_util import _spline
4815  def score(feature, minrange, spacing, values, second_derivs):
4816  # determine bin index and thus the cubic fragment to use:
4817  lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
4818  # enforce periodicity - wrap around from n to 0
4819  highbin = jnp.remainder(lowbin + 1, len(values))
4820  return _spline(feature, minrange, lowbin, highbin, spacing,
4821  values, second_derivs)
4822  return functools.partial(
4823  score, minrange=self.get_minrange(),
4824  spacing=self.get_spacing(), values=jnp.asarray(self.get_values()),
4825  second_derivs=jnp.asarray(self.get_second_derivatives()))
4826 
4827 
4828 # Register ClosedCubicSpline in _IMP_core:
4829 _IMP_core.ClosedCubicSpline_swigregister(ClosedCubicSpline)
4830 class KClosePairsPairScore(IMP.PairScore):
4831  r"""Proxy of C++ IMP::core::KClosePairsPairScore class."""
4832 
4833  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4834 
4835  def __init__(self, f, r, k=1):
4836  r"""__init__(KClosePairsPairScore self, PairScore f, Refiner r, int k=1) -> KClosePairsPairScore"""
4837  _IMP_core.KClosePairsPairScore_swiginit(self, _IMP_core.new_KClosePairsPairScore(f, r, k))
4838 
4839  def get_close_pairs(self, pp):
4840  r"""get_close_pairs(KClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
4841  return _IMP_core.KClosePairsPairScore_get_close_pairs(self, pp)
4842 
4843  def create_current_decomposition(self, m, vt):
4844  r"""create_current_decomposition(KClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
4845  return _IMP_core.KClosePairsPairScore_create_current_decomposition(self, m, vt)
4846 
4847  def do_get_inputs(self, m, pis):
4848  r"""do_get_inputs(KClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4849  return _IMP_core.KClosePairsPairScore_do_get_inputs(self, m, pis)
4850 
4851  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
4852  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"""
4853  return _IMP_core.KClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
4854 
4855  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
4856  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"""
4857  return _IMP_core.KClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
4858 
4859  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
4860  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"""
4861  return _IMP_core.KClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
4862 
4863  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
4864  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"""
4865  return _IMP_core.KClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
4866 
4867  def get_version_info(self):
4868  r"""get_version_info(KClosePairsPairScore self) -> VersionInfo"""
4869  return _IMP_core.KClosePairsPairScore_get_version_info(self)
4870  __swig_destroy__ = _IMP_core.delete_KClosePairsPairScore
4871 
4872  def __str__(self):
4873  r"""__str__(KClosePairsPairScore self) -> std::string"""
4874  return _IMP_core.KClosePairsPairScore___str__(self)
4875 
4876  def __repr__(self):
4877  r"""__repr__(KClosePairsPairScore self) -> std::string"""
4878  return _IMP_core.KClosePairsPairScore___repr__(self)
4879 
4880  @staticmethod
4881  def get_from(o):
4882  return _object_cast_to_KClosePairsPairScore(o)
4883 
4884 
4885 # Register KClosePairsPairScore in _IMP_core:
4886 _IMP_core.KClosePairsPairScore_swigregister(KClosePairsPairScore)
4887 class ClosePairsPairScore(IMP.PairScore):
4888  r"""Proxy of C++ IMP::core::ClosePairsPairScore class."""
4889 
4890  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4891 
4892  def __init__(self, f, r, max_distance):
4893  r"""__init__(ClosePairsPairScore self, PairScore f, Refiner r, IMP::Float max_distance) -> ClosePairsPairScore"""
4894  _IMP_core.ClosePairsPairScore_swiginit(self, _IMP_core.new_ClosePairsPairScore(f, r, max_distance))
4895 
4896  def get_close_pairs(self, pp):
4897  r"""get_close_pairs(ClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
4898  return _IMP_core.ClosePairsPairScore_get_close_pairs(self, pp)
4899 
4900  def create_current_decomposition(self, m, vt):
4901  r"""create_current_decomposition(ClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
4902  return _IMP_core.ClosePairsPairScore_create_current_decomposition(self, m, vt)
4903 
4904  def do_get_inputs(self, m, pis):
4905  r"""do_get_inputs(ClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4906  return _IMP_core.ClosePairsPairScore_do_get_inputs(self, m, pis)
4907 
4908  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
4909  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"""
4910  return _IMP_core.ClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
4911 
4912  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
4913  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"""
4914  return _IMP_core.ClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
4915 
4916  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
4917  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"""
4918  return _IMP_core.ClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
4919 
4920  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
4921  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"""
4922  return _IMP_core.ClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
4923 
4924  def get_version_info(self):
4925  r"""get_version_info(ClosePairsPairScore self) -> VersionInfo"""
4926  return _IMP_core.ClosePairsPairScore_get_version_info(self)
4927  __swig_destroy__ = _IMP_core.delete_ClosePairsPairScore
4928 
4929  def __str__(self):
4930  r"""__str__(ClosePairsPairScore self) -> std::string"""
4931  return _IMP_core.ClosePairsPairScore___str__(self)
4932 
4933  def __repr__(self):
4934  r"""__repr__(ClosePairsPairScore self) -> std::string"""
4935  return _IMP_core.ClosePairsPairScore___repr__(self)
4936 
4937  @staticmethod
4938  def get_from(o):
4939  return _object_cast_to_ClosePairsPairScore(o)
4940 
4941 
4942 # Register ClosePairsPairScore in _IMP_core:
4943 _IMP_core.ClosePairsPairScore_swigregister(ClosePairsPairScore)
4944 class ConjugateGradients(IMP.AttributeOptimizer):
4945  r"""Proxy of C++ IMP::core::ConjugateGradients class."""
4946 
4947  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4948 
4949  def __init__(self, *args):
4950  r"""
4951  __init__(ConjugateGradients self, Model m, std::string name="ConjugateGradients%1%") -> ConjugateGradients
4952  __init__(ConjugateGradients self) -> ConjugateGradients
4953  """
4954  _IMP_core.ConjugateGradients_swiginit(self, _IMP_core.new_ConjugateGradients(*args))
4955 
4956  def set_gradient_threshold(self, t):
4957  r"""set_gradient_threshold(ConjugateGradients self, IMP::Float t)"""
4958  return _IMP_core.ConjugateGradients_set_gradient_threshold(self, t)
4959 
4960  def set_max_change(self, t):
4961  r"""set_max_change(ConjugateGradients self, IMP::Float t)"""
4962  return _IMP_core.ConjugateGradients_set_max_change(self, t)
4963 
4964  def do_optimize(self, max_steps):
4965  r"""do_optimize(ConjugateGradients self, unsigned int max_steps) -> IMP::Float"""
4966  return _IMP_core.ConjugateGradients_do_optimize(self, max_steps)
4967 
4968  def get_version_info(self):
4969  r"""get_version_info(ConjugateGradients self) -> VersionInfo"""
4970  return _IMP_core.ConjugateGradients_get_version_info(self)
4971  __swig_destroy__ = _IMP_core.delete_ConjugateGradients
4972 
4973  def __str__(self):
4974  r"""__str__(ConjugateGradients self) -> std::string"""
4975  return _IMP_core.ConjugateGradients___str__(self)
4976 
4977  def __repr__(self):
4978  r"""__repr__(ConjugateGradients self) -> std::string"""
4979  return _IMP_core.ConjugateGradients___repr__(self)
4980 
4981  @staticmethod
4982  def get_from(o):
4983  return _object_cast_to_ConjugateGradients(o)
4984 
4985 
4986  def _get_as_binary(self):
4987  r"""_get_as_binary(ConjugateGradients self) -> PyObject *"""
4988  return _IMP_core.ConjugateGradients__get_as_binary(self)
4989 
4990  def _set_from_binary(self, p):
4991  r"""_set_from_binary(ConjugateGradients self, PyObject * p)"""
4992  return _IMP_core.ConjugateGradients__set_from_binary(self, p)
4993 
4994  def __getstate__(self):
4995  p = self._get_as_binary()
4996  if len(self.__dict__) > 1:
4997  d = self.__dict__.copy()
4998  del d['this']
4999  p = (d, p)
5000  return p
5001 
5002  def __setstate__(self, p):
5003  if not hasattr(self, 'this'):
5004  self.__init__()
5005  if isinstance(p, tuple):
5006  d, p = p
5007  self.__dict__.update(d)
5008  return self._set_from_binary(p)
5009 
5010 
5011 # Register ConjugateGradients in _IMP_core:
5012 _IMP_core.ConjugateGradients_swigregister(ConjugateGradients)
5013 class ConnectivityRestraint(IMP.Restraint):
5014  r"""Proxy of C++ IMP::core::ConnectivityRestraint class."""
5015 
5016  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5017 
5018  def __init__(self, ps, sc):
5019  r"""__init__(ConnectivityRestraint self, PairScore ps, _SingletonContainerAdaptor sc) -> ConnectivityRestraint"""
5020  _IMP_core.ConnectivityRestraint_swiginit(self, _IMP_core.new_ConnectivityRestraint(ps, sc))
5021 
5022  def get_connected_index_pairs(self):
5023  r"""get_connected_index_pairs(ConnectivityRestraint self) -> IMP::ParticleIndexPairs"""
5024  return _IMP_core.ConnectivityRestraint_get_connected_index_pairs(self)
5025 
5026  def get_pair_score(self):
5027  r"""get_pair_score(ConnectivityRestraint self) -> PairScore"""
5028  return _IMP_core.ConnectivityRestraint_get_pair_score(self)
5029 
5030  def do_create_current_decomposition(self):
5031  r"""do_create_current_decomposition(ConnectivityRestraint self) -> IMP::Restraints"""
5032  return _IMP_core.ConnectivityRestraint_do_create_current_decomposition(self)
5033 
5034  def do_get_inputs(self):
5035  r"""do_get_inputs(ConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
5036  return _IMP_core.ConnectivityRestraint_do_get_inputs(self)
5037 
5038  def get_version_info(self):
5039  r"""get_version_info(ConnectivityRestraint self) -> VersionInfo"""
5040  return _IMP_core.ConnectivityRestraint_get_version_info(self)
5041  __swig_destroy__ = _IMP_core.delete_ConnectivityRestraint
5042 
5043  def __str__(self):
5044  r"""__str__(ConnectivityRestraint self) -> std::string"""
5045  return _IMP_core.ConnectivityRestraint___str__(self)
5046 
5047  def __repr__(self):
5048  r"""__repr__(ConnectivityRestraint self) -> std::string"""
5049  return _IMP_core.ConnectivityRestraint___repr__(self)
5050 
5051  @staticmethod
5052  def get_from(o):
5053  return _object_cast_to_ConnectivityRestraint(o)
5054 
5055 
5056 # Register ConnectivityRestraint in _IMP_core:
5057 _IMP_core.ConnectivityRestraint_swigregister(ConnectivityRestraint)
5058 class ConstantRestraint(IMP.Restraint):
5059  r"""Proxy of C++ IMP::core::ConstantRestraint class."""
5060 
5061  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5062 
5063  def __init__(self, *args):
5064  r"""
5065  __init__(ConstantRestraint self, Model m, IMP::Float v) -> ConstantRestraint
5066  __init__(ConstantRestraint self) -> ConstantRestraint
5067  """
5068  _IMP_core.ConstantRestraint_swiginit(self, _IMP_core.new_ConstantRestraint(*args))
5069 
5070  def do_get_inputs(self):
5071  r"""do_get_inputs(ConstantRestraint self) -> IMP::ModelObjectsTemp"""
5072  return _IMP_core.ConstantRestraint_do_get_inputs(self)
5073 
5074  def get_version_info(self):
5075  r"""get_version_info(ConstantRestraint self) -> VersionInfo"""
5076  return _IMP_core.ConstantRestraint_get_version_info(self)
5077  __swig_destroy__ = _IMP_core.delete_ConstantRestraint
5078 
5079  def __str__(self):
5080  r"""__str__(ConstantRestraint self) -> std::string"""
5081  return _IMP_core.ConstantRestraint___str__(self)
5082 
5083  def __repr__(self):
5084  r"""__repr__(ConstantRestraint self) -> std::string"""
5085  return _IMP_core.ConstantRestraint___repr__(self)
5086 
5087  @staticmethod
5088  def get_from(o):
5089  return _object_cast_to_ConstantRestraint(o)
5090 
5091 
5092  def _get_as_binary(self):
5093  r"""_get_as_binary(ConstantRestraint self) -> PyObject *"""
5094  return _IMP_core.ConstantRestraint__get_as_binary(self)
5095 
5096  def _set_from_binary(self, p):
5097  r"""_set_from_binary(ConstantRestraint self, PyObject * p)"""
5098  return _IMP_core.ConstantRestraint__set_from_binary(self, p)
5099 
5100  def __getstate__(self):
5101  p = self._get_as_binary()
5102  if len(self.__dict__) > 1:
5103  d = self.__dict__.copy()
5104  del d['this']
5105  p = (d, p)
5106  return p
5107 
5108  def __setstate__(self, p):
5109  if not hasattr(self, 'this'):
5110  self.__init__()
5111  if isinstance(p, tuple):
5112  d, p = p
5113  self.__dict__.update(d)
5114  return self._set_from_binary(p)
5115 
5116 
5117 # Register ConstantRestraint in _IMP_core:
5118 _IMP_core.ConstantRestraint_swigregister(ConstantRestraint)
5119 class Cosine(IMP.UnaryFunction):
5120  r"""Proxy of C++ IMP::core::Cosine class."""
5121 
5122  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5123 
5124  def __init__(self, *args):
5125  r"""
5126  __init__(Cosine self, IMP::Float force_constant, int periodicity, IMP::Float phase) -> Cosine
5127  __init__(Cosine self) -> Cosine
5128  """
5129  _IMP_core.Cosine_swiginit(self, _IMP_core.new_Cosine(*args))
5130 
5131  def get_force_constant(self):
5132  r"""get_force_constant(Cosine self) -> IMP::Float"""
5133  return _IMP_core.Cosine_get_force_constant(self)
5134 
5135  def get_periodicity(self):
5136  r"""get_periodicity(Cosine self) -> int"""
5137  return _IMP_core.Cosine_get_periodicity(self)
5138 
5139  def get_phase(self):
5140  r"""get_phase(Cosine self) -> IMP::Float"""
5141  return _IMP_core.Cosine_get_phase(self)
5142 
5143  def get_version_info(self):
5144  r"""get_version_info(Cosine self) -> VersionInfo"""
5145  return _IMP_core.Cosine_get_version_info(self)
5146  __swig_destroy__ = _IMP_core.delete_Cosine
5147 
5148  def do_show(self, out):
5149  r"""do_show(Cosine self, _ostream out)"""
5150  return _IMP_core.Cosine_do_show(self, out)
5151 
5152  def __str__(self):
5153  r"""__str__(Cosine self) -> std::string"""
5154  return _IMP_core.Cosine___str__(self)
5155 
5156  def __repr__(self):
5157  r"""__repr__(Cosine self) -> std::string"""
5158  return _IMP_core.Cosine___repr__(self)
5159 
5160  @staticmethod
5161  def get_from(o):
5162  return _object_cast_to_Cosine(o)
5163 
5164 
5165  def _get_as_binary(self):
5166  r"""_get_as_binary(Cosine self) -> PyObject *"""
5167  return _IMP_core.Cosine__get_as_binary(self)
5168 
5169  def _set_from_binary(self, p):
5170  r"""_set_from_binary(Cosine self, PyObject * p)"""
5171  return _IMP_core.Cosine__set_from_binary(self, p)
5172 
5173  def __getstate__(self):
5174  p = self._get_as_binary()
5175  if len(self.__dict__) > 1:
5176  d = self.__dict__.copy()
5177  del d['this']
5178  p = (d, p)
5179  return p
5180 
5181  def __setstate__(self, p):
5182  if not hasattr(self, 'this'):
5183  self.__init__()
5184  if isinstance(p, tuple):
5185  d, p = p
5186  self.__dict__.update(d)
5187  return self._set_from_binary(p)
5188 
5189 
5190  def _get_jax(self):
5191  import jax.numpy as jnp
5192  def score(val, k, period, phase):
5193  return jnp.abs(k) - k * jnp.cos(period * val + phase)
5194  return functools.partial(score, k=self.get_force_constant(),
5195  period=self.get_periodicity(),
5196  phase=self.get_phase())
5197 
5198 
5199 # Register Cosine in _IMP_core:
5200 _IMP_core.Cosine_swigregister(Cosine)
5201 class CoverRefined(IMP.SingletonModifier):
5202  r"""Proxy of C++ IMP::core::CoverRefined class."""
5203 
5204  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5205 
5206  def __init__(self, ref, slack=0):
5207  r"""__init__(CoverRefined self, Refiner ref, IMP::Float slack=0) -> CoverRefined"""
5208  _IMP_core.CoverRefined_swiginit(self, _IMP_core.new_CoverRefined(ref, slack))
5209 
5210  def set_slack(self, slack):
5211  r"""set_slack(CoverRefined self, IMP::Float slack)"""
5212  return _IMP_core.CoverRefined_set_slack(self, slack)
5213 
5214  def do_get_inputs(self, m, pis):
5215  r"""do_get_inputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5216  return _IMP_core.CoverRefined_do_get_inputs(self, m, pis)
5217 
5218  def do_get_outputs(self, m, pis):
5219  r"""do_get_outputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5220  return _IMP_core.CoverRefined_do_get_outputs(self, m, pis)
5221 
5222  def get_version_info(self):
5223  r"""get_version_info(CoverRefined self) -> VersionInfo"""
5224  return _IMP_core.CoverRefined_get_version_info(self)
5225  __swig_destroy__ = _IMP_core.delete_CoverRefined
5226 
5227  def __str__(self):
5228  r"""__str__(CoverRefined self) -> std::string"""
5229  return _IMP_core.CoverRefined___str__(self)
5230 
5231  def __repr__(self):
5232  r"""__repr__(CoverRefined self) -> std::string"""
5233  return _IMP_core.CoverRefined___repr__(self)
5234 
5235  @staticmethod
5236  def get_from(o):
5237  return _object_cast_to_CoverRefined(o)
5238 
5239 
5240 # Register CoverRefined in _IMP_core:
5241 _IMP_core.CoverRefined_swigregister(CoverRefined)
5242 class Cover(XYZR):
5243  r"""Proxy of C++ IMP::core::Cover class."""
5244 
5245  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5246 
5247  def get_constraint(self):
5248  r"""get_constraint(Cover self) -> Constraint"""
5249  return _IMP_core.Cover_get_constraint(self)
5250 
5251  def __init__(self, *args):
5252  r"""
5253  __init__(Cover self) -> Cover
5254  __init__(Cover self, Model m, ParticleIndex id) -> Cover
5255  __init__(Cover self, _ParticleAdaptor d) -> Cover
5256  """
5257  _IMP_core.Cover_swiginit(self, _IMP_core.new_Cover(*args))
5258 
5259  def show(self, *args):
5260  r"""show(Cover self, _ostream out=std::cout)"""
5261  return _IMP_core.Cover_show(self, *args)
5262 
5263  @staticmethod
5264  def setup_particle(*args):
5265  r"""
5266  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Cover
5267  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Cover
5268  setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Cover
5269  setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Cover
5270  """
5271  return _IMP_core.Cover_setup_particle(*args)
5272 
5273  @staticmethod
5274  def get_is_setup(*args):
5275  r"""
5276  get_is_setup(_ParticleAdaptor p) -> bool
5277  get_is_setup(Model m, ParticleIndex pi) -> bool
5278  """
5279  return _IMP_core.Cover_get_is_setup(*args)
5280 
5281  def add_attribute(self, *args):
5282  r"""
5283  add_attribute(Cover self, FloatKey k, IMP::Float v, bool opt)
5284  add_attribute(Cover self, FloatKey a0, IMP::Float a1)
5285  add_attribute(Cover self, IntKey a0, IMP::Int a1)
5286  add_attribute(Cover self, FloatsKey a0, IMP::Floats a1)
5287  add_attribute(Cover self, IntsKey a0, IMP::Ints a1)
5288  add_attribute(Cover self, StringKey a0, IMP::String a1)
5289  add_attribute(Cover self, ParticleIndexKey a0, Particle a1)
5290  add_attribute(Cover self, ObjectKey a0, Object a1)
5291  add_attribute(Cover self, SparseFloatKey a0, IMP::Float a1)
5292  add_attribute(Cover self, SparseIntKey a0, IMP::Int a1)
5293  add_attribute(Cover self, SparseStringKey a0, IMP::String a1)
5294  add_attribute(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5295  """
5296  return _IMP_core.Cover_add_attribute(self, *args)
5297 
5298  def get_value(self, *args):
5299  r"""
5300  get_value(Cover self, FloatKey a0) -> IMP::Float
5301  get_value(Cover self, IntKey a0) -> IMP::Int
5302  get_value(Cover self, FloatsKey a0) -> IMP::Floats
5303  get_value(Cover self, IntsKey a0) -> IMP::Ints
5304  get_value(Cover self, StringKey a0) -> IMP::String
5305  get_value(Cover self, ParticleIndexKey a0) -> Particle
5306  get_value(Cover self, ObjectKey a0) -> Object
5307  get_value(Cover self, SparseFloatKey a0) -> IMP::Float
5308  get_value(Cover self, SparseIntKey a0) -> IMP::Int
5309  get_value(Cover self, SparseStringKey a0) -> IMP::String
5310  get_value(Cover self, SparseParticleIndexKey a0) -> ParticleIndex
5311  """
5312  return _IMP_core.Cover_get_value(self, *args)
5313 
5314  def set_value(self, *args):
5315  r"""
5316  set_value(Cover self, FloatKey a0, IMP::Float a1)
5317  set_value(Cover self, IntKey a0, IMP::Int a1)
5318  set_value(Cover self, FloatsKey a0, IMP::Floats a1)
5319  set_value(Cover self, IntsKey a0, IMP::Ints a1)
5320  set_value(Cover self, StringKey a0, IMP::String a1)
5321  set_value(Cover self, ParticleIndexKey a0, Particle a1)
5322  set_value(Cover self, ObjectKey a0, Object a1)
5323  set_value(Cover self, SparseFloatKey a0, IMP::Float a1)
5324  set_value(Cover self, SparseIntKey a0, IMP::Int a1)
5325  set_value(Cover self, SparseStringKey a0, IMP::String a1)
5326  set_value(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5327  """
5328  return _IMP_core.Cover_set_value(self, *args)
5329 
5330  def remove_attribute(self, *args):
5331  r"""
5332  remove_attribute(Cover self, FloatKey a0)
5333  remove_attribute(Cover self, IntKey a0)
5334  remove_attribute(Cover self, FloatsKey a0)
5335  remove_attribute(Cover self, IntsKey a0)
5336  remove_attribute(Cover self, StringKey a0)
5337  remove_attribute(Cover self, ParticleIndexKey a0)
5338  remove_attribute(Cover self, ObjectKey a0)
5339  remove_attribute(Cover self, SparseFloatKey a0)
5340  remove_attribute(Cover self, SparseIntKey a0)
5341  remove_attribute(Cover self, SparseStringKey a0)
5342  remove_attribute(Cover self, SparseParticleIndexKey a0)
5343  """
5344  return _IMP_core.Cover_remove_attribute(self, *args)
5345 
5346  def has_attribute(self, *args):
5347  r"""
5348  has_attribute(Cover self, FloatKey a0) -> bool
5349  has_attribute(Cover self, IntKey a0) -> bool
5350  has_attribute(Cover self, FloatsKey a0) -> bool
5351  has_attribute(Cover self, IntsKey a0) -> bool
5352  has_attribute(Cover self, StringKey a0) -> bool
5353  has_attribute(Cover self, ParticleIndexKey a0) -> bool
5354  has_attribute(Cover self, ObjectKey a0) -> bool
5355  has_attribute(Cover self, SparseFloatKey a0) -> bool
5356  has_attribute(Cover self, SparseIntKey a0) -> bool
5357  has_attribute(Cover self, SparseStringKey a0) -> bool
5358  has_attribute(Cover self, SparseParticleIndexKey a0) -> bool
5359  """
5360  return _IMP_core.Cover_has_attribute(self, *args)
5361 
5362  def get_derivative(self, a0):
5363  r"""get_derivative(Cover self, FloatKey a0) -> double"""
5364  return _IMP_core.Cover_get_derivative(self, a0)
5365 
5366  def get_name(self):
5367  r"""get_name(Cover self) -> std::string"""
5368  return _IMP_core.Cover_get_name(self)
5369 
5370  def clear_caches(self):
5371  r"""clear_caches(Cover self)"""
5372  return _IMP_core.Cover_clear_caches(self)
5373 
5374  def set_name(self, a0):
5375  r"""set_name(Cover self, std::string a0)"""
5376  return _IMP_core.Cover_set_name(self, a0)
5377 
5378  def set_check_level(self, a0):
5379  r"""set_check_level(Cover self, IMP::CheckLevel a0)"""
5380  return _IMP_core.Cover_set_check_level(self, a0)
5381 
5382  def add_to_derivative(self, a0, a1, a2):
5383  r"""add_to_derivative(Cover self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5384  return _IMP_core.Cover_add_to_derivative(self, a0, a1, a2)
5385 
5386  def set_is_optimized(self, a0, a1):
5387  r"""set_is_optimized(Cover self, FloatKey a0, bool a1)"""
5388  return _IMP_core.Cover_set_is_optimized(self, a0, a1)
5389 
5390  def get_is_optimized(self, a0):
5391  r"""get_is_optimized(Cover self, FloatKey a0) -> bool"""
5392  return _IMP_core.Cover_get_is_optimized(self, a0)
5393 
5394  def get_check_level(self):
5395  r"""get_check_level(Cover self) -> IMP::CheckLevel"""
5396  return _IMP_core.Cover_get_check_level(self)
5397 
5398  def __eq__(self, *args):
5399  r"""
5400  __eq__(Cover self, Cover o) -> bool
5401  __eq__(Cover self, Particle d) -> bool
5402  """
5403  return _IMP_core.Cover___eq__(self, *args)
5404 
5405  def __ne__(self, *args):
5406  r"""
5407  __ne__(Cover self, Cover o) -> bool
5408  __ne__(Cover self, Particle d) -> bool
5409  """
5410  return _IMP_core.Cover___ne__(self, *args)
5411 
5412  def __le__(self, *args):
5413  r"""
5414  __le__(Cover self, Cover o) -> bool
5415  __le__(Cover self, Particle d) -> bool
5416  """
5417  return _IMP_core.Cover___le__(self, *args)
5418 
5419  def __lt__(self, *args):
5420  r"""
5421  __lt__(Cover self, Cover o) -> bool
5422  __lt__(Cover self, Particle d) -> bool
5423  """
5424  return _IMP_core.Cover___lt__(self, *args)
5425 
5426  def __ge__(self, *args):
5427  r"""
5428  __ge__(Cover self, Cover o) -> bool
5429  __ge__(Cover self, Particle d) -> bool
5430  """
5431  return _IMP_core.Cover___ge__(self, *args)
5432 
5433  def __gt__(self, *args):
5434  r"""
5435  __gt__(Cover self, Cover o) -> bool
5436  __gt__(Cover self, Particle d) -> bool
5437  """
5438  return _IMP_core.Cover___gt__(self, *args)
5439 
5440  def __hash__(self):
5441  r"""__hash__(Cover self) -> std::size_t"""
5442  return _IMP_core.Cover___hash__(self)
5443 
5444  def __str__(self):
5445  r"""__str__(Cover self) -> std::string"""
5446  return _IMP_core.Cover___str__(self)
5447 
5448  def __repr__(self):
5449  r"""__repr__(Cover self) -> std::string"""
5450  return _IMP_core.Cover___repr__(self)
5451 
5452  def _get_as_binary(self):
5453  r"""_get_as_binary(Cover self) -> PyObject *"""
5454  return _IMP_core.Cover__get_as_binary(self)
5455 
5456  def _set_from_binary(self, p):
5457  r"""_set_from_binary(Cover self, PyObject * p)"""
5458  return _IMP_core.Cover__set_from_binary(self, p)
5459 
5460  def __getstate__(self):
5461  p = self._get_as_binary()
5462  if len(self.__dict__) > 1:
5463  d = self.__dict__.copy()
5464  del d['this']
5465  p = (d, p)
5466  return p
5467 
5468  def __setstate__(self, p):
5469  if not hasattr(self, 'this'):
5470  self.__init__()
5471  if isinstance(p, tuple):
5472  d, p = p
5473  self.__dict__.update(d)
5474  return self._set_from_binary(p)
5475 
5476  __swig_destroy__ = _IMP_core.delete_Cover
5477 
5478 # Register Cover in _IMP_core:
5479 _IMP_core.Cover_swigregister(Cover)
5480 class DerivativesFromRefined(IMP.SingletonModifier):
5481  r"""Proxy of C++ IMP::core::DerivativesFromRefined class."""
5482 
5483  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5484 
5485  def __init__(self, *args):
5486  r"""__init__(DerivativesFromRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesFromRefined"""
5487  _IMP_core.DerivativesFromRefined_swiginit(self, _IMP_core.new_DerivativesFromRefined(*args))
5488 
5489  def do_get_inputs(self, m, pis):
5490  r"""do_get_inputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5491  return _IMP_core.DerivativesFromRefined_do_get_inputs(self, m, pis)
5492 
5493  def do_get_outputs(self, m, pis):
5494  r"""do_get_outputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5495  return _IMP_core.DerivativesFromRefined_do_get_outputs(self, m, pis)
5496 
5497  def get_version_info(self):
5498  r"""get_version_info(DerivativesFromRefined self) -> VersionInfo"""
5499  return _IMP_core.DerivativesFromRefined_get_version_info(self)
5500  __swig_destroy__ = _IMP_core.delete_DerivativesFromRefined
5501 
5502  def __str__(self):
5503  r"""__str__(DerivativesFromRefined self) -> std::string"""
5504  return _IMP_core.DerivativesFromRefined___str__(self)
5505 
5506  def __repr__(self):
5507  r"""__repr__(DerivativesFromRefined self) -> std::string"""
5508  return _IMP_core.DerivativesFromRefined___repr__(self)
5509 
5510  @staticmethod
5511  def get_from(o):
5512  return _object_cast_to_DerivativesFromRefined(o)
5513 
5514 
5515 # Register DerivativesFromRefined in _IMP_core:
5516 _IMP_core.DerivativesFromRefined_swigregister(DerivativesFromRefined)
5517 class DerivativesToRefined(IMP.SingletonModifier):
5518  r"""Proxy of C++ IMP::core::DerivativesToRefined class."""
5519 
5520  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5521 
5522  def __init__(self, *args):
5523  r"""
5524  __init__(DerivativesToRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesToRefined
5525  __init__(DerivativesToRefined self) -> DerivativesToRefined
5526  """
5527  _IMP_core.DerivativesToRefined_swiginit(self, _IMP_core.new_DerivativesToRefined(*args))
5528 
5529  def do_get_inputs(self, m, pis):
5530  r"""do_get_inputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5531  return _IMP_core.DerivativesToRefined_do_get_inputs(self, m, pis)
5532 
5533  def do_get_outputs(self, m, pis):
5534  r"""do_get_outputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5535  return _IMP_core.DerivativesToRefined_do_get_outputs(self, m, pis)
5536 
5537  def get_version_info(self):
5538  r"""get_version_info(DerivativesToRefined self) -> VersionInfo"""
5539  return _IMP_core.DerivativesToRefined_get_version_info(self)
5540  __swig_destroy__ = _IMP_core.delete_DerivativesToRefined
5541 
5542  def __str__(self):
5543  r"""__str__(DerivativesToRefined self) -> std::string"""
5544  return _IMP_core.DerivativesToRefined___str__(self)
5545 
5546  def __repr__(self):
5547  r"""__repr__(DerivativesToRefined self) -> std::string"""
5548  return _IMP_core.DerivativesToRefined___repr__(self)
5549 
5550  @staticmethod
5551  def get_from(o):
5552  return _object_cast_to_DerivativesToRefined(o)
5553 
5554 
5555  def _get_as_binary(self):
5556  r"""_get_as_binary(DerivativesToRefined self) -> PyObject *"""
5557  return _IMP_core.DerivativesToRefined__get_as_binary(self)
5558 
5559  def _set_from_binary(self, p):
5560  r"""_set_from_binary(DerivativesToRefined self, PyObject * p)"""
5561  return _IMP_core.DerivativesToRefined__set_from_binary(self, p)
5562 
5563  def __getstate__(self):
5564  p = self._get_as_binary()
5565  if len(self.__dict__) > 1:
5566  d = self.__dict__.copy()
5567  del d['this']
5568  p = (d, p)
5569  return p
5570 
5571  def __setstate__(self, p):
5572  if not hasattr(self, 'this'):
5573  self.__init__()
5574  if isinstance(p, tuple):
5575  d, p = p
5576  self.__dict__.update(d)
5577  return self._set_from_binary(p)
5578 
5579 
5580 # Register DerivativesToRefined in _IMP_core:
5581 _IMP_core.DerivativesToRefined_swigregister(DerivativesToRefined)
5582 class DiameterRestraint(IMP.Restraint):
5583  r"""Proxy of C++ IMP::core::DiameterRestraint class."""
5584 
5585  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5586 
5587  def __init__(self, f, sc, diameter):
5588  r"""__init__(DiameterRestraint self, UnaryFunction f, SingletonContainer sc, IMP::Float diameter) -> DiameterRestraint"""
5589  _IMP_core.DiameterRestraint_swiginit(self, _IMP_core.new_DiameterRestraint(f, sc, diameter))
5590 
5591  def do_get_inputs(self):
5592  r"""do_get_inputs(DiameterRestraint self) -> IMP::ModelObjectsTemp"""
5593  return _IMP_core.DiameterRestraint_do_get_inputs(self)
5594 
5595  def get_version_info(self):
5596  r"""get_version_info(DiameterRestraint self) -> VersionInfo"""
5597  return _IMP_core.DiameterRestraint_get_version_info(self)
5598  __swig_destroy__ = _IMP_core.delete_DiameterRestraint
5599 
5600  def do_create_decomposition(self):
5601  r"""do_create_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5602  return _IMP_core.DiameterRestraint_do_create_decomposition(self)
5603 
5604  def do_create_current_decomposition(self):
5605  r"""do_create_current_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5606  return _IMP_core.DiameterRestraint_do_create_current_decomposition(self)
5607 
5608  def __str__(self):
5609  r"""__str__(DiameterRestraint self) -> std::string"""
5610  return _IMP_core.DiameterRestraint___str__(self)
5611 
5612  def __repr__(self):
5613  r"""__repr__(DiameterRestraint self) -> std::string"""
5614  return _IMP_core.DiameterRestraint___repr__(self)
5615 
5616  @staticmethod
5617  def get_from(o):
5618  return _object_cast_to_DiameterRestraint(o)
5619 
5620 
5621 # Register DiameterRestraint in _IMP_core:
5622 _IMP_core.DiameterRestraint_swigregister(DiameterRestraint)
5623 class Transform(IMP.SingletonModifier):
5624  r"""Proxy of C++ IMP::core::Transform class."""
5625 
5626  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5627 
5628  def __init__(self, *args):
5629  r"""
5630  __init__(Transform self, Transformation3D t, bool ignore_non_xyz=False) -> Transform
5631  __init__(Transform self) -> Transform
5632  """
5633  _IMP_core.Transform_swiginit(self, _IMP_core.new_Transform(*args))
5634 
5635  def do_get_inputs(self, m, pis):
5636  r"""do_get_inputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5637  return _IMP_core.Transform_do_get_inputs(self, m, pis)
5638 
5639  def do_get_outputs(self, m, pis):
5640  r"""do_get_outputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5641  return _IMP_core.Transform_do_get_outputs(self, m, pis)
5642 
5643  def get_version_info(self):
5644  r"""get_version_info(Transform self) -> VersionInfo"""
5645  return _IMP_core.Transform_get_version_info(self)
5646  __swig_destroy__ = _IMP_core.delete_Transform
5647 
5648  def __str__(self):
5649  r"""__str__(Transform self) -> std::string"""
5650  return _IMP_core.Transform___str__(self)
5651 
5652  def __repr__(self):
5653  r"""__repr__(Transform self) -> std::string"""
5654  return _IMP_core.Transform___repr__(self)
5655 
5656  @staticmethod
5657  def get_from(o):
5658  return _object_cast_to_Transform(o)
5659 
5660 
5661  def _get_as_binary(self):
5662  r"""_get_as_binary(Transform self) -> PyObject *"""
5663  return _IMP_core.Transform__get_as_binary(self)
5664 
5665  def _set_from_binary(self, p):
5666  r"""_set_from_binary(Transform self, PyObject * p)"""
5667  return _IMP_core.Transform__set_from_binary(self, p)
5668 
5669  def __getstate__(self):
5670  p = self._get_as_binary()
5671  if len(self.__dict__) > 1:
5672  d = self.__dict__.copy()
5673  del d['this']
5674  p = (d, p)
5675  return p
5676 
5677  def __setstate__(self, p):
5678  if not hasattr(self, 'this'):
5679  self.__init__()
5680  if isinstance(p, tuple):
5681  d, p = p
5682  self.__dict__.update(d)
5683  return self._set_from_binary(p)
5684 
5685 
5686 # Register Transform in _IMP_core:
5687 _IMP_core.Transform_swigregister(Transform)
5688 class Reference(IMP.Decorator):
5689  r"""Proxy of C++ IMP::core::Reference class."""
5690 
5691  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5692 
5693  def __init__(self, *args):
5694  r"""
5695  __init__(Reference self) -> Reference
5696  __init__(Reference self, Model m, ParticleIndex id) -> Reference
5697  __init__(Reference self, _ParticleAdaptor d) -> Reference
5698  """
5699  _IMP_core.Reference_swiginit(self, _IMP_core.new_Reference(*args))
5700 
5701  def show(self, *args):
5702  r"""show(Reference self, _ostream out=std::cout)"""
5703  return _IMP_core.Reference_show(self, *args)
5704 
5705  @staticmethod
5706  def setup_particle(*args):
5707  r"""
5708  setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor reference) -> Reference
5709  setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor reference) -> Reference
5710  """
5711  return _IMP_core.Reference_setup_particle(*args)
5712 
5713  def get_reference_particle(self):
5714  r"""get_reference_particle(Reference self) -> Particle"""
5715  return _IMP_core.Reference_get_reference_particle(self)
5716 
5717  @staticmethod
5718  def get_is_setup(*args):
5719  r"""
5720  get_is_setup(_ParticleAdaptor p) -> bool
5721  get_is_setup(Model m, ParticleIndex pi) -> bool
5722  """
5723  return _IMP_core.Reference_get_is_setup(*args)
5724 
5725  @staticmethod
5726  def get_reference_key():
5727  r"""get_reference_key() -> ParticleIndexKey"""
5728  return _IMP_core.Reference_get_reference_key()
5729 
5730  def add_attribute(self, *args):
5731  r"""
5732  add_attribute(Reference self, FloatKey k, IMP::Float v, bool opt)
5733  add_attribute(Reference self, FloatKey a0, IMP::Float a1)
5734  add_attribute(Reference self, IntKey a0, IMP::Int a1)
5735  add_attribute(Reference self, FloatsKey a0, IMP::Floats a1)
5736  add_attribute(Reference self, IntsKey a0, IMP::Ints a1)
5737  add_attribute(Reference self, StringKey a0, IMP::String a1)
5738  add_attribute(Reference self, ParticleIndexKey a0, Particle a1)
5739  add_attribute(Reference self, ObjectKey a0, Object a1)
5740  add_attribute(Reference self, SparseFloatKey a0, IMP::Float a1)
5741  add_attribute(Reference self, SparseIntKey a0, IMP::Int a1)
5742  add_attribute(Reference self, SparseStringKey a0, IMP::String a1)
5743  add_attribute(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5744  """
5745  return _IMP_core.Reference_add_attribute(self, *args)
5746 
5747  def get_value(self, *args):
5748  r"""
5749  get_value(Reference self, FloatKey a0) -> IMP::Float
5750  get_value(Reference self, IntKey a0) -> IMP::Int
5751  get_value(Reference self, FloatsKey a0) -> IMP::Floats
5752  get_value(Reference self, IntsKey a0) -> IMP::Ints
5753  get_value(Reference self, StringKey a0) -> IMP::String
5754  get_value(Reference self, ParticleIndexKey a0) -> Particle
5755  get_value(Reference self, ObjectKey a0) -> Object
5756  get_value(Reference self, SparseFloatKey a0) -> IMP::Float
5757  get_value(Reference self, SparseIntKey a0) -> IMP::Int
5758  get_value(Reference self, SparseStringKey a0) -> IMP::String
5759  get_value(Reference self, SparseParticleIndexKey a0) -> ParticleIndex
5760  """
5761  return _IMP_core.Reference_get_value(self, *args)
5762 
5763  def set_value(self, *args):
5764  r"""
5765  set_value(Reference self, FloatKey a0, IMP::Float a1)
5766  set_value(Reference self, IntKey a0, IMP::Int a1)
5767  set_value(Reference self, FloatsKey a0, IMP::Floats a1)
5768  set_value(Reference self, IntsKey a0, IMP::Ints a1)
5769  set_value(Reference self, StringKey a0, IMP::String a1)
5770  set_value(Reference self, ParticleIndexKey a0, Particle a1)
5771  set_value(Reference self, ObjectKey a0, Object a1)
5772  set_value(Reference self, SparseFloatKey a0, IMP::Float a1)
5773  set_value(Reference self, SparseIntKey a0, IMP::Int a1)
5774  set_value(Reference self, SparseStringKey a0, IMP::String a1)
5775  set_value(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5776  """
5777  return _IMP_core.Reference_set_value(self, *args)
5778 
5779  def remove_attribute(self, *args):
5780  r"""
5781  remove_attribute(Reference self, FloatKey a0)
5782  remove_attribute(Reference self, IntKey a0)
5783  remove_attribute(Reference self, FloatsKey a0)
5784  remove_attribute(Reference self, IntsKey a0)
5785  remove_attribute(Reference self, StringKey a0)
5786  remove_attribute(Reference self, ParticleIndexKey a0)
5787  remove_attribute(Reference self, ObjectKey a0)
5788  remove_attribute(Reference self, SparseFloatKey a0)
5789  remove_attribute(Reference self, SparseIntKey a0)
5790  remove_attribute(Reference self, SparseStringKey a0)
5791  remove_attribute(Reference self, SparseParticleIndexKey a0)
5792  """
5793  return _IMP_core.Reference_remove_attribute(self, *args)
5794 
5795  def has_attribute(self, *args):
5796  r"""
5797  has_attribute(Reference self, FloatKey a0) -> bool
5798  has_attribute(Reference self, IntKey a0) -> bool
5799  has_attribute(Reference self, FloatsKey a0) -> bool
5800  has_attribute(Reference self, IntsKey a0) -> bool
5801  has_attribute(Reference self, StringKey a0) -> bool
5802  has_attribute(Reference self, ParticleIndexKey a0) -> bool
5803  has_attribute(Reference self, ObjectKey a0) -> bool
5804  has_attribute(Reference self, SparseFloatKey a0) -> bool
5805  has_attribute(Reference self, SparseIntKey a0) -> bool
5806  has_attribute(Reference self, SparseStringKey a0) -> bool
5807  has_attribute(Reference self, SparseParticleIndexKey a0) -> bool
5808  """
5809  return _IMP_core.Reference_has_attribute(self, *args)
5810 
5811  def get_derivative(self, a0):
5812  r"""get_derivative(Reference self, FloatKey a0) -> double"""
5813  return _IMP_core.Reference_get_derivative(self, a0)
5814 
5815  def get_name(self):
5816  r"""get_name(Reference self) -> std::string"""
5817  return _IMP_core.Reference_get_name(self)
5818 
5819  def clear_caches(self):
5820  r"""clear_caches(Reference self)"""
5821  return _IMP_core.Reference_clear_caches(self)
5822 
5823  def set_name(self, a0):
5824  r"""set_name(Reference self, std::string a0)"""
5825  return _IMP_core.Reference_set_name(self, a0)
5826 
5827  def set_check_level(self, a0):
5828  r"""set_check_level(Reference self, IMP::CheckLevel a0)"""
5829  return _IMP_core.Reference_set_check_level(self, a0)
5830 
5831  def add_to_derivative(self, a0, a1, a2):
5832  r"""add_to_derivative(Reference self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5833  return _IMP_core.Reference_add_to_derivative(self, a0, a1, a2)
5834 
5835  def set_is_optimized(self, a0, a1):
5836  r"""set_is_optimized(Reference self, FloatKey a0, bool a1)"""
5837  return _IMP_core.Reference_set_is_optimized(self, a0, a1)
5838 
5839  def get_is_optimized(self, a0):
5840  r"""get_is_optimized(Reference self, FloatKey a0) -> bool"""
5841  return _IMP_core.Reference_get_is_optimized(self, a0)
5842 
5843  def get_check_level(self):
5844  r"""get_check_level(Reference self) -> IMP::CheckLevel"""
5845  return _IMP_core.Reference_get_check_level(self)
5846 
5847  def __eq__(self, *args):
5848  r"""
5849  __eq__(Reference self, Reference o) -> bool
5850  __eq__(Reference self, Particle d) -> bool
5851  """
5852  return _IMP_core.Reference___eq__(self, *args)
5853 
5854  def __ne__(self, *args):
5855  r"""
5856  __ne__(Reference self, Reference o) -> bool
5857  __ne__(Reference self, Particle d) -> bool
5858  """
5859  return _IMP_core.Reference___ne__(self, *args)
5860 
5861  def __le__(self, *args):
5862  r"""
5863  __le__(Reference self, Reference o) -> bool
5864  __le__(Reference self, Particle d) -> bool
5865  """
5866  return _IMP_core.Reference___le__(self, *args)
5867 
5868  def __lt__(self, *args):
5869  r"""
5870  __lt__(Reference self, Reference o) -> bool
5871  __lt__(Reference self, Particle d) -> bool
5872  """
5873  return _IMP_core.Reference___lt__(self, *args)
5874 
5875  def __ge__(self, *args):
5876  r"""
5877  __ge__(Reference self, Reference o) -> bool
5878  __ge__(Reference self, Particle d) -> bool
5879  """
5880  return _IMP_core.Reference___ge__(self, *args)
5881 
5882  def __gt__(self, *args):
5883  r"""
5884  __gt__(Reference self, Reference o) -> bool
5885  __gt__(Reference self, Particle d) -> bool
5886  """
5887  return _IMP_core.Reference___gt__(self, *args)
5888 
5889  def __hash__(self):
5890  r"""__hash__(Reference self) -> std::size_t"""
5891  return _IMP_core.Reference___hash__(self)
5892 
5893  def __str__(self):
5894  r"""__str__(Reference self) -> std::string"""
5895  return _IMP_core.Reference___str__(self)
5896 
5897  def __repr__(self):
5898  r"""__repr__(Reference self) -> std::string"""
5899  return _IMP_core.Reference___repr__(self)
5900 
5901  def _get_as_binary(self):
5902  r"""_get_as_binary(Reference self) -> PyObject *"""
5903  return _IMP_core.Reference__get_as_binary(self)
5904 
5905  def _set_from_binary(self, p):
5906  r"""_set_from_binary(Reference self, PyObject * p)"""
5907  return _IMP_core.Reference__set_from_binary(self, p)
5908 
5909  def __getstate__(self):
5910  p = self._get_as_binary()
5911  if len(self.__dict__) > 1:
5912  d = self.__dict__.copy()
5913  del d['this']
5914  p = (d, p)
5915  return p
5916 
5917  def __setstate__(self, p):
5918  if not hasattr(self, 'this'):
5919  self.__init__()
5920  if isinstance(p, tuple):
5921  d, p = p
5922  self.__dict__.update(d)
5923  return self._set_from_binary(p)
5924 
5925  __swig_destroy__ = _IMP_core.delete_Reference
5926 
5927 # Register Reference in _IMP_core:
5928 _IMP_core.Reference_swigregister(Reference)
5929 class TransformationAndReflectionSymmetry(IMP.SingletonModifier):
5930  r"""Proxy of C++ IMP::core::TransformationAndReflectionSymmetry class."""
5931 
5932  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5933 
5934  def __init__(self, t, r):
5935  r"""__init__(TransformationAndReflectionSymmetry self, Transformation3D t, Reflection3D r) -> TransformationAndReflectionSymmetry"""
5936  _IMP_core.TransformationAndReflectionSymmetry_swiginit(self, _IMP_core.new_TransformationAndReflectionSymmetry(t, r))
5937 
5938  def do_get_inputs(self, m, pis):
5939  r"""do_get_inputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5940  return _IMP_core.TransformationAndReflectionSymmetry_do_get_inputs(self, m, pis)
5941 
5942  def do_get_outputs(self, m, pis):
5943  r"""do_get_outputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5944  return _IMP_core.TransformationAndReflectionSymmetry_do_get_outputs(self, m, pis)
5945 
5946  def get_version_info(self):
5947  r"""get_version_info(TransformationAndReflectionSymmetry self) -> VersionInfo"""
5948  return _IMP_core.TransformationAndReflectionSymmetry_get_version_info(self)
5949  __swig_destroy__ = _IMP_core.delete_TransformationAndReflectionSymmetry
5950 
5951  def __str__(self):
5952  r"""__str__(TransformationAndReflectionSymmetry self) -> std::string"""
5953  return _IMP_core.TransformationAndReflectionSymmetry___str__(self)
5954 
5955  def __repr__(self):
5956  r"""__repr__(TransformationAndReflectionSymmetry self) -> std::string"""
5957  return _IMP_core.TransformationAndReflectionSymmetry___repr__(self)
5958 
5959  @staticmethod
5960  def get_from(o):
5961  return _object_cast_to_TransformationAndReflectionSymmetry(o)
5962 
5963 
5964 # Register TransformationAndReflectionSymmetry in _IMP_core:
5965 _IMP_core.TransformationAndReflectionSymmetry_swigregister(TransformationAndReflectionSymmetry)
5966 class TransformationSymmetry(IMP.SingletonModifier):
5967  r"""Proxy of C++ IMP::core::TransformationSymmetry class."""
5968 
5969  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5970 
5971  def __init__(self, *args):
5972  r"""
5973  __init__(TransformationSymmetry self, Transformation3D t) -> TransformationSymmetry
5974  __init__(TransformationSymmetry self, ParticleIndex rb_pi) -> TransformationSymmetry
5975  """
5976  _IMP_core.TransformationSymmetry_swiginit(self, _IMP_core.new_TransformationSymmetry(*args))
5977 
5978  def get_transformation(self):
5979  r"""get_transformation(TransformationSymmetry self) -> Transformation3D"""
5980  return _IMP_core.TransformationSymmetry_get_transformation(self)
5981 
5982  def set_transformation(self, t):
5983  r"""set_transformation(TransformationSymmetry self, Transformation3D t)"""
5984  return _IMP_core.TransformationSymmetry_set_transformation(self, t)
5985 
5986  def do_get_inputs(self, m, pis):
5987  r"""do_get_inputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5988  return _IMP_core.TransformationSymmetry_do_get_inputs(self, m, pis)
5989 
5990  def do_get_outputs(self, m, pis):
5991  r"""do_get_outputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5992  return _IMP_core.TransformationSymmetry_do_get_outputs(self, m, pis)
5993 
5994  def get_version_info(self):
5995  r"""get_version_info(TransformationSymmetry self) -> VersionInfo"""
5996  return _IMP_core.TransformationSymmetry_get_version_info(self)
5997  __swig_destroy__ = _IMP_core.delete_TransformationSymmetry
5998 
5999  def __str__(self):
6000  r"""__str__(TransformationSymmetry self) -> std::string"""
6001  return _IMP_core.TransformationSymmetry___str__(self)
6002 
6003  def __repr__(self):
6004  r"""__repr__(TransformationSymmetry self) -> std::string"""
6005  return _IMP_core.TransformationSymmetry___repr__(self)
6006 
6007  @staticmethod
6008  def get_from(o):
6009  return _object_cast_to_TransformationSymmetry(o)
6010 
6011 
6012 # Register TransformationSymmetry in _IMP_core:
6013 _IMP_core.TransformationSymmetry_swigregister(TransformationSymmetry)
6014 class TransformationSymmetryMover(MonteCarloMover):
6015  r"""Proxy of C++ IMP::core::TransformationSymmetryMover class."""
6016 
6017  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6018 
6019  def __init__(self, m, symm, pivot, max_translation, max_rotation):
6020  r"""__init__(TransformationSymmetryMover self, Model m, TransformationSymmetry symm, ParticleIndex pivot, IMP::Float max_translation, IMP::Float max_rotation) -> TransformationSymmetryMover"""
6021  _IMP_core.TransformationSymmetryMover_swiginit(self, _IMP_core.new_TransformationSymmetryMover(m, symm, pivot, max_translation, max_rotation))
6022 
6023  def set_maximum_translation(self, mt):
6024  r"""set_maximum_translation(TransformationSymmetryMover self, IMP::Float mt)"""
6025  return _IMP_core.TransformationSymmetryMover_set_maximum_translation(self, mt)
6026 
6027  def set_maximum_rotation(self, mr):
6028  r"""set_maximum_rotation(TransformationSymmetryMover self, IMP::Float mr)"""
6029  return _IMP_core.TransformationSymmetryMover_set_maximum_rotation(self, mr)
6030 
6031  def get_maximum_translation(self):
6032  r"""get_maximum_translation(TransformationSymmetryMover self) -> IMP::Float"""
6033  return _IMP_core.TransformationSymmetryMover_get_maximum_translation(self)
6034 
6035  def get_maximum_rotation(self):
6036  r"""get_maximum_rotation(TransformationSymmetryMover self) -> IMP::Float"""
6037  return _IMP_core.TransformationSymmetryMover_get_maximum_rotation(self)
6038 
6039  def get_version_info(self):
6040  r"""get_version_info(TransformationSymmetryMover self) -> VersionInfo"""
6041  return _IMP_core.TransformationSymmetryMover_get_version_info(self)
6042  __swig_destroy__ = _IMP_core.delete_TransformationSymmetryMover
6043 
6044  def __str__(self):
6045  r"""__str__(TransformationSymmetryMover self) -> std::string"""
6046  return _IMP_core.TransformationSymmetryMover___str__(self)
6047 
6048  def __repr__(self):
6049  r"""__repr__(TransformationSymmetryMover self) -> std::string"""
6050  return _IMP_core.TransformationSymmetryMover___repr__(self)
6051 
6052  @staticmethod
6053  def get_from(o):
6054  return _object_cast_to_TransformationSymmetryMover(o)
6055 
6056 
6057 # Register TransformationSymmetryMover in _IMP_core:
6058 _IMP_core.TransformationSymmetryMover_swigregister(TransformationSymmetryMover)
6059 class DihedralRestraint(IMP.Restraint):
6060  r"""Proxy of C++ IMP::core::DihedralRestraint class."""
6061 
6062  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6063 
6064  def __init__(self, m, score_func, p1, p2, p3, p4):
6065  r"""__init__(DihedralRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3, _ParticleIndexAdaptor p4) -> DihedralRestraint"""
6066  _IMP_core.DihedralRestraint_swiginit(self, _IMP_core.new_DihedralRestraint(m, score_func, p1, p2, p3, p4))
6067 
6068  def do_get_inputs(self):
6069  r"""do_get_inputs(DihedralRestraint self) -> IMP::ModelObjectsTemp"""
6070  return _IMP_core.DihedralRestraint_do_get_inputs(self)
6071 
6072  def get_version_info(self):
6073  r"""get_version_info(DihedralRestraint self) -> VersionInfo"""
6074  return _IMP_core.DihedralRestraint_get_version_info(self)
6075  __swig_destroy__ = _IMP_core.delete_DihedralRestraint
6076 
6077  def __str__(self):
6078  r"""__str__(DihedralRestraint self) -> std::string"""
6079  return _IMP_core.DihedralRestraint___str__(self)
6080 
6081  def __repr__(self):
6082  r"""__repr__(DihedralRestraint self) -> std::string"""
6083  return _IMP_core.DihedralRestraint___repr__(self)
6084 
6085  @staticmethod
6086  def get_from(o):
6087  return _object_cast_to_DihedralRestraint(o)
6088 
6089 
6090 # Register DihedralRestraint in _IMP_core:
6091 _IMP_core.DihedralRestraint_swigregister(DihedralRestraint)
6092 class DistancePairScore(IMP.PairScore):
6093  r"""Proxy of C++ IMP::core::DistancePairScore class."""
6094 
6095  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6096 
6097  def __init__(self, *args):
6098  r"""
6099  __init__(DistancePairScore self, UnaryFunction uf, std::string name="DistancePairScore%1%") -> DistancePairScore
6100  __init__(DistancePairScore self) -> DistancePairScore
6101  """
6102  _IMP_core.DistancePairScore_swiginit(self, _IMP_core.new_DistancePairScore(*args))
6103 
6104  def do_get_inputs(self, m, pis):
6105  r"""do_get_inputs(DistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6106  return _IMP_core.DistancePairScore_do_get_inputs(self, m, pis)
6107 
6108  def get_score_functor(self, *args):
6109  r"""
6110  get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6111  get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6112  """
6113  return _IMP_core.DistancePairScore_get_score_functor(self, *args)
6114 
6115  def get_version_info(self):
6116  r"""get_version_info(DistancePairScore self) -> VersionInfo"""
6117  return _IMP_core.DistancePairScore_get_version_info(self)
6118  __swig_destroy__ = _IMP_core.delete_DistancePairScore
6119 
6120  def __str__(self):
6121  r"""__str__(DistancePairScore self) -> std::string"""
6122  return _IMP_core.DistancePairScore___str__(self)
6123 
6124  def __repr__(self):
6125  r"""__repr__(DistancePairScore self) -> std::string"""
6126  return _IMP_core.DistancePairScore___repr__(self)
6127 
6128  @staticmethod
6129  def get_from(o):
6130  return _object_cast_to_DistancePairScore(o)
6131 
6132 
6133  def _get_as_binary(self):
6134  r"""_get_as_binary(DistancePairScore self) -> PyObject *"""
6135  return _IMP_core.DistancePairScore__get_as_binary(self)
6136 
6137  def _set_from_binary(self, p):
6138  r"""_set_from_binary(DistancePairScore self, PyObject * p)"""
6139  return _IMP_core.DistancePairScore__set_from_binary(self, p)
6140 
6141  def __getstate__(self):
6142  p = self._get_as_binary()
6143  if len(self.__dict__) > 1:
6144  d = self.__dict__.copy()
6145  del d['this']
6146  p = (d, p)
6147  return p
6148 
6149  def __setstate__(self, p):
6150  if not hasattr(self, 'this'):
6151  self.__init__()
6152  if isinstance(p, tuple):
6153  d, p = p
6154  self.__dict__.update(d)
6155  return self._set_from_binary(p)
6156 
6157 
6158  def _get_jax(self, m, indexes):
6159  import jax.numpy as jnp
6160  def jax_score(jm, uf):
6161  xyzs = jm['xyz'][indexes]
6162  diff = xyzs[:,0] - xyzs[:,1]
6163  drs = jnp.linalg.norm(diff, axis=1)
6164  return uf(drs)
6165  sfnc = self.get_score_functor()
6166  uf = sfnc.get_unary_function().get_derived_object()
6167  f = functools.partial(jax_score, uf=uf._get_jax())
6168  return self._wrap_jax(m, f)
6169 
6170 
6171 # Register DistancePairScore in _IMP_core:
6172 _IMP_core.DistancePairScore_swigregister(DistancePairScore)
6173 class HarmonicDistancePairScore(IMP.PairScore):
6174  r"""Proxy of C++ IMP::core::HarmonicDistancePairScore class."""
6175 
6176  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6177 
6178  def __init__(self, *args):
6179  r"""
6180  __init__(HarmonicDistancePairScore self, double x0, double k, std::string name="HarmonicDistancePairScore%1%") -> HarmonicDistancePairScore
6181  __init__(HarmonicDistancePairScore self) -> HarmonicDistancePairScore
6182  """
6183  _IMP_core.HarmonicDistancePairScore_swiginit(self, _IMP_core.new_HarmonicDistancePairScore(*args))
6184 
6185  def do_get_inputs(self, m, pis):
6186  r"""do_get_inputs(HarmonicDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6187  return _IMP_core.HarmonicDistancePairScore_do_get_inputs(self, m, pis)
6188 
6189  def get_score_functor(self, *args):
6190  r"""
6191  get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore
6192  get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore const &
6193  """
6194  return _IMP_core.HarmonicDistancePairScore_get_score_functor(self, *args)
6195 
6196  def get_x0(self):
6197  r"""get_x0(HarmonicDistancePairScore self) -> double"""
6198  return _IMP_core.HarmonicDistancePairScore_get_x0(self)
6199 
6200  def get_k(self):
6201  r"""get_k(HarmonicDistancePairScore self) -> double"""
6202  return _IMP_core.HarmonicDistancePairScore_get_k(self)
6203 
6204  def get_version_info(self):
6205  r"""get_version_info(HarmonicDistancePairScore self) -> VersionInfo"""
6206  return _IMP_core.HarmonicDistancePairScore_get_version_info(self)
6207  __swig_destroy__ = _IMP_core.delete_HarmonicDistancePairScore
6208 
6209  def __str__(self):
6210  r"""__str__(HarmonicDistancePairScore self) -> std::string"""
6211  return _IMP_core.HarmonicDistancePairScore___str__(self)
6212 
6213  def __repr__(self):
6214  r"""__repr__(HarmonicDistancePairScore self) -> std::string"""
6215  return _IMP_core.HarmonicDistancePairScore___repr__(self)
6216 
6217  @staticmethod
6218  def get_from(o):
6219  return _object_cast_to_HarmonicDistancePairScore(o)
6220 
6221 
6222  def _get_as_binary(self):
6223  r"""_get_as_binary(HarmonicDistancePairScore self) -> PyObject *"""
6224  return _IMP_core.HarmonicDistancePairScore__get_as_binary(self)
6225 
6226  def _set_from_binary(self, p):
6227  r"""_set_from_binary(HarmonicDistancePairScore self, PyObject * p)"""
6228  return _IMP_core.HarmonicDistancePairScore__set_from_binary(self, p)
6229 
6230  def __getstate__(self):
6231  p = self._get_as_binary()
6232  if len(self.__dict__) > 1:
6233  d = self.__dict__.copy()
6234  del d['this']
6235  p = (d, p)
6236  return p
6237 
6238  def __setstate__(self, p):
6239  if not hasattr(self, 'this'):
6240  self.__init__()
6241  if isinstance(p, tuple):
6242  d, p = p
6243  self.__dict__.update(d)
6244  return self._set_from_binary(p)
6245 
6246 
6247  def _get_jax(self, m, indexes):
6248  import jax.numpy as jnp
6249  def jax_harmonic_distance_pair_score(jm, d, k):
6250  xyzs = jm['xyz'][indexes]
6251  diff = xyzs[:,0] - xyzs[:,1]
6252  drs = jnp.linalg.norm(diff, axis=1)
6253  return 0.5 * k * (d - drs)**2
6254  f = functools.partial(jax_harmonic_distance_pair_score,
6255  d=self.get_x0(), k=self.get_k())
6256  return self._wrap_jax(m, f)
6257 
6258 
6259 # Register HarmonicDistancePairScore in _IMP_core:
6260 _IMP_core.HarmonicDistancePairScore_swigregister(HarmonicDistancePairScore)
6261 class DistanceRestraint(IMP.Restraint):
6262  r"""Proxy of C++ IMP::core::DistanceRestraint class."""
6263 
6264  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6265 
6266  def __init__(self, *args):
6267  r"""
6268  __init__(DistanceRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor a, _ParticleIndexAdaptor b, std::string name="DistanceRestraint %1%") -> DistanceRestraint
6269  __init__(DistanceRestraint self) -> DistanceRestraint
6270  """
6271  _IMP_core.DistanceRestraint_swiginit(self, _IMP_core.new_DistanceRestraint(*args))
6272 
6273  def get_score_object(self):
6274  r"""get_score_object(DistanceRestraint self) -> DistancePairScore"""
6275  return _IMP_core.DistanceRestraint_get_score_object(self)
6276 
6277  def get_index(self):
6278  r"""get_index(DistanceRestraint self) -> IMP::core::DistancePairScore::IndexArgument"""
6279  return _IMP_core.DistanceRestraint_get_index(self)
6280 
6281  def get_version_info(self):
6282  r"""get_version_info(DistanceRestraint self) -> VersionInfo"""
6283  return _IMP_core.DistanceRestraint_get_version_info(self)
6284  __swig_destroy__ = _IMP_core.delete_DistanceRestraint
6285 
6286  def __str__(self):
6287  r"""__str__(DistanceRestraint self) -> std::string"""
6288  return _IMP_core.DistanceRestraint___str__(self)
6289 
6290  def __repr__(self):
6291  r"""__repr__(DistanceRestraint self) -> std::string"""
6292  return _IMP_core.DistanceRestraint___repr__(self)
6293 
6294  @staticmethod
6295  def get_from(o):
6296  return _object_cast_to_DistanceRestraint(o)
6297 
6298 
6299  def _get_as_binary(self):
6300  r"""_get_as_binary(DistanceRestraint self) -> PyObject *"""
6301  return _IMP_core.DistanceRestraint__get_as_binary(self)
6302 
6303  def _set_from_binary(self, p):
6304  r"""_set_from_binary(DistanceRestraint self, PyObject * p)"""
6305  return _IMP_core.DistanceRestraint__set_from_binary(self, p)
6306 
6307  def __getstate__(self):
6308  p = self._get_as_binary()
6309  if len(self.__dict__) > 1:
6310  d = self.__dict__.copy()
6311  del d['this']
6312  p = (d, p)
6313  return p
6314 
6315  def __setstate__(self, p):
6316  if not hasattr(self, 'this'):
6317  self.__init__()
6318  if isinstance(p, tuple):
6319  d, p = p
6320  self.__dict__.update(d)
6321  return self._set_from_binary(p)
6322 
6323 
6324  def _get_jax(self):
6325  import jax.numpy as jnp
6326  ps = self.get_score_object()
6327  indexes = jnp.array([self.get_index()])
6328  ji = ps._get_jax(self.get_model(), indexes)
6329  def score(jm):
6330  return jnp.sum(ji.score_func(jm))
6331  return self._wrap_jax(score)
6332 
6333 
6334 # Register DistanceRestraint in _IMP_core:
6335 _IMP_core.DistanceRestraint_swigregister(DistanceRestraint)
6336 class SphereDistanceToSingletonScore(IMP.SingletonScore):
6337  r"""Proxy of C++ IMP::core::SphereDistanceToSingletonScore class."""
6338 
6339  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6340 
6341  def __init__(self, f, pt):
6342  r"""__init__(SphereDistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> SphereDistanceToSingletonScore"""
6343  _IMP_core.SphereDistanceToSingletonScore_swiginit(self, _IMP_core.new_SphereDistanceToSingletonScore(f, pt))
6344 
6345  def do_get_inputs(self, m, pis):
6346  r"""do_get_inputs(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6347  return _IMP_core.SphereDistanceToSingletonScore_do_get_inputs(self, m, pis)
6348 
6349  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
6350  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"""
6351  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
6352 
6353  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
6354  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"""
6355  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
6356 
6357  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
6358  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"""
6359  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
6360 
6361  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
6362  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"""
6363  return _IMP_core.SphereDistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
6364 
6365  def get_version_info(self):
6366  r"""get_version_info(SphereDistanceToSingletonScore self) -> VersionInfo"""
6367  return _IMP_core.SphereDistanceToSingletonScore_get_version_info(self)
6368  __swig_destroy__ = _IMP_core.delete_SphereDistanceToSingletonScore
6369 
6370  def __str__(self):
6371  r"""__str__(SphereDistanceToSingletonScore self) -> std::string"""
6372  return _IMP_core.SphereDistanceToSingletonScore___str__(self)
6373 
6374  def __repr__(self):
6375  r"""__repr__(SphereDistanceToSingletonScore self) -> std::string"""
6376  return _IMP_core.SphereDistanceToSingletonScore___repr__(self)
6377 
6378  @staticmethod
6379  def get_from(o):
6380  return _object_cast_to_SphereDistanceToSingletonScore(o)
6381 
6382 
6383 # Register SphereDistanceToSingletonScore in _IMP_core:
6384 _IMP_core.SphereDistanceToSingletonScore_swigregister(SphereDistanceToSingletonScore)
6385 class ExcludedVolumeRestraint(IMP.Restraint):
6386  r"""Proxy of C++ IMP::core::ExcludedVolumeRestraint class."""
6387 
6388  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6389 
6390  def __init__(self, *args):
6391  r"""__init__(ExcludedVolumeRestraint self, _SingletonContainerAdaptor sc, double k=1, double slack=10, std::string name="ExcludedVolumeRestraint%1%") -> ExcludedVolumeRestraint"""
6392  _IMP_core.ExcludedVolumeRestraint_swiginit(self, _IMP_core.new_ExcludedVolumeRestraint(*args))
6393 
6394  def do_get_inputs(self):
6395  r"""do_get_inputs(ExcludedVolumeRestraint self) -> IMP::ModelObjectsTemp"""
6396  return _IMP_core.ExcludedVolumeRestraint_do_get_inputs(self)
6397 
6398  def get_version_info(self):
6399  r"""get_version_info(ExcludedVolumeRestraint self) -> VersionInfo"""
6400  return _IMP_core.ExcludedVolumeRestraint_get_version_info(self)
6401  __swig_destroy__ = _IMP_core.delete_ExcludedVolumeRestraint
6402 
6403  def do_create_decomposition(self):
6404  r"""do_create_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6405  return _IMP_core.ExcludedVolumeRestraint_do_create_decomposition(self)
6406 
6407  def do_create_current_decomposition(self):
6408  r"""do_create_current_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6409  return _IMP_core.ExcludedVolumeRestraint_do_create_current_decomposition(self)
6410 
6411  def get_indexes(self):
6412  r"""get_indexes(ExcludedVolumeRestraint self) -> IMP::ParticleIndexPairs const &"""
6413  return _IMP_core.ExcludedVolumeRestraint_get_indexes(self)
6414  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)
6415  def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
6416  def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
6417  pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
6418 
6419  def remove_pair_filter(self, d):
6420  r"""remove_pair_filter(ExcludedVolumeRestraint self, PairPredicate d)"""
6421  return _IMP_core.ExcludedVolumeRestraint_remove_pair_filter(self, d)
6422 
6423  def _python_index_pair_filter(self, d, start, stop):
6424  r"""_python_index_pair_filter(ExcludedVolumeRestraint self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
6425  return _IMP_core.ExcludedVolumeRestraint__python_index_pair_filter(self, d, start, stop)
6426 
6427  def remove_pair_filters(self, d):
6428  r"""remove_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & d)"""
6429  return _IMP_core.ExcludedVolumeRestraint_remove_pair_filters(self, d)
6430 
6431  def set_pair_filters(self, ps):
6432  r"""set_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & ps)"""
6433  return _IMP_core.ExcludedVolumeRestraint_set_pair_filters(self, ps)
6434 
6435  def set_pair_filters_order(self, objs):
6436  r"""set_pair_filters_order(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6437  return _IMP_core.ExcludedVolumeRestraint_set_pair_filters_order(self, objs)
6438 
6439  def add_pair_filter(self, obj):
6440  r"""add_pair_filter(ExcludedVolumeRestraint self, PairPredicate obj) -> unsigned int"""
6441  return _IMP_core.ExcludedVolumeRestraint_add_pair_filter(self, obj)
6442 
6443  def add_pair_filters(self, objs):
6444  r"""add_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6445  return _IMP_core.ExcludedVolumeRestraint_add_pair_filters(self, objs)
6446 
6447  def clear_pair_filters(self):
6448  r"""clear_pair_filters(ExcludedVolumeRestraint self)"""
6449  return _IMP_core.ExcludedVolumeRestraint_clear_pair_filters(self)
6450 
6451  def get_number_of_pair_filters(self):
6452  r"""get_number_of_pair_filters(ExcludedVolumeRestraint self) -> unsigned int"""
6453  return _IMP_core.ExcludedVolumeRestraint_get_number_of_pair_filters(self)
6454 
6455  def get_has_pair_filters(self):
6456  r"""get_has_pair_filters(ExcludedVolumeRestraint self) -> bool"""
6457  return _IMP_core.ExcludedVolumeRestraint_get_has_pair_filters(self)
6458 
6459  def get_pair_filter(self, i):
6460  r"""get_pair_filter(ExcludedVolumeRestraint self, unsigned int i) -> PairPredicate"""
6461  return _IMP_core.ExcludedVolumeRestraint_get_pair_filter(self, i)
6462 
6463  def get_pair_filters(self):
6464  r"""get_pair_filters(ExcludedVolumeRestraint self) -> IMP::PairPredicates"""
6465  return _IMP_core.ExcludedVolumeRestraint_get_pair_filters(self)
6466 
6467  def erase_pair_filter(self, i):
6468  r"""erase_pair_filter(ExcludedVolumeRestraint self, unsigned int i)"""
6469  return _IMP_core.ExcludedVolumeRestraint_erase_pair_filter(self, i)
6470 
6471  def reserve_pair_filters(self, sz):
6472  r"""reserve_pair_filters(ExcludedVolumeRestraint self, unsigned int sz)"""
6473  return _IMP_core.ExcludedVolumeRestraint_reserve_pair_filters(self, sz)
6474 
6475  def __str__(self):
6476  r"""__str__(ExcludedVolumeRestraint self) -> std::string"""
6477  return _IMP_core.ExcludedVolumeRestraint___str__(self)
6478 
6479  def __repr__(self):
6480  r"""__repr__(ExcludedVolumeRestraint self) -> std::string"""
6481  return _IMP_core.ExcludedVolumeRestraint___repr__(self)
6482 
6483  @staticmethod
6484  def get_from(o):
6485  return _object_cast_to_ExcludedVolumeRestraint(o)
6486 
6487 
6488 # Register ExcludedVolumeRestraint in _IMP_core:
6489 _IMP_core.ExcludedVolumeRestraint_swigregister(ExcludedVolumeRestraint)
6490 class FixedRefiner(IMP.Refiner):
6491  r"""Proxy of C++ IMP::core::FixedRefiner class."""
6492 
6493  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6494 
6495  def __init__(self, *args):
6496  r"""
6497  __init__(FixedRefiner self, IMP::ParticlesTemp const & ps) -> FixedRefiner
6498  __init__(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> FixedRefiner
6499  __init__(FixedRefiner self) -> FixedRefiner
6500  """
6501  _IMP_core.FixedRefiner_swiginit(self, _IMP_core.new_FixedRefiner(*args))
6502 
6503  def do_get_inputs(self, m, pis):
6504  r"""do_get_inputs(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6505  return _IMP_core.FixedRefiner_do_get_inputs(self, m, pis)
6506 
6507  def get_version_info(self):
6508  r"""get_version_info(FixedRefiner self) -> VersionInfo"""
6509  return _IMP_core.FixedRefiner_get_version_info(self)
6510  __swig_destroy__ = _IMP_core.delete_FixedRefiner
6511 
6512  def __str__(self):
6513  r"""__str__(FixedRefiner self) -> std::string"""
6514  return _IMP_core.FixedRefiner___str__(self)
6515 
6516  def __repr__(self):
6517  r"""__repr__(FixedRefiner self) -> std::string"""
6518  return _IMP_core.FixedRefiner___repr__(self)
6519 
6520  @staticmethod
6521  def get_from(o):
6522  return _object_cast_to_FixedRefiner(o)
6523 
6524 
6525  def _get_as_binary(self):
6526  r"""_get_as_binary(FixedRefiner self) -> PyObject *"""
6527  return _IMP_core.FixedRefiner__get_as_binary(self)
6528 
6529  def _set_from_binary(self, p):
6530  r"""_set_from_binary(FixedRefiner self, PyObject * p)"""
6531  return _IMP_core.FixedRefiner__set_from_binary(self, p)
6532 
6533  def __getstate__(self):
6534  p = self._get_as_binary()
6535  if len(self.__dict__) > 1:
6536  d = self.__dict__.copy()
6537  del d['this']
6538  p = (d, p)
6539  return p
6540 
6541  def __setstate__(self, p):
6542  if not hasattr(self, 'this'):
6543  self.__init__()
6544  if isinstance(p, tuple):
6545  d, p = p
6546  self.__dict__.update(d)
6547  return self._set_from_binary(p)
6548 
6549 
6550 # Register FixedRefiner in _IMP_core:
6551 _IMP_core.FixedRefiner_swigregister(FixedRefiner)
6552 class GridClosePairsFinder(ClosePairsFinder):
6553  r"""Proxy of C++ IMP::core::GridClosePairsFinder class."""
6554 
6555  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6556 
6557  def __init__(self):
6558  r"""__init__(GridClosePairsFinder self) -> GridClosePairsFinder"""
6559  _IMP_core.GridClosePairsFinder_swiginit(self, _IMP_core.new_GridClosePairsFinder())
6560 
6561  def get_close_pairs(self, *args):
6562  r"""
6563  get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6564  get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6565  get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
6566  get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
6567  """
6568  return _IMP_core.GridClosePairsFinder_get_close_pairs(self, *args)
6569 
6570  def do_get_inputs(self, m, pis):
6571  r"""do_get_inputs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6572  return _IMP_core.GridClosePairsFinder_do_get_inputs(self, m, pis)
6573 
6574  def get_version_info(self):
6575  r"""get_version_info(GridClosePairsFinder self) -> VersionInfo"""
6576  return _IMP_core.GridClosePairsFinder_get_version_info(self)
6577  __swig_destroy__ = _IMP_core.delete_GridClosePairsFinder
6578 
6579  def __str__(self):
6580  r"""__str__(GridClosePairsFinder self) -> std::string"""
6581  return _IMP_core.GridClosePairsFinder___str__(self)
6582 
6583  def __repr__(self):
6584  r"""__repr__(GridClosePairsFinder self) -> std::string"""
6585  return _IMP_core.GridClosePairsFinder___repr__(self)
6586 
6587  @staticmethod
6588  def get_from(o):
6589  return _object_cast_to_GridClosePairsFinder(o)
6590 
6591 
6592  def _get_as_binary(self):
6593  r"""_get_as_binary(GridClosePairsFinder self) -> PyObject *"""
6594  return _IMP_core.GridClosePairsFinder__get_as_binary(self)
6595 
6596  def _set_from_binary(self, p):
6597  r"""_set_from_binary(GridClosePairsFinder self, PyObject * p)"""
6598  return _IMP_core.GridClosePairsFinder__set_from_binary(self, p)
6599 
6600  def __getstate__(self):
6601  p = self._get_as_binary()
6602  if len(self.__dict__) > 1:
6603  d = self.__dict__.copy()
6604  del d['this']
6605  p = (d, p)
6606  return p
6607 
6608  def __setstate__(self, p):
6609  if not hasattr(self, 'this'):
6610  self.__init__()
6611  if isinstance(p, tuple):
6612  d, p = p
6613  self.__dict__.update(d)
6614  return self._set_from_binary(p)
6615 
6616 
6617 # Register GridClosePairsFinder in _IMP_core:
6618 _IMP_core.GridClosePairsFinder_swigregister(GridClosePairsFinder)
6619 class Harmonic(IMP.UnaryFunction):
6620  r"""Proxy of C++ IMP::core::Harmonic class."""
6621 
6622  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6623 
6624  def __init__(self, *args):
6625  r"""
6626  __init__(Harmonic self, IMP::Float mean, IMP::Float k) -> Harmonic
6627  __init__(Harmonic self) -> Harmonic
6628  """
6629  _IMP_core.Harmonic_swiginit(self, _IMP_core.new_Harmonic(*args))
6630 
6631  def get_version_info(self):
6632  r"""get_version_info(Harmonic self) -> VersionInfo"""
6633  return _IMP_core.Harmonic_get_version_info(self)
6634  __swig_destroy__ = _IMP_core.delete_Harmonic
6635 
6636  def get_mean(self):
6637  r"""get_mean(Harmonic self) -> IMP::Float"""
6638  return _IMP_core.Harmonic_get_mean(self)
6639 
6640  def get_k(self):
6641  r"""get_k(Harmonic self) -> IMP::Float"""
6642  return _IMP_core.Harmonic_get_k(self)
6643 
6644  def set_mean(self, mean):
6645  r"""set_mean(Harmonic self, IMP::Float mean)"""
6646  return _IMP_core.Harmonic_set_mean(self, mean)
6647 
6648  def set_k(self, k):
6649  r"""set_k(Harmonic self, IMP::Float k)"""
6650  return _IMP_core.Harmonic_set_k(self, k)
6651 
6652  @staticmethod
6653  def get_k_from_standard_deviation(sd, t=297.15):
6654  r"""get_k_from_standard_deviation(IMP::Float sd, IMP::Float t=297.15) -> IMP::Float"""
6655  return _IMP_core.Harmonic_get_k_from_standard_deviation(sd, t)
6656 
6657  def __str__(self):
6658  r"""__str__(Harmonic self) -> std::string"""
6659  return _IMP_core.Harmonic___str__(self)
6660 
6661  def __repr__(self):
6662  r"""__repr__(Harmonic self) -> std::string"""
6663  return _IMP_core.Harmonic___repr__(self)
6664 
6665  @staticmethod
6666  def get_from(o):
6667  return _object_cast_to_Harmonic(o)
6668 
6669 
6670  def _get_as_binary(self):
6671  r"""_get_as_binary(Harmonic self) -> PyObject *"""
6672  return _IMP_core.Harmonic__get_as_binary(self)
6673 
6674  def _set_from_binary(self, p):
6675  r"""_set_from_binary(Harmonic self, PyObject * p)"""
6676  return _IMP_core.Harmonic__set_from_binary(self, p)
6677 
6678  def __getstate__(self):
6679  p = self._get_as_binary()
6680  if len(self.__dict__) > 1:
6681  d = self.__dict__.copy()
6682  del d['this']
6683  p = (d, p)
6684  return p
6685 
6686  def __setstate__(self, p):
6687  if not hasattr(self, 'this'):
6688  self.__init__()
6689  if isinstance(p, tuple):
6690  d, p = p
6691  self.__dict__.update(d)
6692  return self._set_from_binary(p)
6693 
6694 
6695  def _get_jax(self):
6696  def score(val, mean, k):
6697  return 0.5 * k * (mean - val) ** 2
6698  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6699 
6700 
6701 # Register Harmonic in _IMP_core:
6702 _IMP_core.Harmonic_swigregister(Harmonic)
6703 class HarmonicWell(IMP.UnaryFunction):
6704  r"""Proxy of C++ IMP::core::HarmonicWell class."""
6705 
6706  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6707 
6708  def __init__(self, well, k):
6709  r"""__init__(HarmonicWell self, IMP::FloatRange const & well, double k) -> HarmonicWell"""
6710  _IMP_core.HarmonicWell_swiginit(self, _IMP_core.new_HarmonicWell(well, k))
6711 
6712  def get_well(self):
6713  r"""get_well(HarmonicWell self) -> IMP::FloatRange"""
6714  return _IMP_core.HarmonicWell_get_well(self)
6715 
6716  def get_k(self):
6717  r"""get_k(HarmonicWell self) -> double"""
6718  return _IMP_core.HarmonicWell_get_k(self)
6719 
6720  def get_version_info(self):
6721  r"""get_version_info(HarmonicWell self) -> VersionInfo"""
6722  return _IMP_core.HarmonicWell_get_version_info(self)
6723  __swig_destroy__ = _IMP_core.delete_HarmonicWell
6724 
6725  def __str__(self):
6726  r"""__str__(HarmonicWell self) -> std::string"""
6727  return _IMP_core.HarmonicWell___str__(self)
6728 
6729  def __repr__(self):
6730  r"""__repr__(HarmonicWell self) -> std::string"""
6731  return _IMP_core.HarmonicWell___repr__(self)
6732 
6733  @staticmethod
6734  def get_from(o):
6735  return _object_cast_to_HarmonicWell(o)
6736 
6737 
6738  def _get_jax(self):
6739  import jax.numpy as jnp
6740  def score(val, lb, ub, k):
6741  return 0.5 * k * (val - jnp.clip(val, lb, ub)) ** 2
6742  well = self.get_well()
6743  return functools.partial(score, lb=well[0], ub=well[1], k=self.get_k())
6744 
6745 
6746 # Register HarmonicWell in _IMP_core:
6747 _IMP_core.HarmonicWell_swigregister(HarmonicWell)
6748 class HarmonicLowerBound(Harmonic):
6749  r"""Proxy of C++ IMP::core::HarmonicLowerBound class."""
6750 
6751  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6752 
6753  def __init__(self, *args):
6754  r"""
6755  __init__(HarmonicLowerBound self, IMP::Float mean, IMP::Float k) -> HarmonicLowerBound
6756  __init__(HarmonicLowerBound self) -> HarmonicLowerBound
6757  """
6758  _IMP_core.HarmonicLowerBound_swiginit(self, _IMP_core.new_HarmonicLowerBound(*args))
6759  __swig_destroy__ = _IMP_core.delete_HarmonicLowerBound
6760 
6761  def __str__(self):
6762  r"""__str__(HarmonicLowerBound self) -> std::string"""
6763  return _IMP_core.HarmonicLowerBound___str__(self)
6764 
6765  def __repr__(self):
6766  r"""__repr__(HarmonicLowerBound self) -> std::string"""
6767  return _IMP_core.HarmonicLowerBound___repr__(self)
6768 
6769  @staticmethod
6770  def get_from(o):
6771  return _object_cast_to_HarmonicLowerBound(o)
6772 
6773 
6774  def _get_as_binary(self):
6775  r"""_get_as_binary(HarmonicLowerBound self) -> PyObject *"""
6776  return _IMP_core.HarmonicLowerBound__get_as_binary(self)
6777 
6778  def _set_from_binary(self, p):
6779  r"""_set_from_binary(HarmonicLowerBound self, PyObject * p)"""
6780  return _IMP_core.HarmonicLowerBound__set_from_binary(self, p)
6781 
6782  def __getstate__(self):
6783  p = self._get_as_binary()
6784  if len(self.__dict__) > 1:
6785  d = self.__dict__.copy()
6786  del d['this']
6787  p = (d, p)
6788  return p
6789 
6790  def __setstate__(self, p):
6791  if not hasattr(self, 'this'):
6792  self.__init__()
6793  if isinstance(p, tuple):
6794  d, p = p
6795  self.__dict__.update(d)
6796  return self._set_from_binary(p)
6797 
6798 
6799  def _get_jax(self):
6800  import jax.lax
6801  def score(val, mean, k):
6802  return 0.5 * k * jax.lax.max(mean - val, 0.0) ** 2
6803  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6804 
6805 
6806 # Register HarmonicLowerBound in _IMP_core:
6807 _IMP_core.HarmonicLowerBound_swigregister(HarmonicLowerBound)
6808 class HarmonicUpperBound(Harmonic):
6809  r"""Proxy of C++ IMP::core::HarmonicUpperBound class."""
6810 
6811  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6812 
6813  def __init__(self, *args):
6814  r"""
6815  __init__(HarmonicUpperBound self, IMP::Float mean, IMP::Float k) -> HarmonicUpperBound
6816  __init__(HarmonicUpperBound self) -> HarmonicUpperBound
6817  """
6818  _IMP_core.HarmonicUpperBound_swiginit(self, _IMP_core.new_HarmonicUpperBound(*args))
6819  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBound
6820 
6821  def __str__(self):
6822  r"""__str__(HarmonicUpperBound self) -> std::string"""
6823  return _IMP_core.HarmonicUpperBound___str__(self)
6824 
6825  def __repr__(self):
6826  r"""__repr__(HarmonicUpperBound self) -> std::string"""
6827  return _IMP_core.HarmonicUpperBound___repr__(self)
6828 
6829  @staticmethod
6830  def get_from(o):
6831  return _object_cast_to_HarmonicUpperBound(o)
6832 
6833 
6834  def _get_as_binary(self):
6835  r"""_get_as_binary(HarmonicUpperBound self) -> PyObject *"""
6836  return _IMP_core.HarmonicUpperBound__get_as_binary(self)
6837 
6838  def _set_from_binary(self, p):
6839  r"""_set_from_binary(HarmonicUpperBound self, PyObject * p)"""
6840  return _IMP_core.HarmonicUpperBound__set_from_binary(self, p)
6841 
6842  def __getstate__(self):
6843  p = self._get_as_binary()
6844  if len(self.__dict__) > 1:
6845  d = self.__dict__.copy()
6846  del d['this']
6847  p = (d, p)
6848  return p
6849 
6850  def __setstate__(self, p):
6851  if not hasattr(self, 'this'):
6852  self.__init__()
6853  if isinstance(p, tuple):
6854  d, p = p
6855  self.__dict__.update(d)
6856  return self._set_from_binary(p)
6857 
6858 
6859  def _get_jax(self):
6860  import jax.lax
6861  def score(val, mean, k):
6862  return 0.5 * k * jax.lax.min(mean - val, 0.0) ** 2
6863  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6864 
6865 
6866 # Register HarmonicUpperBound in _IMP_core:
6867 _IMP_core.HarmonicUpperBound_swigregister(HarmonicUpperBound)
6868 class WeightedSum(IMP.UnaryFunction):
6869  r"""Proxy of C++ IMP::core::WeightedSum class."""
6870 
6871  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6872 
6873  def __init__(self, funcs, weights):
6874  r"""__init__(WeightedSum self, IMP::UnaryFunctions funcs, IMP::Floats weights) -> WeightedSum"""
6875  _IMP_core.WeightedSum_swiginit(self, _IMP_core.new_WeightedSum(funcs, weights))
6876 
6877  def get_function_number(self):
6878  r"""get_function_number(WeightedSum self) -> unsigned int"""
6879  return _IMP_core.WeightedSum_get_function_number(self)
6880 
6881  def set_weights(self, weights):
6882  r"""set_weights(WeightedSum self, IMP::Floats weights)"""
6883  return _IMP_core.WeightedSum_set_weights(self, weights)
6884 
6885  def get_weights(self):
6886  r"""get_weights(WeightedSum self) -> IMP::Floats"""
6887  return _IMP_core.WeightedSum_get_weights(self)
6888 
6889  def get_weight(self, i):
6890  r"""get_weight(WeightedSum self, unsigned int i) -> double"""
6891  return _IMP_core.WeightedSum_get_weight(self, i)
6892 
6893  def get_function(self, i):
6894  r"""get_function(WeightedSum self, unsigned int i) -> UnaryFunction"""
6895  return _IMP_core.WeightedSum_get_function(self, i)
6896 
6897  def get_version_info(self):
6898  r"""get_version_info(WeightedSum self) -> VersionInfo"""
6899  return _IMP_core.WeightedSum_get_version_info(self)
6900  __swig_destroy__ = _IMP_core.delete_WeightedSum
6901 
6902  def __str__(self):
6903  r"""__str__(WeightedSum self) -> std::string"""
6904  return _IMP_core.WeightedSum___str__(self)
6905 
6906  def __repr__(self):
6907  r"""__repr__(WeightedSum self) -> std::string"""
6908  return _IMP_core.WeightedSum___repr__(self)
6909 
6910  @staticmethod
6911  def get_from(o):
6912  return _object_cast_to_WeightedSum(o)
6913 
6914 
6915  def _get_jax(self):
6916  import jax.numpy as jnp
6917  def score(val, funcs, weights):
6918  return sum(f(val) * weight for (f, weight) in zip(funcs, weights))
6919  nfunc = self.get_function_number()
6920  funcs = [self.get_function(i).get_derived_object()._get_jax()
6921  for i in range(nfunc)]
6922  return functools.partial(score, funcs=funcs,
6923  weights=self.get_weights())
6924 
6925 
6926 # Register WeightedSum in _IMP_core:
6927 _IMP_core.WeightedSum_swigregister(WeightedSum)
6928 class WeightedSumOfExponential(IMP.UnaryFunction):
6929  r"""Proxy of C++ IMP::core::WeightedSumOfExponential class."""
6930 
6931  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6932 
6933  def __init__(self, funcs, weights, denom=1.0):
6934  r"""__init__(WeightedSumOfExponential self, IMP::UnaryFunctions funcs, IMP::Floats weights, IMP::Float denom=1.0) -> WeightedSumOfExponential"""
6935  _IMP_core.WeightedSumOfExponential_swiginit(self, _IMP_core.new_WeightedSumOfExponential(funcs, weights, denom))
6936 
6937  def get_function_number(self):
6938  r"""get_function_number(WeightedSumOfExponential self) -> unsigned int"""
6939  return _IMP_core.WeightedSumOfExponential_get_function_number(self)
6940 
6941  def set_weights(self, weights):
6942  r"""set_weights(WeightedSumOfExponential self, IMP::Floats weights)"""
6943  return _IMP_core.WeightedSumOfExponential_set_weights(self, weights)
6944 
6945  def get_weights(self):
6946  r"""get_weights(WeightedSumOfExponential self) -> IMP::Floats"""
6947  return _IMP_core.WeightedSumOfExponential_get_weights(self)
6948 
6949  def get_weight(self, i):
6950  r"""get_weight(WeightedSumOfExponential self, unsigned int i) -> double"""
6951  return _IMP_core.WeightedSumOfExponential_get_weight(self, i)
6952 
6953  def get_function(self, i):
6954  r"""get_function(WeightedSumOfExponential self, unsigned int i) -> UnaryFunction"""
6955  return _IMP_core.WeightedSumOfExponential_get_function(self, i)
6956 
6957  def set_denominator(self, denom):
6958  r"""set_denominator(WeightedSumOfExponential self, double denom)"""
6959  return _IMP_core.WeightedSumOfExponential_set_denominator(self, denom)
6960 
6961  def get_denominator(self):
6962  r"""get_denominator(WeightedSumOfExponential self) -> double"""
6963  return _IMP_core.WeightedSumOfExponential_get_denominator(self)
6964 
6965  def get_version_info(self):
6966  r"""get_version_info(WeightedSumOfExponential self) -> VersionInfo"""
6967  return _IMP_core.WeightedSumOfExponential_get_version_info(self)
6968  __swig_destroy__ = _IMP_core.delete_WeightedSumOfExponential
6969 
6970  def __str__(self):
6971  r"""__str__(WeightedSumOfExponential self) -> std::string"""
6972  return _IMP_core.WeightedSumOfExponential___str__(self)
6973 
6974  def __repr__(self):
6975  r"""__repr__(WeightedSumOfExponential self) -> std::string"""
6976  return _IMP_core.WeightedSumOfExponential___repr__(self)
6977 
6978  @staticmethod
6979  def get_from(o):
6980  return _object_cast_to_WeightedSumOfExponential(o)
6981 
6982 
6983  def _get_jax(self):
6984  import jax.numpy as jnp
6985  def score(val, funcs, weights, denom):
6986  exp_sum = sum(weight * jnp.exp(-f(val) / denom)
6987  for (f, weight) in zip(funcs, weights))
6988  return -jnp.log(exp_sum) * denom
6989  nfunc = self.get_function_number()
6990  funcs = [self.get_function(i).get_derived_object()._get_jax()
6991  for i in range(nfunc)]
6992  return functools.partial(score, funcs=funcs,
6993  weights=self.get_weights(),
6994  denom=self.get_denominator())
6995 
6996 
6997 # Register WeightedSumOfExponential in _IMP_core:
6998 _IMP_core.WeightedSumOfExponential_swigregister(WeightedSumOfExponential)
6999 class MSConnectivityRestraint(IMP.Restraint):
7000  r"""Proxy of C++ IMP::core::MSConnectivityRestraint class."""
7001 
7002  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7003 
7004  def __init__(self, m, ps, eps=0.1):
7005  r"""__init__(MSConnectivityRestraint self, Model m, PairScore ps, double eps=0.1) -> MSConnectivityRestraint"""
7006  _IMP_core.MSConnectivityRestraint_swiginit(self, _IMP_core.new_MSConnectivityRestraint(m, ps, eps))
7007 
7008  def add_type(self, ps):
7009  r"""add_type(MSConnectivityRestraint self, IMP::ParticlesTemp const & ps) -> unsigned int"""
7010  return _IMP_core.MSConnectivityRestraint_add_type(self, ps)
7011 
7012  def add_composite(self, *args):
7013  r"""
7014  add_composite(MSConnectivityRestraint self, IMP::Ints const & components) -> unsigned int
7015  add_composite(MSConnectivityRestraint self, IMP::Ints const & components, unsigned int parent) -> unsigned int
7016  """
7017  return _IMP_core.MSConnectivityRestraint_add_composite(self, *args)
7018 
7019  def get_connected_pairs(self):
7020  r"""get_connected_pairs(MSConnectivityRestraint self) -> IMP::ParticlePairsTemp"""
7021  return _IMP_core.MSConnectivityRestraint_get_connected_pairs(self)
7022 
7023  def get_pair_score(self):
7024  r"""get_pair_score(MSConnectivityRestraint self) -> PairScore"""
7025  return _IMP_core.MSConnectivityRestraint_get_pair_score(self)
7026 
7027  def do_create_current_decomposition(self):
7028  r"""do_create_current_decomposition(MSConnectivityRestraint self) -> IMP::Restraints"""
7029  return _IMP_core.MSConnectivityRestraint_do_create_current_decomposition(self)
7030 
7031  def do_get_inputs(self):
7032  r"""do_get_inputs(MSConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
7033  return _IMP_core.MSConnectivityRestraint_do_get_inputs(self)
7034 
7035  def get_version_info(self):
7036  r"""get_version_info(MSConnectivityRestraint self) -> VersionInfo"""
7037  return _IMP_core.MSConnectivityRestraint_get_version_info(self)
7038  __swig_destroy__ = _IMP_core.delete_MSConnectivityRestraint
7039 
7040  def __str__(self):
7041  r"""__str__(MSConnectivityRestraint self) -> std::string"""
7042  return _IMP_core.MSConnectivityRestraint___str__(self)
7043 
7044  def __repr__(self):
7045  r"""__repr__(MSConnectivityRestraint self) -> std::string"""
7046  return _IMP_core.MSConnectivityRestraint___repr__(self)
7047 
7048  @staticmethod
7049  def get_from(o):
7050  return _object_cast_to_MSConnectivityRestraint(o)
7051 
7052 
7053 # Register MSConnectivityRestraint in _IMP_core:
7054 _IMP_core.MSConnectivityRestraint_swigregister(MSConnectivityRestraint)
7055 class HierarchyTraits(object):
7056  r"""Proxy of C++ IMP::core::HierarchyTraits class."""
7057 
7058  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7059 
7060  def __init__(self, *args):
7061  r"""
7062  __init__(HierarchyTraits self) -> HierarchyTraits
7063  __init__(HierarchyTraits self, std::string name) -> HierarchyTraits
7064  """
7065  _IMP_core.HierarchyTraits_swiginit(self, _IMP_core.new_HierarchyTraits(*args))
7066 
7067  def get_children_key(self):
7068  r"""get_children_key(HierarchyTraits self) -> ParticleIndexesKey"""
7069  return _IMP_core.HierarchyTraits_get_children_key(self)
7070 
7071  def get_parent_key(self):
7072  r"""get_parent_key(HierarchyTraits self) -> ParticleIndexKey"""
7073  return _IMP_core.HierarchyTraits_get_parent_key(self)
7074 
7075  def __eq__(self, o):
7076  r"""__eq__(HierarchyTraits self, HierarchyTraits o) -> bool"""
7077  return _IMP_core.HierarchyTraits___eq__(self, o)
7078 
7079  def show(self, *args):
7080  r"""show(HierarchyTraits self, _ostream out=std::cout)"""
7081  return _IMP_core.HierarchyTraits_show(self, *args)
7082 
7083  def __str__(self):
7084  r"""__str__(HierarchyTraits self) -> std::string"""
7085  return _IMP_core.HierarchyTraits___str__(self)
7086 
7087  def __repr__(self):
7088  r"""__repr__(HierarchyTraits self) -> std::string"""
7089  return _IMP_core.HierarchyTraits___repr__(self)
7090  __swig_destroy__ = _IMP_core.delete_HierarchyTraits
7091 
7092 # Register HierarchyTraits in _IMP_core:
7093 _IMP_core.HierarchyTraits_swigregister(HierarchyTraits)
7094 class Hierarchy(IMP.Decorator):
7095  r"""Proxy of C++ IMP::core::Hierarchy class."""
7096 
7097  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7098 
7099  def get_decorator_traits(self):
7100  r"""get_decorator_traits(Hierarchy self) -> HierarchyTraits"""
7101  return _IMP_core.Hierarchy_get_decorator_traits(self)
7102 
7103  @staticmethod
7104  def get_default_decorator_traits():
7105  r"""get_default_decorator_traits() -> HierarchyTraits"""
7106  return _IMP_core.Hierarchy_get_default_decorator_traits()
7107 
7108  def __init__(self, *args):
7109  r"""
7110  __init__(Hierarchy self) -> Hierarchy
7111  __init__(Hierarchy self, Model m, ParticleIndex id, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7112  __init__(Hierarchy self, _ParticleAdaptor d, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7113  """
7114  _IMP_core.Hierarchy_swiginit(self, _IMP_core.new_Hierarchy(*args))
7115 
7116  def show(self, *args):
7117  r"""show(Hierarchy self, _ostream out=std::cout)"""
7118  return _IMP_core.Hierarchy_show(self, *args)
7119 
7120  @staticmethod
7121  def setup_particle(*args):
7122  r"""
7123  setup_particle(Model m, ParticleIndex pi, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7124  setup_particle(_ParticleAdaptor d, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7125  setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7126  setup_particle(_ParticleAdaptor d, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7127  setup_particle(Model m, ParticleIndex pi, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7128  setup_particle(_ParticleAdaptor d, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7129  """
7130  return _IMP_core.Hierarchy_setup_particle(*args)
7131 
7132  @staticmethod
7133  def get_is_setup(*args):
7134  r"""
7135  get_is_setup(_ParticleAdaptor p, HierarchyTraits tr=get_default_traits()) -> bool
7136  get_is_setup(Model arg1, ParticleIndex arg2, HierarchyTraits arg3=Hierarchy::get_default_traits()) -> bool
7137  """
7138  return _IMP_core.Hierarchy_get_is_setup(*args)
7139 
7140  @staticmethod
7141  def get_changed_key():
7142  r"""get_changed_key() -> TriggerKey"""
7143  return _IMP_core.Hierarchy_get_changed_key()
7144 
7145  def get_parent(self):
7146  r"""get_parent(Hierarchy self) -> Hierarchy"""
7147  return _IMP_core.Hierarchy_get_parent(self)
7148 
7149  def get_number_of_children(self):
7150  r"""get_number_of_children(Hierarchy self) -> unsigned int"""
7151  return _IMP_core.Hierarchy_get_number_of_children(self)
7152 
7153  def get_child(self, i):
7154  r"""get_child(Hierarchy self, unsigned int i) -> Hierarchy"""
7155  return _IMP_core.Hierarchy_get_child(self, i)
7156 
7157  def get_children_indexes(self):
7158  r"""get_children_indexes(Hierarchy self) -> IMP::ParticleIndexes"""
7159  return _IMP_core.Hierarchy_get_children_indexes(self)
7160 
7161  def get_children(self):
7162  r"""get_children(Hierarchy self) -> IMP::core::GenericHierarchies"""
7163  return _IMP_core.Hierarchy_get_children(self)
7164 
7165  def remove_child(self, *args):
7166  r"""
7167  remove_child(Hierarchy self, unsigned int i)
7168  remove_child(Hierarchy self, Hierarchy h)
7169  """
7170  return _IMP_core.Hierarchy_remove_child(self, *args)
7171 
7172  def clear_children(self):
7173  r"""clear_children(Hierarchy self)"""
7174  return _IMP_core.Hierarchy_clear_children(self)
7175 
7176  def add_child(self, h):
7177  r"""add_child(Hierarchy self, Hierarchy h)"""
7178  return _IMP_core.Hierarchy_add_child(self, h)
7179 
7180  def add_child_at(self, h, pos):
7181  r"""add_child_at(Hierarchy self, Hierarchy h, unsigned int pos)"""
7182  return _IMP_core.Hierarchy_add_child_at(self, h, pos)
7183 
7184  def get_child_index(self, *args):
7185  r"""
7186  get_child_index(Hierarchy self, unsigned int i) -> ParticleIndex
7187  get_child_index(Hierarchy self) -> int
7188  """
7189  return _IMP_core.Hierarchy_get_child_index(self, *args)
7190 
7191  @staticmethod
7192  def get_default_traits():
7193  r"""get_default_traits() -> HierarchyTraits"""
7194  return _IMP_core.Hierarchy_get_default_traits()
7195 
7196  def get_traits(self):
7197  r"""get_traits(Hierarchy self) -> HierarchyTraits"""
7198  return _IMP_core.Hierarchy_get_traits(self)
7199 
7200  def add_attribute(self, *args):
7201  r"""
7202  add_attribute(Hierarchy self, FloatKey k, IMP::Float v, bool opt)
7203  add_attribute(Hierarchy self, FloatKey a0, IMP::Float a1)
7204  add_attribute(Hierarchy self, IntKey a0, IMP::Int a1)
7205  add_attribute(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7206  add_attribute(Hierarchy self, IntsKey a0, IMP::Ints a1)
7207  add_attribute(Hierarchy self, StringKey a0, IMP::String a1)
7208  add_attribute(Hierarchy self, ParticleIndexKey a0, Particle a1)
7209  add_attribute(Hierarchy self, ObjectKey a0, Object a1)
7210  add_attribute(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7211  add_attribute(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7212  add_attribute(Hierarchy self, SparseStringKey a0, IMP::String a1)
7213  add_attribute(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7214  """
7215  return _IMP_core.Hierarchy_add_attribute(self, *args)
7216 
7217  def get_value(self, *args):
7218  r"""
7219  get_value(Hierarchy self, FloatKey a0) -> IMP::Float
7220  get_value(Hierarchy self, IntKey a0) -> IMP::Int
7221  get_value(Hierarchy self, FloatsKey a0) -> IMP::Floats
7222  get_value(Hierarchy self, IntsKey a0) -> IMP::Ints
7223  get_value(Hierarchy self, StringKey a0) -> IMP::String
7224  get_value(Hierarchy self, ParticleIndexKey a0) -> Particle
7225  get_value(Hierarchy self, ObjectKey a0) -> Object
7226  get_value(Hierarchy self, SparseFloatKey a0) -> IMP::Float
7227  get_value(Hierarchy self, SparseIntKey a0) -> IMP::Int
7228  get_value(Hierarchy self, SparseStringKey a0) -> IMP::String
7229  get_value(Hierarchy self, SparseParticleIndexKey a0) -> ParticleIndex
7230  """
7231  return _IMP_core.Hierarchy_get_value(self, *args)
7232 
7233  def set_value(self, *args):
7234  r"""
7235  set_value(Hierarchy self, FloatKey a0, IMP::Float a1)
7236  set_value(Hierarchy self, IntKey a0, IMP::Int a1)
7237  set_value(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7238  set_value(Hierarchy self, IntsKey a0, IMP::Ints a1)
7239  set_value(Hierarchy self, StringKey a0, IMP::String a1)
7240  set_value(Hierarchy self, ParticleIndexKey a0, Particle a1)
7241  set_value(Hierarchy self, ObjectKey a0, Object a1)
7242  set_value(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7243  set_value(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7244  set_value(Hierarchy self, SparseStringKey a0, IMP::String a1)
7245  set_value(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7246  """
7247  return _IMP_core.Hierarchy_set_value(self, *args)
7248 
7249  def remove_attribute(self, *args):
7250  r"""
7251  remove_attribute(Hierarchy self, FloatKey a0)
7252  remove_attribute(Hierarchy self, IntKey a0)
7253  remove_attribute(Hierarchy self, FloatsKey a0)
7254  remove_attribute(Hierarchy self, IntsKey a0)
7255  remove_attribute(Hierarchy self, StringKey a0)
7256  remove_attribute(Hierarchy self, ParticleIndexKey a0)
7257  remove_attribute(Hierarchy self, ObjectKey a0)
7258  remove_attribute(Hierarchy self, SparseFloatKey a0)
7259  remove_attribute(Hierarchy self, SparseIntKey a0)
7260  remove_attribute(Hierarchy self, SparseStringKey a0)
7261  remove_attribute(Hierarchy self, SparseParticleIndexKey a0)
7262  """
7263  return _IMP_core.Hierarchy_remove_attribute(self, *args)
7264 
7265  def has_attribute(self, *args):
7266  r"""
7267  has_attribute(Hierarchy self, FloatKey a0) -> bool
7268  has_attribute(Hierarchy self, IntKey a0) -> bool
7269  has_attribute(Hierarchy self, FloatsKey a0) -> bool
7270  has_attribute(Hierarchy self, IntsKey a0) -> bool
7271  has_attribute(Hierarchy self, StringKey a0) -> bool
7272  has_attribute(Hierarchy self, ParticleIndexKey a0) -> bool
7273  has_attribute(Hierarchy self, ObjectKey a0) -> bool
7274  has_attribute(Hierarchy self, SparseFloatKey a0) -> bool
7275  has_attribute(Hierarchy self, SparseIntKey a0) -> bool
7276  has_attribute(Hierarchy self, SparseStringKey a0) -> bool
7277  has_attribute(Hierarchy self, SparseParticleIndexKey a0) -> bool
7278  """
7279  return _IMP_core.Hierarchy_has_attribute(self, *args)
7280 
7281  def get_derivative(self, a0):
7282  r"""get_derivative(Hierarchy self, FloatKey a0) -> double"""
7283  return _IMP_core.Hierarchy_get_derivative(self, a0)
7284 
7285  def get_name(self):
7286  r"""get_name(Hierarchy self) -> std::string"""
7287  return _IMP_core.Hierarchy_get_name(self)
7288 
7289  def clear_caches(self):
7290  r"""clear_caches(Hierarchy self)"""
7291  return _IMP_core.Hierarchy_clear_caches(self)
7292 
7293  def set_name(self, a0):
7294  r"""set_name(Hierarchy self, std::string a0)"""
7295  return _IMP_core.Hierarchy_set_name(self, a0)
7296 
7297  def set_check_level(self, a0):
7298  r"""set_check_level(Hierarchy self, IMP::CheckLevel a0)"""
7299  return _IMP_core.Hierarchy_set_check_level(self, a0)
7300 
7301  def add_to_derivative(self, a0, a1, a2):
7302  r"""add_to_derivative(Hierarchy self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
7303  return _IMP_core.Hierarchy_add_to_derivative(self, a0, a1, a2)
7304 
7305  def set_is_optimized(self, a0, a1):
7306  r"""set_is_optimized(Hierarchy self, FloatKey a0, bool a1)"""
7307  return _IMP_core.Hierarchy_set_is_optimized(self, a0, a1)
7308 
7309  def get_is_optimized(self, a0):
7310  r"""get_is_optimized(Hierarchy self, FloatKey a0) -> bool"""
7311  return _IMP_core.Hierarchy_get_is_optimized(self, a0)
7312 
7313  def get_check_level(self):
7314  r"""get_check_level(Hierarchy self) -> IMP::CheckLevel"""
7315  return _IMP_core.Hierarchy_get_check_level(self)
7316 
7317  def __eq__(self, *args):
7318  r"""
7319  __eq__(Hierarchy self, Hierarchy o) -> bool
7320  __eq__(Hierarchy self, Particle d) -> bool
7321  """
7322  return _IMP_core.Hierarchy___eq__(self, *args)
7323 
7324  def __ne__(self, *args):
7325  r"""
7326  __ne__(Hierarchy self, Hierarchy o) -> bool
7327  __ne__(Hierarchy self, Particle d) -> bool
7328  """
7329  return _IMP_core.Hierarchy___ne__(self, *args)
7330 
7331  def __le__(self, *args):
7332  r"""
7333  __le__(Hierarchy self, Hierarchy o) -> bool
7334  __le__(Hierarchy self, Particle d) -> bool
7335  """
7336  return _IMP_core.Hierarchy___le__(self, *args)
7337 
7338  def __lt__(self, *args):
7339  r"""
7340  __lt__(Hierarchy self, Hierarchy o) -> bool
7341  __lt__(Hierarchy self, Particle d) -> bool
7342  """
7343  return _IMP_core.Hierarchy___lt__(self, *args)
7344 
7345  def __ge__(self, *args):
7346  r"""
7347  __ge__(Hierarchy self, Hierarchy o) -> bool
7348  __ge__(Hierarchy self, Particle d) -> bool
7349  """
7350  return _IMP_core.Hierarchy___ge__(self, *args)
7351 
7352  def __gt__(self, *args):
7353  r"""
7354  __gt__(Hierarchy self, Hierarchy o) -> bool
7355  __gt__(Hierarchy self, Particle d) -> bool
7356  """
7357  return _IMP_core.Hierarchy___gt__(self, *args)
7358 
7359  def __hash__(self):
7360  r"""__hash__(Hierarchy self) -> std::size_t"""
7361  return _IMP_core.Hierarchy___hash__(self)
7362 
7363  def __str__(self):
7364  r"""__str__(Hierarchy self) -> std::string"""
7365  return _IMP_core.Hierarchy___str__(self)
7366 
7367  def __repr__(self):
7368  r"""__repr__(Hierarchy self) -> std::string"""
7369  return _IMP_core.Hierarchy___repr__(self)
7370  __swig_destroy__ = _IMP_core.delete_Hierarchy
7371 
7372 # Register Hierarchy in _IMP_core:
7373 _IMP_core.Hierarchy_swigregister(Hierarchy)
7374 class HierarchyVisitor(object):
7375  r"""Proxy of C++ IMP::core::HierarchyVisitor class."""
7376 
7377  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7378  __repr__ = _swig_repr
7379 
7380  def __init__(self):
7381  r"""__init__(HierarchyVisitor self) -> HierarchyVisitor"""
7382  if self.__class__ == HierarchyVisitor:
7383  _self = None
7384  else:
7385  _self = self
7386  _IMP_core.HierarchyVisitor_swiginit(self, _IMP_core.new_HierarchyVisitor(_self, ))
7387 
7388  if self.__class__ != HierarchyVisitor:
7389  _director_objects.register(self)
7390 
7391 
7392 
7393 
7394  def __call__(self, p):
7395  r"""__call__(HierarchyVisitor self, Hierarchy p) -> bool"""
7396  return _IMP_core.HierarchyVisitor___call__(self, p)
7397  __swig_destroy__ = _IMP_core.delete_HierarchyVisitor
7398  def __disown__(self):
7399  self.this.disown()
7400  _IMP_core.disown_HierarchyVisitor(self)
7401  return weakref.proxy(self)
7402 
7403 # Register HierarchyVisitor in _IMP_core:
7404 _IMP_core.HierarchyVisitor_swigregister(HierarchyVisitor)
7405 class ModifierVisitor(HierarchyVisitor):
7406  r"""Proxy of C++ IMP::core::ModifierVisitor class."""
7407 
7408  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7409  __repr__ = _swig_repr
7410 
7411  def __init__(self, sm):
7412  r"""__init__(ModifierVisitor self, SingletonModifier sm) -> ModifierVisitor"""
7413  _IMP_core.ModifierVisitor_swiginit(self, _IMP_core.new_ModifierVisitor(sm))
7414  __swig_destroy__ = _IMP_core.delete_ModifierVisitor
7415 
7416 # Register ModifierVisitor in _IMP_core:
7417 _IMP_core.ModifierVisitor_swigregister(ModifierVisitor)
7418 class HierarchyCounter(HierarchyVisitor):
7419  r"""Proxy of C++ IMP::core::HierarchyCounter class."""
7420 
7421  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7422 
7423  def __init__(self):
7424  r"""__init__(HierarchyCounter self) -> HierarchyCounter"""
7425  _IMP_core.HierarchyCounter_swiginit(self, _IMP_core.new_HierarchyCounter())
7426 
7427  def get_count(self):
7428  r"""get_count(HierarchyCounter self) -> unsigned int"""
7429  return _IMP_core.HierarchyCounter_get_count(self)
7430 
7431  def show(self, *args):
7432  r"""show(HierarchyCounter self, _ostream out=std::cout)"""
7433  return _IMP_core.HierarchyCounter_show(self, *args)
7434 
7435  def __str__(self):
7436  r"""__str__(HierarchyCounter self) -> std::string"""
7437  return _IMP_core.HierarchyCounter___str__(self)
7438 
7439  def __repr__(self):
7440  r"""__repr__(HierarchyCounter self) -> std::string"""
7441  return _IMP_core.HierarchyCounter___repr__(self)
7442 
7443  def _get_as_binary(self):
7444  r"""_get_as_binary(HierarchyCounter self) -> PyObject *"""
7445  return _IMP_core.HierarchyCounter__get_as_binary(self)
7446 
7447  def _set_from_binary(self, p):
7448  r"""_set_from_binary(HierarchyCounter self, PyObject * p)"""
7449  return _IMP_core.HierarchyCounter__set_from_binary(self, p)
7450 
7451  def __getstate__(self):
7452  p = self._get_as_binary()
7453  if len(self.__dict__) > 1:
7454  d = self.__dict__.copy()
7455  del d['this']
7456  p = (d, p)
7457  return p
7458 
7459  def __setstate__(self, p):
7460  if not hasattr(self, 'this'):
7461  self.__init__()
7462  if isinstance(p, tuple):
7463  d, p = p
7464  self.__dict__.update(d)
7465  return self._set_from_binary(p)
7466 
7467  __swig_destroy__ = _IMP_core.delete_HierarchyCounter
7468 
7469 # Register HierarchyCounter in _IMP_core:
7470 _IMP_core.HierarchyCounter_swigregister(HierarchyCounter)
7471 
7472 def get_leaves(mhd):
7473  r"""get_leaves(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7474  return _IMP_core.get_leaves(mhd)
7475 
7476 def get_internal(mhd):
7477  r"""get_internal(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7478  return _IMP_core.get_internal(mhd)
7479 
7480 def get_all_descendants(mhd):
7481  r"""get_all_descendants(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7482  return _IMP_core.get_all_descendants(mhd)
7483 
7484 def get_root(h):
7485  r"""get_root(Hierarchy h) -> Hierarchy"""
7486  return _IMP_core.get_root(h)
7487 
7488 def visit_breadth_first(d, f):
7489  r"""visit_breadth_first(Hierarchy d, HierarchyVisitor f)"""
7490  return _IMP_core.visit_breadth_first(d, f)
7491 
7492 def visit_depth_first(d, f):
7493  r"""visit_depth_first(Hierarchy d, HierarchyVisitor f)"""
7494  return _IMP_core.visit_depth_first(d, f)
7495 class LeavesRefiner(IMP.Refiner):
7496  r"""Proxy of C++ IMP::core::LeavesRefiner class."""
7497 
7498  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7499 
7500  def __init__(self, tr):
7501  r"""__init__(LeavesRefiner self, HierarchyTraits tr) -> LeavesRefiner"""
7502  _IMP_core.LeavesRefiner_swiginit(self, _IMP_core.new_LeavesRefiner(tr))
7503 
7504  def do_get_inputs(self, m, pis):
7505  r"""do_get_inputs(LeavesRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7506  return _IMP_core.LeavesRefiner_do_get_inputs(self, m, pis)
7507 
7508  def get_version_info(self):
7509  r"""get_version_info(LeavesRefiner self) -> VersionInfo"""
7510  return _IMP_core.LeavesRefiner_get_version_info(self)
7511  __swig_destroy__ = _IMP_core.delete_LeavesRefiner
7512 
7513  def __str__(self):
7514  r"""__str__(LeavesRefiner self) -> std::string"""
7515  return _IMP_core.LeavesRefiner___str__(self)
7516 
7517  def __repr__(self):
7518  r"""__repr__(LeavesRefiner self) -> std::string"""
7519  return _IMP_core.LeavesRefiner___repr__(self)
7520 
7521  @staticmethod
7522  def get_from(o):
7523  return _object_cast_to_LeavesRefiner(o)
7524 
7525 
7526 # Register LeavesRefiner in _IMP_core:
7527 _IMP_core.LeavesRefiner_swigregister(LeavesRefiner)
7528 class Linear(IMP.UnaryFunction):
7529  r"""Proxy of C++ IMP::core::Linear class."""
7530 
7531  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7532 
7533  def __init__(self, *args):
7534  r"""
7535  __init__(Linear self, double offset, double slope) -> Linear
7536  __init__(Linear self) -> Linear
7537  """
7538  _IMP_core.Linear_swiginit(self, _IMP_core.new_Linear(*args))
7539 
7540  def set_slope(self, f):
7541  r"""set_slope(Linear self, double f)"""
7542  return _IMP_core.Linear_set_slope(self, f)
7543 
7544  def get_slope(self):
7545  r"""get_slope(Linear self) -> double"""
7546  return _IMP_core.Linear_get_slope(self)
7547 
7548  def set_offset(self, f):
7549  r"""set_offset(Linear self, double f)"""
7550  return _IMP_core.Linear_set_offset(self, f)
7551 
7552  def get_offset(self):
7553  r"""get_offset(Linear self) -> double"""
7554  return _IMP_core.Linear_get_offset(self)
7555 
7556  def get_version_info(self):
7557  r"""get_version_info(Linear self) -> VersionInfo"""
7558  return _IMP_core.Linear_get_version_info(self)
7559  __swig_destroy__ = _IMP_core.delete_Linear
7560 
7561  def __str__(self):
7562  r"""__str__(Linear self) -> std::string"""
7563  return _IMP_core.Linear___str__(self)
7564 
7565  def __repr__(self):
7566  r"""__repr__(Linear self) -> std::string"""
7567  return _IMP_core.Linear___repr__(self)
7568 
7569  @staticmethod
7570  def get_from(o):
7571  return _object_cast_to_Linear(o)
7572 
7573 
7574  def _get_as_binary(self):
7575  r"""_get_as_binary(Linear self) -> PyObject *"""
7576  return _IMP_core.Linear__get_as_binary(self)
7577 
7578  def _set_from_binary(self, p):
7579  r"""_set_from_binary(Linear self, PyObject * p)"""
7580  return _IMP_core.Linear__set_from_binary(self, p)
7581 
7582  def __getstate__(self):
7583  p = self._get_as_binary()
7584  if len(self.__dict__) > 1:
7585  d = self.__dict__.copy()
7586  del d['this']
7587  p = (d, p)
7588  return p
7589 
7590  def __setstate__(self, p):
7591  if not hasattr(self, 'this'):
7592  self.__init__()
7593  if isinstance(p, tuple):
7594  d, p = p
7595  self.__dict__.update(d)
7596  return self._set_from_binary(p)
7597 
7598 
7599  def _get_jax(self):
7600  def score(val, slope, offset):
7601  return (val - offset) * slope
7602  return functools.partial(score, slope=self.get_slope(),
7603  offset=self.get_offset())
7604 
7605 
7606 # Register Linear in _IMP_core:
7607 _IMP_core.Linear_swigregister(Linear)
7608 class LogNormalMover(MonteCarloMover):
7609  r"""Proxy of C++ IMP::core::LogNormalMover class."""
7610 
7611  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7612 
7613  def __init__(self, *args):
7614  r"""
7615  __init__(LogNormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> LogNormalMover
7616  __init__(LogNormalMover self, Model m, ParticleIndex pi, double stddev) -> LogNormalMover
7617  __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> LogNormalMover
7618  __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> LogNormalMover
7619  __init__(LogNormalMover self) -> LogNormalMover
7620  """
7621  _IMP_core.LogNormalMover_swiginit(self, _IMP_core.new_LogNormalMover(*args))
7622 
7623  def set_sigma(self, sigma):
7624  r"""set_sigma(LogNormalMover self, IMP::Float sigma)"""
7625  return _IMP_core.LogNormalMover_set_sigma(self, sigma)
7626 
7627  def get_sigma(self):
7628  r"""get_sigma(LogNormalMover self) -> IMP::Float"""
7629  return _IMP_core.LogNormalMover_get_sigma(self)
7630 
7631  def get_indexes(self):
7632  r"""get_indexes(LogNormalMover self) -> IMP::ParticleIndexes"""
7633  return _IMP_core.LogNormalMover_get_indexes(self)
7634 
7635  def get_keys(self):
7636  r"""get_keys(LogNormalMover self) -> IMP::FloatKeys"""
7637  return _IMP_core.LogNormalMover_get_keys(self)
7638 
7639  def get_version_info(self):
7640  r"""get_version_info(LogNormalMover self) -> VersionInfo"""
7641  return _IMP_core.LogNormalMover_get_version_info(self)
7642  __swig_destroy__ = _IMP_core.delete_LogNormalMover
7643 
7644  def __str__(self):
7645  r"""__str__(LogNormalMover self) -> std::string"""
7646  return _IMP_core.LogNormalMover___str__(self)
7647 
7648  def __repr__(self):
7649  r"""__repr__(LogNormalMover self) -> std::string"""
7650  return _IMP_core.LogNormalMover___repr__(self)
7651 
7652  @staticmethod
7653  def get_from(o):
7654  return _object_cast_to_LogNormalMover(o)
7655 
7656 
7657  def _get_as_binary(self):
7658  r"""_get_as_binary(LogNormalMover self) -> PyObject *"""
7659  return _IMP_core.LogNormalMover__get_as_binary(self)
7660 
7661  def _set_from_binary(self, p):
7662  r"""_set_from_binary(LogNormalMover self, PyObject * p)"""
7663  return _IMP_core.LogNormalMover__set_from_binary(self, p)
7664 
7665  def __getstate__(self):
7666  p = self._get_as_binary()
7667  if len(self.__dict__) > 1:
7668  d = self.__dict__.copy()
7669  del d['this']
7670  p = (d, p)
7671  return p
7672 
7673  def __setstate__(self, p):
7674  if not hasattr(self, 'this'):
7675  self.__init__()
7676  if isinstance(p, tuple):
7677  d, p = p
7678  self.__dict__.update(d)
7679  return self._set_from_binary(p)
7680 
7681 
7682  def _get_jax(self):
7683  import jax.random
7684  from IMP.core._jax_util import _get_offset_propose_func
7685  keys = self.get_keys()
7686  sigma = self.get_sigma()
7687 
7688  def offset_func(key, shape):
7689  key, subkey = jax.random.split(key)
7690  return key, jax.random.lognormal(subkey, sigma, shape)
7691 
7692  propose_func, keys = _get_offset_propose_func(
7693  self.get_indexes(), keys, offset_func)
7694 
7695  return self._wrap_jax(lambda key: key, propose_func, keys=keys)
7696 
7697 
7698 # Register LogNormalMover in _IMP_core:
7699 _IMP_core.LogNormalMover_swigregister(LogNormalMover)
7700 IMP_CORE_HAS_MONTE_CARLO_MOVER = _IMP_core.IMP_CORE_HAS_MONTE_CARLO_MOVER
7701 
7702 class MonteCarlo(IMP.Optimizer):
7703  r"""Proxy of C++ IMP::core::MonteCarlo class."""
7704 
7705  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7706 
7707  def __init__(self, *args):
7708  r"""
7709  __init__(MonteCarlo self, Model m) -> MonteCarlo
7710  __init__(MonteCarlo self) -> MonteCarlo
7711  """
7712  _IMP_core.MonteCarlo_swiginit(self, _IMP_core.new_MonteCarlo(*args))
7713 
7714  def get_version_info(self):
7715  r"""get_version_info(MonteCarlo self) -> VersionInfo"""
7716  return _IMP_core.MonteCarlo_get_version_info(self)
7717  __swig_destroy__ = _IMP_core.delete_MonteCarlo
7718 
7719  def set_return_best(self, tf):
7720  r"""set_return_best(MonteCarlo self, bool tf)"""
7721  return _IMP_core.MonteCarlo_set_return_best(self, tf)
7722 
7723  def get_return_best(self):
7724  r"""get_return_best(MonteCarlo self) -> bool"""
7725  return _IMP_core.MonteCarlo_get_return_best(self)
7726 
7727  def set_score_moved(self, mv):
7728  r"""set_score_moved(MonteCarlo self, bool mv)"""
7729  return _IMP_core.MonteCarlo_set_score_moved(self, mv)
7730 
7731  def set_kt(self, t):
7732  r"""set_kt(MonteCarlo self, IMP::Float t)"""
7733  return _IMP_core.MonteCarlo_set_kt(self, t)
7734 
7735  def get_kt(self):
7736  r"""get_kt(MonteCarlo self) -> IMP::Float"""
7737  return _IMP_core.MonteCarlo_get_kt(self)
7738 
7739  def get_last_accepted_energy(self):
7740  r"""get_last_accepted_energy(MonteCarlo self) -> double"""
7741  return _IMP_core.MonteCarlo_get_last_accepted_energy(self)
7742 
7743  def set_last_accepted_energy(self, energy):
7744  r"""set_last_accepted_energy(MonteCarlo self, double energy)"""
7745  return _IMP_core.MonteCarlo_set_last_accepted_energy(self, energy)
7746 
7747  def get_best_accepted_energy(self):
7748  r"""get_best_accepted_energy(MonteCarlo self) -> double"""
7749  return _IMP_core.MonteCarlo_get_best_accepted_energy(self)
7750 
7751  def set_best_accepted_energy(self, energy):
7752  r"""set_best_accepted_energy(MonteCarlo self, double energy)"""
7753  return _IMP_core.MonteCarlo_set_best_accepted_energy(self, energy)
7754 
7755  def get_number_of_downward_steps(self):
7756  r"""get_number_of_downward_steps(MonteCarlo self) -> unsigned int"""
7757  return _IMP_core.MonteCarlo_get_number_of_downward_steps(self)
7758 
7759  def get_number_of_upward_steps(self):
7760  r"""get_number_of_upward_steps(MonteCarlo self) -> unsigned int"""
7761  return _IMP_core.MonteCarlo_get_number_of_upward_steps(self)
7762 
7763  def get_number_of_proposed_steps(self):
7764  r"""get_number_of_proposed_steps(MonteCarlo self) -> unsigned int"""
7765  return _IMP_core.MonteCarlo_get_number_of_proposed_steps(self)
7766 
7767  def get_number_of_accepted_steps(self):
7768  r"""get_number_of_accepted_steps(MonteCarlo self) -> unsigned int"""
7769  return _IMP_core.MonteCarlo_get_number_of_accepted_steps(self)
7770 
7771  def set_number_of_downward_steps(self, nsteps):
7772  r"""set_number_of_downward_steps(MonteCarlo self, unsigned int nsteps)"""
7773  return _IMP_core.MonteCarlo_set_number_of_downward_steps(self, nsteps)
7774 
7775  def set_number_of_upward_steps(self, nsteps):
7776  r"""set_number_of_upward_steps(MonteCarlo self, unsigned int nsteps)"""
7777  return _IMP_core.MonteCarlo_set_number_of_upward_steps(self, nsteps)
7778 
7779  def set_number_of_rejected_steps(self, nsteps):
7780  r"""set_number_of_rejected_steps(MonteCarlo self, unsigned int nsteps)"""
7781  return _IMP_core.MonteCarlo_set_number_of_rejected_steps(self, nsteps)
7782 
7783  def reset_statistics(self):
7784  r"""reset_statistics(MonteCarlo self)"""
7785  return _IMP_core.MonteCarlo_reset_statistics(self)
7786 
7787  def set_score_threshold(self, s):
7788  r"""set_score_threshold(MonteCarlo self, double s)"""
7789  return _IMP_core.MonteCarlo_set_score_threshold(self, s)
7790 
7791  def get_score_threshold(self):
7792  r"""get_score_threshold(MonteCarlo self) -> double"""
7793  return _IMP_core.MonteCarlo_get_score_threshold(self)
7794 
7795  def set_maximum_difference(self, d):
7796  r"""set_maximum_difference(MonteCarlo self, double d)"""
7797  return _IMP_core.MonteCarlo_set_maximum_difference(self, d)
7798 
7799  def get_maximum_difference(self):
7800  r"""get_maximum_difference(MonteCarlo self) -> double"""
7801  return _IMP_core.MonteCarlo_get_maximum_difference(self)
7802  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)
7803  def __set_movers(self, obj): IMP._list_util.set_varlist(self.movers, obj)
7804  def __del_movers(self): IMP._list_util.del_varlist(self.movers)
7805  movers = property(__get_movers, __set_movers, __del_movers, doc="List of ##ucnames")
7806 
7807  def remove_mover(self, d):
7808  r"""remove_mover(MonteCarlo self, MonteCarloMover d)"""
7809  return _IMP_core.MonteCarlo_remove_mover(self, d)
7810 
7811  def _python_index_mover(self, d, start, stop):
7812  r"""_python_index_mover(MonteCarlo self, MonteCarloMover d, unsigned int start, unsigned int stop) -> unsigned int"""
7813  return _IMP_core.MonteCarlo__python_index_mover(self, d, start, stop)
7814 
7815  def remove_movers(self, d):
7816  r"""remove_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & d)"""
7817  return _IMP_core.MonteCarlo_remove_movers(self, d)
7818 
7819  def set_movers(self, ps):
7820  r"""set_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & ps)"""
7821  return _IMP_core.MonteCarlo_set_movers(self, ps)
7822 
7823  def set_movers_order(self, objs):
7824  r"""set_movers_order(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7825  return _IMP_core.MonteCarlo_set_movers_order(self, objs)
7826 
7827  def add_mover(self, obj):
7828  r"""add_mover(MonteCarlo self, MonteCarloMover obj) -> unsigned int"""
7829  return _IMP_core.MonteCarlo_add_mover(self, obj)
7830 
7831  def add_movers(self, objs):
7832  r"""add_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7833  return _IMP_core.MonteCarlo_add_movers(self, objs)
7834 
7835  def clear_movers(self):
7836  r"""clear_movers(MonteCarlo self)"""
7837  return _IMP_core.MonteCarlo_clear_movers(self)
7838 
7839  def get_number_of_movers(self):
7840  r"""get_number_of_movers(MonteCarlo self) -> unsigned int"""
7841  return _IMP_core.MonteCarlo_get_number_of_movers(self)
7842 
7843  def get_has_movers(self):
7844  r"""get_has_movers(MonteCarlo self) -> bool"""
7845  return _IMP_core.MonteCarlo_get_has_movers(self)
7846 
7847  def get_mover(self, i):
7848  r"""get_mover(MonteCarlo self, unsigned int i) -> MonteCarloMover"""
7849  return _IMP_core.MonteCarlo_get_mover(self, i)
7850 
7851  def get_movers(self):
7852  r"""get_movers(MonteCarlo self) -> IMP::core::MonteCarloMovers"""
7853  return _IMP_core.MonteCarlo_get_movers(self)
7854 
7855  def erase_mover(self, i):
7856  r"""erase_mover(MonteCarlo self, unsigned int i)"""
7857  return _IMP_core.MonteCarlo_erase_mover(self, i)
7858 
7859  def reserve_movers(self, sz):
7860  r"""reserve_movers(MonteCarlo self, unsigned int sz)"""
7861  return _IMP_core.MonteCarlo_reserve_movers(self, sz)
7862 
7863  def __str__(self):
7864  r"""__str__(MonteCarlo self) -> std::string"""
7865  return _IMP_core.MonteCarlo___str__(self)
7866 
7867  def __repr__(self):
7868  r"""__repr__(MonteCarlo self) -> std::string"""
7869  return _IMP_core.MonteCarlo___repr__(self)
7870 
7871  @staticmethod
7872  def get_from(o):
7873  return _object_cast_to_MonteCarlo(o)
7874 
7875 
7876  def _get_as_binary(self):
7877  r"""_get_as_binary(MonteCarlo self) -> PyObject *"""
7878  return _IMP_core.MonteCarlo__get_as_binary(self)
7879 
7880  def _set_from_binary(self, p):
7881  r"""_set_from_binary(MonteCarlo self, PyObject * p)"""
7882  return _IMP_core.MonteCarlo__set_from_binary(self, p)
7883 
7884  def __getstate__(self):
7885  p = self._get_as_binary()
7886  if len(self.__dict__) > 1:
7887  d = self.__dict__.copy()
7888  del d['this']
7889  p = (d, p)
7890  return p
7891 
7892  def __setstate__(self, p):
7893  if not hasattr(self, 'this'):
7894  self.__init__()
7895  if isinstance(p, tuple):
7896  d, p = p
7897  self.__dict__.update(d)
7898  return self._set_from_binary(p)
7899 
7900 
7901  def _get_jax(self):
7902  from IMP.core._jax_util import _MCJAXInfo
7903  return _MCJAXInfo(self)
7904 
7905  def _get_jax_optimizer(self, max_steps):
7906  import IMP.core._jax_util
7907  return IMP.core._jax_util._MCJAXOptimizer(self, max_steps)
7908 
7909  def _optimize_jax(self, max_steps):
7910  opt = self._get_jax_optimizer(max_steps)
7911  score, mc_state = opt.optimize(opt.get_initial_state())
7912  return score
7913 
7914 
7915 # Register MonteCarlo in _IMP_core:
7916 _IMP_core.MonteCarlo_swigregister(MonteCarlo)
7917 class MonteCarloWithLocalOptimization(MonteCarlo):
7918  r"""Proxy of C++ IMP::core::MonteCarloWithLocalOptimization class."""
7919 
7920  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7921 
7922  def __init__(self, opt, steps):
7923  r"""__init__(MonteCarloWithLocalOptimization self, Optimizer opt, unsigned int steps) -> MonteCarloWithLocalOptimization"""
7924  _IMP_core.MonteCarloWithLocalOptimization_swiginit(self, _IMP_core.new_MonteCarloWithLocalOptimization(opt, steps))
7925 
7926  def get_number_of_steps(self):
7927  r"""get_number_of_steps(MonteCarloWithLocalOptimization self) -> unsigned int"""
7928  return _IMP_core.MonteCarloWithLocalOptimization_get_number_of_steps(self)
7929 
7930  def get_local_optimizer(self):
7931  r"""get_local_optimizer(MonteCarloWithLocalOptimization self) -> Optimizer"""
7932  return _IMP_core.MonteCarloWithLocalOptimization_get_local_optimizer(self)
7933  __swig_destroy__ = _IMP_core.delete_MonteCarloWithLocalOptimization
7934 
7935  def __str__(self):
7936  r"""__str__(MonteCarloWithLocalOptimization self) -> std::string"""
7937  return _IMP_core.MonteCarloWithLocalOptimization___str__(self)
7938 
7939  def __repr__(self):
7940  r"""__repr__(MonteCarloWithLocalOptimization self) -> std::string"""
7941  return _IMP_core.MonteCarloWithLocalOptimization___repr__(self)
7942 
7943  @staticmethod
7944  def get_from(o):
7945  return _object_cast_to_MonteCarloWithLocalOptimization(o)
7946 
7947 
7948 # Register MonteCarloWithLocalOptimization in _IMP_core:
7949 _IMP_core.MonteCarloWithLocalOptimization_swigregister(MonteCarloWithLocalOptimization)
7950 class MonteCarloWithBasinHopping(MonteCarloWithLocalOptimization):
7951  r"""Proxy of C++ IMP::core::MonteCarloWithBasinHopping class."""
7952 
7953  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7954 
7955  def __init__(self, opt, ns):
7956  r"""__init__(MonteCarloWithBasinHopping self, Optimizer opt, unsigned int ns) -> MonteCarloWithBasinHopping"""
7957  _IMP_core.MonteCarloWithBasinHopping_swiginit(self, _IMP_core.new_MonteCarloWithBasinHopping(opt, ns))
7958  __swig_destroy__ = _IMP_core.delete_MonteCarloWithBasinHopping
7959 
7960  def __str__(self):
7961  r"""__str__(MonteCarloWithBasinHopping self) -> std::string"""
7962  return _IMP_core.MonteCarloWithBasinHopping___str__(self)
7963 
7964  def __repr__(self):
7965  r"""__repr__(MonteCarloWithBasinHopping self) -> std::string"""
7966  return _IMP_core.MonteCarloWithBasinHopping___repr__(self)
7967 
7968  @staticmethod
7969  def get_from(o):
7970  return _object_cast_to_MonteCarloWithBasinHopping(o)
7971 
7972 
7973 # Register MonteCarloWithBasinHopping in _IMP_core:
7974 _IMP_core.MonteCarloWithBasinHopping_swigregister(MonteCarloWithBasinHopping)
7975 class NeighborsTable(IMP.ScoreState):
7976  r"""Proxy of C++ IMP::core::NeighborsTable class."""
7977 
7978  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7979 
7980  def __init__(self, *args):
7981  r"""__init__(NeighborsTable self, PairContainer input, std::string name="CloseNeighborsTable%1%") -> NeighborsTable"""
7982  _IMP_core.NeighborsTable_swiginit(self, _IMP_core.new_NeighborsTable(*args))
7983 
7984  def get_neighbors(self, pi):
7985  r"""get_neighbors(NeighborsTable self, ParticleIndex pi) -> IMP::ParticleIndexes const &"""
7986  return _IMP_core.NeighborsTable_get_neighbors(self, pi)
7987 
7988  def get_version_info(self):
7989  r"""get_version_info(NeighborsTable self) -> VersionInfo"""
7990  return _IMP_core.NeighborsTable_get_version_info(self)
7991  __swig_destroy__ = _IMP_core.delete_NeighborsTable
7992 
7993  def __str__(self):
7994  r"""__str__(NeighborsTable self) -> std::string"""
7995  return _IMP_core.NeighborsTable___str__(self)
7996 
7997  def __repr__(self):
7998  r"""__repr__(NeighborsTable self) -> std::string"""
7999  return _IMP_core.NeighborsTable___repr__(self)
8000 
8001  @staticmethod
8002  def get_from(o):
8003  return _object_cast_to_NeighborsTable(o)
8004 
8005 
8006 # Register NeighborsTable in _IMP_core:
8007 _IMP_core.NeighborsTable_swigregister(NeighborsTable)
8008 class NormalMover(MonteCarloMover):
8009  r"""Proxy of C++ IMP::core::NormalMover class."""
8010 
8011  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8012 
8013  def __init__(self, *args):
8014  r"""
8015  __init__(NormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> NormalMover
8016  __init__(NormalMover self, Model m, ParticleIndex pi, double stddev) -> NormalMover
8017  __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> NormalMover
8018  __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> NormalMover
8019  __init__(NormalMover self) -> NormalMover
8020  """
8021  _IMP_core.NormalMover_swiginit(self, _IMP_core.new_NormalMover(*args))
8022 
8023  def set_sigma(self, sigma):
8024  r"""set_sigma(NormalMover self, IMP::Float sigma)"""
8025  return _IMP_core.NormalMover_set_sigma(self, sigma)
8026 
8027  def get_sigma(self):
8028  r"""get_sigma(NormalMover self) -> IMP::Float"""
8029  return _IMP_core.NormalMover_get_sigma(self)
8030 
8031  def get_indexes(self):
8032  r"""get_indexes(NormalMover self) -> IMP::ParticleIndexes"""
8033  return _IMP_core.NormalMover_get_indexes(self)
8034 
8035  def get_keys(self):
8036  r"""get_keys(NormalMover self) -> IMP::FloatKeys"""
8037  return _IMP_core.NormalMover_get_keys(self)
8038 
8039  def get_version_info(self):
8040  r"""get_version_info(NormalMover self) -> VersionInfo"""
8041  return _IMP_core.NormalMover_get_version_info(self)
8042  __swig_destroy__ = _IMP_core.delete_NormalMover
8043 
8044  def __str__(self):
8045  r"""__str__(NormalMover self) -> std::string"""
8046  return _IMP_core.NormalMover___str__(self)
8047 
8048  def __repr__(self):
8049  r"""__repr__(NormalMover self) -> std::string"""
8050  return _IMP_core.NormalMover___repr__(self)
8051 
8052  @staticmethod
8053  def get_from(o):
8054  return _object_cast_to_NormalMover(o)
8055 
8056 
8057  def _get_as_binary(self):
8058  r"""_get_as_binary(NormalMover self) -> PyObject *"""
8059  return _IMP_core.NormalMover__get_as_binary(self)
8060 
8061  def _set_from_binary(self, p):
8062  r"""_set_from_binary(NormalMover self, PyObject * p)"""
8063  return _IMP_core.NormalMover__set_from_binary(self, p)
8064 
8065  def __getstate__(self):
8066  p = self._get_as_binary()
8067  if len(self.__dict__) > 1:
8068  d = self.__dict__.copy()
8069  del d['this']
8070  p = (d, p)
8071  return p
8072 
8073  def __setstate__(self, p):
8074  if not hasattr(self, 'this'):
8075  self.__init__()
8076  if isinstance(p, tuple):
8077  d, p = p
8078  self.__dict__.update(d)
8079  return self._set_from_binary(p)
8080 
8081 
8082  def _get_jax(self):
8083  import jax.random
8084  from IMP.core._jax_util import _get_offset_propose_func
8085  keys = self.get_keys()
8086  sigma = self.get_sigma()
8087 
8088  def offset_func(key, shape):
8089  key, subkey = jax.random.split(key)
8090  return key, jax.random.normal(subkey, shape) * sigma
8091 
8092  propose_func, keys = _get_offset_propose_func(
8093  self.get_indexes(), keys, offset_func)
8094 
8095  return self._wrap_jax(lambda key: key, propose_func, keys=keys)
8096 
8097 
8098 # Register NormalMover in _IMP_core:
8099 _IMP_core.NormalMover_swigregister(NormalMover)
8100 class OpenCubicSpline(_OpenCubicSplineBase):
8101  r"""Proxy of C++ IMP::core::OpenCubicSpline class."""
8102 
8103  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8104 
8105  def __init__(self, values, minrange, spacing, extend=False):
8106  r"""__init__(OpenCubicSpline self, IMP::Floats const & values, IMP::Float minrange, IMP::Float spacing, bool extend=False) -> OpenCubicSpline"""
8107  _IMP_core.OpenCubicSpline_swiginit(self, _IMP_core.new_OpenCubicSpline(values, minrange, spacing, extend))
8108 
8109  def get_minrange(self):
8110  r"""get_minrange(OpenCubicSpline self) -> IMP::Float"""
8111  return _IMP_core.OpenCubicSpline_get_minrange(self)
8112 
8113  def get_spacing(self):
8114  r"""get_spacing(OpenCubicSpline self) -> IMP::Float"""
8115  return _IMP_core.OpenCubicSpline_get_spacing(self)
8116 
8117  def get_values(self):
8118  r"""get_values(OpenCubicSpline self) -> IMP::Floats"""
8119  return _IMP_core.OpenCubicSpline_get_values(self)
8120 
8121  def get_extend(self):
8122  r"""get_extend(OpenCubicSpline self) -> bool"""
8123  return _IMP_core.OpenCubicSpline_get_extend(self)
8124 
8125  def get_second_derivatives(self):
8126  r"""get_second_derivatives(OpenCubicSpline self) -> IMP::Floats"""
8127  return _IMP_core.OpenCubicSpline_get_second_derivatives(self)
8128 
8129  def __str__(self):
8130  r"""__str__(OpenCubicSpline self) -> std::string"""
8131  return _IMP_core.OpenCubicSpline___str__(self)
8132 
8133  def __repr__(self):
8134  r"""__repr__(OpenCubicSpline self) -> std::string"""
8135  return _IMP_core.OpenCubicSpline___repr__(self)
8136 
8137  @staticmethod
8138  def get_from(o):
8139  return _object_cast_to_OpenCubicSpline(o)
8140 
8141 
8142  def _get_jax(self):
8143  import jax.numpy as jnp
8144  from IMP.core._jax_util import _spline
8145  def score(feature, minrange, maxrange, spacing, values, second_derivs):
8146  # clip feature to range (extend=True behavior)
8147  feature = jnp.clip(feature, minrange, maxrange)
8148  # determine bin index and thus the cubic fragment to use:
8149  lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
8150  return _spline(feature, minrange, lowbin, lowbin + 1, spacing,
8151  values, second_derivs)
8152  spacing = self.get_spacing()
8153  minrange = self.get_minrange()
8154  values = jnp.asarray(self.get_values())
8155  maxrange = minrange + spacing * (len(values) - 1)
8156  return functools.partial(
8157  score, minrange=minrange, maxrange=maxrange,
8158  spacing=spacing, values=values,
8159  second_derivs=jnp.asarray(self.get_second_derivatives()))
8160 
8161  __swig_destroy__ = _IMP_core.delete_OpenCubicSpline
8162 
8163 # Register OpenCubicSpline in _IMP_core:
8164 _IMP_core.OpenCubicSpline_swigregister(OpenCubicSpline)
8165 class QuadraticClosePairsFinder(ClosePairsFinder):
8166  r"""Proxy of C++ IMP::core::QuadraticClosePairsFinder class."""
8167 
8168  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8169 
8170  def __init__(self):
8171  r"""__init__(QuadraticClosePairsFinder self) -> QuadraticClosePairsFinder"""
8172  _IMP_core.QuadraticClosePairsFinder_swiginit(self, _IMP_core.new_QuadraticClosePairsFinder())
8173 
8174  def get_are_close_and_filtered(self, *args):
8175  r"""
8176  get_are_close_and_filtered(QuadraticClosePairsFinder self, Particle a, Particle b) -> bool
8177  get_are_close_and_filtered(QuadraticClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b) -> bool
8178  """
8179  return _IMP_core.QuadraticClosePairsFinder_get_are_close_and_filtered(self, *args)
8180 
8181  def get_close_pairs(self, *args):
8182  r"""
8183  get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8184  get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8185  get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
8186  get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
8187  """
8188  return _IMP_core.QuadraticClosePairsFinder_get_close_pairs(self, *args)
8189 
8190  def do_get_inputs(self, m, pis):
8191  r"""do_get_inputs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8192  return _IMP_core.QuadraticClosePairsFinder_do_get_inputs(self, m, pis)
8193 
8194  def get_version_info(self):
8195  r"""get_version_info(QuadraticClosePairsFinder self) -> VersionInfo"""
8196  return _IMP_core.QuadraticClosePairsFinder_get_version_info(self)
8197  __swig_destroy__ = _IMP_core.delete_QuadraticClosePairsFinder
8198 
8199  def __str__(self):
8200  r"""__str__(QuadraticClosePairsFinder self) -> std::string"""
8201  return _IMP_core.QuadraticClosePairsFinder___str__(self)
8202 
8203  def __repr__(self):
8204  r"""__repr__(QuadraticClosePairsFinder self) -> std::string"""
8205  return _IMP_core.QuadraticClosePairsFinder___repr__(self)
8206 
8207  @staticmethod
8208  def get_from(o):
8209  return _object_cast_to_QuadraticClosePairsFinder(o)
8210 
8211 
8212 # Register QuadraticClosePairsFinder in _IMP_core:
8213 _IMP_core.QuadraticClosePairsFinder_swigregister(QuadraticClosePairsFinder)
8214 class RefinedPairsPairScore(IMP.PairScore):
8215  r"""Proxy of C++ IMP::core::RefinedPairsPairScore class."""
8216 
8217  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8218 
8219  def __init__(self, r, f):
8220  r"""__init__(RefinedPairsPairScore self, Refiner r, PairScore f) -> RefinedPairsPairScore"""
8221  _IMP_core.RefinedPairsPairScore_swiginit(self, _IMP_core.new_RefinedPairsPairScore(r, f))
8222 
8223  def do_get_inputs(self, m, pis):
8224  r"""do_get_inputs(RefinedPairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8225  return _IMP_core.RefinedPairsPairScore_do_get_inputs(self, m, pis)
8226 
8227  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
8228  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"""
8229  return _IMP_core.RefinedPairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
8230 
8231  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
8232  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"""
8233  return _IMP_core.RefinedPairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
8234 
8235  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
8236  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"""
8237  return _IMP_core.RefinedPairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
8238 
8239  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
8240  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"""
8241  return _IMP_core.RefinedPairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
8242 
8243  def get_version_info(self):
8244  r"""get_version_info(RefinedPairsPairScore self) -> VersionInfo"""
8245  return _IMP_core.RefinedPairsPairScore_get_version_info(self)
8246  __swig_destroy__ = _IMP_core.delete_RefinedPairsPairScore
8247 
8248  def __str__(self):
8249  r"""__str__(RefinedPairsPairScore self) -> std::string"""
8250  return _IMP_core.RefinedPairsPairScore___str__(self)
8251 
8252  def __repr__(self):
8253  r"""__repr__(RefinedPairsPairScore self) -> std::string"""
8254  return _IMP_core.RefinedPairsPairScore___repr__(self)
8255 
8256  @staticmethod
8257  def get_from(o):
8258  return _object_cast_to_RefinedPairsPairScore(o)
8259 
8260 
8261 # Register RefinedPairsPairScore in _IMP_core:
8262 _IMP_core.RefinedPairsPairScore_swigregister(RefinedPairsPairScore)
8263 class RigidBody(XYZ):
8264  r"""Proxy of C++ IMP::core::RigidBody class."""
8265 
8266  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8267 
8268  def get_rigid_members(self):
8269  r"""get_rigid_members(RigidBody self) -> IMP::core::RigidMembers"""
8270  return _IMP_core.RigidBody_get_rigid_members(self)
8271 
8272  @staticmethod
8273  def get_rotation_key():
8274  r"""get_rotation_key() -> Vector4DDerivKey"""
8275  return _IMP_core.RigidBody_get_rotation_key()
8276 
8277  def get_member_particle_indexes(self):
8278  r"""get_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8279  return _IMP_core.RigidBody_get_member_particle_indexes(self)
8280 
8281  def get_body_member_particle_indexes(self):
8282  r"""get_body_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8283  return _IMP_core.RigidBody_get_body_member_particle_indexes(self)
8284 
8285  def get_member_indexes(self):
8286  r"""get_member_indexes(RigidBody self) -> IMP::ParticleIndexes"""
8287  return _IMP_core.RigidBody_get_member_indexes(self)
8288 
8289  def show(self, *args):
8290  r"""show(RigidBody self, _ostream out=std::cout)"""
8291  return _IMP_core.RigidBody_show(self, *args)
8292 
8293  @staticmethod
8294  def setup_particle(*args):
8295  r"""
8296  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor ps) -> RigidBody
8297  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor ps) -> RigidBody
8298  setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> RigidBody
8299  setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> RigidBody
8300  """
8301  return _IMP_core.RigidBody_setup_particle(*args)
8302 
8303  @staticmethod
8304  def teardown_particle(rb):
8305  r"""teardown_particle(RigidBody rb)"""
8306  return _IMP_core.RigidBody_teardown_particle(rb)
8307 
8308  def __init__(self, *args):
8309  r"""
8310  __init__(RigidBody self) -> RigidBody
8311  __init__(RigidBody self, Model m, ParticleIndex id) -> RigidBody
8312  __init__(RigidBody self, _ParticleAdaptor d) -> RigidBody
8313  __init__(RigidBody self, RigidBody arg2) -> RigidBody
8314  """
8315  _IMP_core.RigidBody_swiginit(self, _IMP_core.new_RigidBody(*args))
8316  __swig_destroy__ = _IMP_core.delete_RigidBody
8317 
8318  @staticmethod
8319  def get_is_setup(*args):
8320  r"""
8321  get_is_setup(_ParticleAdaptor p) -> bool
8322  get_is_setup(Model m, ParticleIndex pi) -> bool
8323  """
8324  return _IMP_core.RigidBody_get_is_setup(*args)
8325 
8326  def get_coordinates(self):
8327  r"""get_coordinates(RigidBody self) -> Vector3D"""
8328  return _IMP_core.RigidBody_get_coordinates(self)
8329 
8330  def get_rotation(self):
8331  r"""get_rotation(RigidBody self) -> Rotation3D"""
8332  return _IMP_core.RigidBody_get_rotation(self)
8333 
8334  def get_reference_frame(self):
8335  r"""get_reference_frame(RigidBody self) -> ReferenceFrame3D"""
8336  return _IMP_core.RigidBody_get_reference_frame(self)
8337 
8338  def set_reference_frame(self, tr):
8339  r"""set_reference_frame(RigidBody self, ReferenceFrame3D tr)"""
8340  return _IMP_core.RigidBody_set_reference_frame(self, tr)
8341 
8342  def set_reference_frame_lazy(self, tr):
8343  r"""set_reference_frame_lazy(RigidBody self, ReferenceFrame3D tr)"""
8344  return _IMP_core.RigidBody_set_reference_frame_lazy(self, tr)
8345 
8346  def set_reference_frame_from_members(self, members):
8347  r"""set_reference_frame_from_members(RigidBody self, IMP::ParticleIndexes const & members)"""
8348  return _IMP_core.RigidBody_set_reference_frame_from_members(self, members)
8349 
8350  def pull_back_members_adjoints(self, da):
8351  r"""pull_back_members_adjoints(RigidBody self, DerivativeAccumulator da)"""
8352  return _IMP_core.RigidBody_pull_back_members_adjoints(self, da)
8353 
8354  def pull_back_member_adjoints(self, pi, da):
8355  r"""pull_back_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8356  return _IMP_core.RigidBody_pull_back_member_adjoints(self, pi, da)
8357 
8358  def pull_back_body_member_adjoints(self, pi, da):
8359  r"""pull_back_body_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8360  return _IMP_core.RigidBody_pull_back_body_member_adjoints(self, pi, da)
8361 
8362  def add_to_rotational_derivatives(self, qderiv, da):
8363  r"""add_to_rotational_derivatives(RigidBody self, Vector4D qderiv, DerivativeAccumulator da)"""
8364  return _IMP_core.RigidBody_add_to_rotational_derivatives(self, qderiv, da)
8365 
8366  def add_to_torque(self, torque_local, da):
8367  r"""add_to_torque(RigidBody self, Vector3D torque_local, DerivativeAccumulator da)"""
8368  return _IMP_core.RigidBody_add_to_torque(self, torque_local, da)
8369 
8370  def get_torque(self):
8371  r"""get_torque(RigidBody self) -> Vector3D"""
8372  return _IMP_core.RigidBody_get_torque(self)
8373 
8374  def get_coordinates_are_optimized(self):
8375  r"""get_coordinates_are_optimized(RigidBody self) -> bool"""
8376  return _IMP_core.RigidBody_get_coordinates_are_optimized(self)
8377 
8378  def set_coordinates_are_optimized(self, tf):
8379  r"""set_coordinates_are_optimized(RigidBody self, bool tf)"""
8380  return _IMP_core.RigidBody_set_coordinates_are_optimized(self, tf)
8381 
8382  def normalize_rotation(self):
8383  r"""normalize_rotation(RigidBody self)"""
8384  return _IMP_core.RigidBody_normalize_rotation(self)
8385 
8386  def update_members(self):
8387  r"""update_members(RigidBody self)"""
8388  return _IMP_core.RigidBody_update_members(self)
8389 
8390  def get_rotational_derivatives(self):
8391  r"""get_rotational_derivatives(RigidBody self) -> Vector4D"""
8392  return _IMP_core.RigidBody_get_rotational_derivatives(self)
8393 
8394  def get_number_of_members(self):
8395  r"""get_number_of_members(RigidBody self) -> unsigned int"""
8396  return _IMP_core.RigidBody_get_number_of_members(self)
8397 
8398  def get_member(self, i):
8399  r"""get_member(RigidBody self, unsigned int i) -> RigidBodyMember"""
8400  return _IMP_core.RigidBody_get_member(self, i)
8401 
8402  def add_member(self, p):
8403  r"""add_member(RigidBody self, _ParticleIndexAdaptor p)"""
8404  return _IMP_core.RigidBody_add_member(self, p)
8405 
8406  def add_non_rigid_member(self, p):
8407  r"""add_non_rigid_member(RigidBody self, _ParticleIndexAdaptor p)"""
8408  return _IMP_core.RigidBody_add_non_rigid_member(self, p)
8409 
8410  def set_is_rigid_member(self, pi, tf):
8411  r"""set_is_rigid_member(RigidBody self, ParticleIndex pi, bool tf)"""
8412  return _IMP_core.RigidBody_set_is_rigid_member(self, pi, tf)
8413 
8414  def remove_member(self, p):
8415  r"""remove_member(RigidBody self, _ParticleIndexAdaptor p)"""
8416  return _IMP_core.RigidBody_remove_member(self, p)
8417 
8418  def add_attribute(self, *args):
8419  r"""
8420  add_attribute(RigidBody self, FloatKey k, IMP::Float v, bool opt)
8421  add_attribute(RigidBody self, FloatKey a0, IMP::Float a1)
8422  add_attribute(RigidBody self, IntKey a0, IMP::Int a1)
8423  add_attribute(RigidBody self, FloatsKey a0, IMP::Floats a1)
8424  add_attribute(RigidBody self, IntsKey a0, IMP::Ints a1)
8425  add_attribute(RigidBody self, StringKey a0, IMP::String a1)
8426  add_attribute(RigidBody self, ParticleIndexKey a0, Particle a1)
8427  add_attribute(RigidBody self, ObjectKey a0, Object a1)
8428  add_attribute(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8429  add_attribute(RigidBody self, SparseIntKey a0, IMP::Int a1)
8430  add_attribute(RigidBody self, SparseStringKey a0, IMP::String a1)
8431  add_attribute(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8432  """
8433  return _IMP_core.RigidBody_add_attribute(self, *args)
8434 
8435  def get_value(self, *args):
8436  r"""
8437  get_value(RigidBody self, FloatKey a0) -> IMP::Float
8438  get_value(RigidBody self, IntKey a0) -> IMP::Int
8439  get_value(RigidBody self, FloatsKey a0) -> IMP::Floats
8440  get_value(RigidBody self, IntsKey a0) -> IMP::Ints
8441  get_value(RigidBody self, StringKey a0) -> IMP::String
8442  get_value(RigidBody self, ParticleIndexKey a0) -> Particle
8443  get_value(RigidBody self, ObjectKey a0) -> Object
8444  get_value(RigidBody self, SparseFloatKey a0) -> IMP::Float
8445  get_value(RigidBody self, SparseIntKey a0) -> IMP::Int
8446  get_value(RigidBody self, SparseStringKey a0) -> IMP::String
8447  get_value(RigidBody self, SparseParticleIndexKey a0) -> ParticleIndex
8448  """
8449  return _IMP_core.RigidBody_get_value(self, *args)
8450 
8451  def set_value(self, *args):
8452  r"""
8453  set_value(RigidBody self, FloatKey a0, IMP::Float a1)
8454  set_value(RigidBody self, IntKey a0, IMP::Int a1)
8455  set_value(RigidBody self, FloatsKey a0, IMP::Floats a1)
8456  set_value(RigidBody self, IntsKey a0, IMP::Ints a1)
8457  set_value(RigidBody self, StringKey a0, IMP::String a1)
8458  set_value(RigidBody self, ParticleIndexKey a0, Particle a1)
8459  set_value(RigidBody self, ObjectKey a0, Object a1)
8460  set_value(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8461  set_value(RigidBody self, SparseIntKey a0, IMP::Int a1)
8462  set_value(RigidBody self, SparseStringKey a0, IMP::String a1)
8463  set_value(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8464  """
8465  return _IMP_core.RigidBody_set_value(self, *args)
8466 
8467  def remove_attribute(self, *args):
8468  r"""
8469  remove_attribute(RigidBody self, FloatKey a0)
8470  remove_attribute(RigidBody self, IntKey a0)
8471  remove_attribute(RigidBody self, FloatsKey a0)
8472  remove_attribute(RigidBody self, IntsKey a0)
8473  remove_attribute(RigidBody self, StringKey a0)
8474  remove_attribute(RigidBody self, ParticleIndexKey a0)
8475  remove_attribute(RigidBody self, ObjectKey a0)
8476  remove_attribute(RigidBody self, SparseFloatKey a0)
8477  remove_attribute(RigidBody self, SparseIntKey a0)
8478  remove_attribute(RigidBody self, SparseStringKey a0)
8479  remove_attribute(RigidBody self, SparseParticleIndexKey a0)
8480  """
8481  return _IMP_core.RigidBody_remove_attribute(self, *args)
8482 
8483  def has_attribute(self, *args):
8484  r"""
8485  has_attribute(RigidBody self, FloatKey a0) -> bool
8486  has_attribute(RigidBody self, IntKey a0) -> bool
8487  has_attribute(RigidBody self, FloatsKey a0) -> bool
8488  has_attribute(RigidBody self, IntsKey a0) -> bool
8489  has_attribute(RigidBody self, StringKey a0) -> bool
8490  has_attribute(RigidBody self, ParticleIndexKey a0) -> bool
8491  has_attribute(RigidBody self, ObjectKey a0) -> bool
8492  has_attribute(RigidBody self, SparseFloatKey a0) -> bool
8493  has_attribute(RigidBody self, SparseIntKey a0) -> bool
8494  has_attribute(RigidBody self, SparseStringKey a0) -> bool
8495  has_attribute(RigidBody self, SparseParticleIndexKey a0) -> bool
8496  """
8497  return _IMP_core.RigidBody_has_attribute(self, *args)
8498 
8499  def get_derivative(self, a0):
8500  r"""get_derivative(RigidBody self, FloatKey a0) -> double"""
8501  return _IMP_core.RigidBody_get_derivative(self, a0)
8502 
8503  def get_name(self):
8504  r"""get_name(RigidBody self) -> std::string"""
8505  return _IMP_core.RigidBody_get_name(self)
8506 
8507  def clear_caches(self):
8508  r"""clear_caches(RigidBody self)"""
8509  return _IMP_core.RigidBody_clear_caches(self)
8510 
8511  def set_name(self, a0):
8512  r"""set_name(RigidBody self, std::string a0)"""
8513  return _IMP_core.RigidBody_set_name(self, a0)
8514 
8515  def set_check_level(self, a0):
8516  r"""set_check_level(RigidBody self, IMP::CheckLevel a0)"""
8517  return _IMP_core.RigidBody_set_check_level(self, a0)
8518 
8519  def add_to_derivative(self, a0, a1, a2):
8520  r"""add_to_derivative(RigidBody self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8521  return _IMP_core.RigidBody_add_to_derivative(self, a0, a1, a2)
8522 
8523  def set_is_optimized(self, a0, a1):
8524  r"""set_is_optimized(RigidBody self, FloatKey a0, bool a1)"""
8525  return _IMP_core.RigidBody_set_is_optimized(self, a0, a1)
8526 
8527  def get_is_optimized(self, a0):
8528  r"""get_is_optimized(RigidBody self, FloatKey a0) -> bool"""
8529  return _IMP_core.RigidBody_get_is_optimized(self, a0)
8530 
8531  def get_check_level(self):
8532  r"""get_check_level(RigidBody self) -> IMP::CheckLevel"""
8533  return _IMP_core.RigidBody_get_check_level(self)
8534 
8535  def __eq__(self, *args):
8536  r"""
8537  __eq__(RigidBody self, RigidBody o) -> bool
8538  __eq__(RigidBody self, Particle d) -> bool
8539  """
8540  return _IMP_core.RigidBody___eq__(self, *args)
8541 
8542  def __ne__(self, *args):
8543  r"""
8544  __ne__(RigidBody self, RigidBody o) -> bool
8545  __ne__(RigidBody self, Particle d) -> bool
8546  """
8547  return _IMP_core.RigidBody___ne__(self, *args)
8548 
8549  def __le__(self, *args):
8550  r"""
8551  __le__(RigidBody self, RigidBody o) -> bool
8552  __le__(RigidBody self, Particle d) -> bool
8553  """
8554  return _IMP_core.RigidBody___le__(self, *args)
8555 
8556  def __lt__(self, *args):
8557  r"""
8558  __lt__(RigidBody self, RigidBody o) -> bool
8559  __lt__(RigidBody self, Particle d) -> bool
8560  """
8561  return _IMP_core.RigidBody___lt__(self, *args)
8562 
8563  def __ge__(self, *args):
8564  r"""
8565  __ge__(RigidBody self, RigidBody o) -> bool
8566  __ge__(RigidBody self, Particle d) -> bool
8567  """
8568  return _IMP_core.RigidBody___ge__(self, *args)
8569 
8570  def __gt__(self, *args):
8571  r"""
8572  __gt__(RigidBody self, RigidBody o) -> bool
8573  __gt__(RigidBody self, Particle d) -> bool
8574  """
8575  return _IMP_core.RigidBody___gt__(self, *args)
8576 
8577  def __hash__(self):
8578  r"""__hash__(RigidBody self) -> std::size_t"""
8579  return _IMP_core.RigidBody___hash__(self)
8580 
8581  def __str__(self):
8582  r"""__str__(RigidBody self) -> std::string"""
8583  return _IMP_core.RigidBody___str__(self)
8584 
8585  def __repr__(self):
8586  r"""__repr__(RigidBody self) -> std::string"""
8587  return _IMP_core.RigidBody___repr__(self)
8588 
8589  def _get_as_binary(self):
8590  r"""_get_as_binary(RigidBody self) -> PyObject *"""
8591  return _IMP_core.RigidBody__get_as_binary(self)
8592 
8593  def _set_from_binary(self, p):
8594  r"""_set_from_binary(RigidBody self, PyObject * p)"""
8595  return _IMP_core.RigidBody__set_from_binary(self, p)
8596 
8597  def __getstate__(self):
8598  p = self._get_as_binary()
8599  if len(self.__dict__) > 1:
8600  d = self.__dict__.copy()
8601  del d['this']
8602  p = (d, p)
8603  return p
8604 
8605  def __setstate__(self, p):
8606  if not hasattr(self, 'this'):
8607  self.__init__()
8608  if isinstance(p, tuple):
8609  d, p = p
8610  self.__dict__.update(d)
8611  return self._set_from_binary(p)
8612 
8613 
8614 # Register RigidBody in _IMP_core:
8615 _IMP_core.RigidBody_swigregister(RigidBody)
8616 
8618  r"""add_rigid_body_cache_key(ObjectKey k)"""
8619  return _IMP_core.add_rigid_body_cache_key(k)
8620 class RigidBodyMember(XYZ):
8621  r"""Proxy of C++ IMP::core::RigidBodyMember class."""
8622 
8623  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8624 
8625  def show(self, *args):
8626  r"""show(RigidBodyMember self, _ostream out=std::cout)"""
8627  return _IMP_core.RigidBodyMember_show(self, *args)
8628 
8629  def get_rigid_body(self):
8630  r"""get_rigid_body(RigidBodyMember self) -> RigidBody"""
8631  return _IMP_core.RigidBodyMember_get_rigid_body(self)
8632 
8633  def get_internal_coordinates(self):
8634  r"""get_internal_coordinates(RigidBodyMember self) -> Vector3D"""
8635  return _IMP_core.RigidBodyMember_get_internal_coordinates(self)
8636 
8637  def set_internal_coordinates(self, v):
8638  r"""set_internal_coordinates(RigidBodyMember self, Vector3D v)"""
8639  return _IMP_core.RigidBodyMember_set_internal_coordinates(self, v)
8640 
8641  def set_internal_transformation(self, v):
8642  r"""set_internal_transformation(RigidBodyMember self, Transformation3D v)"""
8643  return _IMP_core.RigidBodyMember_set_internal_transformation(self, v)
8644 
8645  def get_internal_transformation(self):
8646  r"""get_internal_transformation(RigidBodyMember self) -> Transformation3D"""
8647  return _IMP_core.RigidBodyMember_get_internal_transformation(self)
8648  __swig_destroy__ = _IMP_core.delete_RigidBodyMember
8649 
8650  def set_coordinates(self, *args):
8651  r"""
8652  set_coordinates(RigidBodyMember self, Vector3D center)
8653  set_coordinates(RigidBodyMember self, Transformation3D tr)
8654  """
8655  return _IMP_core.RigidBodyMember_set_coordinates(self, *args)
8656 
8657  def __init__(self, *args):
8658  r"""
8659  __init__(RigidBodyMember self) -> RigidBodyMember
8660  __init__(RigidBodyMember self, Model m, ParticleIndex id) -> RigidBodyMember
8661  __init__(RigidBodyMember self, _ParticleAdaptor d) -> RigidBodyMember
8662  __init__(RigidBodyMember self, RigidBodyMember arg2) -> RigidBodyMember
8663  """
8664  _IMP_core.RigidBodyMember_swiginit(self, _IMP_core.new_RigidBodyMember(*args))
8665 
8666  @staticmethod
8667  def get_is_setup(*args):
8668  r"""
8669  get_is_setup(_ParticleAdaptor p) -> bool
8670  get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
8671  """
8672  return _IMP_core.RigidBodyMember_get_is_setup(*args)
8673 
8674  @staticmethod
8675  def get_internal_coordinate_keys():
8676  r"""get_internal_coordinate_keys() -> IMP::FloatKeys"""
8677  return _IMP_core.RigidBodyMember_get_internal_coordinate_keys()
8678 
8679  @staticmethod
8680  def get_internal_rotation_key():
8681  r"""get_internal_rotation_key() -> Vector4DDerivKey"""
8682  return _IMP_core.RigidBodyMember_get_internal_rotation_key()
8683 
8684  def add_attribute(self, *args):
8685  r"""
8686  add_attribute(RigidBodyMember self, FloatKey k, IMP::Float v, bool opt)
8687  add_attribute(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8688  add_attribute(RigidBodyMember self, IntKey a0, IMP::Int a1)
8689  add_attribute(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8690  add_attribute(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8691  add_attribute(RigidBodyMember self, StringKey a0, IMP::String a1)
8692  add_attribute(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8693  add_attribute(RigidBodyMember self, ObjectKey a0, Object a1)
8694  add_attribute(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8695  add_attribute(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8696  add_attribute(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8697  add_attribute(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8698  """
8699  return _IMP_core.RigidBodyMember_add_attribute(self, *args)
8700 
8701  def get_value(self, *args):
8702  r"""
8703  get_value(RigidBodyMember self, FloatKey a0) -> IMP::Float
8704  get_value(RigidBodyMember self, IntKey a0) -> IMP::Int
8705  get_value(RigidBodyMember self, FloatsKey a0) -> IMP::Floats
8706  get_value(RigidBodyMember self, IntsKey a0) -> IMP::Ints
8707  get_value(RigidBodyMember self, StringKey a0) -> IMP::String
8708  get_value(RigidBodyMember self, ParticleIndexKey a0) -> Particle
8709  get_value(RigidBodyMember self, ObjectKey a0) -> Object
8710  get_value(RigidBodyMember self, SparseFloatKey a0) -> IMP::Float
8711  get_value(RigidBodyMember self, SparseIntKey a0) -> IMP::Int
8712  get_value(RigidBodyMember self, SparseStringKey a0) -> IMP::String
8713  get_value(RigidBodyMember self, SparseParticleIndexKey a0) -> ParticleIndex
8714  """
8715  return _IMP_core.RigidBodyMember_get_value(self, *args)
8716 
8717  def set_value(self, *args):
8718  r"""
8719  set_value(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8720  set_value(RigidBodyMember self, IntKey a0, IMP::Int a1)
8721  set_value(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8722  set_value(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8723  set_value(RigidBodyMember self, StringKey a0, IMP::String a1)
8724  set_value(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8725  set_value(RigidBodyMember self, ObjectKey a0, Object a1)
8726  set_value(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8727  set_value(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8728  set_value(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8729  set_value(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8730  """
8731  return _IMP_core.RigidBodyMember_set_value(self, *args)
8732 
8733  def remove_attribute(self, *args):
8734  r"""
8735  remove_attribute(RigidBodyMember self, FloatKey a0)
8736  remove_attribute(RigidBodyMember self, IntKey a0)
8737  remove_attribute(RigidBodyMember self, FloatsKey a0)
8738  remove_attribute(RigidBodyMember self, IntsKey a0)
8739  remove_attribute(RigidBodyMember self, StringKey a0)
8740  remove_attribute(RigidBodyMember self, ParticleIndexKey a0)
8741  remove_attribute(RigidBodyMember self, ObjectKey a0)
8742  remove_attribute(RigidBodyMember self, SparseFloatKey a0)
8743  remove_attribute(RigidBodyMember self, SparseIntKey a0)
8744  remove_attribute(RigidBodyMember self, SparseStringKey a0)
8745  remove_attribute(RigidBodyMember self, SparseParticleIndexKey a0)
8746  """
8747  return _IMP_core.RigidBodyMember_remove_attribute(self, *args)
8748 
8749  def has_attribute(self, *args):
8750  r"""
8751  has_attribute(RigidBodyMember self, FloatKey a0) -> bool
8752  has_attribute(RigidBodyMember self, IntKey a0) -> bool
8753  has_attribute(RigidBodyMember self, FloatsKey a0) -> bool
8754  has_attribute(RigidBodyMember self, IntsKey a0) -> bool
8755  has_attribute(RigidBodyMember self, StringKey a0) -> bool
8756  has_attribute(RigidBodyMember self, ParticleIndexKey a0) -> bool
8757  has_attribute(RigidBodyMember self, ObjectKey a0) -> bool
8758  has_attribute(RigidBodyMember self, SparseFloatKey a0) -> bool
8759  has_attribute(RigidBodyMember self, SparseIntKey a0) -> bool
8760  has_attribute(RigidBodyMember self, SparseStringKey a0) -> bool
8761  has_attribute(RigidBodyMember self, SparseParticleIndexKey a0) -> bool
8762  """
8763  return _IMP_core.RigidBodyMember_has_attribute(self, *args)
8764 
8765  def get_derivative(self, a0):
8766  r"""get_derivative(RigidBodyMember self, FloatKey a0) -> double"""
8767  return _IMP_core.RigidBodyMember_get_derivative(self, a0)
8768 
8769  def get_name(self):
8770  r"""get_name(RigidBodyMember self) -> std::string"""
8771  return _IMP_core.RigidBodyMember_get_name(self)
8772 
8773  def clear_caches(self):
8774  r"""clear_caches(RigidBodyMember self)"""
8775  return _IMP_core.RigidBodyMember_clear_caches(self)
8776 
8777  def set_name(self, a0):
8778  r"""set_name(RigidBodyMember self, std::string a0)"""
8779  return _IMP_core.RigidBodyMember_set_name(self, a0)
8780 
8781  def set_check_level(self, a0):
8782  r"""set_check_level(RigidBodyMember self, IMP::CheckLevel a0)"""
8783  return _IMP_core.RigidBodyMember_set_check_level(self, a0)
8784 
8785  def add_to_derivative(self, a0, a1, a2):
8786  r"""add_to_derivative(RigidBodyMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8787  return _IMP_core.RigidBodyMember_add_to_derivative(self, a0, a1, a2)
8788 
8789  def set_is_optimized(self, a0, a1):
8790  r"""set_is_optimized(RigidBodyMember self, FloatKey a0, bool a1)"""
8791  return _IMP_core.RigidBodyMember_set_is_optimized(self, a0, a1)
8792 
8793  def get_is_optimized(self, a0):
8794  r"""get_is_optimized(RigidBodyMember self, FloatKey a0) -> bool"""
8795  return _IMP_core.RigidBodyMember_get_is_optimized(self, a0)
8796 
8797  def get_check_level(self):
8798  r"""get_check_level(RigidBodyMember self) -> IMP::CheckLevel"""
8799  return _IMP_core.RigidBodyMember_get_check_level(self)
8800 
8801  def __eq__(self, *args):
8802  r"""
8803  __eq__(RigidBodyMember self, RigidBodyMember o) -> bool
8804  __eq__(RigidBodyMember self, Particle d) -> bool
8805  """
8806  return _IMP_core.RigidBodyMember___eq__(self, *args)
8807 
8808  def __ne__(self, *args):
8809  r"""
8810  __ne__(RigidBodyMember self, RigidBodyMember o) -> bool
8811  __ne__(RigidBodyMember self, Particle d) -> bool
8812  """
8813  return _IMP_core.RigidBodyMember___ne__(self, *args)
8814 
8815  def __le__(self, *args):
8816  r"""
8817  __le__(RigidBodyMember self, RigidBodyMember o) -> bool
8818  __le__(RigidBodyMember self, Particle d) -> bool
8819  """
8820  return _IMP_core.RigidBodyMember___le__(self, *args)
8821 
8822  def __lt__(self, *args):
8823  r"""
8824  __lt__(RigidBodyMember self, RigidBodyMember o) -> bool
8825  __lt__(RigidBodyMember self, Particle d) -> bool
8826  """
8827  return _IMP_core.RigidBodyMember___lt__(self, *args)
8828 
8829  def __ge__(self, *args):
8830  r"""
8831  __ge__(RigidBodyMember self, RigidBodyMember o) -> bool
8832  __ge__(RigidBodyMember self, Particle d) -> bool
8833  """
8834  return _IMP_core.RigidBodyMember___ge__(self, *args)
8835 
8836  def __gt__(self, *args):
8837  r"""
8838  __gt__(RigidBodyMember self, RigidBodyMember o) -> bool
8839  __gt__(RigidBodyMember self, Particle d) -> bool
8840  """
8841  return _IMP_core.RigidBodyMember___gt__(self, *args)
8842 
8843  def __hash__(self):
8844  r"""__hash__(RigidBodyMember self) -> std::size_t"""
8845  return _IMP_core.RigidBodyMember___hash__(self)
8846 
8847  def __str__(self):
8848  r"""__str__(RigidBodyMember self) -> std::string"""
8849  return _IMP_core.RigidBodyMember___str__(self)
8850 
8851  def __repr__(self):
8852  r"""__repr__(RigidBodyMember self) -> std::string"""
8853  return _IMP_core.RigidBodyMember___repr__(self)
8854 
8855  def _get_as_binary(self):
8856  r"""_get_as_binary(RigidBodyMember self) -> PyObject *"""
8857  return _IMP_core.RigidBodyMember__get_as_binary(self)
8858 
8859  def _set_from_binary(self, p):
8860  r"""_set_from_binary(RigidBodyMember self, PyObject * p)"""
8861  return _IMP_core.RigidBodyMember__set_from_binary(self, p)
8862 
8863  def __getstate__(self):
8864  p = self._get_as_binary()
8865  if len(self.__dict__) > 1:
8866  d = self.__dict__.copy()
8867  del d['this']
8868  p = (d, p)
8869  return p
8870 
8871  def __setstate__(self, p):
8872  if not hasattr(self, 'this'):
8873  self.__init__()
8874  if isinstance(p, tuple):
8875  d, p = p
8876  self.__dict__.update(d)
8877  return self._set_from_binary(p)
8878 
8879 
8880 # Register RigidBodyMember in _IMP_core:
8881 _IMP_core.RigidBodyMember_swigregister(RigidBodyMember)
8882 class RigidMember(RigidBodyMember):
8883  r"""Proxy of C++ IMP::core::RigidMember class."""
8884 
8885  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8886 
8887  def show(self, *args):
8888  r"""show(RigidMember self, _ostream out=std::cout)"""
8889  return _IMP_core.RigidMember_show(self, *args)
8890 
8891  def __init__(self, *args):
8892  r"""
8893  __init__(RigidMember self) -> RigidMember
8894  __init__(RigidMember self, Model m, ParticleIndex id) -> RigidMember
8895  __init__(RigidMember self, _ParticleAdaptor d) -> RigidMember
8896  __init__(RigidMember self, RigidMember arg2) -> RigidMember
8897  """
8898  _IMP_core.RigidMember_swiginit(self, _IMP_core.new_RigidMember(*args))
8899  __swig_destroy__ = _IMP_core.delete_RigidMember
8900 
8901  @staticmethod
8902  def get_is_setup(*args):
8903  r"""
8904  get_is_setup(_ParticleAdaptor p) -> bool
8905  get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
8906  """
8907  return _IMP_core.RigidMember_get_is_setup(*args)
8908 
8909  def add_attribute(self, *args):
8910  r"""
8911  add_attribute(RigidMember self, FloatKey k, IMP::Float v, bool opt)
8912  add_attribute(RigidMember self, FloatKey a0, IMP::Float a1)
8913  add_attribute(RigidMember self, IntKey a0, IMP::Int a1)
8914  add_attribute(RigidMember self, FloatsKey a0, IMP::Floats a1)
8915  add_attribute(RigidMember self, IntsKey a0, IMP::Ints a1)
8916  add_attribute(RigidMember self, StringKey a0, IMP::String a1)
8917  add_attribute(RigidMember self, ParticleIndexKey a0, Particle a1)
8918  add_attribute(RigidMember self, ObjectKey a0, Object a1)
8919  add_attribute(RigidMember self, SparseFloatKey a0, IMP::Float a1)
8920  add_attribute(RigidMember self, SparseIntKey a0, IMP::Int a1)
8921  add_attribute(RigidMember self, SparseStringKey a0, IMP::String a1)
8922  add_attribute(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8923  """
8924  return _IMP_core.RigidMember_add_attribute(self, *args)
8925 
8926  def get_value(self, *args):
8927  r"""
8928  get_value(RigidMember self, FloatKey a0) -> IMP::Float
8929  get_value(RigidMember self, IntKey a0) -> IMP::Int
8930  get_value(RigidMember self, FloatsKey a0) -> IMP::Floats
8931  get_value(RigidMember self, IntsKey a0) -> IMP::Ints
8932  get_value(RigidMember self, StringKey a0) -> IMP::String
8933  get_value(RigidMember self, ParticleIndexKey a0) -> Particle
8934  get_value(RigidMember self, ObjectKey a0) -> Object
8935  get_value(RigidMember self, SparseFloatKey a0) -> IMP::Float
8936  get_value(RigidMember self, SparseIntKey a0) -> IMP::Int
8937  get_value(RigidMember self, SparseStringKey a0) -> IMP::String
8938  get_value(RigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
8939  """
8940  return _IMP_core.RigidMember_get_value(self, *args)
8941 
8942  def set_value(self, *args):
8943  r"""
8944  set_value(RigidMember self, FloatKey a0, IMP::Float a1)
8945  set_value(RigidMember self, IntKey a0, IMP::Int a1)
8946  set_value(RigidMember self, FloatsKey a0, IMP::Floats a1)
8947  set_value(RigidMember self, IntsKey a0, IMP::Ints a1)
8948  set_value(RigidMember self, StringKey a0, IMP::String a1)
8949  set_value(RigidMember self, ParticleIndexKey a0, Particle a1)
8950  set_value(RigidMember self, ObjectKey a0, Object a1)
8951  set_value(RigidMember self, SparseFloatKey a0, IMP::Float a1)
8952  set_value(RigidMember self, SparseIntKey a0, IMP::Int a1)
8953  set_value(RigidMember self, SparseStringKey a0, IMP::String a1)
8954  set_value(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8955  """
8956  return _IMP_core.RigidMember_set_value(self, *args)
8957 
8958  def remove_attribute(self, *args):
8959  r"""
8960  remove_attribute(RigidMember self, FloatKey a0)
8961  remove_attribute(RigidMember self, IntKey a0)
8962  remove_attribute(RigidMember self, FloatsKey a0)
8963  remove_attribute(RigidMember self, IntsKey a0)
8964  remove_attribute(RigidMember self, StringKey a0)
8965  remove_attribute(RigidMember self, ParticleIndexKey a0)
8966  remove_attribute(RigidMember self, ObjectKey a0)
8967  remove_attribute(RigidMember self, SparseFloatKey a0)
8968  remove_attribute(RigidMember self, SparseIntKey a0)
8969  remove_attribute(RigidMember self, SparseStringKey a0)
8970  remove_attribute(RigidMember self, SparseParticleIndexKey a0)
8971  """
8972  return _IMP_core.RigidMember_remove_attribute(self, *args)
8973 
8974  def has_attribute(self, *args):
8975  r"""
8976  has_attribute(RigidMember self, FloatKey a0) -> bool
8977  has_attribute(RigidMember self, IntKey a0) -> bool
8978  has_attribute(RigidMember self, FloatsKey a0) -> bool
8979  has_attribute(RigidMember self, IntsKey a0) -> bool
8980  has_attribute(RigidMember self, StringKey a0) -> bool
8981  has_attribute(RigidMember self, ParticleIndexKey a0) -> bool
8982  has_attribute(RigidMember self, ObjectKey a0) -> bool
8983  has_attribute(RigidMember self, SparseFloatKey a0) -> bool
8984  has_attribute(RigidMember self, SparseIntKey a0) -> bool
8985  has_attribute(RigidMember self, SparseStringKey a0) -> bool
8986  has_attribute(RigidMember self, SparseParticleIndexKey a0) -> bool
8987  """
8988  return _IMP_core.RigidMember_has_attribute(self, *args)
8989 
8990  def get_derivative(self, a0):
8991  r"""get_derivative(RigidMember self, FloatKey a0) -> double"""
8992  return _IMP_core.RigidMember_get_derivative(self, a0)
8993 
8994  def get_name(self):
8995  r"""get_name(RigidMember self) -> std::string"""
8996  return _IMP_core.RigidMember_get_name(self)
8997 
8998  def clear_caches(self):
8999  r"""clear_caches(RigidMember self)"""
9000  return _IMP_core.RigidMember_clear_caches(self)
9001 
9002  def set_name(self, a0):
9003  r"""set_name(RigidMember self, std::string a0)"""
9004  return _IMP_core.RigidMember_set_name(self, a0)
9005 
9006  def set_check_level(self, a0):
9007  r"""set_check_level(RigidMember self, IMP::CheckLevel a0)"""
9008  return _IMP_core.RigidMember_set_check_level(self, a0)
9009 
9010  def add_to_derivative(self, a0, a1, a2):
9011  r"""add_to_derivative(RigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9012  return _IMP_core.RigidMember_add_to_derivative(self, a0, a1, a2)
9013 
9014  def set_is_optimized(self, a0, a1):
9015  r"""set_is_optimized(RigidMember self, FloatKey a0, bool a1)"""
9016  return _IMP_core.RigidMember_set_is_optimized(self, a0, a1)
9017 
9018  def get_is_optimized(self, a0):
9019  r"""get_is_optimized(RigidMember self, FloatKey a0) -> bool"""
9020  return _IMP_core.RigidMember_get_is_optimized(self, a0)
9021 
9022  def get_check_level(self):
9023  r"""get_check_level(RigidMember self) -> IMP::CheckLevel"""
9024  return _IMP_core.RigidMember_get_check_level(self)
9025 
9026  def __eq__(self, *args):
9027  r"""
9028  __eq__(RigidMember self, RigidMember o) -> bool
9029  __eq__(RigidMember self, Particle d) -> bool
9030  """
9031  return _IMP_core.RigidMember___eq__(self, *args)
9032 
9033  def __ne__(self, *args):
9034  r"""
9035  __ne__(RigidMember self, RigidMember o) -> bool
9036  __ne__(RigidMember self, Particle d) -> bool
9037  """
9038  return _IMP_core.RigidMember___ne__(self, *args)
9039 
9040  def __le__(self, *args):
9041  r"""
9042  __le__(RigidMember self, RigidMember o) -> bool
9043  __le__(RigidMember self, Particle d) -> bool
9044  """
9045  return _IMP_core.RigidMember___le__(self, *args)
9046 
9047  def __lt__(self, *args):
9048  r"""
9049  __lt__(RigidMember self, RigidMember o) -> bool
9050  __lt__(RigidMember self, Particle d) -> bool
9051  """
9052  return _IMP_core.RigidMember___lt__(self, *args)
9053 
9054  def __ge__(self, *args):
9055  r"""
9056  __ge__(RigidMember self, RigidMember o) -> bool
9057  __ge__(RigidMember self, Particle d) -> bool
9058  """
9059  return _IMP_core.RigidMember___ge__(self, *args)
9060 
9061  def __gt__(self, *args):
9062  r"""
9063  __gt__(RigidMember self, RigidMember o) -> bool
9064  __gt__(RigidMember self, Particle d) -> bool
9065  """
9066  return _IMP_core.RigidMember___gt__(self, *args)
9067 
9068  def __hash__(self):
9069  r"""__hash__(RigidMember self) -> std::size_t"""
9070  return _IMP_core.RigidMember___hash__(self)
9071 
9072  def __str__(self):
9073  r"""__str__(RigidMember self) -> std::string"""
9074  return _IMP_core.RigidMember___str__(self)
9075 
9076  def __repr__(self):
9077  r"""__repr__(RigidMember self) -> std::string"""
9078  return _IMP_core.RigidMember___repr__(self)
9079 
9080  def _get_as_binary(self):
9081  r"""_get_as_binary(RigidMember self) -> PyObject *"""
9082  return _IMP_core.RigidMember__get_as_binary(self)
9083 
9084  def _set_from_binary(self, p):
9085  r"""_set_from_binary(RigidMember self, PyObject * p)"""
9086  return _IMP_core.RigidMember__set_from_binary(self, p)
9087 
9088  def __getstate__(self):
9089  p = self._get_as_binary()
9090  if len(self.__dict__) > 1:
9091  d = self.__dict__.copy()
9092  del d['this']
9093  p = (d, p)
9094  return p
9095 
9096  def __setstate__(self, p):
9097  if not hasattr(self, 'this'):
9098  self.__init__()
9099  if isinstance(p, tuple):
9100  d, p = p
9101  self.__dict__.update(d)
9102  return self._set_from_binary(p)
9103 
9104 
9105 # Register RigidMember in _IMP_core:
9106 _IMP_core.RigidMember_swigregister(RigidMember)
9107 class NonRigidMember(RigidBodyMember):
9108  r"""Proxy of C++ IMP::core::NonRigidMember class."""
9109 
9110  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9111 
9112  def show(self, *args):
9113  r"""show(NonRigidMember self, _ostream out=std::cout)"""
9114  return _IMP_core.NonRigidMember_show(self, *args)
9115 
9116  def __init__(self, *args):
9117  r"""
9118  __init__(NonRigidMember self) -> NonRigidMember
9119  __init__(NonRigidMember self, Model m, ParticleIndex id) -> NonRigidMember
9120  __init__(NonRigidMember self, _ParticleAdaptor d) -> NonRigidMember
9121  __init__(NonRigidMember self, NonRigidMember arg2) -> NonRigidMember
9122  """
9123  _IMP_core.NonRigidMember_swiginit(self, _IMP_core.new_NonRigidMember(*args))
9124  __swig_destroy__ = _IMP_core.delete_NonRigidMember
9125 
9126  @staticmethod
9127  def get_is_setup(*args):
9128  r"""
9129  get_is_setup(_ParticleAdaptor p) -> bool
9130  get_is_setup(Model m, ParticleIndex p) -> bool
9131  """
9132  return _IMP_core.NonRigidMember_get_is_setup(*args)
9133 
9134  def add_to_internal_derivatives(self, deriv_parent, da):
9135  r"""add_to_internal_derivatives(NonRigidMember self, Vector3D deriv_parent, DerivativeAccumulator da)"""
9136  return _IMP_core.NonRigidMember_add_to_internal_derivatives(self, deriv_parent, da)
9137 
9138  def add_to_internal_rotational_derivatives(self, qderiv, da):
9139  r"""add_to_internal_rotational_derivatives(NonRigidMember self, Vector4D qderiv, DerivativeAccumulator da)"""
9140  return _IMP_core.NonRigidMember_add_to_internal_rotational_derivatives(self, qderiv, da)
9141 
9142  def get_internal_derivatives(self):
9143  r"""get_internal_derivatives(NonRigidMember self) -> Vector3D"""
9144  return _IMP_core.NonRigidMember_get_internal_derivatives(self)
9145 
9146  def get_internal_rotational_derivatives(self):
9147  r"""get_internal_rotational_derivatives(NonRigidMember self) -> Vector4D"""
9148  return _IMP_core.NonRigidMember_get_internal_rotational_derivatives(self)
9149 
9150  def add_attribute(self, *args):
9151  r"""
9152  add_attribute(NonRigidMember self, FloatKey k, IMP::Float v, bool opt)
9153  add_attribute(NonRigidMember self, FloatKey a0, IMP::Float a1)
9154  add_attribute(NonRigidMember self, IntKey a0, IMP::Int a1)
9155  add_attribute(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9156  add_attribute(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9157  add_attribute(NonRigidMember self, StringKey a0, IMP::String a1)
9158  add_attribute(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9159  add_attribute(NonRigidMember self, ObjectKey a0, Object a1)
9160  add_attribute(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9161  add_attribute(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9162  add_attribute(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9163  add_attribute(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9164  """
9165  return _IMP_core.NonRigidMember_add_attribute(self, *args)
9166 
9167  def get_value(self, *args):
9168  r"""
9169  get_value(NonRigidMember self, FloatKey a0) -> IMP::Float
9170  get_value(NonRigidMember self, IntKey a0) -> IMP::Int
9171  get_value(NonRigidMember self, FloatsKey a0) -> IMP::Floats
9172  get_value(NonRigidMember self, IntsKey a0) -> IMP::Ints
9173  get_value(NonRigidMember self, StringKey a0) -> IMP::String
9174  get_value(NonRigidMember self, ParticleIndexKey a0) -> Particle
9175  get_value(NonRigidMember self, ObjectKey a0) -> Object
9176  get_value(NonRigidMember self, SparseFloatKey a0) -> IMP::Float
9177  get_value(NonRigidMember self, SparseIntKey a0) -> IMP::Int
9178  get_value(NonRigidMember self, SparseStringKey a0) -> IMP::String
9179  get_value(NonRigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9180  """
9181  return _IMP_core.NonRigidMember_get_value(self, *args)
9182 
9183  def set_value(self, *args):
9184  r"""
9185  set_value(NonRigidMember self, FloatKey a0, IMP::Float a1)
9186  set_value(NonRigidMember self, IntKey a0, IMP::Int a1)
9187  set_value(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9188  set_value(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9189  set_value(NonRigidMember self, StringKey a0, IMP::String a1)
9190  set_value(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9191  set_value(NonRigidMember self, ObjectKey a0, Object a1)
9192  set_value(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9193  set_value(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9194  set_value(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9195  set_value(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9196  """
9197  return _IMP_core.NonRigidMember_set_value(self, *args)
9198 
9199  def remove_attribute(self, *args):
9200  r"""
9201  remove_attribute(NonRigidMember self, FloatKey a0)
9202  remove_attribute(NonRigidMember self, IntKey a0)
9203  remove_attribute(NonRigidMember self, FloatsKey a0)
9204  remove_attribute(NonRigidMember self, IntsKey a0)
9205  remove_attribute(NonRigidMember self, StringKey a0)
9206  remove_attribute(NonRigidMember self, ParticleIndexKey a0)
9207  remove_attribute(NonRigidMember self, ObjectKey a0)
9208  remove_attribute(NonRigidMember self, SparseFloatKey a0)
9209  remove_attribute(NonRigidMember self, SparseIntKey a0)
9210  remove_attribute(NonRigidMember self, SparseStringKey a0)
9211  remove_attribute(NonRigidMember self, SparseParticleIndexKey a0)
9212  """
9213  return _IMP_core.NonRigidMember_remove_attribute(self, *args)
9214 
9215  def has_attribute(self, *args):
9216  r"""
9217  has_attribute(NonRigidMember self, FloatKey a0) -> bool
9218  has_attribute(NonRigidMember self, IntKey a0) -> bool
9219  has_attribute(NonRigidMember self, FloatsKey a0) -> bool
9220  has_attribute(NonRigidMember self, IntsKey a0) -> bool
9221  has_attribute(NonRigidMember self, StringKey a0) -> bool
9222  has_attribute(NonRigidMember self, ParticleIndexKey a0) -> bool
9223  has_attribute(NonRigidMember self, ObjectKey a0) -> bool
9224  has_attribute(NonRigidMember self, SparseFloatKey a0) -> bool
9225  has_attribute(NonRigidMember self, SparseIntKey a0) -> bool
9226  has_attribute(NonRigidMember self, SparseStringKey a0) -> bool
9227  has_attribute(NonRigidMember self, SparseParticleIndexKey a0) -> bool
9228  """
9229  return _IMP_core.NonRigidMember_has_attribute(self, *args)
9230 
9231  def get_derivative(self, a0):
9232  r"""get_derivative(NonRigidMember self, FloatKey a0) -> double"""
9233  return _IMP_core.NonRigidMember_get_derivative(self, a0)
9234 
9235  def get_name(self):
9236  r"""get_name(NonRigidMember self) -> std::string"""
9237  return _IMP_core.NonRigidMember_get_name(self)
9238 
9239  def clear_caches(self):
9240  r"""clear_caches(NonRigidMember self)"""
9241  return _IMP_core.NonRigidMember_clear_caches(self)
9242 
9243  def set_name(self, a0):
9244  r"""set_name(NonRigidMember self, std::string a0)"""
9245  return _IMP_core.NonRigidMember_set_name(self, a0)
9246 
9247  def set_check_level(self, a0):
9248  r"""set_check_level(NonRigidMember self, IMP::CheckLevel a0)"""
9249  return _IMP_core.NonRigidMember_set_check_level(self, a0)
9250 
9251  def add_to_derivative(self, a0, a1, a2):
9252  r"""add_to_derivative(NonRigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9253  return _IMP_core.NonRigidMember_add_to_derivative(self, a0, a1, a2)
9254 
9255  def set_is_optimized(self, a0, a1):
9256  r"""set_is_optimized(NonRigidMember self, FloatKey a0, bool a1)"""
9257  return _IMP_core.NonRigidMember_set_is_optimized(self, a0, a1)
9258 
9259  def get_is_optimized(self, a0):
9260  r"""get_is_optimized(NonRigidMember self, FloatKey a0) -> bool"""
9261  return _IMP_core.NonRigidMember_get_is_optimized(self, a0)
9262 
9263  def get_check_level(self):
9264  r"""get_check_level(NonRigidMember self) -> IMP::CheckLevel"""
9265  return _IMP_core.NonRigidMember_get_check_level(self)
9266 
9267  def __eq__(self, *args):
9268  r"""
9269  __eq__(NonRigidMember self, NonRigidMember o) -> bool
9270  __eq__(NonRigidMember self, Particle d) -> bool
9271  """
9272  return _IMP_core.NonRigidMember___eq__(self, *args)
9273 
9274  def __ne__(self, *args):
9275  r"""
9276  __ne__(NonRigidMember self, NonRigidMember o) -> bool
9277  __ne__(NonRigidMember self, Particle d) -> bool
9278  """
9279  return _IMP_core.NonRigidMember___ne__(self, *args)
9280 
9281  def __le__(self, *args):
9282  r"""
9283  __le__(NonRigidMember self, NonRigidMember o) -> bool
9284  __le__(NonRigidMember self, Particle d) -> bool
9285  """
9286  return _IMP_core.NonRigidMember___le__(self, *args)
9287 
9288  def __lt__(self, *args):
9289  r"""
9290  __lt__(NonRigidMember self, NonRigidMember o) -> bool
9291  __lt__(NonRigidMember self, Particle d) -> bool
9292  """
9293  return _IMP_core.NonRigidMember___lt__(self, *args)
9294 
9295  def __ge__(self, *args):
9296  r"""
9297  __ge__(NonRigidMember self, NonRigidMember o) -> bool
9298  __ge__(NonRigidMember self, Particle d) -> bool
9299  """
9300  return _IMP_core.NonRigidMember___ge__(self, *args)
9301 
9302  def __gt__(self, *args):
9303  r"""
9304  __gt__(NonRigidMember self, NonRigidMember o) -> bool
9305  __gt__(NonRigidMember self, Particle d) -> bool
9306  """
9307  return _IMP_core.NonRigidMember___gt__(self, *args)
9308 
9309  def __hash__(self):
9310  r"""__hash__(NonRigidMember self) -> std::size_t"""
9311  return _IMP_core.NonRigidMember___hash__(self)
9312 
9313  def __str__(self):
9314  r"""__str__(NonRigidMember self) -> std::string"""
9315  return _IMP_core.NonRigidMember___str__(self)
9316 
9317  def __repr__(self):
9318  r"""__repr__(NonRigidMember self) -> std::string"""
9319  return _IMP_core.NonRigidMember___repr__(self)
9320 
9321  def _get_as_binary(self):
9322  r"""_get_as_binary(NonRigidMember self) -> PyObject *"""
9323  return _IMP_core.NonRigidMember__get_as_binary(self)
9324 
9325  def _set_from_binary(self, p):
9326  r"""_set_from_binary(NonRigidMember self, PyObject * p)"""
9327  return _IMP_core.NonRigidMember__set_from_binary(self, p)
9328 
9329  def __getstate__(self):
9330  p = self._get_as_binary()
9331  if len(self.__dict__) > 1:
9332  d = self.__dict__.copy()
9333  del d['this']
9334  p = (d, p)
9335  return p
9336 
9337  def __setstate__(self, p):
9338  if not hasattr(self, 'this'):
9339  self.__init__()
9340  if isinstance(p, tuple):
9341  d, p = p
9342  self.__dict__.update(d)
9343  return self._set_from_binary(p)
9344 
9345 
9346 # Register NonRigidMember in _IMP_core:
9347 _IMP_core.NonRigidMember_swigregister(NonRigidMember)
9348 class RigidMembersRefiner(IMP.Refiner):
9349  r"""Proxy of C++ IMP::core::RigidMembersRefiner class."""
9350 
9351  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9352 
9353  def __init__(self, *args):
9354  r"""__init__(RigidMembersRefiner self, std::string name="RigidMembersRefiner%d") -> RigidMembersRefiner"""
9355  _IMP_core.RigidMembersRefiner_swiginit(self, _IMP_core.new_RigidMembersRefiner(*args))
9356 
9357  def do_get_inputs(self, m, pis):
9358  r"""do_get_inputs(RigidMembersRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9359  return _IMP_core.RigidMembersRefiner_do_get_inputs(self, m, pis)
9360 
9361  def get_version_info(self):
9362  r"""get_version_info(RigidMembersRefiner self) -> VersionInfo"""
9363  return _IMP_core.RigidMembersRefiner_get_version_info(self)
9364  __swig_destroy__ = _IMP_core.delete_RigidMembersRefiner
9365 
9366  def __str__(self):
9367  r"""__str__(RigidMembersRefiner self) -> std::string"""
9368  return _IMP_core.RigidMembersRefiner___str__(self)
9369 
9370  def __repr__(self):
9371  r"""__repr__(RigidMembersRefiner self) -> std::string"""
9372  return _IMP_core.RigidMembersRefiner___repr__(self)
9373 
9374  @staticmethod
9375  def get_from(o):
9376  return _object_cast_to_RigidMembersRefiner(o)
9377 
9378 
9379 # Register RigidMembersRefiner in _IMP_core:
9380 _IMP_core.RigidMembersRefiner_swigregister(RigidMembersRefiner)
9381 
9382 def get_rigid_members_refiner():
9383  r"""get_rigid_members_refiner() -> RigidMembersRefiner"""
9384  return _IMP_core.get_rigid_members_refiner()
9385 
9386 def transform(*args):
9387  r"""
9388  transform(XYZ a, Transformation3D tr)
9389  transform(RigidBody a, Transformation3D tr)
9390  """
9391  return _IMP_core.transform(*args)
9392 
9393 def get_initial_reference_frame(*args):
9394  r"""
9395  get_initial_reference_frame(Model m, IMP::ParticleIndexes const & pis) -> ReferenceFrame3D
9396  get_initial_reference_frame(IMP::ParticlesTemp const & ps) -> ReferenceFrame3D
9397  """
9398  return _IMP_core.get_initial_reference_frame(*args)
9399 
9400 def create_rigid_bodies(m, n, no_members=False):
9401  r"""create_rigid_bodies(Model m, unsigned int n, bool no_members=False) -> IMP::ParticlesTemp"""
9402  return _IMP_core.create_rigid_bodies(m, n, no_members)
9403 
9404 def show_rigid_body_hierarchy(*args):
9405  r"""show_rigid_body_hierarchy(RigidBody rb, TextOutput out=IMP::TextOutput(std::cout))"""
9406  return _IMP_core.show_rigid_body_hierarchy(*args)
9407 
9408 def get_root_rigid_body(m):
9409  r"""get_root_rigid_body(RigidMember m) -> ParticleIndex"""
9410  return _IMP_core.get_root_rigid_body(m)
9411 class _UpdateRigidBodyMembers(IMP.SingletonModifier):
9412  r"""Proxy of C++ IMP::core::internal::_UpdateRigidBodyMembers class."""
9413 
9414  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9415 
9416  def __init__(self, *args):
9417  r"""__init__(_UpdateRigidBodyMembers self, std::string name="UpdateRigidBodyMembers%1%") -> _UpdateRigidBodyMembers"""
9418  _IMP_core._UpdateRigidBodyMembers_swiginit(self, _IMP_core.new__UpdateRigidBodyMembers(*args))
9419 
9420  def do_get_inputs(self, m, pis):
9421  r"""do_get_inputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9422  return _IMP_core._UpdateRigidBodyMembers_do_get_inputs(self, m, pis)
9423 
9424  def do_get_outputs(self, m, pis):
9425  r"""do_get_outputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9426  return _IMP_core._UpdateRigidBodyMembers_do_get_outputs(self, m, pis)
9427 
9428  def get_version_info(self):
9429  r"""get_version_info(_UpdateRigidBodyMembers self) -> VersionInfo"""
9430  return _IMP_core._UpdateRigidBodyMembers_get_version_info(self)
9431  __swig_destroy__ = _IMP_core.delete__UpdateRigidBodyMembers
9432 
9433  def __str__(self):
9434  r"""__str__(_UpdateRigidBodyMembers self) -> std::string"""
9435  return _IMP_core._UpdateRigidBodyMembers___str__(self)
9436 
9437  def __repr__(self):
9438  r"""__repr__(_UpdateRigidBodyMembers self) -> std::string"""
9439  return _IMP_core._UpdateRigidBodyMembers___repr__(self)
9440 
9441  @staticmethod
9442  def get_from(o):
9443  return _object_cast_to__UpdateRigidBodyMembers(o)
9444 
9445 
9446 # Register _UpdateRigidBodyMembers in _IMP_core:
9447 _IMP_core._UpdateRigidBodyMembers_swigregister(_UpdateRigidBodyMembers)
9448 class _AccumulateRigidBodyDerivatives(IMP.SingletonModifier):
9449  r"""Proxy of C++ IMP::core::internal::_AccumulateRigidBodyDerivatives class."""
9450 
9451  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9452 
9453  def __init__(self, *args):
9454  r"""__init__(_AccumulateRigidBodyDerivatives self, std::string name="AccumulateRigidBodyDerivatives%1%") -> _AccumulateRigidBodyDerivatives"""
9455  _IMP_core._AccumulateRigidBodyDerivatives_swiginit(self, _IMP_core.new__AccumulateRigidBodyDerivatives(*args))
9456 
9457  def do_get_inputs(self, m, pis):
9458  r"""do_get_inputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9459  return _IMP_core._AccumulateRigidBodyDerivatives_do_get_inputs(self, m, pis)
9460 
9461  def do_get_outputs(self, m, pis):
9462  r"""do_get_outputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9463  return _IMP_core._AccumulateRigidBodyDerivatives_do_get_outputs(self, m, pis)
9464 
9465  def get_version_info(self):
9466  r"""get_version_info(_AccumulateRigidBodyDerivatives self) -> VersionInfo"""
9467  return _IMP_core._AccumulateRigidBodyDerivatives_get_version_info(self)
9468  __swig_destroy__ = _IMP_core.delete__AccumulateRigidBodyDerivatives
9469 
9470  def __str__(self):
9471  r"""__str__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9472  return _IMP_core._AccumulateRigidBodyDerivatives___str__(self)
9473 
9474  def __repr__(self):
9475  r"""__repr__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9476  return _IMP_core._AccumulateRigidBodyDerivatives___repr__(self)
9477 
9478  @staticmethod
9479  def get_from(o):
9480  return _object_cast_to__AccumulateRigidBodyDerivatives(o)
9481 
9482 
9483 # Register _AccumulateRigidBodyDerivatives in _IMP_core:
9484 _IMP_core._AccumulateRigidBodyDerivatives_swigregister(_AccumulateRigidBodyDerivatives)
9485 class _NormalizeRotation(IMP.SingletonModifier):
9486  r"""Proxy of C++ IMP::core::internal::_NormalizeRotation class."""
9487 
9488  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9489 
9490  def __init__(self, *args):
9491  r"""__init__(_NormalizeRotation self, std::string name="NormalizeRotation%1%") -> _NormalizeRotation"""
9492  _IMP_core._NormalizeRotation_swiginit(self, _IMP_core.new__NormalizeRotation(*args))
9493 
9494  def do_get_inputs(self, m, pis):
9495  r"""do_get_inputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9496  return _IMP_core._NormalizeRotation_do_get_inputs(self, m, pis)
9497 
9498  def do_get_outputs(self, m, pis):
9499  r"""do_get_outputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9500  return _IMP_core._NormalizeRotation_do_get_outputs(self, m, pis)
9501 
9502  def get_version_info(self):
9503  r"""get_version_info(_NormalizeRotation self) -> VersionInfo"""
9504  return _IMP_core._NormalizeRotation_get_version_info(self)
9505  __swig_destroy__ = _IMP_core.delete__NormalizeRotation
9506 
9507  def __str__(self):
9508  r"""__str__(_NormalizeRotation self) -> std::string"""
9509  return _IMP_core._NormalizeRotation___str__(self)
9510 
9511  def __repr__(self):
9512  r"""__repr__(_NormalizeRotation self) -> std::string"""
9513  return _IMP_core._NormalizeRotation___repr__(self)
9514 
9515  @staticmethod
9516  def get_from(o):
9517  return _object_cast_to__NormalizeRotation(o)
9518 
9519 
9520 # Register _NormalizeRotation in _IMP_core:
9521 _IMP_core._NormalizeRotation_swigregister(_NormalizeRotation)
9522 class _RigidBodyNormalizeConstraint(IMP.Constraint):
9523  r"""Proxy of C++ IMP::core::internal::_RigidBodyNormalizeConstraint class."""
9524 
9525  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9526 
9527  def __init__(self, *args, **kwargs):
9528  raise AttributeError("No constructor defined - class is abstract")
9529 
9530  def get_before_modifier(self):
9531  r"""get_before_modifier(_RigidBodyNormalizeConstraint self) -> _NormalizeRotation"""
9532  return _IMP_core._RigidBodyNormalizeConstraint_get_before_modifier(self)
9533 
9534  def get_container(self):
9535  r"""get_container(_RigidBodyNormalizeConstraint self) -> Container"""
9536  return _IMP_core._RigidBodyNormalizeConstraint_get_container(self)
9537 
9538  def get_version_info(self):
9539  r"""get_version_info(_RigidBodyNormalizeConstraint self) -> VersionInfo"""
9540  return _IMP_core._RigidBodyNormalizeConstraint_get_version_info(self)
9541  __swig_destroy__ = _IMP_core.delete__RigidBodyNormalizeConstraint
9542 
9543  def __str__(self):
9544  r"""__str__(_RigidBodyNormalizeConstraint self) -> std::string"""
9545  return _IMP_core._RigidBodyNormalizeConstraint___str__(self)
9546 
9547  def __repr__(self):
9548  r"""__repr__(_RigidBodyNormalizeConstraint self) -> std::string"""
9549  return _IMP_core._RigidBodyNormalizeConstraint___repr__(self)
9550 
9551  @staticmethod
9552  def get_from(o):
9553  return _object_cast_to__RigidBodyNormalizeConstraint(o)
9554 
9555 
9556  def _get_jax(self):
9557  from IMP.algebra._jax_util import _quaternion_normalize
9558  import jax
9559  normalize_rotations = jax.vmap(_quaternion_normalize, in_axes=0)
9560  def apply_func(jm):
9561  # Assume that constraint acts on all rigid bodies
9562  allrbs = jm['rigid_bodies']
9563  allrbs.quaternion = normalize_rotations(allrbs.quaternion)
9564  return jm
9565  return self._wrap_jax(apply_func, keys=['rigid_bodies'])
9566 
9567 
9568 # Register _RigidBodyNormalizeConstraint in _IMP_core:
9569 _IMP_core._RigidBodyNormalizeConstraint_swigregister(_RigidBodyNormalizeConstraint)
9570 class _RigidBodyPositionConstraint(IMP.Constraint):
9571  r"""Proxy of C++ IMP::core::internal::_RigidBodyPositionConstraint class."""
9572 
9573  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9574 
9575  def __init__(self, *args, **kwargs):
9576  raise AttributeError("No constructor defined - class is abstract")
9577 
9578  def get_version_info(self):
9579  r"""get_version_info(_RigidBodyPositionConstraint self) -> VersionInfo"""
9580  return _IMP_core._RigidBodyPositionConstraint_get_version_info(self)
9581  __swig_destroy__ = _IMP_core.delete__RigidBodyPositionConstraint
9582 
9583  def get_before_modifier(self):
9584  r"""get_before_modifier(_RigidBodyPositionConstraint self) -> _UpdateRigidBodyMembers"""
9585  return _IMP_core._RigidBodyPositionConstraint_get_before_modifier(self)
9586 
9587  def get_after_modifier(self):
9588  r"""get_after_modifier(_RigidBodyPositionConstraint self) -> _AccumulateRigidBodyDerivatives"""
9589  return _IMP_core._RigidBodyPositionConstraint_get_after_modifier(self)
9590 
9591  def get_index(self):
9592  r"""get_index(_RigidBodyPositionConstraint self) -> ParticleIndex"""
9593  return _IMP_core._RigidBodyPositionConstraint_get_index(self)
9594 
9595  def __str__(self):
9596  r"""__str__(_RigidBodyPositionConstraint self) -> std::string"""
9597  return _IMP_core._RigidBodyPositionConstraint___str__(self)
9598 
9599  def __repr__(self):
9600  r"""__repr__(_RigidBodyPositionConstraint self) -> std::string"""
9601  return _IMP_core._RigidBodyPositionConstraint___repr__(self)
9602 
9603  @staticmethod
9604  def get_from(o):
9605  return _object_cast_to__RigidBodyPositionConstraint(o)
9606 
9607 
9608  def _get_jax(self):
9609  import jax
9610  def apply_func(jm):
9611  # Assume that constraint acts on all rigid bodies
9612  bodies = jm['rigid_bodies'].bodies
9613  # todo: this could perhaps be better parallelized, as in most
9614  # cases (at least, without nested rigid bodies) the update of
9615  # one rigid body does not affect members of another body
9616  for body in bodies:
9617  jm = body.update_members(jm)
9618  return jm
9619  return self._wrap_jax(apply_func, keys=['rigid_bodies'])
9620 
9621 
9622 # Register _RigidBodyPositionConstraint in _IMP_core:
9623 _IMP_core._RigidBodyPositionConstraint_swigregister(_RigidBodyPositionConstraint)
9624 class RigidBodyHierarchyGeometry(IMP.display.SingletonGeometry):
9625  r"""Proxy of C++ IMP::core::RigidBodyHierarchyGeometry class."""
9626 
9627  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9628 
9629  def __init__(self, rb, constituents):
9630  r"""__init__(RigidBodyHierarchyGeometry self, RigidBody rb, IMP::ParticlesTemp const & constituents) -> RigidBodyHierarchyGeometry"""
9631  _IMP_core.RigidBodyHierarchyGeometry_swiginit(self, _IMP_core.new_RigidBodyHierarchyGeometry(rb, constituents))
9632 
9633  def get_version_info(self):
9634  r"""get_version_info(RigidBodyHierarchyGeometry self) -> VersionInfo"""
9635  return _IMP_core.RigidBodyHierarchyGeometry_get_version_info(self)
9636  __swig_destroy__ = _IMP_core.delete_RigidBodyHierarchyGeometry
9637 
9638  def __str__(self):
9639  r"""__str__(RigidBodyHierarchyGeometry self) -> std::string"""
9640  return _IMP_core.RigidBodyHierarchyGeometry___str__(self)
9641 
9642  def __repr__(self):
9643  r"""__repr__(RigidBodyHierarchyGeometry self) -> std::string"""
9644  return _IMP_core.RigidBodyHierarchyGeometry___repr__(self)
9645 
9646  @staticmethod
9647  def get_from(o):
9648  return _object_cast_to_RigidBodyHierarchyGeometry(o)
9649 
9650 
9651 # Register RigidBodyHierarchyGeometry in _IMP_core:
9652 _IMP_core.RigidBodyHierarchyGeometry_swigregister(RigidBodyHierarchyGeometry)
9653 class RigidBodyDerivativeGeometry(IMP.display.SingletonGeometry):
9654  r"""Proxy of C++ IMP::core::RigidBodyDerivativeGeometry class."""
9655 
9656  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9657 
9658  def __init__(self, *args):
9659  r"""
9660  __init__(RigidBodyDerivativeGeometry self, Particle p) -> RigidBodyDerivativeGeometry
9661  __init__(RigidBodyDerivativeGeometry self, RigidBody d) -> RigidBodyDerivativeGeometry
9662  """
9663  _IMP_core.RigidBodyDerivativeGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativeGeometry(*args))
9664 
9665  def get_version_info(self):
9666  r"""get_version_info(RigidBodyDerivativeGeometry self) -> VersionInfo"""
9667  return _IMP_core.RigidBodyDerivativeGeometry_get_version_info(self)
9668  __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativeGeometry
9669 
9670  def __str__(self):
9671  r"""__str__(RigidBodyDerivativeGeometry self) -> std::string"""
9672  return _IMP_core.RigidBodyDerivativeGeometry___str__(self)
9673 
9674  def __repr__(self):
9675  r"""__repr__(RigidBodyDerivativeGeometry self) -> std::string"""
9676  return _IMP_core.RigidBodyDerivativeGeometry___repr__(self)
9677 
9678  @staticmethod
9679  def get_from(o):
9680  return _object_cast_to_RigidBodyDerivativeGeometry(o)
9681 
9682 
9683 # Register RigidBodyDerivativeGeometry in _IMP_core:
9684 _IMP_core.RigidBodyDerivativeGeometry_swigregister(RigidBodyDerivativeGeometry)
9685 class RigidBodyDerivativesGeometry(IMP.display.SingletonsGeometry):
9686  r"""Proxy of C++ IMP::core::RigidBodyDerivativesGeometry class."""
9687 
9688  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9689 
9690  def __init__(self, sc):
9691  r"""__init__(RigidBodyDerivativesGeometry self, SingletonContainer sc) -> RigidBodyDerivativesGeometry"""
9692  _IMP_core.RigidBodyDerivativesGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativesGeometry(sc))
9693 
9694  def get_version_info(self):
9695  r"""get_version_info(RigidBodyDerivativesGeometry self) -> VersionInfo"""
9696  return _IMP_core.RigidBodyDerivativesGeometry_get_version_info(self)
9697  __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativesGeometry
9698 
9699  def __str__(self):
9700  r"""__str__(RigidBodyDerivativesGeometry self) -> std::string"""
9701  return _IMP_core.RigidBodyDerivativesGeometry___str__(self)
9702 
9703  def __repr__(self):
9704  r"""__repr__(RigidBodyDerivativesGeometry self) -> std::string"""
9705  return _IMP_core.RigidBodyDerivativesGeometry___repr__(self)
9706 
9707  @staticmethod
9708  def get_from(o):
9709  return _object_cast_to_RigidBodyDerivativesGeometry(o)
9710 
9711 
9712 # Register RigidBodyDerivativesGeometry in _IMP_core:
9713 _IMP_core.RigidBodyDerivativesGeometry_swigregister(RigidBodyDerivativesGeometry)
9714 class RigidBodyFrameGeometry(IMP.display.SingletonGeometry):
9715  r"""Proxy of C++ IMP::core::RigidBodyFrameGeometry class."""
9716 
9717  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9718 
9719  def __init__(self, *args):
9720  r"""
9721  __init__(RigidBodyFrameGeometry self, Particle p) -> RigidBodyFrameGeometry
9722  __init__(RigidBodyFrameGeometry self, RigidBody d) -> RigidBodyFrameGeometry
9723  """
9724  _IMP_core.RigidBodyFrameGeometry_swiginit(self, _IMP_core.new_RigidBodyFrameGeometry(*args))
9725 
9726  def get_version_info(self):
9727  r"""get_version_info(RigidBodyFrameGeometry self) -> VersionInfo"""
9728  return _IMP_core.RigidBodyFrameGeometry_get_version_info(self)
9729  __swig_destroy__ = _IMP_core.delete_RigidBodyFrameGeometry
9730 
9731  def __str__(self):
9732  r"""__str__(RigidBodyFrameGeometry self) -> std::string"""
9733  return _IMP_core.RigidBodyFrameGeometry___str__(self)
9734 
9735  def __repr__(self):
9736  r"""__repr__(RigidBodyFrameGeometry self) -> std::string"""
9737  return _IMP_core.RigidBodyFrameGeometry___repr__(self)
9738 
9739  @staticmethod
9740  def get_from(o):
9741  return _object_cast_to_RigidBodyFrameGeometry(o)
9742 
9743 
9744 # Register RigidBodyFrameGeometry in _IMP_core:
9745 _IMP_core.RigidBodyFrameGeometry_swigregister(RigidBodyFrameGeometry)
9746 class RigidBodyFramesGeometry(IMP.display.SingletonsGeometry):
9747  r"""Proxy of C++ IMP::core::RigidBodyFramesGeometry class."""
9748 
9749  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9750 
9751  def __init__(self, sc):
9752  r"""__init__(RigidBodyFramesGeometry self, SingletonContainer sc) -> RigidBodyFramesGeometry"""
9753  _IMP_core.RigidBodyFramesGeometry_swiginit(self, _IMP_core.new_RigidBodyFramesGeometry(sc))
9754 
9755  def get_version_info(self):
9756  r"""get_version_info(RigidBodyFramesGeometry self) -> VersionInfo"""
9757  return _IMP_core.RigidBodyFramesGeometry_get_version_info(self)
9758  __swig_destroy__ = _IMP_core.delete_RigidBodyFramesGeometry
9759 
9760  def __str__(self):
9761  r"""__str__(RigidBodyFramesGeometry self) -> std::string"""
9762  return _IMP_core.RigidBodyFramesGeometry___str__(self)
9763 
9764  def __repr__(self):
9765  r"""__repr__(RigidBodyFramesGeometry self) -> std::string"""
9766  return _IMP_core.RigidBodyFramesGeometry___repr__(self)
9767 
9768  @staticmethod
9769  def get_from(o):
9770  return _object_cast_to_RigidBodyFramesGeometry(o)
9771 
9772 
9773 # Register RigidBodyFramesGeometry in _IMP_core:
9774 _IMP_core.RigidBodyFramesGeometry_swigregister(RigidBodyFramesGeometry)
9775 class RigidBodyTorque(IMP.display.SegmentGeometry):
9776  r"""Proxy of C++ IMP::core::RigidBodyTorque class."""
9777 
9778  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9779 
9780  def __init__(self, p):
9781  r"""__init__(RigidBodyTorque self, Particle p) -> RigidBodyTorque"""
9782  _IMP_core.RigidBodyTorque_swiginit(self, _IMP_core.new_RigidBodyTorque(p))
9783 
9784  def __str__(self):
9785  r"""__str__(RigidBodyTorque self) -> std::string"""
9786  return _IMP_core.RigidBodyTorque___str__(self)
9787 
9788  def __repr__(self):
9789  r"""__repr__(RigidBodyTorque self) -> std::string"""
9790  return _IMP_core.RigidBodyTorque___repr__(self)
9791 
9792  @staticmethod
9793  def get_from(o):
9794  return _object_cast_to_RigidBodyTorque(o)
9795 
9796  __swig_destroy__ = _IMP_core.delete_RigidBodyTorque
9797 
9798 # Register RigidBodyTorque in _IMP_core:
9799 _IMP_core.RigidBodyTorque_swigregister(RigidBodyTorque)
9800 class NearestNeighborsClosePairsFinder(ClosePairsFinder):
9801  r"""Proxy of C++ IMP::core::NearestNeighborsClosePairsFinder class."""
9802 
9803  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9804 
9805  def __init__(self):
9806  r"""__init__(NearestNeighborsClosePairsFinder self) -> NearestNeighborsClosePairsFinder"""
9807  _IMP_core.NearestNeighborsClosePairsFinder_swiginit(self, _IMP_core.new_NearestNeighborsClosePairsFinder())
9808 
9809  def get_close_pairs(self, *args):
9810  r"""
9811  get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9812  get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9813  get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
9814  get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
9815  """
9816  return _IMP_core.NearestNeighborsClosePairsFinder_get_close_pairs(self, *args)
9817 
9818  def do_get_inputs(self, m, pis):
9819  r"""do_get_inputs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9820  return _IMP_core.NearestNeighborsClosePairsFinder_do_get_inputs(self, m, pis)
9821 
9822  def get_version_info(self):
9823  r"""get_version_info(NearestNeighborsClosePairsFinder self) -> VersionInfo"""
9824  return _IMP_core.NearestNeighborsClosePairsFinder_get_version_info(self)
9825  __swig_destroy__ = _IMP_core.delete_NearestNeighborsClosePairsFinder
9826 
9827  def __str__(self):
9828  r"""__str__(NearestNeighborsClosePairsFinder self) -> std::string"""
9829  return _IMP_core.NearestNeighborsClosePairsFinder___str__(self)
9830 
9831  def __repr__(self):
9832  r"""__repr__(NearestNeighborsClosePairsFinder self) -> std::string"""
9833  return _IMP_core.NearestNeighborsClosePairsFinder___repr__(self)
9834 
9835  @staticmethod
9836  def get_from(o):
9837  return _object_cast_to_NearestNeighborsClosePairsFinder(o)
9838 
9839 
9840 # Register NearestNeighborsClosePairsFinder in _IMP_core:
9841 _IMP_core.NearestNeighborsClosePairsFinder_swigregister(NearestNeighborsClosePairsFinder)
9842 class RestraintsScoringFunction(IMP.ScoringFunction):
9843  r"""Proxy of C++ IMP::core::RestraintsScoringFunction class."""
9844 
9845  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9846 
9847  def __init__(self, *args):
9848  r"""
9849  __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, double weight=1.0, double max=NO_MAX, std::string name="RestraintsScoringFunction%1%") -> RestraintsScoringFunction
9850  __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, std::string name) -> RestraintsScoringFunction
9851  __init__(RestraintsScoringFunction self) -> RestraintsScoringFunction
9852  """
9853  _IMP_core.RestraintsScoringFunction_swiginit(self, _IMP_core.new_RestraintsScoringFunction(*args))
9854 
9855  def do_add_score_and_derivatives(self, sa, ss):
9856  r"""do_add_score_and_derivatives(RestraintsScoringFunction self, ScoreAccumulator sa, IMP::ScoreStatesTemp const & ss)"""
9857  return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives(self, sa, ss)
9858 
9859  def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss):
9860  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)"""
9861  return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss)
9862 
9863  def do_get_inputs(self):
9864  r"""do_get_inputs(RestraintsScoringFunction self) -> IMP::ModelObjectsTemp"""
9865  return _IMP_core.RestraintsScoringFunction_do_get_inputs(self)
9866 
9867  def get_restraints(self):
9868  r"""get_restraints(RestraintsScoringFunction self) -> IMP::Restraints"""
9869  return _IMP_core.RestraintsScoringFunction_get_restraints(self)
9870 
9871  def set_restraints(self, d):
9872  r"""set_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
9873  return _IMP_core.RestraintsScoringFunction_set_restraints(self, d)
9874 
9875  def get_number_of_restraints(self):
9876  r"""get_number_of_restraints(RestraintsScoringFunction self) -> unsigned int"""
9877  return _IMP_core.RestraintsScoringFunction_get_number_of_restraints(self)
9878 
9879  def clear_restraints(self):
9880  r"""clear_restraints(RestraintsScoringFunction self)"""
9881  return _IMP_core.RestraintsScoringFunction_clear_restraints(self)
9882 
9883  def get_restraint(self, i):
9884  r"""get_restraint(RestraintsScoringFunction self, unsigned int i) -> Restraint"""
9885  return _IMP_core.RestraintsScoringFunction_get_restraint(self, i)
9886 
9887  def erase_restraint(self, i):
9888  r"""erase_restraint(RestraintsScoringFunction self, unsigned int i)"""
9889  return _IMP_core.RestraintsScoringFunction_erase_restraint(self, i)
9890 
9891  def add_restraint(self, d):
9892  r"""add_restraint(RestraintsScoringFunction self, Restraint d) -> unsigned int"""
9893  return _IMP_core.RestraintsScoringFunction_add_restraint(self, d)
9894 
9895  def add_restraints(self, d):
9896  r"""add_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
9897  return _IMP_core.RestraintsScoringFunction_add_restraints(self, d)
9898 
9899  def _python_index_restraint(self, r, start, stop):
9900  r"""_python_index_restraint(RestraintsScoringFunction self, Restraint r, unsigned int start, unsigned int stop) -> unsigned int"""
9901  return _IMP_core.RestraintsScoringFunction__python_index_restraint(self, r, start, stop)
9902  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)
9903  def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
9904  def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
9905  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##Restraints")
9906 
9907  def get_version_info(self):
9908  r"""get_version_info(RestraintsScoringFunction self) -> VersionInfo"""
9909  return _IMP_core.RestraintsScoringFunction_get_version_info(self)
9910  __swig_destroy__ = _IMP_core.delete_RestraintsScoringFunction
9911 
9912  def __str__(self):
9913  r"""__str__(RestraintsScoringFunction self) -> std::string"""
9914  return _IMP_core.RestraintsScoringFunction___str__(self)
9915 
9916  def __repr__(self):
9917  r"""__repr__(RestraintsScoringFunction self) -> std::string"""
9918  return _IMP_core.RestraintsScoringFunction___repr__(self)
9919 
9920  @staticmethod
9921  def get_from(o):
9922  return _object_cast_to_RestraintsScoringFunction(o)
9923 
9924 
9925  def _get_as_binary(self):
9926  r"""_get_as_binary(RestraintsScoringFunction self) -> PyObject *"""
9927  return _IMP_core.RestraintsScoringFunction__get_as_binary(self)
9928 
9929  def _set_from_binary(self, p):
9930  r"""_set_from_binary(RestraintsScoringFunction self, PyObject * p)"""
9931  return _IMP_core.RestraintsScoringFunction__set_from_binary(self, p)
9932 
9933  def __getstate__(self):
9934  p = self._get_as_binary()
9935  if len(self.__dict__) > 1:
9936  d = self.__dict__.copy()
9937  del d['this']
9938  p = (d, p)
9939  return p
9940 
9941  def __setstate__(self, p):
9942  if not hasattr(self, 'this'):
9943  self.__init__()
9944  if isinstance(p, tuple):
9945  d, p = p
9946  self.__dict__.update(d)
9947  return self._set_from_binary(p)
9948 
9949 
9950  def _get_jax(self):
9951  import IMP._jax_util
9952  jis = [r.get_derived_object()._get_jax() for r in self.restraints]
9953  funcs = [j.score_func for j in jis]
9954  keys = frozenset(x for j in jis for x in j._keys)
9955  def jax_sf(jm):
9956  return sum(f(jm) for f in funcs)
9957  return IMP._jax_util.JAXRestraintInfo(
9958  m=self.get_model(), score_func=jax_sf, weight=1.0, keys=keys)
9959 
9960 
9961 # Register RestraintsScoringFunction in _IMP_core:
9962 _IMP_core.RestraintsScoringFunction_swigregister(RestraintsScoringFunction)
9963 class RigidClosePairsFinder(ClosePairsFinder):
9964  r"""Proxy of C++ IMP::core::RigidClosePairsFinder class."""
9965 
9966  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9967 
9968  def __init__(self, cpf=None):
9969  r"""__init__(RigidClosePairsFinder self, ClosePairsFinder cpf=None) -> RigidClosePairsFinder"""
9970  _IMP_core.RigidClosePairsFinder_swiginit(self, _IMP_core.new_RigidClosePairsFinder(cpf))
9971 
9972  def do_get_inputs(self, m, pis):
9973  r"""do_get_inputs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9974  return _IMP_core.RigidClosePairsFinder_do_get_inputs(self, m, pis)
9975 
9976  def get_close_pairs(self, *args):
9977  r"""
9978  get_close_pairs(RigidClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b, IMP::ParticleIndexes const & pa, IMP::ParticleIndexes const & pb) -> IMP::ParticleIndexPairs
9979  get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9980  get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9981  get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
9982  get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
9983  """
9984  return _IMP_core.RigidClosePairsFinder_get_close_pairs(self, *args)
9985 
9986  def get_version_info(self):
9987  r"""get_version_info(RigidClosePairsFinder self) -> VersionInfo"""
9988  return _IMP_core.RigidClosePairsFinder_get_version_info(self)
9989  __swig_destroy__ = _IMP_core.delete_RigidClosePairsFinder
9990 
9991  def __str__(self):
9992  r"""__str__(RigidClosePairsFinder self) -> std::string"""
9993  return _IMP_core.RigidClosePairsFinder___str__(self)
9994 
9995  def __repr__(self):
9996  r"""__repr__(RigidClosePairsFinder self) -> std::string"""
9997  return _IMP_core.RigidClosePairsFinder___repr__(self)
9998 
9999  @staticmethod
10000  def get_from(o):
10001  return _object_cast_to_RigidClosePairsFinder(o)
10002 
10003 
10004  def _get_as_binary(self):
10005  r"""_get_as_binary(RigidClosePairsFinder self) -> PyObject *"""
10006  return _IMP_core.RigidClosePairsFinder__get_as_binary(self)
10007 
10008  def _set_from_binary(self, p):
10009  r"""_set_from_binary(RigidClosePairsFinder self, PyObject * p)"""
10010  return _IMP_core.RigidClosePairsFinder__set_from_binary(self, p)
10011 
10012  def __getstate__(self):
10013  p = self._get_as_binary()
10014  if len(self.__dict__) > 1:
10015  d = self.__dict__.copy()
10016  del d['this']
10017  p = (d, p)
10018  return p
10019 
10020  def __setstate__(self, p):
10021  if not hasattr(self, 'this'):
10022  self.__init__()
10023  if isinstance(p, tuple):
10024  d, p = p
10025  self.__dict__.update(d)
10026  return self._set_from_binary(p)
10027 
10028 
10029 # Register RigidClosePairsFinder in _IMP_core:
10030 _IMP_core.RigidClosePairsFinder_swigregister(RigidClosePairsFinder)
10031 class _SphereDistancePairScore(IMP.PairScore):
10032  r"""Proxy of C++ IMP::core::SphereDistancePairScore class."""
10033 
10034  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10035  __repr__ = _swig_repr
10036 
10037  def __init__(self, *args):
10038  r"""
10039  SphereDistancePairScore(UnaryFunction uf, std::string name="SphereDistancePairScore%1%") -> _SphereDistancePairScore
10040  __init__(_SphereDistancePairScore self) -> _SphereDistancePairScore
10041  """
10042  _IMP_core._SphereDistancePairScore_swiginit(self, _IMP_core.new__SphereDistancePairScore(*args))
10043 
10044  def do_get_inputs(self, m, pis):
10045  r"""do_get_inputs(_SphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10046  return _IMP_core._SphereDistancePairScore_do_get_inputs(self, m, pis)
10047 
10048  def get_score_functor(self, *args):
10049  r"""
10050  get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10051  get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10052  """
10053  return _IMP_core._SphereDistancePairScore_get_score_functor(self, *args)
10054 
10055  def get_version_info(self):
10056  r"""get_version_info(_SphereDistancePairScore self) -> VersionInfo"""
10057  return _IMP_core._SphereDistancePairScore_get_version_info(self)
10058  __swig_destroy__ = _IMP_core.delete__SphereDistancePairScore
10059 
10060  @staticmethod
10061  def get_from(o):
10062  return _object_cast_to__SphereDistancePairScore(o)
10063 
10064 
10065  def _get_as_binary(self):
10066  r"""_get_as_binary(_SphereDistancePairScore self) -> PyObject *"""
10067  return _IMP_core._SphereDistancePairScore__get_as_binary(self)
10068 
10069  def _set_from_binary(self, p):
10070  r"""_set_from_binary(_SphereDistancePairScore self, PyObject * p)"""
10071  return _IMP_core._SphereDistancePairScore__set_from_binary(self, p)
10072 
10073  def __getstate__(self):
10074  p = self._get_as_binary()
10075  if len(self.__dict__) > 1:
10076  d = self.__dict__.copy()
10077  del d['this']
10078  p = (d, p)
10079  return p
10080 
10081  def __setstate__(self, p):
10082  if not hasattr(self, 'this'):
10083  self.__init__()
10084  if isinstance(p, tuple):
10085  d, p = p
10086  self.__dict__.update(d)
10087  return self._set_from_binary(p)
10088 
10089 
10090  def _get_jax(self, m, indexes):
10091  import jax.numpy as jnp
10092  def jax_score(jm, uf):
10093  xyzs = jm['xyz'][indexes]
10094  rs = jm['r'][indexes]
10095  diff = xyzs[:,0] - xyzs[:,1]
10096  drs = jnp.linalg.norm(diff, axis=1) - rs.sum(axis=1)
10097  return uf(drs)
10098  sfnc = self.get_score_functor()
10099  uf = sfnc.get_unary_function().get_derived_object()
10100  f = functools.partial(jax_score, uf=uf._get_jax())
10101  return self._wrap_jax(m, f)
10102 
10103 
10104 # Register _SphereDistancePairScore in _IMP_core:
10105 _IMP_core._SphereDistancePairScore_swigregister(_SphereDistancePairScore)
10106 class HarmonicUpperBoundSphereDistancePairScore(IMP.PairScore):
10107  r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDistancePairScore class."""
10108 
10109  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10110 
10111  def __init__(self, *args):
10112  r"""
10113  __init__(HarmonicUpperBoundSphereDistancePairScore self, double x0, double k, std::string name="HarmonicUpperBoundSphereDistancePairScore%1%") -> HarmonicUpperBoundSphereDistancePairScore
10114  __init__(HarmonicUpperBoundSphereDistancePairScore self) -> HarmonicUpperBoundSphereDistancePairScore
10115  """
10116  _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDistancePairScore(*args))
10117 
10118  def do_get_inputs(self, m, pis):
10119  r"""do_get_inputs(HarmonicUpperBoundSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10120  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_do_get_inputs(self, m, pis)
10121 
10122  def get_score_functor(self, *args):
10123  r"""
10124  get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore
10125  get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore const &
10126  """
10127  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_score_functor(self, *args)
10128 
10129  def get_x0(self):
10130  r"""get_x0(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10131  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_x0(self)
10132 
10133  def get_k(self):
10134  r"""get_k(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10135  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_k(self)
10136 
10137  def get_version_info(self):
10138  r"""get_version_info(HarmonicUpperBoundSphereDistancePairScore self) -> VersionInfo"""
10139  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_version_info(self)
10140  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDistancePairScore
10141 
10142  def __str__(self):
10143  r"""__str__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10144  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___str__(self)
10145 
10146  def __repr__(self):
10147  r"""__repr__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10148  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___repr__(self)
10149 
10150  @staticmethod
10151  def get_from(o):
10152  return _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
10153 
10154 
10155  def _get_as_binary(self):
10156  r"""_get_as_binary(HarmonicUpperBoundSphereDistancePairScore self) -> PyObject *"""
10157  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__get_as_binary(self)
10158 
10159  def _set_from_binary(self, p):
10160  r"""_set_from_binary(HarmonicUpperBoundSphereDistancePairScore self, PyObject * p)"""
10161  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__set_from_binary(self, p)
10162 
10163  def __getstate__(self):
10164  p = self._get_as_binary()
10165  if len(self.__dict__) > 1:
10166  d = self.__dict__.copy()
10167  del d['this']
10168  p = (d, p)
10169  return p
10170 
10171  def __setstate__(self, p):
10172  if not hasattr(self, 'this'):
10173  self.__init__()
10174  if isinstance(p, tuple):
10175  d, p = p
10176  self.__dict__.update(d)
10177  return self._set_from_binary(p)
10178 
10179 
10180  def _get_jax(self, m, indexes):
10181  import jax.numpy as jnp
10182  import jax.lax
10183  def jax_score(jm, d, k):
10184  xyzs = jm['xyz'][indexes]
10185  rs = jm['r'][indexes]
10186  diff = xyzs[:,0] - xyzs[:,1]
10187  drs = jnp.linalg.norm(diff, axis=1) - rs.sum(axis=1)
10188  return 0.5 * k * jax.lax.min(d - drs, 0.0) ** 2
10189  f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10190  return self._wrap_jax(m, f)
10191 
10192 
10193 # Register HarmonicUpperBoundSphereDistancePairScore in _IMP_core:
10194 _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swigregister(HarmonicUpperBoundSphereDistancePairScore)
10195 class HarmonicUpperBoundSphereDiameterPairScore(IMP.PairScore):
10196  r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDiameterPairScore class."""
10197 
10198  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10199 
10200  def __init__(self, d0, k):
10201  r"""__init__(HarmonicUpperBoundSphereDiameterPairScore self, double d0, double k) -> HarmonicUpperBoundSphereDiameterPairScore"""
10202  _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDiameterPairScore(d0, k))
10203 
10204  def get_rest_length(self):
10205  r"""get_rest_length(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10206  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_rest_length(self)
10207 
10208  def get_stiffness(self):
10209  r"""get_stiffness(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10210  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_stiffness(self)
10211 
10212  def do_get_inputs(self, m, pis):
10213  r"""do_get_inputs(HarmonicUpperBoundSphereDiameterPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10214  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_do_get_inputs(self, m, pis)
10215 
10216  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10217  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"""
10218  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10219 
10220  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10221  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"""
10222  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10223 
10224  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10225  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"""
10226  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10227 
10228  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10229  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"""
10230  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10231 
10232  def get_version_info(self):
10233  r"""get_version_info(HarmonicUpperBoundSphereDiameterPairScore self) -> VersionInfo"""
10234  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_version_info(self)
10235  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDiameterPairScore
10236 
10237  def __str__(self):
10238  r"""__str__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10239  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___str__(self)
10240 
10241  def __repr__(self):
10242  r"""__repr__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10243  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___repr__(self)
10244 
10245  @staticmethod
10246  def get_from(o):
10247  return _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
10248 
10249 
10250 # Register HarmonicUpperBoundSphereDiameterPairScore in _IMP_core:
10251 _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swigregister(HarmonicUpperBoundSphereDiameterPairScore)
10252 class HarmonicSphereDistancePairScore(IMP.PairScore):
10253  r"""Proxy of C++ IMP::core::HarmonicSphereDistancePairScore class."""
10254 
10255  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10256 
10257  def __init__(self, *args):
10258  r"""
10259  __init__(HarmonicSphereDistancePairScore self, double x0, double k, std::string name="HarmonicSphereDistancePairScore%1%") -> HarmonicSphereDistancePairScore
10260  __init__(HarmonicSphereDistancePairScore self) -> HarmonicSphereDistancePairScore
10261  """
10262  _IMP_core.HarmonicSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSphereDistancePairScore(*args))
10263 
10264  def do_get_inputs(self, m, pis):
10265  r"""do_get_inputs(HarmonicSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10266  return _IMP_core.HarmonicSphereDistancePairScore_do_get_inputs(self, m, pis)
10267 
10268  def get_score_functor(self, *args):
10269  r"""
10270  get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore
10271  get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore const &
10272  """
10273  return _IMP_core.HarmonicSphereDistancePairScore_get_score_functor(self, *args)
10274 
10275  def get_x0(self):
10276  r"""get_x0(HarmonicSphereDistancePairScore self) -> double"""
10277  return _IMP_core.HarmonicSphereDistancePairScore_get_x0(self)
10278 
10279  def get_k(self):
10280  r"""get_k(HarmonicSphereDistancePairScore self) -> double"""
10281  return _IMP_core.HarmonicSphereDistancePairScore_get_k(self)
10282 
10283  def get_version_info(self):
10284  r"""get_version_info(HarmonicSphereDistancePairScore self) -> VersionInfo"""
10285  return _IMP_core.HarmonicSphereDistancePairScore_get_version_info(self)
10286  __swig_destroy__ = _IMP_core.delete_HarmonicSphereDistancePairScore
10287 
10288  def __str__(self):
10289  r"""__str__(HarmonicSphereDistancePairScore self) -> std::string"""
10290  return _IMP_core.HarmonicSphereDistancePairScore___str__(self)
10291 
10292  def __repr__(self):
10293  r"""__repr__(HarmonicSphereDistancePairScore self) -> std::string"""
10294  return _IMP_core.HarmonicSphereDistancePairScore___repr__(self)
10295 
10296  @staticmethod
10297  def get_from(o):
10298  return _object_cast_to_HarmonicSphereDistancePairScore(o)
10299 
10300 
10301  def _get_as_binary(self):
10302  r"""_get_as_binary(HarmonicSphereDistancePairScore self) -> PyObject *"""
10303  return _IMP_core.HarmonicSphereDistancePairScore__get_as_binary(self)
10304 
10305  def _set_from_binary(self, p):
10306  r"""_set_from_binary(HarmonicSphereDistancePairScore self, PyObject * p)"""
10307  return _IMP_core.HarmonicSphereDistancePairScore__set_from_binary(self, p)
10308 
10309  def __getstate__(self):
10310  p = self._get_as_binary()
10311  if len(self.__dict__) > 1:
10312  d = self.__dict__.copy()
10313  del d['this']
10314  p = (d, p)
10315  return p
10316 
10317  def __setstate__(self, p):
10318  if not hasattr(self, 'this'):
10319  self.__init__()
10320  if isinstance(p, tuple):
10321  d, p = p
10322  self.__dict__.update(d)
10323  return self._set_from_binary(p)
10324 
10325 
10326  def _get_jax(self, m, indexes):
10327  import jax.numpy as jnp
10328  def jax_score(jm, d, k):
10329  xyzs = jm['xyz'][indexes]
10330  rs = jm['r'][indexes]
10331  diff = xyzs[:,0] - xyzs[:,1]
10332  drs = jnp.linalg.norm(diff, axis=1) - rs.sum(axis=1)
10333  return 0.5 * k * (d - drs)**2
10334  f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10335  return self._wrap_jax(m, f)
10336 
10337 
10338 # Register HarmonicSphereDistancePairScore in _IMP_core:
10339 _IMP_core.HarmonicSphereDistancePairScore_swigregister(HarmonicSphereDistancePairScore)
10340 class NormalizedSphereDistancePairScore(IMP.PairScore):
10341  r"""Proxy of C++ IMP::core::NormalizedSphereDistancePairScore class."""
10342 
10343  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10344 
10345  def __init__(self, *args):
10346  r"""__init__(NormalizedSphereDistancePairScore self, UnaryFunction f, FloatKey radius=IMP::FloatKey("radius")) -> NormalizedSphereDistancePairScore"""
10347  _IMP_core.NormalizedSphereDistancePairScore_swiginit(self, _IMP_core.new_NormalizedSphereDistancePairScore(*args))
10348 
10349  def do_get_inputs(self, m, pis):
10350  r"""do_get_inputs(NormalizedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10351  return _IMP_core.NormalizedSphereDistancePairScore_do_get_inputs(self, m, pis)
10352 
10353  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10354  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"""
10355  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10356 
10357  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10358  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"""
10359  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10360 
10361  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10362  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"""
10363  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10364 
10365  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10366  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"""
10367  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10368 
10369  def get_version_info(self):
10370  r"""get_version_info(NormalizedSphereDistancePairScore self) -> VersionInfo"""
10371  return _IMP_core.NormalizedSphereDistancePairScore_get_version_info(self)
10372  __swig_destroy__ = _IMP_core.delete_NormalizedSphereDistancePairScore
10373 
10374  def __str__(self):
10375  r"""__str__(NormalizedSphereDistancePairScore self) -> std::string"""
10376  return _IMP_core.NormalizedSphereDistancePairScore___str__(self)
10377 
10378  def __repr__(self):
10379  r"""__repr__(NormalizedSphereDistancePairScore self) -> std::string"""
10380  return _IMP_core.NormalizedSphereDistancePairScore___repr__(self)
10381 
10382  @staticmethod
10383  def get_from(o):
10384  return _object_cast_to_NormalizedSphereDistancePairScore(o)
10385 
10386 
10387 # Register NormalizedSphereDistancePairScore in _IMP_core:
10388 _IMP_core.NormalizedSphereDistancePairScore_swigregister(NormalizedSphereDistancePairScore)
10389 class WeightedSphereDistancePairScore(IMP.PairScore):
10390  r"""Proxy of C++ IMP::core::WeightedSphereDistancePairScore class."""
10391 
10392  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10393 
10394  def __init__(self, *args):
10395  r"""__init__(WeightedSphereDistancePairScore self, UnaryFunction f, FloatKey weight, FloatKey radius=IMP::FloatKey("radius")) -> WeightedSphereDistancePairScore"""
10396  _IMP_core.WeightedSphereDistancePairScore_swiginit(self, _IMP_core.new_WeightedSphereDistancePairScore(*args))
10397 
10398  def do_get_inputs(self, m, pis):
10399  r"""do_get_inputs(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10400  return _IMP_core.WeightedSphereDistancePairScore_do_get_inputs(self, m, pis)
10401 
10402  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10403  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"""
10404  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10405 
10406  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10407  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"""
10408  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10409 
10410  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10411  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"""
10412  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10413 
10414  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10415  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"""
10416  return _IMP_core.WeightedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10417 
10418  def get_version_info(self):
10419  r"""get_version_info(WeightedSphereDistancePairScore self) -> VersionInfo"""
10420  return _IMP_core.WeightedSphereDistancePairScore_get_version_info(self)
10421  __swig_destroy__ = _IMP_core.delete_WeightedSphereDistancePairScore
10422 
10423  def __str__(self):
10424  r"""__str__(WeightedSphereDistancePairScore self) -> std::string"""
10425  return _IMP_core.WeightedSphereDistancePairScore___str__(self)
10426 
10427  def __repr__(self):
10428  r"""__repr__(WeightedSphereDistancePairScore self) -> std::string"""
10429  return _IMP_core.WeightedSphereDistancePairScore___repr__(self)
10430 
10431  @staticmethod
10432  def get_from(o):
10433  return _object_cast_to_WeightedSphereDistancePairScore(o)
10434 
10435 
10436 # Register WeightedSphereDistancePairScore in _IMP_core:
10437 _IMP_core.WeightedSphereDistancePairScore_swigregister(WeightedSphereDistancePairScore)
10438 class SoftSpherePairScore(IMP.PairScore):
10439  r"""Proxy of C++ IMP::core::SoftSpherePairScore class."""
10440 
10441  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10442 
10443  def __init__(self, *args):
10444  r"""
10445  __init__(SoftSpherePairScore self, double k, std::string name="SoftSpherePairScore%1%") -> SoftSpherePairScore
10446  __init__(SoftSpherePairScore self) -> SoftSpherePairScore
10447  """
10448  _IMP_core.SoftSpherePairScore_swiginit(self, _IMP_core.new_SoftSpherePairScore(*args))
10449 
10450  def do_get_inputs(self, m, pis):
10451  r"""do_get_inputs(SoftSpherePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10452  return _IMP_core.SoftSpherePairScore_do_get_inputs(self, m, pis)
10453 
10454  def get_score_functor(self, *args):
10455  r"""
10456  get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore
10457  get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore const &
10458  """
10459  return _IMP_core.SoftSpherePairScore_get_score_functor(self, *args)
10460 
10461  def get_k(self):
10462  r"""get_k(SoftSpherePairScore self) -> double"""
10463  return _IMP_core.SoftSpherePairScore_get_k(self)
10464 
10465  def get_version_info(self):
10466  r"""get_version_info(SoftSpherePairScore self) -> VersionInfo"""
10467  return _IMP_core.SoftSpherePairScore_get_version_info(self)
10468  __swig_destroy__ = _IMP_core.delete_SoftSpherePairScore
10469 
10470  def __str__(self):
10471  r"""__str__(SoftSpherePairScore self) -> std::string"""
10472  return _IMP_core.SoftSpherePairScore___str__(self)
10473 
10474  def __repr__(self):
10475  r"""__repr__(SoftSpherePairScore self) -> std::string"""
10476  return _IMP_core.SoftSpherePairScore___repr__(self)
10477 
10478  @staticmethod
10479  def get_from(o):
10480  return _object_cast_to_SoftSpherePairScore(o)
10481 
10482 
10483  def _get_as_binary(self):
10484  r"""_get_as_binary(SoftSpherePairScore self) -> PyObject *"""
10485  return _IMP_core.SoftSpherePairScore__get_as_binary(self)
10486 
10487  def _set_from_binary(self, p):
10488  r"""_set_from_binary(SoftSpherePairScore self, PyObject * p)"""
10489  return _IMP_core.SoftSpherePairScore__set_from_binary(self, p)
10490 
10491  def __getstate__(self):
10492  p = self._get_as_binary()
10493  if len(self.__dict__) > 1:
10494  d = self.__dict__.copy()
10495  del d['this']
10496  p = (d, p)
10497  return p
10498 
10499  def __setstate__(self, p):
10500  if not hasattr(self, 'this'):
10501  self.__init__()
10502  if isinstance(p, tuple):
10503  d, p = p
10504  self.__dict__.update(d)
10505  return self._set_from_binary(p)
10506 
10507 
10508  def _get_jax(self, m, indexes):
10509  import jax.numpy as jnp
10510  import jax.lax
10511  def jax_score(jm, k):
10512  xyzs = jm['xyz'][indexes]
10513  rs = jm['r'][indexes]
10514  diff = xyzs[:,0] - xyzs[:,1]
10515  drs = jnp.linalg.norm(diff, axis=1) - rs.sum(axis=1)
10516  return 0.5 * k * jax.lax.min(drs, 0.0) ** 2
10517  f = functools.partial(jax_score, k=self.get_k())
10518  return self._wrap_jax(m, f)
10519 
10520 
10521 # Register SoftSpherePairScore in _IMP_core:
10522 _IMP_core.SoftSpherePairScore_swigregister(SoftSpherePairScore)
10523 class SurfaceDistancePairScore(IMP.PairScore):
10524  r"""Proxy of C++ IMP::core::SurfaceDistancePairScore class."""
10525 
10526  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10527 
10528  def __init__(self, *args):
10529  r"""__init__(SurfaceDistancePairScore self, UnaryFunction uf, std::string name="SurfaceDistancePairScore%1%") -> SurfaceDistancePairScore"""
10530  _IMP_core.SurfaceDistancePairScore_swiginit(self, _IMP_core.new_SurfaceDistancePairScore(*args))
10531 
10532  def do_get_inputs(self, m, pis):
10533  r"""do_get_inputs(SurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10534  return _IMP_core.SurfaceDistancePairScore_do_get_inputs(self, m, pis)
10535 
10536  def get_version_info(self):
10537  r"""get_version_info(SurfaceDistancePairScore self) -> VersionInfo"""
10538  return _IMP_core.SurfaceDistancePairScore_get_version_info(self)
10539  __swig_destroy__ = _IMP_core.delete_SurfaceDistancePairScore
10540 
10541  def __str__(self):
10542  r"""__str__(SurfaceDistancePairScore self) -> std::string"""
10543  return _IMP_core.SurfaceDistancePairScore___str__(self)
10544 
10545  def __repr__(self):
10546  r"""__repr__(SurfaceDistancePairScore self) -> std::string"""
10547  return _IMP_core.SurfaceDistancePairScore___repr__(self)
10548 
10549  @staticmethod
10550  def get_from(o):
10551  return _object_cast_to_SurfaceDistancePairScore(o)
10552 
10553 
10554 # Register SurfaceDistancePairScore in _IMP_core:
10555 _IMP_core.SurfaceDistancePairScore_swigregister(SurfaceDistancePairScore)
10556 class SurfaceHeightPairScore(IMP.PairScore):
10557  r"""Proxy of C++ IMP::core::SurfaceHeightPairScore class."""
10558 
10559  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10560 
10561  def __init__(self, *args):
10562  r"""__init__(SurfaceHeightPairScore self, UnaryFunction uf, std::string name="SurfaceHeightPairScore%1%") -> SurfaceHeightPairScore"""
10563  _IMP_core.SurfaceHeightPairScore_swiginit(self, _IMP_core.new_SurfaceHeightPairScore(*args))
10564 
10565  def do_get_inputs(self, m, pis):
10566  r"""do_get_inputs(SurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10567  return _IMP_core.SurfaceHeightPairScore_do_get_inputs(self, m, pis)
10568 
10569  def get_version_info(self):
10570  r"""get_version_info(SurfaceHeightPairScore self) -> VersionInfo"""
10571  return _IMP_core.SurfaceHeightPairScore_get_version_info(self)
10572  __swig_destroy__ = _IMP_core.delete_SurfaceHeightPairScore
10573 
10574  def __str__(self):
10575  r"""__str__(SurfaceHeightPairScore self) -> std::string"""
10576  return _IMP_core.SurfaceHeightPairScore___str__(self)
10577 
10578  def __repr__(self):
10579  r"""__repr__(SurfaceHeightPairScore self) -> std::string"""
10580  return _IMP_core.SurfaceHeightPairScore___repr__(self)
10581 
10582  @staticmethod
10583  def get_from(o):
10584  return _object_cast_to_SurfaceHeightPairScore(o)
10585 
10586 
10587 # Register SurfaceHeightPairScore in _IMP_core:
10588 _IMP_core.SurfaceHeightPairScore_swigregister(SurfaceHeightPairScore)
10589 class SurfaceDepthPairScore(IMP.PairScore):
10590  r"""Proxy of C++ IMP::core::SurfaceDepthPairScore class."""
10591 
10592  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10593 
10594  def __init__(self, *args):
10595  r"""__init__(SurfaceDepthPairScore self, UnaryFunction uf, std::string name="SurfaceDepthPairScore%1%") -> SurfaceDepthPairScore"""
10596  _IMP_core.SurfaceDepthPairScore_swiginit(self, _IMP_core.new_SurfaceDepthPairScore(*args))
10597 
10598  def do_get_inputs(self, m, pis):
10599  r"""do_get_inputs(SurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10600  return _IMP_core.SurfaceDepthPairScore_do_get_inputs(self, m, pis)
10601 
10602  def get_version_info(self):
10603  r"""get_version_info(SurfaceDepthPairScore self) -> VersionInfo"""
10604  return _IMP_core.SurfaceDepthPairScore_get_version_info(self)
10605  __swig_destroy__ = _IMP_core.delete_SurfaceDepthPairScore
10606 
10607  def __str__(self):
10608  r"""__str__(SurfaceDepthPairScore self) -> std::string"""
10609  return _IMP_core.SurfaceDepthPairScore___str__(self)
10610 
10611  def __repr__(self):
10612  r"""__repr__(SurfaceDepthPairScore self) -> std::string"""
10613  return _IMP_core.SurfaceDepthPairScore___repr__(self)
10614 
10615  @staticmethod
10616  def get_from(o):
10617  return _object_cast_to_SurfaceDepthPairScore(o)
10618 
10619 
10620 # Register SurfaceDepthPairScore in _IMP_core:
10621 _IMP_core.SurfaceDepthPairScore_swigregister(SurfaceDepthPairScore)
10622 class HarmonicSurfaceDistancePairScore(IMP.PairScore):
10623  r"""Proxy of C++ IMP::core::HarmonicSurfaceDistancePairScore class."""
10624 
10625  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10626 
10627  def __init__(self, *args):
10628  r"""__init__(HarmonicSurfaceDistancePairScore self, double x0, double k, std::string name="HarmonicSurfaceDistancePairScore%1%") -> HarmonicSurfaceDistancePairScore"""
10629  _IMP_core.HarmonicSurfaceDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDistancePairScore(*args))
10630 
10631  def do_get_inputs(self, m, pis):
10632  r"""do_get_inputs(HarmonicSurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10633  return _IMP_core.HarmonicSurfaceDistancePairScore_do_get_inputs(self, m, pis)
10634 
10635  def get_version_info(self):
10636  r"""get_version_info(HarmonicSurfaceDistancePairScore self) -> VersionInfo"""
10637  return _IMP_core.HarmonicSurfaceDistancePairScore_get_version_info(self)
10638  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDistancePairScore
10639 
10640  def __str__(self):
10641  r"""__str__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10642  return _IMP_core.HarmonicSurfaceDistancePairScore___str__(self)
10643 
10644  def __repr__(self):
10645  r"""__repr__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10646  return _IMP_core.HarmonicSurfaceDistancePairScore___repr__(self)
10647 
10648  @staticmethod
10649  def get_from(o):
10650  return _object_cast_to_HarmonicSurfaceDistancePairScore(o)
10651 
10652 
10653 # Register HarmonicSurfaceDistancePairScore in _IMP_core:
10654 _IMP_core.HarmonicSurfaceDistancePairScore_swigregister(HarmonicSurfaceDistancePairScore)
10655 class HarmonicSurfaceHeightPairScore(IMP.PairScore):
10656  r"""Proxy of C++ IMP::core::HarmonicSurfaceHeightPairScore class."""
10657 
10658  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10659 
10660  def __init__(self, *args):
10661  r"""__init__(HarmonicSurfaceHeightPairScore self, double x0, double k, std::string name="HarmonicSurfaceHeightPairScore%1%") -> HarmonicSurfaceHeightPairScore"""
10662  _IMP_core.HarmonicSurfaceHeightPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceHeightPairScore(*args))
10663 
10664  def do_get_inputs(self, m, pis):
10665  r"""do_get_inputs(HarmonicSurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10666  return _IMP_core.HarmonicSurfaceHeightPairScore_do_get_inputs(self, m, pis)
10667 
10668  def get_version_info(self):
10669  r"""get_version_info(HarmonicSurfaceHeightPairScore self) -> VersionInfo"""
10670  return _IMP_core.HarmonicSurfaceHeightPairScore_get_version_info(self)
10671  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceHeightPairScore
10672 
10673  def __str__(self):
10674  r"""__str__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10675  return _IMP_core.HarmonicSurfaceHeightPairScore___str__(self)
10676 
10677  def __repr__(self):
10678  r"""__repr__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10679  return _IMP_core.HarmonicSurfaceHeightPairScore___repr__(self)
10680 
10681  @staticmethod
10682  def get_from(o):
10683  return _object_cast_to_HarmonicSurfaceHeightPairScore(o)
10684 
10685 
10686 # Register HarmonicSurfaceHeightPairScore in _IMP_core:
10687 _IMP_core.HarmonicSurfaceHeightPairScore_swigregister(HarmonicSurfaceHeightPairScore)
10688 class HarmonicSurfaceDepthPairScore(IMP.PairScore):
10689  r"""Proxy of C++ IMP::core::HarmonicSurfaceDepthPairScore class."""
10690 
10691  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10692 
10693  def __init__(self, *args):
10694  r"""__init__(HarmonicSurfaceDepthPairScore self, double x0, double k, std::string name="HarmonicSurfaceDepthPairScore%1%") -> HarmonicSurfaceDepthPairScore"""
10695  _IMP_core.HarmonicSurfaceDepthPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDepthPairScore(*args))
10696 
10697  def do_get_inputs(self, m, pis):
10698  r"""do_get_inputs(HarmonicSurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10699  return _IMP_core.HarmonicSurfaceDepthPairScore_do_get_inputs(self, m, pis)
10700 
10701  def get_version_info(self):
10702  r"""get_version_info(HarmonicSurfaceDepthPairScore self) -> VersionInfo"""
10703  return _IMP_core.HarmonicSurfaceDepthPairScore_get_version_info(self)
10704  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDepthPairScore
10705 
10706  def __str__(self):
10707  r"""__str__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10708  return _IMP_core.HarmonicSurfaceDepthPairScore___str__(self)
10709 
10710  def __repr__(self):
10711  r"""__repr__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10712  return _IMP_core.HarmonicSurfaceDepthPairScore___repr__(self)
10713 
10714  @staticmethod
10715  def get_from(o):
10716  return _object_cast_to_HarmonicSurfaceDepthPairScore(o)
10717 
10718 
10719 # Register HarmonicSurfaceDepthPairScore in _IMP_core:
10720 _IMP_core.HarmonicSurfaceDepthPairScore_swigregister(HarmonicSurfaceDepthPairScore)
10721 class SoftSuperSurfacePairScore(IMP.PairScore):
10722  r"""Proxy of C++ IMP::core::SoftSuperSurfacePairScore class."""
10723 
10724  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10725 
10726  def __init__(self, *args):
10727  r"""__init__(SoftSuperSurfacePairScore self, double k, std::string name="SoftSuperSurfacePairScore%1%") -> SoftSuperSurfacePairScore"""
10728  _IMP_core.SoftSuperSurfacePairScore_swiginit(self, _IMP_core.new_SoftSuperSurfacePairScore(*args))
10729 
10730  def do_get_inputs(self, m, pis):
10731  r"""do_get_inputs(SoftSuperSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10732  return _IMP_core.SoftSuperSurfacePairScore_do_get_inputs(self, m, pis)
10733 
10734  def get_version_info(self):
10735  r"""get_version_info(SoftSuperSurfacePairScore self) -> VersionInfo"""
10736  return _IMP_core.SoftSuperSurfacePairScore_get_version_info(self)
10737  __swig_destroy__ = _IMP_core.delete_SoftSuperSurfacePairScore
10738 
10739  def __str__(self):
10740  r"""__str__(SoftSuperSurfacePairScore self) -> std::string"""
10741  return _IMP_core.SoftSuperSurfacePairScore___str__(self)
10742 
10743  def __repr__(self):
10744  r"""__repr__(SoftSuperSurfacePairScore self) -> std::string"""
10745  return _IMP_core.SoftSuperSurfacePairScore___repr__(self)
10746 
10747  @staticmethod
10748  def get_from(o):
10749  return _object_cast_to_SoftSuperSurfacePairScore(o)
10750 
10751 
10752 # Register SoftSuperSurfacePairScore in _IMP_core:
10753 _IMP_core.SoftSuperSurfacePairScore_swigregister(SoftSuperSurfacePairScore)
10754 class SoftSubSurfacePairScore(IMP.PairScore):
10755  r"""Proxy of C++ IMP::core::SoftSubSurfacePairScore class."""
10756 
10757  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10758 
10759  def __init__(self, *args):
10760  r"""__init__(SoftSubSurfacePairScore self, double k, std::string name="SoftSubSurfacePairScore%1%") -> SoftSubSurfacePairScore"""
10761  _IMP_core.SoftSubSurfacePairScore_swiginit(self, _IMP_core.new_SoftSubSurfacePairScore(*args))
10762 
10763  def do_get_inputs(self, m, pis):
10764  r"""do_get_inputs(SoftSubSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10765  return _IMP_core.SoftSubSurfacePairScore_do_get_inputs(self, m, pis)
10766 
10767  def get_version_info(self):
10768  r"""get_version_info(SoftSubSurfacePairScore self) -> VersionInfo"""
10769  return _IMP_core.SoftSubSurfacePairScore_get_version_info(self)
10770  __swig_destroy__ = _IMP_core.delete_SoftSubSurfacePairScore
10771 
10772  def __str__(self):
10773  r"""__str__(SoftSubSurfacePairScore self) -> std::string"""
10774  return _IMP_core.SoftSubSurfacePairScore___str__(self)
10775 
10776  def __repr__(self):
10777  r"""__repr__(SoftSubSurfacePairScore self) -> std::string"""
10778  return _IMP_core.SoftSubSurfacePairScore___repr__(self)
10779 
10780  @staticmethod
10781  def get_from(o):
10782  return _object_cast_to_SoftSubSurfacePairScore(o)
10783 
10784 
10785 # Register SoftSubSurfacePairScore in _IMP_core:
10786 _IMP_core.SoftSubSurfacePairScore_swigregister(SoftSubSurfacePairScore)
10787 class SurfaceTetheredChain(IMP.UnaryFunction):
10788  r"""Proxy of C++ IMP::core::SurfaceTetheredChain class."""
10789 
10790  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10791 
10792  def __init__(self, link_num, link_length):
10793  r"""__init__(SurfaceTetheredChain self, int link_num, double link_length) -> SurfaceTetheredChain"""
10794  _IMP_core.SurfaceTetheredChain_swiginit(self, _IMP_core.new_SurfaceTetheredChain(link_num, link_length))
10795 
10796  def get_version_info(self):
10797  r"""get_version_info(SurfaceTetheredChain self) -> VersionInfo"""
10798  return _IMP_core.SurfaceTetheredChain_get_version_info(self)
10799  __swig_destroy__ = _IMP_core.delete_SurfaceTetheredChain
10800 
10801  def get_link_number(self):
10802  r"""get_link_number(SurfaceTetheredChain self) -> int"""
10803  return _IMP_core.SurfaceTetheredChain_get_link_number(self)
10804 
10805  def get_link_length(self):
10806  r"""get_link_length(SurfaceTetheredChain self) -> double"""
10807  return _IMP_core.SurfaceTetheredChain_get_link_length(self)
10808 
10809  def set_link_number(self, N):
10810  r"""set_link_number(SurfaceTetheredChain self, int N)"""
10811  return _IMP_core.SurfaceTetheredChain_set_link_number(self, N)
10812 
10813  def set_link_length(self, b):
10814  r"""set_link_length(SurfaceTetheredChain self, double b)"""
10815  return _IMP_core.SurfaceTetheredChain_set_link_length(self, b)
10816 
10817  def get_distance_at_minimum(self):
10818  r"""get_distance_at_minimum(SurfaceTetheredChain self) -> double"""
10819  return _IMP_core.SurfaceTetheredChain_get_distance_at_minimum(self)
10820 
10821  def get_average_distance(self):
10822  r"""get_average_distance(SurfaceTetheredChain self) -> double"""
10823  return _IMP_core.SurfaceTetheredChain_get_average_distance(self)
10824 
10825  def __str__(self):
10826  r"""__str__(SurfaceTetheredChain self) -> std::string"""
10827  return _IMP_core.SurfaceTetheredChain___str__(self)
10828 
10829  def __repr__(self):
10830  r"""__repr__(SurfaceTetheredChain self) -> std::string"""
10831  return _IMP_core.SurfaceTetheredChain___repr__(self)
10832 
10833  @staticmethod
10834  def get_from(o):
10835  return _object_cast_to_SurfaceTetheredChain(o)
10836 
10837 
10838 # Register SurfaceTetheredChain in _IMP_core:
10839 _IMP_core.SurfaceTetheredChain_swigregister(SurfaceTetheredChain)
10840 class SurfaceSymmetryConstraint(IMP.Constraint):
10841  r"""Proxy of C++ IMP::core::SurfaceSymmetryConstraint class."""
10842 
10843  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10844 
10845  def __init__(self, m, ss, rbs):
10846  r"""__init__(SurfaceSymmetryConstraint self, Model m, IMP::ParticleIndexPair const & ss, IMP::ParticleIndexPair const & rbs) -> SurfaceSymmetryConstraint"""
10847  _IMP_core.SurfaceSymmetryConstraint_swiginit(self, _IMP_core.new_SurfaceSymmetryConstraint(m, ss, rbs))
10848 
10849  def do_get_inputs(self):
10850  r"""do_get_inputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
10851  return _IMP_core.SurfaceSymmetryConstraint_do_get_inputs(self)
10852 
10853  def do_get_outputs(self):
10854  r"""do_get_outputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
10855  return _IMP_core.SurfaceSymmetryConstraint_do_get_outputs(self)
10856 
10857  def get_version_info(self):
10858  r"""get_version_info(SurfaceSymmetryConstraint self) -> VersionInfo"""
10859  return _IMP_core.SurfaceSymmetryConstraint_get_version_info(self)
10860  __swig_destroy__ = _IMP_core.delete_SurfaceSymmetryConstraint
10861 
10862  def __str__(self):
10863  r"""__str__(SurfaceSymmetryConstraint self) -> std::string"""
10864  return _IMP_core.SurfaceSymmetryConstraint___str__(self)
10865 
10866  def __repr__(self):
10867  r"""__repr__(SurfaceSymmetryConstraint self) -> std::string"""
10868  return _IMP_core.SurfaceSymmetryConstraint___repr__(self)
10869 
10870  @staticmethod
10871  def get_from(o):
10872  return _object_cast_to_SurfaceSymmetryConstraint(o)
10873 
10874 
10875 # Register SurfaceSymmetryConstraint in _IMP_core:
10876 _IMP_core.SurfaceSymmetryConstraint_swigregister(SurfaceSymmetryConstraint)
10877 class SteepestDescent(IMP.AttributeOptimizer):
10878  r"""Proxy of C++ IMP::core::SteepestDescent class."""
10879 
10880  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10881 
10882  def __init__(self, *args):
10883  r"""__init__(SteepestDescent self, Model m, std::string name="SteepestDescent%1%") -> SteepestDescent"""
10884  _IMP_core.SteepestDescent_swiginit(self, _IMP_core.new_SteepestDescent(*args))
10885 
10886  def do_optimize(self, max_steps):
10887  r"""do_optimize(SteepestDescent self, unsigned int max_steps) -> IMP::Float"""
10888  return _IMP_core.SteepestDescent_do_optimize(self, max_steps)
10889 
10890  def get_version_info(self):
10891  r"""get_version_info(SteepestDescent self) -> VersionInfo"""
10892  return _IMP_core.SteepestDescent_get_version_info(self)
10893  __swig_destroy__ = _IMP_core.delete_SteepestDescent
10894 
10895  def set_threshold(self, t):
10896  r"""set_threshold(SteepestDescent self, IMP::Float t)"""
10897  return _IMP_core.SteepestDescent_set_threshold(self, t)
10898 
10899  def set_step_size(self, t):
10900  r"""set_step_size(SteepestDescent self, IMP::Float t)"""
10901  return _IMP_core.SteepestDescent_set_step_size(self, t)
10902 
10903  def set_maximum_step_size(self, t):
10904  r"""set_maximum_step_size(SteepestDescent self, IMP::Float t)"""
10905  return _IMP_core.SteepestDescent_set_maximum_step_size(self, t)
10906 
10907  def __str__(self):
10908  r"""__str__(SteepestDescent self) -> std::string"""
10909  return _IMP_core.SteepestDescent___str__(self)
10910 
10911  def __repr__(self):
10912  r"""__repr__(SteepestDescent self) -> std::string"""
10913  return _IMP_core.SteepestDescent___repr__(self)
10914 
10915  @staticmethod
10916  def get_from(o):
10917  return _object_cast_to_SteepestDescent(o)
10918 
10919 
10920 # Register SteepestDescent in _IMP_core:
10921 _IMP_core.SteepestDescent_swigregister(SteepestDescent)
10922 class TransformedDistancePairScore(IMP.PairScore):
10923  r"""Proxy of C++ IMP::core::TransformedDistancePairScore class."""
10924 
10925  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10926 
10927  def __init__(self, f, transformation):
10928  r"""__init__(TransformedDistancePairScore self, UnaryFunction f, Transformation3D transformation) -> TransformedDistancePairScore"""
10929  _IMP_core.TransformedDistancePairScore_swiginit(self, _IMP_core.new_TransformedDistancePairScore(f, transformation))
10930 
10931  def set_transformation(self, rot):
10932  r"""set_transformation(TransformedDistancePairScore self, Transformation3D rot)"""
10933  return _IMP_core.TransformedDistancePairScore_set_transformation(self, rot)
10934 
10935  def do_get_inputs(self, m, pis):
10936  r"""do_get_inputs(TransformedDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10937  return _IMP_core.TransformedDistancePairScore_do_get_inputs(self, m, pis)
10938 
10939  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10940  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"""
10941  return _IMP_core.TransformedDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10942 
10943  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10944  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"""
10945  return _IMP_core.TransformedDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10946 
10947  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10948  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"""
10949  return _IMP_core.TransformedDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10950 
10951  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10952  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"""
10953  return _IMP_core.TransformedDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10954 
10955  def get_version_info(self):
10956  r"""get_version_info(TransformedDistancePairScore self) -> VersionInfo"""
10957  return _IMP_core.TransformedDistancePairScore_get_version_info(self)
10958  __swig_destroy__ = _IMP_core.delete_TransformedDistancePairScore
10959 
10960  def __str__(self):
10961  r"""__str__(TransformedDistancePairScore self) -> std::string"""
10962  return _IMP_core.TransformedDistancePairScore___str__(self)
10963 
10964  def __repr__(self):
10965  r"""__repr__(TransformedDistancePairScore self) -> std::string"""
10966  return _IMP_core.TransformedDistancePairScore___repr__(self)
10967 
10968  @staticmethod
10969  def get_from(o):
10970  return _object_cast_to_TransformedDistancePairScore(o)
10971 
10972 
10973 # Register TransformedDistancePairScore in _IMP_core:
10974 _IMP_core.TransformedDistancePairScore_swigregister(TransformedDistancePairScore)
10975 class TypedPairScore(IMP.PairScore):
10976  r"""Proxy of C++ IMP::core::TypedPairScore class."""
10977 
10978  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10979 
10980  def __init__(self, typekey, allow_invalid_types=True):
10981  r"""__init__(TypedPairScore self, IntKey typekey, bool allow_invalid_types=True) -> TypedPairScore"""
10982  _IMP_core.TypedPairScore_swiginit(self, _IMP_core.new_TypedPairScore(typekey, allow_invalid_types))
10983 
10984  def set_particle_type(self, arg2):
10985  r"""set_particle_type(TypedPairScore self, Particle arg2)"""
10986  return _IMP_core.TypedPairScore_set_particle_type(self, arg2)
10987 
10988  def set_pair_score(self, ps, atype, btype):
10989  r"""set_pair_score(TypedPairScore self, PairScore ps, IMP::Int atype, IMP::Int btype)"""
10990  return _IMP_core.TypedPairScore_set_pair_score(self, ps, atype, btype)
10991 
10992  def do_get_inputs(self, m, pis):
10993  r"""do_get_inputs(TypedPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10994  return _IMP_core.TypedPairScore_do_get_inputs(self, m, pis)
10995 
10996  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10997  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"""
10998  return _IMP_core.TypedPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10999 
11000  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11001  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"""
11002  return _IMP_core.TypedPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11003 
11004  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11005  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"""
11006  return _IMP_core.TypedPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11007 
11008  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11009  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"""
11010  return _IMP_core.TypedPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11011 
11012  def get_version_info(self):
11013  r"""get_version_info(TypedPairScore self) -> VersionInfo"""
11014  return _IMP_core.TypedPairScore_get_version_info(self)
11015  __swig_destroy__ = _IMP_core.delete_TypedPairScore
11016 
11017  def __str__(self):
11018  r"""__str__(TypedPairScore self) -> std::string"""
11019  return _IMP_core.TypedPairScore___str__(self)
11020 
11021  def __repr__(self):
11022  r"""__repr__(TypedPairScore self) -> std::string"""
11023  return _IMP_core.TypedPairScore___repr__(self)
11024 
11025  @staticmethod
11026  def get_from(o):
11027  return _object_cast_to_TypedPairScore(o)
11028 
11029 
11030 # Register TypedPairScore in _IMP_core:
11031 _IMP_core.TypedPairScore_swigregister(TypedPairScore)
11032 class RigidBodyDistancePairScore(KClosePairsPairScore):
11033  r"""Proxy of C++ IMP::core::RigidBodyDistancePairScore class."""
11034 
11035  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11036 
11037  def __init__(self, ps, r):
11038  r"""__init__(RigidBodyDistancePairScore self, PairScore ps, Refiner r) -> RigidBodyDistancePairScore"""
11039  _IMP_core.RigidBodyDistancePairScore_swiginit(self, _IMP_core.new_RigidBodyDistancePairScore(ps, r))
11040 
11041  def __str__(self):
11042  r"""__str__(RigidBodyDistancePairScore self) -> std::string"""
11043  return _IMP_core.RigidBodyDistancePairScore___str__(self)
11044 
11045  def __repr__(self):
11046  r"""__repr__(RigidBodyDistancePairScore self) -> std::string"""
11047  return _IMP_core.RigidBodyDistancePairScore___repr__(self)
11048 
11049  @staticmethod
11050  def get_from(o):
11051  return _object_cast_to_RigidBodyDistancePairScore(o)
11052 
11053  __swig_destroy__ = _IMP_core.delete_RigidBodyDistancePairScore
11054 
11055 # Register RigidBodyDistancePairScore in _IMP_core:
11056 _IMP_core.RigidBodyDistancePairScore_swigregister(RigidBodyDistancePairScore)
11057 class RigidBodyAnglePairScore(IMP.PairScore):
11058  r"""Proxy of C++ IMP::core::RigidBodyAnglePairScore class."""
11059 
11060  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11061 
11062  def __init__(self, f):
11063  r"""__init__(RigidBodyAnglePairScore self, UnaryFunction f) -> RigidBodyAnglePairScore"""
11064  _IMP_core.RigidBodyAnglePairScore_swiginit(self, _IMP_core.new_RigidBodyAnglePairScore(f))
11065 
11066  def do_get_inputs(self, m, pis):
11067  r"""do_get_inputs(RigidBodyAnglePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11068  return _IMP_core.RigidBodyAnglePairScore_do_get_inputs(self, m, pis)
11069 
11070  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11071  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"""
11072  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11073 
11074  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11075  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"""
11076  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11077 
11078  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11079  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"""
11080  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11081 
11082  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11083  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"""
11084  return _IMP_core.RigidBodyAnglePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11085 
11086  def get_version_info(self):
11087  r"""get_version_info(RigidBodyAnglePairScore self) -> VersionInfo"""
11088  return _IMP_core.RigidBodyAnglePairScore_get_version_info(self)
11089  __swig_destroy__ = _IMP_core.delete_RigidBodyAnglePairScore
11090 
11091  def __str__(self):
11092  r"""__str__(RigidBodyAnglePairScore self) -> std::string"""
11093  return _IMP_core.RigidBodyAnglePairScore___str__(self)
11094 
11095  def __repr__(self):
11096  r"""__repr__(RigidBodyAnglePairScore self) -> std::string"""
11097  return _IMP_core.RigidBodyAnglePairScore___repr__(self)
11098 
11099  @staticmethod
11100  def get_from(o):
11101  return _object_cast_to_RigidBodyAnglePairScore(o)
11102 
11103 
11104 # Register RigidBodyAnglePairScore in _IMP_core:
11105 _IMP_core.RigidBodyAnglePairScore_swigregister(RigidBodyAnglePairScore)
11106 class TableRefiner(IMP.Refiner):
11107  r"""Proxy of C++ IMP::core::TableRefiner class."""
11108 
11109  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11110 
11111  def __init__(self):
11112  r"""__init__(TableRefiner self) -> TableRefiner"""
11113  _IMP_core.TableRefiner_swiginit(self, _IMP_core.new_TableRefiner())
11114 
11115  def add_particle(self, p, ps):
11116  r"""add_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11117  return _IMP_core.TableRefiner_add_particle(self, p, ps)
11118 
11119  def remove_particle(self, p):
11120  r"""remove_particle(TableRefiner self, Particle p)"""
11121  return _IMP_core.TableRefiner_remove_particle(self, p)
11122 
11123  def set_particle(self, p, ps):
11124  r"""set_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11125  return _IMP_core.TableRefiner_set_particle(self, p, ps)
11126 
11127  def do_get_inputs(self, m, pis):
11128  r"""do_get_inputs(TableRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11129  return _IMP_core.TableRefiner_do_get_inputs(self, m, pis)
11130 
11131  def get_version_info(self):
11132  r"""get_version_info(TableRefiner self) -> VersionInfo"""
11133  return _IMP_core.TableRefiner_get_version_info(self)
11134  __swig_destroy__ = _IMP_core.delete_TableRefiner
11135 
11136  def __str__(self):
11137  r"""__str__(TableRefiner self) -> std::string"""
11138  return _IMP_core.TableRefiner___str__(self)
11139 
11140  def __repr__(self):
11141  r"""__repr__(TableRefiner self) -> std::string"""
11142  return _IMP_core.TableRefiner___repr__(self)
11143 
11144  @staticmethod
11145  def get_from(o):
11146  return _object_cast_to_TableRefiner(o)
11147 
11148 
11149 # Register TableRefiner in _IMP_core:
11150 _IMP_core.TableRefiner_swigregister(TableRefiner)
11151 LOWER = _IMP_core.LOWER
11152 
11153 BOTH = _IMP_core.BOTH
11154 
11155 UPPER = _IMP_core.UPPER
11156 
11157 class MCCGSampler(IMP.Sampler):
11158  r"""Proxy of C++ IMP::core::MCCGSampler class."""
11159 
11160  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11161 
11162  def __init__(self, *args):
11163  r"""__init__(MCCGSampler self, Model m, std::string name="MCCG Sampler %1%") -> MCCGSampler"""
11164  _IMP_core.MCCGSampler_swiginit(self, _IMP_core.new_MCCGSampler(*args))
11165 
11166  def set_bounding_box(self, bb):
11167  r"""set_bounding_box(MCCGSampler self, BoundingBox3D bb)"""
11168  return _IMP_core.MCCGSampler_set_bounding_box(self, bb)
11169 
11170  def set_number_of_attempts(self, att):
11171  r"""set_number_of_attempts(MCCGSampler self, unsigned int att)"""
11172  return _IMP_core.MCCGSampler_set_number_of_attempts(self, att)
11173 
11174  def set_number_of_monte_carlo_steps(self, cg):
11175  r"""set_number_of_monte_carlo_steps(MCCGSampler self, unsigned int cg)"""
11176  return _IMP_core.MCCGSampler_set_number_of_monte_carlo_steps(self, cg)
11177 
11178  def set_number_of_conjugate_gradient_steps(self, cg):
11179  r"""set_number_of_conjugate_gradient_steps(MCCGSampler self, unsigned int cg)"""
11180  return _IMP_core.MCCGSampler_set_number_of_conjugate_gradient_steps(self, cg)
11181 
11182  def set_max_monte_carlo_step_size(self, *args):
11183  r"""
11184  set_max_monte_carlo_step_size(MCCGSampler self, double d)
11185  set_max_monte_carlo_step_size(MCCGSampler self, FloatKey k, double d)
11186  """
11187  return _IMP_core.MCCGSampler_set_max_monte_carlo_step_size(self, *args)
11188 
11189  def set_is_refining(self, tf):
11190  r"""set_is_refining(MCCGSampler self, bool tf)"""
11191  return _IMP_core.MCCGSampler_set_is_refining(self, tf)
11192 
11193  def set_local_optimizer(self, opt):
11194  r"""set_local_optimizer(MCCGSampler self, Optimizer opt)"""
11195  return _IMP_core.MCCGSampler_set_local_optimizer(self, opt)
11196 
11197  def set_save_rejected_configurations(self, tf):
11198  r"""set_save_rejected_configurations(MCCGSampler self, bool tf)"""
11199  return _IMP_core.MCCGSampler_set_save_rejected_configurations(self, tf)
11200 
11201  def get_rejected_configurations(self):
11202  r"""get_rejected_configurations(MCCGSampler self) -> ConfigurationSet"""
11203  return _IMP_core.MCCGSampler_get_rejected_configurations(self)
11204  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)
11205  def __set_optimizer_states(self, obj): IMP._list_util.set_varlist(self.optimizer_states, obj)
11206  def __del_optimizer_states(self): IMP._list_util.del_varlist(self.optimizer_states)
11207  optimizer_states = property(__get_optimizer_states, __set_optimizer_states, __del_optimizer_states, doc="List of ##ucnames")
11208 
11209  def remove_optimizer_state(self, d):
11210  r"""remove_optimizer_state(MCCGSampler self, OptimizerState d)"""
11211  return _IMP_core.MCCGSampler_remove_optimizer_state(self, d)
11212 
11213  def _python_index_optimizer_state(self, d, start, stop):
11214  r"""_python_index_optimizer_state(MCCGSampler self, OptimizerState d, unsigned int start, unsigned int stop) -> unsigned int"""
11215  return _IMP_core.MCCGSampler__python_index_optimizer_state(self, d, start, stop)
11216 
11217  def remove_optimizer_states(self, d):
11218  r"""remove_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & d)"""
11219  return _IMP_core.MCCGSampler_remove_optimizer_states(self, d)
11220 
11221  def set_optimizer_states(self, ps):
11222  r"""set_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & ps)"""
11223  return _IMP_core.MCCGSampler_set_optimizer_states(self, ps)
11224 
11225  def set_optimizer_states_order(self, objs):
11226  r"""set_optimizer_states_order(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11227  return _IMP_core.MCCGSampler_set_optimizer_states_order(self, objs)
11228 
11229  def add_optimizer_state(self, obj):
11230  r"""add_optimizer_state(MCCGSampler self, OptimizerState obj) -> unsigned int"""
11231  return _IMP_core.MCCGSampler_add_optimizer_state(self, obj)
11232 
11233  def add_optimizer_states(self, objs):
11234  r"""add_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11235  return _IMP_core.MCCGSampler_add_optimizer_states(self, objs)
11236 
11237  def clear_optimizer_states(self):
11238  r"""clear_optimizer_states(MCCGSampler self)"""
11239  return _IMP_core.MCCGSampler_clear_optimizer_states(self)
11240 
11241  def get_number_of_optimizer_states(self):
11242  r"""get_number_of_optimizer_states(MCCGSampler self) -> unsigned int"""
11243  return _IMP_core.MCCGSampler_get_number_of_optimizer_states(self)
11244 
11245  def get_has_optimizer_states(self):
11246  r"""get_has_optimizer_states(MCCGSampler self) -> bool"""
11247  return _IMP_core.MCCGSampler_get_has_optimizer_states(self)
11248 
11249  def get_optimizer_state(self, i):
11250  r"""get_optimizer_state(MCCGSampler self, unsigned int i) -> OptimizerState"""
11251  return _IMP_core.MCCGSampler_get_optimizer_state(self, i)
11252 
11253  def get_optimizer_states(self):
11254  r"""get_optimizer_states(MCCGSampler self) -> IMP::OptimizerStates"""
11255  return _IMP_core.MCCGSampler_get_optimizer_states(self)
11256 
11257  def erase_optimizer_state(self, i):
11258  r"""erase_optimizer_state(MCCGSampler self, unsigned int i)"""
11259  return _IMP_core.MCCGSampler_erase_optimizer_state(self, i)
11260 
11261  def reserve_optimizer_states(self, sz):
11262  r"""reserve_optimizer_states(MCCGSampler self, unsigned int sz)"""
11263  return _IMP_core.MCCGSampler_reserve_optimizer_states(self, sz)
11264 
11265  def do_sample(self):
11266  r"""do_sample(MCCGSampler self) -> ConfigurationSet"""
11267  return _IMP_core.MCCGSampler_do_sample(self)
11268 
11269  def get_version_info(self):
11270  r"""get_version_info(MCCGSampler self) -> VersionInfo"""
11271  return _IMP_core.MCCGSampler_get_version_info(self)
11272  __swig_destroy__ = _IMP_core.delete_MCCGSampler
11273 
11274  def __str__(self):
11275  r"""__str__(MCCGSampler self) -> std::string"""
11276  return _IMP_core.MCCGSampler___str__(self)
11277 
11278  def __repr__(self):
11279  r"""__repr__(MCCGSampler self) -> std::string"""
11280  return _IMP_core.MCCGSampler___repr__(self)
11281 
11282  @staticmethod
11283  def get_from(o):
11284  return _object_cast_to_MCCGSampler(o)
11285 
11286 
11287 # Register MCCGSampler in _IMP_core:
11288 _IMP_core.MCCGSampler_swigregister(MCCGSampler)
11289 class MinimumRestraint(IMP.Restraint):
11290  r"""Proxy of C++ IMP::core::MinimumRestraint class."""
11291 
11292  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11293 
11294  def __init__(self, *args):
11295  r"""__init__(MinimumRestraint self, unsigned int num, IMP::Restraints const & rs=IMP::Restraints(), std::string name="MinimumRestraint %1%") -> MinimumRestraint"""
11296  _IMP_core.MinimumRestraint_swiginit(self, _IMP_core.new_MinimumRestraint(*args))
11297 
11298  def do_get_inputs(self):
11299  r"""do_get_inputs(MinimumRestraint self) -> IMP::ModelObjectsTemp"""
11300  return _IMP_core.MinimumRestraint_do_get_inputs(self)
11301 
11302  def get_version_info(self):
11303  r"""get_version_info(MinimumRestraint self) -> VersionInfo"""
11304  return _IMP_core.MinimumRestraint_get_version_info(self)
11305  __swig_destroy__ = _IMP_core.delete_MinimumRestraint
11306  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)
11307  def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
11308  def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
11309  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##ucnames")
11310 
11311  def remove_restraint(self, d):
11312  r"""remove_restraint(MinimumRestraint self, Restraint d)"""
11313  return _IMP_core.MinimumRestraint_remove_restraint(self, d)
11314 
11315  def _python_index_restraint(self, d, start, stop):
11316  r"""_python_index_restraint(MinimumRestraint self, Restraint d, unsigned int start, unsigned int stop) -> unsigned int"""
11317  return _IMP_core.MinimumRestraint__python_index_restraint(self, d, start, stop)
11318 
11319  def remove_restraints(self, d):
11320  r"""remove_restraints(MinimumRestraint self, IMP::Restraints const & d)"""
11321  return _IMP_core.MinimumRestraint_remove_restraints(self, d)
11322 
11323  def set_restraints(self, ps):
11324  r"""set_restraints(MinimumRestraint self, IMP::Restraints const & ps)"""
11325  return _IMP_core.MinimumRestraint_set_restraints(self, ps)
11326 
11327  def set_restraints_order(self, objs):
11328  r"""set_restraints_order(MinimumRestraint self, IMP::Restraints const & objs)"""
11329  return _IMP_core.MinimumRestraint_set_restraints_order(self, objs)
11330 
11331  def add_restraint(self, obj):
11332  r"""add_restraint(MinimumRestraint self, Restraint obj) -> unsigned int"""
11333  return _IMP_core.MinimumRestraint_add_restraint(self, obj)
11334 
11335  def add_restraints(self, objs):
11336  r"""add_restraints(MinimumRestraint self, IMP::Restraints const & objs)"""
11337  return _IMP_core.MinimumRestraint_add_restraints(self, objs)
11338 
11339  def clear_restraints(self):
11340  r"""clear_restraints(MinimumRestraint self)"""
11341  return _IMP_core.MinimumRestraint_clear_restraints(self)
11342 
11343  def get_number_of_restraints(self):
11344  r"""get_number_of_restraints(MinimumRestraint self) -> unsigned int"""
11345  return _IMP_core.MinimumRestraint_get_number_of_restraints(self)
11346 
11347  def get_has_restraints(self):
11348  r"""get_has_restraints(MinimumRestraint self) -> bool"""
11349  return _IMP_core.MinimumRestraint_get_has_restraints(self)
11350 
11351  def get_restraint(self, i):
11352  r"""get_restraint(MinimumRestraint self, unsigned int i) -> Restraint"""
11353  return _IMP_core.MinimumRestraint_get_restraint(self, i)
11354 
11355  def get_restraints(self):
11356  r"""get_restraints(MinimumRestraint self) -> IMP::Restraints"""
11357  return _IMP_core.MinimumRestraint_get_restraints(self)
11358 
11359  def erase_restraint(self, i):
11360  r"""erase_restraint(MinimumRestraint self, unsigned int i)"""
11361  return _IMP_core.MinimumRestraint_erase_restraint(self, i)
11362 
11363  def reserve_restraints(self, sz):
11364  r"""reserve_restraints(MinimumRestraint self, unsigned int sz)"""
11365  return _IMP_core.MinimumRestraint_reserve_restraints(self, sz)
11366 
11367  def __str__(self):
11368  r"""__str__(MinimumRestraint self) -> std::string"""
11369  return _IMP_core.MinimumRestraint___str__(self)
11370 
11371  def __repr__(self):
11372  r"""__repr__(MinimumRestraint self) -> std::string"""
11373  return _IMP_core.MinimumRestraint___repr__(self)
11374 
11375  @staticmethod
11376  def get_from(o):
11377  return _object_cast_to_MinimumRestraint(o)
11378 
11379 
11380 # Register MinimumRestraint in _IMP_core:
11381 _IMP_core.MinimumRestraint_swigregister(MinimumRestraint)
11382 class Gaussian(RigidBody):
11383  r"""Proxy of C++ IMP::core::Gaussian class."""
11384 
11385  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11386 
11387  def __init__(self, *args):
11388  r"""
11389  __init__(Gaussian self) -> Gaussian
11390  __init__(Gaussian self, Model m, ParticleIndex id) -> Gaussian
11391  __init__(Gaussian self, _ParticleAdaptor d) -> Gaussian
11392  """
11393  _IMP_core.Gaussian_swiginit(self, _IMP_core.new_Gaussian(*args))
11394 
11395  def show(self, *args):
11396  r"""show(Gaussian self, _ostream out=std::cout)"""
11397  return _IMP_core.Gaussian_show(self, *args)
11398 
11399  @staticmethod
11400  def setup_particle(*args):
11401  r"""
11402  setup_particle(Model m, ParticleIndex pi) -> Gaussian
11403  setup_particle(_ParticleAdaptor pa) -> Gaussian
11404  setup_particle(Model m, ParticleIndex pi, Gaussian3D g) -> Gaussian
11405  setup_particle(_ParticleAdaptor pa, Gaussian3D g) -> Gaussian
11406  """
11407  return _IMP_core.Gaussian_setup_particle(*args)
11408 
11409  @staticmethod
11410  def get_local_covariance_key():
11411  r"""get_local_covariance_key() -> ObjectKey"""
11412  return _IMP_core.Gaussian_get_local_covariance_key()
11413 
11414  @staticmethod
11415  def get_global_covariance_key():
11416  r"""get_global_covariance_key() -> ObjectKey"""
11417  return _IMP_core.Gaussian_get_global_covariance_key()
11418 
11419  @staticmethod
11420  def get_is_setup(*args):
11421  r"""
11422  get_is_setup(_ParticleAdaptor p) -> bool
11423  get_is_setup(Model m, ParticleIndex pi) -> bool
11424  """
11425  return _IMP_core.Gaussian_get_is_setup(*args)
11426 
11427  def get_local_covariance(self):
11428  r"""get_local_covariance(Gaussian self) -> Eigen::Matrix3d"""
11429  return _IMP_core.Gaussian_get_local_covariance(self)
11430 
11431  def get_variances(self):
11432  r"""get_variances(Gaussian self) -> Vector3D"""
11433  return _IMP_core.Gaussian_get_variances(self)
11434 
11435  def get_global_covariance(self):
11436  r"""get_global_covariance(Gaussian self) -> Eigen::Matrix3d"""
11437  return _IMP_core.Gaussian_get_global_covariance(self)
11438 
11439  def get_gaussian(self):
11440  r"""get_gaussian(Gaussian self) -> Gaussian3D"""
11441  return _IMP_core.Gaussian_get_gaussian(self)
11442 
11443  def set_gaussian(self, g):
11444  r"""set_gaussian(Gaussian self, Gaussian3D g)"""
11445  return _IMP_core.Gaussian_set_gaussian(self, g)
11446 
11447  def set_local_covariance(self, covar):
11448  r"""set_local_covariance(Gaussian self, Eigen::Vector3d const covar)"""
11449  return _IMP_core.Gaussian_set_local_covariance(self, covar)
11450 
11451  def set_variances(self, v):
11452  r"""set_variances(Gaussian self, Vector3D v)"""
11453  return _IMP_core.Gaussian_set_variances(self, v)
11454 
11455  def set_global_covariance(self, covar):
11456  r"""set_global_covariance(Gaussian self, Eigen::Matrix3d covar)"""
11457  return _IMP_core.Gaussian_set_global_covariance(self, covar)
11458 
11459  def update_global_covariance(self):
11460  r"""update_global_covariance(Gaussian self)"""
11461  return _IMP_core.Gaussian_update_global_covariance(self)
11462 
11463  def add_attribute(self, *args):
11464  r"""
11465  add_attribute(Gaussian self, FloatKey k, IMP::Float v, bool opt)
11466  add_attribute(Gaussian self, FloatKey a0, IMP::Float a1)
11467  add_attribute(Gaussian self, IntKey a0, IMP::Int a1)
11468  add_attribute(Gaussian self, FloatsKey a0, IMP::Floats a1)
11469  add_attribute(Gaussian self, IntsKey a0, IMP::Ints a1)
11470  add_attribute(Gaussian self, StringKey a0, IMP::String a1)
11471  add_attribute(Gaussian self, ParticleIndexKey a0, Particle a1)
11472  add_attribute(Gaussian self, ObjectKey a0, Object a1)
11473  add_attribute(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11474  add_attribute(Gaussian self, SparseIntKey a0, IMP::Int a1)
11475  add_attribute(Gaussian self, SparseStringKey a0, IMP::String a1)
11476  add_attribute(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11477  """
11478  return _IMP_core.Gaussian_add_attribute(self, *args)
11479 
11480  def get_value(self, *args):
11481  r"""
11482  get_value(Gaussian self, FloatKey a0) -> IMP::Float
11483  get_value(Gaussian self, IntKey a0) -> IMP::Int
11484  get_value(Gaussian self, FloatsKey a0) -> IMP::Floats
11485  get_value(Gaussian self, IntsKey a0) -> IMP::Ints
11486  get_value(Gaussian self, StringKey a0) -> IMP::String
11487  get_value(Gaussian self, ParticleIndexKey a0) -> Particle
11488  get_value(Gaussian self, ObjectKey a0) -> Object
11489  get_value(Gaussian self, SparseFloatKey a0) -> IMP::Float
11490  get_value(Gaussian self, SparseIntKey a0) -> IMP::Int
11491  get_value(Gaussian self, SparseStringKey a0) -> IMP::String
11492  get_value(Gaussian self, SparseParticleIndexKey a0) -> ParticleIndex
11493  """
11494  return _IMP_core.Gaussian_get_value(self, *args)
11495 
11496  def set_value(self, *args):
11497  r"""
11498  set_value(Gaussian self, FloatKey a0, IMP::Float a1)
11499  set_value(Gaussian self, IntKey a0, IMP::Int a1)
11500  set_value(Gaussian self, FloatsKey a0, IMP::Floats a1)
11501  set_value(Gaussian self, IntsKey a0, IMP::Ints a1)
11502  set_value(Gaussian self, StringKey a0, IMP::String a1)
11503  set_value(Gaussian self, ParticleIndexKey a0, Particle a1)
11504  set_value(Gaussian self, ObjectKey a0, Object a1)
11505  set_value(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11506  set_value(Gaussian self, SparseIntKey a0, IMP::Int a1)
11507  set_value(Gaussian self, SparseStringKey a0, IMP::String a1)
11508  set_value(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11509  """
11510  return _IMP_core.Gaussian_set_value(self, *args)
11511 
11512  def remove_attribute(self, *args):
11513  r"""
11514  remove_attribute(Gaussian self, FloatKey a0)
11515  remove_attribute(Gaussian self, IntKey a0)
11516  remove_attribute(Gaussian self, FloatsKey a0)
11517  remove_attribute(Gaussian self, IntsKey a0)
11518  remove_attribute(Gaussian self, StringKey a0)
11519  remove_attribute(Gaussian self, ParticleIndexKey a0)
11520  remove_attribute(Gaussian self, ObjectKey a0)
11521  remove_attribute(Gaussian self, SparseFloatKey a0)
11522  remove_attribute(Gaussian self, SparseIntKey a0)
11523  remove_attribute(Gaussian self, SparseStringKey a0)
11524  remove_attribute(Gaussian self, SparseParticleIndexKey a0)
11525  """
11526  return _IMP_core.Gaussian_remove_attribute(self, *args)
11527 
11528  def has_attribute(self, *args):
11529  r"""
11530  has_attribute(Gaussian self, FloatKey a0) -> bool
11531  has_attribute(Gaussian self, IntKey a0) -> bool
11532  has_attribute(Gaussian self, FloatsKey a0) -> bool
11533  has_attribute(Gaussian self, IntsKey a0) -> bool
11534  has_attribute(Gaussian self, StringKey a0) -> bool
11535  has_attribute(Gaussian self, ParticleIndexKey a0) -> bool
11536  has_attribute(Gaussian self, ObjectKey a0) -> bool
11537  has_attribute(Gaussian self, SparseFloatKey a0) -> bool
11538  has_attribute(Gaussian self, SparseIntKey a0) -> bool
11539  has_attribute(Gaussian self, SparseStringKey a0) -> bool
11540  has_attribute(Gaussian self, SparseParticleIndexKey a0) -> bool
11541  """
11542  return _IMP_core.Gaussian_has_attribute(self, *args)
11543 
11544  def get_derivative(self, a0):
11545  r"""get_derivative(Gaussian self, FloatKey a0) -> double"""
11546  return _IMP_core.Gaussian_get_derivative(self, a0)
11547 
11548  def get_name(self):
11549  r"""get_name(Gaussian self) -> std::string"""
11550  return _IMP_core.Gaussian_get_name(self)
11551 
11552  def clear_caches(self):
11553  r"""clear_caches(Gaussian self)"""
11554  return _IMP_core.Gaussian_clear_caches(self)
11555 
11556  def set_name(self, a0):
11557  r"""set_name(Gaussian self, std::string a0)"""
11558  return _IMP_core.Gaussian_set_name(self, a0)
11559 
11560  def set_check_level(self, a0):
11561  r"""set_check_level(Gaussian self, IMP::CheckLevel a0)"""
11562  return _IMP_core.Gaussian_set_check_level(self, a0)
11563 
11564  def add_to_derivative(self, a0, a1, a2):
11565  r"""add_to_derivative(Gaussian self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
11566  return _IMP_core.Gaussian_add_to_derivative(self, a0, a1, a2)
11567 
11568  def set_is_optimized(self, a0, a1):
11569  r"""set_is_optimized(Gaussian self, FloatKey a0, bool a1)"""
11570  return _IMP_core.Gaussian_set_is_optimized(self, a0, a1)
11571 
11572  def get_is_optimized(self, a0):
11573  r"""get_is_optimized(Gaussian self, FloatKey a0) -> bool"""
11574  return _IMP_core.Gaussian_get_is_optimized(self, a0)
11575 
11576  def get_check_level(self):
11577  r"""get_check_level(Gaussian self) -> IMP::CheckLevel"""
11578  return _IMP_core.Gaussian_get_check_level(self)
11579 
11580  def __eq__(self, *args):
11581  r"""
11582  __eq__(Gaussian self, Gaussian o) -> bool
11583  __eq__(Gaussian self, Particle d) -> bool
11584  """
11585  return _IMP_core.Gaussian___eq__(self, *args)
11586 
11587  def __ne__(self, *args):
11588  r"""
11589  __ne__(Gaussian self, Gaussian o) -> bool
11590  __ne__(Gaussian self, Particle d) -> bool
11591  """
11592  return _IMP_core.Gaussian___ne__(self, *args)
11593 
11594  def __le__(self, *args):
11595  r"""
11596  __le__(Gaussian self, Gaussian o) -> bool
11597  __le__(Gaussian self, Particle d) -> bool
11598  """
11599  return _IMP_core.Gaussian___le__(self, *args)
11600 
11601  def __lt__(self, *args):
11602  r"""
11603  __lt__(Gaussian self, Gaussian o) -> bool
11604  __lt__(Gaussian self, Particle d) -> bool
11605  """
11606  return _IMP_core.Gaussian___lt__(self, *args)
11607 
11608  def __ge__(self, *args):
11609  r"""
11610  __ge__(Gaussian self, Gaussian o) -> bool
11611  __ge__(Gaussian self, Particle d) -> bool
11612  """
11613  return _IMP_core.Gaussian___ge__(self, *args)
11614 
11615  def __gt__(self, *args):
11616  r"""
11617  __gt__(Gaussian self, Gaussian o) -> bool
11618  __gt__(Gaussian self, Particle d) -> bool
11619  """
11620  return _IMP_core.Gaussian___gt__(self, *args)
11621 
11622  def __hash__(self):
11623  r"""__hash__(Gaussian self) -> std::size_t"""
11624  return _IMP_core.Gaussian___hash__(self)
11625 
11626  def __str__(self):
11627  r"""__str__(Gaussian self) -> std::string"""
11628  return _IMP_core.Gaussian___str__(self)
11629 
11630  def __repr__(self):
11631  r"""__repr__(Gaussian self) -> std::string"""
11632  return _IMP_core.Gaussian___repr__(self)
11633 
11634  def _get_as_binary(self):
11635  r"""_get_as_binary(Gaussian self) -> PyObject *"""
11636  return _IMP_core.Gaussian__get_as_binary(self)
11637 
11638  def _set_from_binary(self, p):
11639  r"""_set_from_binary(Gaussian self, PyObject * p)"""
11640  return _IMP_core.Gaussian__set_from_binary(self, p)
11641 
11642  def __getstate__(self):
11643  p = self._get_as_binary()
11644  if len(self.__dict__) > 1:
11645  d = self.__dict__.copy()
11646  del d['this']
11647  p = (d, p)
11648  return p
11649 
11650  def __setstate__(self, p):
11651  if not hasattr(self, 'this'):
11652  self.__init__()
11653  if isinstance(p, tuple):
11654  d, p = p
11655  self.__dict__.update(d)
11656  return self._set_from_binary(p)
11657 
11658  __swig_destroy__ = _IMP_core.delete_Gaussian
11659 
11660 # Register Gaussian in _IMP_core:
11661 _IMP_core.Gaussian_swigregister(Gaussian)
11662 class PairRestraint(IMP.Restraint):
11663  r"""Proxy of C++ IMP::core::PairRestraint class."""
11664 
11665  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11666 
11667  def __init__(self, *args):
11668  r"""
11669  __init__(PairRestraint self, Model m, PairScore ss, IMP::ParticleIndexPair const & vt, std::string name="PairRestraint %1%") -> PairRestraint
11670  __init__(PairRestraint self) -> PairRestraint
11671  """
11672  _IMP_core.PairRestraint_swiginit(self, _IMP_core.new_PairRestraint(*args))
11673 
11674  def get_score_object(self):
11675  r"""get_score_object(PairRestraint self) -> PairScore"""
11676  return _IMP_core.PairRestraint_get_score_object(self)
11677 
11678  def get_index(self):
11679  r"""get_index(PairRestraint self) -> IMP::PairScore::IndexArgument"""
11680  return _IMP_core.PairRestraint_get_index(self)
11681 
11682  def get_version_info(self):
11683  r"""get_version_info(PairRestraint self) -> VersionInfo"""
11684  return _IMP_core.PairRestraint_get_version_info(self)
11685  __swig_destroy__ = _IMP_core.delete_PairRestraint
11686 
11687  def __str__(self):
11688  r"""__str__(PairRestraint self) -> std::string"""
11689  return _IMP_core.PairRestraint___str__(self)
11690 
11691  def __repr__(self):
11692  r"""__repr__(PairRestraint self) -> std::string"""
11693  return _IMP_core.PairRestraint___repr__(self)
11694 
11695  @staticmethod
11696  def get_from(o):
11697  return _object_cast_to_PairRestraint(o)
11698 
11699 
11700  def _get_as_binary(self):
11701  r"""_get_as_binary(PairRestraint self) -> PyObject *"""
11702  return _IMP_core.PairRestraint__get_as_binary(self)
11703 
11704  def _set_from_binary(self, p):
11705  r"""_set_from_binary(PairRestraint self, PyObject * p)"""
11706  return _IMP_core.PairRestraint__set_from_binary(self, p)
11707 
11708  def __getstate__(self):
11709  p = self._get_as_binary()
11710  if len(self.__dict__) > 1:
11711  d = self.__dict__.copy()
11712  del d['this']
11713  p = (d, p)
11714  return p
11715 
11716  def __setstate__(self, p):
11717  if not hasattr(self, 'this'):
11718  self.__init__()
11719  if isinstance(p, tuple):
11720  d, p = p
11721  self.__dict__.update(d)
11722  return self._set_from_binary(p)
11723 
11724 
11725  def _get_jax(self):
11726  from . import _jax_util
11727  return _jax_util._get_jax_restraint(self)
11728 
11729 
11730 # Register PairRestraint in _IMP_core:
11731 _IMP_core.PairRestraint_swigregister(PairRestraint)
11732 class SingletonRestraint(IMP.Restraint):
11733  r"""Proxy of C++ IMP::core::SingletonRestraint class."""
11734 
11735  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11736 
11737  def __init__(self, *args):
11738  r"""
11739  __init__(SingletonRestraint self, Model m, SingletonScore ss, ParticleIndex vt, std::string name="SingletonRestraint %1%") -> SingletonRestraint
11740  __init__(SingletonRestraint self) -> SingletonRestraint
11741  """
11742  _IMP_core.SingletonRestraint_swiginit(self, _IMP_core.new_SingletonRestraint(*args))
11743 
11744  def get_score_object(self):
11745  r"""get_score_object(SingletonRestraint self) -> SingletonScore"""
11746  return _IMP_core.SingletonRestraint_get_score_object(self)
11747 
11748  def get_index(self):
11749  r"""get_index(SingletonRestraint self) -> ParticleIndex"""
11750  return _IMP_core.SingletonRestraint_get_index(self)
11751 
11752  def get_version_info(self):
11753  r"""get_version_info(SingletonRestraint self) -> VersionInfo"""
11754  return _IMP_core.SingletonRestraint_get_version_info(self)
11755  __swig_destroy__ = _IMP_core.delete_SingletonRestraint
11756 
11757  def __str__(self):
11758  r"""__str__(SingletonRestraint self) -> std::string"""
11759  return _IMP_core.SingletonRestraint___str__(self)
11760 
11761  def __repr__(self):
11762  r"""__repr__(SingletonRestraint self) -> std::string"""
11763  return _IMP_core.SingletonRestraint___repr__(self)
11764 
11765  @staticmethod
11766  def get_from(o):
11767  return _object_cast_to_SingletonRestraint(o)
11768 
11769 
11770  def _get_as_binary(self):
11771  r"""_get_as_binary(SingletonRestraint self) -> PyObject *"""
11772  return _IMP_core.SingletonRestraint__get_as_binary(self)
11773 
11774  def _set_from_binary(self, p):
11775  r"""_set_from_binary(SingletonRestraint self, PyObject * p)"""
11776  return _IMP_core.SingletonRestraint__set_from_binary(self, p)
11777 
11778  def __getstate__(self):
11779  p = self._get_as_binary()
11780  if len(self.__dict__) > 1:
11781  d = self.__dict__.copy()
11782  del d['this']
11783  p = (d, p)
11784  return p
11785 
11786  def __setstate__(self, p):
11787  if not hasattr(self, 'this'):
11788  self.__init__()
11789  if isinstance(p, tuple):
11790  d, p = p
11791  self.__dict__.update(d)
11792  return self._set_from_binary(p)
11793 
11794 
11795  def _get_jax(self):
11796  from . import _jax_util
11797  return _jax_util._get_jax_restraint(self)
11798 
11799 
11800 # Register SingletonRestraint in _IMP_core:
11801 _IMP_core.SingletonRestraint_swigregister(SingletonRestraint)
11802 class TripletRestraint(IMP.Restraint):
11803  r"""Proxy of C++ IMP::core::TripletRestraint class."""
11804 
11805  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11806 
11807  def __init__(self, *args):
11808  r"""
11809  __init__(TripletRestraint self, Model m, TripletScore ss, IMP::ParticleIndexTriplet const & vt, std::string name="TripletRestraint %1%") -> TripletRestraint
11810  __init__(TripletRestraint self) -> TripletRestraint
11811  """
11812  _IMP_core.TripletRestraint_swiginit(self, _IMP_core.new_TripletRestraint(*args))
11813 
11814  def get_score_object(self):
11815  r"""get_score_object(TripletRestraint self) -> TripletScore"""
11816  return _IMP_core.TripletRestraint_get_score_object(self)
11817 
11818  def get_index(self):
11819  r"""get_index(TripletRestraint self) -> IMP::TripletScore::IndexArgument"""
11820  return _IMP_core.TripletRestraint_get_index(self)
11821 
11822  def get_version_info(self):
11823  r"""get_version_info(TripletRestraint self) -> VersionInfo"""
11824  return _IMP_core.TripletRestraint_get_version_info(self)
11825  __swig_destroy__ = _IMP_core.delete_TripletRestraint
11826 
11827  def __str__(self):
11828  r"""__str__(TripletRestraint self) -> std::string"""
11829  return _IMP_core.TripletRestraint___str__(self)
11830 
11831  def __repr__(self):
11832  r"""__repr__(TripletRestraint self) -> std::string"""
11833  return _IMP_core.TripletRestraint___repr__(self)
11834 
11835  @staticmethod
11836  def get_from(o):
11837  return _object_cast_to_TripletRestraint(o)
11838 
11839 
11840  def _get_as_binary(self):
11841  r"""_get_as_binary(TripletRestraint self) -> PyObject *"""
11842  return _IMP_core.TripletRestraint__get_as_binary(self)
11843 
11844  def _set_from_binary(self, p):
11845  r"""_set_from_binary(TripletRestraint self, PyObject * p)"""
11846  return _IMP_core.TripletRestraint__set_from_binary(self, p)
11847 
11848  def __getstate__(self):
11849  p = self._get_as_binary()
11850  if len(self.__dict__) > 1:
11851  d = self.__dict__.copy()
11852  del d['this']
11853  p = (d, p)
11854  return p
11855 
11856  def __setstate__(self, p):
11857  if not hasattr(self, 'this'):
11858  self.__init__()
11859  if isinstance(p, tuple):
11860  d, p = p
11861  self.__dict__.update(d)
11862  return self._set_from_binary(p)
11863 
11864 
11865 # Register TripletRestraint in _IMP_core:
11866 _IMP_core.TripletRestraint_swigregister(TripletRestraint)
11867 class QuadRestraint(IMP.Restraint):
11868  r"""Proxy of C++ IMP::core::QuadRestraint class."""
11869 
11870  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11871 
11872  def __init__(self, *args):
11873  r"""
11874  __init__(QuadRestraint self, Model m, QuadScore ss, IMP::ParticleIndexQuad const & vt, std::string name="QuadRestraint %1%") -> QuadRestraint
11875  __init__(QuadRestraint self) -> QuadRestraint
11876  """
11877  _IMP_core.QuadRestraint_swiginit(self, _IMP_core.new_QuadRestraint(*args))
11878 
11879  def get_score_object(self):
11880  r"""get_score_object(QuadRestraint self) -> QuadScore"""
11881  return _IMP_core.QuadRestraint_get_score_object(self)
11882 
11883  def get_index(self):
11884  r"""get_index(QuadRestraint self) -> IMP::QuadScore::IndexArgument"""
11885  return _IMP_core.QuadRestraint_get_index(self)
11886 
11887  def get_version_info(self):
11888  r"""get_version_info(QuadRestraint self) -> VersionInfo"""
11889  return _IMP_core.QuadRestraint_get_version_info(self)
11890  __swig_destroy__ = _IMP_core.delete_QuadRestraint
11891 
11892  def __str__(self):
11893  r"""__str__(QuadRestraint self) -> std::string"""
11894  return _IMP_core.QuadRestraint___str__(self)
11895 
11896  def __repr__(self):
11897  r"""__repr__(QuadRestraint self) -> std::string"""
11898  return _IMP_core.QuadRestraint___repr__(self)
11899 
11900  @staticmethod
11901  def get_from(o):
11902  return _object_cast_to_QuadRestraint(o)
11903 
11904 
11905  def _get_as_binary(self):
11906  r"""_get_as_binary(QuadRestraint self) -> PyObject *"""
11907  return _IMP_core.QuadRestraint__get_as_binary(self)
11908 
11909  def _set_from_binary(self, p):
11910  r"""_set_from_binary(QuadRestraint self, PyObject * p)"""
11911  return _IMP_core.QuadRestraint__set_from_binary(self, p)
11912 
11913  def __getstate__(self):
11914  p = self._get_as_binary()
11915  if len(self.__dict__) > 1:
11916  d = self.__dict__.copy()
11917  del d['this']
11918  p = (d, p)
11919  return p
11920 
11921  def __setstate__(self, p):
11922  if not hasattr(self, 'this'):
11923  self.__init__()
11924  if isinstance(p, tuple):
11925  d, p = p
11926  self.__dict__.update(d)
11927  return self._set_from_binary(p)
11928 
11929 
11930 # Register QuadRestraint in _IMP_core:
11931 _IMP_core.QuadRestraint_swigregister(QuadRestraint)
11932 class SingletonConstraint(IMP.Constraint):
11933  r"""Proxy of C++ IMP::core::SingletonConstraint class."""
11934 
11935  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11936 
11937  def __init__(self, *args):
11938  r"""
11939  __init__(SingletonConstraint self, SingletonModifier before, SingletonModifier after, Model m, ParticleIndex vt, std::string name="SingletonConstraint %1%", bool can_skip=False) -> SingletonConstraint
11940  __init__(SingletonConstraint self) -> SingletonConstraint
11941  """
11942  _IMP_core.SingletonConstraint_swiginit(self, _IMP_core.new_SingletonConstraint(*args))
11943 
11944  def get_before_modifier(self):
11945  r"""get_before_modifier(SingletonConstraint self) -> SingletonModifier"""
11946  return _IMP_core.SingletonConstraint_get_before_modifier(self)
11947 
11948  def get_index(self):
11949  r"""get_index(SingletonConstraint self) -> ParticleIndex"""
11950  return _IMP_core.SingletonConstraint_get_index(self)
11951 
11952  def get_version_info(self):
11953  r"""get_version_info(SingletonConstraint self) -> VersionInfo"""
11954  return _IMP_core.SingletonConstraint_get_version_info(self)
11955  __swig_destroy__ = _IMP_core.delete_SingletonConstraint
11956 
11957  def __str__(self):
11958  r"""__str__(SingletonConstraint self) -> std::string"""
11959  return _IMP_core.SingletonConstraint___str__(self)
11960 
11961  def __repr__(self):
11962  r"""__repr__(SingletonConstraint self) -> std::string"""
11963  return _IMP_core.SingletonConstraint___repr__(self)
11964 
11965  @staticmethod
11966  def get_from(o):
11967  return _object_cast_to_SingletonConstraint(o)
11968 
11969 
11970  def _get_as_binary(self):
11971  r"""_get_as_binary(SingletonConstraint self) -> PyObject *"""
11972  return _IMP_core.SingletonConstraint__get_as_binary(self)
11973 
11974  def _set_from_binary(self, p):
11975  r"""_set_from_binary(SingletonConstraint self, PyObject * p)"""
11976  return _IMP_core.SingletonConstraint__set_from_binary(self, p)
11977 
11978  def __getstate__(self):
11979  p = self._get_as_binary()
11980  if len(self.__dict__) > 1:
11981  d = self.__dict__.copy()
11982  del d['this']
11983  p = (d, p)
11984  return p
11985 
11986  def __setstate__(self, p):
11987  if not hasattr(self, 'this'):
11988  self.__init__()
11989  if isinstance(p, tuple):
11990  d, p = p
11991  self.__dict__.update(d)
11992  return self._set_from_binary(p)
11993 
11994 
11995  def _get_jax(self):
11996  import jax.numpy as jnp
11997  indexes = jnp.array([self.get_index()])
11998  mod = self.get_before_modifier().get_derived_object()
11999  ji = mod._get_jax(self.get_model(), indexes)
12000  return self._wrap_jax(ji.apply_func, keys=ji._keys)
12001 
12002 
12003 # Register SingletonConstraint in _IMP_core:
12004 _IMP_core.SingletonConstraint_swigregister(SingletonConstraint)
12005 class PairConstraint(IMP.Constraint):
12006  r"""Proxy of C++ IMP::core::PairConstraint class."""
12007 
12008  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12009 
12010  def __init__(self, *args):
12011  r"""
12012  __init__(PairConstraint self, PairModifier before, PairModifier after, Model m, IMP::ParticleIndexPair const & vt, std::string name="PairConstraint %1%", bool can_skip=False) -> PairConstraint
12013  __init__(PairConstraint self) -> PairConstraint
12014  """
12015  _IMP_core.PairConstraint_swiginit(self, _IMP_core.new_PairConstraint(*args))
12016 
12017  def get_before_modifier(self):
12018  r"""get_before_modifier(PairConstraint self) -> PairModifier"""
12019  return _IMP_core.PairConstraint_get_before_modifier(self)
12020 
12021  def get_index(self):
12022  r"""get_index(PairConstraint self) -> IMP::PairModifier::IndexArgument"""
12023  return _IMP_core.PairConstraint_get_index(self)
12024 
12025  def get_version_info(self):
12026  r"""get_version_info(PairConstraint self) -> VersionInfo"""
12027  return _IMP_core.PairConstraint_get_version_info(self)
12028  __swig_destroy__ = _IMP_core.delete_PairConstraint
12029 
12030  def __str__(self):
12031  r"""__str__(PairConstraint self) -> std::string"""
12032  return _IMP_core.PairConstraint___str__(self)
12033 
12034  def __repr__(self):
12035  r"""__repr__(PairConstraint self) -> std::string"""
12036  return _IMP_core.PairConstraint___repr__(self)
12037 
12038  @staticmethod
12039  def get_from(o):
12040  return _object_cast_to_PairConstraint(o)
12041 
12042 
12043  def _get_as_binary(self):
12044  r"""_get_as_binary(PairConstraint self) -> PyObject *"""
12045  return _IMP_core.PairConstraint__get_as_binary(self)
12046 
12047  def _set_from_binary(self, p):
12048  r"""_set_from_binary(PairConstraint self, PyObject * p)"""
12049  return _IMP_core.PairConstraint__set_from_binary(self, p)
12050 
12051  def __getstate__(self):
12052  p = self._get_as_binary()
12053  if len(self.__dict__) > 1:
12054  d = self.__dict__.copy()
12055  del d['this']
12056  p = (d, p)
12057  return p
12058 
12059  def __setstate__(self, p):
12060  if not hasattr(self, 'this'):
12061  self.__init__()
12062  if isinstance(p, tuple):
12063  d, p = p
12064  self.__dict__.update(d)
12065  return self._set_from_binary(p)
12066 
12067 
12068 # Register PairConstraint in _IMP_core:
12069 _IMP_core.PairConstraint_swigregister(PairConstraint)
12070 class TripletConstraint(IMP.Constraint):
12071  r"""Proxy of C++ IMP::core::TripletConstraint class."""
12072 
12073  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12074 
12075  def __init__(self, *args):
12076  r"""
12077  __init__(TripletConstraint self, TripletModifier before, TripletModifier after, Model m, IMP::ParticleIndexTriplet const & vt, std::string name="TripletConstraint %1%", bool can_skip=False) -> TripletConstraint
12078  __init__(TripletConstraint self) -> TripletConstraint
12079  """
12080  _IMP_core.TripletConstraint_swiginit(self, _IMP_core.new_TripletConstraint(*args))
12081 
12082  def get_before_modifier(self):
12083  r"""get_before_modifier(TripletConstraint self) -> TripletModifier"""
12084  return _IMP_core.TripletConstraint_get_before_modifier(self)
12085 
12086  def get_index(self):
12087  r"""get_index(TripletConstraint self) -> IMP::TripletModifier::IndexArgument"""
12088  return _IMP_core.TripletConstraint_get_index(self)
12089 
12090  def get_version_info(self):
12091  r"""get_version_info(TripletConstraint self) -> VersionInfo"""
12092  return _IMP_core.TripletConstraint_get_version_info(self)
12093  __swig_destroy__ = _IMP_core.delete_TripletConstraint
12094 
12095  def __str__(self):
12096  r"""__str__(TripletConstraint self) -> std::string"""
12097  return _IMP_core.TripletConstraint___str__(self)
12098 
12099  def __repr__(self):
12100  r"""__repr__(TripletConstraint self) -> std::string"""
12101  return _IMP_core.TripletConstraint___repr__(self)
12102 
12103  @staticmethod
12104  def get_from(o):
12105  return _object_cast_to_TripletConstraint(o)
12106 
12107 
12108  def _get_as_binary(self):
12109  r"""_get_as_binary(TripletConstraint self) -> PyObject *"""
12110  return _IMP_core.TripletConstraint__get_as_binary(self)
12111 
12112  def _set_from_binary(self, p):
12113  r"""_set_from_binary(TripletConstraint self, PyObject * p)"""
12114  return _IMP_core.TripletConstraint__set_from_binary(self, p)
12115 
12116  def __getstate__(self):
12117  p = self._get_as_binary()
12118  if len(self.__dict__) > 1:
12119  d = self.__dict__.copy()
12120  del d['this']
12121  p = (d, p)
12122  return p
12123 
12124  def __setstate__(self, p):
12125  if not hasattr(self, 'this'):
12126  self.__init__()
12127  if isinstance(p, tuple):
12128  d, p = p
12129  self.__dict__.update(d)
12130  return self._set_from_binary(p)
12131 
12132 
12133 # Register TripletConstraint in _IMP_core:
12134 _IMP_core.TripletConstraint_swigregister(TripletConstraint)
12135 class QuadConstraint(IMP.Constraint):
12136  r"""Proxy of C++ IMP::core::QuadConstraint class."""
12137 
12138  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12139 
12140  def __init__(self, *args):
12141  r"""
12142  __init__(QuadConstraint self, QuadModifier before, QuadModifier after, Model m, IMP::ParticleIndexQuad const & vt, std::string name="QuadConstraint %1%", bool can_skip=False) -> QuadConstraint
12143  __init__(QuadConstraint self) -> QuadConstraint
12144  """
12145  _IMP_core.QuadConstraint_swiginit(self, _IMP_core.new_QuadConstraint(*args))
12146 
12147  def get_before_modifier(self):
12148  r"""get_before_modifier(QuadConstraint self) -> QuadModifier"""
12149  return _IMP_core.QuadConstraint_get_before_modifier(self)
12150 
12151  def get_index(self):
12152  r"""get_index(QuadConstraint self) -> IMP::QuadModifier::IndexArgument"""
12153  return _IMP_core.QuadConstraint_get_index(self)
12154 
12155  def get_version_info(self):
12156  r"""get_version_info(QuadConstraint self) -> VersionInfo"""
12157  return _IMP_core.QuadConstraint_get_version_info(self)
12158  __swig_destroy__ = _IMP_core.delete_QuadConstraint
12159 
12160  def __str__(self):
12161  r"""__str__(QuadConstraint self) -> std::string"""
12162  return _IMP_core.QuadConstraint___str__(self)
12163 
12164  def __repr__(self):
12165  r"""__repr__(QuadConstraint self) -> std::string"""
12166  return _IMP_core.QuadConstraint___repr__(self)
12167 
12168  @staticmethod
12169  def get_from(o):
12170  return _object_cast_to_QuadConstraint(o)
12171 
12172 
12173  def _get_as_binary(self):
12174  r"""_get_as_binary(QuadConstraint self) -> PyObject *"""
12175  return _IMP_core.QuadConstraint__get_as_binary(self)
12176 
12177  def _set_from_binary(self, p):
12178  r"""_set_from_binary(QuadConstraint self, PyObject * p)"""
12179  return _IMP_core.QuadConstraint__set_from_binary(self, p)
12180 
12181  def __getstate__(self):
12182  p = self._get_as_binary()
12183  if len(self.__dict__) > 1:
12184  d = self.__dict__.copy()
12185  del d['this']
12186  p = (d, p)
12187  return p
12188 
12189  def __setstate__(self, p):
12190  if not hasattr(self, 'this'):
12191  self.__init__()
12192  if isinstance(p, tuple):
12193  d, p = p
12194  self.__dict__.update(d)
12195  return self._set_from_binary(p)
12196 
12197 
12198 # Register QuadConstraint in _IMP_core:
12199 _IMP_core.QuadConstraint_swigregister(QuadConstraint)
12200 class ConstantSingletonPredicate(IMP.SingletonPredicate):
12201  r"""Proxy of C++ IMP::core::ConstantSingletonPredicate class."""
12202 
12203  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12204 
12205  def __init__(self, *args):
12206  r"""
12207  __init__(ConstantSingletonPredicate self, int v, std::string name="ConstSingletonPredicate%1%") -> ConstantSingletonPredicate
12208  __init__(ConstantSingletonPredicate self) -> ConstantSingletonPredicate
12209  """
12210  _IMP_core.ConstantSingletonPredicate_swiginit(self, _IMP_core.new_ConstantSingletonPredicate(*args))
12211 
12212  def do_get_inputs(self, arg2, arg3):
12213  r"""do_get_inputs(ConstantSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12214  return _IMP_core.ConstantSingletonPredicate_do_get_inputs(self, arg2, arg3)
12215 
12216  def get_value(self, *args):
12217  r"""
12218  get_value(ConstantSingletonPredicate self, Particle a) -> int
12219  get_value(ConstantSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12220  """
12221  return _IMP_core.ConstantSingletonPredicate_get_value(self, *args)
12222 
12223  def get_value_index(self, *args):
12224  r"""
12225  get_value_index(ConstantSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12226  get_value_index(ConstantSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12227  """
12228  return _IMP_core.ConstantSingletonPredicate_get_value_index(self, *args)
12229 
12230  def get_version_info(self):
12231  r"""get_version_info(ConstantSingletonPredicate self) -> VersionInfo"""
12232  return _IMP_core.ConstantSingletonPredicate_get_version_info(self)
12233  __swig_destroy__ = _IMP_core.delete_ConstantSingletonPredicate
12234 
12235  def __str__(self):
12236  r"""__str__(ConstantSingletonPredicate self) -> std::string"""
12237  return _IMP_core.ConstantSingletonPredicate___str__(self)
12238 
12239  def __repr__(self):
12240  r"""__repr__(ConstantSingletonPredicate self) -> std::string"""
12241  return _IMP_core.ConstantSingletonPredicate___repr__(self)
12242 
12243  @staticmethod
12244  def get_from(o):
12245  return _object_cast_to_ConstantSingletonPredicate(o)
12246 
12247 
12248  def _get_as_binary(self):
12249  r"""_get_as_binary(ConstantSingletonPredicate self) -> PyObject *"""
12250  return _IMP_core.ConstantSingletonPredicate__get_as_binary(self)
12251 
12252  def _set_from_binary(self, p):
12253  r"""_set_from_binary(ConstantSingletonPredicate self, PyObject * p)"""
12254  return _IMP_core.ConstantSingletonPredicate__set_from_binary(self, p)
12255 
12256  def __getstate__(self):
12257  p = self._get_as_binary()
12258  if len(self.__dict__) > 1:
12259  d = self.__dict__.copy()
12260  del d['this']
12261  p = (d, p)
12262  return p
12263 
12264  def __setstate__(self, p):
12265  if not hasattr(self, 'this'):
12266  self.__init__()
12267  if isinstance(p, tuple):
12268  d, p = p
12269  self.__dict__.update(d)
12270  return self._set_from_binary(p)
12271 
12272 
12273 # Register ConstantSingletonPredicate in _IMP_core:
12274 _IMP_core.ConstantSingletonPredicate_swigregister(ConstantSingletonPredicate)
12275 class UnorderedTypeSingletonPredicate(IMP.SingletonPredicate):
12276  r"""Proxy of C++ IMP::core::UnorderedTypeSingletonPredicate class."""
12277 
12278  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12279 
12280  def __init__(self, *args):
12281  r"""__init__(UnorderedTypeSingletonPredicate self, std::string name="UnorderedTypeSingletonPredicate%1%") -> UnorderedTypeSingletonPredicate"""
12282  _IMP_core.UnorderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_UnorderedTypeSingletonPredicate(*args))
12283 
12284  def do_get_inputs(self, m, pis):
12285  r"""do_get_inputs(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12286  return _IMP_core.UnorderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12287 
12288  def get_value(self, *args):
12289  r"""
12290  get_value(UnorderedTypeSingletonPredicate self, Particle a) -> int
12291  get_value(UnorderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12292  """
12293  return _IMP_core.UnorderedTypeSingletonPredicate_get_value(self, *args)
12294 
12295  def get_value_index(self, *args):
12296  r"""
12297  get_value_index(UnorderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12298  get_value_index(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12299  """
12300  return _IMP_core.UnorderedTypeSingletonPredicate_get_value_index(self, *args)
12301 
12302  def get_version_info(self):
12303  r"""get_version_info(UnorderedTypeSingletonPredicate self) -> VersionInfo"""
12304  return _IMP_core.UnorderedTypeSingletonPredicate_get_version_info(self)
12305  __swig_destroy__ = _IMP_core.delete_UnorderedTypeSingletonPredicate
12306 
12307  def __str__(self):
12308  r"""__str__(UnorderedTypeSingletonPredicate self) -> std::string"""
12309  return _IMP_core.UnorderedTypeSingletonPredicate___str__(self)
12310 
12311  def __repr__(self):
12312  r"""__repr__(UnorderedTypeSingletonPredicate self) -> std::string"""
12313  return _IMP_core.UnorderedTypeSingletonPredicate___repr__(self)
12314 
12315  @staticmethod
12316  def get_from(o):
12317  return _object_cast_to_UnorderedTypeSingletonPredicate(o)
12318 
12319 
12320  def _get_as_binary(self):
12321  r"""_get_as_binary(UnorderedTypeSingletonPredicate self) -> PyObject *"""
12322  return _IMP_core.UnorderedTypeSingletonPredicate__get_as_binary(self)
12323 
12324  def _set_from_binary(self, p):
12325  r"""_set_from_binary(UnorderedTypeSingletonPredicate self, PyObject * p)"""
12326  return _IMP_core.UnorderedTypeSingletonPredicate__set_from_binary(self, p)
12327 
12328  def __getstate__(self):
12329  p = self._get_as_binary()
12330  if len(self.__dict__) > 1:
12331  d = self.__dict__.copy()
12332  del d['this']
12333  p = (d, p)
12334  return p
12335 
12336  def __setstate__(self, p):
12337  if not hasattr(self, 'this'):
12338  self.__init__()
12339  if isinstance(p, tuple):
12340  d, p = p
12341  self.__dict__.update(d)
12342  return self._set_from_binary(p)
12343 
12344 
12345 # Register UnorderedTypeSingletonPredicate in _IMP_core:
12346 _IMP_core.UnorderedTypeSingletonPredicate_swigregister(UnorderedTypeSingletonPredicate)
12347 class OrderedTypeSingletonPredicate(IMP.SingletonPredicate):
12348  r"""Proxy of C++ IMP::core::OrderedTypeSingletonPredicate class."""
12349 
12350  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12351 
12352  def __init__(self, *args):
12353  r"""__init__(OrderedTypeSingletonPredicate self, std::string name="OrderedTypeSingletonPredicate%1%") -> OrderedTypeSingletonPredicate"""
12354  _IMP_core.OrderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_OrderedTypeSingletonPredicate(*args))
12355 
12356  def do_get_inputs(self, m, pis):
12357  r"""do_get_inputs(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12358  return _IMP_core.OrderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12359 
12360  def get_value(self, *args):
12361  r"""
12362  get_value(OrderedTypeSingletonPredicate self, IMP::core::ParticleTypes const & types) -> int
12363  get_value(OrderedTypeSingletonPredicate self, Particle a) -> int
12364  get_value(OrderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12365  """
12366  return _IMP_core.OrderedTypeSingletonPredicate_get_value(self, *args)
12367 
12368  def get_value_index(self, *args):
12369  r"""
12370  get_value_index(OrderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12371  get_value_index(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12372  """
12373  return _IMP_core.OrderedTypeSingletonPredicate_get_value_index(self, *args)
12374 
12375  def get_version_info(self):
12376  r"""get_version_info(OrderedTypeSingletonPredicate self) -> VersionInfo"""
12377  return _IMP_core.OrderedTypeSingletonPredicate_get_version_info(self)
12378  __swig_destroy__ = _IMP_core.delete_OrderedTypeSingletonPredicate
12379 
12380  def __str__(self):
12381  r"""__str__(OrderedTypeSingletonPredicate self) -> std::string"""
12382  return _IMP_core.OrderedTypeSingletonPredicate___str__(self)
12383 
12384  def __repr__(self):
12385  r"""__repr__(OrderedTypeSingletonPredicate self) -> std::string"""
12386  return _IMP_core.OrderedTypeSingletonPredicate___repr__(self)
12387 
12388  @staticmethod
12389  def get_from(o):
12390  return _object_cast_to_OrderedTypeSingletonPredicate(o)
12391 
12392 
12393 # Register OrderedTypeSingletonPredicate in _IMP_core:
12394 _IMP_core.OrderedTypeSingletonPredicate_swigregister(OrderedTypeSingletonPredicate)
12395 class AllSameSingletonPredicate(IMP.SingletonPredicate):
12396  r"""Proxy of C++ IMP::core::AllSameSingletonPredicate class."""
12397 
12398  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12399 
12400  def __init__(self, *args):
12401  r"""__init__(AllSameSingletonPredicate self, std::string name="AllSameSingletonPredicate%1%") -> AllSameSingletonPredicate"""
12402  _IMP_core.AllSameSingletonPredicate_swiginit(self, _IMP_core.new_AllSameSingletonPredicate(*args))
12403 
12404  def do_get_inputs(self, arg2, arg3):
12405  r"""do_get_inputs(AllSameSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12406  return _IMP_core.AllSameSingletonPredicate_do_get_inputs(self, arg2, arg3)
12407 
12408  def get_value(self, *args):
12409  r"""
12410  get_value(AllSameSingletonPredicate self, Particle a) -> int
12411  get_value(AllSameSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12412  """
12413  return _IMP_core.AllSameSingletonPredicate_get_value(self, *args)
12414 
12415  def get_value_index(self, *args):
12416  r"""
12417  get_value_index(AllSameSingletonPredicate self, Model m, ParticleIndex pi) -> int
12418  get_value_index(AllSameSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12419  """
12420  return _IMP_core.AllSameSingletonPredicate_get_value_index(self, *args)
12421 
12422  def get_version_info(self):
12423  r"""get_version_info(AllSameSingletonPredicate self) -> VersionInfo"""
12424  return _IMP_core.AllSameSingletonPredicate_get_version_info(self)
12425  __swig_destroy__ = _IMP_core.delete_AllSameSingletonPredicate
12426 
12427  def __str__(self):
12428  r"""__str__(AllSameSingletonPredicate self) -> std::string"""
12429  return _IMP_core.AllSameSingletonPredicate___str__(self)
12430 
12431  def __repr__(self):
12432  r"""__repr__(AllSameSingletonPredicate self) -> std::string"""
12433  return _IMP_core.AllSameSingletonPredicate___repr__(self)
12434 
12435  @staticmethod
12436  def get_from(o):
12437  return _object_cast_to_AllSameSingletonPredicate(o)
12438 
12439 
12440  def _get_as_binary(self):
12441  r"""_get_as_binary(AllSameSingletonPredicate self) -> PyObject *"""
12442  return _IMP_core.AllSameSingletonPredicate__get_as_binary(self)
12443 
12444  def _set_from_binary(self, p):
12445  r"""_set_from_binary(AllSameSingletonPredicate self, PyObject * p)"""
12446  return _IMP_core.AllSameSingletonPredicate__set_from_binary(self, p)
12447 
12448  def __getstate__(self):
12449  p = self._get_as_binary()
12450  if len(self.__dict__) > 1:
12451  d = self.__dict__.copy()
12452  del d['this']
12453  p = (d, p)
12454  return p
12455 
12456  def __setstate__(self, p):
12457  if not hasattr(self, 'this'):
12458  self.__init__()
12459  if isinstance(p, tuple):
12460  d, p = p
12461  self.__dict__.update(d)
12462  return self._set_from_binary(p)
12463 
12464 
12465 # Register AllSameSingletonPredicate in _IMP_core:
12466 _IMP_core.AllSameSingletonPredicate_swigregister(AllSameSingletonPredicate)
12467 class CoinFlipSingletonPredicate(IMP.SingletonPredicate):
12468  r"""Proxy of C++ IMP::core::CoinFlipSingletonPredicate class."""
12469 
12470  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12471 
12472  def __init__(self, *args):
12473  r"""__init__(CoinFlipSingletonPredicate self, double p, std::string name="CoinFlipSingletonPredicate%1%") -> CoinFlipSingletonPredicate"""
12474  _IMP_core.CoinFlipSingletonPredicate_swiginit(self, _IMP_core.new_CoinFlipSingletonPredicate(*args))
12475 
12476  def do_get_inputs(self, arg2, arg3):
12477  r"""do_get_inputs(CoinFlipSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12478  return _IMP_core.CoinFlipSingletonPredicate_do_get_inputs(self, arg2, arg3)
12479 
12480  def get_value(self, *args):
12481  r"""
12482  get_value(CoinFlipSingletonPredicate self, Particle a) -> int
12483  get_value(CoinFlipSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12484  """
12485  return _IMP_core.CoinFlipSingletonPredicate_get_value(self, *args)
12486 
12487  def get_value_index(self, *args):
12488  r"""
12489  get_value_index(CoinFlipSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12490  get_value_index(CoinFlipSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12491  """
12492  return _IMP_core.CoinFlipSingletonPredicate_get_value_index(self, *args)
12493 
12494  def get_version_info(self):
12495  r"""get_version_info(CoinFlipSingletonPredicate self) -> VersionInfo"""
12496  return _IMP_core.CoinFlipSingletonPredicate_get_version_info(self)
12497  __swig_destroy__ = _IMP_core.delete_CoinFlipSingletonPredicate
12498 
12499  def __str__(self):
12500  r"""__str__(CoinFlipSingletonPredicate self) -> std::string"""
12501  return _IMP_core.CoinFlipSingletonPredicate___str__(self)
12502 
12503  def __repr__(self):
12504  r"""__repr__(CoinFlipSingletonPredicate self) -> std::string"""
12505  return _IMP_core.CoinFlipSingletonPredicate___repr__(self)
12506 
12507  @staticmethod
12508  def get_from(o):
12509  return _object_cast_to_CoinFlipSingletonPredicate(o)
12510 
12511 
12512 # Register CoinFlipSingletonPredicate in _IMP_core:
12513 _IMP_core.CoinFlipSingletonPredicate_swigregister(CoinFlipSingletonPredicate)
12514 class ConstantPairPredicate(IMP.PairPredicate):
12515  r"""Proxy of C++ IMP::core::ConstantPairPredicate class."""
12516 
12517  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12518 
12519  def __init__(self, *args):
12520  r"""
12521  __init__(ConstantPairPredicate self, int v, std::string name="ConstPairPredicate%1%") -> ConstantPairPredicate
12522  __init__(ConstantPairPredicate self) -> ConstantPairPredicate
12523  """
12524  _IMP_core.ConstantPairPredicate_swiginit(self, _IMP_core.new_ConstantPairPredicate(*args))
12525 
12526  def do_get_inputs(self, arg2, arg3):
12527  r"""do_get_inputs(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12528  return _IMP_core.ConstantPairPredicate_do_get_inputs(self, arg2, arg3)
12529 
12530  def get_value(self, *args):
12531  r"""
12532  get_value(ConstantPairPredicate self, IMP::ParticlePair const & a) -> int
12533  get_value(ConstantPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12534  """
12535  return _IMP_core.ConstantPairPredicate_get_value(self, *args)
12536 
12537  def get_value_index(self, *args):
12538  r"""
12539  get_value_index(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12540  get_value_index(ConstantPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12541  """
12542  return _IMP_core.ConstantPairPredicate_get_value_index(self, *args)
12543 
12544  def get_version_info(self):
12545  r"""get_version_info(ConstantPairPredicate self) -> VersionInfo"""
12546  return _IMP_core.ConstantPairPredicate_get_version_info(self)
12547  __swig_destroy__ = _IMP_core.delete_ConstantPairPredicate
12548 
12549  def __str__(self):
12550  r"""__str__(ConstantPairPredicate self) -> std::string"""
12551  return _IMP_core.ConstantPairPredicate___str__(self)
12552 
12553  def __repr__(self):
12554  r"""__repr__(ConstantPairPredicate self) -> std::string"""
12555  return _IMP_core.ConstantPairPredicate___repr__(self)
12556 
12557  @staticmethod
12558  def get_from(o):
12559  return _object_cast_to_ConstantPairPredicate(o)
12560 
12561 
12562  def _get_as_binary(self):
12563  r"""_get_as_binary(ConstantPairPredicate self) -> PyObject *"""
12564  return _IMP_core.ConstantPairPredicate__get_as_binary(self)
12565 
12566  def _set_from_binary(self, p):
12567  r"""_set_from_binary(ConstantPairPredicate self, PyObject * p)"""
12568  return _IMP_core.ConstantPairPredicate__set_from_binary(self, p)
12569 
12570  def __getstate__(self):
12571  p = self._get_as_binary()
12572  if len(self.__dict__) > 1:
12573  d = self.__dict__.copy()
12574  del d['this']
12575  p = (d, p)
12576  return p
12577 
12578  def __setstate__(self, p):
12579  if not hasattr(self, 'this'):
12580  self.__init__()
12581  if isinstance(p, tuple):
12582  d, p = p
12583  self.__dict__.update(d)
12584  return self._set_from_binary(p)
12585 
12586 
12587 # Register ConstantPairPredicate in _IMP_core:
12588 _IMP_core.ConstantPairPredicate_swigregister(ConstantPairPredicate)
12589 class UnorderedTypePairPredicate(IMP.PairPredicate):
12590  r"""Proxy of C++ IMP::core::UnorderedTypePairPredicate class."""
12591 
12592  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12593 
12594  def __init__(self, *args):
12595  r"""__init__(UnorderedTypePairPredicate self, std::string name="UnorderedTypePairPredicate%1%") -> UnorderedTypePairPredicate"""
12596  _IMP_core.UnorderedTypePairPredicate_swiginit(self, _IMP_core.new_UnorderedTypePairPredicate(*args))
12597 
12598  def do_get_inputs(self, m, pis):
12599  r"""do_get_inputs(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12600  return _IMP_core.UnorderedTypePairPredicate_do_get_inputs(self, m, pis)
12601 
12602  def get_value(self, *args):
12603  r"""
12604  get_value(UnorderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12605  get_value(UnorderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12606  """
12607  return _IMP_core.UnorderedTypePairPredicate_get_value(self, *args)
12608 
12609  def get_value_index(self, *args):
12610  r"""
12611  get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12612  get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12613  """
12614  return _IMP_core.UnorderedTypePairPredicate_get_value_index(self, *args)
12615 
12616  def get_version_info(self):
12617  r"""get_version_info(UnorderedTypePairPredicate self) -> VersionInfo"""
12618  return _IMP_core.UnorderedTypePairPredicate_get_version_info(self)
12619  __swig_destroy__ = _IMP_core.delete_UnorderedTypePairPredicate
12620 
12621  def __str__(self):
12622  r"""__str__(UnorderedTypePairPredicate self) -> std::string"""
12623  return _IMP_core.UnorderedTypePairPredicate___str__(self)
12624 
12625  def __repr__(self):
12626  r"""__repr__(UnorderedTypePairPredicate self) -> std::string"""
12627  return _IMP_core.UnorderedTypePairPredicate___repr__(self)
12628 
12629  @staticmethod
12630  def get_from(o):
12631  return _object_cast_to_UnorderedTypePairPredicate(o)
12632 
12633 
12634  def _get_as_binary(self):
12635  r"""_get_as_binary(UnorderedTypePairPredicate self) -> PyObject *"""
12636  return _IMP_core.UnorderedTypePairPredicate__get_as_binary(self)
12637 
12638  def _set_from_binary(self, p):
12639  r"""_set_from_binary(UnorderedTypePairPredicate self, PyObject * p)"""
12640  return _IMP_core.UnorderedTypePairPredicate__set_from_binary(self, p)
12641 
12642  def __getstate__(self):
12643  p = self._get_as_binary()
12644  if len(self.__dict__) > 1:
12645  d = self.__dict__.copy()
12646  del d['this']
12647  p = (d, p)
12648  return p
12649 
12650  def __setstate__(self, p):
12651  if not hasattr(self, 'this'):
12652  self.__init__()
12653  if isinstance(p, tuple):
12654  d, p = p
12655  self.__dict__.update(d)
12656  return self._set_from_binary(p)
12657 
12658 
12659 # Register UnorderedTypePairPredicate in _IMP_core:
12660 _IMP_core.UnorderedTypePairPredicate_swigregister(UnorderedTypePairPredicate)
12661 class OrderedTypePairPredicate(IMP.PairPredicate):
12662  r"""Proxy of C++ IMP::core::OrderedTypePairPredicate class."""
12663 
12664  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12665 
12666  def __init__(self, *args):
12667  r"""__init__(OrderedTypePairPredicate self, std::string name="OrderedTypePairPredicate%1%") -> OrderedTypePairPredicate"""
12668  _IMP_core.OrderedTypePairPredicate_swiginit(self, _IMP_core.new_OrderedTypePairPredicate(*args))
12669 
12670  def do_get_inputs(self, m, pis):
12671  r"""do_get_inputs(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12672  return _IMP_core.OrderedTypePairPredicate_do_get_inputs(self, m, pis)
12673 
12674  def get_value(self, *args):
12675  r"""
12676  get_value(OrderedTypePairPredicate self, IMP::core::ParticleTypes const & types) -> int
12677  get_value(OrderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12678  get_value(OrderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12679  """
12680  return _IMP_core.OrderedTypePairPredicate_get_value(self, *args)
12681 
12682  def get_value_index(self, *args):
12683  r"""
12684  get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12685  get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12686  """
12687  return _IMP_core.OrderedTypePairPredicate_get_value_index(self, *args)
12688 
12689  def get_version_info(self):
12690  r"""get_version_info(OrderedTypePairPredicate self) -> VersionInfo"""
12691  return _IMP_core.OrderedTypePairPredicate_get_version_info(self)
12692  __swig_destroy__ = _IMP_core.delete_OrderedTypePairPredicate
12693 
12694  def __str__(self):
12695  r"""__str__(OrderedTypePairPredicate self) -> std::string"""
12696  return _IMP_core.OrderedTypePairPredicate___str__(self)
12697 
12698  def __repr__(self):
12699  r"""__repr__(OrderedTypePairPredicate self) -> std::string"""
12700  return _IMP_core.OrderedTypePairPredicate___repr__(self)
12701 
12702  @staticmethod
12703  def get_from(o):
12704  return _object_cast_to_OrderedTypePairPredicate(o)
12705 
12706 
12707 # Register OrderedTypePairPredicate in _IMP_core:
12708 _IMP_core.OrderedTypePairPredicate_swigregister(OrderedTypePairPredicate)
12709 class AllSamePairPredicate(IMP.PairPredicate):
12710  r"""Proxy of C++ IMP::core::AllSamePairPredicate class."""
12711 
12712  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12713 
12714  def __init__(self, *args):
12715  r"""__init__(AllSamePairPredicate self, std::string name="AllSamePairPredicate%1%") -> AllSamePairPredicate"""
12716  _IMP_core.AllSamePairPredicate_swiginit(self, _IMP_core.new_AllSamePairPredicate(*args))
12717 
12718  def do_get_inputs(self, arg2, arg3):
12719  r"""do_get_inputs(AllSamePairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12720  return _IMP_core.AllSamePairPredicate_do_get_inputs(self, arg2, arg3)
12721 
12722  def get_value(self, *args):
12723  r"""
12724  get_value(AllSamePairPredicate self, IMP::ParticlePair const & a) -> int
12725  get_value(AllSamePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12726  """
12727  return _IMP_core.AllSamePairPredicate_get_value(self, *args)
12728 
12729  def get_value_index(self, *args):
12730  r"""
12731  get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12732  get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12733  """
12734  return _IMP_core.AllSamePairPredicate_get_value_index(self, *args)
12735 
12736  def get_version_info(self):
12737  r"""get_version_info(AllSamePairPredicate self) -> VersionInfo"""
12738  return _IMP_core.AllSamePairPredicate_get_version_info(self)
12739  __swig_destroy__ = _IMP_core.delete_AllSamePairPredicate
12740 
12741  def __str__(self):
12742  r"""__str__(AllSamePairPredicate self) -> std::string"""
12743  return _IMP_core.AllSamePairPredicate___str__(self)
12744 
12745  def __repr__(self):
12746  r"""__repr__(AllSamePairPredicate self) -> std::string"""
12747  return _IMP_core.AllSamePairPredicate___repr__(self)
12748 
12749  @staticmethod
12750  def get_from(o):
12751  return _object_cast_to_AllSamePairPredicate(o)
12752 
12753 
12754  def _get_as_binary(self):
12755  r"""_get_as_binary(AllSamePairPredicate self) -> PyObject *"""
12756  return _IMP_core.AllSamePairPredicate__get_as_binary(self)
12757 
12758  def _set_from_binary(self, p):
12759  r"""_set_from_binary(AllSamePairPredicate self, PyObject * p)"""
12760  return _IMP_core.AllSamePairPredicate__set_from_binary(self, p)
12761 
12762  def __getstate__(self):
12763  p = self._get_as_binary()
12764  if len(self.__dict__) > 1:
12765  d = self.__dict__.copy()
12766  del d['this']
12767  p = (d, p)
12768  return p
12769 
12770  def __setstate__(self, p):
12771  if not hasattr(self, 'this'):
12772  self.__init__()
12773  if isinstance(p, tuple):
12774  d, p = p
12775  self.__dict__.update(d)
12776  return self._set_from_binary(p)
12777 
12778 
12779 # Register AllSamePairPredicate in _IMP_core:
12780 _IMP_core.AllSamePairPredicate_swigregister(AllSamePairPredicate)
12781 class CoinFlipPairPredicate(IMP.PairPredicate):
12782  r"""Proxy of C++ IMP::core::CoinFlipPairPredicate class."""
12783 
12784  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12785 
12786  def __init__(self, *args):
12787  r"""__init__(CoinFlipPairPredicate self, double p, std::string name="CoinFlipPairPredicate%1%") -> CoinFlipPairPredicate"""
12788  _IMP_core.CoinFlipPairPredicate_swiginit(self, _IMP_core.new_CoinFlipPairPredicate(*args))
12789 
12790  def do_get_inputs(self, arg2, arg3):
12791  r"""do_get_inputs(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12792  return _IMP_core.CoinFlipPairPredicate_do_get_inputs(self, arg2, arg3)
12793 
12794  def get_value(self, *args):
12795  r"""
12796  get_value(CoinFlipPairPredicate self, IMP::ParticlePair const & a) -> int
12797  get_value(CoinFlipPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12798  """
12799  return _IMP_core.CoinFlipPairPredicate_get_value(self, *args)
12800 
12801  def get_value_index(self, *args):
12802  r"""
12803  get_value_index(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12804  get_value_index(CoinFlipPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12805  """
12806  return _IMP_core.CoinFlipPairPredicate_get_value_index(self, *args)
12807 
12808  def get_version_info(self):
12809  r"""get_version_info(CoinFlipPairPredicate self) -> VersionInfo"""
12810  return _IMP_core.CoinFlipPairPredicate_get_version_info(self)
12811  __swig_destroy__ = _IMP_core.delete_CoinFlipPairPredicate
12812 
12813  def __str__(self):
12814  r"""__str__(CoinFlipPairPredicate self) -> std::string"""
12815  return _IMP_core.CoinFlipPairPredicate___str__(self)
12816 
12817  def __repr__(self):
12818  r"""__repr__(CoinFlipPairPredicate self) -> std::string"""
12819  return _IMP_core.CoinFlipPairPredicate___repr__(self)
12820 
12821  @staticmethod
12822  def get_from(o):
12823  return _object_cast_to_CoinFlipPairPredicate(o)
12824 
12825 
12826 # Register CoinFlipPairPredicate in _IMP_core:
12827 _IMP_core.CoinFlipPairPredicate_swigregister(CoinFlipPairPredicate)
12828 class ConstantTripletPredicate(IMP.TripletPredicate):
12829  r"""Proxy of C++ IMP::core::ConstantTripletPredicate class."""
12830 
12831  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12832 
12833  def __init__(self, *args):
12834  r"""
12835  __init__(ConstantTripletPredicate self, int v, std::string name="ConstTripletPredicate%1%") -> ConstantTripletPredicate
12836  __init__(ConstantTripletPredicate self) -> ConstantTripletPredicate
12837  """
12838  _IMP_core.ConstantTripletPredicate_swiginit(self, _IMP_core.new_ConstantTripletPredicate(*args))
12839 
12840  def do_get_inputs(self, arg2, arg3):
12841  r"""do_get_inputs(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12842  return _IMP_core.ConstantTripletPredicate_do_get_inputs(self, arg2, arg3)
12843 
12844  def get_value(self, *args):
12845  r"""
12846  get_value(ConstantTripletPredicate self, IMP::ParticleTriplet const & a) -> int
12847  get_value(ConstantTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
12848  """
12849  return _IMP_core.ConstantTripletPredicate_get_value(self, *args)
12850 
12851  def get_value_index(self, *args):
12852  r"""
12853  get_value_index(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
12854  get_value_index(ConstantTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
12855  """
12856  return _IMP_core.ConstantTripletPredicate_get_value_index(self, *args)
12857 
12858  def get_version_info(self):
12859  r"""get_version_info(ConstantTripletPredicate self) -> VersionInfo"""
12860  return _IMP_core.ConstantTripletPredicate_get_version_info(self)
12861  __swig_destroy__ = _IMP_core.delete_ConstantTripletPredicate
12862 
12863  def __str__(self):
12864  r"""__str__(ConstantTripletPredicate self) -> std::string"""
12865  return _IMP_core.ConstantTripletPredicate___str__(self)
12866 
12867  def __repr__(self):
12868  r"""__repr__(ConstantTripletPredicate self) -> std::string"""
12869  return _IMP_core.ConstantTripletPredicate___repr__(self)
12870 
12871  @staticmethod
12872  def get_from(o):
12873  return _object_cast_to_ConstantTripletPredicate(o)
12874 
12875 
12876  def _get_as_binary(self):
12877  r"""_get_as_binary(ConstantTripletPredicate self) -> PyObject *"""
12878  return _IMP_core.ConstantTripletPredicate__get_as_binary(self)
12879 
12880  def _set_from_binary(self, p):
12881  r"""_set_from_binary(ConstantTripletPredicate self, PyObject * p)"""
12882  return _IMP_core.ConstantTripletPredicate__set_from_binary(self, p)
12883 
12884  def __getstate__(self):
12885  p = self._get_as_binary()
12886  if len(self.__dict__) > 1:
12887  d = self.__dict__.copy()
12888  del d['this']
12889  p = (d, p)
12890  return p
12891 
12892  def __setstate__(self, p):
12893  if not hasattr(self, 'this'):
12894  self.__init__()
12895  if isinstance(p, tuple):
12896  d, p = p
12897  self.__dict__.update(d)
12898  return self._set_from_binary(p)
12899 
12900 
12901 # Register ConstantTripletPredicate in _IMP_core:
12902 _IMP_core.ConstantTripletPredicate_swigregister(ConstantTripletPredicate)
12903 class UnorderedTypeTripletPredicate(IMP.TripletPredicate):
12904  r"""Proxy of C++ IMP::core::UnorderedTypeTripletPredicate class."""
12905 
12906  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12907 
12908  def __init__(self, *args):
12909  r"""__init__(UnorderedTypeTripletPredicate self, std::string name="UnorderedTypeTripletPredicate%1%") -> UnorderedTypeTripletPredicate"""
12910  _IMP_core.UnorderedTypeTripletPredicate_swiginit(self, _IMP_core.new_UnorderedTypeTripletPredicate(*args))
12911 
12912  def do_get_inputs(self, m, pis):
12913  r"""do_get_inputs(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12914  return _IMP_core.UnorderedTypeTripletPredicate_do_get_inputs(self, m, pis)
12915 
12916  def get_value(self, *args):
12917  r"""
12918  get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
12919  get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
12920  """
12921  return _IMP_core.UnorderedTypeTripletPredicate_get_value(self, *args)
12922 
12923  def get_value_index(self, *args):
12924  r"""
12925  get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
12926  get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
12927  """
12928  return _IMP_core.UnorderedTypeTripletPredicate_get_value_index(self, *args)
12929 
12930  def get_version_info(self):
12931  r"""get_version_info(UnorderedTypeTripletPredicate self) -> VersionInfo"""
12932  return _IMP_core.UnorderedTypeTripletPredicate_get_version_info(self)
12933  __swig_destroy__ = _IMP_core.delete_UnorderedTypeTripletPredicate
12934 
12935  def __str__(self):
12936  r"""__str__(UnorderedTypeTripletPredicate self) -> std::string"""
12937  return _IMP_core.UnorderedTypeTripletPredicate___str__(self)
12938 
12939  def __repr__(self):
12940  r"""__repr__(UnorderedTypeTripletPredicate self) -> std::string"""
12941  return _IMP_core.UnorderedTypeTripletPredicate___repr__(self)
12942 
12943  @staticmethod
12944  def get_from(o):
12945  return _object_cast_to_UnorderedTypeTripletPredicate(o)
12946 
12947 
12948  def _get_as_binary(self):
12949  r"""_get_as_binary(UnorderedTypeTripletPredicate self) -> PyObject *"""
12950  return _IMP_core.UnorderedTypeTripletPredicate__get_as_binary(self)
12951 
12952  def _set_from_binary(self, p):
12953  r"""_set_from_binary(UnorderedTypeTripletPredicate self, PyObject * p)"""
12954  return _IMP_core.UnorderedTypeTripletPredicate__set_from_binary(self, p)
12955 
12956  def __getstate__(self):
12957  p = self._get_as_binary()
12958  if len(self.__dict__) > 1:
12959  d = self.__dict__.copy()
12960  del d['this']
12961  p = (d, p)
12962  return p
12963 
12964  def __setstate__(self, p):
12965  if not hasattr(self, 'this'):
12966  self.__init__()
12967  if isinstance(p, tuple):
12968  d, p = p
12969  self.__dict__.update(d)
12970  return self._set_from_binary(p)
12971 
12972 
12973 # Register UnorderedTypeTripletPredicate in _IMP_core:
12974 _IMP_core.UnorderedTypeTripletPredicate_swigregister(UnorderedTypeTripletPredicate)
12975 class OrderedTypeTripletPredicate(IMP.TripletPredicate):
12976  r"""Proxy of C++ IMP::core::OrderedTypeTripletPredicate class."""
12977 
12978  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12979 
12980  def __init__(self, *args):
12981  r"""__init__(OrderedTypeTripletPredicate self, std::string name="OrderedTypeTripletPredicate%1%") -> OrderedTypeTripletPredicate"""
12982  _IMP_core.OrderedTypeTripletPredicate_swiginit(self, _IMP_core.new_OrderedTypeTripletPredicate(*args))
12983 
12984  def do_get_inputs(self, m, pis):
12985  r"""do_get_inputs(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12986  return _IMP_core.OrderedTypeTripletPredicate_do_get_inputs(self, m, pis)
12987 
12988  def get_value(self, *args):
12989  r"""
12990  get_value(OrderedTypeTripletPredicate self, IMP::core::ParticleTypes const & types) -> int
12991  get_value(OrderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
12992  get_value(OrderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
12993  """
12994  return _IMP_core.OrderedTypeTripletPredicate_get_value(self, *args)
12995 
12996  def get_value_index(self, *args):
12997  r"""
12998  get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
12999  get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13000  """
13001  return _IMP_core.OrderedTypeTripletPredicate_get_value_index(self, *args)
13002 
13003  def get_version_info(self):
13004  r"""get_version_info(OrderedTypeTripletPredicate self) -> VersionInfo"""
13005  return _IMP_core.OrderedTypeTripletPredicate_get_version_info(self)
13006  __swig_destroy__ = _IMP_core.delete_OrderedTypeTripletPredicate
13007 
13008  def __str__(self):
13009  r"""__str__(OrderedTypeTripletPredicate self) -> std::string"""
13010  return _IMP_core.OrderedTypeTripletPredicate___str__(self)
13011 
13012  def __repr__(self):
13013  r"""__repr__(OrderedTypeTripletPredicate self) -> std::string"""
13014  return _IMP_core.OrderedTypeTripletPredicate___repr__(self)
13015 
13016  @staticmethod
13017  def get_from(o):
13018  return _object_cast_to_OrderedTypeTripletPredicate(o)
13019 
13020 
13021 # Register OrderedTypeTripletPredicate in _IMP_core:
13022 _IMP_core.OrderedTypeTripletPredicate_swigregister(OrderedTypeTripletPredicate)
13023 class AllSameTripletPredicate(IMP.TripletPredicate):
13024  r"""Proxy of C++ IMP::core::AllSameTripletPredicate class."""
13025 
13026  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13027 
13028  def __init__(self, *args):
13029  r"""__init__(AllSameTripletPredicate self, std::string name="AllSameTripletPredicate%1%") -> AllSameTripletPredicate"""
13030  _IMP_core.AllSameTripletPredicate_swiginit(self, _IMP_core.new_AllSameTripletPredicate(*args))
13031 
13032  def do_get_inputs(self, arg2, arg3):
13033  r"""do_get_inputs(AllSameTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13034  return _IMP_core.AllSameTripletPredicate_do_get_inputs(self, arg2, arg3)
13035 
13036  def get_value(self, *args):
13037  r"""
13038  get_value(AllSameTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13039  get_value(AllSameTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13040  """
13041  return _IMP_core.AllSameTripletPredicate_get_value(self, *args)
13042 
13043  def get_value_index(self, *args):
13044  r"""
13045  get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13046  get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13047  """
13048  return _IMP_core.AllSameTripletPredicate_get_value_index(self, *args)
13049 
13050  def get_version_info(self):
13051  r"""get_version_info(AllSameTripletPredicate self) -> VersionInfo"""
13052  return _IMP_core.AllSameTripletPredicate_get_version_info(self)
13053  __swig_destroy__ = _IMP_core.delete_AllSameTripletPredicate
13054 
13055  def __str__(self):
13056  r"""__str__(AllSameTripletPredicate self) -> std::string"""
13057  return _IMP_core.AllSameTripletPredicate___str__(self)
13058 
13059  def __repr__(self):
13060  r"""__repr__(AllSameTripletPredicate self) -> std::string"""
13061  return _IMP_core.AllSameTripletPredicate___repr__(self)
13062 
13063  @staticmethod
13064  def get_from(o):
13065  return _object_cast_to_AllSameTripletPredicate(o)
13066 
13067 
13068  def _get_as_binary(self):
13069  r"""_get_as_binary(AllSameTripletPredicate self) -> PyObject *"""
13070  return _IMP_core.AllSameTripletPredicate__get_as_binary(self)
13071 
13072  def _set_from_binary(self, p):
13073  r"""_set_from_binary(AllSameTripletPredicate self, PyObject * p)"""
13074  return _IMP_core.AllSameTripletPredicate__set_from_binary(self, p)
13075 
13076  def __getstate__(self):
13077  p = self._get_as_binary()
13078  if len(self.__dict__) > 1:
13079  d = self.__dict__.copy()
13080  del d['this']
13081  p = (d, p)
13082  return p
13083 
13084  def __setstate__(self, p):
13085  if not hasattr(self, 'this'):
13086  self.__init__()
13087  if isinstance(p, tuple):
13088  d, p = p
13089  self.__dict__.update(d)
13090  return self._set_from_binary(p)
13091 
13092 
13093 # Register AllSameTripletPredicate in _IMP_core:
13094 _IMP_core.AllSameTripletPredicate_swigregister(AllSameTripletPredicate)
13095 class CoinFlipTripletPredicate(IMP.TripletPredicate):
13096  r"""Proxy of C++ IMP::core::CoinFlipTripletPredicate class."""
13097 
13098  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13099 
13100  def __init__(self, *args):
13101  r"""__init__(CoinFlipTripletPredicate self, double p, std::string name="CoinFlipTripletPredicate%1%") -> CoinFlipTripletPredicate"""
13102  _IMP_core.CoinFlipTripletPredicate_swiginit(self, _IMP_core.new_CoinFlipTripletPredicate(*args))
13103 
13104  def do_get_inputs(self, arg2, arg3):
13105  r"""do_get_inputs(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13106  return _IMP_core.CoinFlipTripletPredicate_do_get_inputs(self, arg2, arg3)
13107 
13108  def get_value(self, *args):
13109  r"""
13110  get_value(CoinFlipTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13111  get_value(CoinFlipTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13112  """
13113  return _IMP_core.CoinFlipTripletPredicate_get_value(self, *args)
13114 
13115  def get_value_index(self, *args):
13116  r"""
13117  get_value_index(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
13118  get_value_index(CoinFlipTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13119  """
13120  return _IMP_core.CoinFlipTripletPredicate_get_value_index(self, *args)
13121 
13122  def get_version_info(self):
13123  r"""get_version_info(CoinFlipTripletPredicate self) -> VersionInfo"""
13124  return _IMP_core.CoinFlipTripletPredicate_get_version_info(self)
13125  __swig_destroy__ = _IMP_core.delete_CoinFlipTripletPredicate
13126 
13127  def __str__(self):
13128  r"""__str__(CoinFlipTripletPredicate self) -> std::string"""
13129  return _IMP_core.CoinFlipTripletPredicate___str__(self)
13130 
13131  def __repr__(self):
13132  r"""__repr__(CoinFlipTripletPredicate self) -> std::string"""
13133  return _IMP_core.CoinFlipTripletPredicate___repr__(self)
13134 
13135  @staticmethod
13136  def get_from(o):
13137  return _object_cast_to_CoinFlipTripletPredicate(o)
13138 
13139 
13140 # Register CoinFlipTripletPredicate in _IMP_core:
13141 _IMP_core.CoinFlipTripletPredicate_swigregister(CoinFlipTripletPredicate)
13142 class ConstantQuadPredicate(IMP.QuadPredicate):
13143  r"""Proxy of C++ IMP::core::ConstantQuadPredicate class."""
13144 
13145  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13146 
13147  def __init__(self, *args):
13148  r"""
13149  __init__(ConstantQuadPredicate self, int v, std::string name="ConstQuadPredicate%1%") -> ConstantQuadPredicate
13150  __init__(ConstantQuadPredicate self) -> ConstantQuadPredicate
13151  """
13152  _IMP_core.ConstantQuadPredicate_swiginit(self, _IMP_core.new_ConstantQuadPredicate(*args))
13153 
13154  def do_get_inputs(self, arg2, arg3):
13155  r"""do_get_inputs(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13156  return _IMP_core.ConstantQuadPredicate_do_get_inputs(self, arg2, arg3)
13157 
13158  def get_value(self, *args):
13159  r"""
13160  get_value(ConstantQuadPredicate self, IMP::ParticleQuad const & a) -> int
13161  get_value(ConstantQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13162  """
13163  return _IMP_core.ConstantQuadPredicate_get_value(self, *args)
13164 
13165  def get_value_index(self, *args):
13166  r"""
13167  get_value_index(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13168  get_value_index(ConstantQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13169  """
13170  return _IMP_core.ConstantQuadPredicate_get_value_index(self, *args)
13171 
13172  def get_version_info(self):
13173  r"""get_version_info(ConstantQuadPredicate self) -> VersionInfo"""
13174  return _IMP_core.ConstantQuadPredicate_get_version_info(self)
13175  __swig_destroy__ = _IMP_core.delete_ConstantQuadPredicate
13176 
13177  def __str__(self):
13178  r"""__str__(ConstantQuadPredicate self) -> std::string"""
13179  return _IMP_core.ConstantQuadPredicate___str__(self)
13180 
13181  def __repr__(self):
13182  r"""__repr__(ConstantQuadPredicate self) -> std::string"""
13183  return _IMP_core.ConstantQuadPredicate___repr__(self)
13184 
13185  @staticmethod
13186  def get_from(o):
13187  return _object_cast_to_ConstantQuadPredicate(o)
13188 
13189 
13190  def _get_as_binary(self):
13191  r"""_get_as_binary(ConstantQuadPredicate self) -> PyObject *"""
13192  return _IMP_core.ConstantQuadPredicate__get_as_binary(self)
13193 
13194  def _set_from_binary(self, p):
13195  r"""_set_from_binary(ConstantQuadPredicate self, PyObject * p)"""
13196  return _IMP_core.ConstantQuadPredicate__set_from_binary(self, p)
13197 
13198  def __getstate__(self):
13199  p = self._get_as_binary()
13200  if len(self.__dict__) > 1:
13201  d = self.__dict__.copy()
13202  del d['this']
13203  p = (d, p)
13204  return p
13205 
13206  def __setstate__(self, p):
13207  if not hasattr(self, 'this'):
13208  self.__init__()
13209  if isinstance(p, tuple):
13210  d, p = p
13211  self.__dict__.update(d)
13212  return self._set_from_binary(p)
13213 
13214 
13215 # Register ConstantQuadPredicate in _IMP_core:
13216 _IMP_core.ConstantQuadPredicate_swigregister(ConstantQuadPredicate)
13217 class UnorderedTypeQuadPredicate(IMP.QuadPredicate):
13218  r"""Proxy of C++ IMP::core::UnorderedTypeQuadPredicate class."""
13219 
13220  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13221 
13222  def __init__(self, *args):
13223  r"""__init__(UnorderedTypeQuadPredicate self, std::string name="UnorderedTypeQuadPredicate%1%") -> UnorderedTypeQuadPredicate"""
13224  _IMP_core.UnorderedTypeQuadPredicate_swiginit(self, _IMP_core.new_UnorderedTypeQuadPredicate(*args))
13225 
13226  def do_get_inputs(self, m, pis):
13227  r"""do_get_inputs(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13228  return _IMP_core.UnorderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13229 
13230  def get_value(self, *args):
13231  r"""
13232  get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13233  get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13234  """
13235  return _IMP_core.UnorderedTypeQuadPredicate_get_value(self, *args)
13236 
13237  def get_value_index(self, *args):
13238  r"""
13239  get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13240  get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13241  """
13242  return _IMP_core.UnorderedTypeQuadPredicate_get_value_index(self, *args)
13243 
13244  def get_version_info(self):
13245  r"""get_version_info(UnorderedTypeQuadPredicate self) -> VersionInfo"""
13246  return _IMP_core.UnorderedTypeQuadPredicate_get_version_info(self)
13247  __swig_destroy__ = _IMP_core.delete_UnorderedTypeQuadPredicate
13248 
13249  def __str__(self):
13250  r"""__str__(UnorderedTypeQuadPredicate self) -> std::string"""
13251  return _IMP_core.UnorderedTypeQuadPredicate___str__(self)
13252 
13253  def __repr__(self):
13254  r"""__repr__(UnorderedTypeQuadPredicate self) -> std::string"""
13255  return _IMP_core.UnorderedTypeQuadPredicate___repr__(self)
13256 
13257  @staticmethod
13258  def get_from(o):
13259  return _object_cast_to_UnorderedTypeQuadPredicate(o)
13260 
13261 
13262  def _get_as_binary(self):
13263  r"""_get_as_binary(UnorderedTypeQuadPredicate self) -> PyObject *"""
13264  return _IMP_core.UnorderedTypeQuadPredicate__get_as_binary(self)
13265 
13266  def _set_from_binary(self, p):
13267  r"""_set_from_binary(UnorderedTypeQuadPredicate self, PyObject * p)"""
13268  return _IMP_core.UnorderedTypeQuadPredicate__set_from_binary(self, p)
13269 
13270  def __getstate__(self):
13271  p = self._get_as_binary()
13272  if len(self.__dict__) > 1:
13273  d = self.__dict__.copy()
13274  del d['this']
13275  p = (d, p)
13276  return p
13277 
13278  def __setstate__(self, p):
13279  if not hasattr(self, 'this'):
13280  self.__init__()
13281  if isinstance(p, tuple):
13282  d, p = p
13283  self.__dict__.update(d)
13284  return self._set_from_binary(p)
13285 
13286 
13287 # Register UnorderedTypeQuadPredicate in _IMP_core:
13288 _IMP_core.UnorderedTypeQuadPredicate_swigregister(UnorderedTypeQuadPredicate)
13289 class OrderedTypeQuadPredicate(IMP.QuadPredicate):
13290  r"""Proxy of C++ IMP::core::OrderedTypeQuadPredicate class."""
13291 
13292  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13293 
13294  def __init__(self, *args):
13295  r"""__init__(OrderedTypeQuadPredicate self, std::string name="OrderedTypeQuadPredicate%1%") -> OrderedTypeQuadPredicate"""
13296  _IMP_core.OrderedTypeQuadPredicate_swiginit(self, _IMP_core.new_OrderedTypeQuadPredicate(*args))
13297 
13298  def do_get_inputs(self, m, pis):
13299  r"""do_get_inputs(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13300  return _IMP_core.OrderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13301 
13302  def get_value(self, *args):
13303  r"""
13304  get_value(OrderedTypeQuadPredicate self, IMP::core::ParticleTypes const & types) -> int
13305  get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13306  get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13307  """
13308  return _IMP_core.OrderedTypeQuadPredicate_get_value(self, *args)
13309 
13310  def get_value_index(self, *args):
13311  r"""
13312  get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13313  get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13314  """
13315  return _IMP_core.OrderedTypeQuadPredicate_get_value_index(self, *args)
13316 
13317  def get_version_info(self):
13318  r"""get_version_info(OrderedTypeQuadPredicate self) -> VersionInfo"""
13319  return _IMP_core.OrderedTypeQuadPredicate_get_version_info(self)
13320  __swig_destroy__ = _IMP_core.delete_OrderedTypeQuadPredicate
13321 
13322  def __str__(self):
13323  r"""__str__(OrderedTypeQuadPredicate self) -> std::string"""
13324  return _IMP_core.OrderedTypeQuadPredicate___str__(self)
13325 
13326  def __repr__(self):
13327  r"""__repr__(OrderedTypeQuadPredicate self) -> std::string"""
13328  return _IMP_core.OrderedTypeQuadPredicate___repr__(self)
13329 
13330  @staticmethod
13331  def get_from(o):
13332  return _object_cast_to_OrderedTypeQuadPredicate(o)
13333 
13334 
13335 # Register OrderedTypeQuadPredicate in _IMP_core:
13336 _IMP_core.OrderedTypeQuadPredicate_swigregister(OrderedTypeQuadPredicate)
13337 class AllSameQuadPredicate(IMP.QuadPredicate):
13338  r"""Proxy of C++ IMP::core::AllSameQuadPredicate class."""
13339 
13340  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13341 
13342  def __init__(self, *args):
13343  r"""__init__(AllSameQuadPredicate self, std::string name="AllSameQuadPredicate%1%") -> AllSameQuadPredicate"""
13344  _IMP_core.AllSameQuadPredicate_swiginit(self, _IMP_core.new_AllSameQuadPredicate(*args))
13345 
13346  def do_get_inputs(self, arg2, arg3):
13347  r"""do_get_inputs(AllSameQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13348  return _IMP_core.AllSameQuadPredicate_do_get_inputs(self, arg2, arg3)
13349 
13350  def get_value(self, *args):
13351  r"""
13352  get_value(AllSameQuadPredicate self, IMP::ParticleQuad const & a) -> int
13353  get_value(AllSameQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13354  """
13355  return _IMP_core.AllSameQuadPredicate_get_value(self, *args)
13356 
13357  def get_value_index(self, *args):
13358  r"""
13359  get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13360  get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13361  """
13362  return _IMP_core.AllSameQuadPredicate_get_value_index(self, *args)
13363 
13364  def get_version_info(self):
13365  r"""get_version_info(AllSameQuadPredicate self) -> VersionInfo"""
13366  return _IMP_core.AllSameQuadPredicate_get_version_info(self)
13367  __swig_destroy__ = _IMP_core.delete_AllSameQuadPredicate
13368 
13369  def __str__(self):
13370  r"""__str__(AllSameQuadPredicate self) -> std::string"""
13371  return _IMP_core.AllSameQuadPredicate___str__(self)
13372 
13373  def __repr__(self):
13374  r"""__repr__(AllSameQuadPredicate self) -> std::string"""
13375  return _IMP_core.AllSameQuadPredicate___repr__(self)
13376 
13377  @staticmethod
13378  def get_from(o):
13379  return _object_cast_to_AllSameQuadPredicate(o)
13380 
13381 
13382  def _get_as_binary(self):
13383  r"""_get_as_binary(AllSameQuadPredicate self) -> PyObject *"""
13384  return _IMP_core.AllSameQuadPredicate__get_as_binary(self)
13385 
13386  def _set_from_binary(self, p):
13387  r"""_set_from_binary(AllSameQuadPredicate self, PyObject * p)"""
13388  return _IMP_core.AllSameQuadPredicate__set_from_binary(self, p)
13389 
13390  def __getstate__(self):
13391  p = self._get_as_binary()
13392  if len(self.__dict__) > 1:
13393  d = self.__dict__.copy()
13394  del d['this']
13395  p = (d, p)
13396  return p
13397 
13398  def __setstate__(self, p):
13399  if not hasattr(self, 'this'):
13400  self.__init__()
13401  if isinstance(p, tuple):
13402  d, p = p
13403  self.__dict__.update(d)
13404  return self._set_from_binary(p)
13405 
13406 
13407 # Register AllSameQuadPredicate in _IMP_core:
13408 _IMP_core.AllSameQuadPredicate_swigregister(AllSameQuadPredicate)
13409 class CoinFlipQuadPredicate(IMP.QuadPredicate):
13410  r"""Proxy of C++ IMP::core::CoinFlipQuadPredicate class."""
13411 
13412  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13413 
13414  def __init__(self, *args):
13415  r"""__init__(CoinFlipQuadPredicate self, double p, std::string name="CoinFlipQuadPredicate%1%") -> CoinFlipQuadPredicate"""
13416  _IMP_core.CoinFlipQuadPredicate_swiginit(self, _IMP_core.new_CoinFlipQuadPredicate(*args))
13417 
13418  def do_get_inputs(self, arg2, arg3):
13419  r"""do_get_inputs(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13420  return _IMP_core.CoinFlipQuadPredicate_do_get_inputs(self, arg2, arg3)
13421 
13422  def get_value(self, *args):
13423  r"""
13424  get_value(CoinFlipQuadPredicate self, IMP::ParticleQuad const & a) -> int
13425  get_value(CoinFlipQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13426  """
13427  return _IMP_core.CoinFlipQuadPredicate_get_value(self, *args)
13428 
13429  def get_value_index(self, *args):
13430  r"""
13431  get_value_index(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13432  get_value_index(CoinFlipQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13433  """
13434  return _IMP_core.CoinFlipQuadPredicate_get_value_index(self, *args)
13435 
13436  def get_version_info(self):
13437  r"""get_version_info(CoinFlipQuadPredicate self) -> VersionInfo"""
13438  return _IMP_core.CoinFlipQuadPredicate_get_version_info(self)
13439  __swig_destroy__ = _IMP_core.delete_CoinFlipQuadPredicate
13440 
13441  def __str__(self):
13442  r"""__str__(CoinFlipQuadPredicate self) -> std::string"""
13443  return _IMP_core.CoinFlipQuadPredicate___str__(self)
13444 
13445  def __repr__(self):
13446  r"""__repr__(CoinFlipQuadPredicate self) -> std::string"""
13447  return _IMP_core.CoinFlipQuadPredicate___repr__(self)
13448 
13449  @staticmethod
13450  def get_from(o):
13451  return _object_cast_to_CoinFlipQuadPredicate(o)
13452 
13453 
13454 # Register CoinFlipQuadPredicate in _IMP_core:
13455 _IMP_core.CoinFlipQuadPredicate_swigregister(CoinFlipQuadPredicate)
13456 class InBoundingBox3DSingletonPredicate(IMP.SingletonPredicate):
13457  r"""Proxy of C++ IMP::core::InBoundingBox3DSingletonPredicate class."""
13458 
13459  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13460 
13461  def __init__(self, *args):
13462  r"""__init__(InBoundingBox3DSingletonPredicate self, BoundingBox3D bb, std::string name="InBoundingBox3DSingletonPredicate%1%") -> InBoundingBox3DSingletonPredicate"""
13463  _IMP_core.InBoundingBox3DSingletonPredicate_swiginit(self, _IMP_core.new_InBoundingBox3DSingletonPredicate(*args))
13464 
13465  def do_get_inputs(self, m, pi):
13466  r"""do_get_inputs(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13467  return _IMP_core.InBoundingBox3DSingletonPredicate_do_get_inputs(self, m, pi)
13468 
13469  def get_value(self, *args):
13470  r"""
13471  get_value(InBoundingBox3DSingletonPredicate self, Particle a) -> int
13472  get_value(InBoundingBox3DSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13473  """
13474  return _IMP_core.InBoundingBox3DSingletonPredicate_get_value(self, *args)
13475 
13476  def get_value_index(self, *args):
13477  r"""
13478  get_value_index(InBoundingBox3DSingletonPredicate self, Model m, ParticleIndex pi) -> int
13479  get_value_index(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13480  """
13481  return _IMP_core.InBoundingBox3DSingletonPredicate_get_value_index(self, *args)
13482 
13483  def get_version_info(self):
13484  r"""get_version_info(InBoundingBox3DSingletonPredicate self) -> VersionInfo"""
13485  return _IMP_core.InBoundingBox3DSingletonPredicate_get_version_info(self)
13486  __swig_destroy__ = _IMP_core.delete_InBoundingBox3DSingletonPredicate
13487 
13488  def __str__(self):
13489  r"""__str__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13490  return _IMP_core.InBoundingBox3DSingletonPredicate___str__(self)
13491 
13492  def __repr__(self):
13493  r"""__repr__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13494  return _IMP_core.InBoundingBox3DSingletonPredicate___repr__(self)
13495 
13496  @staticmethod
13497  def get_from(o):
13498  return _object_cast_to_InBoundingBox3DSingletonPredicate(o)
13499 
13500 
13501 # Register InBoundingBox3DSingletonPredicate in _IMP_core:
13502 _IMP_core.InBoundingBox3DSingletonPredicate_swigregister(InBoundingBox3DSingletonPredicate)
13503 class AttributeSingletonPredicate(IMP.SingletonPredicate):
13504  r"""Proxy of C++ IMP::core::AttributeSingletonPredicate class."""
13505 
13506  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13507 
13508  def __init__(self, *args):
13509  r"""__init__(AttributeSingletonPredicate self, IntKey bb, std::string name="AttributeSingletonPredicate%1%") -> AttributeSingletonPredicate"""
13510  _IMP_core.AttributeSingletonPredicate_swiginit(self, _IMP_core.new_AttributeSingletonPredicate(*args))
13511 
13512  def do_get_inputs(self, m, pi):
13513  r"""do_get_inputs(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13514  return _IMP_core.AttributeSingletonPredicate_do_get_inputs(self, m, pi)
13515 
13516  def get_value(self, *args):
13517  r"""
13518  get_value(AttributeSingletonPredicate self, Particle a) -> int
13519  get_value(AttributeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13520  """
13521  return _IMP_core.AttributeSingletonPredicate_get_value(self, *args)
13522 
13523  def get_value_index(self, *args):
13524  r"""
13525  get_value_index(AttributeSingletonPredicate self, Model m, ParticleIndex pi) -> int
13526  get_value_index(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13527  """
13528  return _IMP_core.AttributeSingletonPredicate_get_value_index(self, *args)
13529 
13530  def get_version_info(self):
13531  r"""get_version_info(AttributeSingletonPredicate self) -> VersionInfo"""
13532  return _IMP_core.AttributeSingletonPredicate_get_version_info(self)
13533  __swig_destroy__ = _IMP_core.delete_AttributeSingletonPredicate
13534 
13535  def __str__(self):
13536  r"""__str__(AttributeSingletonPredicate self) -> std::string"""
13537  return _IMP_core.AttributeSingletonPredicate___str__(self)
13538 
13539  def __repr__(self):
13540  r"""__repr__(AttributeSingletonPredicate self) -> std::string"""
13541  return _IMP_core.AttributeSingletonPredicate___repr__(self)
13542 
13543  @staticmethod
13544  def get_from(o):
13545  return _object_cast_to_AttributeSingletonPredicate(o)
13546 
13547 
13548 # Register AttributeSingletonPredicate in _IMP_core:
13549 _IMP_core.AttributeSingletonPredicate_swigregister(AttributeSingletonPredicate)
13550 class IsCollisionPairPredicate(IMP.PairPredicate):
13551  r"""Proxy of C++ IMP::core::IsCollisionPairPredicate class."""
13552 
13553  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13554 
13555  def __init__(self, *args):
13556  r"""__init__(IsCollisionPairPredicate self, std::string name="CollisionPairPredicate%1%") -> IsCollisionPairPredicate"""
13557  _IMP_core.IsCollisionPairPredicate_swiginit(self, _IMP_core.new_IsCollisionPairPredicate(*args))
13558 
13559  def do_get_inputs(self, m, pi):
13560  r"""do_get_inputs(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13561  return _IMP_core.IsCollisionPairPredicate_do_get_inputs(self, m, pi)
13562 
13563  def get_value(self, *args):
13564  r"""
13565  get_value(IsCollisionPairPredicate self, IMP::ParticlePair const & a) -> int
13566  get_value(IsCollisionPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
13567  """
13568  return _IMP_core.IsCollisionPairPredicate_get_value(self, *args)
13569 
13570  def get_value_index(self, *args):
13571  r"""
13572  get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
13573  get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
13574  """
13575  return _IMP_core.IsCollisionPairPredicate_get_value_index(self, *args)
13576 
13577  def get_version_info(self):
13578  r"""get_version_info(IsCollisionPairPredicate self) -> VersionInfo"""
13579  return _IMP_core.IsCollisionPairPredicate_get_version_info(self)
13580  __swig_destroy__ = _IMP_core.delete_IsCollisionPairPredicate
13581 
13582  def __str__(self):
13583  r"""__str__(IsCollisionPairPredicate self) -> std::string"""
13584  return _IMP_core.IsCollisionPairPredicate___str__(self)
13585 
13586  def __repr__(self):
13587  r"""__repr__(IsCollisionPairPredicate self) -> std::string"""
13588  return _IMP_core.IsCollisionPairPredicate___repr__(self)
13589 
13590  @staticmethod
13591  def get_from(o):
13592  return _object_cast_to_IsCollisionPairPredicate(o)
13593 
13594 
13595 # Register IsCollisionPairPredicate in _IMP_core:
13596 _IMP_core.IsCollisionPairPredicate_swigregister(IsCollisionPairPredicate)
13597 class AngleRestraint(TripletRestraint):
13598  r"""Proxy of C++ IMP::core::AngleRestraint class."""
13599 
13600  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13601 
13602  def __init__(self, *args):
13603  r"""
13604  __init__(AngleRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3) -> AngleRestraint
13605  __init__(AngleRestraint self) -> AngleRestraint
13606  """
13607  _IMP_core.AngleRestraint_swiginit(self, _IMP_core.new_AngleRestraint(*args))
13608  __swig_destroy__ = _IMP_core.delete_AngleRestraint
13609 
13610  def __str__(self):
13611  r"""__str__(AngleRestraint self) -> std::string"""
13612  return _IMP_core.AngleRestraint___str__(self)
13613 
13614  def __repr__(self):
13615  r"""__repr__(AngleRestraint self) -> std::string"""
13616  return _IMP_core.AngleRestraint___repr__(self)
13617 
13618  @staticmethod
13619  def get_from(o):
13620  return _object_cast_to_AngleRestraint(o)
13621 
13622 
13623  def _get_as_binary(self):
13624  r"""_get_as_binary(AngleRestraint self) -> PyObject *"""
13625  return _IMP_core.AngleRestraint__get_as_binary(self)
13626 
13627  def _set_from_binary(self, p):
13628  r"""_set_from_binary(AngleRestraint self, PyObject * p)"""
13629  return _IMP_core.AngleRestraint__set_from_binary(self, p)
13630 
13631  def __getstate__(self):
13632  p = self._get_as_binary()
13633  if len(self.__dict__) > 1:
13634  d = self.__dict__.copy()
13635  del d['this']
13636  p = (d, p)
13637  return p
13638 
13639  def __setstate__(self, p):
13640  if not hasattr(self, 'this'):
13641  self.__init__()
13642  if isinstance(p, tuple):
13643  d, p = p
13644  self.__dict__.update(d)
13645  return self._set_from_binary(p)
13646 
13647 
13648 # Register AngleRestraint in _IMP_core:
13649 _IMP_core.AngleRestraint_swigregister(AngleRestraint)
13650 class RigidBodyMover(MonteCarloMover):
13651  r"""Proxy of C++ IMP::core::RigidBodyMover class."""
13652 
13653  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13654 
13655  def __init__(self, *args):
13656  r"""
13657  __init__(RigidBodyMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation) -> RigidBodyMover
13658  __init__(RigidBodyMover self) -> RigidBodyMover
13659  """
13660  _IMP_core.RigidBodyMover_swiginit(self, _IMP_core.new_RigidBodyMover(*args))
13661 
13662  def set_maximum_translation(self, mt):
13663  r"""set_maximum_translation(RigidBodyMover self, IMP::Float mt)"""
13664  return _IMP_core.RigidBodyMover_set_maximum_translation(self, mt)
13665 
13666  def set_maximum_rotation(self, mr):
13667  r"""set_maximum_rotation(RigidBodyMover self, IMP::Float mr)"""
13668  return _IMP_core.RigidBodyMover_set_maximum_rotation(self, mr)
13669 
13670  def get_maximum_translation(self):
13671  r"""get_maximum_translation(RigidBodyMover self) -> IMP::Float"""
13672  return _IMP_core.RigidBodyMover_get_maximum_translation(self)
13673 
13674  def get_maximum_rotation(self):
13675  r"""get_maximum_rotation(RigidBodyMover self) -> IMP::Float"""
13676  return _IMP_core.RigidBodyMover_get_maximum_rotation(self)
13677 
13678  def get_index(self):
13679  r"""get_index(RigidBodyMover self) -> ParticleIndex"""
13680  return _IMP_core.RigidBodyMover_get_index(self)
13681 
13682  def get_version_info(self):
13683  r"""get_version_info(RigidBodyMover self) -> VersionInfo"""
13684  return _IMP_core.RigidBodyMover_get_version_info(self)
13685  __swig_destroy__ = _IMP_core.delete_RigidBodyMover
13686 
13687  def __str__(self):
13688  r"""__str__(RigidBodyMover self) -> std::string"""
13689  return _IMP_core.RigidBodyMover___str__(self)
13690 
13691  def __repr__(self):
13692  r"""__repr__(RigidBodyMover self) -> std::string"""
13693  return _IMP_core.RigidBodyMover___repr__(self)
13694 
13695  @staticmethod
13696  def get_from(o):
13697  return _object_cast_to_RigidBodyMover(o)
13698 
13699 
13700  def _get_as_binary(self):
13701  r"""_get_as_binary(RigidBodyMover self) -> PyObject *"""
13702  return _IMP_core.RigidBodyMover__get_as_binary(self)
13703 
13704  def _set_from_binary(self, p):
13705  r"""_set_from_binary(RigidBodyMover self, PyObject * p)"""
13706  return _IMP_core.RigidBodyMover__set_from_binary(self, p)
13707 
13708  def __getstate__(self):
13709  p = self._get_as_binary()
13710  if len(self.__dict__) > 1:
13711  d = self.__dict__.copy()
13712  del d['this']
13713  p = (d, p)
13714  return p
13715 
13716  def __setstate__(self, p):
13717  if not hasattr(self, 'this'):
13718  self.__init__()
13719  if isinstance(p, tuple):
13720  d, p = p
13721  self.__dict__.update(d)
13722  return self._set_from_binary(p)
13723 
13724 
13725  def _get_jax(self):
13726  import jax.random
13727  import IMP.core._jax_rigid
13728  from IMP.algebra._jax_util import (get_random_vector_on_3d_sphere,
13729  get_random_vector_in_3d_sphere,
13730  get_rotation_about_normalized_axis,
13731  _quaternion_multiply)
13732  max_angle = self.get_maximum_rotation()
13733  max_translation = self.get_maximum_translation()
13734  particle_index = self.get_index()
13735  body_index = IMP.core._jax_rigid._get_rigid_body_index(
13736  self.get_model(), self.get_index())
13737 
13738  def init_func(key):
13739  return key
13740 
13741  def propose_func(jm, key):
13742  body = jm['rigid_bodies'].bodies[body_index]
13743  tf = body.get_transformation(jm)
13744 
13745  if max_translation > 0:
13746  key, subkey = jax.random.split(key)
13747  tf.translation += get_random_vector_in_3d_sphere(
13748  subkey, max_translation)[0]
13749  if max_angle > 0:
13750  key, subkey1, subkey2 = jax.random.split(key, 3)
13751  axis_norm = get_random_vector_on_3d_sphere(subkey1, 1.0)[0]
13752  angle = jax.random.uniform(
13753  subkey2, minval=-max_angle, maxval=max_angle)
13754  rotation = get_rotation_about_normalized_axis(axis_norm, angle)
13755  tf.rotation = _quaternion_multiply(rotation, tf.rotation)
13756  jm = body.set_transformation_lazy(tf, jm)
13757  return jm, key, 1.0
13758 
13759  return self._wrap_jax(init_func, propose_func, keys=['rigid_bodies'])
13760 
13761 
13762 # Register RigidBodyMover in _IMP_core:
13763 _IMP_core.RigidBodyMover_swigregister(RigidBodyMover)
13764 class RigidBodyTunneler(MonteCarloMover):
13765  r"""Proxy of C++ IMP::core::RigidBodyTunneler class."""
13766 
13767  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13768 
13769  def __init__(self, m, pis, ref, k, move_probability=1.):
13770  r"""__init__(RigidBodyTunneler self, Model m, IMP::ParticleIndexes pis, ParticleIndex ref, double k, double move_probability=1.) -> RigidBodyTunneler"""
13771  _IMP_core.RigidBodyTunneler_swiginit(self, _IMP_core.new_RigidBodyTunneler(m, pis, ref, k, move_probability))
13772 
13773  def add_entry_point(self, fl):
13774  r"""add_entry_point(RigidBodyTunneler self, IMP::Floats fl)"""
13775  return _IMP_core.RigidBodyTunneler_add_entry_point(self, fl)
13776 
13777  def reset_stats(self):
13778  r"""reset_stats(RigidBodyTunneler self)"""
13779  return _IMP_core.RigidBodyTunneler_reset_stats(self)
13780 
13781  def get_number_of_rejected_moves(self):
13782  r"""get_number_of_rejected_moves(RigidBodyTunneler self) -> unsigned int"""
13783  return _IMP_core.RigidBodyTunneler_get_number_of_rejected_moves(self)
13784 
13785  def get_number_of_proposed_moves(self):
13786  r"""get_number_of_proposed_moves(RigidBodyTunneler self) -> unsigned int"""
13787  return _IMP_core.RigidBodyTunneler_get_number_of_proposed_moves(self)
13788 
13789  def get_number_of_impossible_moves(self):
13790  r"""get_number_of_impossible_moves(RigidBodyTunneler self) -> unsigned int"""
13791  return _IMP_core.RigidBodyTunneler_get_number_of_impossible_moves(self)
13792 
13793  def get_number_of_calls(self):
13794  r"""get_number_of_calls(RigidBodyTunneler self) -> unsigned int"""
13795  return _IMP_core.RigidBodyTunneler_get_number_of_calls(self)
13796 
13797  @staticmethod
13798  def get_reduced_coordinates(*args):
13799  r"""
13800  get_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref) -> IMP::Floats
13801  get_reduced_coordinates(Model m, ParticleIndex pi) -> IMP::Floats
13802  """
13803  return _IMP_core.RigidBodyTunneler_get_reduced_coordinates(*args)
13804 
13805  @staticmethod
13806  def set_reduced_coordinates(m, target, ref, coords):
13807  r"""set_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref, IMP::Floats coords)"""
13808  return _IMP_core.RigidBodyTunneler_set_reduced_coordinates(m, target, ref, coords)
13809 
13810  def get_version_info(self):
13811  r"""get_version_info(RigidBodyTunneler self) -> VersionInfo"""
13812  return _IMP_core.RigidBodyTunneler_get_version_info(self)
13813  __swig_destroy__ = _IMP_core.delete_RigidBodyTunneler
13814 
13815  def __str__(self):
13816  r"""__str__(RigidBodyTunneler self) -> std::string"""
13817  return _IMP_core.RigidBodyTunneler___str__(self)
13818 
13819  def __repr__(self):
13820  r"""__repr__(RigidBodyTunneler self) -> std::string"""
13821  return _IMP_core.RigidBodyTunneler___repr__(self)
13822 
13823  @staticmethod
13824  def get_from(o):
13825  return _object_cast_to_RigidBodyTunneler(o)
13826 
13827 
13828 # Register RigidBodyTunneler in _IMP_core:
13829 _IMP_core.RigidBodyTunneler_swigregister(RigidBodyTunneler)
13830 class RigidBodyUmbrella(IMP.Restraint):
13831  r"""Proxy of C++ IMP::core::RigidBodyUmbrella class."""
13832 
13833  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13834 
13835  def __init__(self, *args):
13836  r"""
13837  __init__(RigidBodyUmbrella self, Model m, ParticleIndex pi, ParticleIndex ref, IMP::Floats x0, double alpha, double k, std::string name="RigidBodyUmbrella %1%") -> RigidBodyUmbrella
13838  __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
13839  """
13840  _IMP_core.RigidBodyUmbrella_swiginit(self, _IMP_core.new_RigidBodyUmbrella(*args))
13841 
13842  def set_x0(self, *args):
13843  r"""
13844  set_x0(RigidBodyUmbrella self, IMP::Floats x0)
13845  set_x0(RigidBodyUmbrella self, double _lambda, IMP::Floats x1, IMP::Floats x2)
13846  """
13847  return _IMP_core.RigidBodyUmbrella_set_x0(self, *args)
13848 
13849  def get_x0(self):
13850  r"""get_x0(RigidBodyUmbrella self) -> IMP::Floats"""
13851  return _IMP_core.RigidBodyUmbrella_get_x0(self)
13852 
13853  def get_x(self):
13854  r"""get_x(RigidBodyUmbrella self) -> IMP::Floats"""
13855  return _IMP_core.RigidBodyUmbrella_get_x(self)
13856 
13857  def set_alpha(self, alpha):
13858  r"""set_alpha(RigidBodyUmbrella self, double alpha)"""
13859  return _IMP_core.RigidBodyUmbrella_set_alpha(self, alpha)
13860 
13861  def set_k(self, k):
13862  r"""set_k(RigidBodyUmbrella self, double k)"""
13863  return _IMP_core.RigidBodyUmbrella_set_k(self, k)
13864 
13865  def get_version_info(self):
13866  r"""get_version_info(RigidBodyUmbrella self) -> VersionInfo"""
13867  return _IMP_core.RigidBodyUmbrella_get_version_info(self)
13868  __swig_destroy__ = _IMP_core.delete_RigidBodyUmbrella
13869 
13870  def __str__(self):
13871  r"""__str__(RigidBodyUmbrella self) -> std::string"""
13872  return _IMP_core.RigidBodyUmbrella___str__(self)
13873 
13874  def __repr__(self):
13875  r"""__repr__(RigidBodyUmbrella self) -> std::string"""
13876  return _IMP_core.RigidBodyUmbrella___repr__(self)
13877 
13878  @staticmethod
13879  def get_from(o):
13880  return _object_cast_to_RigidBodyUmbrella(o)
13881 
13882 
13883 # Register RigidBodyUmbrella in _IMP_core:
13884 _IMP_core.RigidBodyUmbrella_swigregister(RigidBodyUmbrella)
13885 class VolumeRestraint(IMP.Restraint):
13886  r"""Proxy of C++ IMP::core::VolumeRestraint class."""
13887 
13888  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13889 
13890  def __init__(self, f, sc, volume):
13891  r"""__init__(VolumeRestraint self, UnaryFunction f, SingletonContainer sc, double volume) -> VolumeRestraint"""
13892  _IMP_core.VolumeRestraint_swiginit(self, _IMP_core.new_VolumeRestraint(f, sc, volume))
13893 
13894  def do_get_inputs(self):
13895  r"""do_get_inputs(VolumeRestraint self) -> IMP::ModelObjectsTemp"""
13896  return _IMP_core.VolumeRestraint_do_get_inputs(self)
13897 
13898  def get_version_info(self):
13899  r"""get_version_info(VolumeRestraint self) -> VersionInfo"""
13900  return _IMP_core.VolumeRestraint_get_version_info(self)
13901  __swig_destroy__ = _IMP_core.delete_VolumeRestraint
13902 
13903  def __str__(self):
13904  r"""__str__(VolumeRestraint self) -> std::string"""
13905  return _IMP_core.VolumeRestraint___str__(self)
13906 
13907  def __repr__(self):
13908  r"""__repr__(VolumeRestraint self) -> std::string"""
13909  return _IMP_core.VolumeRestraint___repr__(self)
13910 
13911  @staticmethod
13912  def get_from(o):
13913  return _object_cast_to_VolumeRestraint(o)
13914 
13915 
13916 # Register VolumeRestraint in _IMP_core:
13917 _IMP_core.VolumeRestraint_swigregister(VolumeRestraint)
13918 
13919 def get_centroid(ps):
13920  r"""get_centroid(IMP::core::XYZs const & ps) -> Vector3D"""
13921  return _IMP_core.get_centroid(ps)
13922 
13923 def get_bounding_box(ps):
13924  r"""get_bounding_box(IMP::core::XYZRs const & ps) -> BoundingBox3D"""
13925  return _IMP_core.get_bounding_box(ps)
13926 class MoveStatisticsScoreState(IMP.ScoreState):
13927  r"""Proxy of C++ IMP::core::MoveStatisticsScoreState class."""
13928 
13929  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13930 
13931  def __init__(self, ps):
13932  r"""__init__(MoveStatisticsScoreState self, IMP::ParticlesTemp const & ps) -> MoveStatisticsScoreState"""
13933  _IMP_core.MoveStatisticsScoreState_swiginit(self, _IMP_core.new_MoveStatisticsScoreState(ps))
13934 
13935  def show_statistics(self, *args):
13936  r"""show_statistics(MoveStatisticsScoreState self, _ostream out=std::cout)"""
13937  return _IMP_core.MoveStatisticsScoreState_show_statistics(self, *args)
13938 
13939  def reset(self):
13940  r"""reset(MoveStatisticsScoreState self)"""
13941  return _IMP_core.MoveStatisticsScoreState_reset(self)
13942 
13943  def do_before_evaluate(self):
13944  r"""do_before_evaluate(MoveStatisticsScoreState self)"""
13945  return _IMP_core.MoveStatisticsScoreState_do_before_evaluate(self)
13946 
13947  def do_after_evaluate(self, da):
13948  r"""do_after_evaluate(MoveStatisticsScoreState self, DerivativeAccumulator da)"""
13949  return _IMP_core.MoveStatisticsScoreState_do_after_evaluate(self, da)
13950 
13951  def do_get_inputs(self):
13952  r"""do_get_inputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
13953  return _IMP_core.MoveStatisticsScoreState_do_get_inputs(self)
13954 
13955  def do_get_outputs(self):
13956  r"""do_get_outputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
13957  return _IMP_core.MoveStatisticsScoreState_do_get_outputs(self)
13958 
13959  def get_version_info(self):
13960  r"""get_version_info(MoveStatisticsScoreState self) -> VersionInfo"""
13961  return _IMP_core.MoveStatisticsScoreState_get_version_info(self)
13962  __swig_destroy__ = _IMP_core.delete_MoveStatisticsScoreState
13963 
13964  def __str__(self):
13965  r"""__str__(MoveStatisticsScoreState self) -> std::string"""
13966  return _IMP_core.MoveStatisticsScoreState___str__(self)
13967 
13968  def __repr__(self):
13969  r"""__repr__(MoveStatisticsScoreState self) -> std::string"""
13970  return _IMP_core.MoveStatisticsScoreState___repr__(self)
13971 
13972  @staticmethod
13973  def get_from(o):
13974  return _object_cast_to_MoveStatisticsScoreState(o)
13975 
13976 
13977 # Register MoveStatisticsScoreState in _IMP_core:
13978 _IMP_core.MoveStatisticsScoreState_swigregister(MoveStatisticsScoreState)
13979 IMP_PARTICLE_TYPE_INDEX = _IMP_core.IMP_PARTICLE_TYPE_INDEX
13980 
13981 class Typed(IMP.Decorator):
13982  r"""Proxy of C++ IMP::core::Typed class."""
13983 
13984  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13985 
13986  @staticmethod
13987  def get_type_key():
13988  r"""get_type_key() -> IntKey"""
13989  return _IMP_core.Typed_get_type_key()
13990 
13991  def __init__(self, *args):
13992  r"""
13993  __init__(Typed self) -> Typed
13994  __init__(Typed self, Model m, ParticleIndex id) -> Typed
13995  __init__(Typed self, _ParticleAdaptor d) -> Typed
13996  """
13997  _IMP_core.Typed_swiginit(self, _IMP_core.new_Typed(*args))
13998 
13999  def show(self, *args):
14000  r"""show(Typed self, _ostream out=std::cout)"""
14001  return _IMP_core.Typed_show(self, *args)
14002 
14003  @staticmethod
14004  def setup_particle(*args):
14005  r"""
14006  setup_particle(Model m, ParticleIndex pi, ParticleType t) -> Typed
14007  setup_particle(_ParticleAdaptor pa, ParticleType t) -> Typed
14008  """
14009  return _IMP_core.Typed_setup_particle(*args)
14010 
14011  @staticmethod
14012  def get_is_setup(*args):
14013  r"""
14014  get_is_setup(_ParticleAdaptor p) -> bool
14015  get_is_setup(Model m, ParticleIndex pi) -> bool
14016  """
14017  return _IMP_core.Typed_get_is_setup(*args)
14018 
14019  def get_type(self):
14020  r"""get_type(Typed self) -> ParticleType"""
14021  return _IMP_core.Typed_get_type(self)
14022 
14023  def set_type(self, pt):
14024  r"""set_type(Typed self, ParticleType pt)"""
14025  return _IMP_core.Typed_set_type(self, pt)
14026 
14027  def add_attribute(self, *args):
14028  r"""
14029  add_attribute(Typed self, FloatKey k, IMP::Float v, bool opt)
14030  add_attribute(Typed self, FloatKey a0, IMP::Float a1)
14031  add_attribute(Typed self, IntKey a0, IMP::Int a1)
14032  add_attribute(Typed self, FloatsKey a0, IMP::Floats a1)
14033  add_attribute(Typed self, IntsKey a0, IMP::Ints a1)
14034  add_attribute(Typed self, StringKey a0, IMP::String a1)
14035  add_attribute(Typed self, ParticleIndexKey a0, Particle a1)
14036  add_attribute(Typed self, ObjectKey a0, Object a1)
14037  add_attribute(Typed self, SparseFloatKey a0, IMP::Float a1)
14038  add_attribute(Typed self, SparseIntKey a0, IMP::Int a1)
14039  add_attribute(Typed self, SparseStringKey a0, IMP::String a1)
14040  add_attribute(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14041  """
14042  return _IMP_core.Typed_add_attribute(self, *args)
14043 
14044  def get_value(self, *args):
14045  r"""
14046  get_value(Typed self, FloatKey a0) -> IMP::Float
14047  get_value(Typed self, IntKey a0) -> IMP::Int
14048  get_value(Typed self, FloatsKey a0) -> IMP::Floats
14049  get_value(Typed self, IntsKey a0) -> IMP::Ints
14050  get_value(Typed self, StringKey a0) -> IMP::String
14051  get_value(Typed self, ParticleIndexKey a0) -> Particle
14052  get_value(Typed self, ObjectKey a0) -> Object
14053  get_value(Typed self, SparseFloatKey a0) -> IMP::Float
14054  get_value(Typed self, SparseIntKey a0) -> IMP::Int
14055  get_value(Typed self, SparseStringKey a0) -> IMP::String
14056  get_value(Typed self, SparseParticleIndexKey a0) -> ParticleIndex
14057  """
14058  return _IMP_core.Typed_get_value(self, *args)
14059 
14060  def set_value(self, *args):
14061  r"""
14062  set_value(Typed self, FloatKey a0, IMP::Float a1)
14063  set_value(Typed self, IntKey a0, IMP::Int a1)
14064  set_value(Typed self, FloatsKey a0, IMP::Floats a1)
14065  set_value(Typed self, IntsKey a0, IMP::Ints a1)
14066  set_value(Typed self, StringKey a0, IMP::String a1)
14067  set_value(Typed self, ParticleIndexKey a0, Particle a1)
14068  set_value(Typed self, ObjectKey a0, Object a1)
14069  set_value(Typed self, SparseFloatKey a0, IMP::Float a1)
14070  set_value(Typed self, SparseIntKey a0, IMP::Int a1)
14071  set_value(Typed self, SparseStringKey a0, IMP::String a1)
14072  set_value(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14073  """
14074  return _IMP_core.Typed_set_value(self, *args)
14075 
14076  def remove_attribute(self, *args):
14077  r"""
14078  remove_attribute(Typed self, FloatKey a0)
14079  remove_attribute(Typed self, IntKey a0)
14080  remove_attribute(Typed self, FloatsKey a0)
14081  remove_attribute(Typed self, IntsKey a0)
14082  remove_attribute(Typed self, StringKey a0)
14083  remove_attribute(Typed self, ParticleIndexKey a0)
14084  remove_attribute(Typed self, ObjectKey a0)
14085  remove_attribute(Typed self, SparseFloatKey a0)
14086  remove_attribute(Typed self, SparseIntKey a0)
14087  remove_attribute(Typed self, SparseStringKey a0)
14088  remove_attribute(Typed self, SparseParticleIndexKey a0)
14089  """
14090  return _IMP_core.Typed_remove_attribute(self, *args)
14091 
14092  def has_attribute(self, *args):
14093  r"""
14094  has_attribute(Typed self, FloatKey a0) -> bool
14095  has_attribute(Typed self, IntKey a0) -> bool
14096  has_attribute(Typed self, FloatsKey a0) -> bool
14097  has_attribute(Typed self, IntsKey a0) -> bool
14098  has_attribute(Typed self, StringKey a0) -> bool
14099  has_attribute(Typed self, ParticleIndexKey a0) -> bool
14100  has_attribute(Typed self, ObjectKey a0) -> bool
14101  has_attribute(Typed self, SparseFloatKey a0) -> bool
14102  has_attribute(Typed self, SparseIntKey a0) -> bool
14103  has_attribute(Typed self, SparseStringKey a0) -> bool
14104  has_attribute(Typed self, SparseParticleIndexKey a0) -> bool
14105  """
14106  return _IMP_core.Typed_has_attribute(self, *args)
14107 
14108  def get_derivative(self, a0):
14109  r"""get_derivative(Typed self, FloatKey a0) -> double"""
14110  return _IMP_core.Typed_get_derivative(self, a0)
14111 
14112  def get_name(self):
14113  r"""get_name(Typed self) -> std::string"""
14114  return _IMP_core.Typed_get_name(self)
14115 
14116  def clear_caches(self):
14117  r"""clear_caches(Typed self)"""
14118  return _IMP_core.Typed_clear_caches(self)
14119 
14120  def set_name(self, a0):
14121  r"""set_name(Typed self, std::string a0)"""
14122  return _IMP_core.Typed_set_name(self, a0)
14123 
14124  def set_check_level(self, a0):
14125  r"""set_check_level(Typed self, IMP::CheckLevel a0)"""
14126  return _IMP_core.Typed_set_check_level(self, a0)
14127 
14128  def add_to_derivative(self, a0, a1, a2):
14129  r"""add_to_derivative(Typed self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14130  return _IMP_core.Typed_add_to_derivative(self, a0, a1, a2)
14131 
14132  def set_is_optimized(self, a0, a1):
14133  r"""set_is_optimized(Typed self, FloatKey a0, bool a1)"""
14134  return _IMP_core.Typed_set_is_optimized(self, a0, a1)
14135 
14136  def get_is_optimized(self, a0):
14137  r"""get_is_optimized(Typed self, FloatKey a0) -> bool"""
14138  return _IMP_core.Typed_get_is_optimized(self, a0)
14139 
14140  def get_check_level(self):
14141  r"""get_check_level(Typed self) -> IMP::CheckLevel"""
14142  return _IMP_core.Typed_get_check_level(self)
14143 
14144  def __eq__(self, *args):
14145  r"""
14146  __eq__(Typed self, Typed o) -> bool
14147  __eq__(Typed self, Particle d) -> bool
14148  """
14149  return _IMP_core.Typed___eq__(self, *args)
14150 
14151  def __ne__(self, *args):
14152  r"""
14153  __ne__(Typed self, Typed o) -> bool
14154  __ne__(Typed self, Particle d) -> bool
14155  """
14156  return _IMP_core.Typed___ne__(self, *args)
14157 
14158  def __le__(self, *args):
14159  r"""
14160  __le__(Typed self, Typed o) -> bool
14161  __le__(Typed self, Particle d) -> bool
14162  """
14163  return _IMP_core.Typed___le__(self, *args)
14164 
14165  def __lt__(self, *args):
14166  r"""
14167  __lt__(Typed self, Typed o) -> bool
14168  __lt__(Typed self, Particle d) -> bool
14169  """
14170  return _IMP_core.Typed___lt__(self, *args)
14171 
14172  def __ge__(self, *args):
14173  r"""
14174  __ge__(Typed self, Typed o) -> bool
14175  __ge__(Typed self, Particle d) -> bool
14176  """
14177  return _IMP_core.Typed___ge__(self, *args)
14178 
14179  def __gt__(self, *args):
14180  r"""
14181  __gt__(Typed self, Typed o) -> bool
14182  __gt__(Typed self, Particle d) -> bool
14183  """
14184  return _IMP_core.Typed___gt__(self, *args)
14185 
14186  def __hash__(self):
14187  r"""__hash__(Typed self) -> std::size_t"""
14188  return _IMP_core.Typed___hash__(self)
14189 
14190  def __str__(self):
14191  r"""__str__(Typed self) -> std::string"""
14192  return _IMP_core.Typed___str__(self)
14193 
14194  def __repr__(self):
14195  r"""__repr__(Typed self) -> std::string"""
14196  return _IMP_core.Typed___repr__(self)
14197 
14198  def _get_as_binary(self):
14199  r"""_get_as_binary(Typed self) -> PyObject *"""
14200  return _IMP_core.Typed__get_as_binary(self)
14201 
14202  def _set_from_binary(self, p):
14203  r"""_set_from_binary(Typed self, PyObject * p)"""
14204  return _IMP_core.Typed__set_from_binary(self, p)
14205 
14206  def __getstate__(self):
14207  p = self._get_as_binary()
14208  if len(self.__dict__) > 1:
14209  d = self.__dict__.copy()
14210  del d['this']
14211  p = (d, p)
14212  return p
14213 
14214  def __setstate__(self, p):
14215  if not hasattr(self, 'this'):
14216  self.__init__()
14217  if isinstance(p, tuple):
14218  d, p = p
14219  self.__dict__.update(d)
14220  return self._set_from_binary(p)
14221 
14222  __swig_destroy__ = _IMP_core.delete_Typed
14223 
14224 # Register Typed in _IMP_core:
14225 _IMP_core.Typed_swigregister(Typed)
14226 
14227 def __lshift__(*args):
14228  r"""
14229  __lshift__(_ostream out, XYZ n) -> _ostream
14230  __lshift__(_ostream out, XYZR n) -> _ostream
14231  __lshift__(_ostream out, Direction n) -> _ostream
14232  __lshift__(_ostream out, DirectionAngle n) -> _ostream
14233  __lshift__(_ostream out, Surface n) -> _ostream
14234  __lshift__(_ostream out, Centroid n) -> _ostream
14235  __lshift__(_ostream out, Cover n) -> _ostream
14236  __lshift__(_ostream out, Reference n) -> _ostream
14237  __lshift__(_ostream out, RigidMember n) -> _ostream
14238  __lshift__(_ostream out, RigidBody n) -> _ostream
14239  __lshift__(_ostream out, Gaussian n) -> _ostream
14240  __lshift__(_ostream out, Typed n) -> _ostream
14241  """
14242  return _IMP_core.__lshift__(*args)
14243 class WriteRestraintScoresOptimizerState(IMP.OptimizerState):
14244  r"""Proxy of C++ IMP::core::WriteRestraintScoresOptimizerState class."""
14245 
14246  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14247 
14248  def __init__(self, rs, out):
14249  r"""__init__(WriteRestraintScoresOptimizerState self, IMP::Restraints const & rs, TextOutput out) -> WriteRestraintScoresOptimizerState"""
14250  _IMP_core.WriteRestraintScoresOptimizerState_swiginit(self, _IMP_core.new_WriteRestraintScoresOptimizerState(rs, out))
14251 
14252  def get_version_info(self):
14253  r"""get_version_info(WriteRestraintScoresOptimizerState self) -> VersionInfo"""
14254  return _IMP_core.WriteRestraintScoresOptimizerState_get_version_info(self)
14255  __swig_destroy__ = _IMP_core.delete_WriteRestraintScoresOptimizerState
14256 
14257  def __str__(self):
14258  r"""__str__(WriteRestraintScoresOptimizerState self) -> std::string"""
14259  return _IMP_core.WriteRestraintScoresOptimizerState___str__(self)
14260 
14261  def __repr__(self):
14262  r"""__repr__(WriteRestraintScoresOptimizerState self) -> std::string"""
14263  return _IMP_core.WriteRestraintScoresOptimizerState___repr__(self)
14264 
14265  @staticmethod
14266  def get_from(o):
14267  return _object_cast_to_WriteRestraintScoresOptimizerState(o)
14268 
14269 
14270 # Register WriteRestraintScoresOptimizerState in _IMP_core:
14271 _IMP_core.WriteRestraintScoresOptimizerState_swigregister(WriteRestraintScoresOptimizerState)
14272 
14273 def assign_blame(rs, ps, attribute):
14274  r"""assign_blame(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, FloatKey attribute)"""
14275  return _IMP_core.assign_blame(rs, ps, attribute)
14276 
14277 def create_blame_geometries(*args):
14278  r"""create_blame_geometries(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, double max=NO_MAX, std::string name=std::string()) -> IMP::display::Geometries"""
14279  return _IMP_core.create_blame_geometries(*args)
14280 class MultipleBinormalRestraint(IMP.Restraint):
14281  r"""Proxy of C++ IMP::core::MultipleBinormalRestraint class."""
14282 
14283  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14284 
14285  def __init__(self, m, q1, q2):
14286  r"""__init__(MultipleBinormalRestraint self, Model m, IMP::ParticleIndexQuad const & q1, IMP::ParticleIndexQuad const & q2) -> MultipleBinormalRestraint"""
14287  _IMP_core.MultipleBinormalRestraint_swiginit(self, _IMP_core.new_MultipleBinormalRestraint(m, q1, q2))
14288 
14289  def add_term(self, term):
14290  r"""add_term(MultipleBinormalRestraint self, BinormalTerm term)"""
14291  return _IMP_core.MultipleBinormalRestraint_add_term(self, term)
14292 
14293  def do_get_inputs(self):
14294  r"""do_get_inputs(MultipleBinormalRestraint self) -> IMP::ModelObjectsTemp"""
14295  return _IMP_core.MultipleBinormalRestraint_do_get_inputs(self)
14296 
14297  def get_version_info(self):
14298  r"""get_version_info(MultipleBinormalRestraint self) -> VersionInfo"""
14299  return _IMP_core.MultipleBinormalRestraint_get_version_info(self)
14300  __swig_destroy__ = _IMP_core.delete_MultipleBinormalRestraint
14301 
14302  def __str__(self):
14303  r"""__str__(MultipleBinormalRestraint self) -> std::string"""
14304  return _IMP_core.MultipleBinormalRestraint___str__(self)
14305 
14306  def __repr__(self):
14307  r"""__repr__(MultipleBinormalRestraint self) -> std::string"""
14308  return _IMP_core.MultipleBinormalRestraint___repr__(self)
14309 
14310  @staticmethod
14311  def get_from(o):
14312  return _object_cast_to_MultipleBinormalRestraint(o)
14313 
14314 
14315 # Register MultipleBinormalRestraint in _IMP_core:
14316 _IMP_core.MultipleBinormalRestraint_swigregister(MultipleBinormalRestraint)
14317 class BinormalTerm(object):
14318  r"""Proxy of C++ IMP::core::BinormalTerm class."""
14319 
14320  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14321 
14322  def __init__(self):
14323  r"""__init__(BinormalTerm self) -> BinormalTerm"""
14324  _IMP_core.BinormalTerm_swiginit(self, _IMP_core.new_BinormalTerm())
14325 
14326  def set_correlation(self, correlation):
14327  r"""set_correlation(BinormalTerm self, double correlation)"""
14328  return _IMP_core.BinormalTerm_set_correlation(self, correlation)
14329 
14330  def set_weight(self, weight):
14331  r"""set_weight(BinormalTerm self, double weight)"""
14332  return _IMP_core.BinormalTerm_set_weight(self, weight)
14333 
14334  def set_means(self, means):
14335  r"""set_means(BinormalTerm self, IMP::FloatPair means)"""
14336  return _IMP_core.BinormalTerm_set_means(self, means)
14337 
14338  def set_standard_deviations(self, stdevs):
14339  r"""set_standard_deviations(BinormalTerm self, IMP::FloatPair stdevs)"""
14340  return _IMP_core.BinormalTerm_set_standard_deviations(self, stdevs)
14341 
14342  def show(self, *args):
14343  r"""show(BinormalTerm self, _ostream out=std::cout)"""
14344  return _IMP_core.BinormalTerm_show(self, *args)
14345 
14346  def __str__(self):
14347  r"""__str__(BinormalTerm self) -> std::string"""
14348  return _IMP_core.BinormalTerm___str__(self)
14349 
14350  def __repr__(self):
14351  r"""__repr__(BinormalTerm self) -> std::string"""
14352  return _IMP_core.BinormalTerm___repr__(self)
14353 
14354  def _get_as_binary(self):
14355  r"""_get_as_binary(BinormalTerm self) -> PyObject *"""
14356  return _IMP_core.BinormalTerm__get_as_binary(self)
14357 
14358  def _set_from_binary(self, p):
14359  r"""_set_from_binary(BinormalTerm self, PyObject * p)"""
14360  return _IMP_core.BinormalTerm__set_from_binary(self, p)
14361 
14362  def __getstate__(self):
14363  p = self._get_as_binary()
14364  if len(self.__dict__) > 1:
14365  d = self.__dict__.copy()
14366  del d['this']
14367  p = (d, p)
14368  return p
14369 
14370  def __setstate__(self, p):
14371  if not hasattr(self, 'this'):
14372  self.__init__()
14373  if isinstance(p, tuple):
14374  d, p = p
14375  self.__dict__.update(d)
14376  return self._set_from_binary(p)
14377 
14378  __swig_destroy__ = _IMP_core.delete_BinormalTerm
14379 
14380 # Register BinormalTerm in _IMP_core:
14381 _IMP_core.BinormalTerm_swigregister(BinormalTerm)
14382 class Provenance(IMP.Decorator):
14383  r"""Proxy of C++ IMP::core::Provenance class."""
14384 
14385  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14386 
14387  def get_previous(self):
14388  r"""get_previous(Provenance self) -> Provenance"""
14389  return _IMP_core.Provenance_get_previous(self)
14390 
14391  def set_previous(self, p):
14392  r"""set_previous(Provenance self, Provenance p)"""
14393  return _IMP_core.Provenance_set_previous(self, p)
14394 
14395  def __init__(self, *args):
14396  r"""
14397  __init__(Provenance self) -> Provenance
14398  __init__(Provenance self, Model m, ParticleIndex id) -> Provenance
14399  __init__(Provenance self, _ParticleAdaptor d) -> Provenance
14400  """
14401  _IMP_core.Provenance_swiginit(self, _IMP_core.new_Provenance(*args))
14402 
14403  @staticmethod
14404  def get_is_setup(*args):
14405  r"""
14406  get_is_setup(Model m, ParticleIndex pi) -> bool
14407  get_is_setup(_ParticleAdaptor p) -> bool
14408  """
14409  return _IMP_core.Provenance_get_is_setup(*args)
14410 
14411  def show(self, *args):
14412  r"""show(Provenance self, _ostream out=std::cout)"""
14413  return _IMP_core.Provenance_show(self, *args)
14414 
14415  @staticmethod
14416  def setup_particle(*args):
14417  r"""
14418  setup_particle(Model m, ParticleIndex pi) -> Provenance
14419  setup_particle(_ParticleAdaptor pa) -> Provenance
14420  """
14421  return _IMP_core.Provenance_setup_particle(*args)
14422 
14423  def add_attribute(self, *args):
14424  r"""
14425  add_attribute(Provenance self, FloatKey k, IMP::Float v, bool opt)
14426  add_attribute(Provenance self, FloatKey a0, IMP::Float a1)
14427  add_attribute(Provenance self, IntKey a0, IMP::Int a1)
14428  add_attribute(Provenance self, FloatsKey a0, IMP::Floats a1)
14429  add_attribute(Provenance self, IntsKey a0, IMP::Ints a1)
14430  add_attribute(Provenance self, StringKey a0, IMP::String a1)
14431  add_attribute(Provenance self, ParticleIndexKey a0, Particle a1)
14432  add_attribute(Provenance self, ObjectKey a0, Object a1)
14433  add_attribute(Provenance self, SparseFloatKey a0, IMP::Float a1)
14434  add_attribute(Provenance self, SparseIntKey a0, IMP::Int a1)
14435  add_attribute(Provenance self, SparseStringKey a0, IMP::String a1)
14436  add_attribute(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14437  """
14438  return _IMP_core.Provenance_add_attribute(self, *args)
14439 
14440  def get_value(self, *args):
14441  r"""
14442  get_value(Provenance self, FloatKey a0) -> IMP::Float
14443  get_value(Provenance self, IntKey a0) -> IMP::Int
14444  get_value(Provenance self, FloatsKey a0) -> IMP::Floats
14445  get_value(Provenance self, IntsKey a0) -> IMP::Ints
14446  get_value(Provenance self, StringKey a0) -> IMP::String
14447  get_value(Provenance self, ParticleIndexKey a0) -> Particle
14448  get_value(Provenance self, ObjectKey a0) -> Object
14449  get_value(Provenance self, SparseFloatKey a0) -> IMP::Float
14450  get_value(Provenance self, SparseIntKey a0) -> IMP::Int
14451  get_value(Provenance self, SparseStringKey a0) -> IMP::String
14452  get_value(Provenance self, SparseParticleIndexKey a0) -> ParticleIndex
14453  """
14454  return _IMP_core.Provenance_get_value(self, *args)
14455 
14456  def set_value(self, *args):
14457  r"""
14458  set_value(Provenance self, FloatKey a0, IMP::Float a1)
14459  set_value(Provenance self, IntKey a0, IMP::Int a1)
14460  set_value(Provenance self, FloatsKey a0, IMP::Floats a1)
14461  set_value(Provenance self, IntsKey a0, IMP::Ints a1)
14462  set_value(Provenance self, StringKey a0, IMP::String a1)
14463  set_value(Provenance self, ParticleIndexKey a0, Particle a1)
14464  set_value(Provenance self, ObjectKey a0, Object a1)
14465  set_value(Provenance self, SparseFloatKey a0, IMP::Float a1)
14466  set_value(Provenance self, SparseIntKey a0, IMP::Int a1)
14467  set_value(Provenance self, SparseStringKey a0, IMP::String a1)
14468  set_value(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14469  """
14470  return _IMP_core.Provenance_set_value(self, *args)
14471 
14472  def remove_attribute(self, *args):
14473  r"""
14474  remove_attribute(Provenance self, FloatKey a0)
14475  remove_attribute(Provenance self, IntKey a0)
14476  remove_attribute(Provenance self, FloatsKey a0)
14477  remove_attribute(Provenance self, IntsKey a0)
14478  remove_attribute(Provenance self, StringKey a0)
14479  remove_attribute(Provenance self, ParticleIndexKey a0)
14480  remove_attribute(Provenance self, ObjectKey a0)
14481  remove_attribute(Provenance self, SparseFloatKey a0)
14482  remove_attribute(Provenance self, SparseIntKey a0)
14483  remove_attribute(Provenance self, SparseStringKey a0)
14484  remove_attribute(Provenance self, SparseParticleIndexKey a0)
14485  """
14486  return _IMP_core.Provenance_remove_attribute(self, *args)
14487 
14488  def has_attribute(self, *args):
14489  r"""
14490  has_attribute(Provenance self, FloatKey a0) -> bool
14491  has_attribute(Provenance self, IntKey a0) -> bool
14492  has_attribute(Provenance self, FloatsKey a0) -> bool
14493  has_attribute(Provenance self, IntsKey a0) -> bool
14494  has_attribute(Provenance self, StringKey a0) -> bool
14495  has_attribute(Provenance self, ParticleIndexKey a0) -> bool
14496  has_attribute(Provenance self, ObjectKey a0) -> bool
14497  has_attribute(Provenance self, SparseFloatKey a0) -> bool
14498  has_attribute(Provenance self, SparseIntKey a0) -> bool
14499  has_attribute(Provenance self, SparseStringKey a0) -> bool
14500  has_attribute(Provenance self, SparseParticleIndexKey a0) -> bool
14501  """
14502  return _IMP_core.Provenance_has_attribute(self, *args)
14503 
14504  def get_derivative(self, a0):
14505  r"""get_derivative(Provenance self, FloatKey a0) -> double"""
14506  return _IMP_core.Provenance_get_derivative(self, a0)
14507 
14508  def get_name(self):
14509  r"""get_name(Provenance self) -> std::string"""
14510  return _IMP_core.Provenance_get_name(self)
14511 
14512  def clear_caches(self):
14513  r"""clear_caches(Provenance self)"""
14514  return _IMP_core.Provenance_clear_caches(self)
14515 
14516  def set_name(self, a0):
14517  r"""set_name(Provenance self, std::string a0)"""
14518  return _IMP_core.Provenance_set_name(self, a0)
14519 
14520  def set_check_level(self, a0):
14521  r"""set_check_level(Provenance self, IMP::CheckLevel a0)"""
14522  return _IMP_core.Provenance_set_check_level(self, a0)
14523 
14524  def add_to_derivative(self, a0, a1, a2):
14525  r"""add_to_derivative(Provenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14526  return _IMP_core.Provenance_add_to_derivative(self, a0, a1, a2)
14527 
14528  def set_is_optimized(self, a0, a1):
14529  r"""set_is_optimized(Provenance self, FloatKey a0, bool a1)"""
14530  return _IMP_core.Provenance_set_is_optimized(self, a0, a1)
14531 
14532  def get_is_optimized(self, a0):
14533  r"""get_is_optimized(Provenance self, FloatKey a0) -> bool"""
14534  return _IMP_core.Provenance_get_is_optimized(self, a0)
14535 
14536  def get_check_level(self):
14537  r"""get_check_level(Provenance self) -> IMP::CheckLevel"""
14538  return _IMP_core.Provenance_get_check_level(self)
14539 
14540  def __eq__(self, *args):
14541  r"""
14542  __eq__(Provenance self, Provenance o) -> bool
14543  __eq__(Provenance self, Particle d) -> bool
14544  """
14545  return _IMP_core.Provenance___eq__(self, *args)
14546 
14547  def __ne__(self, *args):
14548  r"""
14549  __ne__(Provenance self, Provenance o) -> bool
14550  __ne__(Provenance self, Particle d) -> bool
14551  """
14552  return _IMP_core.Provenance___ne__(self, *args)
14553 
14554  def __le__(self, *args):
14555  r"""
14556  __le__(Provenance self, Provenance o) -> bool
14557  __le__(Provenance self, Particle d) -> bool
14558  """
14559  return _IMP_core.Provenance___le__(self, *args)
14560 
14561  def __lt__(self, *args):
14562  r"""
14563  __lt__(Provenance self, Provenance o) -> bool
14564  __lt__(Provenance self, Particle d) -> bool
14565  """
14566  return _IMP_core.Provenance___lt__(self, *args)
14567 
14568  def __ge__(self, *args):
14569  r"""
14570  __ge__(Provenance self, Provenance o) -> bool
14571  __ge__(Provenance self, Particle d) -> bool
14572  """
14573  return _IMP_core.Provenance___ge__(self, *args)
14574 
14575  def __gt__(self, *args):
14576  r"""
14577  __gt__(Provenance self, Provenance o) -> bool
14578  __gt__(Provenance self, Particle d) -> bool
14579  """
14580  return _IMP_core.Provenance___gt__(self, *args)
14581 
14582  def __hash__(self):
14583  r"""__hash__(Provenance self) -> std::size_t"""
14584  return _IMP_core.Provenance___hash__(self)
14585 
14586  def __str__(self):
14587  r"""__str__(Provenance self) -> std::string"""
14588  return _IMP_core.Provenance___str__(self)
14589 
14590  def __repr__(self):
14591  r"""__repr__(Provenance self) -> std::string"""
14592  return _IMP_core.Provenance___repr__(self)
14593 
14594  def _get_as_binary(self):
14595  r"""_get_as_binary(Provenance self) -> PyObject *"""
14596  return _IMP_core.Provenance__get_as_binary(self)
14597 
14598  def _set_from_binary(self, p):
14599  r"""_set_from_binary(Provenance self, PyObject * p)"""
14600  return _IMP_core.Provenance__set_from_binary(self, p)
14601 
14602  def __getstate__(self):
14603  p = self._get_as_binary()
14604  if len(self.__dict__) > 1:
14605  d = self.__dict__.copy()
14606  del d['this']
14607  p = (d, p)
14608  return p
14609 
14610  def __setstate__(self, p):
14611  if not hasattr(self, 'this'):
14612  self.__init__()
14613  if isinstance(p, tuple):
14614  d, p = p
14615  self.__dict__.update(d)
14616  return self._set_from_binary(p)
14617 
14618  __swig_destroy__ = _IMP_core.delete_Provenance
14619 
14620 # Register Provenance in _IMP_core:
14621 _IMP_core.Provenance_swigregister(Provenance)
14622 class StructureProvenance(Provenance):
14623  r"""Proxy of C++ IMP::core::StructureProvenance class."""
14624 
14625  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14626 
14627  def set_filename(self, filename):
14628  r"""set_filename(StructureProvenance self, std::string filename)"""
14629  return _IMP_core.StructureProvenance_set_filename(self, filename)
14630 
14631  def get_filename(self):
14632  r"""get_filename(StructureProvenance self) -> std::string"""
14633  return _IMP_core.StructureProvenance_get_filename(self)
14634 
14635  def set_chain_id(self, chain_id):
14636  r"""set_chain_id(StructureProvenance self, std::string chain_id)"""
14637  return _IMP_core.StructureProvenance_set_chain_id(self, chain_id)
14638 
14639  def get_chain_id(self):
14640  r"""get_chain_id(StructureProvenance self) -> std::string"""
14641  return _IMP_core.StructureProvenance_get_chain_id(self)
14642 
14643  def set_residue_offset(self, residue_offset):
14644  r"""set_residue_offset(StructureProvenance self, int residue_offset)"""
14645  return _IMP_core.StructureProvenance_set_residue_offset(self, residue_offset)
14646 
14647  def get_residue_offset(self):
14648  r"""get_residue_offset(StructureProvenance self) -> int"""
14649  return _IMP_core.StructureProvenance_get_residue_offset(self)
14650 
14651  def __init__(self, *args):
14652  r"""
14653  __init__(StructureProvenance self) -> StructureProvenance
14654  __init__(StructureProvenance self, Model m, ParticleIndex id) -> StructureProvenance
14655  __init__(StructureProvenance self, _ParticleAdaptor d) -> StructureProvenance
14656  """
14657  _IMP_core.StructureProvenance_swiginit(self, _IMP_core.new_StructureProvenance(*args))
14658 
14659  @staticmethod
14660  def get_is_setup(*args):
14661  r"""
14662  get_is_setup(Model m, ParticleIndex pi) -> bool
14663  get_is_setup(_ParticleAdaptor p) -> bool
14664  """
14665  return _IMP_core.StructureProvenance_get_is_setup(*args)
14666 
14667  def show(self, *args):
14668  r"""show(StructureProvenance self, _ostream out=std::cout)"""
14669  return _IMP_core.StructureProvenance_show(self, *args)
14670 
14671  @staticmethod
14672  def setup_particle(*args):
14673  r"""
14674  setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14675  setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14676  setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id) -> StructureProvenance
14677  setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id) -> StructureProvenance
14678  setup_particle(Model m, ParticleIndex pi, StructureProvenance o) -> StructureProvenance
14679  setup_particle(_ParticleAdaptor pa, StructureProvenance o) -> StructureProvenance
14680  """
14681  return _IMP_core.StructureProvenance_setup_particle(*args)
14682 
14683  def add_attribute(self, *args):
14684  r"""
14685  add_attribute(StructureProvenance self, FloatKey k, IMP::Float v, bool opt)
14686  add_attribute(StructureProvenance self, FloatKey a0, IMP::Float a1)
14687  add_attribute(StructureProvenance self, IntKey a0, IMP::Int a1)
14688  add_attribute(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14689  add_attribute(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14690  add_attribute(StructureProvenance self, StringKey a0, IMP::String a1)
14691  add_attribute(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14692  add_attribute(StructureProvenance self, ObjectKey a0, Object a1)
14693  add_attribute(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14694  add_attribute(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14695  add_attribute(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14696  add_attribute(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14697  """
14698  return _IMP_core.StructureProvenance_add_attribute(self, *args)
14699 
14700  def get_value(self, *args):
14701  r"""
14702  get_value(StructureProvenance self, FloatKey a0) -> IMP::Float
14703  get_value(StructureProvenance self, IntKey a0) -> IMP::Int
14704  get_value(StructureProvenance self, FloatsKey a0) -> IMP::Floats
14705  get_value(StructureProvenance self, IntsKey a0) -> IMP::Ints
14706  get_value(StructureProvenance self, StringKey a0) -> IMP::String
14707  get_value(StructureProvenance self, ParticleIndexKey a0) -> Particle
14708  get_value(StructureProvenance self, ObjectKey a0) -> Object
14709  get_value(StructureProvenance self, SparseFloatKey a0) -> IMP::Float
14710  get_value(StructureProvenance self, SparseIntKey a0) -> IMP::Int
14711  get_value(StructureProvenance self, SparseStringKey a0) -> IMP::String
14712  get_value(StructureProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
14713  """
14714  return _IMP_core.StructureProvenance_get_value(self, *args)
14715 
14716  def set_value(self, *args):
14717  r"""
14718  set_value(StructureProvenance self, FloatKey a0, IMP::Float a1)
14719  set_value(StructureProvenance self, IntKey a0, IMP::Int a1)
14720  set_value(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14721  set_value(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14722  set_value(StructureProvenance self, StringKey a0, IMP::String a1)
14723  set_value(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14724  set_value(StructureProvenance self, ObjectKey a0, Object a1)
14725  set_value(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14726  set_value(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14727  set_value(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14728  set_value(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14729  """
14730  return _IMP_core.StructureProvenance_set_value(self, *args)
14731 
14732  def remove_attribute(self, *args):
14733  r"""
14734  remove_attribute(StructureProvenance self, FloatKey a0)
14735  remove_attribute(StructureProvenance self, IntKey a0)
14736  remove_attribute(StructureProvenance self, FloatsKey a0)
14737  remove_attribute(StructureProvenance self, IntsKey a0)
14738  remove_attribute(StructureProvenance self, StringKey a0)
14739  remove_attribute(StructureProvenance self, ParticleIndexKey a0)
14740  remove_attribute(StructureProvenance self, ObjectKey a0)
14741  remove_attribute(StructureProvenance self, SparseFloatKey a0)
14742  remove_attribute(StructureProvenance self, SparseIntKey a0)
14743  remove_attribute(StructureProvenance self, SparseStringKey a0)
14744  remove_attribute(StructureProvenance self, SparseParticleIndexKey a0)
14745  """
14746  return _IMP_core.StructureProvenance_remove_attribute(self, *args)
14747 
14748  def has_attribute(self, *args):
14749  r"""
14750  has_attribute(StructureProvenance self, FloatKey a0) -> bool
14751  has_attribute(StructureProvenance self, IntKey a0) -> bool
14752  has_attribute(StructureProvenance self, FloatsKey a0) -> bool
14753  has_attribute(StructureProvenance self, IntsKey a0) -> bool
14754  has_attribute(StructureProvenance self, StringKey a0) -> bool
14755  has_attribute(StructureProvenance self, ParticleIndexKey a0) -> bool
14756  has_attribute(StructureProvenance self, ObjectKey a0) -> bool
14757  has_attribute(StructureProvenance self, SparseFloatKey a0) -> bool
14758  has_attribute(StructureProvenance self, SparseIntKey a0) -> bool
14759  has_attribute(StructureProvenance self, SparseStringKey a0) -> bool
14760  has_attribute(StructureProvenance self, SparseParticleIndexKey a0) -> bool
14761  """
14762  return _IMP_core.StructureProvenance_has_attribute(self, *args)
14763 
14764  def get_derivative(self, a0):
14765  r"""get_derivative(StructureProvenance self, FloatKey a0) -> double"""
14766  return _IMP_core.StructureProvenance_get_derivative(self, a0)
14767 
14768  def get_name(self):
14769  r"""get_name(StructureProvenance self) -> std::string"""
14770  return _IMP_core.StructureProvenance_get_name(self)
14771 
14772  def clear_caches(self):
14773  r"""clear_caches(StructureProvenance self)"""
14774  return _IMP_core.StructureProvenance_clear_caches(self)
14775 
14776  def set_name(self, a0):
14777  r"""set_name(StructureProvenance self, std::string a0)"""
14778  return _IMP_core.StructureProvenance_set_name(self, a0)
14779 
14780  def set_check_level(self, a0):
14781  r"""set_check_level(StructureProvenance self, IMP::CheckLevel a0)"""
14782  return _IMP_core.StructureProvenance_set_check_level(self, a0)
14783 
14784  def add_to_derivative(self, a0, a1, a2):
14785  r"""add_to_derivative(StructureProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14786  return _IMP_core.StructureProvenance_add_to_derivative(self, a0, a1, a2)
14787 
14788  def set_is_optimized(self, a0, a1):
14789  r"""set_is_optimized(StructureProvenance self, FloatKey a0, bool a1)"""
14790  return _IMP_core.StructureProvenance_set_is_optimized(self, a0, a1)
14791 
14792  def get_is_optimized(self, a0):
14793  r"""get_is_optimized(StructureProvenance self, FloatKey a0) -> bool"""
14794  return _IMP_core.StructureProvenance_get_is_optimized(self, a0)
14795 
14796  def get_check_level(self):
14797  r"""get_check_level(StructureProvenance self) -> IMP::CheckLevel"""
14798  return _IMP_core.StructureProvenance_get_check_level(self)
14799 
14800  def __eq__(self, *args):
14801  r"""
14802  __eq__(StructureProvenance self, StructureProvenance o) -> bool
14803  __eq__(StructureProvenance self, Particle d) -> bool
14804  """
14805  return _IMP_core.StructureProvenance___eq__(self, *args)
14806 
14807  def __ne__(self, *args):
14808  r"""
14809  __ne__(StructureProvenance self, StructureProvenance o) -> bool
14810  __ne__(StructureProvenance self, Particle d) -> bool
14811  """
14812  return _IMP_core.StructureProvenance___ne__(self, *args)
14813 
14814  def __le__(self, *args):
14815  r"""
14816  __le__(StructureProvenance self, StructureProvenance o) -> bool
14817  __le__(StructureProvenance self, Particle d) -> bool
14818  """
14819  return _IMP_core.StructureProvenance___le__(self, *args)
14820 
14821  def __lt__(self, *args):
14822  r"""
14823  __lt__(StructureProvenance self, StructureProvenance o) -> bool
14824  __lt__(StructureProvenance self, Particle d) -> bool
14825  """
14826  return _IMP_core.StructureProvenance___lt__(self, *args)
14827 
14828  def __ge__(self, *args):
14829  r"""
14830  __ge__(StructureProvenance self, StructureProvenance o) -> bool
14831  __ge__(StructureProvenance self, Particle d) -> bool
14832  """
14833  return _IMP_core.StructureProvenance___ge__(self, *args)
14834 
14835  def __gt__(self, *args):
14836  r"""
14837  __gt__(StructureProvenance self, StructureProvenance o) -> bool
14838  __gt__(StructureProvenance self, Particle d) -> bool
14839  """
14840  return _IMP_core.StructureProvenance___gt__(self, *args)
14841 
14842  def __hash__(self):
14843  r"""__hash__(StructureProvenance self) -> std::size_t"""
14844  return _IMP_core.StructureProvenance___hash__(self)
14845 
14846  def __str__(self):
14847  r"""__str__(StructureProvenance self) -> std::string"""
14848  return _IMP_core.StructureProvenance___str__(self)
14849 
14850  def __repr__(self):
14851  r"""__repr__(StructureProvenance self) -> std::string"""
14852  return _IMP_core.StructureProvenance___repr__(self)
14853 
14854  def _get_as_binary(self):
14855  r"""_get_as_binary(StructureProvenance self) -> PyObject *"""
14856  return _IMP_core.StructureProvenance__get_as_binary(self)
14857 
14858  def _set_from_binary(self, p):
14859  r"""_set_from_binary(StructureProvenance self, PyObject * p)"""
14860  return _IMP_core.StructureProvenance__set_from_binary(self, p)
14861 
14862  def __getstate__(self):
14863  p = self._get_as_binary()
14864  if len(self.__dict__) > 1:
14865  d = self.__dict__.copy()
14866  del d['this']
14867  p = (d, p)
14868  return p
14869 
14870  def __setstate__(self, p):
14871  if not hasattr(self, 'this'):
14872  self.__init__()
14873  if isinstance(p, tuple):
14874  d, p = p
14875  self.__dict__.update(d)
14876  return self._set_from_binary(p)
14877 
14878  __swig_destroy__ = _IMP_core.delete_StructureProvenance
14879 
14880 # Register StructureProvenance in _IMP_core:
14881 _IMP_core.StructureProvenance_swigregister(StructureProvenance)
14882 class SampleProvenance(Provenance):
14883  r"""Proxy of C++ IMP::core::SampleProvenance class."""
14884 
14885  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14886 
14887  def set_method(self, method):
14888  r"""set_method(SampleProvenance self, std::string method)"""
14889  return _IMP_core.SampleProvenance_set_method(self, method)
14890 
14891  def get_method(self):
14892  r"""get_method(SampleProvenance self) -> std::string"""
14893  return _IMP_core.SampleProvenance_get_method(self)
14894 
14895  def set_number_of_frames(self, frames):
14896  r"""set_number_of_frames(SampleProvenance self, int frames)"""
14897  return _IMP_core.SampleProvenance_set_number_of_frames(self, frames)
14898 
14899  def get_number_of_frames(self):
14900  r"""get_number_of_frames(SampleProvenance self) -> int"""
14901  return _IMP_core.SampleProvenance_get_number_of_frames(self)
14902 
14903  def set_number_of_iterations(self, iterations):
14904  r"""set_number_of_iterations(SampleProvenance self, int iterations)"""
14905  return _IMP_core.SampleProvenance_set_number_of_iterations(self, iterations)
14906 
14907  def get_number_of_iterations(self):
14908  r"""get_number_of_iterations(SampleProvenance self) -> int"""
14909  return _IMP_core.SampleProvenance_get_number_of_iterations(self)
14910 
14911  def set_number_of_replicas(self, replicas):
14912  r"""set_number_of_replicas(SampleProvenance self, int replicas)"""
14913  return _IMP_core.SampleProvenance_set_number_of_replicas(self, replicas)
14914 
14915  def get_number_of_replicas(self):
14916  r"""get_number_of_replicas(SampleProvenance self) -> int"""
14917  return _IMP_core.SampleProvenance_get_number_of_replicas(self)
14918 
14919  def __init__(self, *args):
14920  r"""
14921  __init__(SampleProvenance self) -> SampleProvenance
14922  __init__(SampleProvenance self, Model m, ParticleIndex id) -> SampleProvenance
14923  __init__(SampleProvenance self, _ParticleAdaptor d) -> SampleProvenance
14924  """
14925  _IMP_core.SampleProvenance_swiginit(self, _IMP_core.new_SampleProvenance(*args))
14926 
14927  @staticmethod
14928  def get_is_setup(*args):
14929  r"""
14930  get_is_setup(Model m, ParticleIndex pi) -> bool
14931  get_is_setup(_ParticleAdaptor p) -> bool
14932  """
14933  return _IMP_core.SampleProvenance_get_is_setup(*args)
14934 
14935  def show(self, *args):
14936  r"""show(SampleProvenance self, _ostream out=std::cout)"""
14937  return _IMP_core.SampleProvenance_show(self, *args)
14938 
14939  @staticmethod
14940  def setup_particle(*args):
14941  r"""
14942  setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
14943  setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
14944  setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations) -> SampleProvenance
14945  setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations) -> SampleProvenance
14946  setup_particle(Model m, ParticleIndex pi, SampleProvenance o) -> SampleProvenance
14947  setup_particle(_ParticleAdaptor pa, SampleProvenance o) -> SampleProvenance
14948  """
14949  return _IMP_core.SampleProvenance_setup_particle(*args)
14950 
14951  def add_attribute(self, *args):
14952  r"""
14953  add_attribute(SampleProvenance self, FloatKey k, IMP::Float v, bool opt)
14954  add_attribute(SampleProvenance self, FloatKey a0, IMP::Float a1)
14955  add_attribute(SampleProvenance self, IntKey a0, IMP::Int a1)
14956  add_attribute(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
14957  add_attribute(SampleProvenance self, IntsKey a0, IMP::Ints a1)
14958  add_attribute(SampleProvenance self, StringKey a0, IMP::String a1)
14959  add_attribute(SampleProvenance self, ParticleIndexKey a0, Particle a1)
14960  add_attribute(SampleProvenance self, ObjectKey a0, Object a1)
14961  add_attribute(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
14962  add_attribute(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
14963  add_attribute(SampleProvenance self, SparseStringKey a0, IMP::String a1)
14964  add_attribute(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14965  """
14966  return _IMP_core.SampleProvenance_add_attribute(self, *args)
14967 
14968  def get_value(self, *args):
14969  r"""
14970  get_value(SampleProvenance self, FloatKey a0) -> IMP::Float
14971  get_value(SampleProvenance self, IntKey a0) -> IMP::Int
14972  get_value(SampleProvenance self, FloatsKey a0) -> IMP::Floats
14973  get_value(SampleProvenance self, IntsKey a0) -> IMP::Ints
14974  get_value(SampleProvenance self, StringKey a0) -> IMP::String
14975  get_value(SampleProvenance self, ParticleIndexKey a0) -> Particle
14976  get_value(SampleProvenance self, ObjectKey a0) -> Object
14977  get_value(SampleProvenance self, SparseFloatKey a0) -> IMP::Float
14978  get_value(SampleProvenance self, SparseIntKey a0) -> IMP::Int
14979  get_value(SampleProvenance self, SparseStringKey a0) -> IMP::String
14980  get_value(SampleProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
14981  """
14982  return _IMP_core.SampleProvenance_get_value(self, *args)
14983 
14984  def set_value(self, *args):
14985  r"""
14986  set_value(SampleProvenance self, FloatKey a0, IMP::Float a1)
14987  set_value(SampleProvenance self, IntKey a0, IMP::Int a1)
14988  set_value(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
14989  set_value(SampleProvenance self, IntsKey a0, IMP::Ints a1)
14990  set_value(SampleProvenance self, StringKey a0, IMP::String a1)
14991  set_value(SampleProvenance self, ParticleIndexKey a0, Particle a1)
14992  set_value(SampleProvenance self, ObjectKey a0, Object a1)
14993  set_value(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
14994  set_value(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
14995  set_value(SampleProvenance self, SparseStringKey a0, IMP::String a1)
14996  set_value(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14997  """
14998  return _IMP_core.SampleProvenance_set_value(self, *args)
14999 
15000  def remove_attribute(self, *args):
15001  r"""
15002  remove_attribute(SampleProvenance self, FloatKey a0)
15003  remove_attribute(SampleProvenance self, IntKey a0)
15004  remove_attribute(SampleProvenance self, FloatsKey a0)
15005  remove_attribute(SampleProvenance self, IntsKey a0)
15006  remove_attribute(SampleProvenance self, StringKey a0)
15007  remove_attribute(SampleProvenance self, ParticleIndexKey a0)
15008  remove_attribute(SampleProvenance self, ObjectKey a0)
15009  remove_attribute(SampleProvenance self, SparseFloatKey a0)
15010  remove_attribute(SampleProvenance self, SparseIntKey a0)
15011  remove_attribute(SampleProvenance self, SparseStringKey a0)
15012  remove_attribute(SampleProvenance self, SparseParticleIndexKey a0)
15013  """
15014  return _IMP_core.SampleProvenance_remove_attribute(self, *args)
15015 
15016  def has_attribute(self, *args):
15017  r"""
15018  has_attribute(SampleProvenance self, FloatKey a0) -> bool
15019  has_attribute(SampleProvenance self, IntKey a0) -> bool
15020  has_attribute(SampleProvenance self, FloatsKey a0) -> bool
15021  has_attribute(SampleProvenance self, IntsKey a0) -> bool
15022  has_attribute(SampleProvenance self, StringKey a0) -> bool
15023  has_attribute(SampleProvenance self, ParticleIndexKey a0) -> bool
15024  has_attribute(SampleProvenance self, ObjectKey a0) -> bool
15025  has_attribute(SampleProvenance self, SparseFloatKey a0) -> bool
15026  has_attribute(SampleProvenance self, SparseIntKey a0) -> bool
15027  has_attribute(SampleProvenance self, SparseStringKey a0) -> bool
15028  has_attribute(SampleProvenance self, SparseParticleIndexKey a0) -> bool
15029  """
15030  return _IMP_core.SampleProvenance_has_attribute(self, *args)
15031 
15032  def get_derivative(self, a0):
15033  r"""get_derivative(SampleProvenance self, FloatKey a0) -> double"""
15034  return _IMP_core.SampleProvenance_get_derivative(self, a0)
15035 
15036  def get_name(self):
15037  r"""get_name(SampleProvenance self) -> std::string"""
15038  return _IMP_core.SampleProvenance_get_name(self)
15039 
15040  def clear_caches(self):
15041  r"""clear_caches(SampleProvenance self)"""
15042  return _IMP_core.SampleProvenance_clear_caches(self)
15043 
15044  def set_name(self, a0):
15045  r"""set_name(SampleProvenance self, std::string a0)"""
15046  return _IMP_core.SampleProvenance_set_name(self, a0)
15047 
15048  def set_check_level(self, a0):
15049  r"""set_check_level(SampleProvenance self, IMP::CheckLevel a0)"""
15050  return _IMP_core.SampleProvenance_set_check_level(self, a0)
15051 
15052  def add_to_derivative(self, a0, a1, a2):
15053  r"""add_to_derivative(SampleProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15054  return _IMP_core.SampleProvenance_add_to_derivative(self, a0, a1, a2)
15055 
15056  def set_is_optimized(self, a0, a1):
15057  r"""set_is_optimized(SampleProvenance self, FloatKey a0, bool a1)"""
15058  return _IMP_core.SampleProvenance_set_is_optimized(self, a0, a1)
15059 
15060  def get_is_optimized(self, a0):
15061  r"""get_is_optimized(SampleProvenance self, FloatKey a0) -> bool"""
15062  return _IMP_core.SampleProvenance_get_is_optimized(self, a0)
15063 
15064  def get_check_level(self):
15065  r"""get_check_level(SampleProvenance self) -> IMP::CheckLevel"""
15066  return _IMP_core.SampleProvenance_get_check_level(self)
15067 
15068  def __eq__(self, *args):
15069  r"""
15070  __eq__(SampleProvenance self, SampleProvenance o) -> bool
15071  __eq__(SampleProvenance self, Particle d) -> bool
15072  """
15073  return _IMP_core.SampleProvenance___eq__(self, *args)
15074 
15075  def __ne__(self, *args):
15076  r"""
15077  __ne__(SampleProvenance self, SampleProvenance o) -> bool
15078  __ne__(SampleProvenance self, Particle d) -> bool
15079  """
15080  return _IMP_core.SampleProvenance___ne__(self, *args)
15081 
15082  def __le__(self, *args):
15083  r"""
15084  __le__(SampleProvenance self, SampleProvenance o) -> bool
15085  __le__(SampleProvenance self, Particle d) -> bool
15086  """
15087  return _IMP_core.SampleProvenance___le__(self, *args)
15088 
15089  def __lt__(self, *args):
15090  r"""
15091  __lt__(SampleProvenance self, SampleProvenance o) -> bool
15092  __lt__(SampleProvenance self, Particle d) -> bool
15093  """
15094  return _IMP_core.SampleProvenance___lt__(self, *args)
15095 
15096  def __ge__(self, *args):
15097  r"""
15098  __ge__(SampleProvenance self, SampleProvenance o) -> bool
15099  __ge__(SampleProvenance self, Particle d) -> bool
15100  """
15101  return _IMP_core.SampleProvenance___ge__(self, *args)
15102 
15103  def __gt__(self, *args):
15104  r"""
15105  __gt__(SampleProvenance self, SampleProvenance o) -> bool
15106  __gt__(SampleProvenance self, Particle d) -> bool
15107  """
15108  return _IMP_core.SampleProvenance___gt__(self, *args)
15109 
15110  def __hash__(self):
15111  r"""__hash__(SampleProvenance self) -> std::size_t"""
15112  return _IMP_core.SampleProvenance___hash__(self)
15113 
15114  def __str__(self):
15115  r"""__str__(SampleProvenance self) -> std::string"""
15116  return _IMP_core.SampleProvenance___str__(self)
15117 
15118  def __repr__(self):
15119  r"""__repr__(SampleProvenance self) -> std::string"""
15120  return _IMP_core.SampleProvenance___repr__(self)
15121 
15122  def _get_as_binary(self):
15123  r"""_get_as_binary(SampleProvenance self) -> PyObject *"""
15124  return _IMP_core.SampleProvenance__get_as_binary(self)
15125 
15126  def _set_from_binary(self, p):
15127  r"""_set_from_binary(SampleProvenance self, PyObject * p)"""
15128  return _IMP_core.SampleProvenance__set_from_binary(self, p)
15129 
15130  def __getstate__(self):
15131  p = self._get_as_binary()
15132  if len(self.__dict__) > 1:
15133  d = self.__dict__.copy()
15134  del d['this']
15135  p = (d, p)
15136  return p
15137 
15138  def __setstate__(self, p):
15139  if not hasattr(self, 'this'):
15140  self.__init__()
15141  if isinstance(p, tuple):
15142  d, p = p
15143  self.__dict__.update(d)
15144  return self._set_from_binary(p)
15145 
15146  __swig_destroy__ = _IMP_core.delete_SampleProvenance
15147 
15148 # Register SampleProvenance in _IMP_core:
15149 _IMP_core.SampleProvenance_swigregister(SampleProvenance)
15150 class CombineProvenance(Provenance):
15151  r"""Proxy of C++ IMP::core::CombineProvenance class."""
15152 
15153  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15154 
15155  def set_number_of_frames(self, frames):
15156  r"""set_number_of_frames(CombineProvenance self, int frames)"""
15157  return _IMP_core.CombineProvenance_set_number_of_frames(self, frames)
15158 
15159  def get_number_of_frames(self):
15160  r"""get_number_of_frames(CombineProvenance self) -> int"""
15161  return _IMP_core.CombineProvenance_get_number_of_frames(self)
15162 
15163  def set_number_of_runs(self, runs):
15164  r"""set_number_of_runs(CombineProvenance self, int runs)"""
15165  return _IMP_core.CombineProvenance_set_number_of_runs(self, runs)
15166 
15167  def get_number_of_runs(self):
15168  r"""get_number_of_runs(CombineProvenance self) -> int"""
15169  return _IMP_core.CombineProvenance_get_number_of_runs(self)
15170 
15171  def __init__(self, *args):
15172  r"""
15173  __init__(CombineProvenance self) -> CombineProvenance
15174  __init__(CombineProvenance self, Model m, ParticleIndex id) -> CombineProvenance
15175  __init__(CombineProvenance self, _ParticleAdaptor d) -> CombineProvenance
15176  """
15177  _IMP_core.CombineProvenance_swiginit(self, _IMP_core.new_CombineProvenance(*args))
15178 
15179  @staticmethod
15180  def get_is_setup(*args):
15181  r"""
15182  get_is_setup(Model m, ParticleIndex pi) -> bool
15183  get_is_setup(_ParticleAdaptor p) -> bool
15184  """
15185  return _IMP_core.CombineProvenance_get_is_setup(*args)
15186 
15187  def show(self, *args):
15188  r"""show(CombineProvenance self, _ostream out=std::cout)"""
15189  return _IMP_core.CombineProvenance_show(self, *args)
15190 
15191  @staticmethod
15192  def setup_particle(*args):
15193  r"""
15194  setup_particle(Model m, ParticleIndex pi, int runs, int frames) -> CombineProvenance
15195  setup_particle(_ParticleAdaptor pa, int runs, int frames) -> CombineProvenance
15196  setup_particle(Model m, ParticleIndex pi, CombineProvenance o) -> CombineProvenance
15197  setup_particle(_ParticleAdaptor pa, CombineProvenance o) -> CombineProvenance
15198  """
15199  return _IMP_core.CombineProvenance_setup_particle(*args)
15200 
15201  def add_attribute(self, *args):
15202  r"""
15203  add_attribute(CombineProvenance self, FloatKey k, IMP::Float v, bool opt)
15204  add_attribute(CombineProvenance self, FloatKey a0, IMP::Float a1)
15205  add_attribute(CombineProvenance self, IntKey a0, IMP::Int a1)
15206  add_attribute(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15207  add_attribute(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15208  add_attribute(CombineProvenance self, StringKey a0, IMP::String a1)
15209  add_attribute(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15210  add_attribute(CombineProvenance self, ObjectKey a0, Object a1)
15211  add_attribute(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15212  add_attribute(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15213  add_attribute(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15214  add_attribute(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15215  """
15216  return _IMP_core.CombineProvenance_add_attribute(self, *args)
15217 
15218  def get_value(self, *args):
15219  r"""
15220  get_value(CombineProvenance self, FloatKey a0) -> IMP::Float
15221  get_value(CombineProvenance self, IntKey a0) -> IMP::Int
15222  get_value(CombineProvenance self, FloatsKey a0) -> IMP::Floats
15223  get_value(CombineProvenance self, IntsKey a0) -> IMP::Ints
15224  get_value(CombineProvenance self, StringKey a0) -> IMP::String
15225  get_value(CombineProvenance self, ParticleIndexKey a0) -> Particle
15226  get_value(CombineProvenance self, ObjectKey a0) -> Object
15227  get_value(CombineProvenance self, SparseFloatKey a0) -> IMP::Float
15228  get_value(CombineProvenance self, SparseIntKey a0) -> IMP::Int
15229  get_value(CombineProvenance self, SparseStringKey a0) -> IMP::String
15230  get_value(CombineProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15231  """
15232  return _IMP_core.CombineProvenance_get_value(self, *args)
15233 
15234  def set_value(self, *args):
15235  r"""
15236  set_value(CombineProvenance self, FloatKey a0, IMP::Float a1)
15237  set_value(CombineProvenance self, IntKey a0, IMP::Int a1)
15238  set_value(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15239  set_value(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15240  set_value(CombineProvenance self, StringKey a0, IMP::String a1)
15241  set_value(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15242  set_value(CombineProvenance self, ObjectKey a0, Object a1)
15243  set_value(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15244  set_value(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15245  set_value(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15246  set_value(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15247  """
15248  return _IMP_core.CombineProvenance_set_value(self, *args)
15249 
15250  def remove_attribute(self, *args):
15251  r"""
15252  remove_attribute(CombineProvenance self, FloatKey a0)
15253  remove_attribute(CombineProvenance self, IntKey a0)
15254  remove_attribute(CombineProvenance self, FloatsKey a0)
15255  remove_attribute(CombineProvenance self, IntsKey a0)
15256  remove_attribute(CombineProvenance self, StringKey a0)
15257  remove_attribute(CombineProvenance self, ParticleIndexKey a0)
15258  remove_attribute(CombineProvenance self, ObjectKey a0)
15259  remove_attribute(CombineProvenance self, SparseFloatKey a0)
15260  remove_attribute(CombineProvenance self, SparseIntKey a0)
15261  remove_attribute(CombineProvenance self, SparseStringKey a0)
15262  remove_attribute(CombineProvenance self, SparseParticleIndexKey a0)
15263  """
15264  return _IMP_core.CombineProvenance_remove_attribute(self, *args)
15265 
15266  def has_attribute(self, *args):
15267  r"""
15268  has_attribute(CombineProvenance self, FloatKey a0) -> bool
15269  has_attribute(CombineProvenance self, IntKey a0) -> bool
15270  has_attribute(CombineProvenance self, FloatsKey a0) -> bool
15271  has_attribute(CombineProvenance self, IntsKey a0) -> bool
15272  has_attribute(CombineProvenance self, StringKey a0) -> bool
15273  has_attribute(CombineProvenance self, ParticleIndexKey a0) -> bool
15274  has_attribute(CombineProvenance self, ObjectKey a0) -> bool
15275  has_attribute(CombineProvenance self, SparseFloatKey a0) -> bool
15276  has_attribute(CombineProvenance self, SparseIntKey a0) -> bool
15277  has_attribute(CombineProvenance self, SparseStringKey a0) -> bool
15278  has_attribute(CombineProvenance self, SparseParticleIndexKey a0) -> bool
15279  """
15280  return _IMP_core.CombineProvenance_has_attribute(self, *args)
15281 
15282  def get_derivative(self, a0):
15283  r"""get_derivative(CombineProvenance self, FloatKey a0) -> double"""
15284  return _IMP_core.CombineProvenance_get_derivative(self, a0)
15285 
15286  def get_name(self):
15287  r"""get_name(CombineProvenance self) -> std::string"""
15288  return _IMP_core.CombineProvenance_get_name(self)
15289 
15290  def clear_caches(self):
15291  r"""clear_caches(CombineProvenance self)"""
15292  return _IMP_core.CombineProvenance_clear_caches(self)
15293 
15294  def set_name(self, a0):
15295  r"""set_name(CombineProvenance self, std::string a0)"""
15296  return _IMP_core.CombineProvenance_set_name(self, a0)
15297 
15298  def set_check_level(self, a0):
15299  r"""set_check_level(CombineProvenance self, IMP::CheckLevel a0)"""
15300  return _IMP_core.CombineProvenance_set_check_level(self, a0)
15301 
15302  def add_to_derivative(self, a0, a1, a2):
15303  r"""add_to_derivative(CombineProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15304  return _IMP_core.CombineProvenance_add_to_derivative(self, a0, a1, a2)
15305 
15306  def set_is_optimized(self, a0, a1):
15307  r"""set_is_optimized(CombineProvenance self, FloatKey a0, bool a1)"""
15308  return _IMP_core.CombineProvenance_set_is_optimized(self, a0, a1)
15309 
15310  def get_is_optimized(self, a0):
15311  r"""get_is_optimized(CombineProvenance self, FloatKey a0) -> bool"""
15312  return _IMP_core.CombineProvenance_get_is_optimized(self, a0)
15313 
15314  def get_check_level(self):
15315  r"""get_check_level(CombineProvenance self) -> IMP::CheckLevel"""
15316  return _IMP_core.CombineProvenance_get_check_level(self)
15317 
15318  def __eq__(self, *args):
15319  r"""
15320  __eq__(CombineProvenance self, CombineProvenance o) -> bool
15321  __eq__(CombineProvenance self, Particle d) -> bool
15322  """
15323  return _IMP_core.CombineProvenance___eq__(self, *args)
15324 
15325  def __ne__(self, *args):
15326  r"""
15327  __ne__(CombineProvenance self, CombineProvenance o) -> bool
15328  __ne__(CombineProvenance self, Particle d) -> bool
15329  """
15330  return _IMP_core.CombineProvenance___ne__(self, *args)
15331 
15332  def __le__(self, *args):
15333  r"""
15334  __le__(CombineProvenance self, CombineProvenance o) -> bool
15335  __le__(CombineProvenance self, Particle d) -> bool
15336  """
15337  return _IMP_core.CombineProvenance___le__(self, *args)
15338 
15339  def __lt__(self, *args):
15340  r"""
15341  __lt__(CombineProvenance self, CombineProvenance o) -> bool
15342  __lt__(CombineProvenance self, Particle d) -> bool
15343  """
15344  return _IMP_core.CombineProvenance___lt__(self, *args)
15345 
15346  def __ge__(self, *args):
15347  r"""
15348  __ge__(CombineProvenance self, CombineProvenance o) -> bool
15349  __ge__(CombineProvenance self, Particle d) -> bool
15350  """
15351  return _IMP_core.CombineProvenance___ge__(self, *args)
15352 
15353  def __gt__(self, *args):
15354  r"""
15355  __gt__(CombineProvenance self, CombineProvenance o) -> bool
15356  __gt__(CombineProvenance self, Particle d) -> bool
15357  """
15358  return _IMP_core.CombineProvenance___gt__(self, *args)
15359 
15360  def __hash__(self):
15361  r"""__hash__(CombineProvenance self) -> std::size_t"""
15362  return _IMP_core.CombineProvenance___hash__(self)
15363 
15364  def __str__(self):
15365  r"""__str__(CombineProvenance self) -> std::string"""
15366  return _IMP_core.CombineProvenance___str__(self)
15367 
15368  def __repr__(self):
15369  r"""__repr__(CombineProvenance self) -> std::string"""
15370  return _IMP_core.CombineProvenance___repr__(self)
15371 
15372  def _get_as_binary(self):
15373  r"""_get_as_binary(CombineProvenance self) -> PyObject *"""
15374  return _IMP_core.CombineProvenance__get_as_binary(self)
15375 
15376  def _set_from_binary(self, p):
15377  r"""_set_from_binary(CombineProvenance self, PyObject * p)"""
15378  return _IMP_core.CombineProvenance__set_from_binary(self, p)
15379 
15380  def __getstate__(self):
15381  p = self._get_as_binary()
15382  if len(self.__dict__) > 1:
15383  d = self.__dict__.copy()
15384  del d['this']
15385  p = (d, p)
15386  return p
15387 
15388  def __setstate__(self, p):
15389  if not hasattr(self, 'this'):
15390  self.__init__()
15391  if isinstance(p, tuple):
15392  d, p = p
15393  self.__dict__.update(d)
15394  return self._set_from_binary(p)
15395 
15396  __swig_destroy__ = _IMP_core.delete_CombineProvenance
15397 
15398 # Register CombineProvenance in _IMP_core:
15399 _IMP_core.CombineProvenance_swigregister(CombineProvenance)
15400 class FilterProvenance(Provenance):
15401  r"""Proxy of C++ IMP::core::FilterProvenance class."""
15402 
15403  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15404 
15405  def set_method(self, method):
15406  r"""set_method(FilterProvenance self, std::string method)"""
15407  return _IMP_core.FilterProvenance_set_method(self, method)
15408 
15409  def get_method(self):
15410  r"""get_method(FilterProvenance self) -> std::string"""
15411  return _IMP_core.FilterProvenance_get_method(self)
15412 
15413  def set_number_of_frames(self, frames):
15414  r"""set_number_of_frames(FilterProvenance self, int frames)"""
15415  return _IMP_core.FilterProvenance_set_number_of_frames(self, frames)
15416 
15417  def get_number_of_frames(self):
15418  r"""get_number_of_frames(FilterProvenance self) -> int"""
15419  return _IMP_core.FilterProvenance_get_number_of_frames(self)
15420 
15421  def set_threshold(self, threshold):
15422  r"""set_threshold(FilterProvenance self, double threshold)"""
15423  return _IMP_core.FilterProvenance_set_threshold(self, threshold)
15424 
15425  def get_threshold(self):
15426  r"""get_threshold(FilterProvenance self) -> double"""
15427  return _IMP_core.FilterProvenance_get_threshold(self)
15428 
15429  def __init__(self, *args):
15430  r"""
15431  __init__(FilterProvenance self) -> FilterProvenance
15432  __init__(FilterProvenance self, Model m, ParticleIndex id) -> FilterProvenance
15433  __init__(FilterProvenance self, _ParticleAdaptor d) -> FilterProvenance
15434  """
15435  _IMP_core.FilterProvenance_swiginit(self, _IMP_core.new_FilterProvenance(*args))
15436 
15437  @staticmethod
15438  def get_is_setup(*args):
15439  r"""
15440  get_is_setup(Model m, ParticleIndex pi) -> bool
15441  get_is_setup(_ParticleAdaptor p) -> bool
15442  """
15443  return _IMP_core.FilterProvenance_get_is_setup(*args)
15444 
15445  def show(self, *args):
15446  r"""show(FilterProvenance self, _ostream out=std::cout)"""
15447  return _IMP_core.FilterProvenance_show(self, *args)
15448 
15449  @staticmethod
15450  def setup_particle(*args):
15451  r"""
15452  setup_particle(Model m, ParticleIndex pi, std::string method, double threshold, int frames) -> FilterProvenance
15453  setup_particle(_ParticleAdaptor pa, std::string method, double threshold, int frames) -> FilterProvenance
15454  setup_particle(Model m, ParticleIndex pi, FilterProvenance o) -> FilterProvenance
15455  setup_particle(_ParticleAdaptor pa, FilterProvenance o) -> FilterProvenance
15456  """
15457  return _IMP_core.FilterProvenance_setup_particle(*args)
15458 
15459  def add_attribute(self, *args):
15460  r"""
15461  add_attribute(FilterProvenance self, FloatKey k, IMP::Float v, bool opt)
15462  add_attribute(FilterProvenance self, FloatKey a0, IMP::Float a1)
15463  add_attribute(FilterProvenance self, IntKey a0, IMP::Int a1)
15464  add_attribute(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15465  add_attribute(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15466  add_attribute(FilterProvenance self, StringKey a0, IMP::String a1)
15467  add_attribute(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15468  add_attribute(FilterProvenance self, ObjectKey a0, Object a1)
15469  add_attribute(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15470  add_attribute(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15471  add_attribute(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15472  add_attribute(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15473  """
15474  return _IMP_core.FilterProvenance_add_attribute(self, *args)
15475 
15476  def get_value(self, *args):
15477  r"""
15478  get_value(FilterProvenance self, FloatKey a0) -> IMP::Float
15479  get_value(FilterProvenance self, IntKey a0) -> IMP::Int
15480  get_value(FilterProvenance self, FloatsKey a0) -> IMP::Floats
15481  get_value(FilterProvenance self, IntsKey a0) -> IMP::Ints
15482  get_value(FilterProvenance self, StringKey a0) -> IMP::String
15483  get_value(FilterProvenance self, ParticleIndexKey a0) -> Particle
15484  get_value(FilterProvenance self, ObjectKey a0) -> Object
15485  get_value(FilterProvenance self, SparseFloatKey a0) -> IMP::Float
15486  get_value(FilterProvenance self, SparseIntKey a0) -> IMP::Int
15487  get_value(FilterProvenance self, SparseStringKey a0) -> IMP::String
15488  get_value(FilterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15489  """
15490  return _IMP_core.FilterProvenance_get_value(self, *args)
15491 
15492  def set_value(self, *args):
15493  r"""
15494  set_value(FilterProvenance self, FloatKey a0, IMP::Float a1)
15495  set_value(FilterProvenance self, IntKey a0, IMP::Int a1)
15496  set_value(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15497  set_value(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15498  set_value(FilterProvenance self, StringKey a0, IMP::String a1)
15499  set_value(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15500  set_value(FilterProvenance self, ObjectKey a0, Object a1)
15501  set_value(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15502  set_value(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15503  set_value(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15504  set_value(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15505  """
15506  return _IMP_core.FilterProvenance_set_value(self, *args)
15507 
15508  def remove_attribute(self, *args):
15509  r"""
15510  remove_attribute(FilterProvenance self, FloatKey a0)
15511  remove_attribute(FilterProvenance self, IntKey a0)
15512  remove_attribute(FilterProvenance self, FloatsKey a0)
15513  remove_attribute(FilterProvenance self, IntsKey a0)
15514  remove_attribute(FilterProvenance self, StringKey a0)
15515  remove_attribute(FilterProvenance self, ParticleIndexKey a0)
15516  remove_attribute(FilterProvenance self, ObjectKey a0)
15517  remove_attribute(FilterProvenance self, SparseFloatKey a0)
15518  remove_attribute(FilterProvenance self, SparseIntKey a0)
15519  remove_attribute(FilterProvenance self, SparseStringKey a0)
15520  remove_attribute(FilterProvenance self, SparseParticleIndexKey a0)
15521  """
15522  return _IMP_core.FilterProvenance_remove_attribute(self, *args)
15523 
15524  def has_attribute(self, *args):
15525  r"""
15526  has_attribute(FilterProvenance self, FloatKey a0) -> bool
15527  has_attribute(FilterProvenance self, IntKey a0) -> bool
15528  has_attribute(FilterProvenance self, FloatsKey a0) -> bool
15529  has_attribute(FilterProvenance self, IntsKey a0) -> bool
15530  has_attribute(FilterProvenance self, StringKey a0) -> bool
15531  has_attribute(FilterProvenance self, ParticleIndexKey a0) -> bool
15532  has_attribute(FilterProvenance self, ObjectKey a0) -> bool
15533  has_attribute(FilterProvenance self, SparseFloatKey a0) -> bool
15534  has_attribute(FilterProvenance self, SparseIntKey a0) -> bool
15535  has_attribute(FilterProvenance self, SparseStringKey a0) -> bool
15536  has_attribute(FilterProvenance self, SparseParticleIndexKey a0) -> bool
15537  """
15538  return _IMP_core.FilterProvenance_has_attribute(self, *args)
15539 
15540  def get_derivative(self, a0):
15541  r"""get_derivative(FilterProvenance self, FloatKey a0) -> double"""
15542  return _IMP_core.FilterProvenance_get_derivative(self, a0)
15543 
15544  def get_name(self):
15545  r"""get_name(FilterProvenance self) -> std::string"""
15546  return _IMP_core.FilterProvenance_get_name(self)
15547 
15548  def clear_caches(self):
15549  r"""clear_caches(FilterProvenance self)"""
15550  return _IMP_core.FilterProvenance_clear_caches(self)
15551 
15552  def set_name(self, a0):
15553  r"""set_name(FilterProvenance self, std::string a0)"""
15554  return _IMP_core.FilterProvenance_set_name(self, a0)
15555 
15556  def set_check_level(self, a0):
15557  r"""set_check_level(FilterProvenance self, IMP::CheckLevel a0)"""
15558  return _IMP_core.FilterProvenance_set_check_level(self, a0)
15559 
15560  def add_to_derivative(self, a0, a1, a2):
15561  r"""add_to_derivative(FilterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15562  return _IMP_core.FilterProvenance_add_to_derivative(self, a0, a1, a2)
15563 
15564  def set_is_optimized(self, a0, a1):
15565  r"""set_is_optimized(FilterProvenance self, FloatKey a0, bool a1)"""
15566  return _IMP_core.FilterProvenance_set_is_optimized(self, a0, a1)
15567 
15568  def get_is_optimized(self, a0):
15569  r"""get_is_optimized(FilterProvenance self, FloatKey a0) -> bool"""
15570  return _IMP_core.FilterProvenance_get_is_optimized(self, a0)
15571 
15572  def get_check_level(self):
15573  r"""get_check_level(FilterProvenance self) -> IMP::CheckLevel"""
15574  return _IMP_core.FilterProvenance_get_check_level(self)
15575 
15576  def __eq__(self, *args):
15577  r"""
15578  __eq__(FilterProvenance self, FilterProvenance o) -> bool
15579  __eq__(FilterProvenance self, Particle d) -> bool
15580  """
15581  return _IMP_core.FilterProvenance___eq__(self, *args)
15582 
15583  def __ne__(self, *args):
15584  r"""
15585  __ne__(FilterProvenance self, FilterProvenance o) -> bool
15586  __ne__(FilterProvenance self, Particle d) -> bool
15587  """
15588  return _IMP_core.FilterProvenance___ne__(self, *args)
15589 
15590  def __le__(self, *args):
15591  r"""
15592  __le__(FilterProvenance self, FilterProvenance o) -> bool
15593  __le__(FilterProvenance self, Particle d) -> bool
15594  """
15595  return _IMP_core.FilterProvenance___le__(self, *args)
15596 
15597  def __lt__(self, *args):
15598  r"""
15599  __lt__(FilterProvenance self, FilterProvenance o) -> bool
15600  __lt__(FilterProvenance self, Particle d) -> bool
15601  """
15602  return _IMP_core.FilterProvenance___lt__(self, *args)
15603 
15604  def __ge__(self, *args):
15605  r"""
15606  __ge__(FilterProvenance self, FilterProvenance o) -> bool
15607  __ge__(FilterProvenance self, Particle d) -> bool
15608  """
15609  return _IMP_core.FilterProvenance___ge__(self, *args)
15610 
15611  def __gt__(self, *args):
15612  r"""
15613  __gt__(FilterProvenance self, FilterProvenance o) -> bool
15614  __gt__(FilterProvenance self, Particle d) -> bool
15615  """
15616  return _IMP_core.FilterProvenance___gt__(self, *args)
15617 
15618  def __hash__(self):
15619  r"""__hash__(FilterProvenance self) -> std::size_t"""
15620  return _IMP_core.FilterProvenance___hash__(self)
15621 
15622  def __str__(self):
15623  r"""__str__(FilterProvenance self) -> std::string"""
15624  return _IMP_core.FilterProvenance___str__(self)
15625 
15626  def __repr__(self):
15627  r"""__repr__(FilterProvenance self) -> std::string"""
15628  return _IMP_core.FilterProvenance___repr__(self)
15629 
15630  def _get_as_binary(self):
15631  r"""_get_as_binary(FilterProvenance self) -> PyObject *"""
15632  return _IMP_core.FilterProvenance__get_as_binary(self)
15633 
15634  def _set_from_binary(self, p):
15635  r"""_set_from_binary(FilterProvenance self, PyObject * p)"""
15636  return _IMP_core.FilterProvenance__set_from_binary(self, p)
15637 
15638  def __getstate__(self):
15639  p = self._get_as_binary()
15640  if len(self.__dict__) > 1:
15641  d = self.__dict__.copy()
15642  del d['this']
15643  p = (d, p)
15644  return p
15645 
15646  def __setstate__(self, p):
15647  if not hasattr(self, 'this'):
15648  self.__init__()
15649  if isinstance(p, tuple):
15650  d, p = p
15651  self.__dict__.update(d)
15652  return self._set_from_binary(p)
15653 
15654  __swig_destroy__ = _IMP_core.delete_FilterProvenance
15655 
15656 # Register FilterProvenance in _IMP_core:
15657 _IMP_core.FilterProvenance_swigregister(FilterProvenance)
15658 class ClusterProvenance(Provenance):
15659  r"""Proxy of C++ IMP::core::ClusterProvenance class."""
15660 
15661  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15662 
15663  def set_number_of_members(self, members):
15664  r"""set_number_of_members(ClusterProvenance self, int members)"""
15665  return _IMP_core.ClusterProvenance_set_number_of_members(self, members)
15666 
15667  def get_number_of_members(self):
15668  r"""get_number_of_members(ClusterProvenance self) -> int"""
15669  return _IMP_core.ClusterProvenance_get_number_of_members(self)
15670 
15671  def set_precision(self, precision):
15672  r"""set_precision(ClusterProvenance self, double precision)"""
15673  return _IMP_core.ClusterProvenance_set_precision(self, precision)
15674 
15675  def get_precision(self):
15676  r"""get_precision(ClusterProvenance self) -> double"""
15677  return _IMP_core.ClusterProvenance_get_precision(self)
15678 
15679  def set_density(self, density):
15680  r"""set_density(ClusterProvenance self, std::string density)"""
15681  return _IMP_core.ClusterProvenance_set_density(self, density)
15682 
15683  def get_density(self):
15684  r"""get_density(ClusterProvenance self) -> std::string"""
15685  return _IMP_core.ClusterProvenance_get_density(self)
15686 
15687  def __init__(self, *args):
15688  r"""
15689  __init__(ClusterProvenance self) -> ClusterProvenance
15690  __init__(ClusterProvenance self, Model m, ParticleIndex id) -> ClusterProvenance
15691  __init__(ClusterProvenance self, _ParticleAdaptor d) -> ClusterProvenance
15692  """
15693  _IMP_core.ClusterProvenance_swiginit(self, _IMP_core.new_ClusterProvenance(*args))
15694 
15695  @staticmethod
15696  def get_is_setup(*args):
15697  r"""
15698  get_is_setup(Model m, ParticleIndex pi) -> bool
15699  get_is_setup(_ParticleAdaptor p) -> bool
15700  """
15701  return _IMP_core.ClusterProvenance_get_is_setup(*args)
15702 
15703  def show(self, *args):
15704  r"""show(ClusterProvenance self, _ostream out=std::cout)"""
15705  return _IMP_core.ClusterProvenance_show(self, *args)
15706 
15707  @staticmethod
15708  def setup_particle(*args):
15709  r"""
15710  setup_particle(Model m, ParticleIndex pi, int members) -> ClusterProvenance
15711  setup_particle(_ParticleAdaptor pa, int members) -> ClusterProvenance
15712  setup_particle(Model m, ParticleIndex pi, int members, double precision) -> ClusterProvenance
15713  setup_particle(_ParticleAdaptor pa, int members, double precision) -> ClusterProvenance
15714  setup_particle(Model m, ParticleIndex pi, int members, double precision, std::string density) -> ClusterProvenance
15715  setup_particle(_ParticleAdaptor pa, int members, double precision, std::string density) -> ClusterProvenance
15716  setup_particle(Model m, ParticleIndex pi, ClusterProvenance o) -> ClusterProvenance
15717  setup_particle(_ParticleAdaptor pa, ClusterProvenance o) -> ClusterProvenance
15718  """
15719  return _IMP_core.ClusterProvenance_setup_particle(*args)
15720 
15721  def add_attribute(self, *args):
15722  r"""
15723  add_attribute(ClusterProvenance self, FloatKey k, IMP::Float v, bool opt)
15724  add_attribute(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15725  add_attribute(ClusterProvenance self, IntKey a0, IMP::Int a1)
15726  add_attribute(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15727  add_attribute(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15728  add_attribute(ClusterProvenance self, StringKey a0, IMP::String a1)
15729  add_attribute(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15730  add_attribute(ClusterProvenance self, ObjectKey a0, Object a1)
15731  add_attribute(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15732  add_attribute(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15733  add_attribute(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15734  add_attribute(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15735  """
15736  return _IMP_core.ClusterProvenance_add_attribute(self, *args)
15737 
15738  def get_value(self, *args):
15739  r"""
15740  get_value(ClusterProvenance self, FloatKey a0) -> IMP::Float
15741  get_value(ClusterProvenance self, IntKey a0) -> IMP::Int
15742  get_value(ClusterProvenance self, FloatsKey a0) -> IMP::Floats
15743  get_value(ClusterProvenance self, IntsKey a0) -> IMP::Ints
15744  get_value(ClusterProvenance self, StringKey a0) -> IMP::String
15745  get_value(ClusterProvenance self, ParticleIndexKey a0) -> Particle
15746  get_value(ClusterProvenance self, ObjectKey a0) -> Object
15747  get_value(ClusterProvenance self, SparseFloatKey a0) -> IMP::Float
15748  get_value(ClusterProvenance self, SparseIntKey a0) -> IMP::Int
15749  get_value(ClusterProvenance self, SparseStringKey a0) -> IMP::String
15750  get_value(ClusterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15751  """
15752  return _IMP_core.ClusterProvenance_get_value(self, *args)
15753 
15754  def set_value(self, *args):
15755  r"""
15756  set_value(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15757  set_value(ClusterProvenance self, IntKey a0, IMP::Int a1)
15758  set_value(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15759  set_value(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15760  set_value(ClusterProvenance self, StringKey a0, IMP::String a1)
15761  set_value(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15762  set_value(ClusterProvenance self, ObjectKey a0, Object a1)
15763  set_value(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15764  set_value(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15765  set_value(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15766  set_value(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15767  """
15768  return _IMP_core.ClusterProvenance_set_value(self, *args)
15769 
15770  def remove_attribute(self, *args):
15771  r"""
15772  remove_attribute(ClusterProvenance self, FloatKey a0)
15773  remove_attribute(ClusterProvenance self, IntKey a0)
15774  remove_attribute(ClusterProvenance self, FloatsKey a0)
15775  remove_attribute(ClusterProvenance self, IntsKey a0)
15776  remove_attribute(ClusterProvenance self, StringKey a0)
15777  remove_attribute(ClusterProvenance self, ParticleIndexKey a0)
15778  remove_attribute(ClusterProvenance self, ObjectKey a0)
15779  remove_attribute(ClusterProvenance self, SparseFloatKey a0)
15780  remove_attribute(ClusterProvenance self, SparseIntKey a0)
15781  remove_attribute(ClusterProvenance self, SparseStringKey a0)
15782  remove_attribute(ClusterProvenance self, SparseParticleIndexKey a0)
15783  """
15784  return _IMP_core.ClusterProvenance_remove_attribute(self, *args)
15785 
15786  def has_attribute(self, *args):
15787  r"""
15788  has_attribute(ClusterProvenance self, FloatKey a0) -> bool
15789  has_attribute(ClusterProvenance self, IntKey a0) -> bool
15790  has_attribute(ClusterProvenance self, FloatsKey a0) -> bool
15791  has_attribute(ClusterProvenance self, IntsKey a0) -> bool
15792  has_attribute(ClusterProvenance self, StringKey a0) -> bool
15793  has_attribute(ClusterProvenance self, ParticleIndexKey a0) -> bool
15794  has_attribute(ClusterProvenance self, ObjectKey a0) -> bool
15795  has_attribute(ClusterProvenance self, SparseFloatKey a0) -> bool
15796  has_attribute(ClusterProvenance self, SparseIntKey a0) -> bool
15797  has_attribute(ClusterProvenance self, SparseStringKey a0) -> bool
15798  has_attribute(ClusterProvenance self, SparseParticleIndexKey a0) -> bool
15799  """
15800  return _IMP_core.ClusterProvenance_has_attribute(self, *args)
15801 
15802  def get_derivative(self, a0):
15803  r"""get_derivative(ClusterProvenance self, FloatKey a0) -> double"""
15804  return _IMP_core.ClusterProvenance_get_derivative(self, a0)
15805 
15806  def get_name(self):
15807  r"""get_name(ClusterProvenance self) -> std::string"""
15808  return _IMP_core.ClusterProvenance_get_name(self)
15809 
15810  def clear_caches(self):
15811  r"""clear_caches(ClusterProvenance self)"""
15812  return _IMP_core.ClusterProvenance_clear_caches(self)
15813 
15814  def set_name(self, a0):
15815  r"""set_name(ClusterProvenance self, std::string a0)"""
15816  return _IMP_core.ClusterProvenance_set_name(self, a0)
15817 
15818  def set_check_level(self, a0):
15819  r"""set_check_level(ClusterProvenance self, IMP::CheckLevel a0)"""
15820  return _IMP_core.ClusterProvenance_set_check_level(self, a0)
15821 
15822  def add_to_derivative(self, a0, a1, a2):
15823  r"""add_to_derivative(ClusterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15824  return _IMP_core.ClusterProvenance_add_to_derivative(self, a0, a1, a2)
15825 
15826  def set_is_optimized(self, a0, a1):
15827  r"""set_is_optimized(ClusterProvenance self, FloatKey a0, bool a1)"""
15828  return _IMP_core.ClusterProvenance_set_is_optimized(self, a0, a1)
15829 
15830  def get_is_optimized(self, a0):
15831  r"""get_is_optimized(ClusterProvenance self, FloatKey a0) -> bool"""
15832  return _IMP_core.ClusterProvenance_get_is_optimized(self, a0)
15833 
15834  def get_check_level(self):
15835  r"""get_check_level(ClusterProvenance self) -> IMP::CheckLevel"""
15836  return _IMP_core.ClusterProvenance_get_check_level(self)
15837 
15838  def __eq__(self, *args):
15839  r"""
15840  __eq__(ClusterProvenance self, ClusterProvenance o) -> bool
15841  __eq__(ClusterProvenance self, Particle d) -> bool
15842  """
15843  return _IMP_core.ClusterProvenance___eq__(self, *args)
15844 
15845  def __ne__(self, *args):
15846  r"""
15847  __ne__(ClusterProvenance self, ClusterProvenance o) -> bool
15848  __ne__(ClusterProvenance self, Particle d) -> bool
15849  """
15850  return _IMP_core.ClusterProvenance___ne__(self, *args)
15851 
15852  def __le__(self, *args):
15853  r"""
15854  __le__(ClusterProvenance self, ClusterProvenance o) -> bool
15855  __le__(ClusterProvenance self, Particle d) -> bool
15856  """
15857  return _IMP_core.ClusterProvenance___le__(self, *args)
15858 
15859  def __lt__(self, *args):
15860  r"""
15861  __lt__(ClusterProvenance self, ClusterProvenance o) -> bool
15862  __lt__(ClusterProvenance self, Particle d) -> bool
15863  """
15864  return _IMP_core.ClusterProvenance___lt__(self, *args)
15865 
15866  def __ge__(self, *args):
15867  r"""
15868  __ge__(ClusterProvenance self, ClusterProvenance o) -> bool
15869  __ge__(ClusterProvenance self, Particle d) -> bool
15870  """
15871  return _IMP_core.ClusterProvenance___ge__(self, *args)
15872 
15873  def __gt__(self, *args):
15874  r"""
15875  __gt__(ClusterProvenance self, ClusterProvenance o) -> bool
15876  __gt__(ClusterProvenance self, Particle d) -> bool
15877  """
15878  return _IMP_core.ClusterProvenance___gt__(self, *args)
15879 
15880  def __hash__(self):
15881  r"""__hash__(ClusterProvenance self) -> std::size_t"""
15882  return _IMP_core.ClusterProvenance___hash__(self)
15883 
15884  def __str__(self):
15885  r"""__str__(ClusterProvenance self) -> std::string"""
15886  return _IMP_core.ClusterProvenance___str__(self)
15887 
15888  def __repr__(self):
15889  r"""__repr__(ClusterProvenance self) -> std::string"""
15890  return _IMP_core.ClusterProvenance___repr__(self)
15891 
15892  def _get_as_binary(self):
15893  r"""_get_as_binary(ClusterProvenance self) -> PyObject *"""
15894  return _IMP_core.ClusterProvenance__get_as_binary(self)
15895 
15896  def _set_from_binary(self, p):
15897  r"""_set_from_binary(ClusterProvenance self, PyObject * p)"""
15898  return _IMP_core.ClusterProvenance__set_from_binary(self, p)
15899 
15900  def __getstate__(self):
15901  p = self._get_as_binary()
15902  if len(self.__dict__) > 1:
15903  d = self.__dict__.copy()
15904  del d['this']
15905  p = (d, p)
15906  return p
15907 
15908  def __setstate__(self, p):
15909  if not hasattr(self, 'this'):
15910  self.__init__()
15911  if isinstance(p, tuple):
15912  d, p = p
15913  self.__dict__.update(d)
15914  return self._set_from_binary(p)
15915 
15916  __swig_destroy__ = _IMP_core.delete_ClusterProvenance
15917 
15918 # Register ClusterProvenance in _IMP_core:
15919 _IMP_core.ClusterProvenance_swigregister(ClusterProvenance)
15920 class ScriptProvenance(Provenance):
15921  r"""Proxy of C++ IMP::core::ScriptProvenance class."""
15922 
15923  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15924 
15925  def set_filename(self, filename):
15926  r"""set_filename(ScriptProvenance self, std::string filename)"""
15927  return _IMP_core.ScriptProvenance_set_filename(self, filename)
15928 
15929  def get_filename(self):
15930  r"""get_filename(ScriptProvenance self) -> std::string"""
15931  return _IMP_core.ScriptProvenance_get_filename(self)
15932 
15933  def __init__(self, *args):
15934  r"""
15935  __init__(ScriptProvenance self) -> ScriptProvenance
15936  __init__(ScriptProvenance self, Model m, ParticleIndex id) -> ScriptProvenance
15937  __init__(ScriptProvenance self, _ParticleAdaptor d) -> ScriptProvenance
15938  """
15939  _IMP_core.ScriptProvenance_swiginit(self, _IMP_core.new_ScriptProvenance(*args))
15940 
15941  @staticmethod
15942  def get_is_setup(*args):
15943  r"""
15944  get_is_setup(Model m, ParticleIndex pi) -> bool
15945  get_is_setup(_ParticleAdaptor p) -> bool
15946  """
15947  return _IMP_core.ScriptProvenance_get_is_setup(*args)
15948 
15949  def show(self, *args):
15950  r"""show(ScriptProvenance self, _ostream out=std::cout)"""
15951  return _IMP_core.ScriptProvenance_show(self, *args)
15952 
15953  @staticmethod
15954  def setup_particle(*args):
15955  r"""
15956  setup_particle(Model m, ParticleIndex pi, std::string filename) -> ScriptProvenance
15957  setup_particle(_ParticleAdaptor pa, std::string filename) -> ScriptProvenance
15958  setup_particle(Model m, ParticleIndex pi, ScriptProvenance o) -> ScriptProvenance
15959  setup_particle(_ParticleAdaptor pa, ScriptProvenance o) -> ScriptProvenance
15960  """
15961  return _IMP_core.ScriptProvenance_setup_particle(*args)
15962 
15963  def add_attribute(self, *args):
15964  r"""
15965  add_attribute(ScriptProvenance self, FloatKey k, IMP::Float v, bool opt)
15966  add_attribute(ScriptProvenance self, FloatKey a0, IMP::Float a1)
15967  add_attribute(ScriptProvenance self, IntKey a0, IMP::Int a1)
15968  add_attribute(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
15969  add_attribute(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
15970  add_attribute(ScriptProvenance self, StringKey a0, IMP::String a1)
15971  add_attribute(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
15972  add_attribute(ScriptProvenance self, ObjectKey a0, Object a1)
15973  add_attribute(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
15974  add_attribute(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
15975  add_attribute(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
15976  add_attribute(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15977  """
15978  return _IMP_core.ScriptProvenance_add_attribute(self, *args)
15979 
15980  def get_value(self, *args):
15981  r"""
15982  get_value(ScriptProvenance self, FloatKey a0) -> IMP::Float
15983  get_value(ScriptProvenance self, IntKey a0) -> IMP::Int
15984  get_value(ScriptProvenance self, FloatsKey a0) -> IMP::Floats
15985  get_value(ScriptProvenance self, IntsKey a0) -> IMP::Ints
15986  get_value(ScriptProvenance self, StringKey a0) -> IMP::String
15987  get_value(ScriptProvenance self, ParticleIndexKey a0) -> Particle
15988  get_value(ScriptProvenance self, ObjectKey a0) -> Object
15989  get_value(ScriptProvenance self, SparseFloatKey a0) -> IMP::Float
15990  get_value(ScriptProvenance self, SparseIntKey a0) -> IMP::Int
15991  get_value(ScriptProvenance self, SparseStringKey a0) -> IMP::String
15992  get_value(ScriptProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15993  """
15994  return _IMP_core.ScriptProvenance_get_value(self, *args)
15995 
15996  def set_value(self, *args):
15997  r"""
15998  set_value(ScriptProvenance self, FloatKey a0, IMP::Float a1)
15999  set_value(ScriptProvenance self, IntKey a0, IMP::Int a1)
16000  set_value(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16001  set_value(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16002  set_value(ScriptProvenance self, StringKey a0, IMP::String a1)
16003  set_value(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16004  set_value(ScriptProvenance self, ObjectKey a0, Object a1)
16005  set_value(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16006  set_value(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16007  set_value(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16008  set_value(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16009  """
16010  return _IMP_core.ScriptProvenance_set_value(self, *args)
16011 
16012  def remove_attribute(self, *args):
16013  r"""
16014  remove_attribute(ScriptProvenance self, FloatKey a0)
16015  remove_attribute(ScriptProvenance self, IntKey a0)
16016  remove_attribute(ScriptProvenance self, FloatsKey a0)
16017  remove_attribute(ScriptProvenance self, IntsKey a0)
16018  remove_attribute(ScriptProvenance self, StringKey a0)
16019  remove_attribute(ScriptProvenance self, ParticleIndexKey a0)
16020  remove_attribute(ScriptProvenance self, ObjectKey a0)
16021  remove_attribute(ScriptProvenance self, SparseFloatKey a0)
16022  remove_attribute(ScriptProvenance self, SparseIntKey a0)
16023  remove_attribute(ScriptProvenance self, SparseStringKey a0)
16024  remove_attribute(ScriptProvenance self, SparseParticleIndexKey a0)
16025  """
16026  return _IMP_core.ScriptProvenance_remove_attribute(self, *args)
16027 
16028  def has_attribute(self, *args):
16029  r"""
16030  has_attribute(ScriptProvenance self, FloatKey a0) -> bool
16031  has_attribute(ScriptProvenance self, IntKey a0) -> bool
16032  has_attribute(ScriptProvenance self, FloatsKey a0) -> bool
16033  has_attribute(ScriptProvenance self, IntsKey a0) -> bool
16034  has_attribute(ScriptProvenance self, StringKey a0) -> bool
16035  has_attribute(ScriptProvenance self, ParticleIndexKey a0) -> bool
16036  has_attribute(ScriptProvenance self, ObjectKey a0) -> bool
16037  has_attribute(ScriptProvenance self, SparseFloatKey a0) -> bool
16038  has_attribute(ScriptProvenance self, SparseIntKey a0) -> bool
16039  has_attribute(ScriptProvenance self, SparseStringKey a0) -> bool
16040  has_attribute(ScriptProvenance self, SparseParticleIndexKey a0) -> bool
16041  """
16042  return _IMP_core.ScriptProvenance_has_attribute(self, *args)
16043 
16044  def get_derivative(self, a0):
16045  r"""get_derivative(ScriptProvenance self, FloatKey a0) -> double"""
16046  return _IMP_core.ScriptProvenance_get_derivative(self, a0)
16047 
16048  def get_name(self):
16049  r"""get_name(ScriptProvenance self) -> std::string"""
16050  return _IMP_core.ScriptProvenance_get_name(self)
16051 
16052  def clear_caches(self):
16053  r"""clear_caches(ScriptProvenance self)"""
16054  return _IMP_core.ScriptProvenance_clear_caches(self)
16055 
16056  def set_name(self, a0):
16057  r"""set_name(ScriptProvenance self, std::string a0)"""
16058  return _IMP_core.ScriptProvenance_set_name(self, a0)
16059 
16060  def set_check_level(self, a0):
16061  r"""set_check_level(ScriptProvenance self, IMP::CheckLevel a0)"""
16062  return _IMP_core.ScriptProvenance_set_check_level(self, a0)
16063 
16064  def add_to_derivative(self, a0, a1, a2):
16065  r"""add_to_derivative(ScriptProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16066  return _IMP_core.ScriptProvenance_add_to_derivative(self, a0, a1, a2)
16067 
16068  def set_is_optimized(self, a0, a1):
16069  r"""set_is_optimized(ScriptProvenance self, FloatKey a0, bool a1)"""
16070  return _IMP_core.ScriptProvenance_set_is_optimized(self, a0, a1)
16071 
16072  def get_is_optimized(self, a0):
16073  r"""get_is_optimized(ScriptProvenance self, FloatKey a0) -> bool"""
16074  return _IMP_core.ScriptProvenance_get_is_optimized(self, a0)
16075 
16076  def get_check_level(self):
16077  r"""get_check_level(ScriptProvenance self) -> IMP::CheckLevel"""
16078  return _IMP_core.ScriptProvenance_get_check_level(self)
16079 
16080  def __eq__(self, *args):
16081  r"""
16082  __eq__(ScriptProvenance self, ScriptProvenance o) -> bool
16083  __eq__(ScriptProvenance self, Particle d) -> bool
16084  """
16085  return _IMP_core.ScriptProvenance___eq__(self, *args)
16086 
16087  def __ne__(self, *args):
16088  r"""
16089  __ne__(ScriptProvenance self, ScriptProvenance o) -> bool
16090  __ne__(ScriptProvenance self, Particle d) -> bool
16091  """
16092  return _IMP_core.ScriptProvenance___ne__(self, *args)
16093 
16094  def __le__(self, *args):
16095  r"""
16096  __le__(ScriptProvenance self, ScriptProvenance o) -> bool
16097  __le__(ScriptProvenance self, Particle d) -> bool
16098  """
16099  return _IMP_core.ScriptProvenance___le__(self, *args)
16100 
16101  def __lt__(self, *args):
16102  r"""
16103  __lt__(ScriptProvenance self, ScriptProvenance o) -> bool
16104  __lt__(ScriptProvenance self, Particle d) -> bool
16105  """
16106  return _IMP_core.ScriptProvenance___lt__(self, *args)
16107 
16108  def __ge__(self, *args):
16109  r"""
16110  __ge__(ScriptProvenance self, ScriptProvenance o) -> bool
16111  __ge__(ScriptProvenance self, Particle d) -> bool
16112  """
16113  return _IMP_core.ScriptProvenance___ge__(self, *args)
16114 
16115  def __gt__(self, *args):
16116  r"""
16117  __gt__(ScriptProvenance self, ScriptProvenance o) -> bool
16118  __gt__(ScriptProvenance self, Particle d) -> bool
16119  """
16120  return _IMP_core.ScriptProvenance___gt__(self, *args)
16121 
16122  def __hash__(self):
16123  r"""__hash__(ScriptProvenance self) -> std::size_t"""
16124  return _IMP_core.ScriptProvenance___hash__(self)
16125 
16126  def __str__(self):
16127  r"""__str__(ScriptProvenance self) -> std::string"""
16128  return _IMP_core.ScriptProvenance___str__(self)
16129 
16130  def __repr__(self):
16131  r"""__repr__(ScriptProvenance self) -> std::string"""
16132  return _IMP_core.ScriptProvenance___repr__(self)
16133 
16134  def _get_as_binary(self):
16135  r"""_get_as_binary(ScriptProvenance self) -> PyObject *"""
16136  return _IMP_core.ScriptProvenance__get_as_binary(self)
16137 
16138  def _set_from_binary(self, p):
16139  r"""_set_from_binary(ScriptProvenance self, PyObject * p)"""
16140  return _IMP_core.ScriptProvenance__set_from_binary(self, p)
16141 
16142  def __getstate__(self):
16143  p = self._get_as_binary()
16144  if len(self.__dict__) > 1:
16145  d = self.__dict__.copy()
16146  del d['this']
16147  p = (d, p)
16148  return p
16149 
16150  def __setstate__(self, p):
16151  if not hasattr(self, 'this'):
16152  self.__init__()
16153  if isinstance(p, tuple):
16154  d, p = p
16155  self.__dict__.update(d)
16156  return self._set_from_binary(p)
16157 
16158  __swig_destroy__ = _IMP_core.delete_ScriptProvenance
16159 
16160 # Register ScriptProvenance in _IMP_core:
16161 _IMP_core.ScriptProvenance_swigregister(ScriptProvenance)
16162 class SoftwareProvenance(Provenance):
16163  r"""Proxy of C++ IMP::core::SoftwareProvenance class."""
16164 
16165  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16166 
16167  def set_software_name(self, name):
16168  r"""set_software_name(SoftwareProvenance self, std::string name)"""
16169  return _IMP_core.SoftwareProvenance_set_software_name(self, name)
16170 
16171  def get_software_name(self):
16172  r"""get_software_name(SoftwareProvenance self) -> std::string"""
16173  return _IMP_core.SoftwareProvenance_get_software_name(self)
16174 
16175  def set_version(self, version):
16176  r"""set_version(SoftwareProvenance self, std::string version)"""
16177  return _IMP_core.SoftwareProvenance_set_version(self, version)
16178 
16179  def get_version(self):
16180  r"""get_version(SoftwareProvenance self) -> std::string"""
16181  return _IMP_core.SoftwareProvenance_get_version(self)
16182 
16183  def set_location(self, location):
16184  r"""set_location(SoftwareProvenance self, std::string location)"""
16185  return _IMP_core.SoftwareProvenance_set_location(self, location)
16186 
16187  def get_location(self):
16188  r"""get_location(SoftwareProvenance self) -> std::string"""
16189  return _IMP_core.SoftwareProvenance_get_location(self)
16190 
16191  def __init__(self, *args):
16192  r"""
16193  __init__(SoftwareProvenance self) -> SoftwareProvenance
16194  __init__(SoftwareProvenance self, Model m, ParticleIndex id) -> SoftwareProvenance
16195  __init__(SoftwareProvenance self, _ParticleAdaptor d) -> SoftwareProvenance
16196  """
16197  _IMP_core.SoftwareProvenance_swiginit(self, _IMP_core.new_SoftwareProvenance(*args))
16198 
16199  @staticmethod
16200  def get_is_setup(*args):
16201  r"""
16202  get_is_setup(Model m, ParticleIndex pi) -> bool
16203  get_is_setup(_ParticleAdaptor p) -> bool
16204  """
16205  return _IMP_core.SoftwareProvenance_get_is_setup(*args)
16206 
16207  def show(self, *args):
16208  r"""show(SoftwareProvenance self, _ostream out=std::cout)"""
16209  return _IMP_core.SoftwareProvenance_show(self, *args)
16210 
16211  @staticmethod
16212  def setup_particle(*args):
16213  r"""
16214  setup_particle(Model m, ParticleIndex pi, std::string name, std::string version, std::string location) -> SoftwareProvenance
16215  setup_particle(_ParticleAdaptor pa, std::string name, std::string version, std::string location) -> SoftwareProvenance
16216  setup_particle(Model m, ParticleIndex pi, SoftwareProvenance o) -> SoftwareProvenance
16217  setup_particle(_ParticleAdaptor pa, SoftwareProvenance o) -> SoftwareProvenance
16218  """
16219  return _IMP_core.SoftwareProvenance_setup_particle(*args)
16220 
16221  def add_attribute(self, *args):
16222  r"""
16223  add_attribute(SoftwareProvenance self, FloatKey k, IMP::Float v, bool opt)
16224  add_attribute(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16225  add_attribute(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16226  add_attribute(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16227  add_attribute(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16228  add_attribute(SoftwareProvenance self, StringKey a0, IMP::String a1)
16229  add_attribute(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16230  add_attribute(SoftwareProvenance self, ObjectKey a0, Object a1)
16231  add_attribute(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16232  add_attribute(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16233  add_attribute(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16234  add_attribute(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16235  """
16236  return _IMP_core.SoftwareProvenance_add_attribute(self, *args)
16237 
16238  def get_value(self, *args):
16239  r"""
16240  get_value(SoftwareProvenance self, FloatKey a0) -> IMP::Float
16241  get_value(SoftwareProvenance self, IntKey a0) -> IMP::Int
16242  get_value(SoftwareProvenance self, FloatsKey a0) -> IMP::Floats
16243  get_value(SoftwareProvenance self, IntsKey a0) -> IMP::Ints
16244  get_value(SoftwareProvenance self, StringKey a0) -> IMP::String
16245  get_value(SoftwareProvenance self, ParticleIndexKey a0) -> Particle
16246  get_value(SoftwareProvenance self, ObjectKey a0) -> Object
16247  get_value(SoftwareProvenance self, SparseFloatKey a0) -> IMP::Float
16248  get_value(SoftwareProvenance self, SparseIntKey a0) -> IMP::Int
16249  get_value(SoftwareProvenance self, SparseStringKey a0) -> IMP::String
16250  get_value(SoftwareProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16251  """
16252  return _IMP_core.SoftwareProvenance_get_value(self, *args)
16253 
16254  def set_value(self, *args):
16255  r"""
16256  set_value(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16257  set_value(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16258  set_value(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16259  set_value(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16260  set_value(SoftwareProvenance self, StringKey a0, IMP::String a1)
16261  set_value(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16262  set_value(SoftwareProvenance self, ObjectKey a0, Object a1)
16263  set_value(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16264  set_value(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16265  set_value(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16266  set_value(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16267  """
16268  return _IMP_core.SoftwareProvenance_set_value(self, *args)
16269 
16270  def remove_attribute(self, *args):
16271  r"""
16272  remove_attribute(SoftwareProvenance self, FloatKey a0)
16273  remove_attribute(SoftwareProvenance self, IntKey a0)
16274  remove_attribute(SoftwareProvenance self, FloatsKey a0)
16275  remove_attribute(SoftwareProvenance self, IntsKey a0)
16276  remove_attribute(SoftwareProvenance self, StringKey a0)
16277  remove_attribute(SoftwareProvenance self, ParticleIndexKey a0)
16278  remove_attribute(SoftwareProvenance self, ObjectKey a0)
16279  remove_attribute(SoftwareProvenance self, SparseFloatKey a0)
16280  remove_attribute(SoftwareProvenance self, SparseIntKey a0)
16281  remove_attribute(SoftwareProvenance self, SparseStringKey a0)
16282  remove_attribute(SoftwareProvenance self, SparseParticleIndexKey a0)
16283  """
16284  return _IMP_core.SoftwareProvenance_remove_attribute(self, *args)
16285 
16286  def has_attribute(self, *args):
16287  r"""
16288  has_attribute(SoftwareProvenance self, FloatKey a0) -> bool
16289  has_attribute(SoftwareProvenance self, IntKey a0) -> bool
16290  has_attribute(SoftwareProvenance self, FloatsKey a0) -> bool
16291  has_attribute(SoftwareProvenance self, IntsKey a0) -> bool
16292  has_attribute(SoftwareProvenance self, StringKey a0) -> bool
16293  has_attribute(SoftwareProvenance self, ParticleIndexKey a0) -> bool
16294  has_attribute(SoftwareProvenance self, ObjectKey a0) -> bool
16295  has_attribute(SoftwareProvenance self, SparseFloatKey a0) -> bool
16296  has_attribute(SoftwareProvenance self, SparseIntKey a0) -> bool
16297  has_attribute(SoftwareProvenance self, SparseStringKey a0) -> bool
16298  has_attribute(SoftwareProvenance self, SparseParticleIndexKey a0) -> bool
16299  """
16300  return _IMP_core.SoftwareProvenance_has_attribute(self, *args)
16301 
16302  def get_derivative(self, a0):
16303  r"""get_derivative(SoftwareProvenance self, FloatKey a0) -> double"""
16304  return _IMP_core.SoftwareProvenance_get_derivative(self, a0)
16305 
16306  def get_name(self):
16307  r"""get_name(SoftwareProvenance self) -> std::string"""
16308  return _IMP_core.SoftwareProvenance_get_name(self)
16309 
16310  def clear_caches(self):
16311  r"""clear_caches(SoftwareProvenance self)"""
16312  return _IMP_core.SoftwareProvenance_clear_caches(self)
16313 
16314  def set_name(self, a0):
16315  r"""set_name(SoftwareProvenance self, std::string a0)"""
16316  return _IMP_core.SoftwareProvenance_set_name(self, a0)
16317 
16318  def set_check_level(self, a0):
16319  r"""set_check_level(SoftwareProvenance self, IMP::CheckLevel a0)"""
16320  return _IMP_core.SoftwareProvenance_set_check_level(self, a0)
16321 
16322  def add_to_derivative(self, a0, a1, a2):
16323  r"""add_to_derivative(SoftwareProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16324  return _IMP_core.SoftwareProvenance_add_to_derivative(self, a0, a1, a2)
16325 
16326  def set_is_optimized(self, a0, a1):
16327  r"""set_is_optimized(SoftwareProvenance self, FloatKey a0, bool a1)"""
16328  return _IMP_core.SoftwareProvenance_set_is_optimized(self, a0, a1)
16329 
16330  def get_is_optimized(self, a0):
16331  r"""get_is_optimized(SoftwareProvenance self, FloatKey a0) -> bool"""
16332  return _IMP_core.SoftwareProvenance_get_is_optimized(self, a0)
16333 
16334  def get_check_level(self):
16335  r"""get_check_level(SoftwareProvenance self) -> IMP::CheckLevel"""
16336  return _IMP_core.SoftwareProvenance_get_check_level(self)
16337 
16338  def __eq__(self, *args):
16339  r"""
16340  __eq__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16341  __eq__(SoftwareProvenance self, Particle d) -> bool
16342  """
16343  return _IMP_core.SoftwareProvenance___eq__(self, *args)
16344 
16345  def __ne__(self, *args):
16346  r"""
16347  __ne__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16348  __ne__(SoftwareProvenance self, Particle d) -> bool
16349  """
16350  return _IMP_core.SoftwareProvenance___ne__(self, *args)
16351 
16352  def __le__(self, *args):
16353  r"""
16354  __le__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16355  __le__(SoftwareProvenance self, Particle d) -> bool
16356  """
16357  return _IMP_core.SoftwareProvenance___le__(self, *args)
16358 
16359  def __lt__(self, *args):
16360  r"""
16361  __lt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16362  __lt__(SoftwareProvenance self, Particle d) -> bool
16363  """
16364  return _IMP_core.SoftwareProvenance___lt__(self, *args)
16365 
16366  def __ge__(self, *args):
16367  r"""
16368  __ge__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16369  __ge__(SoftwareProvenance self, Particle d) -> bool
16370  """
16371  return _IMP_core.SoftwareProvenance___ge__(self, *args)
16372 
16373  def __gt__(self, *args):
16374  r"""
16375  __gt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16376  __gt__(SoftwareProvenance self, Particle d) -> bool
16377  """
16378  return _IMP_core.SoftwareProvenance___gt__(self, *args)
16379 
16380  def __hash__(self):
16381  r"""__hash__(SoftwareProvenance self) -> std::size_t"""
16382  return _IMP_core.SoftwareProvenance___hash__(self)
16383 
16384  def __str__(self):
16385  r"""__str__(SoftwareProvenance self) -> std::string"""
16386  return _IMP_core.SoftwareProvenance___str__(self)
16387 
16388  def __repr__(self):
16389  r"""__repr__(SoftwareProvenance self) -> std::string"""
16390  return _IMP_core.SoftwareProvenance___repr__(self)
16391 
16392  def _get_as_binary(self):
16393  r"""_get_as_binary(SoftwareProvenance self) -> PyObject *"""
16394  return _IMP_core.SoftwareProvenance__get_as_binary(self)
16395 
16396  def _set_from_binary(self, p):
16397  r"""_set_from_binary(SoftwareProvenance self, PyObject * p)"""
16398  return _IMP_core.SoftwareProvenance__set_from_binary(self, p)
16399 
16400  def __getstate__(self):
16401  p = self._get_as_binary()
16402  if len(self.__dict__) > 1:
16403  d = self.__dict__.copy()
16404  del d['this']
16405  p = (d, p)
16406  return p
16407 
16408  def __setstate__(self, p):
16409  if not hasattr(self, 'this'):
16410  self.__init__()
16411  if isinstance(p, tuple):
16412  d, p = p
16413  self.__dict__.update(d)
16414  return self._set_from_binary(p)
16415 
16416  __swig_destroy__ = _IMP_core.delete_SoftwareProvenance
16417 
16418 # Register SoftwareProvenance in _IMP_core:
16419 _IMP_core.SoftwareProvenance_swigregister(SoftwareProvenance)
16420 class Provenanced(IMP.Decorator):
16421  r"""Proxy of C++ IMP::core::Provenanced class."""
16422 
16423  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16424 
16425  def get_provenance(self):
16426  r"""get_provenance(Provenanced self) -> Provenance"""
16427  return _IMP_core.Provenanced_get_provenance(self)
16428 
16429  def set_provenance(self, p):
16430  r"""set_provenance(Provenanced self, Provenance p)"""
16431  return _IMP_core.Provenanced_set_provenance(self, p)
16432 
16433  def __init__(self, *args):
16434  r"""
16435  __init__(Provenanced self) -> Provenanced
16436  __init__(Provenanced self, Model m, ParticleIndex id) -> Provenanced
16437  __init__(Provenanced self, _ParticleAdaptor d) -> Provenanced
16438  """
16439  _IMP_core.Provenanced_swiginit(self, _IMP_core.new_Provenanced(*args))
16440 
16441  @staticmethod
16442  def get_is_setup(*args):
16443  r"""
16444  get_is_setup(Model m, ParticleIndex pi) -> bool
16445  get_is_setup(_ParticleAdaptor p) -> bool
16446  """
16447  return _IMP_core.Provenanced_get_is_setup(*args)
16448 
16449  def show(self, *args):
16450  r"""show(Provenanced self, _ostream out=std::cout)"""
16451  return _IMP_core.Provenanced_show(self, *args)
16452 
16453  @staticmethod
16454  def setup_particle(*args):
16455  r"""
16456  setup_particle(Model m, ParticleIndex pi, Provenance p) -> Provenanced
16457  setup_particle(_ParticleAdaptor pa, Provenance p) -> Provenanced
16458  """
16459  return _IMP_core.Provenanced_setup_particle(*args)
16460 
16461  def add_attribute(self, *args):
16462  r"""
16463  add_attribute(Provenanced self, FloatKey k, IMP::Float v, bool opt)
16464  add_attribute(Provenanced self, FloatKey a0, IMP::Float a1)
16465  add_attribute(Provenanced self, IntKey a0, IMP::Int a1)
16466  add_attribute(Provenanced self, FloatsKey a0, IMP::Floats a1)
16467  add_attribute(Provenanced self, IntsKey a0, IMP::Ints a1)
16468  add_attribute(Provenanced self, StringKey a0, IMP::String a1)
16469  add_attribute(Provenanced self, ParticleIndexKey a0, Particle a1)
16470  add_attribute(Provenanced self, ObjectKey a0, Object a1)
16471  add_attribute(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16472  add_attribute(Provenanced self, SparseIntKey a0, IMP::Int a1)
16473  add_attribute(Provenanced self, SparseStringKey a0, IMP::String a1)
16474  add_attribute(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16475  """
16476  return _IMP_core.Provenanced_add_attribute(self, *args)
16477 
16478  def get_value(self, *args):
16479  r"""
16480  get_value(Provenanced self, FloatKey a0) -> IMP::Float
16481  get_value(Provenanced self, IntKey a0) -> IMP::Int
16482  get_value(Provenanced self, FloatsKey a0) -> IMP::Floats
16483  get_value(Provenanced self, IntsKey a0) -> IMP::Ints
16484  get_value(Provenanced self, StringKey a0) -> IMP::String
16485  get_value(Provenanced self, ParticleIndexKey a0) -> Particle
16486  get_value(Provenanced self, ObjectKey a0) -> Object
16487  get_value(Provenanced self, SparseFloatKey a0) -> IMP::Float
16488  get_value(Provenanced self, SparseIntKey a0) -> IMP::Int
16489  get_value(Provenanced self, SparseStringKey a0) -> IMP::String
16490  get_value(Provenanced self, SparseParticleIndexKey a0) -> ParticleIndex
16491  """
16492  return _IMP_core.Provenanced_get_value(self, *args)
16493 
16494  def set_value(self, *args):
16495  r"""
16496  set_value(Provenanced self, FloatKey a0, IMP::Float a1)
16497  set_value(Provenanced self, IntKey a0, IMP::Int a1)
16498  set_value(Provenanced self, FloatsKey a0, IMP::Floats a1)
16499  set_value(Provenanced self, IntsKey a0, IMP::Ints a1)
16500  set_value(Provenanced self, StringKey a0, IMP::String a1)
16501  set_value(Provenanced self, ParticleIndexKey a0, Particle a1)
16502  set_value(Provenanced self, ObjectKey a0, Object a1)
16503  set_value(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16504  set_value(Provenanced self, SparseIntKey a0, IMP::Int a1)
16505  set_value(Provenanced self, SparseStringKey a0, IMP::String a1)
16506  set_value(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16507  """
16508  return _IMP_core.Provenanced_set_value(self, *args)
16509 
16510  def remove_attribute(self, *args):
16511  r"""
16512  remove_attribute(Provenanced self, FloatKey a0)
16513  remove_attribute(Provenanced self, IntKey a0)
16514  remove_attribute(Provenanced self, FloatsKey a0)
16515  remove_attribute(Provenanced self, IntsKey a0)
16516  remove_attribute(Provenanced self, StringKey a0)
16517  remove_attribute(Provenanced self, ParticleIndexKey a0)
16518  remove_attribute(Provenanced self, ObjectKey a0)
16519  remove_attribute(Provenanced self, SparseFloatKey a0)
16520  remove_attribute(Provenanced self, SparseIntKey a0)
16521  remove_attribute(Provenanced self, SparseStringKey a0)
16522  remove_attribute(Provenanced self, SparseParticleIndexKey a0)
16523  """
16524  return _IMP_core.Provenanced_remove_attribute(self, *args)
16525 
16526  def has_attribute(self, *args):
16527  r"""
16528  has_attribute(Provenanced self, FloatKey a0) -> bool
16529  has_attribute(Provenanced self, IntKey a0) -> bool
16530  has_attribute(Provenanced self, FloatsKey a0) -> bool
16531  has_attribute(Provenanced self, IntsKey a0) -> bool
16532  has_attribute(Provenanced self, StringKey a0) -> bool
16533  has_attribute(Provenanced self, ParticleIndexKey a0) -> bool
16534  has_attribute(Provenanced self, ObjectKey a0) -> bool
16535  has_attribute(Provenanced self, SparseFloatKey a0) -> bool
16536  has_attribute(Provenanced self, SparseIntKey a0) -> bool
16537  has_attribute(Provenanced self, SparseStringKey a0) -> bool
16538  has_attribute(Provenanced self, SparseParticleIndexKey a0) -> bool
16539  """
16540  return _IMP_core.Provenanced_has_attribute(self, *args)
16541 
16542  def get_derivative(self, a0):
16543  r"""get_derivative(Provenanced self, FloatKey a0) -> double"""
16544  return _IMP_core.Provenanced_get_derivative(self, a0)
16545 
16546  def get_name(self):
16547  r"""get_name(Provenanced self) -> std::string"""
16548  return _IMP_core.Provenanced_get_name(self)
16549 
16550  def clear_caches(self):
16551  r"""clear_caches(Provenanced self)"""
16552  return _IMP_core.Provenanced_clear_caches(self)
16553 
16554  def set_name(self, a0):
16555  r"""set_name(Provenanced self, std::string a0)"""
16556  return _IMP_core.Provenanced_set_name(self, a0)
16557 
16558  def set_check_level(self, a0):
16559  r"""set_check_level(Provenanced self, IMP::CheckLevel a0)"""
16560  return _IMP_core.Provenanced_set_check_level(self, a0)
16561 
16562  def add_to_derivative(self, a0, a1, a2):
16563  r"""add_to_derivative(Provenanced self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16564  return _IMP_core.Provenanced_add_to_derivative(self, a0, a1, a2)
16565 
16566  def set_is_optimized(self, a0, a1):
16567  r"""set_is_optimized(Provenanced self, FloatKey a0, bool a1)"""
16568  return _IMP_core.Provenanced_set_is_optimized(self, a0, a1)
16569 
16570  def get_is_optimized(self, a0):
16571  r"""get_is_optimized(Provenanced self, FloatKey a0) -> bool"""
16572  return _IMP_core.Provenanced_get_is_optimized(self, a0)
16573 
16574  def get_check_level(self):
16575  r"""get_check_level(Provenanced self) -> IMP::CheckLevel"""
16576  return _IMP_core.Provenanced_get_check_level(self)
16577 
16578  def __eq__(self, *args):
16579  r"""
16580  __eq__(Provenanced self, Provenanced o) -> bool
16581  __eq__(Provenanced self, Particle d) -> bool
16582  """
16583  return _IMP_core.Provenanced___eq__(self, *args)
16584 
16585  def __ne__(self, *args):
16586  r"""
16587  __ne__(Provenanced self, Provenanced o) -> bool
16588  __ne__(Provenanced self, Particle d) -> bool
16589  """
16590  return _IMP_core.Provenanced___ne__(self, *args)
16591 
16592  def __le__(self, *args):
16593  r"""
16594  __le__(Provenanced self, Provenanced o) -> bool
16595  __le__(Provenanced self, Particle d) -> bool
16596  """
16597  return _IMP_core.Provenanced___le__(self, *args)
16598 
16599  def __lt__(self, *args):
16600  r"""
16601  __lt__(Provenanced self, Provenanced o) -> bool
16602  __lt__(Provenanced self, Particle d) -> bool
16603  """
16604  return _IMP_core.Provenanced___lt__(self, *args)
16605 
16606  def __ge__(self, *args):
16607  r"""
16608  __ge__(Provenanced self, Provenanced o) -> bool
16609  __ge__(Provenanced self, Particle d) -> bool
16610  """
16611  return _IMP_core.Provenanced___ge__(self, *args)
16612 
16613  def __gt__(self, *args):
16614  r"""
16615  __gt__(Provenanced self, Provenanced o) -> bool
16616  __gt__(Provenanced self, Particle d) -> bool
16617  """
16618  return _IMP_core.Provenanced___gt__(self, *args)
16619 
16620  def __hash__(self):
16621  r"""__hash__(Provenanced self) -> std::size_t"""
16622  return _IMP_core.Provenanced___hash__(self)
16623 
16624  def __str__(self):
16625  r"""__str__(Provenanced self) -> std::string"""
16626  return _IMP_core.Provenanced___str__(self)
16627 
16628  def __repr__(self):
16629  r"""__repr__(Provenanced self) -> std::string"""
16630  return _IMP_core.Provenanced___repr__(self)
16631 
16632  def _get_as_binary(self):
16633  r"""_get_as_binary(Provenanced self) -> PyObject *"""
16634  return _IMP_core.Provenanced__get_as_binary(self)
16635 
16636  def _set_from_binary(self, p):
16637  r"""_set_from_binary(Provenanced self, PyObject * p)"""
16638  return _IMP_core.Provenanced__set_from_binary(self, p)
16639 
16640  def __getstate__(self):
16641  p = self._get_as_binary()
16642  if len(self.__dict__) > 1:
16643  d = self.__dict__.copy()
16644  del d['this']
16645  p = (d, p)
16646  return p
16647 
16648  def __setstate__(self, p):
16649  if not hasattr(self, 'this'):
16650  self.__init__()
16651  if isinstance(p, tuple):
16652  d, p = p
16653  self.__dict__.update(d)
16654  return self._set_from_binary(p)
16655 
16656  __swig_destroy__ = _IMP_core.delete_Provenanced
16657 
16658 # Register Provenanced in _IMP_core:
16659 _IMP_core.Provenanced_swigregister(Provenanced)
16660 
16661 def add_provenance(m, pi, p):
16662  r"""add_provenance(Model m, ParticleIndex pi, Provenance p)"""
16663  return _IMP_core.add_provenance(m, pi, p)
16664 
16665 def create_clone(p):
16666  r"""create_clone(Provenance p) -> Provenance"""
16667  return _IMP_core.create_clone(p)
16668 
16670  r"""
16671  get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16672  get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & b) -> Transformation3D
16673  get_transformation_aligning_first_to_second(IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16674  """
16675  return _IMP_core.get_transformation_aligning_first_to_second(*args)
16676 
16677 def create_restraint(ps, pp):
16678  r"""create_restraint(PairScore ps, IMP::ParticlePair pp) -> Restraint"""
16679  return _IMP_core.create_restraint(ps, pp)
16681  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::LOWER > class."""
16682 
16683  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16684 
16685  def __init__(self, *args):
16686  r"""
16687  __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicLowerBound
16688  __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicLowerBound
16689  """
16690  _IMP_core.TruncatedHarmonicLowerBound_swiginit(self, _IMP_core.new_TruncatedHarmonicLowerBound(*args))
16691 
16692  def get_version_info(self):
16693  r"""get_version_info(TruncatedHarmonicLowerBound self) -> VersionInfo"""
16694  return _IMP_core.TruncatedHarmonicLowerBound_get_version_info(self)
16695  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicLowerBound
16696 
16697  def __str__(self):
16698  r"""__str__(TruncatedHarmonicLowerBound self) -> std::string"""
16699  return _IMP_core.TruncatedHarmonicLowerBound___str__(self)
16700 
16701  def __repr__(self):
16702  r"""__repr__(TruncatedHarmonicLowerBound self) -> std::string"""
16703  return _IMP_core.TruncatedHarmonicLowerBound___repr__(self)
16704 
16705  @staticmethod
16706  def get_from(o):
16707  return _object_cast_to_TruncatedHarmonic(o)
16708 
16709 
16710 # Register TruncatedHarmonicLowerBound in _IMP_core:
16711 _IMP_core.TruncatedHarmonicLowerBound_swigregister(TruncatedHarmonicLowerBound)
16713  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::UPPER > class."""
16714 
16715  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16716 
16717  def __init__(self, *args):
16718  r"""
16719  __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicUpperBound
16720  __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicUpperBound
16721  """
16722  _IMP_core.TruncatedHarmonicUpperBound_swiginit(self, _IMP_core.new_TruncatedHarmonicUpperBound(*args))
16723 
16724  def get_version_info(self):
16725  r"""get_version_info(TruncatedHarmonicUpperBound self) -> VersionInfo"""
16726  return _IMP_core.TruncatedHarmonicUpperBound_get_version_info(self)
16727  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicUpperBound
16728 
16729  def __str__(self):
16730  r"""__str__(TruncatedHarmonicUpperBound self) -> std::string"""
16731  return _IMP_core.TruncatedHarmonicUpperBound___str__(self)
16732 
16733  def __repr__(self):
16734  r"""__repr__(TruncatedHarmonicUpperBound self) -> std::string"""
16735  return _IMP_core.TruncatedHarmonicUpperBound___repr__(self)
16736 
16737  @staticmethod
16738  def get_from(o):
16739  return _object_cast_to_TruncatedHarmonic(o)
16740 
16741 
16742 # Register TruncatedHarmonicUpperBound in _IMP_core:
16743 _IMP_core.TruncatedHarmonicUpperBound_swigregister(TruncatedHarmonicUpperBound)
16745  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::BOTH > class."""
16746 
16747  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16748 
16749  def __init__(self, *args):
16750  r"""
16751  __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicBound
16752  __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicBound
16753  """
16754  _IMP_core.TruncatedHarmonicBound_swiginit(self, _IMP_core.new_TruncatedHarmonicBound(*args))
16755 
16756  def get_version_info(self):
16757  r"""get_version_info(TruncatedHarmonicBound self) -> VersionInfo"""
16758  return _IMP_core.TruncatedHarmonicBound_get_version_info(self)
16759  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicBound
16760 
16761  def __str__(self):
16762  r"""__str__(TruncatedHarmonicBound self) -> std::string"""
16763  return _IMP_core.TruncatedHarmonicBound___str__(self)
16764 
16765  def __repr__(self):
16766  r"""__repr__(TruncatedHarmonicBound self) -> std::string"""
16767  return _IMP_core.TruncatedHarmonicBound___repr__(self)
16768 
16769  @staticmethod
16770  def get_from(o):
16771  return _object_cast_to_TruncatedHarmonic(o)
16772 
16773 
16774 # Register TruncatedHarmonicBound in _IMP_core:
16775 _IMP_core.TruncatedHarmonicBound_swigregister(TruncatedHarmonicBound)
16776 class ParticleType(IMP._Value):
16777  r"""Proxy of C++ IMP::Key< 34897493 > class."""
16778 
16779  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16780 
16781  def __init__(self, *args):
16782  r"""
16783  __init__(ParticleType self) -> ParticleType
16784  __init__(ParticleType self, std::string const & c, bool is_implicit_add_permitted=True) -> ParticleType
16785  __init__(ParticleType self, unsigned int i) -> ParticleType
16786  """
16787  _IMP_core.ParticleType_swiginit(self, _IMP_core.new_ParticleType(*args))
16788 
16789  @staticmethod
16790  def add_key(sc):
16791  r"""add_key(std::string sc) -> unsigned int"""
16792  return _IMP_core.ParticleType_add_key(sc)
16793 
16794  @staticmethod
16795  def get_key_exists(sc):
16796  r"""get_key_exists(std::string sc) -> bool"""
16797  return _IMP_core.ParticleType_get_key_exists(sc)
16798 
16799  def get_string(self):
16800  r"""get_string(ParticleType self) -> std::string const"""
16801  return _IMP_core.ParticleType_get_string(self)
16802 
16803  def __cmp__(self, o):
16804  r"""__cmp__(ParticleType self, ParticleType o) -> int"""
16805  return _IMP_core.ParticleType___cmp__(self, o)
16806 
16807  def __eq__(self, o):
16808  r"""__eq__(ParticleType self, ParticleType o) -> bool"""
16809  return _IMP_core.ParticleType___eq__(self, o)
16810 
16811  def __ne__(self, o):
16812  r"""__ne__(ParticleType self, ParticleType o) -> bool"""
16813  return _IMP_core.ParticleType___ne__(self, o)
16814 
16815  def __lt__(self, o):
16816  r"""__lt__(ParticleType self, ParticleType o) -> bool"""
16817  return _IMP_core.ParticleType___lt__(self, o)
16818 
16819  def __gt__(self, o):
16820  r"""__gt__(ParticleType self, ParticleType o) -> bool"""
16821  return _IMP_core.ParticleType___gt__(self, o)
16822 
16823  def __ge__(self, o):
16824  r"""__ge__(ParticleType self, ParticleType o) -> bool"""
16825  return _IMP_core.ParticleType___ge__(self, o)
16826 
16827  def __le__(self, o):
16828  r"""__le__(ParticleType self, ParticleType o) -> bool"""
16829  return _IMP_core.ParticleType___le__(self, o)
16830 
16831  def __hash__(self):
16832  r"""__hash__(ParticleType self) -> std::size_t"""
16833  return _IMP_core.ParticleType___hash__(self)
16834 
16835  def show(self, *args):
16836  r"""show(ParticleType self, _ostream out=std::cout)"""
16837  return _IMP_core.ParticleType_show(self, *args)
16838 
16839  @staticmethod
16840  def add_alias(old_key, new_name):
16841  r"""add_alias(ParticleType old_key, std::string new_name) -> ParticleType"""
16842  return _IMP_core.ParticleType_add_alias(old_key, new_name)
16843 
16844  @staticmethod
16845  def get_number_of_keys():
16846  r"""get_number_of_keys() -> unsigned int"""
16847  return _IMP_core.ParticleType_get_number_of_keys()
16848 
16849  def get_index(self):
16850  r"""get_index(ParticleType self) -> unsigned int"""
16851  return _IMP_core.ParticleType_get_index(self)
16852 
16853  @staticmethod
16854  def show_all(out):
16855  r"""show_all(_ostream out)"""
16856  return _IMP_core.ParticleType_show_all(out)
16857 
16858  @staticmethod
16859  def get_all_strings():
16860  r"""get_all_strings() -> IMP::Vector< std::string >"""
16861  return _IMP_core.ParticleType_get_all_strings()
16862 
16863  @staticmethod
16864  def get_number_unique():
16865  r"""get_number_unique() -> unsigned int"""
16866  return _IMP_core.ParticleType_get_number_unique()
16867 
16868  def __str__(self):
16869  r"""__str__(ParticleType self) -> std::string"""
16870  return _IMP_core.ParticleType___str__(self)
16871 
16872  def __repr__(self):
16873  r"""__repr__(ParticleType self) -> std::string"""
16874  return _IMP_core.ParticleType___repr__(self)
16875  __swig_destroy__ = _IMP_core.delete_ParticleType
16876 
16877 # Register ParticleType in _IMP_core:
16878 _IMP_core.ParticleType_swigregister(ParticleType)
16880  r"""Proxy of C++ IMP::core::GenericAttributeSingletonScore< UnaryFunction > class."""
16881 
16882  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16883  __repr__ = _swig_repr
16884 
16885  def __init__(self, f, k):
16886  r"""__init__(AttributeSingletonScore self, UnaryFunction f, FloatKey k) -> AttributeSingletonScore"""
16887  _IMP_core.AttributeSingletonScore_swiginit(self, _IMP_core.new_AttributeSingletonScore(f, k))
16888 
16889  def do_get_inputs(self, m, pis):
16890  r"""do_get_inputs(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
16891  return _IMP_core.AttributeSingletonScore_do_get_inputs(self, m, pis)
16892 
16893  def get_unary_function(self):
16894  r"""get_unary_function(AttributeSingletonScore self) -> UnaryFunction"""
16895  return _IMP_core.AttributeSingletonScore_get_unary_function(self)
16896 
16897  def get_key(self):
16898  r"""get_key(AttributeSingletonScore self) -> FloatKey"""
16899  return _IMP_core.AttributeSingletonScore_get_key(self)
16900 
16901  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
16902  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"""
16903  return _IMP_core.AttributeSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
16904 
16905  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
16906  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"""
16907  return _IMP_core.AttributeSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
16908 
16909  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
16910  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"""
16911  return _IMP_core.AttributeSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
16912 
16913  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
16914  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"""
16915  return _IMP_core.AttributeSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
16916 
16917  def get_version_info(self):
16918  r"""get_version_info(AttributeSingletonScore self) -> VersionInfo"""
16919  return _IMP_core.AttributeSingletonScore_get_version_info(self)
16920  __swig_destroy__ = _IMP_core.delete_AttributeSingletonScore
16921 
16922  @staticmethod
16923  def get_from(o):
16924  return _object_cast_to_AttributeSingletonScore(o)
16925 
16926 
16927  def _get_jax(self, m, indexes):
16928  def score_float_key(jm, key, uf):
16929  return uf(jm[key][indexes])
16930 
16931  def score_xyz_key(jm, xyz_index, uf):
16932  return uf(jm['xyz'][indexes, xyz_index])
16933 
16934  uf = self.get_unary_function().get_derived_object()._get_jax()
16935  key = self.get_key()
16936  # First 7 FloatKeys are reserved in IMP and have to be handled
16937  # specially
16938  if key.get_index() >= 7:
16939  need_keys = [key]
16940  f = functools.partial(score_float_key, key=key.get_string(), uf=uf)
16941  elif key == XYZR.get_radius_key():
16942  need_keys = [] # We already have the radius in the JAX model
16943  f = functools.partial(score_float_key, key='r', uf=uf)
16944  elif key in XYZ.get_xyz_keys():
16945  need_keys = [] # We already have coordinates in the JAX model
16946  xyz_index = XYZ.get_xyz_keys().index(key)
16947  f = functools.partial(score_xyz_key, xyz_index=xyz_index, uf=uf)
16948  else:
16949  raise NotImplementedError("No support for key %s" % key)
16950  return self._wrap_jax(m, f, keys=need_keys)
16951 
16952 
16953 # Register AttributeSingletonScore in _IMP_core:
16954 _IMP_core.AttributeSingletonScore_swigregister(AttributeSingletonScore)
16955 
16957  r"""create_generic_attribute_singleton_score(UnaryFunction uf, FloatKey k) -> AttributeSingletonScore"""
16958  return _IMP_core.create_generic_attribute_singleton_score(uf, k)
16960  r"""Proxy of C++ IMP::core::GenericBoundingBox3DSingletonScore< UnaryFunction > class."""
16961 
16962  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16963  __repr__ = _swig_repr
16964 
16965  def __init__(self, f, bb):
16966  r"""__init__(BoundingBox3DSingletonScore self, UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
16967  _IMP_core.BoundingBox3DSingletonScore_swiginit(self, _IMP_core.new_BoundingBox3DSingletonScore(f, bb))
16968 
16969  def get_unary_function(self):
16970  r"""get_unary_function(BoundingBox3DSingletonScore self) -> UnaryFunction"""
16971  return _IMP_core.BoundingBox3DSingletonScore_get_unary_function(self)
16972 
16973  def get_bounding_box(self):
16974  r"""get_bounding_box(BoundingBox3DSingletonScore self) -> BoundingBox3D"""
16975  return _IMP_core.BoundingBox3DSingletonScore_get_bounding_box(self)
16976 
16977  def do_get_inputs(self, m, pis):
16978  r"""do_get_inputs(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
16979  return _IMP_core.BoundingBox3DSingletonScore_do_get_inputs(self, m, pis)
16980 
16981  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
16982  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"""
16983  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
16984 
16985  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
16986  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"""
16987  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
16988 
16989  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
16990  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"""
16991  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
16992 
16993  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
16994  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"""
16995  return _IMP_core.BoundingBox3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
16996 
16997  def get_version_info(self):
16998  r"""get_version_info(BoundingBox3DSingletonScore self) -> VersionInfo"""
16999  return _IMP_core.BoundingBox3DSingletonScore_get_version_info(self)
17000  __swig_destroy__ = _IMP_core.delete_BoundingBox3DSingletonScore
17001 
17002  @staticmethod
17003  def get_from(o):
17004  return _object_cast_to_BoundingBox3DSingletonScore(o)
17005 
17006 
17007  def _get_jax(self, m, indexes):
17008  import jax.numpy as jnp
17009  def score(jm, box_min, box_max, uf):
17010  xyzs = jm['xyz'][indexes]
17011  # This calculates the distance and the score for every point,
17012  # even those inside the box. IMP just returns zero for points
17013  # inside the box, skipping the distance calculation.
17014  # The implementation here is *probably* faster on a GPU since
17015  # we reduce the use of conditionals, and JAX will likely skip
17016  # the sqrt if uf is a harmonic, but this should be benchmarked.
17017  drs = jnp.linalg.norm(
17018  xyzs - jnp.clip(xyzs, box_min, box_max), axis=1)
17019  return uf(drs)
17020  uf = self.get_unary_function().get_derived_object()
17021  bb = self.get_bounding_box()
17022  f = functools.partial(score, box_min=jnp.asarray(bb.get_corner(0)),
17023  box_max=jnp.asarray(bb.get_corner(1)),
17024  uf=uf._get_jax())
17025  return self._wrap_jax(m, f)
17026 
17027 
17028 # Register BoundingBox3DSingletonScore in _IMP_core:
17029 _IMP_core.BoundingBox3DSingletonScore_swigregister(BoundingBox3DSingletonScore)
17030 
17031 def create_bounding_box_3d_singleton_score(f, bb):
17032  r"""create_bounding_box_3d_singleton_score(UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17033  return _IMP_core.create_bounding_box_3d_singleton_score(f, bb)
17035  r"""Proxy of C++ IMP::core::GenericBoundingSphere3DSingletonScore< UnaryFunction > class."""
17036 
17037  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17038  __repr__ = _swig_repr
17039 
17040  def __init__(self, f, sphere):
17041  r"""__init__(BoundingSphere3DSingletonScore self, UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17042  _IMP_core.BoundingSphere3DSingletonScore_swiginit(self, _IMP_core.new_BoundingSphere3DSingletonScore(f, sphere))
17043 
17044  def do_get_inputs(self, m, pis):
17045  r"""do_get_inputs(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17046  return _IMP_core.BoundingSphere3DSingletonScore_do_get_inputs(self, m, pis)
17047 
17048  def get_unary_function(self):
17049  r"""get_unary_function(BoundingSphere3DSingletonScore self) -> UnaryFunction"""
17050  return _IMP_core.BoundingSphere3DSingletonScore_get_unary_function(self)
17051 
17052  def get_sphere(self):
17053  r"""get_sphere(BoundingSphere3DSingletonScore self) -> Sphere3D"""
17054  return _IMP_core.BoundingSphere3DSingletonScore_get_sphere(self)
17055 
17056  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17057  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"""
17058  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17059 
17060  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17061  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"""
17062  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17063 
17064  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17065  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"""
17066  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17067 
17068  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17069  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"""
17070  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17071 
17072  def get_version_info(self):
17073  r"""get_version_info(BoundingSphere3DSingletonScore self) -> VersionInfo"""
17074  return _IMP_core.BoundingSphere3DSingletonScore_get_version_info(self)
17075  __swig_destroy__ = _IMP_core.delete_BoundingSphere3DSingletonScore
17076 
17077  @staticmethod
17078  def get_from(o):
17079  return _object_cast_to_BoundingSphere3DSingletonScore(o)
17080 
17081 
17082  def _get_jax(self, m, indexes):
17083  import jax.numpy as jnp
17084  import jax.lax
17085  def score_with_radius(jm, inds, center, radius):
17086  xyzs = jm['xyz'][inds]
17087  radii = jm['r'][inds]
17088  drs = jnp.linalg.norm(xyzs - center) + radii - radius
17089  return jax.lax.select(drs < 0.000001, jnp.zeros_like(drs), uf(drs))
17090  def score_without_radius(jm, inds, center, radius):
17091  xyzs = jm['xyz'][inds]
17092  drs = jnp.linalg.norm(xyzs - center) - radius
17093  return jax.lax.select(drs < 0.000001, jnp.zeros_like(drs), uf(drs))
17094  without_radii_inds = []
17095  with_radii_inds = []
17096  for ind in indexes:
17097  if XYZR.get_is_setup(m, ind):
17098  with_radii_inds.append(ind)
17099  else:
17100  without_radii_inds.append(ind)
17101  without_radii_inds = jnp.asarray(without_radii_inds)
17102  with_radii_inds = jnp.asarray(with_radii_inds)
17103  uf = self.get_unary_function().get_derived_object()._get_jax()
17104  sphere = self.get_sphere()
17105  radius = sphere.get_radius()
17106  center = jnp.asarray(sphere.get_center())
17107  def score(jm):
17108  s = 0.
17109  if without_radii_inds.size > 0:
17110  s += score_without_radius(jm, without_radii_inds,
17111  center, radius)
17112  if with_radii_inds.size > 0:
17113  s += score_with_radius(jm, with_radii_inds, center, radius)
17114  return s
17115  return self._wrap_jax(m, score)
17116 
17117 
17118 # Register BoundingSphere3DSingletonScore in _IMP_core:
17119 _IMP_core.BoundingSphere3DSingletonScore_swigregister(BoundingSphere3DSingletonScore)
17120 
17121 def create_bounding_sphere_3d_singleton_score(f, sphere):
17122  r"""create_bounding_sphere_3d_singleton_score(UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17123  return _IMP_core.create_bounding_sphere_3d_singleton_score(f, sphere)
17125  r"""Proxy of C++ IMP::core::GenericDistanceToSingletonScore< UnaryFunction > class."""
17126 
17127  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17128  __repr__ = _swig_repr
17129 
17130  def __init__(self, *args):
17131  r"""
17132  __init__(DistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore
17133  __init__(DistanceToSingletonScore self) -> DistanceToSingletonScore
17134  """
17135  _IMP_core.DistanceToSingletonScore_swiginit(self, _IMP_core.new_DistanceToSingletonScore(*args))
17136 
17137  def do_get_inputs(self, m, pis):
17138  r"""do_get_inputs(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17139  return _IMP_core.DistanceToSingletonScore_do_get_inputs(self, m, pis)
17140 
17141  def get_unary_function(self):
17142  r"""get_unary_function(DistanceToSingletonScore self) -> UnaryFunction"""
17143  return _IMP_core.DistanceToSingletonScore_get_unary_function(self)
17144 
17145  def get_point(self):
17146  r"""get_point(DistanceToSingletonScore self) -> Vector3D"""
17147  return _IMP_core.DistanceToSingletonScore_get_point(self)
17148 
17149  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17150  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"""
17151  return _IMP_core.DistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17152 
17153  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17154  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"""
17155  return _IMP_core.DistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17156 
17157  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17158  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"""
17159  return _IMP_core.DistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17160 
17161  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17162  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"""
17163  return _IMP_core.DistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17164 
17165  def get_version_info(self):
17166  r"""get_version_info(DistanceToSingletonScore self) -> VersionInfo"""
17167  return _IMP_core.DistanceToSingletonScore_get_version_info(self)
17168  __swig_destroy__ = _IMP_core.delete_DistanceToSingletonScore
17169 
17170  @staticmethod
17171  def get_from(o):
17172  return _object_cast_to_DistanceToSingletonScore(o)
17173 
17174 
17175  def _get_as_binary(self):
17176  r"""_get_as_binary(DistanceToSingletonScore self) -> PyObject *"""
17177  return _IMP_core.DistanceToSingletonScore__get_as_binary(self)
17178 
17179  def _set_from_binary(self, p):
17180  r"""_set_from_binary(DistanceToSingletonScore self, PyObject * p)"""
17181  return _IMP_core.DistanceToSingletonScore__set_from_binary(self, p)
17182 
17183  def __getstate__(self):
17184  p = self._get_as_binary()
17185  if len(self.__dict__) > 1:
17186  d = self.__dict__.copy()
17187  del d['this']
17188  p = (d, p)
17189  return p
17190 
17191  def __setstate__(self, p):
17192  if not hasattr(self, 'this'):
17193  self.__init__()
17194  if isinstance(p, tuple):
17195  d, p = p
17196  self.__dict__.update(d)
17197  return self._set_from_binary(p)
17198 
17199 
17200  def _get_jax(self, m, indexes):
17201  import jax.numpy as jnp
17202  def score(jm, point, uf):
17203  xyzs = jm['xyz'][indexes]
17204  drs = jnp.linalg.norm(xyzs - point, axis=1)
17205  return uf(drs)
17206  uf = self.get_unary_function().get_derived_object()
17207  f = functools.partial(score, point=jnp.array(self.get_point()),
17208  uf=uf._get_jax())
17209  return self._wrap_jax(m, f)
17210 
17211 
17212 # Register DistanceToSingletonScore in _IMP_core:
17213 _IMP_core.DistanceToSingletonScore_swigregister(DistanceToSingletonScore)
17214 
17215 def create_distance_to_singleton_score(f, pt):
17216  r"""create_distance_to_singleton_score(UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore"""
17217  return _IMP_core.create_distance_to_singleton_score(f, pt)
17218 
17219 class SphereDistancePairScore(_SphereDistancePairScore.__bases__[0]):
17220  def __init__(self, uf):
17221  if isinstance(uf, HarmonicUpperBound):
17222  p = HarmonicUpperBoundSphereDistancePairScore(
17223  uf.get_mean(), uf.get_k())
17224  elif isinstance(uf, HarmonicLowerBound):
17225  if uf.get_mean() == 0.0:
17226  p = SoftSpherePairScore(uf.get_k())
17227  else:
17228  p = _SphereDistancePairScore(uf)
17229  elif isinstance(uf, Harmonic):
17230  p = HarmonicSphereDistancePairScore(
17231  uf.get_mean(), uf.get_k())
17232  else:
17233  p = _SphereDistancePairScore(uf)
17234  self.__dict__['_proxied'] = p
17235  def __getattr__(self, key):
17236  return getattr(self._proxied, key)
17237  def __setattr__(self, key, val):
17238  return setattr(self._proxied, key, val)
17239 
17240  def __getstate__(self):
17241  return self.__dict__['_proxied']
17242 
17243  def __setstate__(self, p):
17244  self.__dict__['_proxied'] = p
17245 
17246  def _get_jax(self, *args, **kwargs):
17247  return self._proxied._get_jax(*args, **kwargs)
17248 
17249  @staticmethod
17250  def get_from(o):
17251  try:
17252  p = HarmonicUpperBoundSphereDistancePairScore.get_from(o)
17253  except ValueError:
17254  try:
17255  p = HarmonicSphereDistancePairScore.get_from(o)
17256  except ValueError:
17257  try:
17258  p = SoftSpherePairScore.get_from(o)
17259  except ValueError:
17260  p = _SphereDistancePairScore.get_from(o)
17261  obj = object.__new__(SphereDistancePairScore)
17262  obj.__dict__['_proxied'] = p
17263  return obj
17264 
17265 
17266 
17267 def get_all_provenance(p, types=[StructureProvenance, SampleProvenance,
17268  CombineProvenance, FilterProvenance,
17269  ClusterProvenance, ScriptProvenance,
17270  SoftwareProvenance]):
17271  """Yield all provenance decorators of the given types for the particle.
17272  By default, all provenance types are returned. Provenance is returned
17273  in order, most recent first. If the particle has no provenance
17274  information, an empty generator is returned."""
17275  if Provenanced.get_is_setup(p):
17276  prov = Provenanced(p).get_provenance()
17277  while prov:
17278  for c in types:
17279  if c.get_is_setup(prov):
17280  yield c(prov)
17281  prov = prov.get_previous()
17282 
17284  """Tag the given particle with the current Python script.
17285  This is a noop if the particle is already so tagged."""
17286  main = sys.modules['__main__']
17287 # Can't do anything if running from an interactive interpreter
17288  if not hasattr(main, '__file__'):
17289  return
17290  f = IMP.get_absolute_path(main.__file__)
17291  for prov in get_all_provenance(p, types=[ScriptProvenance]):
17292  if prov.get_filename() == f:
17293  return
17294  m = p.get_model()
17295  provp = IMP.Particle(m)
17296  provp.set_name('script')
17297  prov = ScriptProvenance.setup_particle(provp, f)
17298  add_provenance(m, p, prov)
17299 
17300 def add_software_provenance(p, name, version, location):
17301  """Tag the given particle with the software used to create it.
17302  This is a noop if the particle is already so tagged."""
17303  for prov in get_all_provenance(p, types=[SoftwareProvenance]):
17304  if prov.get_software_name() == name and prov.get_version() == version \
17305  and prov.get_location() == location:
17306  return
17307  m = p.get_model()
17308  provp = IMP.Particle(m)
17309  provp.set_name('software')
17310  prov = SoftwareProvenance.setup_particle(provp, name, version, location)
17311  add_provenance(m, p, prov)
17312 
17314  """Tag the given particle as being created by the current version of IMP."""
17315  add_software_provenance(p, name="Integrative Modeling Platform (IMP)",
17316  version=IMP.get_module_version(),
17317  location="https://integrativemodeling.org")
17318 
17319 
17320 def get_module_name():
17321  r"""get_module_name() -> std::string const"""
17322  return _IMP_core.get_module_name()
17323 
17324 def get_module_version():
17325  r"""get_module_version() -> std::string const"""
17326  return _IMP_core.get_module_version()
17327 
17328 def get_example_path(fname):
17329  r"""get_example_path(std::string fname) -> std::string"""
17330  return _IMP_core.get_example_path(fname)
17331 
17332 def get_data_path(fname):
17333  r"""get_data_path(std::string fname) -> std::string"""
17334  return _IMP_core.get_data_path(fname)
17335 
17336 from . import _version_check
17337 _version_check.check_version(get_module_version())
17338 __version__ = get_module_version()
17339 
17340 
F visit_breadth_first(HD d, F f)
Apply the visitor to each particle, breadth first.
A base class for geometry contained in particles.
A base class for modifiers of ParticlesTemp.
GenericDistanceToSingletonScore< UnaryFunction > DistanceToSingletonScore
Rotation3D get_rotation_about_normalized_axis(const Vector3D &axis_norm, double angle)
Definition: Rotation3D.h:391
double get_kt(double T)
Return kT for a given temperature in units of [kcal/mol].
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:44
double get_height(const Surface &s, const XYZR &d)
Get height of sphere above surface.
Definition: Surface.h:129
algebra::Transformation3D get_transformation_aligning_first_to_second(XYZsOrVector3ds a, XYZsOrVector3ds b)
double get_mean(const cv::Mat &mat, const cvIntMat &mask)
CheckLevel get_check_level()
Get the current audit mode.
Definition: exception.h:80
def add_script_provenance
Tag the given particle with the current Python script.
GenericBoundingSphere3DSingletonScore< UnaryFunction > BoundingSphere3DSingletonScore
Abstract predicate function.
Definition: QuadPredicate.h:31
Restraint * create_restraint(Score *s, const typename Score::Argument &t, std::string name=std::string())
Definition: generic.h:36
ParticleIndex get_root_rigid_body(RigidMember m)
Return the index of the outer-most rigid body containing the member.
algebra::ReferenceFrame3D get_initial_reference_frame(Model *m, const ParticleIndexes &pis)
The base class for geometry.
F visit_depth_first(HD d, F &f)
Apply functor F to each particle, traversing the hierarchy depth first.
XYZRs create_xyzr_particles(Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
A base class for geometry contained in particles.
double get_angle(Direction a, Direction b)
Get angle between directions.
A base class for geometry from a set of particles.
double get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d)
Compute the dihedral angle (in radians) between the four particles.
Make CGAL functionality available to IMP.
Provenance create_clone(Provenance p)
Clone provenance (including previous provenance)
ParticlesTemp create_rigid_bodies(Model *m, unsigned int n, bool no_members=false)
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.
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
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.
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
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