IMP logo
IMP Reference Guide  develop.d36d3deffb,2026/11/09
The Integrative Modeling Platform
core/__init__.py
1 # This file was automatically generated by SWIG (https://www.swig.org).
2 # Version 4.5.1
3 #
4 # Do not make changes to this file unless you know what you are doing - modify
5 # the SWIG interface file instead.
6 
7 
8 # This wrapper is part of IMP,
9 # Copyright 2007-2026 IMP Inventors. All rights reserved.
10 
11 
12 
13 import functools
14 
15 
16 
17 import typing
18 import _IMP_core
19 
20 import builtins as __builtin__
21 
22 def _swig_repr(self):
23  try:
24  strthis = "proxy of " + self.this.__repr__()
25  except __builtin__.Exception:
26  strthis = ""
27  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
28 
29 
30 def _swig_setattr_nondynamic_instance_variable(set):
31  def set_instance_attr(self, name, value):
32  if name == "this":
33  set(self, name, value)
34  elif name == "thisown":
35  self.this.own(value)
36  elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
37  set(self, name, value)
38  else:
39  raise AttributeError("You cannot add instance attributes to %s" % self)
40  return set_instance_attr
41 
42 
43 def _swig_setattr_nondynamic_class_variable(set):
44  def set_class_attr(cls, name, value):
45  if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
46  set(cls, name, value)
47  else:
48  raise AttributeError("You cannot add class attributes to %s" % cls)
49  return set_class_attr
50 
51 
52 class _SwigNonDynamicMeta(type):
53  """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
54  __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
55 
56 
57 import weakref
58 
59 class IMP_CORE_SwigPyIterator(object):
60  r"""Proxy of C++ swig::IMP_CORE_SwigPyIterator class."""
61 
62  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
63 
64  def __init__(self, *args, **kwargs):
65  raise AttributeError("No constructor defined - class is abstract")
66  __repr__ = _swig_repr
67  __swig_destroy__ = _IMP_core.delete_IMP_CORE_SwigPyIterator
68 
69  def value(self):
70  r"""value(IMP_CORE_SwigPyIterator self) -> PyObject *"""
71  return _IMP_core.IMP_CORE_SwigPyIterator_value(self)
72 
73  def incr(self, n=1):
74  r"""incr(IMP_CORE_SwigPyIterator self, size_t n=1) -> IMP_CORE_SwigPyIterator"""
75  return _IMP_core.IMP_CORE_SwigPyIterator_incr(self, n)
76 
77  def decr(self, n=1):
78  r"""decr(IMP_CORE_SwigPyIterator self, size_t n=1) -> IMP_CORE_SwigPyIterator"""
79  return _IMP_core.IMP_CORE_SwigPyIterator_decr(self, n)
80 
81  def distance(self, x):
82  r"""distance(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> ptrdiff_t"""
83  return _IMP_core.IMP_CORE_SwigPyIterator_distance(self, x)
84 
85  def equal(self, x):
86  r"""equal(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> bool"""
87  return _IMP_core.IMP_CORE_SwigPyIterator_equal(self, x)
88 
89  def copy(self):
90  r"""copy(IMP_CORE_SwigPyIterator self) -> IMP_CORE_SwigPyIterator"""
91  return _IMP_core.IMP_CORE_SwigPyIterator_copy(self)
92 
93  def __next__(self):
94  r"""__next__(IMP_CORE_SwigPyIterator self) -> PyObject *"""
95  return _IMP_core.IMP_CORE_SwigPyIterator___next__(self)
96 
97  def previous(self):
98  r"""previous(IMP_CORE_SwigPyIterator self) -> PyObject *"""
99  return _IMP_core.IMP_CORE_SwigPyIterator_previous(self)
100 
101  def advance(self, n):
102  r"""advance(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator"""
103  return _IMP_core.IMP_CORE_SwigPyIterator_advance(self, n)
104 
105  def __eq__(self, x):
106  r"""__eq__(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> bool"""
107  return _IMP_core.IMP_CORE_SwigPyIterator___eq__(self, x)
108 
109  def __ne__(self, x):
110  r"""__ne__(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> bool"""
111  return _IMP_core.IMP_CORE_SwigPyIterator___ne__(self, x)
112 
113  def __iadd__(self, n):
114  r"""__iadd__(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator"""
115  return _IMP_core.IMP_CORE_SwigPyIterator___iadd__(self, n)
116 
117  def __isub__(self, n):
118  r"""__isub__(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator"""
119  return _IMP_core.IMP_CORE_SwigPyIterator___isub__(self, n)
120 
121  def __add__(self, n):
122  r"""__add__(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator"""
123  return _IMP_core.IMP_CORE_SwigPyIterator___add__(self, n)
124 
125  def __sub__(self, *args):
126  r"""
127  __sub__(IMP_CORE_SwigPyIterator self, ptrdiff_t n) -> IMP_CORE_SwigPyIterator
128  __sub__(IMP_CORE_SwigPyIterator self, IMP_CORE_SwigPyIterator x) -> ptrdiff_t
129  """
130  return _IMP_core.IMP_CORE_SwigPyIterator___sub__(self, *args)
131  def __iter__(self):
132  return self
133 
134 # Register IMP_CORE_SwigPyIterator in _IMP_core:
135 _IMP_core.IMP_CORE_SwigPyIterator_swigregister(IMP_CORE_SwigPyIterator)
136 
137 _value_types=[]
138 _object_types=[]
139 _raii_types=[]
140 _plural_types=[]
141 
142 IMP_DEBUG = _IMP_core.IMP_DEBUG
143 
144 IMP_RELEASE = _IMP_core.IMP_RELEASE
145 
146 IMP_SILENT = _IMP_core.IMP_SILENT
147 
148 IMP_PROGRESS = _IMP_core.IMP_PROGRESS
149 
150 IMP_TERSE = _IMP_core.IMP_TERSE
151 
152 IMP_VERBOSE = _IMP_core.IMP_VERBOSE
153 
154 IMP_MEMORY = _IMP_core.IMP_MEMORY
155 
156 IMP_NONE = _IMP_core.IMP_NONE
157 
158 IMP_USAGE = _IMP_core.IMP_USAGE
159 
160 IMP_INTERNAL = _IMP_core.IMP_INTERNAL
161 
162 IMP_KERNEL_HAS_LOG4CXX = _IMP_core.IMP_KERNEL_HAS_LOG4CXX
163 
164 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_core.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
165 
166 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_core.IMP_COMPILER_HAS_DEBUG_VECTOR
167 
168 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_core.IMP_COMPILER_HAS_RANDOM_SHUFFLE
169 
170 IMP_COMPILER_HAS_THREE_WAY = _IMP_core.IMP_COMPILER_HAS_THREE_WAY
171 
172 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_core.IMP_KERNEL_HAS_BOOST_RANDOM
173 
174 IMP_KERNEL_HAS_NUMPY = _IMP_core.IMP_KERNEL_HAS_NUMPY
175 
176 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_core.IMP_KERNEL_HAS_BOOST_SYSTEM
177 
178 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_core.IMP_KERNEL_HAS_GPERFTOOLS
179 
180 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_core.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
181 
182 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_core.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
183 
184 IMPKERNEL_SHOW_WARNINGS = _IMP_core.IMPKERNEL_SHOW_WARNINGS
185 
186 
187 import sys
188 class _DirectorObjects:
189  """@internal Simple class to keep references to director objects
190  to prevent premature deletion."""
191  def __init__(self):
192  self._objects = []
193  def register(self, obj):
194  """Take a reference to a director object; will only work for
195  refcounted C++ classes"""
196  if hasattr(obj, 'get_ref_count'):
197  self._objects.append(obj)
198  def cleanup(self):
199  """Only drop our reference and allow cleanup by Python if no other
200  Python references exist (we hold 3 references: one in self._objects,
201  one in x, and one in the argument list for getrefcount) *and* no
202  other C++ references exist (the Python object always holds one)"""
203  objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
204  or x.get_ref_count() > 1]
205 # Do in two steps so the references are kept until the end of the
206 # function (deleting references may trigger a fresh call to this method)
207  self._objects = objs
208  def get_object_count(self):
209  """Get number of director objects (useful for testing only)"""
210  return len(self._objects)
211 _director_objects = _DirectorObjects()
212 
213 class _ostream(object):
214  r"""Proxy of C++ std::ostream class."""
215 
216  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
217 
218  def __init__(self, *args, **kwargs):
219  raise AttributeError("No constructor defined")
220  __repr__ = _swig_repr
221 
222  def write(self, osa_buf):
223  r"""write(_ostream self, char const * osa_buf)"""
224  return _IMP_core._ostream_write(self, osa_buf)
225 
226 # Register _ostream in _IMP_core:
227 _IMP_core._ostream_swigregister(_ostream)
228 IMP_C_OPEN_BINARY = _IMP_core.IMP_C_OPEN_BINARY
229 
230 import IMP
231 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_CGAL_HAS_BOOST_FILESYSTEM
232 
233 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
234 
235 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_core.IMP_CGAL_HAS_BOOST_RANDOM
236 
237 IMP_CGAL_HAS_NUMPY = _IMP_core.IMP_CGAL_HAS_NUMPY
238 
239 IMPCGAL_SHOW_WARNINGS = _IMP_core.IMPCGAL_SHOW_WARNINGS
240 
241 import IMP.cgal
242 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_core.IMP_ALGEBRA_HAS_IMP_CGAL
243 
244 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
245 
246 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
247 
248 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_core.IMP_ALGEBRA_HAS_BOOST_RANDOM
249 
250 IMP_ALGEBRA_HAS_CGAL = _IMP_core.IMP_ALGEBRA_HAS_CGAL
251 
252 IMP_ALGEBRA_HAS_NUMPY = _IMP_core.IMP_ALGEBRA_HAS_NUMPY
253 
254 IMP_ALGEBRA_HAS_ANN = _IMP_core.IMP_ALGEBRA_HAS_ANN
255 
256 IMPALGEBRA_SHOW_WARNINGS = _IMP_core.IMPALGEBRA_SHOW_WARNINGS
257 
258 import IMP.algebra
259 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_core.IMP_DISPLAY_HAS_IMP_CGAL
260 
261 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
262 
263 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
264 
265 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_core.IMP_DISPLAY_HAS_BOOST_RANDOM
266 
267 IMP_DISPLAY_HAS_CGAL = _IMP_core.IMP_DISPLAY_HAS_CGAL
268 
269 IMP_DISPLAY_HAS_NUMPY = _IMP_core.IMP_DISPLAY_HAS_NUMPY
270 
271 IMPDISPLAY_SHOW_WARNINGS = _IMP_core.IMPDISPLAY_SHOW_WARNINGS
272 
273 import IMP.display
274 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_core.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
275 
276 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
277 
278 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
279 
280 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_core.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
281 
282 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_core.IMP_SCORE_FUNCTOR_HAS_CGAL
283 
284 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_core.IMP_SCORE_FUNCTOR_HAS_HDF5
285 
286 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_core.IMP_SCORE_FUNCTOR_HAS_NUMPY
287 
288 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_core.IMPSCOREFUNCTOR_SHOW_WARNINGS
289 
290 import IMP.score_functor
291 IMP_CORE_HAS_IMP_CGAL = _IMP_core.IMP_CORE_HAS_IMP_CGAL
292 
293 IMP_CORE_HAS_IMP_KERNEL = _IMP_core.IMP_CORE_HAS_IMP_KERNEL
294 
295 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_core.IMP_CORE_HAS_BOOST_FILESYSTEM
296 
297 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_core.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
298 
299 IMP_CORE_HAS_BOOST_RANDOM = _IMP_core.IMP_CORE_HAS_BOOST_RANDOM
300 
301 IMP_CORE_HAS_CGAL = _IMP_core.IMP_CORE_HAS_CGAL
302 
303 IMP_CORE_HAS_HDF5 = _IMP_core.IMP_CORE_HAS_HDF5
304 
305 IMP_CORE_HAS_NUMPY = _IMP_core.IMP_CORE_HAS_NUMPY
306 
307 IMPCORE_SHOW_WARNINGS = _IMP_core.IMPCORE_SHOW_WARNINGS
308 
309 class _OpenCubicSplineBase(IMP.UnaryFunction):
310  r"""Proxy of C++ IMP::score_functor::ScoreUnaryFunction< IMP::score_functor::OpenCubicSpline > class."""
311 
312  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
313  __repr__ = _swig_repr
314 
315  def __init__(self, *args):
316  r"""__init__(_OpenCubicSplineBase self, IMP::score_functor::OpenCubicSpline const & score, std::string name="UnaryFunction%1%") -> _OpenCubicSplineBase"""
317  _IMP_core._OpenCubicSplineBase_swiginit(self, _IMP_core.new__OpenCubicSplineBase(*args))
318 
319  def get_version_info(self):
320  r"""get_version_info(_OpenCubicSplineBase self) -> VersionInfo"""
321  return _IMP_core._OpenCubicSplineBase_get_version_info(self)
322  __swig_destroy__ = _IMP_core.delete__OpenCubicSplineBase
323 
324 # Register _OpenCubicSplineBase in _IMP_core:
325 _IMP_core._OpenCubicSplineBase_swigregister(_OpenCubicSplineBase)
326 
327 _object_types.append("MonteCarloMover")
328 
329 
330 def _object_cast_to_MonteCarloMover(o):
331  r"""_object_cast_to_MonteCarloMover(Object o) -> MonteCarloMover"""
332  return _IMP_core._object_cast_to_MonteCarloMover(o)
333 
334 MonteCarloMoverResults=list
335 _plural_types.append("MonteCarloMoverResults")
336 _value_types.append("MonteCarloMoverResult")
337 
338 
339 _object_types.append("AngleRestraint")
340 
341 
342 def _object_cast_to_AngleRestraint(o):
343  r"""_object_cast_to_AngleRestraint(Object o) -> AngleRestraint"""
344  return _IMP_core._object_cast_to_AngleRestraint(o)
345 
346 _object_types.append("AngleTripletScore")
347 
348 
349 def _object_cast_to_AngleTripletScore(o):
350  r"""_object_cast_to_AngleTripletScore(Object o) -> AngleTripletScore"""
351  return _IMP_core._object_cast_to_AngleTripletScore(o)
352 
353 _object_types.append("DihedralQuadScore")
354 
355 
356 def _object_cast_to_DihedralQuadScore(o):
357  r"""_object_cast_to_DihedralQuadScore(Object o) -> DihedralQuadScore"""
358  return _IMP_core._object_cast_to_DihedralQuadScore(o)
359 
360 _object_types.append("AttributeSingletonScore")
361 
362 
363 def _object_cast_to_AttributeSingletonScore(o):
364  r"""_object_cast_to_AttributeSingletonScore(Object o) -> AttributeSingletonScore"""
365  return _IMP_core._object_cast_to_AttributeSingletonScore(o)
366 
367 _object_types.append("BallMover")
368 
369 
370 def _object_cast_to_BallMover(o):
371  r"""_object_cast_to_BallMover(Object o) -> BallMover"""
372  return _IMP_core._object_cast_to_BallMover(o)
373 
374 _object_types.append("SerialMover")
375 
376 
377 def _object_cast_to_SerialMover(o):
378  r"""_object_cast_to_SerialMover(Object o) -> SerialMover"""
379  return _IMP_core._object_cast_to_SerialMover(o)
380 
381 _object_types.append("SubsetMover")
382 
383 
384 def _object_cast_to_SubsetMover(o):
385  r"""_object_cast_to_SubsetMover(Object o) -> SubsetMover"""
386  return _IMP_core._object_cast_to_SubsetMover(o)
387 
388 _object_types.append("DirectionMover")
389 
390 
391 def _object_cast_to_DirectionMover(o):
392  r"""_object_cast_to_DirectionMover(Object o) -> DirectionMover"""
393  return _IMP_core._object_cast_to_DirectionMover(o)
394 
395 _object_types.append("SurfaceMover")
396 
397 
398 def _object_cast_to_SurfaceMover(o):
399  r"""_object_cast_to_SurfaceMover(Object o) -> SurfaceMover"""
400  return _IMP_core._object_cast_to_SurfaceMover(o)
401 
402 _object_types.append("BoundingBox3DSingletonScore")
403 
404 
405 def _object_cast_to_BoundingBox3DSingletonScore(o):
406  r"""_object_cast_to_BoundingBox3DSingletonScore(Object o) -> BoundingBox3DSingletonScore"""
407  return _IMP_core._object_cast_to_BoundingBox3DSingletonScore(o)
408 
409 _object_types.append("BoundingSphere3DSingletonScore")
410 
411 
412 def _object_cast_to_BoundingSphere3DSingletonScore(o):
413  r"""_object_cast_to_BoundingSphere3DSingletonScore(Object o) -> BoundingSphere3DSingletonScore"""
414  return _IMP_core._object_cast_to_BoundingSphere3DSingletonScore(o)
415 
416 _object_types.append("BoxSweepClosePairsFinder")
417 
418 
419 def _object_cast_to_BoxSweepClosePairsFinder(o):
420  r"""_object_cast_to_BoxSweepClosePairsFinder(Object o) -> BoxSweepClosePairsFinder"""
421  return _IMP_core._object_cast_to_BoxSweepClosePairsFinder(o)
422 
423 _object_types.append("NearestNeighborsClosePairsFinder")
424 
425 
426 def _object_cast_to_NearestNeighborsClosePairsFinder(o):
427  r"""_object_cast_to_NearestNeighborsClosePairsFinder(Object o) -> NearestNeighborsClosePairsFinder"""
428  return _IMP_core._object_cast_to_NearestNeighborsClosePairsFinder(o)
429 
430 _object_types.append("CentroidOfRefined")
431 
432 
433 def _object_cast_to_CentroidOfRefined(o):
434  r"""_object_cast_to_CentroidOfRefined(Object o) -> CentroidOfRefined"""
435  return _IMP_core._object_cast_to_CentroidOfRefined(o)
436 
437 _object_types.append("ChecksScoreState")
438 
439 
440 def _object_cast_to_ChecksScoreState(o):
441  r"""_object_cast_to_ChecksScoreState(Object o) -> ChecksScoreState"""
442  return _IMP_core._object_cast_to_ChecksScoreState(o)
443 
444 _object_types.append("ChildrenRefiner")
445 
446 
447 def _object_cast_to_ChildrenRefiner(o):
448  r"""_object_cast_to_ChildrenRefiner(Object o) -> ChildrenRefiner"""
449  return _IMP_core._object_cast_to_ChildrenRefiner(o)
450 
451 _object_types.append("ClosePairsFinder")
452 
453 
454 def _object_cast_to_ClosePairsFinder(o):
455  r"""_object_cast_to_ClosePairsFinder(Object o) -> ClosePairsFinder"""
456  return _IMP_core._object_cast_to_ClosePairsFinder(o)
457 
458 _object_types.append("ClosePairsPairScore")
459 
460 
461 def _object_cast_to_ClosePairsPairScore(o):
462  r"""_object_cast_to_ClosePairsPairScore(Object o) -> ClosePairsPairScore"""
463  return _IMP_core._object_cast_to_ClosePairsPairScore(o)
464 
465 _object_types.append("ClosedCubicSpline")
466 
467 
468 def _object_cast_to_ClosedCubicSpline(o):
469  r"""_object_cast_to_ClosedCubicSpline(Object o) -> ClosedCubicSpline"""
470  return _IMP_core._object_cast_to_ClosedCubicSpline(o)
471 
472 _object_types.append("ConjugateGradients")
473 
474 
475 def _object_cast_to_ConjugateGradients(o):
476  r"""_object_cast_to_ConjugateGradients(Object o) -> ConjugateGradients"""
477  return _IMP_core._object_cast_to_ConjugateGradients(o)
478 
479 _object_types.append("ConnectivityRestraint")
480 
481 
482 def _object_cast_to_ConnectivityRestraint(o):
483  r"""_object_cast_to_ConnectivityRestraint(Object o) -> ConnectivityRestraint"""
484  return _IMP_core._object_cast_to_ConnectivityRestraint(o)
485 
486 _object_types.append("ConstantRestraint")
487 
488 
489 def _object_cast_to_ConstantRestraint(o):
490  r"""_object_cast_to_ConstantRestraint(Object o) -> ConstantRestraint"""
491  return _IMP_core._object_cast_to_ConstantRestraint(o)
492 
493 _object_types.append("Cosine")
494 
495 
496 def _object_cast_to_Cosine(o):
497  r"""_object_cast_to_Cosine(Object o) -> Cosine"""
498  return _IMP_core._object_cast_to_Cosine(o)
499 
500 _object_types.append("CoverRefined")
501 
502 
503 def _object_cast_to_CoverRefined(o):
504  r"""_object_cast_to_CoverRefined(Object o) -> CoverRefined"""
505  return _IMP_core._object_cast_to_CoverRefined(o)
506 
507 _object_types.append("DerivativesFromRefined")
508 
509 
510 def _object_cast_to_DerivativesFromRefined(o):
511  r"""_object_cast_to_DerivativesFromRefined(Object o) -> DerivativesFromRefined"""
512  return _IMP_core._object_cast_to_DerivativesFromRefined(o)
513 
514 _object_types.append("DerivativesToRefined")
515 
516 
517 def _object_cast_to_DerivativesToRefined(o):
518  r"""_object_cast_to_DerivativesToRefined(Object o) -> DerivativesToRefined"""
519  return _IMP_core._object_cast_to_DerivativesToRefined(o)
520 
521 _object_types.append("WeightedDerivativesToRefined")
522 
523 
524 def _object_cast_to_WeightedDerivativesToRefined(o):
525  r"""_object_cast_to_WeightedDerivativesToRefined(Object o) -> IMP::core::WeightedDerivativesToRefined *"""
526  return _IMP_core._object_cast_to_WeightedDerivativesToRefined(o)
527 
528 _object_types.append("DiameterRestraint")
529 
530 
531 def _object_cast_to_DiameterRestraint(o):
532  r"""_object_cast_to_DiameterRestraint(Object o) -> DiameterRestraint"""
533  return _IMP_core._object_cast_to_DiameterRestraint(o)
534 
535 _object_types.append("DihedralRestraint")
536 
537 
538 def _object_cast_to_DihedralRestraint(o):
539  r"""_object_cast_to_DihedralRestraint(Object o) -> DihedralRestraint"""
540  return _IMP_core._object_cast_to_DihedralRestraint(o)
541 
542 _object_types.append("DistanceRestraint")
543 
544 
545 def _object_cast_to_DistanceRestraint(o):
546  r"""_object_cast_to_DistanceRestraint(Object o) -> DistanceRestraint"""
547  return _IMP_core._object_cast_to_DistanceRestraint(o)
548 
549 _object_types.append("DistanceToSingletonScore")
550 
551 
552 def _object_cast_to_DistanceToSingletonScore(o):
553  r"""_object_cast_to_DistanceToSingletonScore(Object o) -> DistanceToSingletonScore"""
554  return _IMP_core._object_cast_to_DistanceToSingletonScore(o)
555 
556 _object_types.append("ExcludedVolumeRestraint")
557 
558 
559 def _object_cast_to_ExcludedVolumeRestraint(o):
560  r"""_object_cast_to_ExcludedVolumeRestraint(Object o) -> ExcludedVolumeRestraint"""
561  return _IMP_core._object_cast_to_ExcludedVolumeRestraint(o)
562 
563 _object_types.append("FixedRefiner")
564 
565 
566 def _object_cast_to_FixedRefiner(o):
567  r"""_object_cast_to_FixedRefiner(Object o) -> FixedRefiner"""
568  return _IMP_core._object_cast_to_FixedRefiner(o)
569 
570 _object_types.append("GridClosePairsFinder")
571 
572 
573 def _object_cast_to_GridClosePairsFinder(o):
574  r"""_object_cast_to_GridClosePairsFinder(Object o) -> GridClosePairsFinder"""
575  return _IMP_core._object_cast_to_GridClosePairsFinder(o)
576 
577 _object_types.append("Harmonic")
578 
579 
580 def _object_cast_to_Harmonic(o):
581  r"""_object_cast_to_Harmonic(Object o) -> Harmonic"""
582  return _IMP_core._object_cast_to_Harmonic(o)
583 
584 _object_types.append("HarmonicWell")
585 
586 
587 def _object_cast_to_HarmonicWell(o):
588  r"""_object_cast_to_HarmonicWell(Object o) -> HarmonicWell"""
589  return _IMP_core._object_cast_to_HarmonicWell(o)
590 
591 _object_types.append("HarmonicLowerBound")
592 
593 
594 def _object_cast_to_HarmonicLowerBound(o):
595  r"""_object_cast_to_HarmonicLowerBound(Object o) -> HarmonicLowerBound"""
596  return _IMP_core._object_cast_to_HarmonicLowerBound(o)
597 
598 _object_types.append("HarmonicUpperBound")
599 
600 
601 def _object_cast_to_HarmonicUpperBound(o):
602  r"""_object_cast_to_HarmonicUpperBound(Object o) -> HarmonicUpperBound"""
603  return _IMP_core._object_cast_to_HarmonicUpperBound(o)
604 
605 _object_types.append("HarmonicSphereDistancePairScore")
606 
607 
608 def _object_cast_to_HarmonicSphereDistancePairScore(o):
609  r"""_object_cast_to_HarmonicSphereDistancePairScore(Object o) -> HarmonicSphereDistancePairScore"""
610  return _IMP_core._object_cast_to_HarmonicSphereDistancePairScore(o)
611 
612 _object_types.append("HarmonicUpperBoundSphereDistancePairScore")
613 
614 
615 def _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o):
616  r"""_object_cast_to_HarmonicUpperBoundSphereDistancePairScore(Object o) -> HarmonicUpperBoundSphereDistancePairScore"""
617  return _IMP_core._object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
618 
619 _object_types.append("HarmonicUpperBoundSphereDiameterPairScore")
620 
621 
622 def _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o):
623  r"""_object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(Object o) -> HarmonicUpperBoundSphereDiameterPairScore"""
624  return _IMP_core._object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
625 
626 _object_types.append("HarmonicSurfaceDistancePairScore")
627 
628 
629 def _object_cast_to_HarmonicSurfaceDistancePairScore(o):
630  r"""_object_cast_to_HarmonicSurfaceDistancePairScore(Object o) -> HarmonicSurfaceDistancePairScore"""
631  return _IMP_core._object_cast_to_HarmonicSurfaceDistancePairScore(o)
632 
633 _object_types.append("HarmonicSurfaceHeightPairScore")
634 
635 
636 def _object_cast_to_HarmonicSurfaceHeightPairScore(o):
637  r"""_object_cast_to_HarmonicSurfaceHeightPairScore(Object o) -> HarmonicSurfaceHeightPairScore"""
638  return _IMP_core._object_cast_to_HarmonicSurfaceHeightPairScore(o)
639 
640 _object_types.append("HarmonicSurfaceDepthPairScore")
641 
642 
643 def _object_cast_to_HarmonicSurfaceDepthPairScore(o):
644  r"""_object_cast_to_HarmonicSurfaceDepthPairScore(Object o) -> HarmonicSurfaceDepthPairScore"""
645  return _IMP_core._object_cast_to_HarmonicSurfaceDepthPairScore(o)
646 
647 _object_types.append("WeightedSum")
648 
649 
650 def _object_cast_to_WeightedSum(o):
651  r"""_object_cast_to_WeightedSum(Object o) -> WeightedSum"""
652  return _IMP_core._object_cast_to_WeightedSum(o)
653 
654 _object_types.append("WeightedSumOfExponential")
655 
656 
657 def _object_cast_to_WeightedSumOfExponential(o):
658  r"""_object_cast_to_WeightedSumOfExponential(Object o) -> WeightedSumOfExponential"""
659  return _IMP_core._object_cast_to_WeightedSumOfExponential(o)
660 
661 _object_types.append("KClosePairsPairScore")
662 
663 
664 def _object_cast_to_KClosePairsPairScore(o):
665  r"""_object_cast_to_KClosePairsPairScore(Object o) -> KClosePairsPairScore"""
666  return _IMP_core._object_cast_to_KClosePairsPairScore(o)
667 
668 _object_types.append("LeavesRefiner")
669 
670 
671 def _object_cast_to_LeavesRefiner(o):
672  r"""_object_cast_to_LeavesRefiner(Object o) -> LeavesRefiner"""
673  return _IMP_core._object_cast_to_LeavesRefiner(o)
674 
675 _object_types.append("Linear")
676 
677 
678 def _object_cast_to_Linear(o):
679  r"""_object_cast_to_Linear(Object o) -> Linear"""
680  return _IMP_core._object_cast_to_Linear(o)
681 
682 _object_types.append("LogNormalMover")
683 
684 
685 def _object_cast_to_LogNormalMover(o):
686  r"""_object_cast_to_LogNormalMover(Object o) -> LogNormalMover"""
687  return _IMP_core._object_cast_to_LogNormalMover(o)
688 
689 _object_types.append("MCCGSampler")
690 
691 
692 def _object_cast_to_MCCGSampler(o):
693  r"""_object_cast_to_MCCGSampler(Object o) -> MCCGSampler"""
694  return _IMP_core._object_cast_to_MCCGSampler(o)
695 
696 _object_types.append("MonteCarlo")
697 
698 
699 def _object_cast_to_MonteCarlo(o):
700  r"""_object_cast_to_MonteCarlo(Object o) -> MonteCarlo"""
701  return _IMP_core._object_cast_to_MonteCarlo(o)
702 
703 _object_types.append("MonteCarloWithLocalOptimization")
704 
705 
706 def _object_cast_to_MonteCarloWithLocalOptimization(o):
707  r"""_object_cast_to_MonteCarloWithLocalOptimization(Object o) -> MonteCarloWithLocalOptimization"""
708  return _IMP_core._object_cast_to_MonteCarloWithLocalOptimization(o)
709 
710 _object_types.append("MonteCarloWithBasinHopping")
711 
712 
713 def _object_cast_to_MonteCarloWithBasinHopping(o):
714  r"""_object_cast_to_MonteCarloWithBasinHopping(Object o) -> MonteCarloWithBasinHopping"""
715  return _IMP_core._object_cast_to_MonteCarloWithBasinHopping(o)
716 
717 _object_types.append("MSConnectivityRestraint")
718 
719 
720 def _object_cast_to_MSConnectivityRestraint(o):
721  r"""_object_cast_to_MSConnectivityRestraint(Object o) -> MSConnectivityRestraint"""
722  return _IMP_core._object_cast_to_MSConnectivityRestraint(o)
723 
724 _object_types.append("NeighborsTable")
725 
726 
727 def _object_cast_to_NeighborsTable(o):
728  r"""_object_cast_to_NeighborsTable(Object o) -> NeighborsTable"""
729  return _IMP_core._object_cast_to_NeighborsTable(o)
730 
731 _object_types.append("NormalMover")
732 
733 
734 def _object_cast_to_NormalMover(o):
735  r"""_object_cast_to_NormalMover(Object o) -> NormalMover"""
736  return _IMP_core._object_cast_to_NormalMover(o)
737 
738 _object_types.append("NormalizedSphereDistancePairScore")
739 
740 
741 def _object_cast_to_NormalizedSphereDistancePairScore(o):
742  r"""_object_cast_to_NormalizedSphereDistancePairScore(Object o) -> NormalizedSphereDistancePairScore"""
743  return _IMP_core._object_cast_to_NormalizedSphereDistancePairScore(o)
744 
745 _object_types.append("OpenCubicSpline")
746 
747 
748 def _object_cast_to_OpenCubicSpline(o):
749  r"""_object_cast_to_OpenCubicSpline(Object o) -> OpenCubicSpline"""
750  return _IMP_core._object_cast_to_OpenCubicSpline(o)
751 
752 _object_types.append("PairConstraint")
753 
754 
755 def _object_cast_to_PairConstraint(o):
756  r"""_object_cast_to_PairConstraint(Object o) -> PairConstraint"""
757  return _IMP_core._object_cast_to_PairConstraint(o)
758 
759 _object_types.append("PairRestraint")
760 
761 
762 def _object_cast_to_PairRestraint(o):
763  r"""_object_cast_to_PairRestraint(Object o) -> PairRestraint"""
764  return _IMP_core._object_cast_to_PairRestraint(o)
765 
766 _object_types.append("QuadConstraint")
767 
768 
769 def _object_cast_to_QuadConstraint(o):
770  r"""_object_cast_to_QuadConstraint(Object o) -> QuadConstraint"""
771  return _IMP_core._object_cast_to_QuadConstraint(o)
772 
773 _object_types.append("QuadRestraint")
774 
775 
776 def _object_cast_to_QuadRestraint(o):
777  r"""_object_cast_to_QuadRestraint(Object o) -> QuadRestraint"""
778  return _IMP_core._object_cast_to_QuadRestraint(o)
779 
780 _object_types.append("QuadraticClosePairsFinder")
781 
782 
783 def _object_cast_to_QuadraticClosePairsFinder(o):
784  r"""_object_cast_to_QuadraticClosePairsFinder(Object o) -> QuadraticClosePairsFinder"""
785  return _IMP_core._object_cast_to_QuadraticClosePairsFinder(o)
786 
787 _object_types.append("RefinedPairsPairScore")
788 
789 
790 def _object_cast_to_RefinedPairsPairScore(o):
791  r"""_object_cast_to_RefinedPairsPairScore(Object o) -> RefinedPairsPairScore"""
792  return _IMP_core._object_cast_to_RefinedPairsPairScore(o)
793 
794 _object_types.append("RestraintsScoringFunction")
795 
796 
797 def _object_cast_to_RestraintsScoringFunction(o):
798  r"""_object_cast_to_RestraintsScoringFunction(Object o) -> RestraintsScoringFunction"""
799  return _IMP_core._object_cast_to_RestraintsScoringFunction(o)
800 
801 _object_types.append("RigidBodyDistancePairScore")
802 
803 
804 def _object_cast_to_RigidBodyDistancePairScore(o):
805  r"""_object_cast_to_RigidBodyDistancePairScore(Object o) -> RigidBodyDistancePairScore"""
806  return _IMP_core._object_cast_to_RigidBodyDistancePairScore(o)
807 
808 _object_types.append("RigidBodyAnglePairScore")
809 
810 
811 def _object_cast_to_RigidBodyAnglePairScore(o):
812  r"""_object_cast_to_RigidBodyAnglePairScore(Object o) -> RigidBodyAnglePairScore"""
813  return _IMP_core._object_cast_to_RigidBodyAnglePairScore(o)
814 
815 _object_types.append("RigidBodyMover")
816 
817 
818 def _object_cast_to_RigidBodyMover(o):
819  r"""_object_cast_to_RigidBodyMover(Object o) -> RigidBodyMover"""
820  return _IMP_core._object_cast_to_RigidBodyMover(o)
821 
822 _object_types.append("RigidBodyTunneler")
823 
824 
825 def _object_cast_to_RigidBodyTunneler(o):
826  r"""_object_cast_to_RigidBodyTunneler(Object o) -> RigidBodyTunneler"""
827  return _IMP_core._object_cast_to_RigidBodyTunneler(o)
828 
829 _object_types.append("RigidBodyUmbrella")
830 
831 
832 def _object_cast_to_RigidBodyUmbrella(o):
833  r"""_object_cast_to_RigidBodyUmbrella(Object o) -> RigidBodyUmbrella"""
834  return _IMP_core._object_cast_to_RigidBodyUmbrella(o)
835 
836 _object_types.append("_UpdateRigidBodyMembers")
837 
838 
839 def _object_cast_to__UpdateRigidBodyMembers(o):
840  r"""_object_cast_to__UpdateRigidBodyMembers(Object o) -> _UpdateRigidBodyMembers"""
841  return _IMP_core._object_cast_to__UpdateRigidBodyMembers(o)
842 
843 _object_types.append("_AccumulateRigidBodyDerivatives")
844 
845 
846 def _object_cast_to__AccumulateRigidBodyDerivatives(o):
847  r"""_object_cast_to__AccumulateRigidBodyDerivatives(Object o) -> _AccumulateRigidBodyDerivatives"""
848  return _IMP_core._object_cast_to__AccumulateRigidBodyDerivatives(o)
849 
850 _object_types.append("_RigidBodyNormalizeConstraint")
851 
852 
853 def _object_cast_to__RigidBodyNormalizeConstraint(o):
854  r"""_object_cast_to__RigidBodyNormalizeConstraint(Object o) -> _RigidBodyNormalizeConstraint"""
855  return _IMP_core._object_cast_to__RigidBodyNormalizeConstraint(o)
856 
857 _object_types.append("_NormalizeRotation")
858 
859 
860 def _object_cast_to__NormalizeRotation(o):
861  r"""_object_cast_to__NormalizeRotation(Object o) -> _NormalizeRotation"""
862  return _IMP_core._object_cast_to__NormalizeRotation(o)
863 
864 _object_types.append("_RigidBodyPositionConstraint")
865 
866 
867 def _object_cast_to__RigidBodyPositionConstraint(o):
868  r"""_object_cast_to__RigidBodyPositionConstraint(Object o) -> _RigidBodyPositionConstraint"""
869  return _IMP_core._object_cast_to__RigidBodyPositionConstraint(o)
870 
871 _object_types.append("RigidClosePairsFinder")
872 
873 
874 def _object_cast_to_RigidClosePairsFinder(o):
875  r"""_object_cast_to_RigidClosePairsFinder(Object o) -> RigidClosePairsFinder"""
876  return _IMP_core._object_cast_to_RigidClosePairsFinder(o)
877 
878 _object_types.append("RigidMembersRefiner")
879 
880 
881 def _object_cast_to_RigidMembersRefiner(o):
882  r"""_object_cast_to_RigidMembersRefiner(Object o) -> RigidMembersRefiner"""
883  return _IMP_core._object_cast_to_RigidMembersRefiner(o)
884 
885 _object_types.append("SingletonConstraint")
886 
887 
888 def _object_cast_to_SingletonConstraint(o):
889  r"""_object_cast_to_SingletonConstraint(Object o) -> SingletonConstraint"""
890  return _IMP_core._object_cast_to_SingletonConstraint(o)
891 
892 _object_types.append("SingletonRestraint")
893 
894 
895 def _object_cast_to_SingletonRestraint(o):
896  r"""_object_cast_to_SingletonRestraint(Object o) -> SingletonRestraint"""
897  return _IMP_core._object_cast_to_SingletonRestraint(o)
898 
899 _object_types.append("SoftSpherePairScore")
900 
901 
902 def _object_cast_to_SoftSpherePairScore(o):
903  r"""_object_cast_to_SoftSpherePairScore(Object o) -> SoftSpherePairScore"""
904  return _IMP_core._object_cast_to_SoftSpherePairScore(o)
905 
906 _object_types.append("_SphereDistancePairScore")
907 
908 
909 def _object_cast_to__SphereDistancePairScore(o):
910  r"""_object_cast_to__SphereDistancePairScore(Object o) -> _SphereDistancePairScore"""
911  return _IMP_core._object_cast_to__SphereDistancePairScore(o)
912 
913 _object_types.append("SphereDistanceToSingletonScore")
914 
915 
916 def _object_cast_to_SphereDistanceToSingletonScore(o):
917  r"""_object_cast_to_SphereDistanceToSingletonScore(Object o) -> SphereDistanceToSingletonScore"""
918  return _IMP_core._object_cast_to_SphereDistanceToSingletonScore(o)
919 
920 _object_types.append("SoftSubSurfacePairScore")
921 
922 
923 def _object_cast_to_SoftSubSurfacePairScore(o):
924  r"""_object_cast_to_SoftSubSurfacePairScore(Object o) -> SoftSubSurfacePairScore"""
925  return _IMP_core._object_cast_to_SoftSubSurfacePairScore(o)
926 
927 _object_types.append("SoftSuperSurfacePairScore")
928 
929 
930 def _object_cast_to_SoftSuperSurfacePairScore(o):
931  r"""_object_cast_to_SoftSuperSurfacePairScore(Object o) -> SoftSuperSurfacePairScore"""
932  return _IMP_core._object_cast_to_SoftSuperSurfacePairScore(o)
933 
934 _object_types.append("SurfaceDistancePairScore")
935 
936 
937 def _object_cast_to_SurfaceDistancePairScore(o):
938  r"""_object_cast_to_SurfaceDistancePairScore(Object o) -> SurfaceDistancePairScore"""
939  return _IMP_core._object_cast_to_SurfaceDistancePairScore(o)
940 
941 _object_types.append("SurfaceHeightPairScore")
942 
943 
944 def _object_cast_to_SurfaceHeightPairScore(o):
945  r"""_object_cast_to_SurfaceHeightPairScore(Object o) -> SurfaceHeightPairScore"""
946  return _IMP_core._object_cast_to_SurfaceHeightPairScore(o)
947 
948 _object_types.append("SurfaceDepthPairScore")
949 
950 
951 def _object_cast_to_SurfaceDepthPairScore(o):
952  r"""_object_cast_to_SurfaceDepthPairScore(Object o) -> SurfaceDepthPairScore"""
953  return _IMP_core._object_cast_to_SurfaceDepthPairScore(o)
954 
955 _object_types.append("SurfaceTetheredChain")
956 
957 
958 def _object_cast_to_SurfaceTetheredChain(o):
959  r"""_object_cast_to_SurfaceTetheredChain(Object o) -> SurfaceTetheredChain"""
960  return _IMP_core._object_cast_to_SurfaceTetheredChain(o)
961 
962 _object_types.append("SurfaceSymmetryConstraint")
963 
964 
965 def _object_cast_to_SurfaceSymmetryConstraint(o):
966  r"""_object_cast_to_SurfaceSymmetryConstraint(Object o) -> SurfaceSymmetryConstraint"""
967  return _IMP_core._object_cast_to_SurfaceSymmetryConstraint(o)
968 
969 _object_types.append("SteepestDescent")
970 
971 
972 def _object_cast_to_SteepestDescent(o):
973  r"""_object_cast_to_SteepestDescent(Object o) -> SteepestDescent"""
974  return _IMP_core._object_cast_to_SteepestDescent(o)
975 
976 _object_types.append("TableRefiner")
977 
978 
979 def _object_cast_to_TableRefiner(o):
980  r"""_object_cast_to_TableRefiner(Object o) -> TableRefiner"""
981  return _IMP_core._object_cast_to_TableRefiner(o)
982 
983 _object_types.append("Transform")
984 
985 
986 def _object_cast_to_Transform(o):
987  r"""_object_cast_to_Transform(Object o) -> Transform"""
988  return _IMP_core._object_cast_to_Transform(o)
989 
990 _object_types.append("TransformationAndReflectionSymmetry")
991 
992 
993 def _object_cast_to_TransformationAndReflectionSymmetry(o):
994  r"""_object_cast_to_TransformationAndReflectionSymmetry(Object o) -> TransformationAndReflectionSymmetry"""
995  return _IMP_core._object_cast_to_TransformationAndReflectionSymmetry(o)
996 
997 _object_types.append("TransformationSymmetry")
998 
999 
1000 def _object_cast_to_TransformationSymmetry(o):
1001  r"""_object_cast_to_TransformationSymmetry(Object o) -> TransformationSymmetry"""
1002  return _IMP_core._object_cast_to_TransformationSymmetry(o)
1003 
1004 _object_types.append("TransformationSymmetryMover")
1005 
1006 
1007 def _object_cast_to_TransformationSymmetryMover(o):
1008  r"""_object_cast_to_TransformationSymmetryMover(Object o) -> TransformationSymmetryMover"""
1009  return _IMP_core._object_cast_to_TransformationSymmetryMover(o)
1010 
1011 _object_types.append("TransformedDistancePairScore")
1012 
1013 
1014 def _object_cast_to_TransformedDistancePairScore(o):
1015  r"""_object_cast_to_TransformedDistancePairScore(Object o) -> TransformedDistancePairScore"""
1016  return _IMP_core._object_cast_to_TransformedDistancePairScore(o)
1017 
1018 _object_types.append("TripletConstraint")
1019 
1020 
1021 def _object_cast_to_TripletConstraint(o):
1022  r"""_object_cast_to_TripletConstraint(Object o) -> TripletConstraint"""
1023  return _IMP_core._object_cast_to_TripletConstraint(o)
1024 
1025 _object_types.append("TripletRestraint")
1026 
1027 
1028 def _object_cast_to_TripletRestraint(o):
1029  r"""_object_cast_to_TripletRestraint(Object o) -> TripletRestraint"""
1030  return _IMP_core._object_cast_to_TripletRestraint(o)
1031 
1032 _object_types.append("TypedPairScore")
1033 
1034 
1035 def _object_cast_to_TypedPairScore(o):
1036  r"""_object_cast_to_TypedPairScore(Object o) -> TypedPairScore"""
1037  return _IMP_core._object_cast_to_TypedPairScore(o)
1038 
1039 _object_types.append("VolumeRestraint")
1040 
1041 
1042 def _object_cast_to_VolumeRestraint(o):
1043  r"""_object_cast_to_VolumeRestraint(Object o) -> VolumeRestraint"""
1044  return _IMP_core._object_cast_to_VolumeRestraint(o)
1045 
1046 _object_types.append("WeightedSphereDistancePairScore")
1047 
1048 
1049 def _object_cast_to_WeightedSphereDistancePairScore(o):
1050  r"""_object_cast_to_WeightedSphereDistancePairScore(Object o) -> WeightedSphereDistancePairScore"""
1051  return _IMP_core._object_cast_to_WeightedSphereDistancePairScore(o)
1052 
1053 _object_types.append("MoveStatisticsScoreState")
1054 
1055 
1056 def _object_cast_to_MoveStatisticsScoreState(o):
1057  r"""_object_cast_to_MoveStatisticsScoreState(Object o) -> MoveStatisticsScoreState"""
1058  return _IMP_core._object_cast_to_MoveStatisticsScoreState(o)
1059 
1060 _object_types.append("MinimumRestraint")
1061 
1062 
1063 def _object_cast_to_MinimumRestraint(o):
1064  r"""_object_cast_to_MinimumRestraint(Object o) -> MinimumRestraint"""
1065  return _IMP_core._object_cast_to_MinimumRestraint(o)
1066 
1067 _object_types.append("WriteRestraintScoresOptimizerState")
1068 
1069 
1070 def _object_cast_to_WriteRestraintScoresOptimizerState(o):
1071  r"""_object_cast_to_WriteRestraintScoresOptimizerState(Object o) -> WriteRestraintScoresOptimizerState"""
1072  return _IMP_core._object_cast_to_WriteRestraintScoresOptimizerState(o)
1073 
1074 _object_types.append("LateralSurfaceConstraint")
1075 
1076 
1077 def _object_cast_to_LateralSurfaceConstraint(o):
1078  r"""_object_cast_to_LateralSurfaceConstraint(Object o) -> LateralSurfaceConstraint"""
1079  return _IMP_core._object_cast_to_LateralSurfaceConstraint(o)
1080 
1081 _object_types.append("ConstantSingletonPredicate")
1082 
1083 
1084 def _object_cast_to_ConstantSingletonPredicate(o):
1085  r"""_object_cast_to_ConstantSingletonPredicate(Object o) -> ConstantSingletonPredicate"""
1086  return _IMP_core._object_cast_to_ConstantSingletonPredicate(o)
1087 
1088 _object_types.append("ConstantPairPredicate")
1089 
1090 
1091 def _object_cast_to_ConstantPairPredicate(o):
1092  r"""_object_cast_to_ConstantPairPredicate(Object o) -> ConstantPairPredicate"""
1093  return _IMP_core._object_cast_to_ConstantPairPredicate(o)
1094 
1095 _object_types.append("ConstantTripletPredicate")
1096 
1097 
1098 def _object_cast_to_ConstantTripletPredicate(o):
1099  r"""_object_cast_to_ConstantTripletPredicate(Object o) -> ConstantTripletPredicate"""
1100  return _IMP_core._object_cast_to_ConstantTripletPredicate(o)
1101 
1102 _object_types.append("ConstantQuadPredicate")
1103 
1104 
1105 def _object_cast_to_ConstantQuadPredicate(o):
1106  r"""_object_cast_to_ConstantQuadPredicate(Object o) -> ConstantQuadPredicate"""
1107  return _IMP_core._object_cast_to_ConstantQuadPredicate(o)
1108 
1109 _object_types.append("CoinFlipSingletonPredicate")
1110 
1111 
1112 def _object_cast_to_CoinFlipSingletonPredicate(o):
1113  r"""_object_cast_to_CoinFlipSingletonPredicate(Object o) -> CoinFlipSingletonPredicate"""
1114  return _IMP_core._object_cast_to_CoinFlipSingletonPredicate(o)
1115 
1116 _object_types.append("CoinFlipPairPredicate")
1117 
1118 
1119 def _object_cast_to_CoinFlipPairPredicate(o):
1120  r"""_object_cast_to_CoinFlipPairPredicate(Object o) -> CoinFlipPairPredicate"""
1121  return _IMP_core._object_cast_to_CoinFlipPairPredicate(o)
1122 
1123 _object_types.append("CoinFlipTripletPredicate")
1124 
1125 
1126 def _object_cast_to_CoinFlipTripletPredicate(o):
1127  r"""_object_cast_to_CoinFlipTripletPredicate(Object o) -> CoinFlipTripletPredicate"""
1128  return _IMP_core._object_cast_to_CoinFlipTripletPredicate(o)
1129 
1130 _object_types.append("CoinFlipQuadPredicate")
1131 
1132 
1133 def _object_cast_to_CoinFlipQuadPredicate(o):
1134  r"""_object_cast_to_CoinFlipQuadPredicate(Object o) -> CoinFlipQuadPredicate"""
1135  return _IMP_core._object_cast_to_CoinFlipQuadPredicate(o)
1136 
1137 _object_types.append("UnorderedTypeSingletonPredicate")
1138 
1139 
1140 def _object_cast_to_UnorderedTypeSingletonPredicate(o):
1141  r"""_object_cast_to_UnorderedTypeSingletonPredicate(Object o) -> UnorderedTypeSingletonPredicate"""
1142  return _IMP_core._object_cast_to_UnorderedTypeSingletonPredicate(o)
1143 
1144 _object_types.append("UnorderedTypePairPredicate")
1145 
1146 
1147 def _object_cast_to_UnorderedTypePairPredicate(o):
1148  r"""_object_cast_to_UnorderedTypePairPredicate(Object o) -> UnorderedTypePairPredicate"""
1149  return _IMP_core._object_cast_to_UnorderedTypePairPredicate(o)
1150 
1151 _object_types.append("UnorderedTypeTripletPredicate")
1152 
1153 
1154 def _object_cast_to_UnorderedTypeTripletPredicate(o):
1155  r"""_object_cast_to_UnorderedTypeTripletPredicate(Object o) -> UnorderedTypeTripletPredicate"""
1156  return _IMP_core._object_cast_to_UnorderedTypeTripletPredicate(o)
1157 
1158 _object_types.append("UnorderedTypeQuadPredicate")
1159 
1160 
1161 def _object_cast_to_UnorderedTypeQuadPredicate(o):
1162  r"""_object_cast_to_UnorderedTypeQuadPredicate(Object o) -> UnorderedTypeQuadPredicate"""
1163  return _IMP_core._object_cast_to_UnorderedTypeQuadPredicate(o)
1164 
1165 _object_types.append("OrderedTypeSingletonPredicate")
1166 
1167 
1168 def _object_cast_to_OrderedTypeSingletonPredicate(o):
1169  r"""_object_cast_to_OrderedTypeSingletonPredicate(Object o) -> OrderedTypeSingletonPredicate"""
1170  return _IMP_core._object_cast_to_OrderedTypeSingletonPredicate(o)
1171 
1172 _object_types.append("OrderedTypePairPredicate")
1173 
1174 
1175 def _object_cast_to_OrderedTypePairPredicate(o):
1176  r"""_object_cast_to_OrderedTypePairPredicate(Object o) -> OrderedTypePairPredicate"""
1177  return _IMP_core._object_cast_to_OrderedTypePairPredicate(o)
1178 
1179 _object_types.append("OrderedTypeTripletPredicate")
1180 
1181 
1182 def _object_cast_to_OrderedTypeTripletPredicate(o):
1183  r"""_object_cast_to_OrderedTypeTripletPredicate(Object o) -> OrderedTypeTripletPredicate"""
1184  return _IMP_core._object_cast_to_OrderedTypeTripletPredicate(o)
1185 
1186 _object_types.append("OrderedTypeQuadPredicate")
1187 
1188 
1189 def _object_cast_to_OrderedTypeQuadPredicate(o):
1190  r"""_object_cast_to_OrderedTypeQuadPredicate(Object o) -> OrderedTypeQuadPredicate"""
1191  return _IMP_core._object_cast_to_OrderedTypeQuadPredicate(o)
1192 
1193 _object_types.append("AllSameSingletonPredicate")
1194 
1195 
1196 def _object_cast_to_AllSameSingletonPredicate(o):
1197  r"""_object_cast_to_AllSameSingletonPredicate(Object o) -> AllSameSingletonPredicate"""
1198  return _IMP_core._object_cast_to_AllSameSingletonPredicate(o)
1199 
1200 _object_types.append("AllSamePairPredicate")
1201 
1202 
1203 def _object_cast_to_AllSamePairPredicate(o):
1204  r"""_object_cast_to_AllSamePairPredicate(Object o) -> AllSamePairPredicate"""
1205  return _IMP_core._object_cast_to_AllSamePairPredicate(o)
1206 
1207 _object_types.append("AllSameTripletPredicate")
1208 
1209 
1210 def _object_cast_to_AllSameTripletPredicate(o):
1211  r"""_object_cast_to_AllSameTripletPredicate(Object o) -> AllSameTripletPredicate"""
1212  return _IMP_core._object_cast_to_AllSameTripletPredicate(o)
1213 
1214 _object_types.append("AllSameQuadPredicate")
1215 
1216 
1217 def _object_cast_to_AllSameQuadPredicate(o):
1218  r"""_object_cast_to_AllSameQuadPredicate(Object o) -> AllSameQuadPredicate"""
1219  return _IMP_core._object_cast_to_AllSameQuadPredicate(o)
1220 
1221 def XYZs(l=[]):
1222  return [XYZ(x) for x in l]
1223 _plural_types.append("XYZs")
1224 
1225 
1226 _value_types.append("XYZ")
1227 
1228 
1229 def XYZRs(l=[]):
1230  return [XYZR(x) for x in l]
1231 _plural_types.append("XYZRs")
1232 
1233 
1234 _value_types.append("XYZR")
1235 
1236 
1237 def RigidBodies(l=[]):
1238  return [RigidBody(x) for x in l]
1239 _plural_types.append("RigidBodies")
1240 
1241 
1242 _value_types.append("RigidBody")
1243 
1244 
1245 def RigidBodyMembers(l=[]):
1246  return [RigidBodyMember(x) for x in l]
1247 _plural_types.append("RigidBodyMembers")
1248 
1249 
1250 _value_types.append("RigidBodyMember")
1251 
1252 
1253 def RigidMembers(l=[]):
1254  return [RigidMember(x) for x in l]
1255 _plural_types.append("RigidMembers")
1256 
1257 
1258 _value_types.append("RigidMember")
1259 
1260 
1261 def NonRigidMembers(l=[]):
1262  return [NonRigidMember(x) for x in l]
1263 _plural_types.append("NonRigidMembers")
1264 
1265 
1266 _value_types.append("NonRigidMember")
1267 
1268 
1269 def Centroids(l=[]):
1270  return [Centroid(x) for x in l]
1271 _plural_types.append("Centroids")
1272 
1273 
1274 _value_types.append("Centroid")
1275 
1276 
1277 def Covers(l=[]):
1278  return [Cover(x) for x in l]
1279 _plural_types.append("Covers")
1280 
1281 
1282 _value_types.append("Cover")
1283 
1284 
1285 def References(l=[]):
1286  return [Reference(x) for x in l]
1287 _plural_types.append("References")
1288 
1289 
1290 _value_types.append("Reference")
1291 
1292 
1293 ParticleTypes=list
1294 _plural_types.append("ParticleTypes")
1295 _value_types.append("ParticleType")
1296 
1297 
1298 def Typeds(l=[]):
1299  return [Typed(x) for x in l]
1300 _plural_types.append("Typeds")
1301 
1302 
1303 _value_types.append("Typed")
1304 
1305 
1306 def GenericHierarchies(l=[]):
1307  return [Hierarchy(x) for x in l]
1308 _plural_types.append("GenericHierarchies")
1309 
1310 
1311 _value_types.append("Hierarchy")
1312 
1313 
1314 def Gaussians(l=[]):
1315  return [Gaussian(x) for x in l]
1316 _plural_types.append("Gaussians")
1317 
1318 
1319 _value_types.append("Gaussian")
1320 
1321 
1322 def Directions(l=[]):
1323  return [Direction(x) for x in l]
1324 _plural_types.append("Directions")
1325 
1326 
1327 _value_types.append("Direction")
1328 
1329 
1330 def DirectionAngles(l=[]):
1331  return [DirectionAngle(x) for x in l]
1332 _plural_types.append("DirectionAngles")
1333 
1334 
1335 _value_types.append("DirectionAngle")
1336 
1337 
1338 def Surfaces(l=[]):
1339  return [Surface(x) for x in l]
1340 _plural_types.append("Surfaces")
1341 
1342 
1343 _value_types.append("Surface")
1344 
1345 
1346 def Provenances(l=[]):
1347  return [Provenance(x) for x in l]
1348 _plural_types.append("Provenances")
1349 
1350 
1351 _value_types.append("Provenance")
1352 
1353 
1354 def StructureProvenances(l=[]):
1355  return [StructureProvenance(x) for x in l]
1356 _plural_types.append("StructureProvenances")
1357 
1358 
1359 _value_types.append("StructureProvenance")
1360 
1361 
1362 def SampleProvenances(l=[]):
1363  return [SampleProvenance(x) for x in l]
1364 _plural_types.append("SampleProvenances")
1365 
1366 
1367 _value_types.append("SampleProvenance")
1368 
1369 
1370 def ClusterProvenances(l=[]):
1371  return [ClusterProvenance(x) for x in l]
1372 _plural_types.append("ClusterProvenances")
1373 
1374 
1375 _value_types.append("ClusterProvenance")
1376 
1377 
1378 def CombineProvenances(l=[]):
1379  return [CombineProvenance(x) for x in l]
1380 _plural_types.append("CombineProvenances")
1381 
1382 
1383 _value_types.append("CombineProvenance")
1384 
1385 
1386 def FilterProvenances(l=[]):
1387  return [FilterProvenance(x) for x in l]
1388 _plural_types.append("FilterProvenances")
1389 
1390 
1391 _value_types.append("FilterProvenance")
1392 
1393 
1394 def ScriptProvenances(l=[]):
1395  return [ScriptProvenance(x) for x in l]
1396 _plural_types.append("ScriptProvenances")
1397 
1398 
1399 _value_types.append("ScriptProvenance")
1400 
1401 
1402 def SoftwareProvenances(l=[]):
1403  return [SoftwareProvenance(x) for x in l]
1404 _plural_types.append("SoftwareProvenances")
1405 
1406 
1407 _value_types.append("SoftwareProvenance")
1408 
1409 
1410 def Provenanceds(l=[]):
1411  return [Provenanced(x) for x in l]
1412 _plural_types.append("Provenanceds")
1413 
1414 
1415 _value_types.append("Provenanced")
1416 
1417 
1418 HierarchyCounters=list
1419 _plural_types.append("HierarchyCounters")
1420 _value_types.append("HierarchyCounter")
1421 
1422 
1423 HierarchyTraitsList=list
1424 _plural_types.append("HierarchyTraitsList")
1425 _value_types.append("HierarchyTraits")
1426 
1427 
1428 _object_types.append("TruncatedHarmonicBound")
1429 
1430 
1431 def _object_cast_to_TruncatedHarmonicBound(o):
1432  r"""_object_cast_to_TruncatedHarmonicBound(Object o) -> TruncatedHarmonicBound"""
1433  return _IMP_core._object_cast_to_TruncatedHarmonicBound(o)
1434 
1435 _object_types.append("TruncatedHarmonicLowerBound")
1436 
1437 
1438 def _object_cast_to_TruncatedHarmonicLowerBound(o):
1439  r"""_object_cast_to_TruncatedHarmonicLowerBound(Object o) -> TruncatedHarmonicLowerBound"""
1440  return _IMP_core._object_cast_to_TruncatedHarmonicLowerBound(o)
1441 
1442 _object_types.append("TruncatedHarmonicUpperBound")
1443 
1444 
1445 def _object_cast_to_TruncatedHarmonicUpperBound(o):
1446  r"""_object_cast_to_TruncatedHarmonicUpperBound(Object o) -> TruncatedHarmonicUpperBound"""
1447  return _IMP_core._object_cast_to_TruncatedHarmonicUpperBound(o)
1448 
1449 _object_types.append("HarmonicDistancePairScore")
1450 
1451 
1452 def _object_cast_to_HarmonicDistancePairScore(o):
1453  r"""_object_cast_to_HarmonicDistancePairScore(Object o) -> HarmonicDistancePairScore"""
1454  return _IMP_core._object_cast_to_HarmonicDistancePairScore(o)
1455 
1456 _object_types.append("DistancePairScore")
1457 
1458 
1459 def _object_cast_to_DistancePairScore(o):
1460  r"""_object_cast_to_DistancePairScore(Object o) -> DistancePairScore"""
1461  return _IMP_core._object_cast_to_DistancePairScore(o)
1462 
1463 _object_types.append("XYZRGeometry")
1464 
1465 
1466 def _object_cast_to_XYZRGeometry(o):
1467  r"""_object_cast_to_XYZRGeometry(Object o) -> XYZRGeometry"""
1468  return _IMP_core._object_cast_to_XYZRGeometry(o)
1469 
1470 _object_types.append("XYZRsGeometry")
1471 
1472 
1473 def _object_cast_to_XYZRsGeometry(o):
1474  r"""_object_cast_to_XYZRsGeometry(Object o) -> XYZRsGeometry"""
1475  return _IMP_core._object_cast_to_XYZRsGeometry(o)
1476 
1477 _object_types.append("XYZDerivativeGeometry")
1478 
1479 
1480 def _object_cast_to_XYZDerivativeGeometry(o):
1481  r"""_object_cast_to_XYZDerivativeGeometry(Object o) -> XYZDerivativeGeometry"""
1482  return _IMP_core._object_cast_to_XYZDerivativeGeometry(o)
1483 
1484 _object_types.append("XYZDerivativesGeometry")
1485 
1486 
1487 def _object_cast_to_XYZDerivativesGeometry(o):
1488  r"""_object_cast_to_XYZDerivativesGeometry(Object o) -> XYZDerivativesGeometry"""
1489  return _IMP_core._object_cast_to_XYZDerivativesGeometry(o)
1490 
1491 _object_types.append("RigidBodyDerivativeGeometry")
1492 
1493 
1494 def _object_cast_to_RigidBodyDerivativeGeometry(o):
1495  r"""_object_cast_to_RigidBodyDerivativeGeometry(Object o) -> RigidBodyDerivativeGeometry"""
1496  return _IMP_core._object_cast_to_RigidBodyDerivativeGeometry(o)
1497 
1498 _object_types.append("RigidBodyDerivativesGeometry")
1499 
1500 
1501 def _object_cast_to_RigidBodyDerivativesGeometry(o):
1502  r"""_object_cast_to_RigidBodyDerivativesGeometry(Object o) -> RigidBodyDerivativesGeometry"""
1503  return _IMP_core._object_cast_to_RigidBodyDerivativesGeometry(o)
1504 
1505 _object_types.append("RigidBodyHierarchyGeometry")
1506 
1507 
1508 def _object_cast_to_RigidBodyHierarchyGeometry(o):
1509  r"""_object_cast_to_RigidBodyHierarchyGeometry(Object o) -> RigidBodyHierarchyGeometry"""
1510  return _IMP_core._object_cast_to_RigidBodyHierarchyGeometry(o)
1511 
1512 _object_types.append("RigidBodyFrameGeometry")
1513 
1514 
1515 def _object_cast_to_RigidBodyFrameGeometry(o):
1516  r"""_object_cast_to_RigidBodyFrameGeometry(Object o) -> RigidBodyFrameGeometry"""
1517  return _IMP_core._object_cast_to_RigidBodyFrameGeometry(o)
1518 
1519 _object_types.append("RigidBodyFramesGeometry")
1520 
1521 
1522 def _object_cast_to_RigidBodyFramesGeometry(o):
1523  r"""_object_cast_to_RigidBodyFramesGeometry(Object o) -> RigidBodyFramesGeometry"""
1524  return _IMP_core._object_cast_to_RigidBodyFramesGeometry(o)
1525 
1526 _object_types.append("RigidBodyTorque")
1527 
1528 
1529 def _object_cast_to_RigidBodyTorque(o):
1530  r"""_object_cast_to_RigidBodyTorque(Object o) -> RigidBodyTorque"""
1531  return _IMP_core._object_cast_to_RigidBodyTorque(o)
1532 
1533 _object_types.append("EdgePairGeometry")
1534 
1535 
1536 def _object_cast_to_EdgePairGeometry(o):
1537  r"""_object_cast_to_EdgePairGeometry(Object o) -> EdgePairGeometry"""
1538  return _IMP_core._object_cast_to_EdgePairGeometry(o)
1539 
1540 _object_types.append("EdgePairsGeometry")
1541 
1542 
1543 def _object_cast_to_EdgePairsGeometry(o):
1544  r"""_object_cast_to_EdgePairsGeometry(Object o) -> EdgePairsGeometry"""
1545  return _IMP_core._object_cast_to_EdgePairsGeometry(o)
1546 
1547 _object_types.append("SurfaceGeometry")
1548 
1549 
1550 def _object_cast_to_SurfaceGeometry(o):
1551  r"""_object_cast_to_SurfaceGeometry(Object o) -> SurfaceGeometry"""
1552  return _IMP_core._object_cast_to_SurfaceGeometry(o)
1553 
1554 _object_types.append("SurfaceGeometryConstraint")
1555 
1556 
1557 def _object_cast_to_SurfaceGeometryConstraint(o):
1558  r"""_object_cast_to_SurfaceGeometryConstraint(Object o) -> SurfaceGeometryConstraint"""
1559  return _IMP_core._object_cast_to_SurfaceGeometryConstraint(o)
1560 
1561 _object_types.append("AttributeSingletonPredicate")
1562 
1563 
1564 def _object_cast_to_AttributeSingletonPredicate(o):
1565  r"""_object_cast_to_AttributeSingletonPredicate(Object o) -> AttributeSingletonPredicate"""
1566  return _IMP_core._object_cast_to_AttributeSingletonPredicate(o)
1567 
1568 _object_types.append("InBoundingBox3DSingletonPredicate")
1569 
1570 
1571 def _object_cast_to_InBoundingBox3DSingletonPredicate(o):
1572  r"""_object_cast_to_InBoundingBox3DSingletonPredicate(Object o) -> InBoundingBox3DSingletonPredicate"""
1573  return _IMP_core._object_cast_to_InBoundingBox3DSingletonPredicate(o)
1574 
1575 _object_types.append("IsCollisionPairPredicate")
1576 
1577 
1578 def _object_cast_to_IsCollisionPairPredicate(o):
1579  r"""_object_cast_to_IsCollisionPairPredicate(Object o) -> IsCollisionPairPredicate"""
1580  return _IMP_core._object_cast_to_IsCollisionPairPredicate(o)
1581 
1582 BinormalTermList=list
1583 _plural_types.append("BinormalTermList")
1584 _value_types.append("BinormalTerm")
1585 
1586 
1587 _object_types.append("MultipleBinormalRestraint")
1588 
1589 
1590 def _object_cast_to_MultipleBinormalRestraint(o):
1591  r"""_object_cast_to_MultipleBinormalRestraint(Object o) -> MultipleBinormalRestraint"""
1592  return _IMP_core._object_cast_to_MultipleBinormalRestraint(o)
1593 class ClosePairsFinder(IMP._ParticleInputs, IMP.Object):
1594  r"""Proxy of C++ IMP::core::ClosePairsFinder class."""
1595 
1596  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1597 
1598  def __init__(self, *args, **kwargs):
1599  raise AttributeError("No constructor defined - class is abstract")
1600  __swig_destroy__ = _IMP_core.delete_ClosePairsFinder
1601 
1602  def get_close_pairs(self, *args):
1603  r"""
1604  get_close_pairs(ClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
1605  get_close_pairs(ClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
1606  get_close_pairs(ClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
1607  get_close_pairs(ClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
1608  """
1609  return _IMP_core.ClosePairsFinder_get_close_pairs(self, *args)
1610 
1611  def set_distance(self, d):
1612  r"""set_distance(ClosePairsFinder self, double d)"""
1613  return _IMP_core.ClosePairsFinder_set_distance(self, d)
1614 
1615  def get_distance(self):
1616  r"""get_distance(ClosePairsFinder self) -> double"""
1617  return _IMP_core.ClosePairsFinder_get_distance(self)
1618  def __get_pair_filters(self): return IMP._list_util.VarList(getdimfunc=self.get_number_of_pair_filters, getfunc=self.get_pair_filter, erasefunc=self.erase_pair_filter, appendfunc=self.add_pair_filter, extendfunc=self.add_pair_filters, clearfunc=self.clear_pair_filters, indexfunc=self._python_index_pair_filter)
1619  def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
1620  def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
1621  pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
1622 
1623  def remove_pair_filter(self, d):
1624  r"""remove_pair_filter(ClosePairsFinder self, PairPredicate d)"""
1625  return _IMP_core.ClosePairsFinder_remove_pair_filter(self, d)
1626 
1627  def _python_index_pair_filter(self, d, start, stop):
1628  r"""_python_index_pair_filter(ClosePairsFinder self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
1629  return _IMP_core.ClosePairsFinder__python_index_pair_filter(self, d, start, stop)
1630 
1631  def remove_pair_filters(self, d):
1632  r"""remove_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & d)"""
1633  return _IMP_core.ClosePairsFinder_remove_pair_filters(self, d)
1634 
1635  def set_pair_filters(self, ps):
1636  r"""set_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & ps)"""
1637  return _IMP_core.ClosePairsFinder_set_pair_filters(self, ps)
1638 
1639  def set_pair_filters_order(self, objs):
1640  r"""set_pair_filters_order(ClosePairsFinder self, IMP::PairPredicates const & objs)"""
1641  return _IMP_core.ClosePairsFinder_set_pair_filters_order(self, objs)
1642 
1643  def add_pair_filter(self, obj):
1644  r"""add_pair_filter(ClosePairsFinder self, PairPredicate obj) -> unsigned int"""
1645  return _IMP_core.ClosePairsFinder_add_pair_filter(self, obj)
1646 
1647  def add_pair_filters(self, objs):
1648  r"""add_pair_filters(ClosePairsFinder self, IMP::PairPredicates const & objs)"""
1649  return _IMP_core.ClosePairsFinder_add_pair_filters(self, objs)
1650 
1651  def clear_pair_filters(self):
1652  r"""clear_pair_filters(ClosePairsFinder self)"""
1653  return _IMP_core.ClosePairsFinder_clear_pair_filters(self)
1654 
1655  def get_number_of_pair_filters(self):
1656  r"""get_number_of_pair_filters(ClosePairsFinder self) -> unsigned int"""
1657  return _IMP_core.ClosePairsFinder_get_number_of_pair_filters(self)
1658 
1659  def get_has_pair_filters(self):
1660  r"""get_has_pair_filters(ClosePairsFinder self) -> bool"""
1661  return _IMP_core.ClosePairsFinder_get_has_pair_filters(self)
1662 
1663  def get_pair_filter(self, i):
1664  r"""get_pair_filter(ClosePairsFinder self, unsigned int i) -> PairPredicate"""
1665  return _IMP_core.ClosePairsFinder_get_pair_filter(self, i)
1666 
1667  def get_pair_filters(self):
1668  r"""get_pair_filters(ClosePairsFinder self) -> IMP::PairPredicates"""
1669  return _IMP_core.ClosePairsFinder_get_pair_filters(self)
1670 
1671  def erase_pair_filter(self, i):
1672  r"""erase_pair_filter(ClosePairsFinder self, unsigned int i)"""
1673  return _IMP_core.ClosePairsFinder_erase_pair_filter(self, i)
1674 
1675  def reserve_pair_filters(self, sz):
1676  r"""reserve_pair_filters(ClosePairsFinder self, unsigned int sz)"""
1677  return _IMP_core.ClosePairsFinder_reserve_pair_filters(self, sz)
1678 
1679  def __str__(self):
1680  r"""__str__(ClosePairsFinder self) -> std::string"""
1681  return _IMP_core.ClosePairsFinder___str__(self)
1682 
1683  def __repr__(self):
1684  r"""__repr__(ClosePairsFinder self) -> std::string"""
1685  return _IMP_core.ClosePairsFinder___repr__(self)
1686 
1687  @staticmethod
1688  def get_from(o):
1689  return _object_cast_to_ClosePairsFinder(o)
1690 
1691 
1692 # Register ClosePairsFinder in _IMP_core:
1693 _IMP_core.ClosePairsFinder_swigregister(ClosePairsFinder)
1694 class MonteCarloMoverResult(IMP._Value):
1695  r"""Proxy of C++ IMP::core::MonteCarloMoverResult class."""
1696 
1697  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1698 
1699  def __init__(self, *args):
1700  r"""__init__(MonteCarloMoverResult self, IMP::ParticleIndexes i0=IMP::ParticleIndexes(), double i1=double()) -> MonteCarloMoverResult"""
1701  _IMP_core.MonteCarloMoverResult_swiginit(self, _IMP_core.new_MonteCarloMoverResult(*args))
1702 
1703  def __hash__(self):
1704  r"""__hash__(MonteCarloMoverResult self) -> std::size_t"""
1705  return _IMP_core.MonteCarloMoverResult___hash__(self)
1706 
1707  def show(self, *args):
1708  r"""show(MonteCarloMoverResult self, _ostream out=std::cout)"""
1709  return _IMP_core.MonteCarloMoverResult_show(self, *args)
1710 
1711  def __eq__(self, o):
1712  r"""__eq__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1713  return _IMP_core.MonteCarloMoverResult___eq__(self, o)
1714 
1715  def __ne__(self, o):
1716  r"""__ne__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1717  return _IMP_core.MonteCarloMoverResult___ne__(self, o)
1718 
1719  def __lt__(self, o):
1720  r"""__lt__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1721  return _IMP_core.MonteCarloMoverResult___lt__(self, o)
1722 
1723  def __gt__(self, o):
1724  r"""__gt__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1725  return _IMP_core.MonteCarloMoverResult___gt__(self, o)
1726 
1727  def __ge__(self, o):
1728  r"""__ge__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1729  return _IMP_core.MonteCarloMoverResult___ge__(self, o)
1730 
1731  def __le__(self, o):
1732  r"""__le__(MonteCarloMoverResult self, MonteCarloMoverResult o) -> bool"""
1733  return _IMP_core.MonteCarloMoverResult___le__(self, o)
1734 
1735  def get_moved_particles(self):
1736  r"""get_moved_particles(MonteCarloMoverResult self) -> IMP::ParticleIndexes const &"""
1737  return _IMP_core.MonteCarloMoverResult_get_moved_particles(self)
1738 
1739  def set_moved_particles(self, v):
1740  r"""set_moved_particles(MonteCarloMoverResult self, IMP::ParticleIndexes const & v)"""
1741  return _IMP_core.MonteCarloMoverResult_set_moved_particles(self, v)
1742 
1743  def get_proposal_ratio(self):
1744  r"""get_proposal_ratio(MonteCarloMoverResult self) -> double const &"""
1745  return _IMP_core.MonteCarloMoverResult_get_proposal_ratio(self)
1746 
1747  def set_proposal_ratio(self, v):
1748  r"""set_proposal_ratio(MonteCarloMoverResult self, double const & v)"""
1749  return _IMP_core.MonteCarloMoverResult_set_proposal_ratio(self, v)
1750 
1751  def __str__(self):
1752  r"""__str__(MonteCarloMoverResult self) -> std::string"""
1753  return _IMP_core.MonteCarloMoverResult___str__(self)
1754 
1755  def __repr__(self):
1756  r"""__repr__(MonteCarloMoverResult self) -> std::string"""
1757  return _IMP_core.MonteCarloMoverResult___repr__(self)
1758  __swig_destroy__ = _IMP_core.delete_MonteCarloMoverResult
1759 
1760 # Register MonteCarloMoverResult in _IMP_core:
1761 _IMP_core.MonteCarloMoverResult_swigregister(MonteCarloMoverResult)
1762 class MonteCarloMover(IMP.ModelObject):
1763  r"""Proxy of C++ IMP::core::MonteCarloMover class."""
1764 
1765  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1766 
1767  def __init__(self, *args):
1768  r"""
1769  __init__(MonteCarloMover self, Model m, std::string name) -> MonteCarloMover
1770  __init__(MonteCarloMover self) -> MonteCarloMover
1771  """
1772  if self.__class__ == MonteCarloMover:
1773  _self = None
1774  else:
1775  _self = self
1776  _IMP_core.MonteCarloMover_swiginit(self, _IMP_core.new_MonteCarloMover(_self, *args))
1777 
1778  if self.__class__ != MonteCarloMover:
1779  _director_objects.register(self)
1780 
1781 
1782 
1783 
1784  def propose(self):
1785  r"""propose(MonteCarloMover self) -> MonteCarloMoverResult"""
1786  return _IMP_core.MonteCarloMover_propose(self)
1787 
1788  def reject(self):
1789  r"""reject(MonteCarloMover self)"""
1790  return _IMP_core.MonteCarloMover_reject(self)
1791 
1792  def accept(self):
1793  r"""accept(MonteCarloMover self)"""
1794  return _IMP_core.MonteCarloMover_accept(self)
1795 
1796  def get_number_of_proposed(self):
1797  r"""get_number_of_proposed(MonteCarloMover self) -> unsigned int"""
1798  return _IMP_core.MonteCarloMover_get_number_of_proposed(self)
1799 
1800  def get_number_of_accepted(self):
1801  r"""get_number_of_accepted(MonteCarloMover self) -> unsigned int"""
1802  return _IMP_core.MonteCarloMover_get_number_of_accepted(self)
1803 
1804  def reset_statistics(self):
1805  r"""reset_statistics(MonteCarloMover self)"""
1806  return _IMP_core.MonteCarloMover_reset_statistics(self)
1807 
1808  def add_to_statistics(self, num_proposed, num_rejected):
1809  r"""add_to_statistics(MonteCarloMover self, unsigned int num_proposed, unsigned int num_rejected)"""
1810  return _IMP_core.MonteCarloMover_add_to_statistics(self, num_proposed, num_rejected)
1811 
1812  def do_propose(self):
1813  r"""do_propose(MonteCarloMover self) -> MonteCarloMoverResult"""
1814  return _IMP_core.MonteCarloMover_do_propose(self)
1815 
1816  def do_reject(self):
1817  r"""do_reject(MonteCarloMover self)"""
1818  return _IMP_core.MonteCarloMover_do_reject(self)
1819 
1820  def do_accept(self):
1821  r"""do_accept(MonteCarloMover self)"""
1822  return _IMP_core.MonteCarloMover_do_accept(self)
1823 
1824  def do_get_outputs(self):
1825  r"""do_get_outputs(MonteCarloMover self) -> IMP::ModelObjectsTemp"""
1826  return _IMP_core.MonteCarloMover_do_get_outputs(self)
1827 
1828  def __str__(self):
1829  r"""__str__(MonteCarloMover self) -> std::string"""
1830  return _IMP_core.MonteCarloMover___str__(self)
1831 
1832  def __repr__(self):
1833  r"""__repr__(MonteCarloMover self) -> std::string"""
1834  return _IMP_core.MonteCarloMover___repr__(self)
1835 
1836  @staticmethod
1837  def get_from(o):
1838  return _object_cast_to_MonteCarloMover(o)
1839 
1840 
1841  def do_show(self, out):
1842  pass
1843 
1844  @staticmethod
1845  def get_from(o):
1846  return _object_cast_to_MonteCarloMover(o)
1847 
1848 
1849  def _get_jax(self, space):
1850  """Return a JAX implementation of this mover.
1851  Implement this method in a MonteCarloMover subclass to provide
1852  equivalent functionality using [JAX](https://docs.jax.dev/).
1853  See _wrap_jax for more information.
1854 
1855  @param space The space in which the mover operates
1856  (e.g. a periodic box). See IMP._jax_util.Space.
1857  """
1858  raise NotImplementedError(f"No JAX implementation for {self}")
1859 
1860  def _wrap_jax(self, init_func, propose_func, accept_func=None,
1861  sync_func=None, reset_stats_func=None, keys=None):
1862  """Create the return value for _get_jax.
1863  Use this method in _get_jax() to wrap the JAX functions
1864  with other mover-specific information.
1865 
1866  @param init_func a JAX function which is used to initialize this
1867  mover. It is called with a single argument, a fresh JAX
1868  random key, and should return a persistent state object.
1869  This object may be the key itself, or any other Python object
1870  that JAX understands.
1871  @param propose_func a JAX function which is called with the current
1872  JAX Model and the mover's persistent state object.
1873  It should return a new JAX Model with the move applied,
1874  a new persistent state, and the proposal ratio. If the move
1875  is rejected then the new JAX Model will be discarded.
1876  However, the mover's persistent state is updated for both
1877  accepted and rejected moves.
1878  @param accept_func if provided, a JAX function which is called
1879  after each accepted Monte Carlo move, with the persistent
1880  state object. It should return a new persistent state.
1881  @param sync_func If provided, a Python function which is called
1882  at the end of a Monte Carlo sampling run to sync mover
1883  data back to IMP. It is called with the persistent state
1884  and the IMP Mover object.
1885  @param reset_stats_func If provided, a JAX function which is called
1886  at the beginning of a Monte Carlo run to reset this mover's
1887  statistics. It is called with the persistent state object and
1888  should return a new state.
1889  @param keys If given, a set of IMP::Key objects describing Model
1890  attributes (other than xyz and radius) that are altered
1891  by this mover.
1892  """
1893  from IMP.core._jax_util import JAXMoverInfo
1894  return JAXMoverInfo(init_func, propose_func, accept_func, sync_func,
1895  reset_stats_func, keys)
1896 
1897  __swig_destroy__ = _IMP_core.delete_MonteCarloMover
1898  def __disown__(self):
1899  self.this.disown()
1900  _IMP_core.disown_MonteCarloMover(self)
1901  return weakref.proxy(self)
1902 
1903  def do_destroy(self):
1904  r"""do_destroy(MonteCarloMover self)"""
1905  return _IMP_core.MonteCarloMover_do_destroy(self)
1906 
1907  def handle_set_has_required_score_states(self, arg0):
1908  r"""handle_set_has_required_score_states(MonteCarloMover self, bool arg0)"""
1909  return _IMP_core.MonteCarloMover_handle_set_has_required_score_states(self, arg0)
1910 
1911  def do_get_inputs(self):
1912  r"""do_get_inputs(MonteCarloMover self) -> IMP::ModelObjectsTemp"""
1913  return _IMP_core.MonteCarloMover_do_get_inputs(self)
1914 
1915  def do_get_interactions(self):
1916  r"""do_get_interactions(MonteCarloMover self) -> IMP::ModelObjectsTemps"""
1917  return _IMP_core.MonteCarloMover_do_get_interactions(self)
1918 
1919 # Register MonteCarloMover in _IMP_core:
1920 _IMP_core.MonteCarloMover_swigregister(MonteCarloMover)
1921 class XYZ(IMP.Decorator):
1922  r"""Proxy of C++ IMP::core::XYZ class."""
1923 
1924  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1925 
1926  @staticmethod
1927  def get_coordinate_key(i):
1928  r"""get_coordinate_key(unsigned int i) -> FloatKey"""
1929  return _IMP_core.XYZ_get_coordinate_key(i)
1930 
1931  def __init__(self, *args):
1932  r"""
1933  __init__(XYZ self) -> XYZ
1934  __init__(XYZ self, Model m, ParticleIndex id) -> XYZ
1935  __init__(XYZ self, _ParticleAdaptor d) -> XYZ
1936  """
1937  _IMP_core.XYZ_swiginit(self, _IMP_core.new_XYZ(*args))
1938 
1939  def show(self, *args):
1940  r"""show(XYZ self, _ostream out=std::cout)"""
1941  return _IMP_core.XYZ_show(self, *args)
1942 
1943  @staticmethod
1944  def setup_particle(*args):
1945  r"""
1946  setup_particle(Model m, ParticleIndex pi) -> XYZ
1947  setup_particle(_ParticleAdaptor pa) -> XYZ
1948  setup_particle(Model m, ParticleIndex pi, Vector3D v) -> XYZ
1949  setup_particle(_ParticleAdaptor pa, Vector3D v) -> XYZ
1950  """
1951  return _IMP_core.XYZ_setup_particle(*args)
1952 
1953  def get_x(self):
1954  r"""get_x(XYZ self) -> IMP::Float"""
1955  return _IMP_core.XYZ_get_x(self)
1956 
1957  def set_x(self, t):
1958  r"""set_x(XYZ self, IMP::Float t)"""
1959  return _IMP_core.XYZ_set_x(self, t)
1960 
1961  def get_y(self):
1962  r"""get_y(XYZ self) -> IMP::Float"""
1963  return _IMP_core.XYZ_get_y(self)
1964 
1965  def set_y(self, t):
1966  r"""set_y(XYZ self, IMP::Float t)"""
1967  return _IMP_core.XYZ_set_y(self, t)
1968 
1969  def get_z(self):
1970  r"""get_z(XYZ self) -> IMP::Float"""
1971  return _IMP_core.XYZ_get_z(self)
1972 
1973  def set_z(self, t):
1974  r"""set_z(XYZ self, IMP::Float t)"""
1975  return _IMP_core.XYZ_set_z(self, t)
1976 
1977  def set_coordinate(self, i, v):
1978  r"""set_coordinate(XYZ self, unsigned int i, IMP::Float v)"""
1979  return _IMP_core.XYZ_set_coordinate(self, i, v)
1980 
1981  def set_coordinates(self, v):
1982  r"""set_coordinates(XYZ self, Vector3D v)"""
1983  return _IMP_core.XYZ_set_coordinates(self, v)
1984 
1985  def get_coordinate(self, i):
1986  r"""get_coordinate(XYZ self, int i) -> IMP::Float"""
1987  return _IMP_core.XYZ_get_coordinate(self, i)
1988 
1989  def add_to_derivatives(self, v, d):
1990  r"""add_to_derivatives(XYZ self, Vector3D v, DerivativeAccumulator d)"""
1991  return _IMP_core.XYZ_add_to_derivatives(self, v, d)
1992 
1993  def get_coordinates_are_optimized(self):
1994  r"""get_coordinates_are_optimized(XYZ self) -> bool"""
1995  return _IMP_core.XYZ_get_coordinates_are_optimized(self)
1996 
1997  def set_coordinates_are_optimized(self, tf):
1998  r"""set_coordinates_are_optimized(XYZ self, bool tf)"""
1999  return _IMP_core.XYZ_set_coordinates_are_optimized(self, tf)
2000 
2001  def get_vector_to(self, b):
2002  r"""get_vector_to(XYZ self, XYZ b) -> Vector3D"""
2003  return _IMP_core.XYZ_get_vector_to(self, b)
2004 
2005  def get_coordinates(self):
2006  r"""get_coordinates(XYZ self) -> Vector3D"""
2007  return _IMP_core.XYZ_get_coordinates(self)
2008 
2009  def get_derivatives(self):
2010  r"""get_derivatives(XYZ self) -> Vector3D"""
2011  return _IMP_core.XYZ_get_derivatives(self)
2012 
2013  @staticmethod
2014  def get_is_setup(*args):
2015  r"""
2016  get_is_setup(_ParticleAdaptor p) -> bool
2017  get_is_setup(Model m, ParticleIndex pi) -> bool
2018  """
2019  return _IMP_core.XYZ_get_is_setup(*args)
2020 
2021  @staticmethod
2022  def get_xyz_keys():
2023  r"""get_xyz_keys() -> IMP::FloatKeys const &"""
2024  return _IMP_core.XYZ_get_xyz_keys()
2025 
2026  def add_attribute(self, *args):
2027  r"""
2028  add_attribute(XYZ self, FloatKey k, IMP::Float v, bool opt)
2029  add_attribute(XYZ self, FloatKey a0, IMP::Float a1)
2030  add_attribute(XYZ self, IntKey a0, IMP::Int a1)
2031  add_attribute(XYZ self, FloatsKey a0, IMP::Floats a1)
2032  add_attribute(XYZ self, IntsKey a0, IMP::Ints a1)
2033  add_attribute(XYZ self, StringKey a0, IMP::String a1)
2034  add_attribute(XYZ self, ParticleIndexKey a0, Particle a1)
2035  add_attribute(XYZ self, ObjectKey a0, Object a1)
2036  add_attribute(XYZ self, SparseFloatKey a0, IMP::Float a1)
2037  add_attribute(XYZ self, SparseIntKey a0, IMP::Int a1)
2038  add_attribute(XYZ self, SparseStringKey a0, IMP::String a1)
2039  add_attribute(XYZ self, SparseParticleIndexKey a0, ParticleIndex a1)
2040  """
2041  return _IMP_core.XYZ_add_attribute(self, *args)
2042 
2043  def get_value(self, *args):
2044  r"""
2045  get_value(XYZ self, FloatKey a0) -> IMP::Float
2046  get_value(XYZ self, IntKey a0) -> IMP::Int
2047  get_value(XYZ self, FloatsKey a0) -> IMP::Floats
2048  get_value(XYZ self, IntsKey a0) -> IMP::Ints
2049  get_value(XYZ self, StringKey a0) -> IMP::String
2050  get_value(XYZ self, ParticleIndexKey a0) -> Particle
2051  get_value(XYZ self, ObjectKey a0) -> Object
2052  get_value(XYZ self, SparseFloatKey a0) -> IMP::Float
2053  get_value(XYZ self, SparseIntKey a0) -> IMP::Int
2054  get_value(XYZ self, SparseStringKey a0) -> IMP::String
2055  get_value(XYZ self, SparseParticleIndexKey a0) -> ParticleIndex
2056  """
2057  return _IMP_core.XYZ_get_value(self, *args)
2058 
2059  def set_value(self, *args):
2060  r"""
2061  set_value(XYZ self, FloatKey a0, IMP::Float a1)
2062  set_value(XYZ self, IntKey a0, IMP::Int a1)
2063  set_value(XYZ self, FloatsKey a0, IMP::Floats a1)
2064  set_value(XYZ self, IntsKey a0, IMP::Ints a1)
2065  set_value(XYZ self, StringKey a0, IMP::String a1)
2066  set_value(XYZ self, ParticleIndexKey a0, Particle a1)
2067  set_value(XYZ self, ObjectKey a0, Object a1)
2068  set_value(XYZ self, SparseFloatKey a0, IMP::Float a1)
2069  set_value(XYZ self, SparseIntKey a0, IMP::Int a1)
2070  set_value(XYZ self, SparseStringKey a0, IMP::String a1)
2071  set_value(XYZ self, SparseParticleIndexKey a0, ParticleIndex a1)
2072  """
2073  return _IMP_core.XYZ_set_value(self, *args)
2074 
2075  def remove_attribute(self, *args):
2076  r"""
2077  remove_attribute(XYZ self, FloatKey a0)
2078  remove_attribute(XYZ self, IntKey a0)
2079  remove_attribute(XYZ self, FloatsKey a0)
2080  remove_attribute(XYZ self, IntsKey a0)
2081  remove_attribute(XYZ self, StringKey a0)
2082  remove_attribute(XYZ self, ParticleIndexKey a0)
2083  remove_attribute(XYZ self, ObjectKey a0)
2084  remove_attribute(XYZ self, SparseFloatKey a0)
2085  remove_attribute(XYZ self, SparseIntKey a0)
2086  remove_attribute(XYZ self, SparseStringKey a0)
2087  remove_attribute(XYZ self, SparseParticleIndexKey a0)
2088  """
2089  return _IMP_core.XYZ_remove_attribute(self, *args)
2090 
2091  def has_attribute(self, *args):
2092  r"""
2093  has_attribute(XYZ self, FloatKey a0) -> bool
2094  has_attribute(XYZ self, IntKey a0) -> bool
2095  has_attribute(XYZ self, FloatsKey a0) -> bool
2096  has_attribute(XYZ self, IntsKey a0) -> bool
2097  has_attribute(XYZ self, StringKey a0) -> bool
2098  has_attribute(XYZ self, ParticleIndexKey a0) -> bool
2099  has_attribute(XYZ self, ObjectKey a0) -> bool
2100  has_attribute(XYZ self, SparseFloatKey a0) -> bool
2101  has_attribute(XYZ self, SparseIntKey a0) -> bool
2102  has_attribute(XYZ self, SparseStringKey a0) -> bool
2103  has_attribute(XYZ self, SparseParticleIndexKey a0) -> bool
2104  """
2105  return _IMP_core.XYZ_has_attribute(self, *args)
2106 
2107  def get_derivative(self, *args):
2108  r"""
2109  get_derivative(XYZ self, int i) -> IMP::Float
2110  get_derivative(XYZ self, FloatKey a0) -> double
2111  """
2112  return _IMP_core.XYZ_get_derivative(self, *args)
2113 
2114  def get_name(self):
2115  r"""get_name(XYZ self) -> std::string"""
2116  return _IMP_core.XYZ_get_name(self)
2117 
2118  def clear_caches(self):
2119  r"""clear_caches(XYZ self)"""
2120  return _IMP_core.XYZ_clear_caches(self)
2121 
2122  def set_name(self, a0):
2123  r"""set_name(XYZ self, std::string a0)"""
2124  return _IMP_core.XYZ_set_name(self, a0)
2125 
2126  def set_check_level(self, a0):
2127  r"""set_check_level(XYZ self, IMP::CheckLevel a0)"""
2128  return _IMP_core.XYZ_set_check_level(self, a0)
2129 
2130  def add_to_derivative(self, *args):
2131  r"""
2132  add_to_derivative(XYZ self, int i, IMP::Float v, DerivativeAccumulator d)
2133  add_to_derivative(XYZ self, FloatKey a0, double a1, DerivativeAccumulator a2)
2134  """
2135  return _IMP_core.XYZ_add_to_derivative(self, *args)
2136 
2137  def set_is_optimized(self, a0, a1):
2138  r"""set_is_optimized(XYZ self, FloatKey a0, bool a1)"""
2139  return _IMP_core.XYZ_set_is_optimized(self, a0, a1)
2140 
2141  def get_is_optimized(self, a0):
2142  r"""get_is_optimized(XYZ self, FloatKey a0) -> bool"""
2143  return _IMP_core.XYZ_get_is_optimized(self, a0)
2144 
2145  def get_check_level(self):
2146  r"""get_check_level(XYZ self) -> IMP::CheckLevel"""
2147  return _IMP_core.XYZ_get_check_level(self)
2148 
2149  def __eq__(self, *args):
2150  r"""
2151  __eq__(XYZ self, XYZ o) -> bool
2152  __eq__(XYZ self, Particle d) -> bool
2153  """
2154  return _IMP_core.XYZ___eq__(self, *args)
2155 
2156  def __ne__(self, *args):
2157  r"""
2158  __ne__(XYZ self, XYZ o) -> bool
2159  __ne__(XYZ self, Particle d) -> bool
2160  """
2161  return _IMP_core.XYZ___ne__(self, *args)
2162 
2163  def __le__(self, *args):
2164  r"""
2165  __le__(XYZ self, XYZ o) -> bool
2166  __le__(XYZ self, Particle d) -> bool
2167  """
2168  return _IMP_core.XYZ___le__(self, *args)
2169 
2170  def __lt__(self, *args):
2171  r"""
2172  __lt__(XYZ self, XYZ o) -> bool
2173  __lt__(XYZ self, Particle d) -> bool
2174  """
2175  return _IMP_core.XYZ___lt__(self, *args)
2176 
2177  def __ge__(self, *args):
2178  r"""
2179  __ge__(XYZ self, XYZ o) -> bool
2180  __ge__(XYZ self, Particle d) -> bool
2181  """
2182  return _IMP_core.XYZ___ge__(self, *args)
2183 
2184  def __gt__(self, *args):
2185  r"""
2186  __gt__(XYZ self, XYZ o) -> bool
2187  __gt__(XYZ self, Particle d) -> bool
2188  """
2189  return _IMP_core.XYZ___gt__(self, *args)
2190 
2191  def __hash__(self):
2192  r"""__hash__(XYZ self) -> std::size_t"""
2193  return _IMP_core.XYZ___hash__(self)
2194 
2195  def __str__(self):
2196  r"""__str__(XYZ self) -> std::string"""
2197  return _IMP_core.XYZ___str__(self)
2198 
2199  def __repr__(self):
2200  r"""__repr__(XYZ self) -> std::string"""
2201  return _IMP_core.XYZ___repr__(self)
2202 
2203  def _get_as_binary(self):
2204  r"""_get_as_binary(XYZ self) -> PyObject *"""
2205  return _IMP_core.XYZ__get_as_binary(self)
2206 
2207  def _set_from_binary(self, p):
2208  r"""_set_from_binary(XYZ self, PyObject * p)"""
2209  return _IMP_core.XYZ__set_from_binary(self, p)
2210 
2211  def __getstate__(self):
2212  p = self._get_as_binary()
2213  if len(self.__dict__) > 1:
2214  d = self.__dict__.copy()
2215  del d['this']
2216  p = (d, p)
2217  return p
2218 
2219  def __setstate__(self, p):
2220  if not hasattr(self, 'this'):
2221  self.__init__()
2222  if isinstance(p, tuple):
2223  d, p = p
2224  self.__dict__.update(d)
2225  return self._set_from_binary(p)
2226 
2227  __swig_destroy__ = _IMP_core.delete_XYZ
2228 
2229 # Register XYZ in _IMP_core:
2230 _IMP_core.XYZ_swigregister(XYZ)
2231 
2232 def set_vector_geometry(d, v):
2233  r"""set_vector_geometry(XYZ d, Vector3D v)"""
2234  return _IMP_core.set_vector_geometry(d, v)
2235 
2236 def get_vector_geometry(d):
2237  r"""get_vector_geometry(XYZ d) -> Vector3D"""
2238  return _IMP_core.get_vector_geometry(d)
2239 
2240 def get_dihedral(a, b, c, d):
2241  r"""get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d) -> double"""
2242  return _IMP_core.get_dihedral(a, b, c, d)
2243 class XYZR(XYZ):
2244  r"""Proxy of C++ IMP::core::XYZR class."""
2245 
2246  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2247 
2248  def __init__(self, *args):
2249  r"""
2250  __init__(XYZR self) -> XYZR
2251  __init__(XYZR self, Model m, ParticleIndex id) -> XYZR
2252  __init__(XYZR self, _ParticleAdaptor d) -> XYZR
2253  """
2254  _IMP_core.XYZR_swiginit(self, _IMP_core.new_XYZR(*args))
2255 
2256  def show(self, *args):
2257  r"""show(XYZR self, _ostream out=std::cout)"""
2258  return _IMP_core.XYZR_show(self, *args)
2259 
2260  @staticmethod
2261  def setup_particle(*args):
2262  r"""
2263  setup_particle(Model m, ParticleIndex pi) -> XYZR
2264  setup_particle(_ParticleAdaptor pa) -> XYZR
2265  setup_particle(Model m, ParticleIndex pi, IMP::Float radius) -> XYZR
2266  setup_particle(_ParticleAdaptor pa, IMP::Float radius) -> XYZR
2267  setup_particle(Model m, ParticleIndex pi, Sphere3D ball) -> XYZR
2268  setup_particle(_ParticleAdaptor pa, Sphere3D ball) -> XYZR
2269  """
2270  return _IMP_core.XYZR_setup_particle(*args)
2271 
2272  @staticmethod
2273  def get_is_setup(*args):
2274  r"""
2275  get_is_setup(_ParticleAdaptor p) -> bool
2276  get_is_setup(Model m, ParticleIndex pi) -> bool
2277  """
2278  return _IMP_core.XYZR_get_is_setup(*args)
2279 
2280  def get_radius(self):
2281  r"""get_radius(XYZR self) -> double"""
2282  return _IMP_core.XYZR_get_radius(self)
2283 
2284  def set_radius(self, r):
2285  r"""set_radius(XYZR self, double r)"""
2286  return _IMP_core.XYZR_set_radius(self, r)
2287 
2288  def get_sphere(self):
2289  r"""get_sphere(XYZR self) -> Sphere3D"""
2290  return _IMP_core.XYZR_get_sphere(self)
2291 
2292  def set_sphere(self, s):
2293  r"""set_sphere(XYZR self, Sphere3D s)"""
2294  return _IMP_core.XYZR_set_sphere(self, s)
2295 
2296  @staticmethod
2297  def get_radius_key():
2298  r"""get_radius_key() -> FloatKey"""
2299  return _IMP_core.XYZR_get_radius_key()
2300 
2301  def add_to_radius_derivative(self, v, d):
2302  r"""add_to_radius_derivative(XYZR self, double v, DerivativeAccumulator d)"""
2303  return _IMP_core.XYZR_add_to_radius_derivative(self, v, d)
2304 
2305  def add_attribute(self, *args):
2306  r"""
2307  add_attribute(XYZR self, FloatKey k, IMP::Float v, bool opt)
2308  add_attribute(XYZR self, FloatKey a0, IMP::Float a1)
2309  add_attribute(XYZR self, IntKey a0, IMP::Int a1)
2310  add_attribute(XYZR self, FloatsKey a0, IMP::Floats a1)
2311  add_attribute(XYZR self, IntsKey a0, IMP::Ints a1)
2312  add_attribute(XYZR self, StringKey a0, IMP::String a1)
2313  add_attribute(XYZR self, ParticleIndexKey a0, Particle a1)
2314  add_attribute(XYZR self, ObjectKey a0, Object a1)
2315  add_attribute(XYZR self, SparseFloatKey a0, IMP::Float a1)
2316  add_attribute(XYZR self, SparseIntKey a0, IMP::Int a1)
2317  add_attribute(XYZR self, SparseStringKey a0, IMP::String a1)
2318  add_attribute(XYZR self, SparseParticleIndexKey a0, ParticleIndex a1)
2319  """
2320  return _IMP_core.XYZR_add_attribute(self, *args)
2321 
2322  def get_value(self, *args):
2323  r"""
2324  get_value(XYZR self, FloatKey a0) -> IMP::Float
2325  get_value(XYZR self, IntKey a0) -> IMP::Int
2326  get_value(XYZR self, FloatsKey a0) -> IMP::Floats
2327  get_value(XYZR self, IntsKey a0) -> IMP::Ints
2328  get_value(XYZR self, StringKey a0) -> IMP::String
2329  get_value(XYZR self, ParticleIndexKey a0) -> Particle
2330  get_value(XYZR self, ObjectKey a0) -> Object
2331  get_value(XYZR self, SparseFloatKey a0) -> IMP::Float
2332  get_value(XYZR self, SparseIntKey a0) -> IMP::Int
2333  get_value(XYZR self, SparseStringKey a0) -> IMP::String
2334  get_value(XYZR self, SparseParticleIndexKey a0) -> ParticleIndex
2335  """
2336  return _IMP_core.XYZR_get_value(self, *args)
2337 
2338  def set_value(self, *args):
2339  r"""
2340  set_value(XYZR self, FloatKey a0, IMP::Float a1)
2341  set_value(XYZR self, IntKey a0, IMP::Int a1)
2342  set_value(XYZR self, FloatsKey a0, IMP::Floats a1)
2343  set_value(XYZR self, IntsKey a0, IMP::Ints a1)
2344  set_value(XYZR self, StringKey a0, IMP::String a1)
2345  set_value(XYZR self, ParticleIndexKey a0, Particle a1)
2346  set_value(XYZR self, ObjectKey a0, Object a1)
2347  set_value(XYZR self, SparseFloatKey a0, IMP::Float a1)
2348  set_value(XYZR self, SparseIntKey a0, IMP::Int a1)
2349  set_value(XYZR self, SparseStringKey a0, IMP::String a1)
2350  set_value(XYZR self, SparseParticleIndexKey a0, ParticleIndex a1)
2351  """
2352  return _IMP_core.XYZR_set_value(self, *args)
2353 
2354  def remove_attribute(self, *args):
2355  r"""
2356  remove_attribute(XYZR self, FloatKey a0)
2357  remove_attribute(XYZR self, IntKey a0)
2358  remove_attribute(XYZR self, FloatsKey a0)
2359  remove_attribute(XYZR self, IntsKey a0)
2360  remove_attribute(XYZR self, StringKey a0)
2361  remove_attribute(XYZR self, ParticleIndexKey a0)
2362  remove_attribute(XYZR self, ObjectKey a0)
2363  remove_attribute(XYZR self, SparseFloatKey a0)
2364  remove_attribute(XYZR self, SparseIntKey a0)
2365  remove_attribute(XYZR self, SparseStringKey a0)
2366  remove_attribute(XYZR self, SparseParticleIndexKey a0)
2367  """
2368  return _IMP_core.XYZR_remove_attribute(self, *args)
2369 
2370  def has_attribute(self, *args):
2371  r"""
2372  has_attribute(XYZR self, FloatKey a0) -> bool
2373  has_attribute(XYZR self, IntKey a0) -> bool
2374  has_attribute(XYZR self, FloatsKey a0) -> bool
2375  has_attribute(XYZR self, IntsKey a0) -> bool
2376  has_attribute(XYZR self, StringKey a0) -> bool
2377  has_attribute(XYZR self, ParticleIndexKey a0) -> bool
2378  has_attribute(XYZR self, ObjectKey a0) -> bool
2379  has_attribute(XYZR self, SparseFloatKey a0) -> bool
2380  has_attribute(XYZR self, SparseIntKey a0) -> bool
2381  has_attribute(XYZR self, SparseStringKey a0) -> bool
2382  has_attribute(XYZR self, SparseParticleIndexKey a0) -> bool
2383  """
2384  return _IMP_core.XYZR_has_attribute(self, *args)
2385 
2386  def get_derivative(self, a0):
2387  r"""get_derivative(XYZR self, FloatKey a0) -> double"""
2388  return _IMP_core.XYZR_get_derivative(self, a0)
2389 
2390  def get_name(self):
2391  r"""get_name(XYZR self) -> std::string"""
2392  return _IMP_core.XYZR_get_name(self)
2393 
2394  def clear_caches(self):
2395  r"""clear_caches(XYZR self)"""
2396  return _IMP_core.XYZR_clear_caches(self)
2397 
2398  def set_name(self, a0):
2399  r"""set_name(XYZR self, std::string a0)"""
2400  return _IMP_core.XYZR_set_name(self, a0)
2401 
2402  def set_check_level(self, a0):
2403  r"""set_check_level(XYZR self, IMP::CheckLevel a0)"""
2404  return _IMP_core.XYZR_set_check_level(self, a0)
2405 
2406  def add_to_derivative(self, a0, a1, a2):
2407  r"""add_to_derivative(XYZR self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2408  return _IMP_core.XYZR_add_to_derivative(self, a0, a1, a2)
2409 
2410  def set_is_optimized(self, a0, a1):
2411  r"""set_is_optimized(XYZR self, FloatKey a0, bool a1)"""
2412  return _IMP_core.XYZR_set_is_optimized(self, a0, a1)
2413 
2414  def get_is_optimized(self, a0):
2415  r"""get_is_optimized(XYZR self, FloatKey a0) -> bool"""
2416  return _IMP_core.XYZR_get_is_optimized(self, a0)
2417 
2418  def get_check_level(self):
2419  r"""get_check_level(XYZR self) -> IMP::CheckLevel"""
2420  return _IMP_core.XYZR_get_check_level(self)
2421 
2422  def __eq__(self, *args):
2423  r"""
2424  __eq__(XYZR self, XYZR o) -> bool
2425  __eq__(XYZR self, Particle d) -> bool
2426  """
2427  return _IMP_core.XYZR___eq__(self, *args)
2428 
2429  def __ne__(self, *args):
2430  r"""
2431  __ne__(XYZR self, XYZR o) -> bool
2432  __ne__(XYZR self, Particle d) -> bool
2433  """
2434  return _IMP_core.XYZR___ne__(self, *args)
2435 
2436  def __le__(self, *args):
2437  r"""
2438  __le__(XYZR self, XYZR o) -> bool
2439  __le__(XYZR self, Particle d) -> bool
2440  """
2441  return _IMP_core.XYZR___le__(self, *args)
2442 
2443  def __lt__(self, *args):
2444  r"""
2445  __lt__(XYZR self, XYZR o) -> bool
2446  __lt__(XYZR self, Particle d) -> bool
2447  """
2448  return _IMP_core.XYZR___lt__(self, *args)
2449 
2450  def __ge__(self, *args):
2451  r"""
2452  __ge__(XYZR self, XYZR o) -> bool
2453  __ge__(XYZR self, Particle d) -> bool
2454  """
2455  return _IMP_core.XYZR___ge__(self, *args)
2456 
2457  def __gt__(self, *args):
2458  r"""
2459  __gt__(XYZR self, XYZR o) -> bool
2460  __gt__(XYZR self, Particle d) -> bool
2461  """
2462  return _IMP_core.XYZR___gt__(self, *args)
2463 
2464  def __hash__(self):
2465  r"""__hash__(XYZR self) -> std::size_t"""
2466  return _IMP_core.XYZR___hash__(self)
2467 
2468  def __str__(self):
2469  r"""__str__(XYZR self) -> std::string"""
2470  return _IMP_core.XYZR___str__(self)
2471 
2472  def __repr__(self):
2473  r"""__repr__(XYZR self) -> std::string"""
2474  return _IMP_core.XYZR___repr__(self)
2475 
2476  def _get_as_binary(self):
2477  r"""_get_as_binary(XYZR self) -> PyObject *"""
2478  return _IMP_core.XYZR__get_as_binary(self)
2479 
2480  def _set_from_binary(self, p):
2481  r"""_set_from_binary(XYZR self, PyObject * p)"""
2482  return _IMP_core.XYZR__set_from_binary(self, p)
2483 
2484  def __getstate__(self):
2485  p = self._get_as_binary()
2486  if len(self.__dict__) > 1:
2487  d = self.__dict__.copy()
2488  del d['this']
2489  p = (d, p)
2490  return p
2491 
2492  def __setstate__(self, p):
2493  if not hasattr(self, 'this'):
2494  self.__init__()
2495  if isinstance(p, tuple):
2496  d, p = p
2497  self.__dict__.update(d)
2498  return self._set_from_binary(p)
2499 
2500  __swig_destroy__ = _IMP_core.delete_XYZR
2501 
2502 # Register XYZR in _IMP_core:
2503 _IMP_core.XYZR_swigregister(XYZR)
2504 
2505 def set_enclosing_sphere(b, v, slack=0):
2506  r"""set_enclosing_sphere(XYZR b, IMP::core::XYZs const & v, double slack=0)"""
2507  return _IMP_core.set_enclosing_sphere(b, v, slack)
2508 
2509 def set_enclosing_radius(b, v):
2510  r"""set_enclosing_radius(XYZR b, IMP::core::XYZs const & v)"""
2511  return _IMP_core.set_enclosing_radius(b, v)
2512 
2513 def get_enclosing_sphere(v):
2514  r"""get_enclosing_sphere(IMP::core::XYZs const & v) -> Sphere3D"""
2515  return _IMP_core.get_enclosing_sphere(v)
2516 
2517 def create_xyzr_particles(m, num, radius, box_side=10):
2518  r"""create_xyzr_particles(Model m, unsigned int num, IMP::Float radius, IMP::Float box_side=10) -> IMP::core::XYZRs"""
2519  return _IMP_core.create_xyzr_particles(m, num, radius, box_side)
2520 class XYZRGeometry(IMP.display.SingletonGeometry):
2521  r"""Proxy of C++ IMP::core::XYZRGeometry class."""
2522 
2523  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2524 
2525  def __init__(self, *args):
2526  r"""
2527  __init__(XYZRGeometry self, Particle p) -> XYZRGeometry
2528  __init__(XYZRGeometry self, XYZR d) -> XYZRGeometry
2529  """
2530  _IMP_core.XYZRGeometry_swiginit(self, _IMP_core.new_XYZRGeometry(*args))
2531 
2532  def get_version_info(self):
2533  r"""get_version_info(XYZRGeometry self) -> VersionInfo"""
2534  return _IMP_core.XYZRGeometry_get_version_info(self)
2535  __swig_destroy__ = _IMP_core.delete_XYZRGeometry
2536 
2537  def __str__(self):
2538  r"""__str__(XYZRGeometry self) -> std::string"""
2539  return _IMP_core.XYZRGeometry___str__(self)
2540 
2541  def __repr__(self):
2542  r"""__repr__(XYZRGeometry self) -> std::string"""
2543  return _IMP_core.XYZRGeometry___repr__(self)
2544 
2545  @staticmethod
2546  def get_from(o):
2547  return _object_cast_to_XYZRGeometry(o)
2548 
2549 
2550 # Register XYZRGeometry in _IMP_core:
2551 _IMP_core.XYZRGeometry_swigregister(XYZRGeometry)
2552 class XYZRsGeometry(IMP.display.SingletonsGeometry):
2553  r"""Proxy of C++ IMP::core::XYZRsGeometry class."""
2554 
2555  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2556 
2557  def __init__(self, sc):
2558  r"""__init__(XYZRsGeometry self, SingletonContainer sc) -> XYZRsGeometry"""
2559  _IMP_core.XYZRsGeometry_swiginit(self, _IMP_core.new_XYZRsGeometry(sc))
2560 
2561  def get_version_info(self):
2562  r"""get_version_info(XYZRsGeometry self) -> VersionInfo"""
2563  return _IMP_core.XYZRsGeometry_get_version_info(self)
2564  __swig_destroy__ = _IMP_core.delete_XYZRsGeometry
2565 
2566  def __str__(self):
2567  r"""__str__(XYZRsGeometry self) -> std::string"""
2568  return _IMP_core.XYZRsGeometry___str__(self)
2569 
2570  def __repr__(self):
2571  r"""__repr__(XYZRsGeometry self) -> std::string"""
2572  return _IMP_core.XYZRsGeometry___repr__(self)
2573 
2574  @staticmethod
2575  def get_from(o):
2576  return _object_cast_to_XYZRsGeometry(o)
2577 
2578 
2579 # Register XYZRsGeometry in _IMP_core:
2580 _IMP_core.XYZRsGeometry_swigregister(XYZRsGeometry)
2581 class XYZDerivativeGeometry(IMP.display.SingletonGeometry):
2582  r"""Proxy of C++ IMP::core::XYZDerivativeGeometry class."""
2583 
2584  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2585 
2586  def __init__(self, *args):
2587  r"""
2588  __init__(XYZDerivativeGeometry self, Particle p) -> XYZDerivativeGeometry
2589  __init__(XYZDerivativeGeometry self, XYZ d) -> XYZDerivativeGeometry
2590  """
2591  _IMP_core.XYZDerivativeGeometry_swiginit(self, _IMP_core.new_XYZDerivativeGeometry(*args))
2592 
2593  def get_version_info(self):
2594  r"""get_version_info(XYZDerivativeGeometry self) -> VersionInfo"""
2595  return _IMP_core.XYZDerivativeGeometry_get_version_info(self)
2596  __swig_destroy__ = _IMP_core.delete_XYZDerivativeGeometry
2597 
2598  def __str__(self):
2599  r"""__str__(XYZDerivativeGeometry self) -> std::string"""
2600  return _IMP_core.XYZDerivativeGeometry___str__(self)
2601 
2602  def __repr__(self):
2603  r"""__repr__(XYZDerivativeGeometry self) -> std::string"""
2604  return _IMP_core.XYZDerivativeGeometry___repr__(self)
2605 
2606  @staticmethod
2607  def get_from(o):
2608  return _object_cast_to_XYZDerivativeGeometry(o)
2609 
2610 
2611 # Register XYZDerivativeGeometry in _IMP_core:
2612 _IMP_core.XYZDerivativeGeometry_swigregister(XYZDerivativeGeometry)
2613 class XYZDerivativesGeometry(IMP.display.SingletonsGeometry):
2614  r"""Proxy of C++ IMP::core::XYZDerivativesGeometry class."""
2615 
2616  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2617 
2618  def __init__(self, sc):
2619  r"""__init__(XYZDerivativesGeometry self, SingletonContainer sc) -> XYZDerivativesGeometry"""
2620  _IMP_core.XYZDerivativesGeometry_swiginit(self, _IMP_core.new_XYZDerivativesGeometry(sc))
2621 
2622  def get_version_info(self):
2623  r"""get_version_info(XYZDerivativesGeometry self) -> VersionInfo"""
2624  return _IMP_core.XYZDerivativesGeometry_get_version_info(self)
2625  __swig_destroy__ = _IMP_core.delete_XYZDerivativesGeometry
2626 
2627  def __str__(self):
2628  r"""__str__(XYZDerivativesGeometry self) -> std::string"""
2629  return _IMP_core.XYZDerivativesGeometry___str__(self)
2630 
2631  def __repr__(self):
2632  r"""__repr__(XYZDerivativesGeometry self) -> std::string"""
2633  return _IMP_core.XYZDerivativesGeometry___repr__(self)
2634 
2635  @staticmethod
2636  def get_from(o):
2637  return _object_cast_to_XYZDerivativesGeometry(o)
2638 
2639 
2640 # Register XYZDerivativesGeometry in _IMP_core:
2641 _IMP_core.XYZDerivativesGeometry_swigregister(XYZDerivativesGeometry)
2642 class EdgePairGeometry(IMP.display.PairGeometry):
2643  r"""Proxy of C++ IMP::core::EdgePairGeometry class."""
2644 
2645  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2646 
2647  def __init__(self, pp):
2648  r"""__init__(EdgePairGeometry self, IMP::ParticlePair const & pp) -> EdgePairGeometry"""
2649  _IMP_core.EdgePairGeometry_swiginit(self, _IMP_core.new_EdgePairGeometry(pp))
2650 
2651  def get_version_info(self):
2652  r"""get_version_info(EdgePairGeometry self) -> VersionInfo"""
2653  return _IMP_core.EdgePairGeometry_get_version_info(self)
2654  __swig_destroy__ = _IMP_core.delete_EdgePairGeometry
2655 
2656  def __str__(self):
2657  r"""__str__(EdgePairGeometry self) -> std::string"""
2658  return _IMP_core.EdgePairGeometry___str__(self)
2659 
2660  def __repr__(self):
2661  r"""__repr__(EdgePairGeometry self) -> std::string"""
2662  return _IMP_core.EdgePairGeometry___repr__(self)
2663 
2664  @staticmethod
2665  def get_from(o):
2666  return _object_cast_to_EdgePairGeometry(o)
2667 
2668 
2669 # Register EdgePairGeometry in _IMP_core:
2670 _IMP_core.EdgePairGeometry_swigregister(EdgePairGeometry)
2671 class EdgePairsGeometry(IMP.display.PairsGeometry):
2672  r"""Proxy of C++ IMP::core::EdgePairsGeometry class."""
2673 
2674  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2675 
2676  def __init__(self, sc):
2677  r"""__init__(EdgePairsGeometry self, PairContainer sc) -> EdgePairsGeometry"""
2678  _IMP_core.EdgePairsGeometry_swiginit(self, _IMP_core.new_EdgePairsGeometry(sc))
2679 
2680  def get_version_info(self):
2681  r"""get_version_info(EdgePairsGeometry self) -> VersionInfo"""
2682  return _IMP_core.EdgePairsGeometry_get_version_info(self)
2683  __swig_destroy__ = _IMP_core.delete_EdgePairsGeometry
2684 
2685  def __str__(self):
2686  r"""__str__(EdgePairsGeometry self) -> std::string"""
2687  return _IMP_core.EdgePairsGeometry___str__(self)
2688 
2689  def __repr__(self):
2690  r"""__repr__(EdgePairsGeometry self) -> std::string"""
2691  return _IMP_core.EdgePairsGeometry___repr__(self)
2692 
2693  @staticmethod
2694  def get_from(o):
2695  return _object_cast_to_EdgePairsGeometry(o)
2696 
2697 
2698 # Register EdgePairsGeometry in _IMP_core:
2699 _IMP_core.EdgePairsGeometry_swigregister(EdgePairsGeometry)
2700 class Direction(IMP.Decorator):
2701  r"""Proxy of C++ IMP::core::Direction class."""
2702 
2703  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2704 
2705  @staticmethod
2706  def do_setup_particle(m, pi, v):
2707  r"""do_setup_particle(Model m, ParticleIndex pi, Vector3D v)"""
2708  return _IMP_core.Direction_do_setup_particle(m, pi, v)
2709 
2710  def __init__(self, *args):
2711  r"""
2712  __init__(Direction self) -> Direction
2713  __init__(Direction self, Model m, ParticleIndex id) -> Direction
2714  __init__(Direction self, _ParticleAdaptor d) -> Direction
2715  """
2716  _IMP_core.Direction_swiginit(self, _IMP_core.new_Direction(*args))
2717 
2718  def show(self, *args):
2719  r"""show(Direction self, _ostream out=std::cout)"""
2720  return _IMP_core.Direction_show(self, *args)
2721 
2722  @staticmethod
2723  def setup_particle(*args):
2724  r"""
2725  setup_particle(Model m, ParticleIndex pi, Vector3D v) -> Direction
2726  setup_particle(_ParticleAdaptor pa, Vector3D v) -> Direction
2727  """
2728  return _IMP_core.Direction_setup_particle(*args)
2729 
2730  @staticmethod
2731  def get_is_setup(*args):
2732  r"""
2733  get_is_setup(_ParticleAdaptor p) -> bool
2734  get_is_setup(Model m, ParticleIndex pi) -> bool
2735  """
2736  return _IMP_core.Direction_get_is_setup(*args)
2737 
2738  @staticmethod
2739  def get_direction_key(i):
2740  r"""get_direction_key(unsigned int i) -> FloatKey"""
2741  return _IMP_core.Direction_get_direction_key(i)
2742 
2743  def get_direction_derivative(self, i):
2744  r"""get_direction_derivative(Direction self, int i) -> IMP::Float"""
2745  return _IMP_core.Direction_get_direction_derivative(self, i)
2746 
2747  def get_direction_derivatives(self):
2748  r"""get_direction_derivatives(Direction self) -> Vector3D"""
2749  return _IMP_core.Direction_get_direction_derivatives(self)
2750 
2751  def add_to_direction_derivative(self, i, v, d):
2752  r"""add_to_direction_derivative(Direction self, int i, IMP::Float v, DerivativeAccumulator d)"""
2753  return _IMP_core.Direction_add_to_direction_derivative(self, i, v, d)
2754 
2755  def add_to_direction_derivatives(self, v, d):
2756  r"""add_to_direction_derivatives(Direction self, Vector3D v, DerivativeAccumulator d)"""
2757  return _IMP_core.Direction_add_to_direction_derivatives(self, v, d)
2758 
2759  def get_direction_is_optimized(self):
2760  r"""get_direction_is_optimized(Direction self) -> bool"""
2761  return _IMP_core.Direction_get_direction_is_optimized(self)
2762 
2763  def set_direction_is_optimized(self, tf):
2764  r"""set_direction_is_optimized(Direction self, bool tf)"""
2765  return _IMP_core.Direction_set_direction_is_optimized(self, tf)
2766 
2767  def get_direction(self):
2768  r"""get_direction(Direction self) -> Vector3D"""
2769  return _IMP_core.Direction_get_direction(self)
2770 
2771  def set_direction(self, v):
2772  r"""set_direction(Direction self, Vector3D v)"""
2773  return _IMP_core.Direction_set_direction(self, v)
2774 
2775  def reflect(self):
2776  r"""reflect(Direction self)"""
2777  return _IMP_core.Direction_reflect(self)
2778 
2779  def add_attribute(self, *args):
2780  r"""
2781  add_attribute(Direction self, FloatKey k, IMP::Float v, bool opt)
2782  add_attribute(Direction self, FloatKey a0, IMP::Float a1)
2783  add_attribute(Direction self, IntKey a0, IMP::Int a1)
2784  add_attribute(Direction self, FloatsKey a0, IMP::Floats a1)
2785  add_attribute(Direction self, IntsKey a0, IMP::Ints a1)
2786  add_attribute(Direction self, StringKey a0, IMP::String a1)
2787  add_attribute(Direction self, ParticleIndexKey a0, Particle a1)
2788  add_attribute(Direction self, ObjectKey a0, Object a1)
2789  add_attribute(Direction self, SparseFloatKey a0, IMP::Float a1)
2790  add_attribute(Direction self, SparseIntKey a0, IMP::Int a1)
2791  add_attribute(Direction self, SparseStringKey a0, IMP::String a1)
2792  add_attribute(Direction self, SparseParticleIndexKey a0, ParticleIndex a1)
2793  """
2794  return _IMP_core.Direction_add_attribute(self, *args)
2795 
2796  def get_value(self, *args):
2797  r"""
2798  get_value(Direction self, FloatKey a0) -> IMP::Float
2799  get_value(Direction self, IntKey a0) -> IMP::Int
2800  get_value(Direction self, FloatsKey a0) -> IMP::Floats
2801  get_value(Direction self, IntsKey a0) -> IMP::Ints
2802  get_value(Direction self, StringKey a0) -> IMP::String
2803  get_value(Direction self, ParticleIndexKey a0) -> Particle
2804  get_value(Direction self, ObjectKey a0) -> Object
2805  get_value(Direction self, SparseFloatKey a0) -> IMP::Float
2806  get_value(Direction self, SparseIntKey a0) -> IMP::Int
2807  get_value(Direction self, SparseStringKey a0) -> IMP::String
2808  get_value(Direction self, SparseParticleIndexKey a0) -> ParticleIndex
2809  """
2810  return _IMP_core.Direction_get_value(self, *args)
2811 
2812  def set_value(self, *args):
2813  r"""
2814  set_value(Direction self, FloatKey a0, IMP::Float a1)
2815  set_value(Direction self, IntKey a0, IMP::Int a1)
2816  set_value(Direction self, FloatsKey a0, IMP::Floats a1)
2817  set_value(Direction self, IntsKey a0, IMP::Ints a1)
2818  set_value(Direction self, StringKey a0, IMP::String a1)
2819  set_value(Direction self, ParticleIndexKey a0, Particle a1)
2820  set_value(Direction self, ObjectKey a0, Object a1)
2821  set_value(Direction self, SparseFloatKey a0, IMP::Float a1)
2822  set_value(Direction self, SparseIntKey a0, IMP::Int a1)
2823  set_value(Direction self, SparseStringKey a0, IMP::String a1)
2824  set_value(Direction self, SparseParticleIndexKey a0, ParticleIndex a1)
2825  """
2826  return _IMP_core.Direction_set_value(self, *args)
2827 
2828  def remove_attribute(self, *args):
2829  r"""
2830  remove_attribute(Direction self, FloatKey a0)
2831  remove_attribute(Direction self, IntKey a0)
2832  remove_attribute(Direction self, FloatsKey a0)
2833  remove_attribute(Direction self, IntsKey a0)
2834  remove_attribute(Direction self, StringKey a0)
2835  remove_attribute(Direction self, ParticleIndexKey a0)
2836  remove_attribute(Direction self, ObjectKey a0)
2837  remove_attribute(Direction self, SparseFloatKey a0)
2838  remove_attribute(Direction self, SparseIntKey a0)
2839  remove_attribute(Direction self, SparseStringKey a0)
2840  remove_attribute(Direction self, SparseParticleIndexKey a0)
2841  """
2842  return _IMP_core.Direction_remove_attribute(self, *args)
2843 
2844  def has_attribute(self, *args):
2845  r"""
2846  has_attribute(Direction self, FloatKey a0) -> bool
2847  has_attribute(Direction self, IntKey a0) -> bool
2848  has_attribute(Direction self, FloatsKey a0) -> bool
2849  has_attribute(Direction self, IntsKey a0) -> bool
2850  has_attribute(Direction self, StringKey a0) -> bool
2851  has_attribute(Direction self, ParticleIndexKey a0) -> bool
2852  has_attribute(Direction self, ObjectKey a0) -> bool
2853  has_attribute(Direction self, SparseFloatKey a0) -> bool
2854  has_attribute(Direction self, SparseIntKey a0) -> bool
2855  has_attribute(Direction self, SparseStringKey a0) -> bool
2856  has_attribute(Direction self, SparseParticleIndexKey a0) -> bool
2857  """
2858  return _IMP_core.Direction_has_attribute(self, *args)
2859 
2860  def get_derivative(self, a0):
2861  r"""get_derivative(Direction self, FloatKey a0) -> double"""
2862  return _IMP_core.Direction_get_derivative(self, a0)
2863 
2864  def get_name(self):
2865  r"""get_name(Direction self) -> std::string"""
2866  return _IMP_core.Direction_get_name(self)
2867 
2868  def clear_caches(self):
2869  r"""clear_caches(Direction self)"""
2870  return _IMP_core.Direction_clear_caches(self)
2871 
2872  def set_name(self, a0):
2873  r"""set_name(Direction self, std::string a0)"""
2874  return _IMP_core.Direction_set_name(self, a0)
2875 
2876  def set_check_level(self, a0):
2877  r"""set_check_level(Direction self, IMP::CheckLevel a0)"""
2878  return _IMP_core.Direction_set_check_level(self, a0)
2879 
2880  def add_to_derivative(self, a0, a1, a2):
2881  r"""add_to_derivative(Direction self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2882  return _IMP_core.Direction_add_to_derivative(self, a0, a1, a2)
2883 
2884  def set_is_optimized(self, a0, a1):
2885  r"""set_is_optimized(Direction self, FloatKey a0, bool a1)"""
2886  return _IMP_core.Direction_set_is_optimized(self, a0, a1)
2887 
2888  def get_is_optimized(self, a0):
2889  r"""get_is_optimized(Direction self, FloatKey a0) -> bool"""
2890  return _IMP_core.Direction_get_is_optimized(self, a0)
2891 
2892  def get_check_level(self):
2893  r"""get_check_level(Direction self) -> IMP::CheckLevel"""
2894  return _IMP_core.Direction_get_check_level(self)
2895 
2896  def __eq__(self, *args):
2897  r"""
2898  __eq__(Direction self, Direction o) -> bool
2899  __eq__(Direction self, Particle d) -> bool
2900  """
2901  return _IMP_core.Direction___eq__(self, *args)
2902 
2903  def __ne__(self, *args):
2904  r"""
2905  __ne__(Direction self, Direction o) -> bool
2906  __ne__(Direction self, Particle d) -> bool
2907  """
2908  return _IMP_core.Direction___ne__(self, *args)
2909 
2910  def __le__(self, *args):
2911  r"""
2912  __le__(Direction self, Direction o) -> bool
2913  __le__(Direction self, Particle d) -> bool
2914  """
2915  return _IMP_core.Direction___le__(self, *args)
2916 
2917  def __lt__(self, *args):
2918  r"""
2919  __lt__(Direction self, Direction o) -> bool
2920  __lt__(Direction self, Particle d) -> bool
2921  """
2922  return _IMP_core.Direction___lt__(self, *args)
2923 
2924  def __ge__(self, *args):
2925  r"""
2926  __ge__(Direction self, Direction o) -> bool
2927  __ge__(Direction self, Particle d) -> bool
2928  """
2929  return _IMP_core.Direction___ge__(self, *args)
2930 
2931  def __gt__(self, *args):
2932  r"""
2933  __gt__(Direction self, Direction o) -> bool
2934  __gt__(Direction self, Particle d) -> bool
2935  """
2936  return _IMP_core.Direction___gt__(self, *args)
2937 
2938  def __hash__(self):
2939  r"""__hash__(Direction self) -> std::size_t"""
2940  return _IMP_core.Direction___hash__(self)
2941 
2942  def __str__(self):
2943  r"""__str__(Direction self) -> std::string"""
2944  return _IMP_core.Direction___str__(self)
2945 
2946  def __repr__(self):
2947  r"""__repr__(Direction self) -> std::string"""
2948  return _IMP_core.Direction___repr__(self)
2949 
2950  def _get_as_binary(self):
2951  r"""_get_as_binary(Direction self) -> PyObject *"""
2952  return _IMP_core.Direction__get_as_binary(self)
2953 
2954  def _set_from_binary(self, p):
2955  r"""_set_from_binary(Direction self, PyObject * p)"""
2956  return _IMP_core.Direction__set_from_binary(self, p)
2957 
2958  def __getstate__(self):
2959  p = self._get_as_binary()
2960  if len(self.__dict__) > 1:
2961  d = self.__dict__.copy()
2962  del d['this']
2963  p = (d, p)
2964  return p
2965 
2966  def __setstate__(self, p):
2967  if not hasattr(self, 'this'):
2968  self.__init__()
2969  if isinstance(p, tuple):
2970  d, p = p
2971  self.__dict__.update(d)
2972  return self._set_from_binary(p)
2973 
2974  __swig_destroy__ = _IMP_core.delete_Direction
2975 
2976 # Register Direction in _IMP_core:
2977 _IMP_core.Direction_swigregister(Direction)
2978 
2979 def get_angle(a, b):
2980  r"""get_angle(Direction a, Direction b) -> double"""
2981  return _IMP_core.get_angle(a, b)
2982 class DirectionAngle(IMP.Decorator):
2983  r"""Proxy of C++ IMP::core::DirectionAngle class."""
2984 
2985  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2986 
2987  def __init__(self, *args):
2988  r"""
2989  __init__(DirectionAngle self) -> DirectionAngle
2990  __init__(DirectionAngle self, Model m, ParticleIndex id) -> DirectionAngle
2991  __init__(DirectionAngle self, _ParticleAdaptor d) -> DirectionAngle
2992  """
2993  _IMP_core.DirectionAngle_swiginit(self, _IMP_core.new_DirectionAngle(*args))
2994 
2995  def show(self, *args):
2996  r"""show(DirectionAngle self, _ostream out=std::cout)"""
2997  return _IMP_core.DirectionAngle_show(self, *args)
2998 
2999  @staticmethod
3000  def setup_particle(*args):
3001  r"""
3002  setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexPair ds) -> DirectionAngle
3003  setup_particle(_ParticleAdaptor pa, IMP::ParticleIndexPair ds) -> DirectionAngle
3004  setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor d0, _ParticleIndexAdaptor d1) -> DirectionAngle
3005  setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor d0, _ParticleIndexAdaptor d1) -> DirectionAngle
3006  """
3007  return _IMP_core.DirectionAngle_setup_particle(*args)
3008 
3009  @staticmethod
3010  def get_is_setup(*args):
3011  r"""
3012  get_is_setup(_ParticleAdaptor p) -> bool
3013  get_is_setup(Model m, ParticleIndex pi) -> bool
3014  """
3015  return _IMP_core.DirectionAngle_get_is_setup(*args)
3016 
3017  @staticmethod
3018  def get_angle_key():
3019  r"""get_angle_key() -> FloatKey"""
3020  return _IMP_core.DirectionAngle_get_angle_key()
3021 
3022  @staticmethod
3023  def get_particle_key(i):
3024  r"""get_particle_key(unsigned int i) -> ParticleIndexKey"""
3025  return _IMP_core.DirectionAngle_get_particle_key(i)
3026 
3027  def get_particle(self, *args):
3028  r"""
3029  get_particle(DirectionAngle self, unsigned int i) -> Particle
3030  get_particle(DirectionAngle self) -> Particle
3031  """
3032  return _IMP_core.DirectionAngle_get_particle(self, *args)
3033 
3034  def get_particle_index(self, *args):
3035  r"""
3036  get_particle_index(DirectionAngle self, unsigned int i) -> ParticleIndex
3037  get_particle_index(DirectionAngle self) -> ParticleIndex
3038  """
3039  return _IMP_core.DirectionAngle_get_particle_index(self, *args)
3040 
3041  def get_angle(self):
3042  r"""get_angle(DirectionAngle self) -> IMP::Float"""
3043  return _IMP_core.DirectionAngle_get_angle(self)
3044 
3045  def get_angle_derivative(self):
3046  r"""get_angle_derivative(DirectionAngle self) -> IMP::Float"""
3047  return _IMP_core.DirectionAngle_get_angle_derivative(self)
3048 
3049  def add_to_angle_derivative(self, v, d):
3050  r"""add_to_angle_derivative(DirectionAngle self, IMP::Float v, DerivativeAccumulator d)"""
3051  return _IMP_core.DirectionAngle_add_to_angle_derivative(self, v, d)
3052 
3053  def add_attribute(self, *args):
3054  r"""
3055  add_attribute(DirectionAngle self, FloatKey k, IMP::Float v, bool opt)
3056  add_attribute(DirectionAngle self, FloatKey a0, IMP::Float a1)
3057  add_attribute(DirectionAngle self, IntKey a0, IMP::Int a1)
3058  add_attribute(DirectionAngle self, FloatsKey a0, IMP::Floats a1)
3059  add_attribute(DirectionAngle self, IntsKey a0, IMP::Ints a1)
3060  add_attribute(DirectionAngle self, StringKey a0, IMP::String a1)
3061  add_attribute(DirectionAngle self, ParticleIndexKey a0, Particle a1)
3062  add_attribute(DirectionAngle self, ObjectKey a0, Object a1)
3063  add_attribute(DirectionAngle self, SparseFloatKey a0, IMP::Float a1)
3064  add_attribute(DirectionAngle self, SparseIntKey a0, IMP::Int a1)
3065  add_attribute(DirectionAngle self, SparseStringKey a0, IMP::String a1)
3066  add_attribute(DirectionAngle self, SparseParticleIndexKey a0, ParticleIndex a1)
3067  """
3068  return _IMP_core.DirectionAngle_add_attribute(self, *args)
3069 
3070  def get_value(self, *args):
3071  r"""
3072  get_value(DirectionAngle self, FloatKey a0) -> IMP::Float
3073  get_value(DirectionAngle self, IntKey a0) -> IMP::Int
3074  get_value(DirectionAngle self, FloatsKey a0) -> IMP::Floats
3075  get_value(DirectionAngle self, IntsKey a0) -> IMP::Ints
3076  get_value(DirectionAngle self, StringKey a0) -> IMP::String
3077  get_value(DirectionAngle self, ParticleIndexKey a0) -> Particle
3078  get_value(DirectionAngle self, ObjectKey a0) -> Object
3079  get_value(DirectionAngle self, SparseFloatKey a0) -> IMP::Float
3080  get_value(DirectionAngle self, SparseIntKey a0) -> IMP::Int
3081  get_value(DirectionAngle self, SparseStringKey a0) -> IMP::String
3082  get_value(DirectionAngle self, SparseParticleIndexKey a0) -> ParticleIndex
3083  """
3084  return _IMP_core.DirectionAngle_get_value(self, *args)
3085 
3086  def set_value(self, *args):
3087  r"""
3088  set_value(DirectionAngle self, FloatKey a0, IMP::Float a1)
3089  set_value(DirectionAngle self, IntKey a0, IMP::Int a1)
3090  set_value(DirectionAngle self, FloatsKey a0, IMP::Floats a1)
3091  set_value(DirectionAngle self, IntsKey a0, IMP::Ints a1)
3092  set_value(DirectionAngle self, StringKey a0, IMP::String a1)
3093  set_value(DirectionAngle self, ParticleIndexKey a0, Particle a1)
3094  set_value(DirectionAngle self, ObjectKey a0, Object a1)
3095  set_value(DirectionAngle self, SparseFloatKey a0, IMP::Float a1)
3096  set_value(DirectionAngle self, SparseIntKey a0, IMP::Int a1)
3097  set_value(DirectionAngle self, SparseStringKey a0, IMP::String a1)
3098  set_value(DirectionAngle self, SparseParticleIndexKey a0, ParticleIndex a1)
3099  """
3100  return _IMP_core.DirectionAngle_set_value(self, *args)
3101 
3102  def remove_attribute(self, *args):
3103  r"""
3104  remove_attribute(DirectionAngle self, FloatKey a0)
3105  remove_attribute(DirectionAngle self, IntKey a0)
3106  remove_attribute(DirectionAngle self, FloatsKey a0)
3107  remove_attribute(DirectionAngle self, IntsKey a0)
3108  remove_attribute(DirectionAngle self, StringKey a0)
3109  remove_attribute(DirectionAngle self, ParticleIndexKey a0)
3110  remove_attribute(DirectionAngle self, ObjectKey a0)
3111  remove_attribute(DirectionAngle self, SparseFloatKey a0)
3112  remove_attribute(DirectionAngle self, SparseIntKey a0)
3113  remove_attribute(DirectionAngle self, SparseStringKey a0)
3114  remove_attribute(DirectionAngle self, SparseParticleIndexKey a0)
3115  """
3116  return _IMP_core.DirectionAngle_remove_attribute(self, *args)
3117 
3118  def has_attribute(self, *args):
3119  r"""
3120  has_attribute(DirectionAngle self, FloatKey a0) -> bool
3121  has_attribute(DirectionAngle self, IntKey a0) -> bool
3122  has_attribute(DirectionAngle self, FloatsKey a0) -> bool
3123  has_attribute(DirectionAngle self, IntsKey a0) -> bool
3124  has_attribute(DirectionAngle self, StringKey a0) -> bool
3125  has_attribute(DirectionAngle self, ParticleIndexKey a0) -> bool
3126  has_attribute(DirectionAngle self, ObjectKey a0) -> bool
3127  has_attribute(DirectionAngle self, SparseFloatKey a0) -> bool
3128  has_attribute(DirectionAngle self, SparseIntKey a0) -> bool
3129  has_attribute(DirectionAngle self, SparseStringKey a0) -> bool
3130  has_attribute(DirectionAngle self, SparseParticleIndexKey a0) -> bool
3131  """
3132  return _IMP_core.DirectionAngle_has_attribute(self, *args)
3133 
3134  def get_derivative(self, a0):
3135  r"""get_derivative(DirectionAngle self, FloatKey a0) -> double"""
3136  return _IMP_core.DirectionAngle_get_derivative(self, a0)
3137 
3138  def get_name(self):
3139  r"""get_name(DirectionAngle self) -> std::string"""
3140  return _IMP_core.DirectionAngle_get_name(self)
3141 
3142  def clear_caches(self):
3143  r"""clear_caches(DirectionAngle self)"""
3144  return _IMP_core.DirectionAngle_clear_caches(self)
3145 
3146  def set_name(self, a0):
3147  r"""set_name(DirectionAngle self, std::string a0)"""
3148  return _IMP_core.DirectionAngle_set_name(self, a0)
3149 
3150  def set_check_level(self, a0):
3151  r"""set_check_level(DirectionAngle self, IMP::CheckLevel a0)"""
3152  return _IMP_core.DirectionAngle_set_check_level(self, a0)
3153 
3154  def add_to_derivative(self, a0, a1, a2):
3155  r"""add_to_derivative(DirectionAngle self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
3156  return _IMP_core.DirectionAngle_add_to_derivative(self, a0, a1, a2)
3157 
3158  def set_is_optimized(self, a0, a1):
3159  r"""set_is_optimized(DirectionAngle self, FloatKey a0, bool a1)"""
3160  return _IMP_core.DirectionAngle_set_is_optimized(self, a0, a1)
3161 
3162  def get_is_optimized(self, a0):
3163  r"""get_is_optimized(DirectionAngle self, FloatKey a0) -> bool"""
3164  return _IMP_core.DirectionAngle_get_is_optimized(self, a0)
3165 
3166  def get_check_level(self):
3167  r"""get_check_level(DirectionAngle self) -> IMP::CheckLevel"""
3168  return _IMP_core.DirectionAngle_get_check_level(self)
3169 
3170  def __eq__(self, *args):
3171  r"""
3172  __eq__(DirectionAngle self, DirectionAngle o) -> bool
3173  __eq__(DirectionAngle self, Particle d) -> bool
3174  """
3175  return _IMP_core.DirectionAngle___eq__(self, *args)
3176 
3177  def __ne__(self, *args):
3178  r"""
3179  __ne__(DirectionAngle self, DirectionAngle o) -> bool
3180  __ne__(DirectionAngle self, Particle d) -> bool
3181  """
3182  return _IMP_core.DirectionAngle___ne__(self, *args)
3183 
3184  def __le__(self, *args):
3185  r"""
3186  __le__(DirectionAngle self, DirectionAngle o) -> bool
3187  __le__(DirectionAngle self, Particle d) -> bool
3188  """
3189  return _IMP_core.DirectionAngle___le__(self, *args)
3190 
3191  def __lt__(self, *args):
3192  r"""
3193  __lt__(DirectionAngle self, DirectionAngle o) -> bool
3194  __lt__(DirectionAngle self, Particle d) -> bool
3195  """
3196  return _IMP_core.DirectionAngle___lt__(self, *args)
3197 
3198  def __ge__(self, *args):
3199  r"""
3200  __ge__(DirectionAngle self, DirectionAngle o) -> bool
3201  __ge__(DirectionAngle self, Particle d) -> bool
3202  """
3203  return _IMP_core.DirectionAngle___ge__(self, *args)
3204 
3205  def __gt__(self, *args):
3206  r"""
3207  __gt__(DirectionAngle self, DirectionAngle o) -> bool
3208  __gt__(DirectionAngle self, Particle d) -> bool
3209  """
3210  return _IMP_core.DirectionAngle___gt__(self, *args)
3211 
3212  def __hash__(self):
3213  r"""__hash__(DirectionAngle self) -> std::size_t"""
3214  return _IMP_core.DirectionAngle___hash__(self)
3215 
3216  def __str__(self):
3217  r"""__str__(DirectionAngle self) -> std::string"""
3218  return _IMP_core.DirectionAngle___str__(self)
3219 
3220  def __repr__(self):
3221  r"""__repr__(DirectionAngle self) -> std::string"""
3222  return _IMP_core.DirectionAngle___repr__(self)
3223 
3224  def _get_as_binary(self):
3225  r"""_get_as_binary(DirectionAngle self) -> PyObject *"""
3226  return _IMP_core.DirectionAngle__get_as_binary(self)
3227 
3228  def _set_from_binary(self, p):
3229  r"""_set_from_binary(DirectionAngle self, PyObject * p)"""
3230  return _IMP_core.DirectionAngle__set_from_binary(self, p)
3231 
3232  def __getstate__(self):
3233  p = self._get_as_binary()
3234  if len(self.__dict__) > 1:
3235  d = self.__dict__.copy()
3236  del d['this']
3237  p = (d, p)
3238  return p
3239 
3240  def __setstate__(self, p):
3241  if not hasattr(self, 'this'):
3242  self.__init__()
3243  if isinstance(p, tuple):
3244  d, p = p
3245  self.__dict__.update(d)
3246  return self._set_from_binary(p)
3247 
3248  __swig_destroy__ = _IMP_core.delete_DirectionAngle
3249 
3250 # Register DirectionAngle in _IMP_core:
3251 _IMP_core.DirectionAngle_swigregister(DirectionAngle)
3252 class Surface(XYZ):
3253  r"""Proxy of C++ IMP::core::Surface class."""
3254 
3255  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3256 
3257  @staticmethod
3258  def do_setup_particle(*args):
3259  r"""
3260  do_setup_particle(Model m, ParticleIndex pi, Vector3D center=IMP::Vector3D(0, 0, 0), Vector3D normal=IMP::Vector3D(0, 0, 1))
3261  do_setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf)
3262  """
3263  return _IMP_core.Surface_do_setup_particle(*args)
3264 
3265  def __init__(self, *args):
3266  r"""
3267  __init__(Surface self) -> Surface
3268  __init__(Surface self, Model m, ParticleIndex id) -> Surface
3269  __init__(Surface self, _ParticleAdaptor d) -> Surface
3270  """
3271  _IMP_core.Surface_swiginit(self, _IMP_core.new_Surface(*args))
3272 
3273  def show(self, *args):
3274  r"""show(Surface self, _ostream out=std::cout)"""
3275  return _IMP_core.Surface_show(self, *args)
3276 
3277  @staticmethod
3278  def setup_particle(*args):
3279  r"""
3280  setup_particle(Model m, ParticleIndex pi) -> Surface
3281  setup_particle(_ParticleAdaptor pa) -> Surface
3282  setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> Surface
3283  setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> Surface
3284  setup_particle(Model m, ParticleIndex pi, Vector3D center) -> Surface
3285  setup_particle(_ParticleAdaptor pa, Vector3D center) -> Surface
3286  setup_particle(Model m, ParticleIndex pi, Vector3D center, Vector3D normal) -> Surface
3287  setup_particle(_ParticleAdaptor pa, Vector3D center, Vector3D normal) -> Surface
3288  """
3289  return _IMP_core.Surface_setup_particle(*args)
3290 
3291  def get_normal_x(self):
3292  r"""get_normal_x(Surface self) -> IMP::Float"""
3293  return _IMP_core.Surface_get_normal_x(self)
3294 
3295  def set_normal_x(self, t):
3296  r"""set_normal_x(Surface self, IMP::Float t)"""
3297  return _IMP_core.Surface_set_normal_x(self, t)
3298 
3299  def get_normal_y(self):
3300  r"""get_normal_y(Surface self) -> IMP::Float"""
3301  return _IMP_core.Surface_get_normal_y(self)
3302 
3303  def set_normal_y(self, t):
3304  r"""set_normal_y(Surface self, IMP::Float t)"""
3305  return _IMP_core.Surface_set_normal_y(self, t)
3306 
3307  def get_normal_z(self):
3308  r"""get_normal_z(Surface self) -> IMP::Float"""
3309  return _IMP_core.Surface_get_normal_z(self)
3310 
3311  def set_normal_z(self, t):
3312  r"""set_normal_z(Surface self, IMP::Float t)"""
3313  return _IMP_core.Surface_set_normal_z(self, t)
3314 
3315  @staticmethod
3316  def get_is_setup(*args):
3317  r"""
3318  get_is_setup(_ParticleAdaptor p) -> bool
3319  get_is_setup(Model m, ParticleIndex pi) -> bool
3320  """
3321  return _IMP_core.Surface_get_is_setup(*args)
3322 
3323  @staticmethod
3324  def get_normal_key(i):
3325  r"""get_normal_key(unsigned int i) -> FloatKey"""
3326  return _IMP_core.Surface_get_normal_key(i)
3327 
3328  def get_normal_derivative(self, i):
3329  r"""get_normal_derivative(Surface self, int i) -> IMP::Float"""
3330  return _IMP_core.Surface_get_normal_derivative(self, i)
3331 
3332  def get_normal_derivatives(self):
3333  r"""get_normal_derivatives(Surface self) -> Vector3D"""
3334  return _IMP_core.Surface_get_normal_derivatives(self)
3335 
3336  def add_to_normal_derivative(self, i, v, d):
3337  r"""add_to_normal_derivative(Surface self, int i, IMP::Float v, DerivativeAccumulator d)"""
3338  return _IMP_core.Surface_add_to_normal_derivative(self, i, v, d)
3339 
3340  def add_to_normal_derivatives(self, v, d):
3341  r"""add_to_normal_derivatives(Surface self, Vector3D v, DerivativeAccumulator d)"""
3342  return _IMP_core.Surface_add_to_normal_derivatives(self, v, d)
3343 
3344  def get_normal_is_optimized(self):
3345  r"""get_normal_is_optimized(Surface self) -> bool"""
3346  return _IMP_core.Surface_get_normal_is_optimized(self)
3347 
3348  def set_normal_is_optimized(self, tf):
3349  r"""set_normal_is_optimized(Surface self, bool tf)"""
3350  return _IMP_core.Surface_set_normal_is_optimized(self, tf)
3351 
3352  def get_normal(self):
3353  r"""get_normal(Surface self) -> Vector3D"""
3354  return _IMP_core.Surface_get_normal(self)
3355 
3356  def set_normal(self, normal):
3357  r"""set_normal(Surface self, Vector3D normal)"""
3358  return _IMP_core.Surface_set_normal(self, normal)
3359 
3360  def reflect(self):
3361  r"""reflect(Surface self)"""
3362  return _IMP_core.Surface_reflect(self)
3363 
3364  def get_height(self, v):
3365  r"""get_height(Surface self, Vector3D v) -> double"""
3366  return _IMP_core.Surface_get_height(self, v)
3367 
3368  def get_depth(self, v):
3369  r"""get_depth(Surface self, Vector3D v) -> double"""
3370  return _IMP_core.Surface_get_depth(self, v)
3371 
3372  def get_distance_to(self, v):
3373  r"""get_distance_to(Surface self, Vector3D v) -> double"""
3374  return _IMP_core.Surface_get_distance_to(self, v)
3375 
3376  def get_distance_to_center(self, v):
3377  r"""get_distance_to_center(Surface self, Vector3D v) -> double"""
3378  return _IMP_core.Surface_get_distance_to_center(self, v)
3379 
3380  def set_reference_frame(self, rf):
3381  r"""set_reference_frame(Surface self, ReferenceFrame3D rf)"""
3382  return _IMP_core.Surface_set_reference_frame(self, rf)
3383 
3384  def get_reference_frame(self):
3385  r"""get_reference_frame(Surface self) -> ReferenceFrame3D"""
3386  return _IMP_core.Surface_get_reference_frame(self)
3387 
3388  def get_plane(self):
3389  r"""get_plane(Surface self) -> Plane3D"""
3390  return _IMP_core.Surface_get_plane(self)
3391 
3392  def add_attribute(self, *args):
3393  r"""
3394  add_attribute(Surface self, FloatKey k, IMP::Float v, bool opt)
3395  add_attribute(Surface self, FloatKey a0, IMP::Float a1)
3396  add_attribute(Surface self, IntKey a0, IMP::Int a1)
3397  add_attribute(Surface self, FloatsKey a0, IMP::Floats a1)
3398  add_attribute(Surface self, IntsKey a0, IMP::Ints a1)
3399  add_attribute(Surface self, StringKey a0, IMP::String a1)
3400  add_attribute(Surface self, ParticleIndexKey a0, Particle a1)
3401  add_attribute(Surface self, ObjectKey a0, Object a1)
3402  add_attribute(Surface self, SparseFloatKey a0, IMP::Float a1)
3403  add_attribute(Surface self, SparseIntKey a0, IMP::Int a1)
3404  add_attribute(Surface self, SparseStringKey a0, IMP::String a1)
3405  add_attribute(Surface self, SparseParticleIndexKey a0, ParticleIndex a1)
3406  """
3407  return _IMP_core.Surface_add_attribute(self, *args)
3408 
3409  def get_value(self, *args):
3410  r"""
3411  get_value(Surface self, FloatKey a0) -> IMP::Float
3412  get_value(Surface self, IntKey a0) -> IMP::Int
3413  get_value(Surface self, FloatsKey a0) -> IMP::Floats
3414  get_value(Surface self, IntsKey a0) -> IMP::Ints
3415  get_value(Surface self, StringKey a0) -> IMP::String
3416  get_value(Surface self, ParticleIndexKey a0) -> Particle
3417  get_value(Surface self, ObjectKey a0) -> Object
3418  get_value(Surface self, SparseFloatKey a0) -> IMP::Float
3419  get_value(Surface self, SparseIntKey a0) -> IMP::Int
3420  get_value(Surface self, SparseStringKey a0) -> IMP::String
3421  get_value(Surface self, SparseParticleIndexKey a0) -> ParticleIndex
3422  """
3423  return _IMP_core.Surface_get_value(self, *args)
3424 
3425  def set_value(self, *args):
3426  r"""
3427  set_value(Surface self, FloatKey a0, IMP::Float a1)
3428  set_value(Surface self, IntKey a0, IMP::Int a1)
3429  set_value(Surface self, FloatsKey a0, IMP::Floats a1)
3430  set_value(Surface self, IntsKey a0, IMP::Ints a1)
3431  set_value(Surface self, StringKey a0, IMP::String a1)
3432  set_value(Surface self, ParticleIndexKey a0, Particle a1)
3433  set_value(Surface self, ObjectKey a0, Object a1)
3434  set_value(Surface self, SparseFloatKey a0, IMP::Float a1)
3435  set_value(Surface self, SparseIntKey a0, IMP::Int a1)
3436  set_value(Surface self, SparseStringKey a0, IMP::String a1)
3437  set_value(Surface self, SparseParticleIndexKey a0, ParticleIndex a1)
3438  """
3439  return _IMP_core.Surface_set_value(self, *args)
3440 
3441  def remove_attribute(self, *args):
3442  r"""
3443  remove_attribute(Surface self, FloatKey a0)
3444  remove_attribute(Surface self, IntKey a0)
3445  remove_attribute(Surface self, FloatsKey a0)
3446  remove_attribute(Surface self, IntsKey a0)
3447  remove_attribute(Surface self, StringKey a0)
3448  remove_attribute(Surface self, ParticleIndexKey a0)
3449  remove_attribute(Surface self, ObjectKey a0)
3450  remove_attribute(Surface self, SparseFloatKey a0)
3451  remove_attribute(Surface self, SparseIntKey a0)
3452  remove_attribute(Surface self, SparseStringKey a0)
3453  remove_attribute(Surface self, SparseParticleIndexKey a0)
3454  """
3455  return _IMP_core.Surface_remove_attribute(self, *args)
3456 
3457  def has_attribute(self, *args):
3458  r"""
3459  has_attribute(Surface self, FloatKey a0) -> bool
3460  has_attribute(Surface self, IntKey a0) -> bool
3461  has_attribute(Surface self, FloatsKey a0) -> bool
3462  has_attribute(Surface self, IntsKey a0) -> bool
3463  has_attribute(Surface self, StringKey a0) -> bool
3464  has_attribute(Surface self, ParticleIndexKey a0) -> bool
3465  has_attribute(Surface self, ObjectKey a0) -> bool
3466  has_attribute(Surface self, SparseFloatKey a0) -> bool
3467  has_attribute(Surface self, SparseIntKey a0) -> bool
3468  has_attribute(Surface self, SparseStringKey a0) -> bool
3469  has_attribute(Surface self, SparseParticleIndexKey a0) -> bool
3470  """
3471  return _IMP_core.Surface_has_attribute(self, *args)
3472 
3473  def get_derivative(self, a0):
3474  r"""get_derivative(Surface self, FloatKey a0) -> double"""
3475  return _IMP_core.Surface_get_derivative(self, a0)
3476 
3477  def get_name(self):
3478  r"""get_name(Surface self) -> std::string"""
3479  return _IMP_core.Surface_get_name(self)
3480 
3481  def clear_caches(self):
3482  r"""clear_caches(Surface self)"""
3483  return _IMP_core.Surface_clear_caches(self)
3484 
3485  def set_name(self, a0):
3486  r"""set_name(Surface self, std::string a0)"""
3487  return _IMP_core.Surface_set_name(self, a0)
3488 
3489  def set_check_level(self, a0):
3490  r"""set_check_level(Surface self, IMP::CheckLevel a0)"""
3491  return _IMP_core.Surface_set_check_level(self, a0)
3492 
3493  def add_to_derivative(self, a0, a1, a2):
3494  r"""add_to_derivative(Surface self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
3495  return _IMP_core.Surface_add_to_derivative(self, a0, a1, a2)
3496 
3497  def set_is_optimized(self, a0, a1):
3498  r"""set_is_optimized(Surface self, FloatKey a0, bool a1)"""
3499  return _IMP_core.Surface_set_is_optimized(self, a0, a1)
3500 
3501  def get_is_optimized(self, a0):
3502  r"""get_is_optimized(Surface self, FloatKey a0) -> bool"""
3503  return _IMP_core.Surface_get_is_optimized(self, a0)
3504 
3505  def get_check_level(self):
3506  r"""get_check_level(Surface self) -> IMP::CheckLevel"""
3507  return _IMP_core.Surface_get_check_level(self)
3508 
3509  def __eq__(self, *args):
3510  r"""
3511  __eq__(Surface self, Surface o) -> bool
3512  __eq__(Surface self, Particle d) -> bool
3513  """
3514  return _IMP_core.Surface___eq__(self, *args)
3515 
3516  def __ne__(self, *args):
3517  r"""
3518  __ne__(Surface self, Surface o) -> bool
3519  __ne__(Surface self, Particle d) -> bool
3520  """
3521  return _IMP_core.Surface___ne__(self, *args)
3522 
3523  def __le__(self, *args):
3524  r"""
3525  __le__(Surface self, Surface o) -> bool
3526  __le__(Surface self, Particle d) -> bool
3527  """
3528  return _IMP_core.Surface___le__(self, *args)
3529 
3530  def __lt__(self, *args):
3531  r"""
3532  __lt__(Surface self, Surface o) -> bool
3533  __lt__(Surface self, Particle d) -> bool
3534  """
3535  return _IMP_core.Surface___lt__(self, *args)
3536 
3537  def __ge__(self, *args):
3538  r"""
3539  __ge__(Surface self, Surface o) -> bool
3540  __ge__(Surface self, Particle d) -> bool
3541  """
3542  return _IMP_core.Surface___ge__(self, *args)
3543 
3544  def __gt__(self, *args):
3545  r"""
3546  __gt__(Surface self, Surface o) -> bool
3547  __gt__(Surface self, Particle d) -> bool
3548  """
3549  return _IMP_core.Surface___gt__(self, *args)
3550 
3551  def __hash__(self):
3552  r"""__hash__(Surface self) -> std::size_t"""
3553  return _IMP_core.Surface___hash__(self)
3554 
3555  def __str__(self):
3556  r"""__str__(Surface self) -> std::string"""
3557  return _IMP_core.Surface___str__(self)
3558 
3559  def __repr__(self):
3560  r"""__repr__(Surface self) -> std::string"""
3561  return _IMP_core.Surface___repr__(self)
3562 
3563  def _get_as_binary(self):
3564  r"""_get_as_binary(Surface self) -> PyObject *"""
3565  return _IMP_core.Surface__get_as_binary(self)
3566 
3567  def _set_from_binary(self, p):
3568  r"""_set_from_binary(Surface self, PyObject * p)"""
3569  return _IMP_core.Surface__set_from_binary(self, p)
3570 
3571  def __getstate__(self):
3572  p = self._get_as_binary()
3573  if len(self.__dict__) > 1:
3574  d = self.__dict__.copy()
3575  del d['this']
3576  p = (d, p)
3577  return p
3578 
3579  def __setstate__(self, p):
3580  if not hasattr(self, 'this'):
3581  self.__init__()
3582  if isinstance(p, tuple):
3583  d, p = p
3584  self.__dict__.update(d)
3585  return self._set_from_binary(p)
3586 
3587  __swig_destroy__ = _IMP_core.delete_Surface
3588 
3589 # Register Surface in _IMP_core:
3590 _IMP_core.Surface_swigregister(Surface)
3591 
3592 def get_height(*args):
3593  r"""
3594  get_height(Surface s, XYZR d) -> double
3595  get_height(Surface s, XYZ d) -> double
3596  """
3597  return _IMP_core.get_height(*args)
3598 
3599 def get_depth(*args):
3600  r"""
3601  get_depth(Surface s, XYZR d) -> double
3602  get_depth(Surface s, XYZ d) -> double
3603  """
3604  return _IMP_core.get_depth(*args)
3605 
3606 def get_distance(*args):
3607  r"""
3608  get_distance(XYZ a, XYZ b) -> double
3609  get_distance(XYZR a, XYZR b) -> double
3610  get_distance(Surface s, XYZR d) -> double
3611  get_distance(Surface s, XYZ d) -> double
3612  """
3613  return _IMP_core.get_distance(*args)
3614 class SurfaceGeometry(IMP.display.Geometry):
3615  r"""Proxy of C++ IMP::core::SurfaceGeometry class."""
3616 
3617  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3618 
3619  def __init__(self, *args):
3620  r"""
3621  __init__(SurfaceGeometry self, std::string n="SurfaceGeometry") -> SurfaceGeometry
3622  __init__(SurfaceGeometry self, Surface s, std::string const n="SurfaceGeometry") -> SurfaceGeometry
3623  __init__(SurfaceGeometry self, Surface s, Color c, std::string n="SurfaceGeometry") -> SurfaceGeometry
3624  """
3625  _IMP_core.SurfaceGeometry_swiginit(self, _IMP_core.new_SurfaceGeometry(*args))
3626 
3627  def get_geometry(self):
3628  r"""get_geometry(SurfaceGeometry self) -> Surface"""
3629  return _IMP_core.SurfaceGeometry_get_geometry(self)
3630 
3631  def set_geometry(self, s):
3632  r"""set_geometry(SurfaceGeometry self, Surface s)"""
3633  return _IMP_core.SurfaceGeometry_set_geometry(self, s)
3634 
3635  def get_version_info(self):
3636  r"""get_version_info(SurfaceGeometry self) -> VersionInfo"""
3637  return _IMP_core.SurfaceGeometry_get_version_info(self)
3638  __swig_destroy__ = _IMP_core.delete_SurfaceGeometry
3639 
3640  def __str__(self):
3641  r"""__str__(SurfaceGeometry self) -> std::string"""
3642  return _IMP_core.SurfaceGeometry___str__(self)
3643 
3644  def __repr__(self):
3645  r"""__repr__(SurfaceGeometry self) -> std::string"""
3646  return _IMP_core.SurfaceGeometry___repr__(self)
3647 
3648  @staticmethod
3649  def get_from(o):
3650  return _object_cast_to_SurfaceGeometry(o)
3651 
3652 
3653 # Register SurfaceGeometry in _IMP_core:
3654 _IMP_core.SurfaceGeometry_swigregister(SurfaceGeometry)
3655 
3656 def create_geometry(*args):
3657  r"""create_geometry(Surface s, std::string name=std::string("SurfaceGeometry%1%")) -> SurfaceGeometry"""
3658  return _IMP_core.create_geometry(*args)
3659 class SurfaceGeometryConstraint(IMP.Constraint):
3660  r"""Proxy of C++ IMP::core::SurfaceGeometryConstraint class."""
3661 
3662  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3663 
3664  def __init__(self, s, g):
3665  r"""__init__(SurfaceGeometryConstraint self, Surface s, SurfaceGeometry g) -> SurfaceGeometryConstraint"""
3666  _IMP_core.SurfaceGeometryConstraint_swiginit(self, _IMP_core.new_SurfaceGeometryConstraint(s, g))
3667 
3668  def get_surface(self):
3669  r"""get_surface(SurfaceGeometryConstraint self) -> Surface"""
3670  return _IMP_core.SurfaceGeometryConstraint_get_surface(self)
3671 
3672  def get_geometry(self):
3673  r"""get_geometry(SurfaceGeometryConstraint self) -> SurfaceGeometry"""
3674  return _IMP_core.SurfaceGeometryConstraint_get_geometry(self)
3675 
3676  def do_get_inputs(self):
3677  r"""do_get_inputs(SurfaceGeometryConstraint self) -> IMP::ModelObjectsTemp"""
3678  return _IMP_core.SurfaceGeometryConstraint_do_get_inputs(self)
3679 
3680  def do_get_outputs(self):
3681  r"""do_get_outputs(SurfaceGeometryConstraint self) -> IMP::ModelObjectsTemp"""
3682  return _IMP_core.SurfaceGeometryConstraint_do_get_outputs(self)
3683 
3684  def get_version_info(self):
3685  r"""get_version_info(SurfaceGeometryConstraint self) -> VersionInfo"""
3686  return _IMP_core.SurfaceGeometryConstraint_get_version_info(self)
3687  __swig_destroy__ = _IMP_core.delete_SurfaceGeometryConstraint
3688 
3689  def __str__(self):
3690  r"""__str__(SurfaceGeometryConstraint self) -> std::string"""
3691  return _IMP_core.SurfaceGeometryConstraint___str__(self)
3692 
3693  def __repr__(self):
3694  r"""__repr__(SurfaceGeometryConstraint self) -> std::string"""
3695  return _IMP_core.SurfaceGeometryConstraint___repr__(self)
3696 
3697  @staticmethod
3698  def get_from(o):
3699  return _object_cast_to_SurfaceGeometryConstraint(o)
3700 
3701 
3702 # Register SurfaceGeometryConstraint in _IMP_core:
3703 _IMP_core.SurfaceGeometryConstraint_swigregister(SurfaceGeometryConstraint)
3704 
3706  r"""get_constrained_surface_geometry(Surface s, std::string name="SurfaceGeometry%1%") -> SurfaceGeometry"""
3707  return _IMP_core.get_constrained_surface_geometry(*args)
3708 class LateralSurfaceConstraint(IMP.Constraint):
3709  r"""Proxy of C++ IMP::core::LateralSurfaceConstraint class."""
3710 
3711  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3712 
3713  def __init__(self, s, d):
3714  r"""__init__(LateralSurfaceConstraint self, Surface s, XYZ d) -> LateralSurfaceConstraint"""
3715  _IMP_core.LateralSurfaceConstraint_swiginit(self, _IMP_core.new_LateralSurfaceConstraint(s, d))
3716 
3717  def do_get_inputs(self):
3718  r"""do_get_inputs(LateralSurfaceConstraint self) -> IMP::ModelObjectsTemp"""
3719  return _IMP_core.LateralSurfaceConstraint_do_get_inputs(self)
3720 
3721  def do_get_outputs(self):
3722  r"""do_get_outputs(LateralSurfaceConstraint self) -> IMP::ModelObjectsTemp"""
3723  return _IMP_core.LateralSurfaceConstraint_do_get_outputs(self)
3724 
3725  def get_version_info(self):
3726  r"""get_version_info(LateralSurfaceConstraint self) -> VersionInfo"""
3727  return _IMP_core.LateralSurfaceConstraint_get_version_info(self)
3728  __swig_destroy__ = _IMP_core.delete_LateralSurfaceConstraint
3729 
3730  def __str__(self):
3731  r"""__str__(LateralSurfaceConstraint self) -> std::string"""
3732  return _IMP_core.LateralSurfaceConstraint___str__(self)
3733 
3734  def __repr__(self):
3735  r"""__repr__(LateralSurfaceConstraint self) -> std::string"""
3736  return _IMP_core.LateralSurfaceConstraint___repr__(self)
3737 
3738  @staticmethod
3739  def get_from(o):
3740  return _object_cast_to_LateralSurfaceConstraint(o)
3741 
3742 
3743 # Register LateralSurfaceConstraint in _IMP_core:
3744 _IMP_core.LateralSurfaceConstraint_swigregister(LateralSurfaceConstraint)
3745 class AngleTripletScore(IMP.TripletScore):
3746  r"""Proxy of C++ IMP::core::AngleTripletScore class."""
3747 
3748  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3749 
3750  def __init__(self, *args):
3751  r"""
3752  __init__(AngleTripletScore self, UnaryFunction f) -> AngleTripletScore
3753  __init__(AngleTripletScore self) -> AngleTripletScore
3754  """
3755  _IMP_core.AngleTripletScore_swiginit(self, _IMP_core.new_AngleTripletScore(*args))
3756 
3757  def do_get_inputs(self, m, pis):
3758  r"""do_get_inputs(AngleTripletScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3759  return _IMP_core.AngleTripletScore_do_get_inputs(self, m, pis)
3760 
3761  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
3762  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"""
3763  return _IMP_core.AngleTripletScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
3764 
3765  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
3766  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"""
3767  return _IMP_core.AngleTripletScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
3768 
3769  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
3770  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"""
3771  return _IMP_core.AngleTripletScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
3772 
3773  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
3774  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"""
3775  return _IMP_core.AngleTripletScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
3776 
3777  def get_version_info(self):
3778  r"""get_version_info(AngleTripletScore self) -> VersionInfo"""
3779  return _IMP_core.AngleTripletScore_get_version_info(self)
3780  __swig_destroy__ = _IMP_core.delete_AngleTripletScore
3781 
3782  def __str__(self):
3783  r"""__str__(AngleTripletScore self) -> std::string"""
3784  return _IMP_core.AngleTripletScore___str__(self)
3785 
3786  def __repr__(self):
3787  r"""__repr__(AngleTripletScore self) -> std::string"""
3788  return _IMP_core.AngleTripletScore___repr__(self)
3789 
3790  @staticmethod
3791  def get_from(o):
3792  return _object_cast_to_AngleTripletScore(o)
3793 
3794 
3795  def _get_as_binary(self):
3796  r"""_get_as_binary(AngleTripletScore self) -> PyObject *"""
3797  return _IMP_core.AngleTripletScore__get_as_binary(self)
3798 
3799  def _set_from_binary(self, p):
3800  r"""_set_from_binary(AngleTripletScore self, PyObject * p)"""
3801  return _IMP_core.AngleTripletScore__set_from_binary(self, p)
3802 
3803  def __getstate__(self):
3804  p = self._get_as_binary()
3805  if len(self.__dict__) > 1:
3806  d = self.__dict__.copy()
3807  del d['this']
3808  p = (d, p)
3809  return p
3810 
3811  def __setstate__(self, p):
3812  if not hasattr(self, 'this'):
3813  self.__init__()
3814  if isinstance(p, tuple):
3815  d, p = p
3816  self.__dict__.update(d)
3817  return self._set_from_binary(p)
3818 
3819 
3820 # Register AngleTripletScore in _IMP_core:
3821 _IMP_core.AngleTripletScore_swigregister(AngleTripletScore)
3822 class DihedralQuadScore(IMP.QuadScore):
3823  r"""Proxy of C++ IMP::core::DihedralQuadScore class."""
3824 
3825  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3826 
3827  def __init__(self, *args):
3828  r"""
3829  __init__(DihedralQuadScore self, UnaryFunction f) -> DihedralQuadScore
3830  __init__(DihedralQuadScore self) -> DihedralQuadScore
3831  """
3832  _IMP_core.DihedralQuadScore_swiginit(self, _IMP_core.new_DihedralQuadScore(*args))
3833 
3834  def do_get_inputs(self, m, pis):
3835  r"""do_get_inputs(DihedralQuadScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3836  return _IMP_core.DihedralQuadScore_do_get_inputs(self, m, pis)
3837 
3838  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
3839  r"""evaluate_indexes(DihedralQuadScore self, Model m, IMP::ParticleIndexQuads const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
3840  return _IMP_core.DihedralQuadScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
3841 
3842  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
3843  r"""evaluate_indexes_scores(DihedralQuadScore self, Model m, IMP::ParticleIndexQuads const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
3844  return _IMP_core.DihedralQuadScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
3845 
3846  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
3847  r"""evaluate_indexes_delta(DihedralQuadScore self, Model m, IMP::ParticleIndexQuads const & p, DerivativeAccumulator da, std::vector< unsigned int,std::allocator< unsigned int > > const & indexes, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
3848  return _IMP_core.DihedralQuadScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
3849 
3850  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
3851  r"""evaluate_if_good_indexes(DihedralQuadScore self, Model m, IMP::ParticleIndexQuads const & p, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
3852  return _IMP_core.DihedralQuadScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
3853 
3854  def get_version_info(self):
3855  r"""get_version_info(DihedralQuadScore self) -> VersionInfo"""
3856  return _IMP_core.DihedralQuadScore_get_version_info(self)
3857  __swig_destroy__ = _IMP_core.delete_DihedralQuadScore
3858 
3859  def __str__(self):
3860  r"""__str__(DihedralQuadScore self) -> std::string"""
3861  return _IMP_core.DihedralQuadScore___str__(self)
3862 
3863  def __repr__(self):
3864  r"""__repr__(DihedralQuadScore self) -> std::string"""
3865  return _IMP_core.DihedralQuadScore___repr__(self)
3866 
3867  @staticmethod
3868  def get_from(o):
3869  return _object_cast_to_DihedralQuadScore(o)
3870 
3871 
3872  def _get_as_binary(self):
3873  r"""_get_as_binary(DihedralQuadScore self) -> PyObject *"""
3874  return _IMP_core.DihedralQuadScore__get_as_binary(self)
3875 
3876  def _set_from_binary(self, p):
3877  r"""_set_from_binary(DihedralQuadScore self, PyObject * p)"""
3878  return _IMP_core.DihedralQuadScore__set_from_binary(self, p)
3879 
3880  def __getstate__(self):
3881  p = self._get_as_binary()
3882  if len(self.__dict__) > 1:
3883  d = self.__dict__.copy()
3884  del d['this']
3885  p = (d, p)
3886  return p
3887 
3888  def __setstate__(self, p):
3889  if not hasattr(self, 'this'):
3890  self.__init__()
3891  if isinstance(p, tuple):
3892  d, p = p
3893  self.__dict__.update(d)
3894  return self._set_from_binary(p)
3895 
3896 
3897 # Register DihedralQuadScore in _IMP_core:
3898 _IMP_core.DihedralQuadScore_swigregister(DihedralQuadScore)
3899 class BallMover(MonteCarloMover):
3900  r"""Proxy of C++ IMP::core::BallMover class."""
3901 
3902  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3903 
3904  def __init__(self, *args):
3905  r"""
3906  __init__(BallMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double radius) -> BallMover
3907  __init__(BallMover self, Model m, ParticleIndex pi, double radius) -> BallMover
3908  __init__(BallMover self, Model m, IMP::ParticleIndexes const & pis, IMP::FloatKeys const & vars, IMP::Float radius) -> BallMover
3909  __init__(BallMover self, Model m, IMP::ParticleIndexes const & pis, IMP::Float radius) -> BallMover
3910  __init__(BallMover self) -> BallMover
3911  """
3912  _IMP_core.BallMover_swiginit(self, _IMP_core.new_BallMover(*args))
3913 
3914  def set_radius(self, radius):
3915  r"""set_radius(BallMover self, IMP::Float radius)"""
3916  return _IMP_core.BallMover_set_radius(self, radius)
3917 
3918  def get_radius(self):
3919  r"""get_radius(BallMover self) -> IMP::Float"""
3920  return _IMP_core.BallMover_get_radius(self)
3921 
3922  def get_indexes(self):
3923  r"""get_indexes(BallMover self) -> IMP::ParticleIndexes"""
3924  return _IMP_core.BallMover_get_indexes(self)
3925 
3926  def get_keys(self):
3927  r"""get_keys(BallMover self) -> IMP::FloatKeys"""
3928  return _IMP_core.BallMover_get_keys(self)
3929 
3930  def get_version_info(self):
3931  r"""get_version_info(BallMover self) -> VersionInfo"""
3932  return _IMP_core.BallMover_get_version_info(self)
3933  __swig_destroy__ = _IMP_core.delete_BallMover
3934 
3935  def __str__(self):
3936  r"""__str__(BallMover self) -> std::string"""
3937  return _IMP_core.BallMover___str__(self)
3938 
3939  def __repr__(self):
3940  r"""__repr__(BallMover self) -> std::string"""
3941  return _IMP_core.BallMover___repr__(self)
3942 
3943  @staticmethod
3944  def get_from(o):
3945  return _object_cast_to_BallMover(o)
3946 
3947 
3948  def _get_as_binary(self):
3949  r"""_get_as_binary(BallMover self) -> PyObject *"""
3950  return _IMP_core.BallMover__get_as_binary(self)
3951 
3952  def _set_from_binary(self, p):
3953  r"""_set_from_binary(BallMover self, PyObject * p)"""
3954  return _IMP_core.BallMover__set_from_binary(self, p)
3955 
3956  def __getstate__(self):
3957  p = self._get_as_binary()
3958  if len(self.__dict__) > 1:
3959  d = self.__dict__.copy()
3960  del d['this']
3961  p = (d, p)
3962  return p
3963 
3964  def __setstate__(self, p):
3965  if not hasattr(self, 'this'):
3966  self.__init__()
3967  if isinstance(p, tuple):
3968  d, p = p
3969  self.__dict__.update(d)
3970  return self._set_from_binary(p)
3971 
3972 
3973  def _get_jax(self, space):
3974  import jax.random
3975  from IMP.algebra.jax import get_random_vector_in_3d_sphere
3976  indexes = self.get_indexes()
3977  keys = frozenset(self.get_keys())
3978  if keys == frozenset(IMP.core.XYZ.get_xyz_keys()):
3979  intcoord = False
3980  elif keys == frozenset(
3982  intcoord = True
3983  else:
3984  raise NotImplementedError(
3985  "Only works for XYZ or internal coordinates")
3986  radius = self.get_radius()
3987 
3988  def init_func(key):
3989  return key
3990 
3991  def propose_func(jm, key):
3992  key, subkey = jax.random.split(key)
3993  if intcoord:
3994  rbs = jm['rigid_bodies']
3995  val = rbs.intcoord
3996  else:
3997  val = jm['xyz']
3998  v = get_random_vector_in_3d_sphere(
3999  subkey, radius, shape=val.shape[:-2] + (1,))
4000  if intcoord:
4001  rbs.intcoord = space.shift_indexes(val, indexes, v)
4002  else:
4003  jm['xyz'] = space.shift_indexes(val, indexes, v)
4004  return jm, key, 1.0
4005  return self._wrap_jax(init_func, propose_func,
4006  keys=['rigid_bodies'] if intcoord else None)
4007 
4008 
4009 # Register BallMover in _IMP_core:
4010 _IMP_core.BallMover_swigregister(BallMover)
4011 class SerialMover(MonteCarloMover):
4012  r"""Proxy of C++ IMP::core::SerialMover class."""
4013 
4014  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4015 
4016  def __init__(self, *args):
4017  r"""
4018  __init__(SerialMover self, IMP::core::MonteCarloMoversTemp const & mvs) -> SerialMover
4019  __init__(SerialMover self) -> SerialMover
4020  """
4021  _IMP_core.SerialMover_swiginit(self, _IMP_core.new_SerialMover(*args))
4022 
4023  def get_movers(self):
4024  r"""get_movers(SerialMover self) -> IMP::core::MonteCarloMovers const &"""
4025  return _IMP_core.SerialMover_get_movers(self)
4026 
4027  def get_version_info(self):
4028  r"""get_version_info(SerialMover self) -> VersionInfo"""
4029  return _IMP_core.SerialMover_get_version_info(self)
4030  __swig_destroy__ = _IMP_core.delete_SerialMover
4031 
4032  def __str__(self):
4033  r"""__str__(SerialMover self) -> std::string"""
4034  return _IMP_core.SerialMover___str__(self)
4035 
4036  def __repr__(self):
4037  r"""__repr__(SerialMover self) -> std::string"""
4038  return _IMP_core.SerialMover___repr__(self)
4039 
4040  @staticmethod
4041  def get_from(o):
4042  return _object_cast_to_SerialMover(o)
4043 
4044 
4045  def _get_as_binary(self):
4046  r"""_get_as_binary(SerialMover self) -> PyObject *"""
4047  return _IMP_core.SerialMover__get_as_binary(self)
4048 
4049  def _set_from_binary(self, p):
4050  r"""_set_from_binary(SerialMover self, PyObject * p)"""
4051  return _IMP_core.SerialMover__set_from_binary(self, p)
4052 
4053  def __getstate__(self):
4054  p = self._get_as_binary()
4055  if len(self.__dict__) > 1:
4056  d = self.__dict__.copy()
4057  del d['this']
4058  p = (d, p)
4059  return p
4060 
4061  def __setstate__(self, p):
4062  if not hasattr(self, 'this'):
4063  self.__init__()
4064  if isinstance(p, tuple):
4065  d, p = p
4066  self.__dict__.update(d)
4067  return self._set_from_binary(p)
4068 
4069 
4070  def _get_jax(self, space):
4071  import jax.random
4072  import jax.lax
4073  import jax.numpy as jnp
4074  from IMP.core._jax_util import _SerialMover
4075  movers = [m.get_derived_object()._get_jax(space)
4076  for m in self.get_movers()]
4077 
4078  def sub_propose_func(jm, sms, i):
4079  """Call the propose_func of the ith mover"""
4080  jm, sms.mover_state[i], ratio = movers[i].propose_func(
4081  jm, sms.mover_state[i])
4082  sms.proposed_mover_steps = sms.proposed_mover_steps.at[i].add(1)
4083  return jm, sms, ratio
4084 
4085  sub_propose_funcs = [functools.partial(sub_propose_func, i=i)
4086  for i in range(len(movers))]
4087 
4088  def init_func(key):
4089  # Initialize all movers and store their state in ours
4090  mover_state = []
4091  for m in movers:
4092  key, subkey = jax.random.split(key)
4093  mover_state.append(m.init_func(subkey))
4094  return _SerialMover(
4095  imov=-1, mover_state=mover_state,
4096  proposed_mover_steps=jnp.zeros(len(movers), dtype=int),
4097  accepted_mover_steps=jnp.zeros(len(movers), dtype=int))
4098 
4099  def reset_stats_func(sms):
4100  sms.mover_state = [m.reset_stats_func(ms)
4101  if m.reset_stats_func else ms
4102  for (m, ms) in zip(movers, sms.mover_state)]
4103  sms.proposed_mover_steps = jnp.zeros(len(movers), dtype=int)
4104  sms.accepted_mover_steps = jnp.zeros(len(movers), dtype=int)
4105  return sms
4106 
4107  def propose_func(jm, sms):
4108  sms.imov = jnp.mod(sms.imov + 1, len(movers))
4109  return jax.lax.switch(sms.imov, sub_propose_funcs, jm, sms)
4110 
4111  def accept_func(sms):
4112  # Update statistics for the chosen mover
4113  sms.accepted_mover_steps = \
4114  sms.accepted_mover_steps.at[sms.imov].add(1)
4115  return sms
4116 
4117  def sync_func(imp_mover, sms):
4118  # Copy submover statistics back to IMP Movers
4119  for i, mover in enumerate(imp_mover.get_movers()):
4120  mover.add_to_statistics(
4121  sms.proposed_mover_steps[i],
4122  sms.proposed_mover_steps[i] - sms.accepted_mover_steps[i])
4123 
4124  return self._wrap_jax(
4125  init_func, propose_func, accept_func, sync_func,
4126  reset_stats_func=reset_stats_func,
4127  keys=frozenset(x for m in movers for x in m._keys))
4128 
4129 
4130 # Register SerialMover in _IMP_core:
4131 _IMP_core.SerialMover_swigregister(SerialMover)
4132 class SubsetMover(MonteCarloMover):
4133  r"""Proxy of C++ IMP::core::SubsetMover class."""
4134 
4135  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4136 
4137  def __init__(self, *args):
4138  r"""
4139  __init__(SubsetMover self, IMP::core::MonteCarloMoversTemp const & mvs, unsigned int n) -> SubsetMover
4140  __init__(SubsetMover self) -> SubsetMover
4141  """
4142  _IMP_core.SubsetMover_swiginit(self, _IMP_core.new_SubsetMover(*args))
4143 
4144  def get_movers(self):
4145  r"""get_movers(SubsetMover self) -> IMP::core::MonteCarloMovers const &"""
4146  return _IMP_core.SubsetMover_get_movers(self)
4147 
4148  def get_subset_size(self):
4149  r"""get_subset_size(SubsetMover self) -> unsigned int"""
4150  return _IMP_core.SubsetMover_get_subset_size(self)
4151 
4152  def get_version_info(self):
4153  r"""get_version_info(SubsetMover self) -> VersionInfo"""
4154  return _IMP_core.SubsetMover_get_version_info(self)
4155  __swig_destroy__ = _IMP_core.delete_SubsetMover
4156 
4157  def __str__(self):
4158  r"""__str__(SubsetMover self) -> std::string"""
4159  return _IMP_core.SubsetMover___str__(self)
4160 
4161  def __repr__(self):
4162  r"""__repr__(SubsetMover self) -> std::string"""
4163  return _IMP_core.SubsetMover___repr__(self)
4164 
4165  @staticmethod
4166  def get_from(o):
4167  return _object_cast_to_SubsetMover(o)
4168 
4169 
4170  def _get_as_binary(self):
4171  r"""_get_as_binary(SubsetMover self) -> PyObject *"""
4172  return _IMP_core.SubsetMover__get_as_binary(self)
4173 
4174  def _set_from_binary(self, p):
4175  r"""_set_from_binary(SubsetMover self, PyObject * p)"""
4176  return _IMP_core.SubsetMover__set_from_binary(self, p)
4177 
4178  def __getstate__(self):
4179  p = self._get_as_binary()
4180  if len(self.__dict__) > 1:
4181  d = self.__dict__.copy()
4182  del d['this']
4183  p = (d, p)
4184  return p
4185 
4186  def __setstate__(self, p):
4187  if not hasattr(self, 'this'):
4188  self.__init__()
4189  if isinstance(p, tuple):
4190  d, p = p
4191  self.__dict__.update(d)
4192  return self._set_from_binary(p)
4193 
4194 
4195 # Register SubsetMover in _IMP_core:
4196 _IMP_core.SubsetMover_swigregister(SubsetMover)
4197 class DirectionMover(MonteCarloMover):
4198  r"""Proxy of C++ IMP::core::DirectionMover class."""
4199 
4200  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4201 
4202  def __init__(self, *args):
4203  r"""
4204  __init__(DirectionMover self, Model m, ParticleIndex pi, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4205  __init__(DirectionMover self, Direction d, IMP::Float max_rotation, IMP::Float reflect_probability) -> DirectionMover
4206  __init__(DirectionMover self) -> DirectionMover
4207  """
4208  _IMP_core.DirectionMover_swiginit(self, _IMP_core.new_DirectionMover(*args))
4209 
4210  def set_maximum_rotation(self, mr):
4211  r"""set_maximum_rotation(DirectionMover self, IMP::Float mr)"""
4212  return _IMP_core.DirectionMover_set_maximum_rotation(self, mr)
4213 
4214  def set_reflect_probability(self, rp):
4215  r"""set_reflect_probability(DirectionMover self, IMP::Float rp)"""
4216  return _IMP_core.DirectionMover_set_reflect_probability(self, rp)
4217 
4218  def get_maximum_rotation(self):
4219  r"""get_maximum_rotation(DirectionMover self) -> IMP::Float"""
4220  return _IMP_core.DirectionMover_get_maximum_rotation(self)
4221 
4222  def get_reflect_probability(self):
4223  r"""get_reflect_probability(DirectionMover self) -> IMP::Float"""
4224  return _IMP_core.DirectionMover_get_reflect_probability(self)
4225 
4226  def get_direction(self):
4227  r"""get_direction(DirectionMover self) -> Direction"""
4228  return _IMP_core.DirectionMover_get_direction(self)
4229 
4230  def get_version_info(self):
4231  r"""get_version_info(DirectionMover self) -> VersionInfo"""
4232  return _IMP_core.DirectionMover_get_version_info(self)
4233  __swig_destroy__ = _IMP_core.delete_DirectionMover
4234 
4235  def __str__(self):
4236  r"""__str__(DirectionMover self) -> std::string"""
4237  return _IMP_core.DirectionMover___str__(self)
4238 
4239  def __repr__(self):
4240  r"""__repr__(DirectionMover self) -> std::string"""
4241  return _IMP_core.DirectionMover___repr__(self)
4242 
4243  @staticmethod
4244  def get_from(o):
4245  return _object_cast_to_DirectionMover(o)
4246 
4247 
4248  def _get_as_binary(self):
4249  r"""_get_as_binary(DirectionMover self) -> PyObject *"""
4250  return _IMP_core.DirectionMover__get_as_binary(self)
4251 
4252  def _set_from_binary(self, p):
4253  r"""_set_from_binary(DirectionMover self, PyObject * p)"""
4254  return _IMP_core.DirectionMover__set_from_binary(self, p)
4255 
4256  def __getstate__(self):
4257  p = self._get_as_binary()
4258  if len(self.__dict__) > 1:
4259  d = self.__dict__.copy()
4260  del d['this']
4261  p = (d, p)
4262  return p
4263 
4264  def __setstate__(self, p):
4265  if not hasattr(self, 'this'):
4266  self.__init__()
4267  if isinstance(p, tuple):
4268  d, p = p
4269  self.__dict__.update(d)
4270  return self._set_from_binary(p)
4271 
4272 
4273 # Register DirectionMover in _IMP_core:
4274 _IMP_core.DirectionMover_swigregister(DirectionMover)
4275 class SurfaceMover(MonteCarloMover):
4276  r"""Proxy of C++ IMP::core::SurfaceMover class."""
4277 
4278  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4279 
4280  def __init__(self, *args):
4281  r"""
4282  __init__(SurfaceMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4283  __init__(SurfaceMover self, Surface s, IMP::Float max_translation, IMP::Float max_rotation, IMP::Float reflect_probability) -> SurfaceMover
4284  __init__(SurfaceMover self) -> SurfaceMover
4285  """
4286  _IMP_core.SurfaceMover_swiginit(self, _IMP_core.new_SurfaceMover(*args))
4287 
4288  def set_maximum_translation(self, mt):
4289  r"""set_maximum_translation(SurfaceMover self, IMP::Float mt)"""
4290  return _IMP_core.SurfaceMover_set_maximum_translation(self, mt)
4291 
4292  def set_maximum_rotation(self, mr):
4293  r"""set_maximum_rotation(SurfaceMover self, IMP::Float mr)"""
4294  return _IMP_core.SurfaceMover_set_maximum_rotation(self, mr)
4295 
4296  def set_reflect_probability(self, rp):
4297  r"""set_reflect_probability(SurfaceMover self, IMP::Float rp)"""
4298  return _IMP_core.SurfaceMover_set_reflect_probability(self, rp)
4299 
4300  def get_maximum_translation(self):
4301  r"""get_maximum_translation(SurfaceMover self) -> IMP::Float"""
4302  return _IMP_core.SurfaceMover_get_maximum_translation(self)
4303 
4304  def get_maximum_rotation(self):
4305  r"""get_maximum_rotation(SurfaceMover self) -> IMP::Float"""
4306  return _IMP_core.SurfaceMover_get_maximum_rotation(self)
4307 
4308  def get_reflect_probability(self):
4309  r"""get_reflect_probability(SurfaceMover self) -> IMP::Float"""
4310  return _IMP_core.SurfaceMover_get_reflect_probability(self)
4311 
4312  def get_surface(self):
4313  r"""get_surface(SurfaceMover self) -> Surface"""
4314  return _IMP_core.SurfaceMover_get_surface(self)
4315 
4316  def get_version_info(self):
4317  r"""get_version_info(SurfaceMover self) -> VersionInfo"""
4318  return _IMP_core.SurfaceMover_get_version_info(self)
4319  __swig_destroy__ = _IMP_core.delete_SurfaceMover
4320 
4321  def __str__(self):
4322  r"""__str__(SurfaceMover self) -> std::string"""
4323  return _IMP_core.SurfaceMover___str__(self)
4324 
4325  def __repr__(self):
4326  r"""__repr__(SurfaceMover self) -> std::string"""
4327  return _IMP_core.SurfaceMover___repr__(self)
4328 
4329  @staticmethod
4330  def get_from(o):
4331  return _object_cast_to_SurfaceMover(o)
4332 
4333 
4334  def _get_as_binary(self):
4335  r"""_get_as_binary(SurfaceMover self) -> PyObject *"""
4336  return _IMP_core.SurfaceMover__get_as_binary(self)
4337 
4338  def _set_from_binary(self, p):
4339  r"""_set_from_binary(SurfaceMover self, PyObject * p)"""
4340  return _IMP_core.SurfaceMover__set_from_binary(self, p)
4341 
4342  def __getstate__(self):
4343  p = self._get_as_binary()
4344  if len(self.__dict__) > 1:
4345  d = self.__dict__.copy()
4346  del d['this']
4347  p = (d, p)
4348  return p
4349 
4350  def __setstate__(self, p):
4351  if not hasattr(self, 'this'):
4352  self.__init__()
4353  if isinstance(p, tuple):
4354  d, p = p
4355  self.__dict__.update(d)
4356  return self._set_from_binary(p)
4357 
4358 
4359 # Register SurfaceMover in _IMP_core:
4360 _IMP_core.SurfaceMover_swigregister(SurfaceMover)
4361 class BoxSweepClosePairsFinder(ClosePairsFinder):
4362  r"""Proxy of C++ IMP::core::BoxSweepClosePairsFinder class."""
4363 
4364  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4365 
4366  def __init__(self):
4367  r"""__init__(BoxSweepClosePairsFinder self) -> BoxSweepClosePairsFinder"""
4368  _IMP_core.BoxSweepClosePairsFinder_swiginit(self, _IMP_core.new_BoxSweepClosePairsFinder())
4369 
4370  def get_close_pairs(self, *args):
4371  r"""
4372  get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4373  get_close_pairs(BoxSweepClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
4374  get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
4375  get_close_pairs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
4376  """
4377  return _IMP_core.BoxSweepClosePairsFinder_get_close_pairs(self, *args)
4378 
4379  def do_get_inputs(self, m, pis):
4380  r"""do_get_inputs(BoxSweepClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4381  return _IMP_core.BoxSweepClosePairsFinder_do_get_inputs(self, m, pis)
4382 
4383  def get_version_info(self):
4384  r"""get_version_info(BoxSweepClosePairsFinder self) -> VersionInfo"""
4385  return _IMP_core.BoxSweepClosePairsFinder_get_version_info(self)
4386  __swig_destroy__ = _IMP_core.delete_BoxSweepClosePairsFinder
4387 
4388  def __str__(self):
4389  r"""__str__(BoxSweepClosePairsFinder self) -> std::string"""
4390  return _IMP_core.BoxSweepClosePairsFinder___str__(self)
4391 
4392  def __repr__(self):
4393  r"""__repr__(BoxSweepClosePairsFinder self) -> std::string"""
4394  return _IMP_core.BoxSweepClosePairsFinder___repr__(self)
4395 
4396  @staticmethod
4397  def get_from(o):
4398  return _object_cast_to_BoxSweepClosePairsFinder(o)
4399 
4400 
4401 # Register BoxSweepClosePairsFinder in _IMP_core:
4402 _IMP_core.BoxSweepClosePairsFinder_swigregister(BoxSweepClosePairsFinder)
4403 class CentroidOfRefined(IMP.SingletonModifier):
4404  r"""Proxy of C++ IMP::core::CentroidOfRefined class."""
4405 
4406  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4407 
4408  def __init__(self, *args):
4409  r"""
4410  __init__(CentroidOfRefined self, Refiner r, FloatKey weight=IMP::FloatKey(), IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> CentroidOfRefined
4411  __init__(CentroidOfRefined self) -> CentroidOfRefined
4412  """
4413  _IMP_core.CentroidOfRefined_swiginit(self, _IMP_core.new_CentroidOfRefined(*args))
4414 
4415  def get_refiner(self):
4416  r"""get_refiner(CentroidOfRefined self) -> Refiner"""
4417  return _IMP_core.CentroidOfRefined_get_refiner(self)
4418 
4419  def get_weight(self):
4420  r"""get_weight(CentroidOfRefined self) -> FloatKey"""
4421  return _IMP_core.CentroidOfRefined_get_weight(self)
4422 
4423  def get_keys(self):
4424  r"""get_keys(CentroidOfRefined self) -> IMP::FloatKeys"""
4425  return _IMP_core.CentroidOfRefined_get_keys(self)
4426 
4427  def get_is_weight_null(self):
4428  r"""get_is_weight_null(CentroidOfRefined self) -> bool"""
4429  return _IMP_core.CentroidOfRefined_get_is_weight_null(self)
4430 
4431  def do_get_inputs(self, m, pis):
4432  r"""do_get_inputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4433  return _IMP_core.CentroidOfRefined_do_get_inputs(self, m, pis)
4434 
4435  def do_get_outputs(self, m, pis):
4436  r"""do_get_outputs(CentroidOfRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4437  return _IMP_core.CentroidOfRefined_do_get_outputs(self, m, pis)
4438 
4439  def get_version_info(self):
4440  r"""get_version_info(CentroidOfRefined self) -> VersionInfo"""
4441  return _IMP_core.CentroidOfRefined_get_version_info(self)
4442  __swig_destroy__ = _IMP_core.delete_CentroidOfRefined
4443 
4444  def __str__(self):
4445  r"""__str__(CentroidOfRefined self) -> std::string"""
4446  return _IMP_core.CentroidOfRefined___str__(self)
4447 
4448  def __repr__(self):
4449  r"""__repr__(CentroidOfRefined self) -> std::string"""
4450  return _IMP_core.CentroidOfRefined___repr__(self)
4451 
4452  @staticmethod
4453  def get_from(o):
4454  return _object_cast_to_CentroidOfRefined(o)
4455 
4456 
4457  def _get_as_binary(self):
4458  r"""_get_as_binary(CentroidOfRefined self) -> PyObject *"""
4459  return _IMP_core.CentroidOfRefined__get_as_binary(self)
4460 
4461  def _set_from_binary(self, p):
4462  r"""_set_from_binary(CentroidOfRefined self, PyObject * p)"""
4463  return _IMP_core.CentroidOfRefined__set_from_binary(self, p)
4464 
4465  def __getstate__(self):
4466  p = self._get_as_binary()
4467  if len(self.__dict__) > 1:
4468  d = self.__dict__.copy()
4469  del d['this']
4470  p = (d, p)
4471  return p
4472 
4473  def __setstate__(self, p):
4474  if not hasattr(self, 'this'):
4475  self.__init__()
4476  if isinstance(p, tuple):
4477  d, p = p
4478  self.__dict__.update(d)
4479  return self._set_from_binary(p)
4480 
4481 
4482  def _get_jax(self, m, indexes):
4483  import jax.numpy as jnp
4484  refined = [
4485  self.get_refiner().get_refined_indexes(m, IMP.ParticleIndex(index))
4486  for index in indexes]
4487 
4488  def apply_func_unweighted(jm):
4489  for ind, ref in zip(indexes, refined):
4490  xyz = jm['xyz']
4491  jm['xyz'] = xyz.at[ind].set(jnp.average(xyz[ref], axis=0))
4492  return jm
4493 
4494  def apply_func_weighted(jm, weight_key):
4495  for ind, ref in zip(indexes, refined):
4496  xyz = jm['xyz']
4497  weights = jm[weight_key][ref]
4498  jm['xyz'] = xyz.at[ind].set(
4499  jnp.average(xyz[ref], axis=0, weights=weights))
4500  return jm
4501 
4502  keys = frozenset(self.get_keys())
4503  if keys != frozenset(IMP.core.XYZ.get_xyz_keys()):
4504  raise NotImplementedError("Only works for XYZ")
4505 
4506  if self.get_is_weight_null():
4507  return self._wrap_jax(apply_func_unweighted)
4508  else:
4509  weight_key = self.get_weight()
4510  return self._wrap_jax(
4511  functools.partial(apply_func_weighted,
4512  weight_key=weight_key.get_string()),
4513  keys=(weight_key,))
4514 
4515 
4516 # Register CentroidOfRefined in _IMP_core:
4517 _IMP_core.CentroidOfRefined_swigregister(CentroidOfRefined)
4518 class Centroid(XYZ):
4519  r"""Proxy of C++ IMP::core::Centroid class."""
4520 
4521  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4522 
4523  def get_constraint(self):
4524  r"""get_constraint(Centroid self) -> Constraint"""
4525  return _IMP_core.Centroid_get_constraint(self)
4526 
4527  def __init__(self, *args):
4528  r"""
4529  __init__(Centroid self) -> Centroid
4530  __init__(Centroid self, Model m, ParticleIndex id) -> Centroid
4531  __init__(Centroid self, _ParticleAdaptor d) -> Centroid
4532  """
4533  _IMP_core.Centroid_swiginit(self, _IMP_core.new_Centroid(*args))
4534 
4535  def show(self, *args):
4536  r"""show(Centroid self, _ostream out=std::cout)"""
4537  return _IMP_core.Centroid_show(self, *args)
4538 
4539  @staticmethod
4540  def setup_particle(*args):
4541  r"""
4542  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Centroid
4543  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Centroid
4544  setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Centroid
4545  setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Centroid
4546  """
4547  return _IMP_core.Centroid_setup_particle(*args)
4548 
4549  @staticmethod
4550  def get_is_setup(*args):
4551  r"""
4552  get_is_setup(_ParticleAdaptor p) -> bool
4553  get_is_setup(Model m, ParticleIndex pi) -> bool
4554  """
4555  return _IMP_core.Centroid_get_is_setup(*args)
4556 
4557  def add_attribute(self, *args):
4558  r"""
4559  add_attribute(Centroid self, FloatKey k, IMP::Float v, bool opt)
4560  add_attribute(Centroid self, FloatKey a0, IMP::Float a1)
4561  add_attribute(Centroid self, IntKey a0, IMP::Int a1)
4562  add_attribute(Centroid self, FloatsKey a0, IMP::Floats a1)
4563  add_attribute(Centroid self, IntsKey a0, IMP::Ints a1)
4564  add_attribute(Centroid self, StringKey a0, IMP::String a1)
4565  add_attribute(Centroid self, ParticleIndexKey a0, Particle a1)
4566  add_attribute(Centroid self, ObjectKey a0, Object a1)
4567  add_attribute(Centroid self, SparseFloatKey a0, IMP::Float a1)
4568  add_attribute(Centroid self, SparseIntKey a0, IMP::Int a1)
4569  add_attribute(Centroid self, SparseStringKey a0, IMP::String a1)
4570  add_attribute(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4571  """
4572  return _IMP_core.Centroid_add_attribute(self, *args)
4573 
4574  def get_value(self, *args):
4575  r"""
4576  get_value(Centroid self, FloatKey a0) -> IMP::Float
4577  get_value(Centroid self, IntKey a0) -> IMP::Int
4578  get_value(Centroid self, FloatsKey a0) -> IMP::Floats
4579  get_value(Centroid self, IntsKey a0) -> IMP::Ints
4580  get_value(Centroid self, StringKey a0) -> IMP::String
4581  get_value(Centroid self, ParticleIndexKey a0) -> Particle
4582  get_value(Centroid self, ObjectKey a0) -> Object
4583  get_value(Centroid self, SparseFloatKey a0) -> IMP::Float
4584  get_value(Centroid self, SparseIntKey a0) -> IMP::Int
4585  get_value(Centroid self, SparseStringKey a0) -> IMP::String
4586  get_value(Centroid self, SparseParticleIndexKey a0) -> ParticleIndex
4587  """
4588  return _IMP_core.Centroid_get_value(self, *args)
4589 
4590  def set_value(self, *args):
4591  r"""
4592  set_value(Centroid self, FloatKey a0, IMP::Float a1)
4593  set_value(Centroid self, IntKey a0, IMP::Int a1)
4594  set_value(Centroid self, FloatsKey a0, IMP::Floats a1)
4595  set_value(Centroid self, IntsKey a0, IMP::Ints a1)
4596  set_value(Centroid self, StringKey a0, IMP::String a1)
4597  set_value(Centroid self, ParticleIndexKey a0, Particle a1)
4598  set_value(Centroid self, ObjectKey a0, Object a1)
4599  set_value(Centroid self, SparseFloatKey a0, IMP::Float a1)
4600  set_value(Centroid self, SparseIntKey a0, IMP::Int a1)
4601  set_value(Centroid self, SparseStringKey a0, IMP::String a1)
4602  set_value(Centroid self, SparseParticleIndexKey a0, ParticleIndex a1)
4603  """
4604  return _IMP_core.Centroid_set_value(self, *args)
4605 
4606  def remove_attribute(self, *args):
4607  r"""
4608  remove_attribute(Centroid self, FloatKey a0)
4609  remove_attribute(Centroid self, IntKey a0)
4610  remove_attribute(Centroid self, FloatsKey a0)
4611  remove_attribute(Centroid self, IntsKey a0)
4612  remove_attribute(Centroid self, StringKey a0)
4613  remove_attribute(Centroid self, ParticleIndexKey a0)
4614  remove_attribute(Centroid self, ObjectKey a0)
4615  remove_attribute(Centroid self, SparseFloatKey a0)
4616  remove_attribute(Centroid self, SparseIntKey a0)
4617  remove_attribute(Centroid self, SparseStringKey a0)
4618  remove_attribute(Centroid self, SparseParticleIndexKey a0)
4619  """
4620  return _IMP_core.Centroid_remove_attribute(self, *args)
4621 
4622  def has_attribute(self, *args):
4623  r"""
4624  has_attribute(Centroid self, FloatKey a0) -> bool
4625  has_attribute(Centroid self, IntKey a0) -> bool
4626  has_attribute(Centroid self, FloatsKey a0) -> bool
4627  has_attribute(Centroid self, IntsKey a0) -> bool
4628  has_attribute(Centroid self, StringKey a0) -> bool
4629  has_attribute(Centroid self, ParticleIndexKey a0) -> bool
4630  has_attribute(Centroid self, ObjectKey a0) -> bool
4631  has_attribute(Centroid self, SparseFloatKey a0) -> bool
4632  has_attribute(Centroid self, SparseIntKey a0) -> bool
4633  has_attribute(Centroid self, SparseStringKey a0) -> bool
4634  has_attribute(Centroid self, SparseParticleIndexKey a0) -> bool
4635  """
4636  return _IMP_core.Centroid_has_attribute(self, *args)
4637 
4638  def get_derivative(self, a0):
4639  r"""get_derivative(Centroid self, FloatKey a0) -> double"""
4640  return _IMP_core.Centroid_get_derivative(self, a0)
4641 
4642  def get_name(self):
4643  r"""get_name(Centroid self) -> std::string"""
4644  return _IMP_core.Centroid_get_name(self)
4645 
4646  def clear_caches(self):
4647  r"""clear_caches(Centroid self)"""
4648  return _IMP_core.Centroid_clear_caches(self)
4649 
4650  def set_name(self, a0):
4651  r"""set_name(Centroid self, std::string a0)"""
4652  return _IMP_core.Centroid_set_name(self, a0)
4653 
4654  def set_check_level(self, a0):
4655  r"""set_check_level(Centroid self, IMP::CheckLevel a0)"""
4656  return _IMP_core.Centroid_set_check_level(self, a0)
4657 
4658  def add_to_derivative(self, a0, a1, a2):
4659  r"""add_to_derivative(Centroid self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
4660  return _IMP_core.Centroid_add_to_derivative(self, a0, a1, a2)
4661 
4662  def set_is_optimized(self, a0, a1):
4663  r"""set_is_optimized(Centroid self, FloatKey a0, bool a1)"""
4664  return _IMP_core.Centroid_set_is_optimized(self, a0, a1)
4665 
4666  def get_is_optimized(self, a0):
4667  r"""get_is_optimized(Centroid self, FloatKey a0) -> bool"""
4668  return _IMP_core.Centroid_get_is_optimized(self, a0)
4669 
4670  def get_check_level(self):
4671  r"""get_check_level(Centroid self) -> IMP::CheckLevel"""
4672  return _IMP_core.Centroid_get_check_level(self)
4673 
4674  def __eq__(self, *args):
4675  r"""
4676  __eq__(Centroid self, Centroid o) -> bool
4677  __eq__(Centroid self, Particle d) -> bool
4678  """
4679  return _IMP_core.Centroid___eq__(self, *args)
4680 
4681  def __ne__(self, *args):
4682  r"""
4683  __ne__(Centroid self, Centroid o) -> bool
4684  __ne__(Centroid self, Particle d) -> bool
4685  """
4686  return _IMP_core.Centroid___ne__(self, *args)
4687 
4688  def __le__(self, *args):
4689  r"""
4690  __le__(Centroid self, Centroid o) -> bool
4691  __le__(Centroid self, Particle d) -> bool
4692  """
4693  return _IMP_core.Centroid___le__(self, *args)
4694 
4695  def __lt__(self, *args):
4696  r"""
4697  __lt__(Centroid self, Centroid o) -> bool
4698  __lt__(Centroid self, Particle d) -> bool
4699  """
4700  return _IMP_core.Centroid___lt__(self, *args)
4701 
4702  def __ge__(self, *args):
4703  r"""
4704  __ge__(Centroid self, Centroid o) -> bool
4705  __ge__(Centroid self, Particle d) -> bool
4706  """
4707  return _IMP_core.Centroid___ge__(self, *args)
4708 
4709  def __gt__(self, *args):
4710  r"""
4711  __gt__(Centroid self, Centroid o) -> bool
4712  __gt__(Centroid self, Particle d) -> bool
4713  """
4714  return _IMP_core.Centroid___gt__(self, *args)
4715 
4716  def __hash__(self):
4717  r"""__hash__(Centroid self) -> std::size_t"""
4718  return _IMP_core.Centroid___hash__(self)
4719 
4720  def __str__(self):
4721  r"""__str__(Centroid self) -> std::string"""
4722  return _IMP_core.Centroid___str__(self)
4723 
4724  def __repr__(self):
4725  r"""__repr__(Centroid self) -> std::string"""
4726  return _IMP_core.Centroid___repr__(self)
4727 
4728  def _get_as_binary(self):
4729  r"""_get_as_binary(Centroid self) -> PyObject *"""
4730  return _IMP_core.Centroid__get_as_binary(self)
4731 
4732  def _set_from_binary(self, p):
4733  r"""_set_from_binary(Centroid self, PyObject * p)"""
4734  return _IMP_core.Centroid__set_from_binary(self, p)
4735 
4736  def __getstate__(self):
4737  p = self._get_as_binary()
4738  if len(self.__dict__) > 1:
4739  d = self.__dict__.copy()
4740  del d['this']
4741  p = (d, p)
4742  return p
4743 
4744  def __setstate__(self, p):
4745  if not hasattr(self, 'this'):
4746  self.__init__()
4747  if isinstance(p, tuple):
4748  d, p = p
4749  self.__dict__.update(d)
4750  return self._set_from_binary(p)
4751 
4752  __swig_destroy__ = _IMP_core.delete_Centroid
4753 
4754 # Register Centroid in _IMP_core:
4755 _IMP_core.Centroid_swigregister(Centroid)
4756 class ChecksScoreState(IMP.ScoreState):
4757  r"""Proxy of C++ IMP::core::ChecksScoreState class."""
4758 
4759  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4760 
4761  def __init__(self, *args):
4762  r"""
4763  __init__(ChecksScoreState self, Model m, double probability) -> ChecksScoreState
4764  __init__(ChecksScoreState self) -> ChecksScoreState
4765  """
4766  _IMP_core.ChecksScoreState_swiginit(self, _IMP_core.new_ChecksScoreState(*args))
4767 
4768  def get_number_of_checked(self):
4769  r"""get_number_of_checked(ChecksScoreState self) -> unsigned int"""
4770  return _IMP_core.ChecksScoreState_get_number_of_checked(self)
4771 
4772  def do_before_evaluate(self):
4773  r"""do_before_evaluate(ChecksScoreState self)"""
4774  return _IMP_core.ChecksScoreState_do_before_evaluate(self)
4775 
4776  def do_after_evaluate(self, da):
4777  r"""do_after_evaluate(ChecksScoreState self, DerivativeAccumulator da)"""
4778  return _IMP_core.ChecksScoreState_do_after_evaluate(self, da)
4779 
4780  def do_get_outputs(self):
4781  r"""do_get_outputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4782  return _IMP_core.ChecksScoreState_do_get_outputs(self)
4783 
4784  def do_get_inputs(self):
4785  r"""do_get_inputs(ChecksScoreState self) -> IMP::ModelObjectsTemp"""
4786  return _IMP_core.ChecksScoreState_do_get_inputs(self)
4787 
4788  def get_version_info(self):
4789  r"""get_version_info(ChecksScoreState self) -> VersionInfo"""
4790  return _IMP_core.ChecksScoreState_get_version_info(self)
4791  __swig_destroy__ = _IMP_core.delete_ChecksScoreState
4792 
4793  def __str__(self):
4794  r"""__str__(ChecksScoreState self) -> std::string"""
4795  return _IMP_core.ChecksScoreState___str__(self)
4796 
4797  def __repr__(self):
4798  r"""__repr__(ChecksScoreState self) -> std::string"""
4799  return _IMP_core.ChecksScoreState___repr__(self)
4800 
4801  @staticmethod
4802  def get_from(o):
4803  return _object_cast_to_ChecksScoreState(o)
4804 
4805 
4806  def _get_as_binary(self):
4807  r"""_get_as_binary(ChecksScoreState self) -> PyObject *"""
4808  return _IMP_core.ChecksScoreState__get_as_binary(self)
4809 
4810  def _set_from_binary(self, p):
4811  r"""_set_from_binary(ChecksScoreState self, PyObject * p)"""
4812  return _IMP_core.ChecksScoreState__set_from_binary(self, p)
4813 
4814  def __getstate__(self):
4815  p = self._get_as_binary()
4816  if len(self.__dict__) > 1:
4817  d = self.__dict__.copy()
4818  del d['this']
4819  p = (d, p)
4820  return p
4821 
4822  def __setstate__(self, p):
4823  if not hasattr(self, 'this'):
4824  self.__init__()
4825  if isinstance(p, tuple):
4826  d, p = p
4827  self.__dict__.update(d)
4828  return self._set_from_binary(p)
4829 
4830 
4831 # Register ChecksScoreState in _IMP_core:
4832 _IMP_core.ChecksScoreState_swigregister(ChecksScoreState)
4833 class ChildrenRefiner(IMP.Refiner):
4834  r"""Proxy of C++ IMP::core::ChildrenRefiner class."""
4835 
4836  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4837 
4838  def __init__(self, tr):
4839  r"""__init__(ChildrenRefiner self, HierarchyTraits tr) -> ChildrenRefiner"""
4840  _IMP_core.ChildrenRefiner_swiginit(self, _IMP_core.new_ChildrenRefiner(tr))
4841 
4842  def do_get_inputs(self, m, pis):
4843  r"""do_get_inputs(ChildrenRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4844  return _IMP_core.ChildrenRefiner_do_get_inputs(self, m, pis)
4845 
4846  def get_version_info(self):
4847  r"""get_version_info(ChildrenRefiner self) -> VersionInfo"""
4848  return _IMP_core.ChildrenRefiner_get_version_info(self)
4849  __swig_destroy__ = _IMP_core.delete_ChildrenRefiner
4850 
4851  def __str__(self):
4852  r"""__str__(ChildrenRefiner self) -> std::string"""
4853  return _IMP_core.ChildrenRefiner___str__(self)
4854 
4855  def __repr__(self):
4856  r"""__repr__(ChildrenRefiner self) -> std::string"""
4857  return _IMP_core.ChildrenRefiner___repr__(self)
4858 
4859  @staticmethod
4860  def get_from(o):
4861  return _object_cast_to_ChildrenRefiner(o)
4862 
4863 
4864 # Register ChildrenRefiner in _IMP_core:
4865 _IMP_core.ChildrenRefiner_swigregister(ChildrenRefiner)
4866 class ClosedCubicSpline(IMP.UnaryFunction):
4867  r"""Proxy of C++ IMP::core::ClosedCubicSpline class."""
4868 
4869  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4870 
4871  def __init__(self, values, minrange, spacing):
4872  r"""__init__(ClosedCubicSpline self, IMP::Floats const & values, double minrange, double spacing) -> ClosedCubicSpline"""
4873  _IMP_core.ClosedCubicSpline_swiginit(self, _IMP_core.new_ClosedCubicSpline(values, minrange, spacing))
4874 
4875  def get_version_info(self):
4876  r"""get_version_info(ClosedCubicSpline self) -> VersionInfo"""
4877  return _IMP_core.ClosedCubicSpline_get_version_info(self)
4878  __swig_destroy__ = _IMP_core.delete_ClosedCubicSpline
4879 
4880  def do_show(self, out):
4881  r"""do_show(ClosedCubicSpline self, _ostream out)"""
4882  return _IMP_core.ClosedCubicSpline_do_show(self, out)
4883 
4884  def get_minrange(self):
4885  r"""get_minrange(ClosedCubicSpline self) -> IMP::Float"""
4886  return _IMP_core.ClosedCubicSpline_get_minrange(self)
4887 
4888  def get_spacing(self):
4889  r"""get_spacing(ClosedCubicSpline self) -> IMP::Float"""
4890  return _IMP_core.ClosedCubicSpline_get_spacing(self)
4891 
4892  def get_values(self):
4893  r"""get_values(ClosedCubicSpline self) -> IMP::Floats"""
4894  return _IMP_core.ClosedCubicSpline_get_values(self)
4895 
4896  def get_second_derivatives(self):
4897  r"""get_second_derivatives(ClosedCubicSpline self) -> IMP::Floats"""
4898  return _IMP_core.ClosedCubicSpline_get_second_derivatives(self)
4899 
4900  def __str__(self):
4901  r"""__str__(ClosedCubicSpline self) -> std::string"""
4902  return _IMP_core.ClosedCubicSpline___str__(self)
4903 
4904  def __repr__(self):
4905  r"""__repr__(ClosedCubicSpline self) -> std::string"""
4906  return _IMP_core.ClosedCubicSpline___repr__(self)
4907 
4908  @staticmethod
4909  def get_from(o):
4910  return _object_cast_to_ClosedCubicSpline(o)
4911 
4912 
4913  def _get_jax(self):
4914  import jax.numpy as jnp
4915  from IMP.core._jax_util import _spline
4916  def score(feature, minrange, spacing, values, second_derivs):
4917  # determine bin index and thus the cubic fragment to use:
4918  lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
4919  # enforce periodicity - wrap around from n to 0
4920  highbin = jnp.remainder(lowbin + 1, len(values))
4921  return _spline(feature, minrange, lowbin, highbin, spacing,
4922  values, second_derivs)
4923  return functools.partial(
4924  score, minrange=self.get_minrange(),
4925  spacing=self.get_spacing(), values=jnp.asarray(self.get_values()),
4926  second_derivs=jnp.asarray(self.get_second_derivatives()))
4927 
4928 
4929 # Register ClosedCubicSpline in _IMP_core:
4930 _IMP_core.ClosedCubicSpline_swigregister(ClosedCubicSpline)
4931 class KClosePairsPairScore(IMP.PairScore):
4932  r"""Proxy of C++ IMP::core::KClosePairsPairScore class."""
4933 
4934  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4935 
4936  def __init__(self, f, r, k=1):
4937  r"""__init__(KClosePairsPairScore self, PairScore f, Refiner r, int k=1) -> KClosePairsPairScore"""
4938  _IMP_core.KClosePairsPairScore_swiginit(self, _IMP_core.new_KClosePairsPairScore(f, r, k))
4939 
4940  def get_close_pairs(self, pp):
4941  r"""get_close_pairs(KClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
4942  return _IMP_core.KClosePairsPairScore_get_close_pairs(self, pp)
4943 
4944  def create_current_decomposition(self, m, vt):
4945  r"""create_current_decomposition(KClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
4946  return _IMP_core.KClosePairsPairScore_create_current_decomposition(self, m, vt)
4947 
4948  def do_get_inputs(self, m, pis):
4949  r"""do_get_inputs(KClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
4950  return _IMP_core.KClosePairsPairScore_do_get_inputs(self, m, pis)
4951 
4952  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
4953  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"""
4954  return _IMP_core.KClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
4955 
4956  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
4957  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"""
4958  return _IMP_core.KClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
4959 
4960  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
4961  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"""
4962  return _IMP_core.KClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
4963 
4964  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
4965  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"""
4966  return _IMP_core.KClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
4967 
4968  def get_version_info(self):
4969  r"""get_version_info(KClosePairsPairScore self) -> VersionInfo"""
4970  return _IMP_core.KClosePairsPairScore_get_version_info(self)
4971  __swig_destroy__ = _IMP_core.delete_KClosePairsPairScore
4972 
4973  def __str__(self):
4974  r"""__str__(KClosePairsPairScore self) -> std::string"""
4975  return _IMP_core.KClosePairsPairScore___str__(self)
4976 
4977  def __repr__(self):
4978  r"""__repr__(KClosePairsPairScore self) -> std::string"""
4979  return _IMP_core.KClosePairsPairScore___repr__(self)
4980 
4981  @staticmethod
4982  def get_from(o):
4983  return _object_cast_to_KClosePairsPairScore(o)
4984 
4985 
4986 # Register KClosePairsPairScore in _IMP_core:
4987 _IMP_core.KClosePairsPairScore_swigregister(KClosePairsPairScore)
4988 class ClosePairsPairScore(IMP.PairScore):
4989  r"""Proxy of C++ IMP::core::ClosePairsPairScore class."""
4990 
4991  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4992 
4993  def __init__(self, f, r, max_distance):
4994  r"""__init__(ClosePairsPairScore self, PairScore f, Refiner r, IMP::Float max_distance) -> ClosePairsPairScore"""
4995  _IMP_core.ClosePairsPairScore_swiginit(self, _IMP_core.new_ClosePairsPairScore(f, r, max_distance))
4996 
4997  def get_close_pairs(self, pp):
4998  r"""get_close_pairs(ClosePairsPairScore self, IMP::ParticlePair const & pp) -> IMP::ParticlePairsTemp"""
4999  return _IMP_core.ClosePairsPairScore_get_close_pairs(self, pp)
5000 
5001  def create_current_decomposition(self, m, vt):
5002  r"""create_current_decomposition(ClosePairsPairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
5003  return _IMP_core.ClosePairsPairScore_create_current_decomposition(self, m, vt)
5004 
5005  def do_get_inputs(self, m, pis):
5006  r"""do_get_inputs(ClosePairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5007  return _IMP_core.ClosePairsPairScore_do_get_inputs(self, m, pis)
5008 
5009  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
5010  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"""
5011  return _IMP_core.ClosePairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
5012 
5013  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
5014  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"""
5015  return _IMP_core.ClosePairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
5016 
5017  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
5018  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"""
5019  return _IMP_core.ClosePairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
5020 
5021  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
5022  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"""
5023  return _IMP_core.ClosePairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
5024 
5025  def get_version_info(self):
5026  r"""get_version_info(ClosePairsPairScore self) -> VersionInfo"""
5027  return _IMP_core.ClosePairsPairScore_get_version_info(self)
5028  __swig_destroy__ = _IMP_core.delete_ClosePairsPairScore
5029 
5030  def __str__(self):
5031  r"""__str__(ClosePairsPairScore self) -> std::string"""
5032  return _IMP_core.ClosePairsPairScore___str__(self)
5033 
5034  def __repr__(self):
5035  r"""__repr__(ClosePairsPairScore self) -> std::string"""
5036  return _IMP_core.ClosePairsPairScore___repr__(self)
5037 
5038  @staticmethod
5039  def get_from(o):
5040  return _object_cast_to_ClosePairsPairScore(o)
5041 
5042 
5043 # Register ClosePairsPairScore in _IMP_core:
5044 _IMP_core.ClosePairsPairScore_swigregister(ClosePairsPairScore)
5045 class ConjugateGradients(IMP.AttributeOptimizer):
5046  r"""Proxy of C++ IMP::core::ConjugateGradients class."""
5047 
5048  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5049 
5050  def __init__(self, *args):
5051  r"""
5052  __init__(ConjugateGradients self, Model m, std::string name="ConjugateGradients%1%") -> ConjugateGradients
5053  __init__(ConjugateGradients self) -> ConjugateGradients
5054  """
5055  _IMP_core.ConjugateGradients_swiginit(self, _IMP_core.new_ConjugateGradients(*args))
5056 
5057  def set_gradient_threshold(self, t):
5058  r"""set_gradient_threshold(ConjugateGradients self, IMP::Float t)"""
5059  return _IMP_core.ConjugateGradients_set_gradient_threshold(self, t)
5060 
5061  def set_max_change(self, t):
5062  r"""set_max_change(ConjugateGradients self, IMP::Float t)"""
5063  return _IMP_core.ConjugateGradients_set_max_change(self, t)
5064 
5065  def do_optimize(self, max_steps):
5066  r"""do_optimize(ConjugateGradients self, unsigned int max_steps) -> IMP::Float"""
5067  return _IMP_core.ConjugateGradients_do_optimize(self, max_steps)
5068 
5069  def get_version_info(self):
5070  r"""get_version_info(ConjugateGradients self) -> VersionInfo"""
5071  return _IMP_core.ConjugateGradients_get_version_info(self)
5072  __swig_destroy__ = _IMP_core.delete_ConjugateGradients
5073 
5074  def __str__(self):
5075  r"""__str__(ConjugateGradients self) -> std::string"""
5076  return _IMP_core.ConjugateGradients___str__(self)
5077 
5078  def __repr__(self):
5079  r"""__repr__(ConjugateGradients self) -> std::string"""
5080  return _IMP_core.ConjugateGradients___repr__(self)
5081 
5082  @staticmethod
5083  def get_from(o):
5084  return _object_cast_to_ConjugateGradients(o)
5085 
5086 
5087  def _get_as_binary(self):
5088  r"""_get_as_binary(ConjugateGradients self) -> PyObject *"""
5089  return _IMP_core.ConjugateGradients__get_as_binary(self)
5090 
5091  def _set_from_binary(self, p):
5092  r"""_set_from_binary(ConjugateGradients self, PyObject * p)"""
5093  return _IMP_core.ConjugateGradients__set_from_binary(self, p)
5094 
5095  def __getstate__(self):
5096  p = self._get_as_binary()
5097  if len(self.__dict__) > 1:
5098  d = self.__dict__.copy()
5099  del d['this']
5100  p = (d, p)
5101  return p
5102 
5103  def __setstate__(self, p):
5104  if not hasattr(self, 'this'):
5105  self.__init__()
5106  if isinstance(p, tuple):
5107  d, p = p
5108  self.__dict__.update(d)
5109  return self._set_from_binary(p)
5110 
5111 
5112 # Register ConjugateGradients in _IMP_core:
5113 _IMP_core.ConjugateGradients_swigregister(ConjugateGradients)
5114 class ConnectivityRestraint(IMP.Restraint):
5115  r"""Proxy of C++ IMP::core::ConnectivityRestraint class."""
5116 
5117  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5118 
5119  def __init__(self, ps, sc):
5120  r"""__init__(ConnectivityRestraint self, PairScore ps, _SingletonContainerAdaptor sc) -> ConnectivityRestraint"""
5121  _IMP_core.ConnectivityRestraint_swiginit(self, _IMP_core.new_ConnectivityRestraint(ps, sc))
5122 
5123  def get_connected_index_pairs(self):
5124  r"""get_connected_index_pairs(ConnectivityRestraint self) -> IMP::ParticleIndexPairs"""
5125  return _IMP_core.ConnectivityRestraint_get_connected_index_pairs(self)
5126 
5127  def get_pair_score(self):
5128  r"""get_pair_score(ConnectivityRestraint self) -> PairScore"""
5129  return _IMP_core.ConnectivityRestraint_get_pair_score(self)
5130 
5131  def do_create_current_decomposition(self):
5132  r"""do_create_current_decomposition(ConnectivityRestraint self) -> IMP::Restraints"""
5133  return _IMP_core.ConnectivityRestraint_do_create_current_decomposition(self)
5134 
5135  def do_get_inputs(self):
5136  r"""do_get_inputs(ConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
5137  return _IMP_core.ConnectivityRestraint_do_get_inputs(self)
5138 
5139  def get_version_info(self):
5140  r"""get_version_info(ConnectivityRestraint self) -> VersionInfo"""
5141  return _IMP_core.ConnectivityRestraint_get_version_info(self)
5142  __swig_destroy__ = _IMP_core.delete_ConnectivityRestraint
5143 
5144  def __str__(self):
5145  r"""__str__(ConnectivityRestraint self) -> std::string"""
5146  return _IMP_core.ConnectivityRestraint___str__(self)
5147 
5148  def __repr__(self):
5149  r"""__repr__(ConnectivityRestraint self) -> std::string"""
5150  return _IMP_core.ConnectivityRestraint___repr__(self)
5151 
5152  @staticmethod
5153  def get_from(o):
5154  return _object_cast_to_ConnectivityRestraint(o)
5155 
5156 
5157 # Register ConnectivityRestraint in _IMP_core:
5158 _IMP_core.ConnectivityRestraint_swigregister(ConnectivityRestraint)
5159 class ConstantRestraint(IMP.Restraint):
5160  r"""Proxy of C++ IMP::core::ConstantRestraint class."""
5161 
5162  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5163 
5164  def __init__(self, *args):
5165  r"""
5166  __init__(ConstantRestraint self, Model m, IMP::Float v) -> ConstantRestraint
5167  __init__(ConstantRestraint self) -> ConstantRestraint
5168  """
5169  _IMP_core.ConstantRestraint_swiginit(self, _IMP_core.new_ConstantRestraint(*args))
5170 
5171  def do_get_inputs(self):
5172  r"""do_get_inputs(ConstantRestraint self) -> IMP::ModelObjectsTemp"""
5173  return _IMP_core.ConstantRestraint_do_get_inputs(self)
5174 
5175  def get_version_info(self):
5176  r"""get_version_info(ConstantRestraint self) -> VersionInfo"""
5177  return _IMP_core.ConstantRestraint_get_version_info(self)
5178  __swig_destroy__ = _IMP_core.delete_ConstantRestraint
5179 
5180  def __str__(self):
5181  r"""__str__(ConstantRestraint self) -> std::string"""
5182  return _IMP_core.ConstantRestraint___str__(self)
5183 
5184  def __repr__(self):
5185  r"""__repr__(ConstantRestraint self) -> std::string"""
5186  return _IMP_core.ConstantRestraint___repr__(self)
5187 
5188  @staticmethod
5189  def get_from(o):
5190  return _object_cast_to_ConstantRestraint(o)
5191 
5192 
5193  def _get_as_binary(self):
5194  r"""_get_as_binary(ConstantRestraint self) -> PyObject *"""
5195  return _IMP_core.ConstantRestraint__get_as_binary(self)
5196 
5197  def _set_from_binary(self, p):
5198  r"""_set_from_binary(ConstantRestraint self, PyObject * p)"""
5199  return _IMP_core.ConstantRestraint__set_from_binary(self, p)
5200 
5201  def __getstate__(self):
5202  p = self._get_as_binary()
5203  if len(self.__dict__) > 1:
5204  d = self.__dict__.copy()
5205  del d['this']
5206  p = (d, p)
5207  return p
5208 
5209  def __setstate__(self, p):
5210  if not hasattr(self, 'this'):
5211  self.__init__()
5212  if isinstance(p, tuple):
5213  d, p = p
5214  self.__dict__.update(d)
5215  return self._set_from_binary(p)
5216 
5217 
5218 # Register ConstantRestraint in _IMP_core:
5219 _IMP_core.ConstantRestraint_swigregister(ConstantRestraint)
5220 class Cosine(IMP.UnaryFunction):
5221  r"""Proxy of C++ IMP::core::Cosine class."""
5222 
5223  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5224 
5225  def __init__(self, *args):
5226  r"""
5227  __init__(Cosine self, IMP::Float force_constant, int periodicity, IMP::Float phase) -> Cosine
5228  __init__(Cosine self) -> Cosine
5229  """
5230  _IMP_core.Cosine_swiginit(self, _IMP_core.new_Cosine(*args))
5231 
5232  def get_force_constant(self):
5233  r"""get_force_constant(Cosine self) -> IMP::Float"""
5234  return _IMP_core.Cosine_get_force_constant(self)
5235 
5236  def get_periodicity(self):
5237  r"""get_periodicity(Cosine self) -> int"""
5238  return _IMP_core.Cosine_get_periodicity(self)
5239 
5240  def get_phase(self):
5241  r"""get_phase(Cosine self) -> IMP::Float"""
5242  return _IMP_core.Cosine_get_phase(self)
5243 
5244  def get_version_info(self):
5245  r"""get_version_info(Cosine self) -> VersionInfo"""
5246  return _IMP_core.Cosine_get_version_info(self)
5247  __swig_destroy__ = _IMP_core.delete_Cosine
5248 
5249  def do_show(self, out):
5250  r"""do_show(Cosine self, _ostream out)"""
5251  return _IMP_core.Cosine_do_show(self, out)
5252 
5253  def __str__(self):
5254  r"""__str__(Cosine self) -> std::string"""
5255  return _IMP_core.Cosine___str__(self)
5256 
5257  def __repr__(self):
5258  r"""__repr__(Cosine self) -> std::string"""
5259  return _IMP_core.Cosine___repr__(self)
5260 
5261  @staticmethod
5262  def get_from(o):
5263  return _object_cast_to_Cosine(o)
5264 
5265 
5266  def _get_as_binary(self):
5267  r"""_get_as_binary(Cosine self) -> PyObject *"""
5268  return _IMP_core.Cosine__get_as_binary(self)
5269 
5270  def _set_from_binary(self, p):
5271  r"""_set_from_binary(Cosine self, PyObject * p)"""
5272  return _IMP_core.Cosine__set_from_binary(self, p)
5273 
5274  def __getstate__(self):
5275  p = self._get_as_binary()
5276  if len(self.__dict__) > 1:
5277  d = self.__dict__.copy()
5278  del d['this']
5279  p = (d, p)
5280  return p
5281 
5282  def __setstate__(self, p):
5283  if not hasattr(self, 'this'):
5284  self.__init__()
5285  if isinstance(p, tuple):
5286  d, p = p
5287  self.__dict__.update(d)
5288  return self._set_from_binary(p)
5289 
5290 
5291  def _get_jax(self):
5292  import jax.numpy as jnp
5293  def score(val, k, period, phase):
5294  return jnp.abs(k) - k * jnp.cos(period * val + phase)
5295  return functools.partial(score, k=self.get_force_constant(),
5296  period=self.get_periodicity(),
5297  phase=self.get_phase())
5298 
5299 
5300 # Register Cosine in _IMP_core:
5301 _IMP_core.Cosine_swigregister(Cosine)
5302 class CoverRefined(IMP.SingletonModifier):
5303  r"""Proxy of C++ IMP::core::CoverRefined class."""
5304 
5305  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5306 
5307  def __init__(self, ref, slack=0):
5308  r"""__init__(CoverRefined self, Refiner ref, IMP::Float slack=0) -> CoverRefined"""
5309  _IMP_core.CoverRefined_swiginit(self, _IMP_core.new_CoverRefined(ref, slack))
5310 
5311  def set_slack(self, slack):
5312  r"""set_slack(CoverRefined self, IMP::Float slack)"""
5313  return _IMP_core.CoverRefined_set_slack(self, slack)
5314 
5315  def do_get_inputs(self, m, pis):
5316  r"""do_get_inputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5317  return _IMP_core.CoverRefined_do_get_inputs(self, m, pis)
5318 
5319  def do_get_outputs(self, m, pis):
5320  r"""do_get_outputs(CoverRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5321  return _IMP_core.CoverRefined_do_get_outputs(self, m, pis)
5322 
5323  def get_version_info(self):
5324  r"""get_version_info(CoverRefined self) -> VersionInfo"""
5325  return _IMP_core.CoverRefined_get_version_info(self)
5326  __swig_destroy__ = _IMP_core.delete_CoverRefined
5327 
5328  def __str__(self):
5329  r"""__str__(CoverRefined self) -> std::string"""
5330  return _IMP_core.CoverRefined___str__(self)
5331 
5332  def __repr__(self):
5333  r"""__repr__(CoverRefined self) -> std::string"""
5334  return _IMP_core.CoverRefined___repr__(self)
5335 
5336  @staticmethod
5337  def get_from(o):
5338  return _object_cast_to_CoverRefined(o)
5339 
5340 
5341 # Register CoverRefined in _IMP_core:
5342 _IMP_core.CoverRefined_swigregister(CoverRefined)
5343 class Cover(XYZR):
5344  r"""Proxy of C++ IMP::core::Cover class."""
5345 
5346  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5347 
5348  def get_constraint(self):
5349  r"""get_constraint(Cover self) -> Constraint"""
5350  return _IMP_core.Cover_get_constraint(self)
5351 
5352  def __init__(self, *args):
5353  r"""
5354  __init__(Cover self) -> Cover
5355  __init__(Cover self, Model m, ParticleIndex id) -> Cover
5356  __init__(Cover self, _ParticleAdaptor d) -> Cover
5357  """
5358  _IMP_core.Cover_swiginit(self, _IMP_core.new_Cover(*args))
5359 
5360  def show(self, *args):
5361  r"""show(Cover self, _ostream out=std::cout)"""
5362  return _IMP_core.Cover_show(self, *args)
5363 
5364  @staticmethod
5365  def setup_particle(*args):
5366  r"""
5367  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor members) -> Cover
5368  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor members) -> Cover
5369  setup_particle(Model m, ParticleIndex pi, Refiner refiner) -> Cover
5370  setup_particle(_ParticleAdaptor pa, Refiner refiner) -> Cover
5371  """
5372  return _IMP_core.Cover_setup_particle(*args)
5373 
5374  @staticmethod
5375  def get_is_setup(*args):
5376  r"""
5377  get_is_setup(_ParticleAdaptor p) -> bool
5378  get_is_setup(Model m, ParticleIndex pi) -> bool
5379  """
5380  return _IMP_core.Cover_get_is_setup(*args)
5381 
5382  def add_attribute(self, *args):
5383  r"""
5384  add_attribute(Cover self, FloatKey k, IMP::Float v, bool opt)
5385  add_attribute(Cover self, FloatKey a0, IMP::Float a1)
5386  add_attribute(Cover self, IntKey a0, IMP::Int a1)
5387  add_attribute(Cover self, FloatsKey a0, IMP::Floats a1)
5388  add_attribute(Cover self, IntsKey a0, IMP::Ints a1)
5389  add_attribute(Cover self, StringKey a0, IMP::String a1)
5390  add_attribute(Cover self, ParticleIndexKey a0, Particle a1)
5391  add_attribute(Cover self, ObjectKey a0, Object a1)
5392  add_attribute(Cover self, SparseFloatKey a0, IMP::Float a1)
5393  add_attribute(Cover self, SparseIntKey a0, IMP::Int a1)
5394  add_attribute(Cover self, SparseStringKey a0, IMP::String a1)
5395  add_attribute(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5396  """
5397  return _IMP_core.Cover_add_attribute(self, *args)
5398 
5399  def get_value(self, *args):
5400  r"""
5401  get_value(Cover self, FloatKey a0) -> IMP::Float
5402  get_value(Cover self, IntKey a0) -> IMP::Int
5403  get_value(Cover self, FloatsKey a0) -> IMP::Floats
5404  get_value(Cover self, IntsKey a0) -> IMP::Ints
5405  get_value(Cover self, StringKey a0) -> IMP::String
5406  get_value(Cover self, ParticleIndexKey a0) -> Particle
5407  get_value(Cover self, ObjectKey a0) -> Object
5408  get_value(Cover self, SparseFloatKey a0) -> IMP::Float
5409  get_value(Cover self, SparseIntKey a0) -> IMP::Int
5410  get_value(Cover self, SparseStringKey a0) -> IMP::String
5411  get_value(Cover self, SparseParticleIndexKey a0) -> ParticleIndex
5412  """
5413  return _IMP_core.Cover_get_value(self, *args)
5414 
5415  def set_value(self, *args):
5416  r"""
5417  set_value(Cover self, FloatKey a0, IMP::Float a1)
5418  set_value(Cover self, IntKey a0, IMP::Int a1)
5419  set_value(Cover self, FloatsKey a0, IMP::Floats a1)
5420  set_value(Cover self, IntsKey a0, IMP::Ints a1)
5421  set_value(Cover self, StringKey a0, IMP::String a1)
5422  set_value(Cover self, ParticleIndexKey a0, Particle a1)
5423  set_value(Cover self, ObjectKey a0, Object a1)
5424  set_value(Cover self, SparseFloatKey a0, IMP::Float a1)
5425  set_value(Cover self, SparseIntKey a0, IMP::Int a1)
5426  set_value(Cover self, SparseStringKey a0, IMP::String a1)
5427  set_value(Cover self, SparseParticleIndexKey a0, ParticleIndex a1)
5428  """
5429  return _IMP_core.Cover_set_value(self, *args)
5430 
5431  def remove_attribute(self, *args):
5432  r"""
5433  remove_attribute(Cover self, FloatKey a0)
5434  remove_attribute(Cover self, IntKey a0)
5435  remove_attribute(Cover self, FloatsKey a0)
5436  remove_attribute(Cover self, IntsKey a0)
5437  remove_attribute(Cover self, StringKey a0)
5438  remove_attribute(Cover self, ParticleIndexKey a0)
5439  remove_attribute(Cover self, ObjectKey a0)
5440  remove_attribute(Cover self, SparseFloatKey a0)
5441  remove_attribute(Cover self, SparseIntKey a0)
5442  remove_attribute(Cover self, SparseStringKey a0)
5443  remove_attribute(Cover self, SparseParticleIndexKey a0)
5444  """
5445  return _IMP_core.Cover_remove_attribute(self, *args)
5446 
5447  def has_attribute(self, *args):
5448  r"""
5449  has_attribute(Cover self, FloatKey a0) -> bool
5450  has_attribute(Cover self, IntKey a0) -> bool
5451  has_attribute(Cover self, FloatsKey a0) -> bool
5452  has_attribute(Cover self, IntsKey a0) -> bool
5453  has_attribute(Cover self, StringKey a0) -> bool
5454  has_attribute(Cover self, ParticleIndexKey a0) -> bool
5455  has_attribute(Cover self, ObjectKey a0) -> bool
5456  has_attribute(Cover self, SparseFloatKey a0) -> bool
5457  has_attribute(Cover self, SparseIntKey a0) -> bool
5458  has_attribute(Cover self, SparseStringKey a0) -> bool
5459  has_attribute(Cover self, SparseParticleIndexKey a0) -> bool
5460  """
5461  return _IMP_core.Cover_has_attribute(self, *args)
5462 
5463  def get_derivative(self, a0):
5464  r"""get_derivative(Cover self, FloatKey a0) -> double"""
5465  return _IMP_core.Cover_get_derivative(self, a0)
5466 
5467  def get_name(self):
5468  r"""get_name(Cover self) -> std::string"""
5469  return _IMP_core.Cover_get_name(self)
5470 
5471  def clear_caches(self):
5472  r"""clear_caches(Cover self)"""
5473  return _IMP_core.Cover_clear_caches(self)
5474 
5475  def set_name(self, a0):
5476  r"""set_name(Cover self, std::string a0)"""
5477  return _IMP_core.Cover_set_name(self, a0)
5478 
5479  def set_check_level(self, a0):
5480  r"""set_check_level(Cover self, IMP::CheckLevel a0)"""
5481  return _IMP_core.Cover_set_check_level(self, a0)
5482 
5483  def add_to_derivative(self, a0, a1, a2):
5484  r"""add_to_derivative(Cover self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5485  return _IMP_core.Cover_add_to_derivative(self, a0, a1, a2)
5486 
5487  def set_is_optimized(self, a0, a1):
5488  r"""set_is_optimized(Cover self, FloatKey a0, bool a1)"""
5489  return _IMP_core.Cover_set_is_optimized(self, a0, a1)
5490 
5491  def get_is_optimized(self, a0):
5492  r"""get_is_optimized(Cover self, FloatKey a0) -> bool"""
5493  return _IMP_core.Cover_get_is_optimized(self, a0)
5494 
5495  def get_check_level(self):
5496  r"""get_check_level(Cover self) -> IMP::CheckLevel"""
5497  return _IMP_core.Cover_get_check_level(self)
5498 
5499  def __eq__(self, *args):
5500  r"""
5501  __eq__(Cover self, Cover o) -> bool
5502  __eq__(Cover self, Particle d) -> bool
5503  """
5504  return _IMP_core.Cover___eq__(self, *args)
5505 
5506  def __ne__(self, *args):
5507  r"""
5508  __ne__(Cover self, Cover o) -> bool
5509  __ne__(Cover self, Particle d) -> bool
5510  """
5511  return _IMP_core.Cover___ne__(self, *args)
5512 
5513  def __le__(self, *args):
5514  r"""
5515  __le__(Cover self, Cover o) -> bool
5516  __le__(Cover self, Particle d) -> bool
5517  """
5518  return _IMP_core.Cover___le__(self, *args)
5519 
5520  def __lt__(self, *args):
5521  r"""
5522  __lt__(Cover self, Cover o) -> bool
5523  __lt__(Cover self, Particle d) -> bool
5524  """
5525  return _IMP_core.Cover___lt__(self, *args)
5526 
5527  def __ge__(self, *args):
5528  r"""
5529  __ge__(Cover self, Cover o) -> bool
5530  __ge__(Cover self, Particle d) -> bool
5531  """
5532  return _IMP_core.Cover___ge__(self, *args)
5533 
5534  def __gt__(self, *args):
5535  r"""
5536  __gt__(Cover self, Cover o) -> bool
5537  __gt__(Cover self, Particle d) -> bool
5538  """
5539  return _IMP_core.Cover___gt__(self, *args)
5540 
5541  def __hash__(self):
5542  r"""__hash__(Cover self) -> std::size_t"""
5543  return _IMP_core.Cover___hash__(self)
5544 
5545  def __str__(self):
5546  r"""__str__(Cover self) -> std::string"""
5547  return _IMP_core.Cover___str__(self)
5548 
5549  def __repr__(self):
5550  r"""__repr__(Cover self) -> std::string"""
5551  return _IMP_core.Cover___repr__(self)
5552 
5553  def _get_as_binary(self):
5554  r"""_get_as_binary(Cover self) -> PyObject *"""
5555  return _IMP_core.Cover__get_as_binary(self)
5556 
5557  def _set_from_binary(self, p):
5558  r"""_set_from_binary(Cover self, PyObject * p)"""
5559  return _IMP_core.Cover__set_from_binary(self, p)
5560 
5561  def __getstate__(self):
5562  p = self._get_as_binary()
5563  if len(self.__dict__) > 1:
5564  d = self.__dict__.copy()
5565  del d['this']
5566  p = (d, p)
5567  return p
5568 
5569  def __setstate__(self, p):
5570  if not hasattr(self, 'this'):
5571  self.__init__()
5572  if isinstance(p, tuple):
5573  d, p = p
5574  self.__dict__.update(d)
5575  return self._set_from_binary(p)
5576 
5577  __swig_destroy__ = _IMP_core.delete_Cover
5578 
5579 # Register Cover in _IMP_core:
5580 _IMP_core.Cover_swigregister(Cover)
5581 class DerivativesFromRefined(IMP.SingletonModifier):
5582  r"""Proxy of C++ IMP::core::DerivativesFromRefined class."""
5583 
5584  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5585 
5586  def __init__(self, *args):
5587  r"""__init__(DerivativesFromRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesFromRefined"""
5588  _IMP_core.DerivativesFromRefined_swiginit(self, _IMP_core.new_DerivativesFromRefined(*args))
5589 
5590  def do_get_inputs(self, m, pis):
5591  r"""do_get_inputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5592  return _IMP_core.DerivativesFromRefined_do_get_inputs(self, m, pis)
5593 
5594  def do_get_outputs(self, m, pis):
5595  r"""do_get_outputs(DerivativesFromRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5596  return _IMP_core.DerivativesFromRefined_do_get_outputs(self, m, pis)
5597 
5598  def get_version_info(self):
5599  r"""get_version_info(DerivativesFromRefined self) -> VersionInfo"""
5600  return _IMP_core.DerivativesFromRefined_get_version_info(self)
5601  __swig_destroy__ = _IMP_core.delete_DerivativesFromRefined
5602 
5603  def __str__(self):
5604  r"""__str__(DerivativesFromRefined self) -> std::string"""
5605  return _IMP_core.DerivativesFromRefined___str__(self)
5606 
5607  def __repr__(self):
5608  r"""__repr__(DerivativesFromRefined self) -> std::string"""
5609  return _IMP_core.DerivativesFromRefined___repr__(self)
5610 
5611  @staticmethod
5612  def get_from(o):
5613  return _object_cast_to_DerivativesFromRefined(o)
5614 
5615 
5616 # Register DerivativesFromRefined in _IMP_core:
5617 _IMP_core.DerivativesFromRefined_swigregister(DerivativesFromRefined)
5618 class DerivativesToRefined(IMP.SingletonModifier):
5619  r"""Proxy of C++ IMP::core::DerivativesToRefined class."""
5620 
5621  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5622 
5623  def __init__(self, *args):
5624  r"""
5625  __init__(DerivativesToRefined self, Refiner r, IMP::FloatKeys ks=IMP::core::XYZ::get_xyz_keys()) -> DerivativesToRefined
5626  __init__(DerivativesToRefined self) -> DerivativesToRefined
5627  """
5628  _IMP_core.DerivativesToRefined_swiginit(self, _IMP_core.new_DerivativesToRefined(*args))
5629 
5630  def do_get_inputs(self, m, pis):
5631  r"""do_get_inputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5632  return _IMP_core.DerivativesToRefined_do_get_inputs(self, m, pis)
5633 
5634  def do_get_outputs(self, m, pis):
5635  r"""do_get_outputs(DerivativesToRefined self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5636  return _IMP_core.DerivativesToRefined_do_get_outputs(self, m, pis)
5637 
5638  def get_version_info(self):
5639  r"""get_version_info(DerivativesToRefined self) -> VersionInfo"""
5640  return _IMP_core.DerivativesToRefined_get_version_info(self)
5641  __swig_destroy__ = _IMP_core.delete_DerivativesToRefined
5642 
5643  def __str__(self):
5644  r"""__str__(DerivativesToRefined self) -> std::string"""
5645  return _IMP_core.DerivativesToRefined___str__(self)
5646 
5647  def __repr__(self):
5648  r"""__repr__(DerivativesToRefined self) -> std::string"""
5649  return _IMP_core.DerivativesToRefined___repr__(self)
5650 
5651  @staticmethod
5652  def get_from(o):
5653  return _object_cast_to_DerivativesToRefined(o)
5654 
5655 
5656  def _get_as_binary(self):
5657  r"""_get_as_binary(DerivativesToRefined self) -> PyObject *"""
5658  return _IMP_core.DerivativesToRefined__get_as_binary(self)
5659 
5660  def _set_from_binary(self, p):
5661  r"""_set_from_binary(DerivativesToRefined self, PyObject * p)"""
5662  return _IMP_core.DerivativesToRefined__set_from_binary(self, p)
5663 
5664  def __getstate__(self):
5665  p = self._get_as_binary()
5666  if len(self.__dict__) > 1:
5667  d = self.__dict__.copy()
5668  del d['this']
5669  p = (d, p)
5670  return p
5671 
5672  def __setstate__(self, p):
5673  if not hasattr(self, 'this'):
5674  self.__init__()
5675  if isinstance(p, tuple):
5676  d, p = p
5677  self.__dict__.update(d)
5678  return self._set_from_binary(p)
5679 
5680 
5681 # Register DerivativesToRefined in _IMP_core:
5682 _IMP_core.DerivativesToRefined_swigregister(DerivativesToRefined)
5683 class DiameterRestraint(IMP.Restraint):
5684  r"""Proxy of C++ IMP::core::DiameterRestraint class."""
5685 
5686  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5687 
5688  def __init__(self, f, sc, diameter):
5689  r"""__init__(DiameterRestraint self, UnaryFunction f, SingletonContainer sc, IMP::Float diameter) -> DiameterRestraint"""
5690  _IMP_core.DiameterRestraint_swiginit(self, _IMP_core.new_DiameterRestraint(f, sc, diameter))
5691 
5692  def do_get_inputs(self):
5693  r"""do_get_inputs(DiameterRestraint self) -> IMP::ModelObjectsTemp"""
5694  return _IMP_core.DiameterRestraint_do_get_inputs(self)
5695 
5696  def get_version_info(self):
5697  r"""get_version_info(DiameterRestraint self) -> VersionInfo"""
5698  return _IMP_core.DiameterRestraint_get_version_info(self)
5699  __swig_destroy__ = _IMP_core.delete_DiameterRestraint
5700 
5701  def do_create_decomposition(self):
5702  r"""do_create_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5703  return _IMP_core.DiameterRestraint_do_create_decomposition(self)
5704 
5705  def do_create_current_decomposition(self):
5706  r"""do_create_current_decomposition(DiameterRestraint self) -> IMP::Restraints"""
5707  return _IMP_core.DiameterRestraint_do_create_current_decomposition(self)
5708 
5709  def __str__(self):
5710  r"""__str__(DiameterRestraint self) -> std::string"""
5711  return _IMP_core.DiameterRestraint___str__(self)
5712 
5713  def __repr__(self):
5714  r"""__repr__(DiameterRestraint self) -> std::string"""
5715  return _IMP_core.DiameterRestraint___repr__(self)
5716 
5717  @staticmethod
5718  def get_from(o):
5719  return _object_cast_to_DiameterRestraint(o)
5720 
5721 
5722 # Register DiameterRestraint in _IMP_core:
5723 _IMP_core.DiameterRestraint_swigregister(DiameterRestraint)
5724 class Transform(IMP.SingletonModifier):
5725  r"""Proxy of C++ IMP::core::Transform class."""
5726 
5727  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5728 
5729  def __init__(self, *args):
5730  r"""
5731  __init__(Transform self, Transformation3D t, bool ignore_non_xyz=False) -> Transform
5732  __init__(Transform self) -> Transform
5733  """
5734  _IMP_core.Transform_swiginit(self, _IMP_core.new_Transform(*args))
5735 
5736  def do_get_inputs(self, m, pis):
5737  r"""do_get_inputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5738  return _IMP_core.Transform_do_get_inputs(self, m, pis)
5739 
5740  def do_get_outputs(self, m, pis):
5741  r"""do_get_outputs(Transform self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
5742  return _IMP_core.Transform_do_get_outputs(self, m, pis)
5743 
5744  def get_version_info(self):
5745  r"""get_version_info(Transform self) -> VersionInfo"""
5746  return _IMP_core.Transform_get_version_info(self)
5747  __swig_destroy__ = _IMP_core.delete_Transform
5748 
5749  def __str__(self):
5750  r"""__str__(Transform self) -> std::string"""
5751  return _IMP_core.Transform___str__(self)
5752 
5753  def __repr__(self):
5754  r"""__repr__(Transform self) -> std::string"""
5755  return _IMP_core.Transform___repr__(self)
5756 
5757  @staticmethod
5758  def get_from(o):
5759  return _object_cast_to_Transform(o)
5760 
5761 
5762  def _get_as_binary(self):
5763  r"""_get_as_binary(Transform self) -> PyObject *"""
5764  return _IMP_core.Transform__get_as_binary(self)
5765 
5766  def _set_from_binary(self, p):
5767  r"""_set_from_binary(Transform self, PyObject * p)"""
5768  return _IMP_core.Transform__set_from_binary(self, p)
5769 
5770  def __getstate__(self):
5771  p = self._get_as_binary()
5772  if len(self.__dict__) > 1:
5773  d = self.__dict__.copy()
5774  del d['this']
5775  p = (d, p)
5776  return p
5777 
5778  def __setstate__(self, p):
5779  if not hasattr(self, 'this'):
5780  self.__init__()
5781  if isinstance(p, tuple):
5782  d, p = p
5783  self.__dict__.update(d)
5784  return self._set_from_binary(p)
5785 
5786 
5787 # Register Transform in _IMP_core:
5788 _IMP_core.Transform_swigregister(Transform)
5789 class Reference(IMP.Decorator):
5790  r"""Proxy of C++ IMP::core::Reference class."""
5791 
5792  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5793 
5794  def __init__(self, *args):
5795  r"""
5796  __init__(Reference self) -> Reference
5797  __init__(Reference self, Model m, ParticleIndex id) -> Reference
5798  __init__(Reference self, _ParticleAdaptor d) -> Reference
5799  """
5800  _IMP_core.Reference_swiginit(self, _IMP_core.new_Reference(*args))
5801 
5802  def show(self, *args):
5803  r"""show(Reference self, _ostream out=std::cout)"""
5804  return _IMP_core.Reference_show(self, *args)
5805 
5806  @staticmethod
5807  def setup_particle(*args):
5808  r"""
5809  setup_particle(Model m, ParticleIndex pi, _ParticleIndexAdaptor reference) -> Reference
5810  setup_particle(_ParticleAdaptor pa, _ParticleIndexAdaptor reference) -> Reference
5811  """
5812  return _IMP_core.Reference_setup_particle(*args)
5813 
5814  def get_reference_particle(self):
5815  r"""get_reference_particle(Reference self) -> Particle"""
5816  return _IMP_core.Reference_get_reference_particle(self)
5817 
5818  @staticmethod
5819  def get_is_setup(*args):
5820  r"""
5821  get_is_setup(_ParticleAdaptor p) -> bool
5822  get_is_setup(Model m, ParticleIndex pi) -> bool
5823  """
5824  return _IMP_core.Reference_get_is_setup(*args)
5825 
5826  @staticmethod
5827  def get_reference_key():
5828  r"""get_reference_key() -> ParticleIndexKey"""
5829  return _IMP_core.Reference_get_reference_key()
5830 
5831  def add_attribute(self, *args):
5832  r"""
5833  add_attribute(Reference self, FloatKey k, IMP::Float v, bool opt)
5834  add_attribute(Reference self, FloatKey a0, IMP::Float a1)
5835  add_attribute(Reference self, IntKey a0, IMP::Int a1)
5836  add_attribute(Reference self, FloatsKey a0, IMP::Floats a1)
5837  add_attribute(Reference self, IntsKey a0, IMP::Ints a1)
5838  add_attribute(Reference self, StringKey a0, IMP::String a1)
5839  add_attribute(Reference self, ParticleIndexKey a0, Particle a1)
5840  add_attribute(Reference self, ObjectKey a0, Object a1)
5841  add_attribute(Reference self, SparseFloatKey a0, IMP::Float a1)
5842  add_attribute(Reference self, SparseIntKey a0, IMP::Int a1)
5843  add_attribute(Reference self, SparseStringKey a0, IMP::String a1)
5844  add_attribute(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5845  """
5846  return _IMP_core.Reference_add_attribute(self, *args)
5847 
5848  def get_value(self, *args):
5849  r"""
5850  get_value(Reference self, FloatKey a0) -> IMP::Float
5851  get_value(Reference self, IntKey a0) -> IMP::Int
5852  get_value(Reference self, FloatsKey a0) -> IMP::Floats
5853  get_value(Reference self, IntsKey a0) -> IMP::Ints
5854  get_value(Reference self, StringKey a0) -> IMP::String
5855  get_value(Reference self, ParticleIndexKey a0) -> Particle
5856  get_value(Reference self, ObjectKey a0) -> Object
5857  get_value(Reference self, SparseFloatKey a0) -> IMP::Float
5858  get_value(Reference self, SparseIntKey a0) -> IMP::Int
5859  get_value(Reference self, SparseStringKey a0) -> IMP::String
5860  get_value(Reference self, SparseParticleIndexKey a0) -> ParticleIndex
5861  """
5862  return _IMP_core.Reference_get_value(self, *args)
5863 
5864  def set_value(self, *args):
5865  r"""
5866  set_value(Reference self, FloatKey a0, IMP::Float a1)
5867  set_value(Reference self, IntKey a0, IMP::Int a1)
5868  set_value(Reference self, FloatsKey a0, IMP::Floats a1)
5869  set_value(Reference self, IntsKey a0, IMP::Ints a1)
5870  set_value(Reference self, StringKey a0, IMP::String a1)
5871  set_value(Reference self, ParticleIndexKey a0, Particle a1)
5872  set_value(Reference self, ObjectKey a0, Object a1)
5873  set_value(Reference self, SparseFloatKey a0, IMP::Float a1)
5874  set_value(Reference self, SparseIntKey a0, IMP::Int a1)
5875  set_value(Reference self, SparseStringKey a0, IMP::String a1)
5876  set_value(Reference self, SparseParticleIndexKey a0, ParticleIndex a1)
5877  """
5878  return _IMP_core.Reference_set_value(self, *args)
5879 
5880  def remove_attribute(self, *args):
5881  r"""
5882  remove_attribute(Reference self, FloatKey a0)
5883  remove_attribute(Reference self, IntKey a0)
5884  remove_attribute(Reference self, FloatsKey a0)
5885  remove_attribute(Reference self, IntsKey a0)
5886  remove_attribute(Reference self, StringKey a0)
5887  remove_attribute(Reference self, ParticleIndexKey a0)
5888  remove_attribute(Reference self, ObjectKey a0)
5889  remove_attribute(Reference self, SparseFloatKey a0)
5890  remove_attribute(Reference self, SparseIntKey a0)
5891  remove_attribute(Reference self, SparseStringKey a0)
5892  remove_attribute(Reference self, SparseParticleIndexKey a0)
5893  """
5894  return _IMP_core.Reference_remove_attribute(self, *args)
5895 
5896  def has_attribute(self, *args):
5897  r"""
5898  has_attribute(Reference self, FloatKey a0) -> bool
5899  has_attribute(Reference self, IntKey a0) -> bool
5900  has_attribute(Reference self, FloatsKey a0) -> bool
5901  has_attribute(Reference self, IntsKey a0) -> bool
5902  has_attribute(Reference self, StringKey a0) -> bool
5903  has_attribute(Reference self, ParticleIndexKey a0) -> bool
5904  has_attribute(Reference self, ObjectKey a0) -> bool
5905  has_attribute(Reference self, SparseFloatKey a0) -> bool
5906  has_attribute(Reference self, SparseIntKey a0) -> bool
5907  has_attribute(Reference self, SparseStringKey a0) -> bool
5908  has_attribute(Reference self, SparseParticleIndexKey a0) -> bool
5909  """
5910  return _IMP_core.Reference_has_attribute(self, *args)
5911 
5912  def get_derivative(self, a0):
5913  r"""get_derivative(Reference self, FloatKey a0) -> double"""
5914  return _IMP_core.Reference_get_derivative(self, a0)
5915 
5916  def get_name(self):
5917  r"""get_name(Reference self) -> std::string"""
5918  return _IMP_core.Reference_get_name(self)
5919 
5920  def clear_caches(self):
5921  r"""clear_caches(Reference self)"""
5922  return _IMP_core.Reference_clear_caches(self)
5923 
5924  def set_name(self, a0):
5925  r"""set_name(Reference self, std::string a0)"""
5926  return _IMP_core.Reference_set_name(self, a0)
5927 
5928  def set_check_level(self, a0):
5929  r"""set_check_level(Reference self, IMP::CheckLevel a0)"""
5930  return _IMP_core.Reference_set_check_level(self, a0)
5931 
5932  def add_to_derivative(self, a0, a1, a2):
5933  r"""add_to_derivative(Reference self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
5934  return _IMP_core.Reference_add_to_derivative(self, a0, a1, a2)
5935 
5936  def set_is_optimized(self, a0, a1):
5937  r"""set_is_optimized(Reference self, FloatKey a0, bool a1)"""
5938  return _IMP_core.Reference_set_is_optimized(self, a0, a1)
5939 
5940  def get_is_optimized(self, a0):
5941  r"""get_is_optimized(Reference self, FloatKey a0) -> bool"""
5942  return _IMP_core.Reference_get_is_optimized(self, a0)
5943 
5944  def get_check_level(self):
5945  r"""get_check_level(Reference self) -> IMP::CheckLevel"""
5946  return _IMP_core.Reference_get_check_level(self)
5947 
5948  def __eq__(self, *args):
5949  r"""
5950  __eq__(Reference self, Reference o) -> bool
5951  __eq__(Reference self, Particle d) -> bool
5952  """
5953  return _IMP_core.Reference___eq__(self, *args)
5954 
5955  def __ne__(self, *args):
5956  r"""
5957  __ne__(Reference self, Reference o) -> bool
5958  __ne__(Reference self, Particle d) -> bool
5959  """
5960  return _IMP_core.Reference___ne__(self, *args)
5961 
5962  def __le__(self, *args):
5963  r"""
5964  __le__(Reference self, Reference o) -> bool
5965  __le__(Reference self, Particle d) -> bool
5966  """
5967  return _IMP_core.Reference___le__(self, *args)
5968 
5969  def __lt__(self, *args):
5970  r"""
5971  __lt__(Reference self, Reference o) -> bool
5972  __lt__(Reference self, Particle d) -> bool
5973  """
5974  return _IMP_core.Reference___lt__(self, *args)
5975 
5976  def __ge__(self, *args):
5977  r"""
5978  __ge__(Reference self, Reference o) -> bool
5979  __ge__(Reference self, Particle d) -> bool
5980  """
5981  return _IMP_core.Reference___ge__(self, *args)
5982 
5983  def __gt__(self, *args):
5984  r"""
5985  __gt__(Reference self, Reference o) -> bool
5986  __gt__(Reference self, Particle d) -> bool
5987  """
5988  return _IMP_core.Reference___gt__(self, *args)
5989 
5990  def __hash__(self):
5991  r"""__hash__(Reference self) -> std::size_t"""
5992  return _IMP_core.Reference___hash__(self)
5993 
5994  def __str__(self):
5995  r"""__str__(Reference self) -> std::string"""
5996  return _IMP_core.Reference___str__(self)
5997 
5998  def __repr__(self):
5999  r"""__repr__(Reference self) -> std::string"""
6000  return _IMP_core.Reference___repr__(self)
6001 
6002  def _get_as_binary(self):
6003  r"""_get_as_binary(Reference self) -> PyObject *"""
6004  return _IMP_core.Reference__get_as_binary(self)
6005 
6006  def _set_from_binary(self, p):
6007  r"""_set_from_binary(Reference self, PyObject * p)"""
6008  return _IMP_core.Reference__set_from_binary(self, p)
6009 
6010  def __getstate__(self):
6011  p = self._get_as_binary()
6012  if len(self.__dict__) > 1:
6013  d = self.__dict__.copy()
6014  del d['this']
6015  p = (d, p)
6016  return p
6017 
6018  def __setstate__(self, p):
6019  if not hasattr(self, 'this'):
6020  self.__init__()
6021  if isinstance(p, tuple):
6022  d, p = p
6023  self.__dict__.update(d)
6024  return self._set_from_binary(p)
6025 
6026  __swig_destroy__ = _IMP_core.delete_Reference
6027 
6028 # Register Reference in _IMP_core:
6029 _IMP_core.Reference_swigregister(Reference)
6030 class TransformationAndReflectionSymmetry(IMP.SingletonModifier):
6031  r"""Proxy of C++ IMP::core::TransformationAndReflectionSymmetry class."""
6032 
6033  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6034 
6035  def __init__(self, t, r):
6036  r"""__init__(TransformationAndReflectionSymmetry self, Transformation3D t, Reflection3D r) -> TransformationAndReflectionSymmetry"""
6037  _IMP_core.TransformationAndReflectionSymmetry_swiginit(self, _IMP_core.new_TransformationAndReflectionSymmetry(t, r))
6038 
6039  def do_get_inputs(self, m, pis):
6040  r"""do_get_inputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6041  return _IMP_core.TransformationAndReflectionSymmetry_do_get_inputs(self, m, pis)
6042 
6043  def do_get_outputs(self, m, pis):
6044  r"""do_get_outputs(TransformationAndReflectionSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6045  return _IMP_core.TransformationAndReflectionSymmetry_do_get_outputs(self, m, pis)
6046 
6047  def get_version_info(self):
6048  r"""get_version_info(TransformationAndReflectionSymmetry self) -> VersionInfo"""
6049  return _IMP_core.TransformationAndReflectionSymmetry_get_version_info(self)
6050  __swig_destroy__ = _IMP_core.delete_TransformationAndReflectionSymmetry
6051 
6052  def __str__(self):
6053  r"""__str__(TransformationAndReflectionSymmetry self) -> std::string"""
6054  return _IMP_core.TransformationAndReflectionSymmetry___str__(self)
6055 
6056  def __repr__(self):
6057  r"""__repr__(TransformationAndReflectionSymmetry self) -> std::string"""
6058  return _IMP_core.TransformationAndReflectionSymmetry___repr__(self)
6059 
6060  @staticmethod
6061  def get_from(o):
6062  return _object_cast_to_TransformationAndReflectionSymmetry(o)
6063 
6064 
6065 # Register TransformationAndReflectionSymmetry in _IMP_core:
6066 _IMP_core.TransformationAndReflectionSymmetry_swigregister(TransformationAndReflectionSymmetry)
6067 class TransformationSymmetry(IMP.SingletonModifier):
6068  r"""Proxy of C++ IMP::core::TransformationSymmetry class."""
6069 
6070  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6071 
6072  def __init__(self, *args):
6073  r"""
6074  __init__(TransformationSymmetry self, Transformation3D t) -> TransformationSymmetry
6075  __init__(TransformationSymmetry self, ParticleIndex rb_pi) -> TransformationSymmetry
6076  """
6077  _IMP_core.TransformationSymmetry_swiginit(self, _IMP_core.new_TransformationSymmetry(*args))
6078 
6079  def get_transformation(self):
6080  r"""get_transformation(TransformationSymmetry self) -> Transformation3D"""
6081  return _IMP_core.TransformationSymmetry_get_transformation(self)
6082 
6083  def set_transformation(self, t):
6084  r"""set_transformation(TransformationSymmetry self, Transformation3D t)"""
6085  return _IMP_core.TransformationSymmetry_set_transformation(self, t)
6086 
6087  def do_get_inputs(self, m, pis):
6088  r"""do_get_inputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6089  return _IMP_core.TransformationSymmetry_do_get_inputs(self, m, pis)
6090 
6091  def do_get_outputs(self, m, pis):
6092  r"""do_get_outputs(TransformationSymmetry self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6093  return _IMP_core.TransformationSymmetry_do_get_outputs(self, m, pis)
6094 
6095  def get_version_info(self):
6096  r"""get_version_info(TransformationSymmetry self) -> VersionInfo"""
6097  return _IMP_core.TransformationSymmetry_get_version_info(self)
6098  __swig_destroy__ = _IMP_core.delete_TransformationSymmetry
6099 
6100  def __str__(self):
6101  r"""__str__(TransformationSymmetry self) -> std::string"""
6102  return _IMP_core.TransformationSymmetry___str__(self)
6103 
6104  def __repr__(self):
6105  r"""__repr__(TransformationSymmetry self) -> std::string"""
6106  return _IMP_core.TransformationSymmetry___repr__(self)
6107 
6108  @staticmethod
6109  def get_from(o):
6110  return _object_cast_to_TransformationSymmetry(o)
6111 
6112 
6113 # Register TransformationSymmetry in _IMP_core:
6114 _IMP_core.TransformationSymmetry_swigregister(TransformationSymmetry)
6115 class TransformationSymmetryMover(MonteCarloMover):
6116  r"""Proxy of C++ IMP::core::TransformationSymmetryMover class."""
6117 
6118  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6119 
6120  def __init__(self, m, symm, pivot, max_translation, max_rotation):
6121  r"""__init__(TransformationSymmetryMover self, Model m, TransformationSymmetry symm, ParticleIndex pivot, IMP::Float max_translation, IMP::Float max_rotation) -> TransformationSymmetryMover"""
6122  _IMP_core.TransformationSymmetryMover_swiginit(self, _IMP_core.new_TransformationSymmetryMover(m, symm, pivot, max_translation, max_rotation))
6123 
6124  def set_maximum_translation(self, mt):
6125  r"""set_maximum_translation(TransformationSymmetryMover self, IMP::Float mt)"""
6126  return _IMP_core.TransformationSymmetryMover_set_maximum_translation(self, mt)
6127 
6128  def set_maximum_rotation(self, mr):
6129  r"""set_maximum_rotation(TransformationSymmetryMover self, IMP::Float mr)"""
6130  return _IMP_core.TransformationSymmetryMover_set_maximum_rotation(self, mr)
6131 
6132  def get_maximum_translation(self):
6133  r"""get_maximum_translation(TransformationSymmetryMover self) -> IMP::Float"""
6134  return _IMP_core.TransformationSymmetryMover_get_maximum_translation(self)
6135 
6136  def get_maximum_rotation(self):
6137  r"""get_maximum_rotation(TransformationSymmetryMover self) -> IMP::Float"""
6138  return _IMP_core.TransformationSymmetryMover_get_maximum_rotation(self)
6139 
6140  def get_version_info(self):
6141  r"""get_version_info(TransformationSymmetryMover self) -> VersionInfo"""
6142  return _IMP_core.TransformationSymmetryMover_get_version_info(self)
6143  __swig_destroy__ = _IMP_core.delete_TransformationSymmetryMover
6144 
6145  def __str__(self):
6146  r"""__str__(TransformationSymmetryMover self) -> std::string"""
6147  return _IMP_core.TransformationSymmetryMover___str__(self)
6148 
6149  def __repr__(self):
6150  r"""__repr__(TransformationSymmetryMover self) -> std::string"""
6151  return _IMP_core.TransformationSymmetryMover___repr__(self)
6152 
6153  @staticmethod
6154  def get_from(o):
6155  return _object_cast_to_TransformationSymmetryMover(o)
6156 
6157 
6158 # Register TransformationSymmetryMover in _IMP_core:
6159 _IMP_core.TransformationSymmetryMover_swigregister(TransformationSymmetryMover)
6160 class DistancePairScore(IMP.PairScore):
6161  r"""Proxy of C++ IMP::core::DistancePairScore class."""
6162 
6163  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6164 
6165  def __init__(self, *args):
6166  r"""
6167  __init__(DistancePairScore self, UnaryFunction uf, std::string name="DistancePairScore%1%") -> DistancePairScore
6168  __init__(DistancePairScore self) -> DistancePairScore
6169  """
6170  _IMP_core.DistancePairScore_swiginit(self, _IMP_core.new_DistancePairScore(*args))
6171 
6172  def do_get_inputs(self, m, pis):
6173  r"""do_get_inputs(DistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6174  return _IMP_core.DistancePairScore_do_get_inputs(self, m, pis)
6175 
6176  def get_score_functor(self, *args):
6177  r"""
6178  get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6179  get_score_functor(DistancePairScore self) -> UnaryFunctionEvaluate
6180  """
6181  return _IMP_core.DistancePairScore_get_score_functor(self, *args)
6182 
6183  def get_version_info(self):
6184  r"""get_version_info(DistancePairScore self) -> VersionInfo"""
6185  return _IMP_core.DistancePairScore_get_version_info(self)
6186  __swig_destroy__ = _IMP_core.delete_DistancePairScore
6187 
6188  def __str__(self):
6189  r"""__str__(DistancePairScore self) -> std::string"""
6190  return _IMP_core.DistancePairScore___str__(self)
6191 
6192  def __repr__(self):
6193  r"""__repr__(DistancePairScore self) -> std::string"""
6194  return _IMP_core.DistancePairScore___repr__(self)
6195 
6196  @staticmethod
6197  def get_from(o):
6198  return _object_cast_to_DistancePairScore(o)
6199 
6200 
6201  def _get_as_binary(self):
6202  r"""_get_as_binary(DistancePairScore self) -> PyObject *"""
6203  return _IMP_core.DistancePairScore__get_as_binary(self)
6204 
6205  def _set_from_binary(self, p):
6206  r"""_set_from_binary(DistancePairScore self, PyObject * p)"""
6207  return _IMP_core.DistancePairScore__set_from_binary(self, p)
6208 
6209  def __getstate__(self):
6210  p = self._get_as_binary()
6211  if len(self.__dict__) > 1:
6212  d = self.__dict__.copy()
6213  del d['this']
6214  p = (d, p)
6215  return p
6216 
6217  def __setstate__(self, p):
6218  if not hasattr(self, 'this'):
6219  self.__init__()
6220  if isinstance(p, tuple):
6221  d, p = p
6222  self.__dict__.update(d)
6223  return self._set_from_binary(p)
6224 
6225 
6226  def _get_jax(self, m, indexes, space):
6227  import jax.numpy as jnp
6228  def jax_score(jm, uf):
6229  xyzs = jm['xyz'][indexes]
6230  diff = xyzs[:,0] - xyzs[:,1]
6231  drs = space.distance(diff)
6232  return uf(drs)
6233  sfnc = self.get_score_functor()
6234  uf = sfnc.get_unary_function().get_derived_object()
6235  f = functools.partial(jax_score, uf=uf._get_jax())
6236  return self._wrap_jax(m, f)
6237 
6238 
6239 # Register DistancePairScore in _IMP_core:
6240 _IMP_core.DistancePairScore_swigregister(DistancePairScore)
6241 class HarmonicDistancePairScore(IMP.PairScore):
6242  r"""Proxy of C++ IMP::core::HarmonicDistancePairScore class."""
6243 
6244  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6245 
6246  def __init__(self, *args):
6247  r"""
6248  __init__(HarmonicDistancePairScore self, double x0, double k, std::string name="HarmonicDistancePairScore%1%") -> HarmonicDistancePairScore
6249  __init__(HarmonicDistancePairScore self) -> HarmonicDistancePairScore
6250  """
6251  _IMP_core.HarmonicDistancePairScore_swiginit(self, _IMP_core.new_HarmonicDistancePairScore(*args))
6252 
6253  def do_get_inputs(self, m, pis):
6254  r"""do_get_inputs(HarmonicDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6255  return _IMP_core.HarmonicDistancePairScore_do_get_inputs(self, m, pis)
6256 
6257  def get_score_functor(self, *args):
6258  r"""
6259  get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore
6260  get_score_functor(HarmonicDistancePairScore self) -> IMP::core::HarmonicDistanceScore const &
6261  """
6262  return _IMP_core.HarmonicDistancePairScore_get_score_functor(self, *args)
6263 
6264  def get_x0(self):
6265  r"""get_x0(HarmonicDistancePairScore self) -> double"""
6266  return _IMP_core.HarmonicDistancePairScore_get_x0(self)
6267 
6268  def get_k(self):
6269  r"""get_k(HarmonicDistancePairScore self) -> double"""
6270  return _IMP_core.HarmonicDistancePairScore_get_k(self)
6271 
6272  def get_version_info(self):
6273  r"""get_version_info(HarmonicDistancePairScore self) -> VersionInfo"""
6274  return _IMP_core.HarmonicDistancePairScore_get_version_info(self)
6275  __swig_destroy__ = _IMP_core.delete_HarmonicDistancePairScore
6276 
6277  def __str__(self):
6278  r"""__str__(HarmonicDistancePairScore self) -> std::string"""
6279  return _IMP_core.HarmonicDistancePairScore___str__(self)
6280 
6281  def __repr__(self):
6282  r"""__repr__(HarmonicDistancePairScore self) -> std::string"""
6283  return _IMP_core.HarmonicDistancePairScore___repr__(self)
6284 
6285  @staticmethod
6286  def get_from(o):
6287  return _object_cast_to_HarmonicDistancePairScore(o)
6288 
6289 
6290  def _get_as_binary(self):
6291  r"""_get_as_binary(HarmonicDistancePairScore self) -> PyObject *"""
6292  return _IMP_core.HarmonicDistancePairScore__get_as_binary(self)
6293 
6294  def _set_from_binary(self, p):
6295  r"""_set_from_binary(HarmonicDistancePairScore self, PyObject * p)"""
6296  return _IMP_core.HarmonicDistancePairScore__set_from_binary(self, p)
6297 
6298  def __getstate__(self):
6299  p = self._get_as_binary()
6300  if len(self.__dict__) > 1:
6301  d = self.__dict__.copy()
6302  del d['this']
6303  p = (d, p)
6304  return p
6305 
6306  def __setstate__(self, p):
6307  if not hasattr(self, 'this'):
6308  self.__init__()
6309  if isinstance(p, tuple):
6310  d, p = p
6311  self.__dict__.update(d)
6312  return self._set_from_binary(p)
6313 
6314 
6315  def _get_jax(self, m, indexes, space):
6316  import jax.numpy as jnp
6317  def jax_harmonic_distance_pair_score(jm, d, k):
6318  xyzs = jm['xyz'][indexes]
6319  diff = xyzs[:,0] - xyzs[:,1]
6320  drs = space.distance(diff)
6321  return 0.5 * k * (d - drs)**2
6322  f = functools.partial(jax_harmonic_distance_pair_score,
6323  d=self.get_x0(), k=self.get_k())
6324  return self._wrap_jax(m, f)
6325 
6326 
6327 # Register HarmonicDistancePairScore in _IMP_core:
6328 _IMP_core.HarmonicDistancePairScore_swigregister(HarmonicDistancePairScore)
6329 class DistanceRestraint(IMP.Restraint):
6330  r"""Proxy of C++ IMP::core::DistanceRestraint class."""
6331 
6332  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6333 
6334  def __init__(self, *args):
6335  r"""
6336  __init__(DistanceRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor a, _ParticleIndexAdaptor b, std::string name="DistanceRestraint %1%") -> DistanceRestraint
6337  __init__(DistanceRestraint self) -> DistanceRestraint
6338  """
6339  _IMP_core.DistanceRestraint_swiginit(self, _IMP_core.new_DistanceRestraint(*args))
6340 
6341  def get_score_object(self):
6342  r"""get_score_object(DistanceRestraint self) -> DistancePairScore"""
6343  return _IMP_core.DistanceRestraint_get_score_object(self)
6344 
6345  def get_index(self):
6346  r"""get_index(DistanceRestraint self) -> IMP::core::DistancePairScore::IndexArgument"""
6347  return _IMP_core.DistanceRestraint_get_index(self)
6348 
6349  def get_version_info(self):
6350  r"""get_version_info(DistanceRestraint self) -> VersionInfo"""
6351  return _IMP_core.DistanceRestraint_get_version_info(self)
6352  __swig_destroy__ = _IMP_core.delete_DistanceRestraint
6353 
6354  def __str__(self):
6355  r"""__str__(DistanceRestraint self) -> std::string"""
6356  return _IMP_core.DistanceRestraint___str__(self)
6357 
6358  def __repr__(self):
6359  r"""__repr__(DistanceRestraint self) -> std::string"""
6360  return _IMP_core.DistanceRestraint___repr__(self)
6361 
6362  @staticmethod
6363  def get_from(o):
6364  return _object_cast_to_DistanceRestraint(o)
6365 
6366 
6367  def _get_as_binary(self):
6368  r"""_get_as_binary(DistanceRestraint self) -> PyObject *"""
6369  return _IMP_core.DistanceRestraint__get_as_binary(self)
6370 
6371  def _set_from_binary(self, p):
6372  r"""_set_from_binary(DistanceRestraint self, PyObject * p)"""
6373  return _IMP_core.DistanceRestraint__set_from_binary(self, p)
6374 
6375  def __getstate__(self):
6376  p = self._get_as_binary()
6377  if len(self.__dict__) > 1:
6378  d = self.__dict__.copy()
6379  del d['this']
6380  p = (d, p)
6381  return p
6382 
6383  def __setstate__(self, p):
6384  if not hasattr(self, 'this'):
6385  self.__init__()
6386  if isinstance(p, tuple):
6387  d, p = p
6388  self.__dict__.update(d)
6389  return self._set_from_binary(p)
6390 
6391 
6392  def _get_jax(self, space):
6393  import jax.numpy as jnp
6394  import IMP._jax_util
6395  ps = self.get_score_object()
6396  indexes = jnp.array([self.get_index()])
6397  ji = ps._get_jax(self.get_model(), indexes, space=space)
6398  def score(jm):
6399  return jnp.sum(ji.score_func(jm), axis=-1)
6400  return self._wrap_jax(score)
6401 
6402 
6403 # Register DistanceRestraint in _IMP_core:
6404 _IMP_core.DistanceRestraint_swigregister(DistanceRestraint)
6405 class SphereDistanceToSingletonScore(IMP.SingletonScore):
6406  r"""Proxy of C++ IMP::core::SphereDistanceToSingletonScore class."""
6407 
6408  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6409 
6410  def __init__(self, f, pt):
6411  r"""__init__(SphereDistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> SphereDistanceToSingletonScore"""
6412  _IMP_core.SphereDistanceToSingletonScore_swiginit(self, _IMP_core.new_SphereDistanceToSingletonScore(f, pt))
6413 
6414  def do_get_inputs(self, m, pis):
6415  r"""do_get_inputs(SphereDistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6416  return _IMP_core.SphereDistanceToSingletonScore_do_get_inputs(self, m, pis)
6417 
6418  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
6419  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"""
6420  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
6421 
6422  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
6423  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"""
6424  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
6425 
6426  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
6427  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"""
6428  return _IMP_core.SphereDistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
6429 
6430  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
6431  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"""
6432  return _IMP_core.SphereDistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
6433 
6434  def get_version_info(self):
6435  r"""get_version_info(SphereDistanceToSingletonScore self) -> VersionInfo"""
6436  return _IMP_core.SphereDistanceToSingletonScore_get_version_info(self)
6437  __swig_destroy__ = _IMP_core.delete_SphereDistanceToSingletonScore
6438 
6439  def __str__(self):
6440  r"""__str__(SphereDistanceToSingletonScore self) -> std::string"""
6441  return _IMP_core.SphereDistanceToSingletonScore___str__(self)
6442 
6443  def __repr__(self):
6444  r"""__repr__(SphereDistanceToSingletonScore self) -> std::string"""
6445  return _IMP_core.SphereDistanceToSingletonScore___repr__(self)
6446 
6447  @staticmethod
6448  def get_from(o):
6449  return _object_cast_to_SphereDistanceToSingletonScore(o)
6450 
6451 
6452 # Register SphereDistanceToSingletonScore in _IMP_core:
6453 _IMP_core.SphereDistanceToSingletonScore_swigregister(SphereDistanceToSingletonScore)
6454 class ExcludedVolumeRestraint(IMP.Restraint):
6455  r"""Proxy of C++ IMP::core::ExcludedVolumeRestraint class."""
6456 
6457  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6458 
6459  def __init__(self, *args):
6460  r"""__init__(ExcludedVolumeRestraint self, _SingletonContainerAdaptor sc, double k=1, double slack=10, std::string name="ExcludedVolumeRestraint%1%") -> ExcludedVolumeRestraint"""
6461  _IMP_core.ExcludedVolumeRestraint_swiginit(self, _IMP_core.new_ExcludedVolumeRestraint(*args))
6462 
6463  def get_score_object(self):
6464  r"""get_score_object(ExcludedVolumeRestraint self) -> SoftSpherePairScore"""
6465  return _IMP_core.ExcludedVolumeRestraint_get_score_object(self)
6466 
6467  def get_container(self):
6468  r"""get_container(ExcludedVolumeRestraint self) -> SingletonContainer"""
6469  return _IMP_core.ExcludedVolumeRestraint_get_container(self)
6470 
6471  def do_get_inputs(self):
6472  r"""do_get_inputs(ExcludedVolumeRestraint self) -> IMP::ModelObjectsTemp"""
6473  return _IMP_core.ExcludedVolumeRestraint_do_get_inputs(self)
6474 
6475  def get_version_info(self):
6476  r"""get_version_info(ExcludedVolumeRestraint self) -> VersionInfo"""
6477  return _IMP_core.ExcludedVolumeRestraint_get_version_info(self)
6478  __swig_destroy__ = _IMP_core.delete_ExcludedVolumeRestraint
6479 
6480  def do_create_decomposition(self):
6481  r"""do_create_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6482  return _IMP_core.ExcludedVolumeRestraint_do_create_decomposition(self)
6483 
6484  def do_create_current_decomposition(self):
6485  r"""do_create_current_decomposition(ExcludedVolumeRestraint self) -> IMP::Restraints"""
6486  return _IMP_core.ExcludedVolumeRestraint_do_create_current_decomposition(self)
6487 
6488  def get_indexes(self):
6489  r"""get_indexes(ExcludedVolumeRestraint self) -> IMP::ParticleIndexPairs const &"""
6490  return _IMP_core.ExcludedVolumeRestraint_get_indexes(self)
6491  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)
6492  def __set_pair_filters(self, obj): IMP._list_util.set_varlist(self.pair_filters, obj)
6493  def __del_pair_filters(self): IMP._list_util.del_varlist(self.pair_filters)
6494  pair_filters = property(__get_pair_filters, __set_pair_filters, __del_pair_filters, doc="List of ##ucnames")
6495 
6496  def remove_pair_filter(self, d):
6497  r"""remove_pair_filter(ExcludedVolumeRestraint self, PairPredicate d)"""
6498  return _IMP_core.ExcludedVolumeRestraint_remove_pair_filter(self, d)
6499 
6500  def _python_index_pair_filter(self, d, start, stop):
6501  r"""_python_index_pair_filter(ExcludedVolumeRestraint self, PairPredicate d, unsigned int start, unsigned int stop) -> unsigned int"""
6502  return _IMP_core.ExcludedVolumeRestraint__python_index_pair_filter(self, d, start, stop)
6503 
6504  def remove_pair_filters(self, d):
6505  r"""remove_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & d)"""
6506  return _IMP_core.ExcludedVolumeRestraint_remove_pair_filters(self, d)
6507 
6508  def set_pair_filters(self, ps):
6509  r"""set_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & ps)"""
6510  return _IMP_core.ExcludedVolumeRestraint_set_pair_filters(self, ps)
6511 
6512  def set_pair_filters_order(self, objs):
6513  r"""set_pair_filters_order(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6514  return _IMP_core.ExcludedVolumeRestraint_set_pair_filters_order(self, objs)
6515 
6516  def add_pair_filter(self, obj):
6517  r"""add_pair_filter(ExcludedVolumeRestraint self, PairPredicate obj) -> unsigned int"""
6518  return _IMP_core.ExcludedVolumeRestraint_add_pair_filter(self, obj)
6519 
6520  def add_pair_filters(self, objs):
6521  r"""add_pair_filters(ExcludedVolumeRestraint self, IMP::PairPredicates const & objs)"""
6522  return _IMP_core.ExcludedVolumeRestraint_add_pair_filters(self, objs)
6523 
6524  def clear_pair_filters(self):
6525  r"""clear_pair_filters(ExcludedVolumeRestraint self)"""
6526  return _IMP_core.ExcludedVolumeRestraint_clear_pair_filters(self)
6527 
6528  def get_number_of_pair_filters(self):
6529  r"""get_number_of_pair_filters(ExcludedVolumeRestraint self) -> unsigned int"""
6530  return _IMP_core.ExcludedVolumeRestraint_get_number_of_pair_filters(self)
6531 
6532  def get_has_pair_filters(self):
6533  r"""get_has_pair_filters(ExcludedVolumeRestraint self) -> bool"""
6534  return _IMP_core.ExcludedVolumeRestraint_get_has_pair_filters(self)
6535 
6536  def get_pair_filter(self, i):
6537  r"""get_pair_filter(ExcludedVolumeRestraint self, unsigned int i) -> PairPredicate"""
6538  return _IMP_core.ExcludedVolumeRestraint_get_pair_filter(self, i)
6539 
6540  def get_pair_filters(self):
6541  r"""get_pair_filters(ExcludedVolumeRestraint self) -> IMP::PairPredicates"""
6542  return _IMP_core.ExcludedVolumeRestraint_get_pair_filters(self)
6543 
6544  def erase_pair_filter(self, i):
6545  r"""erase_pair_filter(ExcludedVolumeRestraint self, unsigned int i)"""
6546  return _IMP_core.ExcludedVolumeRestraint_erase_pair_filter(self, i)
6547 
6548  def reserve_pair_filters(self, sz):
6549  r"""reserve_pair_filters(ExcludedVolumeRestraint self, unsigned int sz)"""
6550  return _IMP_core.ExcludedVolumeRestraint_reserve_pair_filters(self, sz)
6551 
6552  def __str__(self):
6553  r"""__str__(ExcludedVolumeRestraint self) -> std::string"""
6554  return _IMP_core.ExcludedVolumeRestraint___str__(self)
6555 
6556  def __repr__(self):
6557  r"""__repr__(ExcludedVolumeRestraint self) -> std::string"""
6558  return _IMP_core.ExcludedVolumeRestraint___repr__(self)
6559 
6560  @staticmethod
6561  def get_from(o):
6562  return _object_cast_to_ExcludedVolumeRestraint(o)
6563 
6564 
6565  def _get_jax(self, space):
6566  import jax.numpy as jnp
6567  # We need all indexes for JAX but ExcludedVolumeRestraint does not
6568  # provide a suitable method, so make a temporary ClosePairContainer
6569  # instead with the same set of indexes (we use all pairs for JAX so
6570  # the cutoff and slack are unimportant here)
6571  c = IMP.container.ClosePairContainer(self.get_container(), 10.0, 1.0)
6572  c.pair_filters.extend(self.pair_filters)
6573  indexes = c._get_static_contents()
6574 
6575  score = self.get_score_object().get_derived_object()
6576  ji = score._get_jax(self.get_model(), indexes, space)
6577  score_jax = ji.score_func
6578 
6579  def jax_restraint(jm):
6580  return jnp.sum(score_jax(jm), axis=-1)
6581  return self._wrap_jax(jax_restraint, keys=ji._keys)
6582 
6583 
6584 # Register ExcludedVolumeRestraint in _IMP_core:
6585 _IMP_core.ExcludedVolumeRestraint_swigregister(ExcludedVolumeRestraint)
6586 class FixedRefiner(IMP.Refiner):
6587  r"""Proxy of C++ IMP::core::FixedRefiner class."""
6588 
6589  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6590 
6591  def __init__(self, *args):
6592  r"""
6593  __init__(FixedRefiner self, IMP::ParticlesTemp const & ps) -> FixedRefiner
6594  __init__(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> FixedRefiner
6595  __init__(FixedRefiner self) -> FixedRefiner
6596  """
6597  _IMP_core.FixedRefiner_swiginit(self, _IMP_core.new_FixedRefiner(*args))
6598 
6599  def do_get_inputs(self, m, pis):
6600  r"""do_get_inputs(FixedRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6601  return _IMP_core.FixedRefiner_do_get_inputs(self, m, pis)
6602 
6603  def get_version_info(self):
6604  r"""get_version_info(FixedRefiner self) -> VersionInfo"""
6605  return _IMP_core.FixedRefiner_get_version_info(self)
6606  __swig_destroy__ = _IMP_core.delete_FixedRefiner
6607 
6608  def __str__(self):
6609  r"""__str__(FixedRefiner self) -> std::string"""
6610  return _IMP_core.FixedRefiner___str__(self)
6611 
6612  def __repr__(self):
6613  r"""__repr__(FixedRefiner self) -> std::string"""
6614  return _IMP_core.FixedRefiner___repr__(self)
6615 
6616  @staticmethod
6617  def get_from(o):
6618  return _object_cast_to_FixedRefiner(o)
6619 
6620 
6621  def _get_as_binary(self):
6622  r"""_get_as_binary(FixedRefiner self) -> PyObject *"""
6623  return _IMP_core.FixedRefiner__get_as_binary(self)
6624 
6625  def _set_from_binary(self, p):
6626  r"""_set_from_binary(FixedRefiner self, PyObject * p)"""
6627  return _IMP_core.FixedRefiner__set_from_binary(self, p)
6628 
6629  def __getstate__(self):
6630  p = self._get_as_binary()
6631  if len(self.__dict__) > 1:
6632  d = self.__dict__.copy()
6633  del d['this']
6634  p = (d, p)
6635  return p
6636 
6637  def __setstate__(self, p):
6638  if not hasattr(self, 'this'):
6639  self.__init__()
6640  if isinstance(p, tuple):
6641  d, p = p
6642  self.__dict__.update(d)
6643  return self._set_from_binary(p)
6644 
6645 
6646 # Register FixedRefiner in _IMP_core:
6647 _IMP_core.FixedRefiner_swigregister(FixedRefiner)
6648 class GridClosePairsFinder(ClosePairsFinder):
6649  r"""Proxy of C++ IMP::core::GridClosePairsFinder class."""
6650 
6651  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6652 
6653  def __init__(self):
6654  r"""__init__(GridClosePairsFinder self) -> GridClosePairsFinder"""
6655  _IMP_core.GridClosePairsFinder_swiginit(self, _IMP_core.new_GridClosePairsFinder())
6656 
6657  def get_close_pairs(self, *args):
6658  r"""
6659  get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6660  get_close_pairs(GridClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
6661  get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
6662  get_close_pairs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
6663  """
6664  return _IMP_core.GridClosePairsFinder_get_close_pairs(self, *args)
6665 
6666  def do_get_inputs(self, m, pis):
6667  r"""do_get_inputs(GridClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6668  return _IMP_core.GridClosePairsFinder_do_get_inputs(self, m, pis)
6669 
6670  def get_version_info(self):
6671  r"""get_version_info(GridClosePairsFinder self) -> VersionInfo"""
6672  return _IMP_core.GridClosePairsFinder_get_version_info(self)
6673  __swig_destroy__ = _IMP_core.delete_GridClosePairsFinder
6674 
6675  def __str__(self):
6676  r"""__str__(GridClosePairsFinder self) -> std::string"""
6677  return _IMP_core.GridClosePairsFinder___str__(self)
6678 
6679  def __repr__(self):
6680  r"""__repr__(GridClosePairsFinder self) -> std::string"""
6681  return _IMP_core.GridClosePairsFinder___repr__(self)
6682 
6683  @staticmethod
6684  def get_from(o):
6685  return _object_cast_to_GridClosePairsFinder(o)
6686 
6687 
6688  def _get_as_binary(self):
6689  r"""_get_as_binary(GridClosePairsFinder self) -> PyObject *"""
6690  return _IMP_core.GridClosePairsFinder__get_as_binary(self)
6691 
6692  def _set_from_binary(self, p):
6693  r"""_set_from_binary(GridClosePairsFinder self, PyObject * p)"""
6694  return _IMP_core.GridClosePairsFinder__set_from_binary(self, p)
6695 
6696  def __getstate__(self):
6697  p = self._get_as_binary()
6698  if len(self.__dict__) > 1:
6699  d = self.__dict__.copy()
6700  del d['this']
6701  p = (d, p)
6702  return p
6703 
6704  def __setstate__(self, p):
6705  if not hasattr(self, 'this'):
6706  self.__init__()
6707  if isinstance(p, tuple):
6708  d, p = p
6709  self.__dict__.update(d)
6710  return self._set_from_binary(p)
6711 
6712 
6713 # Register GridClosePairsFinder in _IMP_core:
6714 _IMP_core.GridClosePairsFinder_swigregister(GridClosePairsFinder)
6715 class Harmonic(IMP.UnaryFunction):
6716  r"""Proxy of C++ IMP::core::Harmonic class."""
6717 
6718  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6719 
6720  def __init__(self, *args):
6721  r"""
6722  __init__(Harmonic self, IMP::Float mean, IMP::Float k) -> Harmonic
6723  __init__(Harmonic self) -> Harmonic
6724  """
6725  _IMP_core.Harmonic_swiginit(self, _IMP_core.new_Harmonic(*args))
6726 
6727  def get_version_info(self):
6728  r"""get_version_info(Harmonic self) -> VersionInfo"""
6729  return _IMP_core.Harmonic_get_version_info(self)
6730  __swig_destroy__ = _IMP_core.delete_Harmonic
6731 
6732  def get_mean(self):
6733  r"""get_mean(Harmonic self) -> IMP::Float"""
6734  return _IMP_core.Harmonic_get_mean(self)
6735 
6736  def get_k(self):
6737  r"""get_k(Harmonic self) -> IMP::Float"""
6738  return _IMP_core.Harmonic_get_k(self)
6739 
6740  def set_mean(self, mean):
6741  r"""set_mean(Harmonic self, IMP::Float mean)"""
6742  return _IMP_core.Harmonic_set_mean(self, mean)
6743 
6744  def set_k(self, k):
6745  r"""set_k(Harmonic self, IMP::Float k)"""
6746  return _IMP_core.Harmonic_set_k(self, k)
6747 
6748  @staticmethod
6749  def get_k_from_standard_deviation(sd, t=297.15):
6750  r"""get_k_from_standard_deviation(IMP::Float sd, IMP::Float t=297.15) -> IMP::Float"""
6751  return _IMP_core.Harmonic_get_k_from_standard_deviation(sd, t)
6752 
6753  def __str__(self):
6754  r"""__str__(Harmonic self) -> std::string"""
6755  return _IMP_core.Harmonic___str__(self)
6756 
6757  def __repr__(self):
6758  r"""__repr__(Harmonic self) -> std::string"""
6759  return _IMP_core.Harmonic___repr__(self)
6760 
6761  @staticmethod
6762  def get_from(o):
6763  return _object_cast_to_Harmonic(o)
6764 
6765 
6766  def _get_as_binary(self):
6767  r"""_get_as_binary(Harmonic self) -> PyObject *"""
6768  return _IMP_core.Harmonic__get_as_binary(self)
6769 
6770  def _set_from_binary(self, p):
6771  r"""_set_from_binary(Harmonic self, PyObject * p)"""
6772  return _IMP_core.Harmonic__set_from_binary(self, p)
6773 
6774  def __getstate__(self):
6775  p = self._get_as_binary()
6776  if len(self.__dict__) > 1:
6777  d = self.__dict__.copy()
6778  del d['this']
6779  p = (d, p)
6780  return p
6781 
6782  def __setstate__(self, p):
6783  if not hasattr(self, 'this'):
6784  self.__init__()
6785  if isinstance(p, tuple):
6786  d, p = p
6787  self.__dict__.update(d)
6788  return self._set_from_binary(p)
6789 
6790 
6791  def _get_jax(self):
6792  def score(val, mean, k):
6793  return 0.5 * k * (mean - val) ** 2
6794  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6795 
6796 
6797 # Register Harmonic in _IMP_core:
6798 _IMP_core.Harmonic_swigregister(Harmonic)
6799 class HarmonicWell(IMP.UnaryFunction):
6800  r"""Proxy of C++ IMP::core::HarmonicWell class."""
6801 
6802  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6803 
6804  def __init__(self, well, k):
6805  r"""__init__(HarmonicWell self, IMP::FloatRange const & well, double k) -> HarmonicWell"""
6806  _IMP_core.HarmonicWell_swiginit(self, _IMP_core.new_HarmonicWell(well, k))
6807 
6808  def get_well(self):
6809  r"""get_well(HarmonicWell self) -> IMP::FloatRange"""
6810  return _IMP_core.HarmonicWell_get_well(self)
6811 
6812  def get_k(self):
6813  r"""get_k(HarmonicWell self) -> double"""
6814  return _IMP_core.HarmonicWell_get_k(self)
6815 
6816  def get_version_info(self):
6817  r"""get_version_info(HarmonicWell self) -> VersionInfo"""
6818  return _IMP_core.HarmonicWell_get_version_info(self)
6819  __swig_destroy__ = _IMP_core.delete_HarmonicWell
6820 
6821  def __str__(self):
6822  r"""__str__(HarmonicWell self) -> std::string"""
6823  return _IMP_core.HarmonicWell___str__(self)
6824 
6825  def __repr__(self):
6826  r"""__repr__(HarmonicWell self) -> std::string"""
6827  return _IMP_core.HarmonicWell___repr__(self)
6828 
6829  @staticmethod
6830  def get_from(o):
6831  return _object_cast_to_HarmonicWell(o)
6832 
6833 
6834  def _get_jax(self):
6835  import jax.numpy as jnp
6836  def score(val, lb, ub, k):
6837  return 0.5 * k * (val - jnp.clip(val, lb, ub)) ** 2
6838  well = self.get_well()
6839  return functools.partial(score, lb=well[0], ub=well[1], k=self.get_k())
6840 
6841 
6842 # Register HarmonicWell in _IMP_core:
6843 _IMP_core.HarmonicWell_swigregister(HarmonicWell)
6844 class HarmonicLowerBound(Harmonic):
6845  r"""Proxy of C++ IMP::core::HarmonicLowerBound class."""
6846 
6847  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6848 
6849  def __init__(self, *args):
6850  r"""
6851  __init__(HarmonicLowerBound self, IMP::Float mean, IMP::Float k) -> HarmonicLowerBound
6852  __init__(HarmonicLowerBound self) -> HarmonicLowerBound
6853  """
6854  _IMP_core.HarmonicLowerBound_swiginit(self, _IMP_core.new_HarmonicLowerBound(*args))
6855  __swig_destroy__ = _IMP_core.delete_HarmonicLowerBound
6856 
6857  def __str__(self):
6858  r"""__str__(HarmonicLowerBound self) -> std::string"""
6859  return _IMP_core.HarmonicLowerBound___str__(self)
6860 
6861  def __repr__(self):
6862  r"""__repr__(HarmonicLowerBound self) -> std::string"""
6863  return _IMP_core.HarmonicLowerBound___repr__(self)
6864 
6865  @staticmethod
6866  def get_from(o):
6867  return _object_cast_to_HarmonicLowerBound(o)
6868 
6869 
6870  def _get_as_binary(self):
6871  r"""_get_as_binary(HarmonicLowerBound self) -> PyObject *"""
6872  return _IMP_core.HarmonicLowerBound__get_as_binary(self)
6873 
6874  def _set_from_binary(self, p):
6875  r"""_set_from_binary(HarmonicLowerBound self, PyObject * p)"""
6876  return _IMP_core.HarmonicLowerBound__set_from_binary(self, p)
6877 
6878  def __getstate__(self):
6879  p = self._get_as_binary()
6880  if len(self.__dict__) > 1:
6881  d = self.__dict__.copy()
6882  del d['this']
6883  p = (d, p)
6884  return p
6885 
6886  def __setstate__(self, p):
6887  if not hasattr(self, 'this'):
6888  self.__init__()
6889  if isinstance(p, tuple):
6890  d, p = p
6891  self.__dict__.update(d)
6892  return self._set_from_binary(p)
6893 
6894 
6895  def _get_jax(self):
6896  import jax.lax
6897  def score(val, mean, k):
6898  return 0.5 * k * jax.lax.max(mean - val, 0.0) ** 2
6899  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6900 
6901 
6902 # Register HarmonicLowerBound in _IMP_core:
6903 _IMP_core.HarmonicLowerBound_swigregister(HarmonicLowerBound)
6904 class HarmonicUpperBound(Harmonic):
6905  r"""Proxy of C++ IMP::core::HarmonicUpperBound class."""
6906 
6907  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6908 
6909  def __init__(self, *args):
6910  r"""
6911  __init__(HarmonicUpperBound self, IMP::Float mean, IMP::Float k) -> HarmonicUpperBound
6912  __init__(HarmonicUpperBound self) -> HarmonicUpperBound
6913  """
6914  _IMP_core.HarmonicUpperBound_swiginit(self, _IMP_core.new_HarmonicUpperBound(*args))
6915  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBound
6916 
6917  def __str__(self):
6918  r"""__str__(HarmonicUpperBound self) -> std::string"""
6919  return _IMP_core.HarmonicUpperBound___str__(self)
6920 
6921  def __repr__(self):
6922  r"""__repr__(HarmonicUpperBound self) -> std::string"""
6923  return _IMP_core.HarmonicUpperBound___repr__(self)
6924 
6925  @staticmethod
6926  def get_from(o):
6927  return _object_cast_to_HarmonicUpperBound(o)
6928 
6929 
6930  def _get_as_binary(self):
6931  r"""_get_as_binary(HarmonicUpperBound self) -> PyObject *"""
6932  return _IMP_core.HarmonicUpperBound__get_as_binary(self)
6933 
6934  def _set_from_binary(self, p):
6935  r"""_set_from_binary(HarmonicUpperBound self, PyObject * p)"""
6936  return _IMP_core.HarmonicUpperBound__set_from_binary(self, p)
6937 
6938  def __getstate__(self):
6939  p = self._get_as_binary()
6940  if len(self.__dict__) > 1:
6941  d = self.__dict__.copy()
6942  del d['this']
6943  p = (d, p)
6944  return p
6945 
6946  def __setstate__(self, p):
6947  if not hasattr(self, 'this'):
6948  self.__init__()
6949  if isinstance(p, tuple):
6950  d, p = p
6951  self.__dict__.update(d)
6952  return self._set_from_binary(p)
6953 
6954 
6955  def _get_jax(self):
6956  import jax.lax
6957  def score(val, mean, k):
6958  return 0.5 * k * jax.lax.min(mean - val, 0.0) ** 2
6959  return functools.partial(score, mean=self.get_mean(), k=self.get_k())
6960 
6961 
6962 # Register HarmonicUpperBound in _IMP_core:
6963 _IMP_core.HarmonicUpperBound_swigregister(HarmonicUpperBound)
6964 class WeightedSum(IMP.UnaryFunction):
6965  r"""Proxy of C++ IMP::core::WeightedSum class."""
6966 
6967  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6968 
6969  def __init__(self, funcs, weights):
6970  r"""__init__(WeightedSum self, IMP::UnaryFunctions funcs, IMP::Floats weights) -> WeightedSum"""
6971  _IMP_core.WeightedSum_swiginit(self, _IMP_core.new_WeightedSum(funcs, weights))
6972 
6973  def get_function_number(self):
6974  r"""get_function_number(WeightedSum self) -> unsigned int"""
6975  return _IMP_core.WeightedSum_get_function_number(self)
6976 
6977  def set_weights(self, weights):
6978  r"""set_weights(WeightedSum self, IMP::Floats weights)"""
6979  return _IMP_core.WeightedSum_set_weights(self, weights)
6980 
6981  def get_weights(self):
6982  r"""get_weights(WeightedSum self) -> IMP::Floats"""
6983  return _IMP_core.WeightedSum_get_weights(self)
6984 
6985  def get_weight(self, i):
6986  r"""get_weight(WeightedSum self, unsigned int i) -> double"""
6987  return _IMP_core.WeightedSum_get_weight(self, i)
6988 
6989  def get_function(self, i):
6990  r"""get_function(WeightedSum self, unsigned int i) -> UnaryFunction"""
6991  return _IMP_core.WeightedSum_get_function(self, i)
6992 
6993  def get_version_info(self):
6994  r"""get_version_info(WeightedSum self) -> VersionInfo"""
6995  return _IMP_core.WeightedSum_get_version_info(self)
6996  __swig_destroy__ = _IMP_core.delete_WeightedSum
6997 
6998  def __str__(self):
6999  r"""__str__(WeightedSum self) -> std::string"""
7000  return _IMP_core.WeightedSum___str__(self)
7001 
7002  def __repr__(self):
7003  r"""__repr__(WeightedSum self) -> std::string"""
7004  return _IMP_core.WeightedSum___repr__(self)
7005 
7006  @staticmethod
7007  def get_from(o):
7008  return _object_cast_to_WeightedSum(o)
7009 
7010 
7011  def _get_jax(self):
7012  import jax.numpy as jnp
7013  def score(val, funcs, weights):
7014  return sum(f(val) * weight for (f, weight) in zip(funcs, weights))
7015  nfunc = self.get_function_number()
7016  funcs = [self.get_function(i).get_derived_object()._get_jax()
7017  for i in range(nfunc)]
7018  return functools.partial(score, funcs=funcs,
7019  weights=self.get_weights())
7020 
7021 
7022 # Register WeightedSum in _IMP_core:
7023 _IMP_core.WeightedSum_swigregister(WeightedSum)
7024 class WeightedSumOfExponential(IMP.UnaryFunction):
7025  r"""Proxy of C++ IMP::core::WeightedSumOfExponential class."""
7026 
7027  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7028 
7029  def __init__(self, funcs, weights, denom=1.0):
7030  r"""__init__(WeightedSumOfExponential self, IMP::UnaryFunctions funcs, IMP::Floats weights, IMP::Float denom=1.0) -> WeightedSumOfExponential"""
7031  _IMP_core.WeightedSumOfExponential_swiginit(self, _IMP_core.new_WeightedSumOfExponential(funcs, weights, denom))
7032 
7033  def get_function_number(self):
7034  r"""get_function_number(WeightedSumOfExponential self) -> unsigned int"""
7035  return _IMP_core.WeightedSumOfExponential_get_function_number(self)
7036 
7037  def set_weights(self, weights):
7038  r"""set_weights(WeightedSumOfExponential self, IMP::Floats weights)"""
7039  return _IMP_core.WeightedSumOfExponential_set_weights(self, weights)
7040 
7041  def get_weights(self):
7042  r"""get_weights(WeightedSumOfExponential self) -> IMP::Floats"""
7043  return _IMP_core.WeightedSumOfExponential_get_weights(self)
7044 
7045  def get_weight(self, i):
7046  r"""get_weight(WeightedSumOfExponential self, unsigned int i) -> double"""
7047  return _IMP_core.WeightedSumOfExponential_get_weight(self, i)
7048 
7049  def get_function(self, i):
7050  r"""get_function(WeightedSumOfExponential self, unsigned int i) -> UnaryFunction"""
7051  return _IMP_core.WeightedSumOfExponential_get_function(self, i)
7052 
7053  def set_denominator(self, denom):
7054  r"""set_denominator(WeightedSumOfExponential self, double denom)"""
7055  return _IMP_core.WeightedSumOfExponential_set_denominator(self, denom)
7056 
7057  def get_denominator(self):
7058  r"""get_denominator(WeightedSumOfExponential self) -> double"""
7059  return _IMP_core.WeightedSumOfExponential_get_denominator(self)
7060 
7061  def get_version_info(self):
7062  r"""get_version_info(WeightedSumOfExponential self) -> VersionInfo"""
7063  return _IMP_core.WeightedSumOfExponential_get_version_info(self)
7064  __swig_destroy__ = _IMP_core.delete_WeightedSumOfExponential
7065 
7066  def __str__(self):
7067  r"""__str__(WeightedSumOfExponential self) -> std::string"""
7068  return _IMP_core.WeightedSumOfExponential___str__(self)
7069 
7070  def __repr__(self):
7071  r"""__repr__(WeightedSumOfExponential self) -> std::string"""
7072  return _IMP_core.WeightedSumOfExponential___repr__(self)
7073 
7074  @staticmethod
7075  def get_from(o):
7076  return _object_cast_to_WeightedSumOfExponential(o)
7077 
7078 
7079  def _get_jax(self):
7080  import jax.numpy as jnp
7081  def score(val, funcs, weights, denom):
7082  exp_sum = sum(weight * jnp.exp(-f(val) / denom)
7083  for (f, weight) in zip(funcs, weights))
7084  return -jnp.log(exp_sum) * denom
7085  nfunc = self.get_function_number()
7086  funcs = [self.get_function(i).get_derived_object()._get_jax()
7087  for i in range(nfunc)]
7088  return functools.partial(score, funcs=funcs,
7089  weights=self.get_weights(),
7090  denom=self.get_denominator())
7091 
7092 
7093 # Register WeightedSumOfExponential in _IMP_core:
7094 _IMP_core.WeightedSumOfExponential_swigregister(WeightedSumOfExponential)
7095 class MSConnectivityRestraint(IMP.Restraint):
7096  r"""Proxy of C++ IMP::core::MSConnectivityRestraint class."""
7097 
7098  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7099 
7100  def __init__(self, m, ps, eps=0.1):
7101  r"""__init__(MSConnectivityRestraint self, Model m, PairScore ps, double eps=0.1) -> MSConnectivityRestraint"""
7102  _IMP_core.MSConnectivityRestraint_swiginit(self, _IMP_core.new_MSConnectivityRestraint(m, ps, eps))
7103 
7104  def add_type(self, ps):
7105  r"""add_type(MSConnectivityRestraint self, IMP::ParticlesTemp const & ps) -> unsigned int"""
7106  return _IMP_core.MSConnectivityRestraint_add_type(self, ps)
7107 
7108  def add_composite(self, *args):
7109  r"""
7110  add_composite(MSConnectivityRestraint self, IMP::Ints const & components) -> unsigned int
7111  add_composite(MSConnectivityRestraint self, IMP::Ints const & components, unsigned int parent) -> unsigned int
7112  """
7113  return _IMP_core.MSConnectivityRestraint_add_composite(self, *args)
7114 
7115  def get_connected_pairs(self):
7116  r"""get_connected_pairs(MSConnectivityRestraint self) -> IMP::ParticlePairsTemp"""
7117  return _IMP_core.MSConnectivityRestraint_get_connected_pairs(self)
7118 
7119  def get_pair_score(self):
7120  r"""get_pair_score(MSConnectivityRestraint self) -> PairScore"""
7121  return _IMP_core.MSConnectivityRestraint_get_pair_score(self)
7122 
7123  def do_create_current_decomposition(self):
7124  r"""do_create_current_decomposition(MSConnectivityRestraint self) -> IMP::Restraints"""
7125  return _IMP_core.MSConnectivityRestraint_do_create_current_decomposition(self)
7126 
7127  def do_get_inputs(self):
7128  r"""do_get_inputs(MSConnectivityRestraint self) -> IMP::ModelObjectsTemp"""
7129  return _IMP_core.MSConnectivityRestraint_do_get_inputs(self)
7130 
7131  def get_version_info(self):
7132  r"""get_version_info(MSConnectivityRestraint self) -> VersionInfo"""
7133  return _IMP_core.MSConnectivityRestraint_get_version_info(self)
7134  __swig_destroy__ = _IMP_core.delete_MSConnectivityRestraint
7135 
7136  def __str__(self):
7137  r"""__str__(MSConnectivityRestraint self) -> std::string"""
7138  return _IMP_core.MSConnectivityRestraint___str__(self)
7139 
7140  def __repr__(self):
7141  r"""__repr__(MSConnectivityRestraint self) -> std::string"""
7142  return _IMP_core.MSConnectivityRestraint___repr__(self)
7143 
7144  @staticmethod
7145  def get_from(o):
7146  return _object_cast_to_MSConnectivityRestraint(o)
7147 
7148 
7149 # Register MSConnectivityRestraint in _IMP_core:
7150 _IMP_core.MSConnectivityRestraint_swigregister(MSConnectivityRestraint)
7151 class HierarchyTraits(object):
7152  r"""Proxy of C++ IMP::core::HierarchyTraits class."""
7153 
7154  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7155 
7156  def __init__(self, *args):
7157  r"""
7158  __init__(HierarchyTraits self) -> HierarchyTraits
7159  __init__(HierarchyTraits self, std::string name) -> HierarchyTraits
7160  """
7161  _IMP_core.HierarchyTraits_swiginit(self, _IMP_core.new_HierarchyTraits(*args))
7162 
7163  def get_children_key(self):
7164  r"""get_children_key(HierarchyTraits self) -> ParticleIndexesKey"""
7165  return _IMP_core.HierarchyTraits_get_children_key(self)
7166 
7167  def get_parent_key(self):
7168  r"""get_parent_key(HierarchyTraits self) -> ParticleIndexKey"""
7169  return _IMP_core.HierarchyTraits_get_parent_key(self)
7170 
7171  def __eq__(self, o):
7172  r"""__eq__(HierarchyTraits self, HierarchyTraits o) -> bool"""
7173  return _IMP_core.HierarchyTraits___eq__(self, o)
7174 
7175  def show(self, *args):
7176  r"""show(HierarchyTraits self, _ostream out=std::cout)"""
7177  return _IMP_core.HierarchyTraits_show(self, *args)
7178 
7179  def __str__(self):
7180  r"""__str__(HierarchyTraits self) -> std::string"""
7181  return _IMP_core.HierarchyTraits___str__(self)
7182 
7183  def __repr__(self):
7184  r"""__repr__(HierarchyTraits self) -> std::string"""
7185  return _IMP_core.HierarchyTraits___repr__(self)
7186  __swig_destroy__ = _IMP_core.delete_HierarchyTraits
7187 
7188 # Register HierarchyTraits in _IMP_core:
7189 _IMP_core.HierarchyTraits_swigregister(HierarchyTraits)
7190 class Hierarchy(IMP.Decorator):
7191  r"""Proxy of C++ IMP::core::Hierarchy class."""
7192 
7193  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7194 
7195  def get_decorator_traits(self):
7196  r"""get_decorator_traits(Hierarchy self) -> HierarchyTraits"""
7197  return _IMP_core.Hierarchy_get_decorator_traits(self)
7198 
7199  @staticmethod
7200  def get_default_decorator_traits():
7201  r"""get_default_decorator_traits() -> HierarchyTraits"""
7202  return _IMP_core.Hierarchy_get_default_decorator_traits()
7203 
7204  def __init__(self, *args):
7205  r"""
7206  __init__(Hierarchy self) -> Hierarchy
7207  __init__(Hierarchy self, Model m, ParticleIndex id, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7208  __init__(Hierarchy self, _ParticleAdaptor d, HierarchyTraits tr=get_default_traits()) -> Hierarchy
7209  """
7210  _IMP_core.Hierarchy_swiginit(self, _IMP_core.new_Hierarchy(*args))
7211 
7212  def show(self, *args):
7213  r"""show(Hierarchy self, _ostream out=std::cout)"""
7214  return _IMP_core.Hierarchy_show(self, *args)
7215 
7216  @staticmethod
7217  def setup_particle(*args):
7218  r"""
7219  setup_particle(Model m, ParticleIndex pi, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7220  setup_particle(_ParticleAdaptor d, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7221  setup_particle(Model m, ParticleIndex pi, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7222  setup_particle(_ParticleAdaptor d, IMP::ParticleIndexes children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7223  setup_particle(Model m, ParticleIndex pi, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7224  setup_particle(_ParticleAdaptor d, IMP::ParticlesTemp children, HierarchyTraits tr=IMP::core::Hierarchy::get_default_decorator_traits()) -> Hierarchy
7225  """
7226  return _IMP_core.Hierarchy_setup_particle(*args)
7227 
7228  @staticmethod
7229  def get_is_setup(*args):
7230  r"""
7231  get_is_setup(_ParticleAdaptor p, HierarchyTraits tr=get_default_traits()) -> bool
7232  get_is_setup(Model arg1, ParticleIndex arg2, HierarchyTraits arg3=Hierarchy::get_default_traits()) -> bool
7233  """
7234  return _IMP_core.Hierarchy_get_is_setup(*args)
7235 
7236  @staticmethod
7237  def get_changed_key():
7238  r"""get_changed_key() -> TriggerKey"""
7239  return _IMP_core.Hierarchy_get_changed_key()
7240 
7241  def get_parent(self):
7242  r"""get_parent(Hierarchy self) -> Hierarchy"""
7243  return _IMP_core.Hierarchy_get_parent(self)
7244 
7245  def get_number_of_children(self):
7246  r"""get_number_of_children(Hierarchy self) -> unsigned int"""
7247  return _IMP_core.Hierarchy_get_number_of_children(self)
7248 
7249  def get_child(self, i):
7250  r"""get_child(Hierarchy self, unsigned int i) -> Hierarchy"""
7251  return _IMP_core.Hierarchy_get_child(self, i)
7252 
7253  def get_children_indexes(self):
7254  r"""get_children_indexes(Hierarchy self) -> IMP::ParticleIndexes"""
7255  return _IMP_core.Hierarchy_get_children_indexes(self)
7256 
7257  def get_children(self):
7258  r"""get_children(Hierarchy self) -> IMP::core::GenericHierarchies"""
7259  return _IMP_core.Hierarchy_get_children(self)
7260 
7261  def remove_child(self, *args):
7262  r"""
7263  remove_child(Hierarchy self, unsigned int i)
7264  remove_child(Hierarchy self, Hierarchy h)
7265  """
7266  return _IMP_core.Hierarchy_remove_child(self, *args)
7267 
7268  def clear_children(self):
7269  r"""clear_children(Hierarchy self)"""
7270  return _IMP_core.Hierarchy_clear_children(self)
7271 
7272  def add_child(self, h):
7273  r"""add_child(Hierarchy self, Hierarchy h)"""
7274  return _IMP_core.Hierarchy_add_child(self, h)
7275 
7276  def add_child_at(self, h, pos):
7277  r"""add_child_at(Hierarchy self, Hierarchy h, unsigned int pos)"""
7278  return _IMP_core.Hierarchy_add_child_at(self, h, pos)
7279 
7280  def get_child_index(self, *args):
7281  r"""
7282  get_child_index(Hierarchy self, unsigned int i) -> ParticleIndex
7283  get_child_index(Hierarchy self) -> int
7284  """
7285  return _IMP_core.Hierarchy_get_child_index(self, *args)
7286 
7287  @staticmethod
7288  def get_default_traits():
7289  r"""get_default_traits() -> HierarchyTraits"""
7290  return _IMP_core.Hierarchy_get_default_traits()
7291 
7292  def get_traits(self):
7293  r"""get_traits(Hierarchy self) -> HierarchyTraits"""
7294  return _IMP_core.Hierarchy_get_traits(self)
7295 
7296  def add_attribute(self, *args):
7297  r"""
7298  add_attribute(Hierarchy self, FloatKey k, IMP::Float v, bool opt)
7299  add_attribute(Hierarchy self, FloatKey a0, IMP::Float a1)
7300  add_attribute(Hierarchy self, IntKey a0, IMP::Int a1)
7301  add_attribute(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7302  add_attribute(Hierarchy self, IntsKey a0, IMP::Ints a1)
7303  add_attribute(Hierarchy self, StringKey a0, IMP::String a1)
7304  add_attribute(Hierarchy self, ParticleIndexKey a0, Particle a1)
7305  add_attribute(Hierarchy self, ObjectKey a0, Object a1)
7306  add_attribute(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7307  add_attribute(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7308  add_attribute(Hierarchy self, SparseStringKey a0, IMP::String a1)
7309  add_attribute(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7310  """
7311  return _IMP_core.Hierarchy_add_attribute(self, *args)
7312 
7313  def get_value(self, *args):
7314  r"""
7315  get_value(Hierarchy self, FloatKey a0) -> IMP::Float
7316  get_value(Hierarchy self, IntKey a0) -> IMP::Int
7317  get_value(Hierarchy self, FloatsKey a0) -> IMP::Floats
7318  get_value(Hierarchy self, IntsKey a0) -> IMP::Ints
7319  get_value(Hierarchy self, StringKey a0) -> IMP::String
7320  get_value(Hierarchy self, ParticleIndexKey a0) -> Particle
7321  get_value(Hierarchy self, ObjectKey a0) -> Object
7322  get_value(Hierarchy self, SparseFloatKey a0) -> IMP::Float
7323  get_value(Hierarchy self, SparseIntKey a0) -> IMP::Int
7324  get_value(Hierarchy self, SparseStringKey a0) -> IMP::String
7325  get_value(Hierarchy self, SparseParticleIndexKey a0) -> ParticleIndex
7326  """
7327  return _IMP_core.Hierarchy_get_value(self, *args)
7328 
7329  def set_value(self, *args):
7330  r"""
7331  set_value(Hierarchy self, FloatKey a0, IMP::Float a1)
7332  set_value(Hierarchy self, IntKey a0, IMP::Int a1)
7333  set_value(Hierarchy self, FloatsKey a0, IMP::Floats a1)
7334  set_value(Hierarchy self, IntsKey a0, IMP::Ints a1)
7335  set_value(Hierarchy self, StringKey a0, IMP::String a1)
7336  set_value(Hierarchy self, ParticleIndexKey a0, Particle a1)
7337  set_value(Hierarchy self, ObjectKey a0, Object a1)
7338  set_value(Hierarchy self, SparseFloatKey a0, IMP::Float a1)
7339  set_value(Hierarchy self, SparseIntKey a0, IMP::Int a1)
7340  set_value(Hierarchy self, SparseStringKey a0, IMP::String a1)
7341  set_value(Hierarchy self, SparseParticleIndexKey a0, ParticleIndex a1)
7342  """
7343  return _IMP_core.Hierarchy_set_value(self, *args)
7344 
7345  def remove_attribute(self, *args):
7346  r"""
7347  remove_attribute(Hierarchy self, FloatKey a0)
7348  remove_attribute(Hierarchy self, IntKey a0)
7349  remove_attribute(Hierarchy self, FloatsKey a0)
7350  remove_attribute(Hierarchy self, IntsKey a0)
7351  remove_attribute(Hierarchy self, StringKey a0)
7352  remove_attribute(Hierarchy self, ParticleIndexKey a0)
7353  remove_attribute(Hierarchy self, ObjectKey a0)
7354  remove_attribute(Hierarchy self, SparseFloatKey a0)
7355  remove_attribute(Hierarchy self, SparseIntKey a0)
7356  remove_attribute(Hierarchy self, SparseStringKey a0)
7357  remove_attribute(Hierarchy self, SparseParticleIndexKey a0)
7358  """
7359  return _IMP_core.Hierarchy_remove_attribute(self, *args)
7360 
7361  def has_attribute(self, *args):
7362  r"""
7363  has_attribute(Hierarchy self, FloatKey a0) -> bool
7364  has_attribute(Hierarchy self, IntKey a0) -> bool
7365  has_attribute(Hierarchy self, FloatsKey a0) -> bool
7366  has_attribute(Hierarchy self, IntsKey a0) -> bool
7367  has_attribute(Hierarchy self, StringKey a0) -> bool
7368  has_attribute(Hierarchy self, ParticleIndexKey a0) -> bool
7369  has_attribute(Hierarchy self, ObjectKey a0) -> bool
7370  has_attribute(Hierarchy self, SparseFloatKey a0) -> bool
7371  has_attribute(Hierarchy self, SparseIntKey a0) -> bool
7372  has_attribute(Hierarchy self, SparseStringKey a0) -> bool
7373  has_attribute(Hierarchy self, SparseParticleIndexKey a0) -> bool
7374  """
7375  return _IMP_core.Hierarchy_has_attribute(self, *args)
7376 
7377  def get_derivative(self, a0):
7378  r"""get_derivative(Hierarchy self, FloatKey a0) -> double"""
7379  return _IMP_core.Hierarchy_get_derivative(self, a0)
7380 
7381  def get_name(self):
7382  r"""get_name(Hierarchy self) -> std::string"""
7383  return _IMP_core.Hierarchy_get_name(self)
7384 
7385  def clear_caches(self):
7386  r"""clear_caches(Hierarchy self)"""
7387  return _IMP_core.Hierarchy_clear_caches(self)
7388 
7389  def set_name(self, a0):
7390  r"""set_name(Hierarchy self, std::string a0)"""
7391  return _IMP_core.Hierarchy_set_name(self, a0)
7392 
7393  def set_check_level(self, a0):
7394  r"""set_check_level(Hierarchy self, IMP::CheckLevel a0)"""
7395  return _IMP_core.Hierarchy_set_check_level(self, a0)
7396 
7397  def add_to_derivative(self, a0, a1, a2):
7398  r"""add_to_derivative(Hierarchy self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
7399  return _IMP_core.Hierarchy_add_to_derivative(self, a0, a1, a2)
7400 
7401  def set_is_optimized(self, a0, a1):
7402  r"""set_is_optimized(Hierarchy self, FloatKey a0, bool a1)"""
7403  return _IMP_core.Hierarchy_set_is_optimized(self, a0, a1)
7404 
7405  def get_is_optimized(self, a0):
7406  r"""get_is_optimized(Hierarchy self, FloatKey a0) -> bool"""
7407  return _IMP_core.Hierarchy_get_is_optimized(self, a0)
7408 
7409  def get_check_level(self):
7410  r"""get_check_level(Hierarchy self) -> IMP::CheckLevel"""
7411  return _IMP_core.Hierarchy_get_check_level(self)
7412 
7413  def __eq__(self, *args):
7414  r"""
7415  __eq__(Hierarchy self, Hierarchy o) -> bool
7416  __eq__(Hierarchy self, Particle d) -> bool
7417  """
7418  return _IMP_core.Hierarchy___eq__(self, *args)
7419 
7420  def __ne__(self, *args):
7421  r"""
7422  __ne__(Hierarchy self, Hierarchy o) -> bool
7423  __ne__(Hierarchy self, Particle d) -> bool
7424  """
7425  return _IMP_core.Hierarchy___ne__(self, *args)
7426 
7427  def __le__(self, *args):
7428  r"""
7429  __le__(Hierarchy self, Hierarchy o) -> bool
7430  __le__(Hierarchy self, Particle d) -> bool
7431  """
7432  return _IMP_core.Hierarchy___le__(self, *args)
7433 
7434  def __lt__(self, *args):
7435  r"""
7436  __lt__(Hierarchy self, Hierarchy o) -> bool
7437  __lt__(Hierarchy self, Particle d) -> bool
7438  """
7439  return _IMP_core.Hierarchy___lt__(self, *args)
7440 
7441  def __ge__(self, *args):
7442  r"""
7443  __ge__(Hierarchy self, Hierarchy o) -> bool
7444  __ge__(Hierarchy self, Particle d) -> bool
7445  """
7446  return _IMP_core.Hierarchy___ge__(self, *args)
7447 
7448  def __gt__(self, *args):
7449  r"""
7450  __gt__(Hierarchy self, Hierarchy o) -> bool
7451  __gt__(Hierarchy self, Particle d) -> bool
7452  """
7453  return _IMP_core.Hierarchy___gt__(self, *args)
7454 
7455  def __hash__(self):
7456  r"""__hash__(Hierarchy self) -> std::size_t"""
7457  return _IMP_core.Hierarchy___hash__(self)
7458 
7459  def __str__(self):
7460  r"""__str__(Hierarchy self) -> std::string"""
7461  return _IMP_core.Hierarchy___str__(self)
7462 
7463  def __repr__(self):
7464  r"""__repr__(Hierarchy self) -> std::string"""
7465  return _IMP_core.Hierarchy___repr__(self)
7466  __swig_destroy__ = _IMP_core.delete_Hierarchy
7467 
7468 # Register Hierarchy in _IMP_core:
7469 _IMP_core.Hierarchy_swigregister(Hierarchy)
7470 class HierarchyVisitor(object):
7471  r"""Proxy of C++ IMP::core::HierarchyVisitor class."""
7472 
7473  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7474  __repr__ = _swig_repr
7475 
7476  def __init__(self):
7477  r"""__init__(HierarchyVisitor self) -> HierarchyVisitor"""
7478  if self.__class__ == HierarchyVisitor:
7479  _self = None
7480  else:
7481  _self = self
7482  _IMP_core.HierarchyVisitor_swiginit(self, _IMP_core.new_HierarchyVisitor(_self, ))
7483 
7484  if self.__class__ != HierarchyVisitor:
7485  _director_objects.register(self)
7486 
7487 
7488 
7489 
7490  def __call__(self, p):
7491  r"""__call__(HierarchyVisitor self, Hierarchy p) -> bool"""
7492  return _IMP_core.HierarchyVisitor___call__(self, p)
7493  __swig_destroy__ = _IMP_core.delete_HierarchyVisitor
7494  def __disown__(self):
7495  self.this.disown()
7496  _IMP_core.disown_HierarchyVisitor(self)
7497  return weakref.proxy(self)
7498 
7499 # Register HierarchyVisitor in _IMP_core:
7500 _IMP_core.HierarchyVisitor_swigregister(HierarchyVisitor)
7501 class ModifierVisitor(HierarchyVisitor):
7502  r"""Proxy of C++ IMP::core::ModifierVisitor class."""
7503 
7504  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7505  __repr__ = _swig_repr
7506 
7507  def __init__(self, sm):
7508  r"""__init__(ModifierVisitor self, SingletonModifier sm) -> ModifierVisitor"""
7509  _IMP_core.ModifierVisitor_swiginit(self, _IMP_core.new_ModifierVisitor(sm))
7510  __swig_destroy__ = _IMP_core.delete_ModifierVisitor
7511 
7512 # Register ModifierVisitor in _IMP_core:
7513 _IMP_core.ModifierVisitor_swigregister(ModifierVisitor)
7514 class HierarchyCounter(HierarchyVisitor):
7515  r"""Proxy of C++ IMP::core::HierarchyCounter class."""
7516 
7517  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7518 
7519  def __init__(self):
7520  r"""__init__(HierarchyCounter self) -> HierarchyCounter"""
7521  _IMP_core.HierarchyCounter_swiginit(self, _IMP_core.new_HierarchyCounter())
7522 
7523  def get_count(self):
7524  r"""get_count(HierarchyCounter self) -> unsigned int"""
7525  return _IMP_core.HierarchyCounter_get_count(self)
7526 
7527  def show(self, *args):
7528  r"""show(HierarchyCounter self, _ostream out=std::cout)"""
7529  return _IMP_core.HierarchyCounter_show(self, *args)
7530 
7531  def __str__(self):
7532  r"""__str__(HierarchyCounter self) -> std::string"""
7533  return _IMP_core.HierarchyCounter___str__(self)
7534 
7535  def __repr__(self):
7536  r"""__repr__(HierarchyCounter self) -> std::string"""
7537  return _IMP_core.HierarchyCounter___repr__(self)
7538 
7539  def _get_as_binary(self):
7540  r"""_get_as_binary(HierarchyCounter self) -> PyObject *"""
7541  return _IMP_core.HierarchyCounter__get_as_binary(self)
7542 
7543  def _set_from_binary(self, p):
7544  r"""_set_from_binary(HierarchyCounter self, PyObject * p)"""
7545  return _IMP_core.HierarchyCounter__set_from_binary(self, p)
7546 
7547  def __getstate__(self):
7548  p = self._get_as_binary()
7549  if len(self.__dict__) > 1:
7550  d = self.__dict__.copy()
7551  del d['this']
7552  p = (d, p)
7553  return p
7554 
7555  def __setstate__(self, p):
7556  if not hasattr(self, 'this'):
7557  self.__init__()
7558  if isinstance(p, tuple):
7559  d, p = p
7560  self.__dict__.update(d)
7561  return self._set_from_binary(p)
7562 
7563  __swig_destroy__ = _IMP_core.delete_HierarchyCounter
7564 
7565 # Register HierarchyCounter in _IMP_core:
7566 _IMP_core.HierarchyCounter_swigregister(HierarchyCounter)
7567 
7568 def get_leaves(mhd):
7569  r"""get_leaves(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7570  return _IMP_core.get_leaves(mhd)
7571 
7572 def get_internal(mhd):
7573  r"""get_internal(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7574  return _IMP_core.get_internal(mhd)
7575 
7576 def get_all_descendants(mhd):
7577  r"""get_all_descendants(Hierarchy mhd) -> IMP::core::GenericHierarchies"""
7578  return _IMP_core.get_all_descendants(mhd)
7579 
7580 def get_root(h):
7581  r"""get_root(Hierarchy h) -> Hierarchy"""
7582  return _IMP_core.get_root(h)
7583 
7584 def visit_breadth_first(d, f):
7585  r"""visit_breadth_first(Hierarchy d, HierarchyVisitor f)"""
7586  return _IMP_core.visit_breadth_first(d, f)
7587 
7588 def visit_depth_first(d, f):
7589  r"""visit_depth_first(Hierarchy d, HierarchyVisitor f)"""
7590  return _IMP_core.visit_depth_first(d, f)
7591 class LeavesRefiner(IMP.Refiner):
7592  r"""Proxy of C++ IMP::core::LeavesRefiner class."""
7593 
7594  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7595 
7596  def __init__(self, tr):
7597  r"""__init__(LeavesRefiner self, HierarchyTraits tr) -> LeavesRefiner"""
7598  _IMP_core.LeavesRefiner_swiginit(self, _IMP_core.new_LeavesRefiner(tr))
7599 
7600  def do_get_inputs(self, m, pis):
7601  r"""do_get_inputs(LeavesRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7602  return _IMP_core.LeavesRefiner_do_get_inputs(self, m, pis)
7603 
7604  def get_version_info(self):
7605  r"""get_version_info(LeavesRefiner self) -> VersionInfo"""
7606  return _IMP_core.LeavesRefiner_get_version_info(self)
7607  __swig_destroy__ = _IMP_core.delete_LeavesRefiner
7608 
7609  def __str__(self):
7610  r"""__str__(LeavesRefiner self) -> std::string"""
7611  return _IMP_core.LeavesRefiner___str__(self)
7612 
7613  def __repr__(self):
7614  r"""__repr__(LeavesRefiner self) -> std::string"""
7615  return _IMP_core.LeavesRefiner___repr__(self)
7616 
7617  @staticmethod
7618  def get_from(o):
7619  return _object_cast_to_LeavesRefiner(o)
7620 
7621 
7622 # Register LeavesRefiner in _IMP_core:
7623 _IMP_core.LeavesRefiner_swigregister(LeavesRefiner)
7624 class Linear(IMP.UnaryFunction):
7625  r"""Proxy of C++ IMP::core::Linear class."""
7626 
7627  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7628 
7629  def __init__(self, *args):
7630  r"""
7631  __init__(Linear self, double offset, double slope) -> Linear
7632  __init__(Linear self) -> Linear
7633  """
7634  _IMP_core.Linear_swiginit(self, _IMP_core.new_Linear(*args))
7635 
7636  def set_slope(self, f):
7637  r"""set_slope(Linear self, double f)"""
7638  return _IMP_core.Linear_set_slope(self, f)
7639 
7640  def get_slope(self):
7641  r"""get_slope(Linear self) -> double"""
7642  return _IMP_core.Linear_get_slope(self)
7643 
7644  def set_offset(self, f):
7645  r"""set_offset(Linear self, double f)"""
7646  return _IMP_core.Linear_set_offset(self, f)
7647 
7648  def get_offset(self):
7649  r"""get_offset(Linear self) -> double"""
7650  return _IMP_core.Linear_get_offset(self)
7651 
7652  def get_version_info(self):
7653  r"""get_version_info(Linear self) -> VersionInfo"""
7654  return _IMP_core.Linear_get_version_info(self)
7655  __swig_destroy__ = _IMP_core.delete_Linear
7656 
7657  def __str__(self):
7658  r"""__str__(Linear self) -> std::string"""
7659  return _IMP_core.Linear___str__(self)
7660 
7661  def __repr__(self):
7662  r"""__repr__(Linear self) -> std::string"""
7663  return _IMP_core.Linear___repr__(self)
7664 
7665  @staticmethod
7666  def get_from(o):
7667  return _object_cast_to_Linear(o)
7668 
7669 
7670  def _get_as_binary(self):
7671  r"""_get_as_binary(Linear self) -> PyObject *"""
7672  return _IMP_core.Linear__get_as_binary(self)
7673 
7674  def _set_from_binary(self, p):
7675  r"""_set_from_binary(Linear self, PyObject * p)"""
7676  return _IMP_core.Linear__set_from_binary(self, p)
7677 
7678  def __getstate__(self):
7679  p = self._get_as_binary()
7680  if len(self.__dict__) > 1:
7681  d = self.__dict__.copy()
7682  del d['this']
7683  p = (d, p)
7684  return p
7685 
7686  def __setstate__(self, p):
7687  if not hasattr(self, 'this'):
7688  self.__init__()
7689  if isinstance(p, tuple):
7690  d, p = p
7691  self.__dict__.update(d)
7692  return self._set_from_binary(p)
7693 
7694 
7695  def _get_jax(self):
7696  def score(val, slope, offset):
7697  return (val - offset) * slope
7698  return functools.partial(score, slope=self.get_slope(),
7699  offset=self.get_offset())
7700 
7701 
7702 # Register Linear in _IMP_core:
7703 _IMP_core.Linear_swigregister(Linear)
7704 class LogNormalMover(MonteCarloMover):
7705  r"""Proxy of C++ IMP::core::LogNormalMover class."""
7706 
7707  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7708 
7709  def __init__(self, *args):
7710  r"""
7711  __init__(LogNormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> LogNormalMover
7712  __init__(LogNormalMover self, Model m, ParticleIndex pi, double stddev) -> LogNormalMover
7713  __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> LogNormalMover
7714  __init__(LogNormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> LogNormalMover
7715  __init__(LogNormalMover self) -> LogNormalMover
7716  """
7717  _IMP_core.LogNormalMover_swiginit(self, _IMP_core.new_LogNormalMover(*args))
7718 
7719  def set_sigma(self, sigma):
7720  r"""set_sigma(LogNormalMover self, IMP::Float sigma)"""
7721  return _IMP_core.LogNormalMover_set_sigma(self, sigma)
7722 
7723  def get_sigma(self):
7724  r"""get_sigma(LogNormalMover self) -> IMP::Float"""
7725  return _IMP_core.LogNormalMover_get_sigma(self)
7726 
7727  def get_indexes(self):
7728  r"""get_indexes(LogNormalMover self) -> IMP::ParticleIndexes"""
7729  return _IMP_core.LogNormalMover_get_indexes(self)
7730 
7731  def get_keys(self):
7732  r"""get_keys(LogNormalMover self) -> IMP::FloatKeys"""
7733  return _IMP_core.LogNormalMover_get_keys(self)
7734 
7735  def get_version_info(self):
7736  r"""get_version_info(LogNormalMover self) -> VersionInfo"""
7737  return _IMP_core.LogNormalMover_get_version_info(self)
7738  __swig_destroy__ = _IMP_core.delete_LogNormalMover
7739 
7740  def __str__(self):
7741  r"""__str__(LogNormalMover self) -> std::string"""
7742  return _IMP_core.LogNormalMover___str__(self)
7743 
7744  def __repr__(self):
7745  r"""__repr__(LogNormalMover self) -> std::string"""
7746  return _IMP_core.LogNormalMover___repr__(self)
7747 
7748  @staticmethod
7749  def get_from(o):
7750  return _object_cast_to_LogNormalMover(o)
7751 
7752 
7753  def _get_as_binary(self):
7754  r"""_get_as_binary(LogNormalMover self) -> PyObject *"""
7755  return _IMP_core.LogNormalMover__get_as_binary(self)
7756 
7757  def _set_from_binary(self, p):
7758  r"""_set_from_binary(LogNormalMover self, PyObject * p)"""
7759  return _IMP_core.LogNormalMover__set_from_binary(self, p)
7760 
7761  def __getstate__(self):
7762  p = self._get_as_binary()
7763  if len(self.__dict__) > 1:
7764  d = self.__dict__.copy()
7765  del d['this']
7766  p = (d, p)
7767  return p
7768 
7769  def __setstate__(self, p):
7770  if not hasattr(self, 'this'):
7771  self.__init__()
7772  if isinstance(p, tuple):
7773  d, p = p
7774  self.__dict__.update(d)
7775  return self._set_from_binary(p)
7776 
7777 
7778  def _get_jax(self, space):
7779  import jax.random
7780  from IMP.core._jax_util import _get_offset_propose_func
7781  keys = self.get_keys()
7782  sigma = self.get_sigma()
7783 
7784  def offset_func(key, shape):
7785  key, subkey = jax.random.split(key)
7786  return key, jax.random.lognormal(subkey, sigma, shape)
7787 
7788  propose_func, keys = _get_offset_propose_func(
7789  self.get_indexes(), keys, offset_func)
7790 
7791  return self._wrap_jax(lambda key: key, propose_func, keys=keys)
7792 
7793 
7794 # Register LogNormalMover in _IMP_core:
7795 _IMP_core.LogNormalMover_swigregister(LogNormalMover)
7796 IMP_CORE_HAS_MONTE_CARLO_MOVER = _IMP_core.IMP_CORE_HAS_MONTE_CARLO_MOVER
7797 
7798 class MonteCarlo(IMP.Optimizer):
7799  r"""Proxy of C++ IMP::core::MonteCarlo class."""
7800 
7801  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7802 
7803  def __init__(self, *args):
7804  r"""
7805  __init__(MonteCarlo self, Model m) -> MonteCarlo
7806  __init__(MonteCarlo self) -> MonteCarlo
7807  """
7808  _IMP_core.MonteCarlo_swiginit(self, _IMP_core.new_MonteCarlo(*args))
7809 
7810  def get_version_info(self):
7811  r"""get_version_info(MonteCarlo self) -> VersionInfo"""
7812  return _IMP_core.MonteCarlo_get_version_info(self)
7813  __swig_destroy__ = _IMP_core.delete_MonteCarlo
7814 
7815  def set_return_best(self, tf):
7816  r"""set_return_best(MonteCarlo self, bool tf)"""
7817  return _IMP_core.MonteCarlo_set_return_best(self, tf)
7818 
7819  def get_return_best(self):
7820  r"""get_return_best(MonteCarlo self) -> bool"""
7821  return _IMP_core.MonteCarlo_get_return_best(self)
7822 
7823  def set_score_moved(self, mv):
7824  r"""set_score_moved(MonteCarlo self, bool mv)"""
7825  return _IMP_core.MonteCarlo_set_score_moved(self, mv)
7826 
7827  def set_kt(self, t):
7828  r"""set_kt(MonteCarlo self, IMP::Float t)"""
7829  return _IMP_core.MonteCarlo_set_kt(self, t)
7830 
7831  def get_kt(self):
7832  r"""get_kt(MonteCarlo self) -> IMP::Float"""
7833  return _IMP_core.MonteCarlo_get_kt(self)
7834 
7835  def get_last_accepted_energy(self):
7836  r"""get_last_accepted_energy(MonteCarlo self) -> double"""
7837  return _IMP_core.MonteCarlo_get_last_accepted_energy(self)
7838 
7839  def set_last_accepted_energy(self, energy):
7840  r"""set_last_accepted_energy(MonteCarlo self, double energy)"""
7841  return _IMP_core.MonteCarlo_set_last_accepted_energy(self, energy)
7842 
7843  def get_best_accepted_energy(self):
7844  r"""get_best_accepted_energy(MonteCarlo self) -> double"""
7845  return _IMP_core.MonteCarlo_get_best_accepted_energy(self)
7846 
7847  def set_best_accepted_energy(self, energy):
7848  r"""set_best_accepted_energy(MonteCarlo self, double energy)"""
7849  return _IMP_core.MonteCarlo_set_best_accepted_energy(self, energy)
7850 
7851  def get_number_of_downward_steps(self):
7852  r"""get_number_of_downward_steps(MonteCarlo self) -> unsigned int"""
7853  return _IMP_core.MonteCarlo_get_number_of_downward_steps(self)
7854 
7855  def get_number_of_upward_steps(self):
7856  r"""get_number_of_upward_steps(MonteCarlo self) -> unsigned int"""
7857  return _IMP_core.MonteCarlo_get_number_of_upward_steps(self)
7858 
7859  def get_number_of_proposed_steps(self):
7860  r"""get_number_of_proposed_steps(MonteCarlo self) -> unsigned int"""
7861  return _IMP_core.MonteCarlo_get_number_of_proposed_steps(self)
7862 
7863  def get_number_of_accepted_steps(self):
7864  r"""get_number_of_accepted_steps(MonteCarlo self) -> unsigned int"""
7865  return _IMP_core.MonteCarlo_get_number_of_accepted_steps(self)
7866 
7867  def set_number_of_downward_steps(self, nsteps):
7868  r"""set_number_of_downward_steps(MonteCarlo self, unsigned int nsteps)"""
7869  return _IMP_core.MonteCarlo_set_number_of_downward_steps(self, nsteps)
7870 
7871  def set_number_of_upward_steps(self, nsteps):
7872  r"""set_number_of_upward_steps(MonteCarlo self, unsigned int nsteps)"""
7873  return _IMP_core.MonteCarlo_set_number_of_upward_steps(self, nsteps)
7874 
7875  def set_number_of_rejected_steps(self, nsteps):
7876  r"""set_number_of_rejected_steps(MonteCarlo self, unsigned int nsteps)"""
7877  return _IMP_core.MonteCarlo_set_number_of_rejected_steps(self, nsteps)
7878 
7879  def reset_statistics(self):
7880  r"""reset_statistics(MonteCarlo self)"""
7881  return _IMP_core.MonteCarlo_reset_statistics(self)
7882 
7883  def set_score_threshold(self, s):
7884  r"""set_score_threshold(MonteCarlo self, double s)"""
7885  return _IMP_core.MonteCarlo_set_score_threshold(self, s)
7886 
7887  def get_score_threshold(self):
7888  r"""get_score_threshold(MonteCarlo self) -> double"""
7889  return _IMP_core.MonteCarlo_get_score_threshold(self)
7890 
7891  def set_maximum_difference(self, d):
7892  r"""set_maximum_difference(MonteCarlo self, double d)"""
7893  return _IMP_core.MonteCarlo_set_maximum_difference(self, d)
7894 
7895  def get_maximum_difference(self):
7896  r"""get_maximum_difference(MonteCarlo self) -> double"""
7897  return _IMP_core.MonteCarlo_get_maximum_difference(self)
7898  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)
7899  def __set_movers(self, obj): IMP._list_util.set_varlist(self.movers, obj)
7900  def __del_movers(self): IMP._list_util.del_varlist(self.movers)
7901  movers = property(__get_movers, __set_movers, __del_movers, doc="List of ##ucnames")
7902 
7903  def remove_mover(self, d):
7904  r"""remove_mover(MonteCarlo self, MonteCarloMover d)"""
7905  return _IMP_core.MonteCarlo_remove_mover(self, d)
7906 
7907  def _python_index_mover(self, d, start, stop):
7908  r"""_python_index_mover(MonteCarlo self, MonteCarloMover d, unsigned int start, unsigned int stop) -> unsigned int"""
7909  return _IMP_core.MonteCarlo__python_index_mover(self, d, start, stop)
7910 
7911  def remove_movers(self, d):
7912  r"""remove_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & d)"""
7913  return _IMP_core.MonteCarlo_remove_movers(self, d)
7914 
7915  def set_movers(self, ps):
7916  r"""set_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & ps)"""
7917  return _IMP_core.MonteCarlo_set_movers(self, ps)
7918 
7919  def set_movers_order(self, objs):
7920  r"""set_movers_order(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7921  return _IMP_core.MonteCarlo_set_movers_order(self, objs)
7922 
7923  def add_mover(self, obj):
7924  r"""add_mover(MonteCarlo self, MonteCarloMover obj) -> unsigned int"""
7925  return _IMP_core.MonteCarlo_add_mover(self, obj)
7926 
7927  def add_movers(self, objs):
7928  r"""add_movers(MonteCarlo self, IMP::core::MonteCarloMovers const & objs)"""
7929  return _IMP_core.MonteCarlo_add_movers(self, objs)
7930 
7931  def clear_movers(self):
7932  r"""clear_movers(MonteCarlo self)"""
7933  return _IMP_core.MonteCarlo_clear_movers(self)
7934 
7935  def get_number_of_movers(self):
7936  r"""get_number_of_movers(MonteCarlo self) -> unsigned int"""
7937  return _IMP_core.MonteCarlo_get_number_of_movers(self)
7938 
7939  def get_has_movers(self):
7940  r"""get_has_movers(MonteCarlo self) -> bool"""
7941  return _IMP_core.MonteCarlo_get_has_movers(self)
7942 
7943  def get_mover(self, i):
7944  r"""get_mover(MonteCarlo self, unsigned int i) -> MonteCarloMover"""
7945  return _IMP_core.MonteCarlo_get_mover(self, i)
7946 
7947  def get_movers(self):
7948  r"""get_movers(MonteCarlo self) -> IMP::core::MonteCarloMovers"""
7949  return _IMP_core.MonteCarlo_get_movers(self)
7950 
7951  def erase_mover(self, i):
7952  r"""erase_mover(MonteCarlo self, unsigned int i)"""
7953  return _IMP_core.MonteCarlo_erase_mover(self, i)
7954 
7955  def reserve_movers(self, sz):
7956  r"""reserve_movers(MonteCarlo self, unsigned int sz)"""
7957  return _IMP_core.MonteCarlo_reserve_movers(self, sz)
7958 
7959  def __str__(self):
7960  r"""__str__(MonteCarlo self) -> std::string"""
7961  return _IMP_core.MonteCarlo___str__(self)
7962 
7963  def __repr__(self):
7964  r"""__repr__(MonteCarlo self) -> std::string"""
7965  return _IMP_core.MonteCarlo___repr__(self)
7966 
7967  @staticmethod
7968  def get_from(o):
7969  return _object_cast_to_MonteCarlo(o)
7970 
7971 
7972  def _get_as_binary(self):
7973  r"""_get_as_binary(MonteCarlo self) -> PyObject *"""
7974  return _IMP_core.MonteCarlo__get_as_binary(self)
7975 
7976  def _set_from_binary(self, p):
7977  r"""_set_from_binary(MonteCarlo self, PyObject * p)"""
7978  return _IMP_core.MonteCarlo__set_from_binary(self, p)
7979 
7980  def __getstate__(self):
7981  p = self._get_as_binary()
7982  if len(self.__dict__) > 1:
7983  d = self.__dict__.copy()
7984  del d['this']
7985  p = (d, p)
7986  return p
7987 
7988  def __setstate__(self, p):
7989  if not hasattr(self, 'this'):
7990  self.__init__()
7991  if isinstance(p, tuple):
7992  d, p = p
7993  self.__dict__.update(d)
7994  return self._set_from_binary(p)
7995 
7996 
7997  def _get_jax(self, space=None):
7998  from IMP.core._jax_util import _MCJAXInfo
7999  return _MCJAXInfo(self, space)
8000 
8001  def _get_jax_optimizer(self, max_steps, space=None):
8002  import IMP.core._jax_util
8003  return IMP.core._jax_util._MCJAXOptimizer(self, max_steps, space)
8004 
8005  def _optimize_jax(self, max_steps, space=None):
8006  opt = self._get_jax_optimizer(max_steps, space=space)
8007  score, mc_state = opt.optimize(opt.get_initial_state())
8008  return score
8009 
8010 
8011 # Register MonteCarlo in _IMP_core:
8012 _IMP_core.MonteCarlo_swigregister(MonteCarlo)
8013 class MonteCarloWithLocalOptimization(MonteCarlo):
8014  r"""Proxy of C++ IMP::core::MonteCarloWithLocalOptimization class."""
8015 
8016  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8017 
8018  def __init__(self, opt, steps):
8019  r"""__init__(MonteCarloWithLocalOptimization self, Optimizer opt, unsigned int steps) -> MonteCarloWithLocalOptimization"""
8020  _IMP_core.MonteCarloWithLocalOptimization_swiginit(self, _IMP_core.new_MonteCarloWithLocalOptimization(opt, steps))
8021 
8022  def get_number_of_steps(self):
8023  r"""get_number_of_steps(MonteCarloWithLocalOptimization self) -> unsigned int"""
8024  return _IMP_core.MonteCarloWithLocalOptimization_get_number_of_steps(self)
8025 
8026  def get_local_optimizer(self):
8027  r"""get_local_optimizer(MonteCarloWithLocalOptimization self) -> Optimizer"""
8028  return _IMP_core.MonteCarloWithLocalOptimization_get_local_optimizer(self)
8029  __swig_destroy__ = _IMP_core.delete_MonteCarloWithLocalOptimization
8030 
8031  def __str__(self):
8032  r"""__str__(MonteCarloWithLocalOptimization self) -> std::string"""
8033  return _IMP_core.MonteCarloWithLocalOptimization___str__(self)
8034 
8035  def __repr__(self):
8036  r"""__repr__(MonteCarloWithLocalOptimization self) -> std::string"""
8037  return _IMP_core.MonteCarloWithLocalOptimization___repr__(self)
8038 
8039  @staticmethod
8040  def get_from(o):
8041  return _object_cast_to_MonteCarloWithLocalOptimization(o)
8042 
8043 
8044 # Register MonteCarloWithLocalOptimization in _IMP_core:
8045 _IMP_core.MonteCarloWithLocalOptimization_swigregister(MonteCarloWithLocalOptimization)
8046 class MonteCarloWithBasinHopping(MonteCarloWithLocalOptimization):
8047  r"""Proxy of C++ IMP::core::MonteCarloWithBasinHopping class."""
8048 
8049  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8050 
8051  def __init__(self, opt, ns):
8052  r"""__init__(MonteCarloWithBasinHopping self, Optimizer opt, unsigned int ns) -> MonteCarloWithBasinHopping"""
8053  _IMP_core.MonteCarloWithBasinHopping_swiginit(self, _IMP_core.new_MonteCarloWithBasinHopping(opt, ns))
8054  __swig_destroy__ = _IMP_core.delete_MonteCarloWithBasinHopping
8055 
8056  def __str__(self):
8057  r"""__str__(MonteCarloWithBasinHopping self) -> std::string"""
8058  return _IMP_core.MonteCarloWithBasinHopping___str__(self)
8059 
8060  def __repr__(self):
8061  r"""__repr__(MonteCarloWithBasinHopping self) -> std::string"""
8062  return _IMP_core.MonteCarloWithBasinHopping___repr__(self)
8063 
8064  @staticmethod
8065  def get_from(o):
8066  return _object_cast_to_MonteCarloWithBasinHopping(o)
8067 
8068 
8069 # Register MonteCarloWithBasinHopping in _IMP_core:
8070 _IMP_core.MonteCarloWithBasinHopping_swigregister(MonteCarloWithBasinHopping)
8071 class NeighborsTable(IMP.ScoreState):
8072  r"""Proxy of C++ IMP::core::NeighborsTable class."""
8073 
8074  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8075 
8076  def __init__(self, *args):
8077  r"""__init__(NeighborsTable self, PairContainer input, std::string name="CloseNeighborsTable%1%") -> NeighborsTable"""
8078  _IMP_core.NeighborsTable_swiginit(self, _IMP_core.new_NeighborsTable(*args))
8079 
8080  def get_neighbors(self, pi):
8081  r"""get_neighbors(NeighborsTable self, ParticleIndex pi) -> IMP::ParticleIndexes const &"""
8082  return _IMP_core.NeighborsTable_get_neighbors(self, pi)
8083 
8084  def get_version_info(self):
8085  r"""get_version_info(NeighborsTable self) -> VersionInfo"""
8086  return _IMP_core.NeighborsTable_get_version_info(self)
8087  __swig_destroy__ = _IMP_core.delete_NeighborsTable
8088 
8089  def __str__(self):
8090  r"""__str__(NeighborsTable self) -> std::string"""
8091  return _IMP_core.NeighborsTable___str__(self)
8092 
8093  def __repr__(self):
8094  r"""__repr__(NeighborsTable self) -> std::string"""
8095  return _IMP_core.NeighborsTable___repr__(self)
8096 
8097  @staticmethod
8098  def get_from(o):
8099  return _object_cast_to_NeighborsTable(o)
8100 
8101 
8102 # Register NeighborsTable in _IMP_core:
8103 _IMP_core.NeighborsTable_swigregister(NeighborsTable)
8104 class NormalMover(MonteCarloMover):
8105  r"""Proxy of C++ IMP::core::NormalMover class."""
8106 
8107  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8108 
8109  def __init__(self, *args):
8110  r"""
8111  __init__(NormalMover self, Model m, ParticleIndex pi, IMP::FloatKeys const & vars, double stddev) -> NormalMover
8112  __init__(NormalMover self, Model m, ParticleIndex pi, double stddev) -> NormalMover
8113  __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::FloatKeys const & vars, IMP::Float sigma) -> NormalMover
8114  __init__(NormalMover self, IMP::ParticlesTemp const & sc, IMP::Float radius) -> NormalMover
8115  __init__(NormalMover self) -> NormalMover
8116  """
8117  _IMP_core.NormalMover_swiginit(self, _IMP_core.new_NormalMover(*args))
8118 
8119  def set_sigma(self, sigma):
8120  r"""set_sigma(NormalMover self, IMP::Float sigma)"""
8121  return _IMP_core.NormalMover_set_sigma(self, sigma)
8122 
8123  def get_sigma(self):
8124  r"""get_sigma(NormalMover self) -> IMP::Float"""
8125  return _IMP_core.NormalMover_get_sigma(self)
8126 
8127  def get_indexes(self):
8128  r"""get_indexes(NormalMover self) -> IMP::ParticleIndexes"""
8129  return _IMP_core.NormalMover_get_indexes(self)
8130 
8131  def get_keys(self):
8132  r"""get_keys(NormalMover self) -> IMP::FloatKeys"""
8133  return _IMP_core.NormalMover_get_keys(self)
8134 
8135  def get_version_info(self):
8136  r"""get_version_info(NormalMover self) -> VersionInfo"""
8137  return _IMP_core.NormalMover_get_version_info(self)
8138  __swig_destroy__ = _IMP_core.delete_NormalMover
8139 
8140  def __str__(self):
8141  r"""__str__(NormalMover self) -> std::string"""
8142  return _IMP_core.NormalMover___str__(self)
8143 
8144  def __repr__(self):
8145  r"""__repr__(NormalMover self) -> std::string"""
8146  return _IMP_core.NormalMover___repr__(self)
8147 
8148  @staticmethod
8149  def get_from(o):
8150  return _object_cast_to_NormalMover(o)
8151 
8152 
8153  def _get_as_binary(self):
8154  r"""_get_as_binary(NormalMover self) -> PyObject *"""
8155  return _IMP_core.NormalMover__get_as_binary(self)
8156 
8157  def _set_from_binary(self, p):
8158  r"""_set_from_binary(NormalMover self, PyObject * p)"""
8159  return _IMP_core.NormalMover__set_from_binary(self, p)
8160 
8161  def __getstate__(self):
8162  p = self._get_as_binary()
8163  if len(self.__dict__) > 1:
8164  d = self.__dict__.copy()
8165  del d['this']
8166  p = (d, p)
8167  return p
8168 
8169  def __setstate__(self, p):
8170  if not hasattr(self, 'this'):
8171  self.__init__()
8172  if isinstance(p, tuple):
8173  d, p = p
8174  self.__dict__.update(d)
8175  return self._set_from_binary(p)
8176 
8177 
8178  def _get_jax(self, space):
8179  import jax.random
8180  from IMP.core._jax_util import _get_offset_propose_func
8181  keys = self.get_keys()
8182  sigma = self.get_sigma()
8183 
8184  def offset_func(key, shape):
8185  key, subkey = jax.random.split(key)
8186  return key, jax.random.normal(subkey, shape) * sigma
8187 
8188  propose_func, keys = _get_offset_propose_func(
8189  self.get_indexes(), keys, offset_func)
8190 
8191  return self._wrap_jax(lambda key: key, propose_func, keys=keys)
8192 
8193 
8194 # Register NormalMover in _IMP_core:
8195 _IMP_core.NormalMover_swigregister(NormalMover)
8196 class OpenCubicSpline(_OpenCubicSplineBase):
8197  r"""Proxy of C++ IMP::core::OpenCubicSpline class."""
8198 
8199  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8200 
8201  def __init__(self, values, minrange, spacing, extend=False):
8202  r"""__init__(OpenCubicSpline self, IMP::Floats const & values, IMP::Float minrange, IMP::Float spacing, bool extend=False) -> OpenCubicSpline"""
8203  _IMP_core.OpenCubicSpline_swiginit(self, _IMP_core.new_OpenCubicSpline(values, minrange, spacing, extend))
8204 
8205  def get_minrange(self):
8206  r"""get_minrange(OpenCubicSpline self) -> IMP::Float"""
8207  return _IMP_core.OpenCubicSpline_get_minrange(self)
8208 
8209  def get_spacing(self):
8210  r"""get_spacing(OpenCubicSpline self) -> IMP::Float"""
8211  return _IMP_core.OpenCubicSpline_get_spacing(self)
8212 
8213  def get_values(self):
8214  r"""get_values(OpenCubicSpline self) -> IMP::Floats"""
8215  return _IMP_core.OpenCubicSpline_get_values(self)
8216 
8217  def get_extend(self):
8218  r"""get_extend(OpenCubicSpline self) -> bool"""
8219  return _IMP_core.OpenCubicSpline_get_extend(self)
8220 
8221  def get_second_derivatives(self):
8222  r"""get_second_derivatives(OpenCubicSpline self) -> IMP::Floats"""
8223  return _IMP_core.OpenCubicSpline_get_second_derivatives(self)
8224  __swig_destroy__ = _IMP_core.delete_OpenCubicSpline
8225 
8226  def __str__(self):
8227  r"""__str__(OpenCubicSpline self) -> std::string"""
8228  return _IMP_core.OpenCubicSpline___str__(self)
8229 
8230  def __repr__(self):
8231  r"""__repr__(OpenCubicSpline self) -> std::string"""
8232  return _IMP_core.OpenCubicSpline___repr__(self)
8233 
8234  @staticmethod
8235  def get_from(o):
8236  return _object_cast_to_OpenCubicSpline(o)
8237 
8238 
8239  def _get_jax(self):
8240  import jax.numpy as jnp
8241  from IMP.core._jax_util import _spline
8242  def score(feature, minrange, maxrange, spacing, values, second_derivs):
8243  # clip feature to range (extend=True behavior)
8244  feature = jnp.clip(feature, minrange, maxrange)
8245  # determine bin index and thus the cubic fragment to use:
8246  lowbin = jnp.array((feature - minrange) / spacing, dtype=int)
8247  return _spline(feature, minrange, lowbin, lowbin + 1, spacing,
8248  values, second_derivs)
8249  spacing = self.get_spacing()
8250  minrange = self.get_minrange()
8251  values = jnp.asarray(self.get_values())
8252  maxrange = minrange + spacing * (len(values) - 1)
8253  return functools.partial(
8254  score, minrange=minrange, maxrange=maxrange,
8255  spacing=spacing, values=values,
8256  second_derivs=jnp.asarray(self.get_second_derivatives()))
8257 
8258 
8259 # Register OpenCubicSpline in _IMP_core:
8260 _IMP_core.OpenCubicSpline_swigregister(OpenCubicSpline)
8261 class QuadraticClosePairsFinder(ClosePairsFinder):
8262  r"""Proxy of C++ IMP::core::QuadraticClosePairsFinder class."""
8263 
8264  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8265 
8266  def __init__(self):
8267  r"""__init__(QuadraticClosePairsFinder self) -> QuadraticClosePairsFinder"""
8268  _IMP_core.QuadraticClosePairsFinder_swiginit(self, _IMP_core.new_QuadraticClosePairsFinder())
8269 
8270  def get_are_close_and_filtered(self, *args):
8271  r"""
8272  get_are_close_and_filtered(QuadraticClosePairsFinder self, Particle a, Particle b) -> bool
8273  get_are_close_and_filtered(QuadraticClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b) -> bool
8274  """
8275  return _IMP_core.QuadraticClosePairsFinder_get_are_close_and_filtered(self, *args)
8276 
8277  def get_close_pairs(self, *args):
8278  r"""
8279  get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8280  get_close_pairs(QuadraticClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
8281  get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
8282  get_close_pairs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
8283  """
8284  return _IMP_core.QuadraticClosePairsFinder_get_close_pairs(self, *args)
8285 
8286  def do_get_inputs(self, m, pis):
8287  r"""do_get_inputs(QuadraticClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8288  return _IMP_core.QuadraticClosePairsFinder_do_get_inputs(self, m, pis)
8289 
8290  def get_version_info(self):
8291  r"""get_version_info(QuadraticClosePairsFinder self) -> VersionInfo"""
8292  return _IMP_core.QuadraticClosePairsFinder_get_version_info(self)
8293  __swig_destroy__ = _IMP_core.delete_QuadraticClosePairsFinder
8294 
8295  def __str__(self):
8296  r"""__str__(QuadraticClosePairsFinder self) -> std::string"""
8297  return _IMP_core.QuadraticClosePairsFinder___str__(self)
8298 
8299  def __repr__(self):
8300  r"""__repr__(QuadraticClosePairsFinder self) -> std::string"""
8301  return _IMP_core.QuadraticClosePairsFinder___repr__(self)
8302 
8303  @staticmethod
8304  def get_from(o):
8305  return _object_cast_to_QuadraticClosePairsFinder(o)
8306 
8307 
8308 # Register QuadraticClosePairsFinder in _IMP_core:
8309 _IMP_core.QuadraticClosePairsFinder_swigregister(QuadraticClosePairsFinder)
8310 class RefinedPairsPairScore(IMP.PairScore):
8311  r"""Proxy of C++ IMP::core::RefinedPairsPairScore class."""
8312 
8313  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8314 
8315  def __init__(self, r, f):
8316  r"""__init__(RefinedPairsPairScore self, Refiner r, PairScore f) -> RefinedPairsPairScore"""
8317  _IMP_core.RefinedPairsPairScore_swiginit(self, _IMP_core.new_RefinedPairsPairScore(r, f))
8318 
8319  def do_get_inputs(self, m, pis):
8320  r"""do_get_inputs(RefinedPairsPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8321  return _IMP_core.RefinedPairsPairScore_do_get_inputs(self, m, pis)
8322 
8323  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
8324  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"""
8325  return _IMP_core.RefinedPairsPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
8326 
8327  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
8328  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"""
8329  return _IMP_core.RefinedPairsPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
8330 
8331  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
8332  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"""
8333  return _IMP_core.RefinedPairsPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
8334 
8335  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
8336  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"""
8337  return _IMP_core.RefinedPairsPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
8338 
8339  def get_version_info(self):
8340  r"""get_version_info(RefinedPairsPairScore self) -> VersionInfo"""
8341  return _IMP_core.RefinedPairsPairScore_get_version_info(self)
8342  __swig_destroy__ = _IMP_core.delete_RefinedPairsPairScore
8343 
8344  def __str__(self):
8345  r"""__str__(RefinedPairsPairScore self) -> std::string"""
8346  return _IMP_core.RefinedPairsPairScore___str__(self)
8347 
8348  def __repr__(self):
8349  r"""__repr__(RefinedPairsPairScore self) -> std::string"""
8350  return _IMP_core.RefinedPairsPairScore___repr__(self)
8351 
8352  @staticmethod
8353  def get_from(o):
8354  return _object_cast_to_RefinedPairsPairScore(o)
8355 
8356 
8357 # Register RefinedPairsPairScore in _IMP_core:
8358 _IMP_core.RefinedPairsPairScore_swigregister(RefinedPairsPairScore)
8359 class RigidBody(XYZ):
8360  r"""Proxy of C++ IMP::core::RigidBody class."""
8361 
8362  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8363 
8364  def get_rigid_members(self):
8365  r"""get_rigid_members(RigidBody self) -> IMP::core::RigidMembers"""
8366  return _IMP_core.RigidBody_get_rigid_members(self)
8367 
8368  @staticmethod
8369  def get_rotation_key():
8370  r"""get_rotation_key() -> Vector4DDerivKey"""
8371  return _IMP_core.RigidBody_get_rotation_key()
8372 
8373  def get_member_particle_indexes(self):
8374  r"""get_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8375  return _IMP_core.RigidBody_get_member_particle_indexes(self)
8376 
8377  def get_body_member_particle_indexes(self):
8378  r"""get_body_member_particle_indexes(RigidBody self) -> IMP::ParticleIndexes const &"""
8379  return _IMP_core.RigidBody_get_body_member_particle_indexes(self)
8380 
8381  def get_member_indexes(self):
8382  r"""get_member_indexes(RigidBody self) -> IMP::ParticleIndexes"""
8383  return _IMP_core.RigidBody_get_member_indexes(self)
8384 
8385  def show(self, *args):
8386  r"""show(RigidBody self, _ostream out=std::cout)"""
8387  return _IMP_core.RigidBody_show(self, *args)
8388 
8389  @staticmethod
8390  def setup_particle(*args):
8391  r"""
8392  setup_particle(Model m, ParticleIndex pi, _ParticleIndexesAdaptor ps) -> RigidBody
8393  setup_particle(_ParticleAdaptor pa, _ParticleIndexesAdaptor ps) -> RigidBody
8394  setup_particle(Model m, ParticleIndex pi, ReferenceFrame3D rf) -> RigidBody
8395  setup_particle(_ParticleAdaptor pa, ReferenceFrame3D rf) -> RigidBody
8396  """
8397  return _IMP_core.RigidBody_setup_particle(*args)
8398 
8399  @staticmethod
8400  def teardown_particle(rb):
8401  r"""teardown_particle(RigidBody rb)"""
8402  return _IMP_core.RigidBody_teardown_particle(rb)
8403 
8404  def __init__(self, *args):
8405  r"""
8406  __init__(RigidBody self) -> RigidBody
8407  __init__(RigidBody self, Model m, ParticleIndex id) -> RigidBody
8408  __init__(RigidBody self, _ParticleAdaptor d) -> RigidBody
8409  __init__(RigidBody self, RigidBody arg2) -> RigidBody
8410  """
8411  _IMP_core.RigidBody_swiginit(self, _IMP_core.new_RigidBody(*args))
8412  __swig_destroy__ = _IMP_core.delete_RigidBody
8413 
8414  @staticmethod
8415  def get_is_setup(*args):
8416  r"""
8417  get_is_setup(_ParticleAdaptor p) -> bool
8418  get_is_setup(Model m, ParticleIndex pi) -> bool
8419  """
8420  return _IMP_core.RigidBody_get_is_setup(*args)
8421 
8422  def get_coordinates(self):
8423  r"""get_coordinates(RigidBody self) -> Vector3D"""
8424  return _IMP_core.RigidBody_get_coordinates(self)
8425 
8426  def get_rotation(self):
8427  r"""get_rotation(RigidBody self) -> Rotation3D"""
8428  return _IMP_core.RigidBody_get_rotation(self)
8429 
8430  def get_reference_frame(self):
8431  r"""get_reference_frame(RigidBody self) -> ReferenceFrame3D"""
8432  return _IMP_core.RigidBody_get_reference_frame(self)
8433 
8434  def set_reference_frame(self, tr):
8435  r"""set_reference_frame(RigidBody self, ReferenceFrame3D tr)"""
8436  return _IMP_core.RigidBody_set_reference_frame(self, tr)
8437 
8438  def set_reference_frame_lazy(self, tr):
8439  r"""set_reference_frame_lazy(RigidBody self, ReferenceFrame3D tr)"""
8440  return _IMP_core.RigidBody_set_reference_frame_lazy(self, tr)
8441 
8442  def set_reference_frame_from_members(self, members):
8443  r"""set_reference_frame_from_members(RigidBody self, IMP::ParticleIndexes const & members)"""
8444  return _IMP_core.RigidBody_set_reference_frame_from_members(self, members)
8445 
8446  def pull_back_members_adjoints(self, da):
8447  r"""pull_back_members_adjoints(RigidBody self, DerivativeAccumulator da)"""
8448  return _IMP_core.RigidBody_pull_back_members_adjoints(self, da)
8449 
8450  def pull_back_member_adjoints(self, pi, da):
8451  r"""pull_back_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8452  return _IMP_core.RigidBody_pull_back_member_adjoints(self, pi, da)
8453 
8454  def pull_back_body_member_adjoints(self, pi, da):
8455  r"""pull_back_body_member_adjoints(RigidBody self, ParticleIndex pi, DerivativeAccumulator da)"""
8456  return _IMP_core.RigidBody_pull_back_body_member_adjoints(self, pi, da)
8457 
8458  def add_to_rotational_derivatives(self, qderiv, da):
8459  r"""add_to_rotational_derivatives(RigidBody self, Vector4D qderiv, DerivativeAccumulator da)"""
8460  return _IMP_core.RigidBody_add_to_rotational_derivatives(self, qderiv, da)
8461 
8462  def add_to_torque(self, torque_local, da):
8463  r"""add_to_torque(RigidBody self, Vector3D torque_local, DerivativeAccumulator da)"""
8464  return _IMP_core.RigidBody_add_to_torque(self, torque_local, da)
8465 
8466  def get_torque(self):
8467  r"""get_torque(RigidBody self) -> Vector3D"""
8468  return _IMP_core.RigidBody_get_torque(self)
8469 
8470  def get_coordinates_are_optimized(self):
8471  r"""get_coordinates_are_optimized(RigidBody self) -> bool"""
8472  return _IMP_core.RigidBody_get_coordinates_are_optimized(self)
8473 
8474  def set_coordinates_are_optimized(self, tf):
8475  r"""set_coordinates_are_optimized(RigidBody self, bool tf)"""
8476  return _IMP_core.RigidBody_set_coordinates_are_optimized(self, tf)
8477 
8478  def normalize_rotation(self):
8479  r"""normalize_rotation(RigidBody self)"""
8480  return _IMP_core.RigidBody_normalize_rotation(self)
8481 
8482  def update_members(self):
8483  r"""update_members(RigidBody self)"""
8484  return _IMP_core.RigidBody_update_members(self)
8485 
8486  def get_rotational_derivatives(self):
8487  r"""get_rotational_derivatives(RigidBody self) -> Vector4D"""
8488  return _IMP_core.RigidBody_get_rotational_derivatives(self)
8489 
8490  def get_number_of_members(self):
8491  r"""get_number_of_members(RigidBody self) -> unsigned int"""
8492  return _IMP_core.RigidBody_get_number_of_members(self)
8493 
8494  def get_member(self, i):
8495  r"""get_member(RigidBody self, unsigned int i) -> RigidBodyMember"""
8496  return _IMP_core.RigidBody_get_member(self, i)
8497 
8498  def add_member(self, p):
8499  r"""add_member(RigidBody self, _ParticleIndexAdaptor p)"""
8500  return _IMP_core.RigidBody_add_member(self, p)
8501 
8502  def add_non_rigid_member(self, p):
8503  r"""add_non_rigid_member(RigidBody self, _ParticleIndexAdaptor p)"""
8504  return _IMP_core.RigidBody_add_non_rigid_member(self, p)
8505 
8506  def set_is_rigid_member(self, pi, tf):
8507  r"""set_is_rigid_member(RigidBody self, ParticleIndex pi, bool tf)"""
8508  return _IMP_core.RigidBody_set_is_rigid_member(self, pi, tf)
8509 
8510  def remove_member(self, p):
8511  r"""remove_member(RigidBody self, _ParticleIndexAdaptor p)"""
8512  return _IMP_core.RigidBody_remove_member(self, p)
8513 
8514  def add_attribute(self, *args):
8515  r"""
8516  add_attribute(RigidBody self, FloatKey k, IMP::Float v, bool opt)
8517  add_attribute(RigidBody self, FloatKey a0, IMP::Float a1)
8518  add_attribute(RigidBody self, IntKey a0, IMP::Int a1)
8519  add_attribute(RigidBody self, FloatsKey a0, IMP::Floats a1)
8520  add_attribute(RigidBody self, IntsKey a0, IMP::Ints a1)
8521  add_attribute(RigidBody self, StringKey a0, IMP::String a1)
8522  add_attribute(RigidBody self, ParticleIndexKey a0, Particle a1)
8523  add_attribute(RigidBody self, ObjectKey a0, Object a1)
8524  add_attribute(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8525  add_attribute(RigidBody self, SparseIntKey a0, IMP::Int a1)
8526  add_attribute(RigidBody self, SparseStringKey a0, IMP::String a1)
8527  add_attribute(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8528  """
8529  return _IMP_core.RigidBody_add_attribute(self, *args)
8530 
8531  def get_value(self, *args):
8532  r"""
8533  get_value(RigidBody self, FloatKey a0) -> IMP::Float
8534  get_value(RigidBody self, IntKey a0) -> IMP::Int
8535  get_value(RigidBody self, FloatsKey a0) -> IMP::Floats
8536  get_value(RigidBody self, IntsKey a0) -> IMP::Ints
8537  get_value(RigidBody self, StringKey a0) -> IMP::String
8538  get_value(RigidBody self, ParticleIndexKey a0) -> Particle
8539  get_value(RigidBody self, ObjectKey a0) -> Object
8540  get_value(RigidBody self, SparseFloatKey a0) -> IMP::Float
8541  get_value(RigidBody self, SparseIntKey a0) -> IMP::Int
8542  get_value(RigidBody self, SparseStringKey a0) -> IMP::String
8543  get_value(RigidBody self, SparseParticleIndexKey a0) -> ParticleIndex
8544  """
8545  return _IMP_core.RigidBody_get_value(self, *args)
8546 
8547  def set_value(self, *args):
8548  r"""
8549  set_value(RigidBody self, FloatKey a0, IMP::Float a1)
8550  set_value(RigidBody self, IntKey a0, IMP::Int a1)
8551  set_value(RigidBody self, FloatsKey a0, IMP::Floats a1)
8552  set_value(RigidBody self, IntsKey a0, IMP::Ints a1)
8553  set_value(RigidBody self, StringKey a0, IMP::String a1)
8554  set_value(RigidBody self, ParticleIndexKey a0, Particle a1)
8555  set_value(RigidBody self, ObjectKey a0, Object a1)
8556  set_value(RigidBody self, SparseFloatKey a0, IMP::Float a1)
8557  set_value(RigidBody self, SparseIntKey a0, IMP::Int a1)
8558  set_value(RigidBody self, SparseStringKey a0, IMP::String a1)
8559  set_value(RigidBody self, SparseParticleIndexKey a0, ParticleIndex a1)
8560  """
8561  return _IMP_core.RigidBody_set_value(self, *args)
8562 
8563  def remove_attribute(self, *args):
8564  r"""
8565  remove_attribute(RigidBody self, FloatKey a0)
8566  remove_attribute(RigidBody self, IntKey a0)
8567  remove_attribute(RigidBody self, FloatsKey a0)
8568  remove_attribute(RigidBody self, IntsKey a0)
8569  remove_attribute(RigidBody self, StringKey a0)
8570  remove_attribute(RigidBody self, ParticleIndexKey a0)
8571  remove_attribute(RigidBody self, ObjectKey a0)
8572  remove_attribute(RigidBody self, SparseFloatKey a0)
8573  remove_attribute(RigidBody self, SparseIntKey a0)
8574  remove_attribute(RigidBody self, SparseStringKey a0)
8575  remove_attribute(RigidBody self, SparseParticleIndexKey a0)
8576  """
8577  return _IMP_core.RigidBody_remove_attribute(self, *args)
8578 
8579  def has_attribute(self, *args):
8580  r"""
8581  has_attribute(RigidBody self, FloatKey a0) -> bool
8582  has_attribute(RigidBody self, IntKey a0) -> bool
8583  has_attribute(RigidBody self, FloatsKey a0) -> bool
8584  has_attribute(RigidBody self, IntsKey a0) -> bool
8585  has_attribute(RigidBody self, StringKey a0) -> bool
8586  has_attribute(RigidBody self, ParticleIndexKey a0) -> bool
8587  has_attribute(RigidBody self, ObjectKey a0) -> bool
8588  has_attribute(RigidBody self, SparseFloatKey a0) -> bool
8589  has_attribute(RigidBody self, SparseIntKey a0) -> bool
8590  has_attribute(RigidBody self, SparseStringKey a0) -> bool
8591  has_attribute(RigidBody self, SparseParticleIndexKey a0) -> bool
8592  """
8593  return _IMP_core.RigidBody_has_attribute(self, *args)
8594 
8595  def get_derivative(self, a0):
8596  r"""get_derivative(RigidBody self, FloatKey a0) -> double"""
8597  return _IMP_core.RigidBody_get_derivative(self, a0)
8598 
8599  def get_name(self):
8600  r"""get_name(RigidBody self) -> std::string"""
8601  return _IMP_core.RigidBody_get_name(self)
8602 
8603  def clear_caches(self):
8604  r"""clear_caches(RigidBody self)"""
8605  return _IMP_core.RigidBody_clear_caches(self)
8606 
8607  def set_name(self, a0):
8608  r"""set_name(RigidBody self, std::string a0)"""
8609  return _IMP_core.RigidBody_set_name(self, a0)
8610 
8611  def set_check_level(self, a0):
8612  r"""set_check_level(RigidBody self, IMP::CheckLevel a0)"""
8613  return _IMP_core.RigidBody_set_check_level(self, a0)
8614 
8615  def add_to_derivative(self, a0, a1, a2):
8616  r"""add_to_derivative(RigidBody self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8617  return _IMP_core.RigidBody_add_to_derivative(self, a0, a1, a2)
8618 
8619  def set_is_optimized(self, a0, a1):
8620  r"""set_is_optimized(RigidBody self, FloatKey a0, bool a1)"""
8621  return _IMP_core.RigidBody_set_is_optimized(self, a0, a1)
8622 
8623  def get_is_optimized(self, a0):
8624  r"""get_is_optimized(RigidBody self, FloatKey a0) -> bool"""
8625  return _IMP_core.RigidBody_get_is_optimized(self, a0)
8626 
8627  def get_check_level(self):
8628  r"""get_check_level(RigidBody self) -> IMP::CheckLevel"""
8629  return _IMP_core.RigidBody_get_check_level(self)
8630 
8631  def __eq__(self, *args):
8632  r"""
8633  __eq__(RigidBody self, RigidBody o) -> bool
8634  __eq__(RigidBody self, Particle d) -> bool
8635  """
8636  return _IMP_core.RigidBody___eq__(self, *args)
8637 
8638  def __ne__(self, *args):
8639  r"""
8640  __ne__(RigidBody self, RigidBody o) -> bool
8641  __ne__(RigidBody self, Particle d) -> bool
8642  """
8643  return _IMP_core.RigidBody___ne__(self, *args)
8644 
8645  def __le__(self, *args):
8646  r"""
8647  __le__(RigidBody self, RigidBody o) -> bool
8648  __le__(RigidBody self, Particle d) -> bool
8649  """
8650  return _IMP_core.RigidBody___le__(self, *args)
8651 
8652  def __lt__(self, *args):
8653  r"""
8654  __lt__(RigidBody self, RigidBody o) -> bool
8655  __lt__(RigidBody self, Particle d) -> bool
8656  """
8657  return _IMP_core.RigidBody___lt__(self, *args)
8658 
8659  def __ge__(self, *args):
8660  r"""
8661  __ge__(RigidBody self, RigidBody o) -> bool
8662  __ge__(RigidBody self, Particle d) -> bool
8663  """
8664  return _IMP_core.RigidBody___ge__(self, *args)
8665 
8666  def __gt__(self, *args):
8667  r"""
8668  __gt__(RigidBody self, RigidBody o) -> bool
8669  __gt__(RigidBody self, Particle d) -> bool
8670  """
8671  return _IMP_core.RigidBody___gt__(self, *args)
8672 
8673  def __hash__(self):
8674  r"""__hash__(RigidBody self) -> std::size_t"""
8675  return _IMP_core.RigidBody___hash__(self)
8676 
8677  def __str__(self):
8678  r"""__str__(RigidBody self) -> std::string"""
8679  return _IMP_core.RigidBody___str__(self)
8680 
8681  def __repr__(self):
8682  r"""__repr__(RigidBody self) -> std::string"""
8683  return _IMP_core.RigidBody___repr__(self)
8684 
8685  def _get_as_binary(self):
8686  r"""_get_as_binary(RigidBody self) -> PyObject *"""
8687  return _IMP_core.RigidBody__get_as_binary(self)
8688 
8689  def _set_from_binary(self, p):
8690  r"""_set_from_binary(RigidBody self, PyObject * p)"""
8691  return _IMP_core.RigidBody__set_from_binary(self, p)
8692 
8693  def __getstate__(self):
8694  p = self._get_as_binary()
8695  if len(self.__dict__) > 1:
8696  d = self.__dict__.copy()
8697  del d['this']
8698  p = (d, p)
8699  return p
8700 
8701  def __setstate__(self, p):
8702  if not hasattr(self, 'this'):
8703  self.__init__()
8704  if isinstance(p, tuple):
8705  d, p = p
8706  self.__dict__.update(d)
8707  return self._set_from_binary(p)
8708 
8709 
8710 # Register RigidBody in _IMP_core:
8711 _IMP_core.RigidBody_swigregister(RigidBody)
8712 
8714  r"""add_rigid_body_cache_key(ObjectKey k)"""
8715  return _IMP_core.add_rigid_body_cache_key(k)
8716 class RigidBodyMember(XYZ):
8717  r"""Proxy of C++ IMP::core::RigidBodyMember class."""
8718 
8719  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8720 
8721  def show(self, *args):
8722  r"""show(RigidBodyMember self, _ostream out=std::cout)"""
8723  return _IMP_core.RigidBodyMember_show(self, *args)
8724 
8725  def get_rigid_body(self):
8726  r"""get_rigid_body(RigidBodyMember self) -> RigidBody"""
8727  return _IMP_core.RigidBodyMember_get_rigid_body(self)
8728 
8729  def get_internal_coordinates(self):
8730  r"""get_internal_coordinates(RigidBodyMember self) -> Vector3D"""
8731  return _IMP_core.RigidBodyMember_get_internal_coordinates(self)
8732 
8733  def set_internal_coordinates(self, v):
8734  r"""set_internal_coordinates(RigidBodyMember self, Vector3D v)"""
8735  return _IMP_core.RigidBodyMember_set_internal_coordinates(self, v)
8736 
8737  def set_internal_transformation(self, v):
8738  r"""set_internal_transformation(RigidBodyMember self, Transformation3D v)"""
8739  return _IMP_core.RigidBodyMember_set_internal_transformation(self, v)
8740 
8741  def get_internal_transformation(self):
8742  r"""get_internal_transformation(RigidBodyMember self) -> Transformation3D"""
8743  return _IMP_core.RigidBodyMember_get_internal_transformation(self)
8744  __swig_destroy__ = _IMP_core.delete_RigidBodyMember
8745 
8746  def set_coordinates(self, *args):
8747  r"""
8748  set_coordinates(RigidBodyMember self, Vector3D center)
8749  set_coordinates(RigidBodyMember self, Transformation3D tr)
8750  """
8751  return _IMP_core.RigidBodyMember_set_coordinates(self, *args)
8752 
8753  def __init__(self, *args):
8754  r"""
8755  __init__(RigidBodyMember self) -> RigidBodyMember
8756  __init__(RigidBodyMember self, Model m, ParticleIndex id) -> RigidBodyMember
8757  __init__(RigidBodyMember self, _ParticleAdaptor d) -> RigidBodyMember
8758  __init__(RigidBodyMember self, RigidBodyMember arg2) -> RigidBodyMember
8759  """
8760  _IMP_core.RigidBodyMember_swiginit(self, _IMP_core.new_RigidBodyMember(*args))
8761 
8762  @staticmethod
8763  def get_is_setup(*args):
8764  r"""
8765  get_is_setup(_ParticleAdaptor p) -> bool
8766  get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
8767  """
8768  return _IMP_core.RigidBodyMember_get_is_setup(*args)
8769 
8770  @staticmethod
8771  def get_internal_coordinate_keys():
8772  r"""get_internal_coordinate_keys() -> IMP::FloatKeys"""
8773  return _IMP_core.RigidBodyMember_get_internal_coordinate_keys()
8774 
8775  @staticmethod
8776  def get_internal_rotation_key():
8777  r"""get_internal_rotation_key() -> Vector4DDerivKey"""
8778  return _IMP_core.RigidBodyMember_get_internal_rotation_key()
8779 
8780  def add_attribute(self, *args):
8781  r"""
8782  add_attribute(RigidBodyMember self, FloatKey k, IMP::Float v, bool opt)
8783  add_attribute(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8784  add_attribute(RigidBodyMember self, IntKey a0, IMP::Int a1)
8785  add_attribute(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8786  add_attribute(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8787  add_attribute(RigidBodyMember self, StringKey a0, IMP::String a1)
8788  add_attribute(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8789  add_attribute(RigidBodyMember self, ObjectKey a0, Object a1)
8790  add_attribute(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8791  add_attribute(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8792  add_attribute(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8793  add_attribute(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8794  """
8795  return _IMP_core.RigidBodyMember_add_attribute(self, *args)
8796 
8797  def get_value(self, *args):
8798  r"""
8799  get_value(RigidBodyMember self, FloatKey a0) -> IMP::Float
8800  get_value(RigidBodyMember self, IntKey a0) -> IMP::Int
8801  get_value(RigidBodyMember self, FloatsKey a0) -> IMP::Floats
8802  get_value(RigidBodyMember self, IntsKey a0) -> IMP::Ints
8803  get_value(RigidBodyMember self, StringKey a0) -> IMP::String
8804  get_value(RigidBodyMember self, ParticleIndexKey a0) -> Particle
8805  get_value(RigidBodyMember self, ObjectKey a0) -> Object
8806  get_value(RigidBodyMember self, SparseFloatKey a0) -> IMP::Float
8807  get_value(RigidBodyMember self, SparseIntKey a0) -> IMP::Int
8808  get_value(RigidBodyMember self, SparseStringKey a0) -> IMP::String
8809  get_value(RigidBodyMember self, SparseParticleIndexKey a0) -> ParticleIndex
8810  """
8811  return _IMP_core.RigidBodyMember_get_value(self, *args)
8812 
8813  def set_value(self, *args):
8814  r"""
8815  set_value(RigidBodyMember self, FloatKey a0, IMP::Float a1)
8816  set_value(RigidBodyMember self, IntKey a0, IMP::Int a1)
8817  set_value(RigidBodyMember self, FloatsKey a0, IMP::Floats a1)
8818  set_value(RigidBodyMember self, IntsKey a0, IMP::Ints a1)
8819  set_value(RigidBodyMember self, StringKey a0, IMP::String a1)
8820  set_value(RigidBodyMember self, ParticleIndexKey a0, Particle a1)
8821  set_value(RigidBodyMember self, ObjectKey a0, Object a1)
8822  set_value(RigidBodyMember self, SparseFloatKey a0, IMP::Float a1)
8823  set_value(RigidBodyMember self, SparseIntKey a0, IMP::Int a1)
8824  set_value(RigidBodyMember self, SparseStringKey a0, IMP::String a1)
8825  set_value(RigidBodyMember self, SparseParticleIndexKey a0, ParticleIndex a1)
8826  """
8827  return _IMP_core.RigidBodyMember_set_value(self, *args)
8828 
8829  def remove_attribute(self, *args):
8830  r"""
8831  remove_attribute(RigidBodyMember self, FloatKey a0)
8832  remove_attribute(RigidBodyMember self, IntKey a0)
8833  remove_attribute(RigidBodyMember self, FloatsKey a0)
8834  remove_attribute(RigidBodyMember self, IntsKey a0)
8835  remove_attribute(RigidBodyMember self, StringKey a0)
8836  remove_attribute(RigidBodyMember self, ParticleIndexKey a0)
8837  remove_attribute(RigidBodyMember self, ObjectKey a0)
8838  remove_attribute(RigidBodyMember self, SparseFloatKey a0)
8839  remove_attribute(RigidBodyMember self, SparseIntKey a0)
8840  remove_attribute(RigidBodyMember self, SparseStringKey a0)
8841  remove_attribute(RigidBodyMember self, SparseParticleIndexKey a0)
8842  """
8843  return _IMP_core.RigidBodyMember_remove_attribute(self, *args)
8844 
8845  def has_attribute(self, *args):
8846  r"""
8847  has_attribute(RigidBodyMember self, FloatKey a0) -> bool
8848  has_attribute(RigidBodyMember self, IntKey a0) -> bool
8849  has_attribute(RigidBodyMember self, FloatsKey a0) -> bool
8850  has_attribute(RigidBodyMember self, IntsKey a0) -> bool
8851  has_attribute(RigidBodyMember self, StringKey a0) -> bool
8852  has_attribute(RigidBodyMember self, ParticleIndexKey a0) -> bool
8853  has_attribute(RigidBodyMember self, ObjectKey a0) -> bool
8854  has_attribute(RigidBodyMember self, SparseFloatKey a0) -> bool
8855  has_attribute(RigidBodyMember self, SparseIntKey a0) -> bool
8856  has_attribute(RigidBodyMember self, SparseStringKey a0) -> bool
8857  has_attribute(RigidBodyMember self, SparseParticleIndexKey a0) -> bool
8858  """
8859  return _IMP_core.RigidBodyMember_has_attribute(self, *args)
8860 
8861  def get_derivative(self, a0):
8862  r"""get_derivative(RigidBodyMember self, FloatKey a0) -> double"""
8863  return _IMP_core.RigidBodyMember_get_derivative(self, a0)
8864 
8865  def get_name(self):
8866  r"""get_name(RigidBodyMember self) -> std::string"""
8867  return _IMP_core.RigidBodyMember_get_name(self)
8868 
8869  def clear_caches(self):
8870  r"""clear_caches(RigidBodyMember self)"""
8871  return _IMP_core.RigidBodyMember_clear_caches(self)
8872 
8873  def set_name(self, a0):
8874  r"""set_name(RigidBodyMember self, std::string a0)"""
8875  return _IMP_core.RigidBodyMember_set_name(self, a0)
8876 
8877  def set_check_level(self, a0):
8878  r"""set_check_level(RigidBodyMember self, IMP::CheckLevel a0)"""
8879  return _IMP_core.RigidBodyMember_set_check_level(self, a0)
8880 
8881  def add_to_derivative(self, a0, a1, a2):
8882  r"""add_to_derivative(RigidBodyMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8883  return _IMP_core.RigidBodyMember_add_to_derivative(self, a0, a1, a2)
8884 
8885  def set_is_optimized(self, a0, a1):
8886  r"""set_is_optimized(RigidBodyMember self, FloatKey a0, bool a1)"""
8887  return _IMP_core.RigidBodyMember_set_is_optimized(self, a0, a1)
8888 
8889  def get_is_optimized(self, a0):
8890  r"""get_is_optimized(RigidBodyMember self, FloatKey a0) -> bool"""
8891  return _IMP_core.RigidBodyMember_get_is_optimized(self, a0)
8892 
8893  def get_check_level(self):
8894  r"""get_check_level(RigidBodyMember self) -> IMP::CheckLevel"""
8895  return _IMP_core.RigidBodyMember_get_check_level(self)
8896 
8897  def __eq__(self, *args):
8898  r"""
8899  __eq__(RigidBodyMember self, RigidBodyMember o) -> bool
8900  __eq__(RigidBodyMember self, Particle d) -> bool
8901  """
8902  return _IMP_core.RigidBodyMember___eq__(self, *args)
8903 
8904  def __ne__(self, *args):
8905  r"""
8906  __ne__(RigidBodyMember self, RigidBodyMember o) -> bool
8907  __ne__(RigidBodyMember self, Particle d) -> bool
8908  """
8909  return _IMP_core.RigidBodyMember___ne__(self, *args)
8910 
8911  def __le__(self, *args):
8912  r"""
8913  __le__(RigidBodyMember self, RigidBodyMember o) -> bool
8914  __le__(RigidBodyMember self, Particle d) -> bool
8915  """
8916  return _IMP_core.RigidBodyMember___le__(self, *args)
8917 
8918  def __lt__(self, *args):
8919  r"""
8920  __lt__(RigidBodyMember self, RigidBodyMember o) -> bool
8921  __lt__(RigidBodyMember self, Particle d) -> bool
8922  """
8923  return _IMP_core.RigidBodyMember___lt__(self, *args)
8924 
8925  def __ge__(self, *args):
8926  r"""
8927  __ge__(RigidBodyMember self, RigidBodyMember o) -> bool
8928  __ge__(RigidBodyMember self, Particle d) -> bool
8929  """
8930  return _IMP_core.RigidBodyMember___ge__(self, *args)
8931 
8932  def __gt__(self, *args):
8933  r"""
8934  __gt__(RigidBodyMember self, RigidBodyMember o) -> bool
8935  __gt__(RigidBodyMember self, Particle d) -> bool
8936  """
8937  return _IMP_core.RigidBodyMember___gt__(self, *args)
8938 
8939  def __hash__(self):
8940  r"""__hash__(RigidBodyMember self) -> std::size_t"""
8941  return _IMP_core.RigidBodyMember___hash__(self)
8942 
8943  def __str__(self):
8944  r"""__str__(RigidBodyMember self) -> std::string"""
8945  return _IMP_core.RigidBodyMember___str__(self)
8946 
8947  def __repr__(self):
8948  r"""__repr__(RigidBodyMember self) -> std::string"""
8949  return _IMP_core.RigidBodyMember___repr__(self)
8950 
8951  def _get_as_binary(self):
8952  r"""_get_as_binary(RigidBodyMember self) -> PyObject *"""
8953  return _IMP_core.RigidBodyMember__get_as_binary(self)
8954 
8955  def _set_from_binary(self, p):
8956  r"""_set_from_binary(RigidBodyMember self, PyObject * p)"""
8957  return _IMP_core.RigidBodyMember__set_from_binary(self, p)
8958 
8959  def __getstate__(self):
8960  p = self._get_as_binary()
8961  if len(self.__dict__) > 1:
8962  d = self.__dict__.copy()
8963  del d['this']
8964  p = (d, p)
8965  return p
8966 
8967  def __setstate__(self, p):
8968  if not hasattr(self, 'this'):
8969  self.__init__()
8970  if isinstance(p, tuple):
8971  d, p = p
8972  self.__dict__.update(d)
8973  return self._set_from_binary(p)
8974 
8975 
8976 # Register RigidBodyMember in _IMP_core:
8977 _IMP_core.RigidBodyMember_swigregister(RigidBodyMember)
8978 class RigidMember(RigidBodyMember):
8979  r"""Proxy of C++ IMP::core::RigidMember class."""
8980 
8981  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8982 
8983  def show(self, *args):
8984  r"""show(RigidMember self, _ostream out=std::cout)"""
8985  return _IMP_core.RigidMember_show(self, *args)
8986 
8987  def __init__(self, *args):
8988  r"""
8989  __init__(RigidMember self) -> RigidMember
8990  __init__(RigidMember self, Model m, ParticleIndex id) -> RigidMember
8991  __init__(RigidMember self, _ParticleAdaptor d) -> RigidMember
8992  __init__(RigidMember self, RigidMember arg2) -> RigidMember
8993  """
8994  _IMP_core.RigidMember_swiginit(self, _IMP_core.new_RigidMember(*args))
8995  __swig_destroy__ = _IMP_core.delete_RigidMember
8996 
8997  @staticmethod
8998  def get_is_setup(*args):
8999  r"""
9000  get_is_setup(_ParticleAdaptor p) -> bool
9001  get_is_setup(Model m, _ParticleIndexAdaptor p) -> bool
9002  """
9003  return _IMP_core.RigidMember_get_is_setup(*args)
9004 
9005  def add_attribute(self, *args):
9006  r"""
9007  add_attribute(RigidMember self, FloatKey k, IMP::Float v, bool opt)
9008  add_attribute(RigidMember self, FloatKey a0, IMP::Float a1)
9009  add_attribute(RigidMember self, IntKey a0, IMP::Int a1)
9010  add_attribute(RigidMember self, FloatsKey a0, IMP::Floats a1)
9011  add_attribute(RigidMember self, IntsKey a0, IMP::Ints a1)
9012  add_attribute(RigidMember self, StringKey a0, IMP::String a1)
9013  add_attribute(RigidMember self, ParticleIndexKey a0, Particle a1)
9014  add_attribute(RigidMember self, ObjectKey a0, Object a1)
9015  add_attribute(RigidMember self, SparseFloatKey a0, IMP::Float a1)
9016  add_attribute(RigidMember self, SparseIntKey a0, IMP::Int a1)
9017  add_attribute(RigidMember self, SparseStringKey a0, IMP::String a1)
9018  add_attribute(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9019  """
9020  return _IMP_core.RigidMember_add_attribute(self, *args)
9021 
9022  def get_value(self, *args):
9023  r"""
9024  get_value(RigidMember self, FloatKey a0) -> IMP::Float
9025  get_value(RigidMember self, IntKey a0) -> IMP::Int
9026  get_value(RigidMember self, FloatsKey a0) -> IMP::Floats
9027  get_value(RigidMember self, IntsKey a0) -> IMP::Ints
9028  get_value(RigidMember self, StringKey a0) -> IMP::String
9029  get_value(RigidMember self, ParticleIndexKey a0) -> Particle
9030  get_value(RigidMember self, ObjectKey a0) -> Object
9031  get_value(RigidMember self, SparseFloatKey a0) -> IMP::Float
9032  get_value(RigidMember self, SparseIntKey a0) -> IMP::Int
9033  get_value(RigidMember self, SparseStringKey a0) -> IMP::String
9034  get_value(RigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9035  """
9036  return _IMP_core.RigidMember_get_value(self, *args)
9037 
9038  def set_value(self, *args):
9039  r"""
9040  set_value(RigidMember self, FloatKey a0, IMP::Float a1)
9041  set_value(RigidMember self, IntKey a0, IMP::Int a1)
9042  set_value(RigidMember self, FloatsKey a0, IMP::Floats a1)
9043  set_value(RigidMember self, IntsKey a0, IMP::Ints a1)
9044  set_value(RigidMember self, StringKey a0, IMP::String a1)
9045  set_value(RigidMember self, ParticleIndexKey a0, Particle a1)
9046  set_value(RigidMember self, ObjectKey a0, Object a1)
9047  set_value(RigidMember self, SparseFloatKey a0, IMP::Float a1)
9048  set_value(RigidMember self, SparseIntKey a0, IMP::Int a1)
9049  set_value(RigidMember self, SparseStringKey a0, IMP::String a1)
9050  set_value(RigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9051  """
9052  return _IMP_core.RigidMember_set_value(self, *args)
9053 
9054  def remove_attribute(self, *args):
9055  r"""
9056  remove_attribute(RigidMember self, FloatKey a0)
9057  remove_attribute(RigidMember self, IntKey a0)
9058  remove_attribute(RigidMember self, FloatsKey a0)
9059  remove_attribute(RigidMember self, IntsKey a0)
9060  remove_attribute(RigidMember self, StringKey a0)
9061  remove_attribute(RigidMember self, ParticleIndexKey a0)
9062  remove_attribute(RigidMember self, ObjectKey a0)
9063  remove_attribute(RigidMember self, SparseFloatKey a0)
9064  remove_attribute(RigidMember self, SparseIntKey a0)
9065  remove_attribute(RigidMember self, SparseStringKey a0)
9066  remove_attribute(RigidMember self, SparseParticleIndexKey a0)
9067  """
9068  return _IMP_core.RigidMember_remove_attribute(self, *args)
9069 
9070  def has_attribute(self, *args):
9071  r"""
9072  has_attribute(RigidMember self, FloatKey a0) -> bool
9073  has_attribute(RigidMember self, IntKey a0) -> bool
9074  has_attribute(RigidMember self, FloatsKey a0) -> bool
9075  has_attribute(RigidMember self, IntsKey a0) -> bool
9076  has_attribute(RigidMember self, StringKey a0) -> bool
9077  has_attribute(RigidMember self, ParticleIndexKey a0) -> bool
9078  has_attribute(RigidMember self, ObjectKey a0) -> bool
9079  has_attribute(RigidMember self, SparseFloatKey a0) -> bool
9080  has_attribute(RigidMember self, SparseIntKey a0) -> bool
9081  has_attribute(RigidMember self, SparseStringKey a0) -> bool
9082  has_attribute(RigidMember self, SparseParticleIndexKey a0) -> bool
9083  """
9084  return _IMP_core.RigidMember_has_attribute(self, *args)
9085 
9086  def get_derivative(self, a0):
9087  r"""get_derivative(RigidMember self, FloatKey a0) -> double"""
9088  return _IMP_core.RigidMember_get_derivative(self, a0)
9089 
9090  def get_name(self):
9091  r"""get_name(RigidMember self) -> std::string"""
9092  return _IMP_core.RigidMember_get_name(self)
9093 
9094  def clear_caches(self):
9095  r"""clear_caches(RigidMember self)"""
9096  return _IMP_core.RigidMember_clear_caches(self)
9097 
9098  def set_name(self, a0):
9099  r"""set_name(RigidMember self, std::string a0)"""
9100  return _IMP_core.RigidMember_set_name(self, a0)
9101 
9102  def set_check_level(self, a0):
9103  r"""set_check_level(RigidMember self, IMP::CheckLevel a0)"""
9104  return _IMP_core.RigidMember_set_check_level(self, a0)
9105 
9106  def add_to_derivative(self, a0, a1, a2):
9107  r"""add_to_derivative(RigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9108  return _IMP_core.RigidMember_add_to_derivative(self, a0, a1, a2)
9109 
9110  def set_is_optimized(self, a0, a1):
9111  r"""set_is_optimized(RigidMember self, FloatKey a0, bool a1)"""
9112  return _IMP_core.RigidMember_set_is_optimized(self, a0, a1)
9113 
9114  def get_is_optimized(self, a0):
9115  r"""get_is_optimized(RigidMember self, FloatKey a0) -> bool"""
9116  return _IMP_core.RigidMember_get_is_optimized(self, a0)
9117 
9118  def get_check_level(self):
9119  r"""get_check_level(RigidMember self) -> IMP::CheckLevel"""
9120  return _IMP_core.RigidMember_get_check_level(self)
9121 
9122  def __eq__(self, *args):
9123  r"""
9124  __eq__(RigidMember self, RigidMember o) -> bool
9125  __eq__(RigidMember self, Particle d) -> bool
9126  """
9127  return _IMP_core.RigidMember___eq__(self, *args)
9128 
9129  def __ne__(self, *args):
9130  r"""
9131  __ne__(RigidMember self, RigidMember o) -> bool
9132  __ne__(RigidMember self, Particle d) -> bool
9133  """
9134  return _IMP_core.RigidMember___ne__(self, *args)
9135 
9136  def __le__(self, *args):
9137  r"""
9138  __le__(RigidMember self, RigidMember o) -> bool
9139  __le__(RigidMember self, Particle d) -> bool
9140  """
9141  return _IMP_core.RigidMember___le__(self, *args)
9142 
9143  def __lt__(self, *args):
9144  r"""
9145  __lt__(RigidMember self, RigidMember o) -> bool
9146  __lt__(RigidMember self, Particle d) -> bool
9147  """
9148  return _IMP_core.RigidMember___lt__(self, *args)
9149 
9150  def __ge__(self, *args):
9151  r"""
9152  __ge__(RigidMember self, RigidMember o) -> bool
9153  __ge__(RigidMember self, Particle d) -> bool
9154  """
9155  return _IMP_core.RigidMember___ge__(self, *args)
9156 
9157  def __gt__(self, *args):
9158  r"""
9159  __gt__(RigidMember self, RigidMember o) -> bool
9160  __gt__(RigidMember self, Particle d) -> bool
9161  """
9162  return _IMP_core.RigidMember___gt__(self, *args)
9163 
9164  def __hash__(self):
9165  r"""__hash__(RigidMember self) -> std::size_t"""
9166  return _IMP_core.RigidMember___hash__(self)
9167 
9168  def __str__(self):
9169  r"""__str__(RigidMember self) -> std::string"""
9170  return _IMP_core.RigidMember___str__(self)
9171 
9172  def __repr__(self):
9173  r"""__repr__(RigidMember self) -> std::string"""
9174  return _IMP_core.RigidMember___repr__(self)
9175 
9176  def _get_as_binary(self):
9177  r"""_get_as_binary(RigidMember self) -> PyObject *"""
9178  return _IMP_core.RigidMember__get_as_binary(self)
9179 
9180  def _set_from_binary(self, p):
9181  r"""_set_from_binary(RigidMember self, PyObject * p)"""
9182  return _IMP_core.RigidMember__set_from_binary(self, p)
9183 
9184  def __getstate__(self):
9185  p = self._get_as_binary()
9186  if len(self.__dict__) > 1:
9187  d = self.__dict__.copy()
9188  del d['this']
9189  p = (d, p)
9190  return p
9191 
9192  def __setstate__(self, p):
9193  if not hasattr(self, 'this'):
9194  self.__init__()
9195  if isinstance(p, tuple):
9196  d, p = p
9197  self.__dict__.update(d)
9198  return self._set_from_binary(p)
9199 
9200 
9201 # Register RigidMember in _IMP_core:
9202 _IMP_core.RigidMember_swigregister(RigidMember)
9203 class NonRigidMember(RigidBodyMember):
9204  r"""Proxy of C++ IMP::core::NonRigidMember class."""
9205 
9206  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9207 
9208  def show(self, *args):
9209  r"""show(NonRigidMember self, _ostream out=std::cout)"""
9210  return _IMP_core.NonRigidMember_show(self, *args)
9211 
9212  def __init__(self, *args):
9213  r"""
9214  __init__(NonRigidMember self) -> NonRigidMember
9215  __init__(NonRigidMember self, Model m, ParticleIndex id) -> NonRigidMember
9216  __init__(NonRigidMember self, _ParticleAdaptor d) -> NonRigidMember
9217  __init__(NonRigidMember self, NonRigidMember arg2) -> NonRigidMember
9218  """
9219  _IMP_core.NonRigidMember_swiginit(self, _IMP_core.new_NonRigidMember(*args))
9220  __swig_destroy__ = _IMP_core.delete_NonRigidMember
9221 
9222  @staticmethod
9223  def get_is_setup(*args):
9224  r"""
9225  get_is_setup(_ParticleAdaptor p) -> bool
9226  get_is_setup(Model m, ParticleIndex p) -> bool
9227  """
9228  return _IMP_core.NonRigidMember_get_is_setup(*args)
9229 
9230  def add_to_internal_derivatives(self, deriv_parent, da):
9231  r"""add_to_internal_derivatives(NonRigidMember self, Vector3D deriv_parent, DerivativeAccumulator da)"""
9232  return _IMP_core.NonRigidMember_add_to_internal_derivatives(self, deriv_parent, da)
9233 
9234  def add_to_internal_rotational_derivatives(self, qderiv, da):
9235  r"""add_to_internal_rotational_derivatives(NonRigidMember self, Vector4D qderiv, DerivativeAccumulator da)"""
9236  return _IMP_core.NonRigidMember_add_to_internal_rotational_derivatives(self, qderiv, da)
9237 
9238  def get_internal_derivatives(self):
9239  r"""get_internal_derivatives(NonRigidMember self) -> Vector3D"""
9240  return _IMP_core.NonRigidMember_get_internal_derivatives(self)
9241 
9242  def get_internal_rotational_derivatives(self):
9243  r"""get_internal_rotational_derivatives(NonRigidMember self) -> Vector4D"""
9244  return _IMP_core.NonRigidMember_get_internal_rotational_derivatives(self)
9245 
9246  def add_attribute(self, *args):
9247  r"""
9248  add_attribute(NonRigidMember self, FloatKey k, IMP::Float v, bool opt)
9249  add_attribute(NonRigidMember self, FloatKey a0, IMP::Float a1)
9250  add_attribute(NonRigidMember self, IntKey a0, IMP::Int a1)
9251  add_attribute(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9252  add_attribute(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9253  add_attribute(NonRigidMember self, StringKey a0, IMP::String a1)
9254  add_attribute(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9255  add_attribute(NonRigidMember self, ObjectKey a0, Object a1)
9256  add_attribute(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9257  add_attribute(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9258  add_attribute(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9259  add_attribute(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9260  """
9261  return _IMP_core.NonRigidMember_add_attribute(self, *args)
9262 
9263  def get_value(self, *args):
9264  r"""
9265  get_value(NonRigidMember self, FloatKey a0) -> IMP::Float
9266  get_value(NonRigidMember self, IntKey a0) -> IMP::Int
9267  get_value(NonRigidMember self, FloatsKey a0) -> IMP::Floats
9268  get_value(NonRigidMember self, IntsKey a0) -> IMP::Ints
9269  get_value(NonRigidMember self, StringKey a0) -> IMP::String
9270  get_value(NonRigidMember self, ParticleIndexKey a0) -> Particle
9271  get_value(NonRigidMember self, ObjectKey a0) -> Object
9272  get_value(NonRigidMember self, SparseFloatKey a0) -> IMP::Float
9273  get_value(NonRigidMember self, SparseIntKey a0) -> IMP::Int
9274  get_value(NonRigidMember self, SparseStringKey a0) -> IMP::String
9275  get_value(NonRigidMember self, SparseParticleIndexKey a0) -> ParticleIndex
9276  """
9277  return _IMP_core.NonRigidMember_get_value(self, *args)
9278 
9279  def set_value(self, *args):
9280  r"""
9281  set_value(NonRigidMember self, FloatKey a0, IMP::Float a1)
9282  set_value(NonRigidMember self, IntKey a0, IMP::Int a1)
9283  set_value(NonRigidMember self, FloatsKey a0, IMP::Floats a1)
9284  set_value(NonRigidMember self, IntsKey a0, IMP::Ints a1)
9285  set_value(NonRigidMember self, StringKey a0, IMP::String a1)
9286  set_value(NonRigidMember self, ParticleIndexKey a0, Particle a1)
9287  set_value(NonRigidMember self, ObjectKey a0, Object a1)
9288  set_value(NonRigidMember self, SparseFloatKey a0, IMP::Float a1)
9289  set_value(NonRigidMember self, SparseIntKey a0, IMP::Int a1)
9290  set_value(NonRigidMember self, SparseStringKey a0, IMP::String a1)
9291  set_value(NonRigidMember self, SparseParticleIndexKey a0, ParticleIndex a1)
9292  """
9293  return _IMP_core.NonRigidMember_set_value(self, *args)
9294 
9295  def remove_attribute(self, *args):
9296  r"""
9297  remove_attribute(NonRigidMember self, FloatKey a0)
9298  remove_attribute(NonRigidMember self, IntKey a0)
9299  remove_attribute(NonRigidMember self, FloatsKey a0)
9300  remove_attribute(NonRigidMember self, IntsKey a0)
9301  remove_attribute(NonRigidMember self, StringKey a0)
9302  remove_attribute(NonRigidMember self, ParticleIndexKey a0)
9303  remove_attribute(NonRigidMember self, ObjectKey a0)
9304  remove_attribute(NonRigidMember self, SparseFloatKey a0)
9305  remove_attribute(NonRigidMember self, SparseIntKey a0)
9306  remove_attribute(NonRigidMember self, SparseStringKey a0)
9307  remove_attribute(NonRigidMember self, SparseParticleIndexKey a0)
9308  """
9309  return _IMP_core.NonRigidMember_remove_attribute(self, *args)
9310 
9311  def has_attribute(self, *args):
9312  r"""
9313  has_attribute(NonRigidMember self, FloatKey a0) -> bool
9314  has_attribute(NonRigidMember self, IntKey a0) -> bool
9315  has_attribute(NonRigidMember self, FloatsKey a0) -> bool
9316  has_attribute(NonRigidMember self, IntsKey a0) -> bool
9317  has_attribute(NonRigidMember self, StringKey a0) -> bool
9318  has_attribute(NonRigidMember self, ParticleIndexKey a0) -> bool
9319  has_attribute(NonRigidMember self, ObjectKey a0) -> bool
9320  has_attribute(NonRigidMember self, SparseFloatKey a0) -> bool
9321  has_attribute(NonRigidMember self, SparseIntKey a0) -> bool
9322  has_attribute(NonRigidMember self, SparseStringKey a0) -> bool
9323  has_attribute(NonRigidMember self, SparseParticleIndexKey a0) -> bool
9324  """
9325  return _IMP_core.NonRigidMember_has_attribute(self, *args)
9326 
9327  def get_derivative(self, a0):
9328  r"""get_derivative(NonRigidMember self, FloatKey a0) -> double"""
9329  return _IMP_core.NonRigidMember_get_derivative(self, a0)
9330 
9331  def get_name(self):
9332  r"""get_name(NonRigidMember self) -> std::string"""
9333  return _IMP_core.NonRigidMember_get_name(self)
9334 
9335  def clear_caches(self):
9336  r"""clear_caches(NonRigidMember self)"""
9337  return _IMP_core.NonRigidMember_clear_caches(self)
9338 
9339  def set_name(self, a0):
9340  r"""set_name(NonRigidMember self, std::string a0)"""
9341  return _IMP_core.NonRigidMember_set_name(self, a0)
9342 
9343  def set_check_level(self, a0):
9344  r"""set_check_level(NonRigidMember self, IMP::CheckLevel a0)"""
9345  return _IMP_core.NonRigidMember_set_check_level(self, a0)
9346 
9347  def add_to_derivative(self, a0, a1, a2):
9348  r"""add_to_derivative(NonRigidMember self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9349  return _IMP_core.NonRigidMember_add_to_derivative(self, a0, a1, a2)
9350 
9351  def set_is_optimized(self, a0, a1):
9352  r"""set_is_optimized(NonRigidMember self, FloatKey a0, bool a1)"""
9353  return _IMP_core.NonRigidMember_set_is_optimized(self, a0, a1)
9354 
9355  def get_is_optimized(self, a0):
9356  r"""get_is_optimized(NonRigidMember self, FloatKey a0) -> bool"""
9357  return _IMP_core.NonRigidMember_get_is_optimized(self, a0)
9358 
9359  def get_check_level(self):
9360  r"""get_check_level(NonRigidMember self) -> IMP::CheckLevel"""
9361  return _IMP_core.NonRigidMember_get_check_level(self)
9362 
9363  def __eq__(self, *args):
9364  r"""
9365  __eq__(NonRigidMember self, NonRigidMember o) -> bool
9366  __eq__(NonRigidMember self, Particle d) -> bool
9367  """
9368  return _IMP_core.NonRigidMember___eq__(self, *args)
9369 
9370  def __ne__(self, *args):
9371  r"""
9372  __ne__(NonRigidMember self, NonRigidMember o) -> bool
9373  __ne__(NonRigidMember self, Particle d) -> bool
9374  """
9375  return _IMP_core.NonRigidMember___ne__(self, *args)
9376 
9377  def __le__(self, *args):
9378  r"""
9379  __le__(NonRigidMember self, NonRigidMember o) -> bool
9380  __le__(NonRigidMember self, Particle d) -> bool
9381  """
9382  return _IMP_core.NonRigidMember___le__(self, *args)
9383 
9384  def __lt__(self, *args):
9385  r"""
9386  __lt__(NonRigidMember self, NonRigidMember o) -> bool
9387  __lt__(NonRigidMember self, Particle d) -> bool
9388  """
9389  return _IMP_core.NonRigidMember___lt__(self, *args)
9390 
9391  def __ge__(self, *args):
9392  r"""
9393  __ge__(NonRigidMember self, NonRigidMember o) -> bool
9394  __ge__(NonRigidMember self, Particle d) -> bool
9395  """
9396  return _IMP_core.NonRigidMember___ge__(self, *args)
9397 
9398  def __gt__(self, *args):
9399  r"""
9400  __gt__(NonRigidMember self, NonRigidMember o) -> bool
9401  __gt__(NonRigidMember self, Particle d) -> bool
9402  """
9403  return _IMP_core.NonRigidMember___gt__(self, *args)
9404 
9405  def __hash__(self):
9406  r"""__hash__(NonRigidMember self) -> std::size_t"""
9407  return _IMP_core.NonRigidMember___hash__(self)
9408 
9409  def __str__(self):
9410  r"""__str__(NonRigidMember self) -> std::string"""
9411  return _IMP_core.NonRigidMember___str__(self)
9412 
9413  def __repr__(self):
9414  r"""__repr__(NonRigidMember self) -> std::string"""
9415  return _IMP_core.NonRigidMember___repr__(self)
9416 
9417  def _get_as_binary(self):
9418  r"""_get_as_binary(NonRigidMember self) -> PyObject *"""
9419  return _IMP_core.NonRigidMember__get_as_binary(self)
9420 
9421  def _set_from_binary(self, p):
9422  r"""_set_from_binary(NonRigidMember self, PyObject * p)"""
9423  return _IMP_core.NonRigidMember__set_from_binary(self, p)
9424 
9425  def __getstate__(self):
9426  p = self._get_as_binary()
9427  if len(self.__dict__) > 1:
9428  d = self.__dict__.copy()
9429  del d['this']
9430  p = (d, p)
9431  return p
9432 
9433  def __setstate__(self, p):
9434  if not hasattr(self, 'this'):
9435  self.__init__()
9436  if isinstance(p, tuple):
9437  d, p = p
9438  self.__dict__.update(d)
9439  return self._set_from_binary(p)
9440 
9441 
9442 # Register NonRigidMember in _IMP_core:
9443 _IMP_core.NonRigidMember_swigregister(NonRigidMember)
9444 class RigidMembersRefiner(IMP.Refiner):
9445  r"""Proxy of C++ IMP::core::RigidMembersRefiner class."""
9446 
9447  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9448 
9449  def __init__(self, *args):
9450  r"""__init__(RigidMembersRefiner self, std::string name="RigidMembersRefiner%d") -> RigidMembersRefiner"""
9451  _IMP_core.RigidMembersRefiner_swiginit(self, _IMP_core.new_RigidMembersRefiner(*args))
9452 
9453  def do_get_inputs(self, m, pis):
9454  r"""do_get_inputs(RigidMembersRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9455  return _IMP_core.RigidMembersRefiner_do_get_inputs(self, m, pis)
9456 
9457  def get_version_info(self):
9458  r"""get_version_info(RigidMembersRefiner self) -> VersionInfo"""
9459  return _IMP_core.RigidMembersRefiner_get_version_info(self)
9460  __swig_destroy__ = _IMP_core.delete_RigidMembersRefiner
9461 
9462  def __str__(self):
9463  r"""__str__(RigidMembersRefiner self) -> std::string"""
9464  return _IMP_core.RigidMembersRefiner___str__(self)
9465 
9466  def __repr__(self):
9467  r"""__repr__(RigidMembersRefiner self) -> std::string"""
9468  return _IMP_core.RigidMembersRefiner___repr__(self)
9469 
9470  @staticmethod
9471  def get_from(o):
9472  return _object_cast_to_RigidMembersRefiner(o)
9473 
9474 
9475 # Register RigidMembersRefiner in _IMP_core:
9476 _IMP_core.RigidMembersRefiner_swigregister(RigidMembersRefiner)
9477 
9478 def get_rigid_members_refiner():
9479  r"""get_rigid_members_refiner() -> RigidMembersRefiner"""
9480  return _IMP_core.get_rigid_members_refiner()
9481 
9482 def transform(*args):
9483  r"""
9484  transform(XYZ a, Transformation3D tr)
9485  transform(RigidBody a, Transformation3D tr)
9486  """
9487  return _IMP_core.transform(*args)
9488 
9489 def get_initial_reference_frame(*args):
9490  r"""
9491  get_initial_reference_frame(Model m, IMP::ParticleIndexes const & pis) -> ReferenceFrame3D
9492  get_initial_reference_frame(IMP::ParticlesTemp const & ps) -> ReferenceFrame3D
9493  """
9494  return _IMP_core.get_initial_reference_frame(*args)
9495 
9496 def create_rigid_bodies(m, n, no_members=False):
9497  r"""create_rigid_bodies(Model m, unsigned int n, bool no_members=False) -> IMP::ParticlesTemp"""
9498  return _IMP_core.create_rigid_bodies(m, n, no_members)
9499 
9500 def show_rigid_body_hierarchy(*args):
9501  r"""show_rigid_body_hierarchy(RigidBody rb, TextOutput out=IMP::TextOutput(std::cout))"""
9502  return _IMP_core.show_rigid_body_hierarchy(*args)
9503 
9504 def get_root_rigid_body(m):
9505  r"""get_root_rigid_body(RigidMember m) -> ParticleIndex"""
9506  return _IMP_core.get_root_rigid_body(m)
9507 class _UpdateRigidBodyMembers(IMP.SingletonModifier):
9508  r"""Proxy of C++ IMP::core::internal::_UpdateRigidBodyMembers class."""
9509 
9510  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9511 
9512  def __init__(self, *args):
9513  r"""__init__(_UpdateRigidBodyMembers self, std::string name="UpdateRigidBodyMembers%1%") -> _UpdateRigidBodyMembers"""
9514  _IMP_core._UpdateRigidBodyMembers_swiginit(self, _IMP_core.new__UpdateRigidBodyMembers(*args))
9515 
9516  def do_get_inputs(self, m, pis):
9517  r"""do_get_inputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9518  return _IMP_core._UpdateRigidBodyMembers_do_get_inputs(self, m, pis)
9519 
9520  def do_get_outputs(self, m, pis):
9521  r"""do_get_outputs(_UpdateRigidBodyMembers self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9522  return _IMP_core._UpdateRigidBodyMembers_do_get_outputs(self, m, pis)
9523 
9524  def get_version_info(self):
9525  r"""get_version_info(_UpdateRigidBodyMembers self) -> VersionInfo"""
9526  return _IMP_core._UpdateRigidBodyMembers_get_version_info(self)
9527  __swig_destroy__ = _IMP_core.delete__UpdateRigidBodyMembers
9528 
9529  def __str__(self):
9530  r"""__str__(_UpdateRigidBodyMembers self) -> std::string"""
9531  return _IMP_core._UpdateRigidBodyMembers___str__(self)
9532 
9533  def __repr__(self):
9534  r"""__repr__(_UpdateRigidBodyMembers self) -> std::string"""
9535  return _IMP_core._UpdateRigidBodyMembers___repr__(self)
9536 
9537  @staticmethod
9538  def get_from(o):
9539  return _object_cast_to__UpdateRigidBodyMembers(o)
9540 
9541 
9542 # Register _UpdateRigidBodyMembers in _IMP_core:
9543 _IMP_core._UpdateRigidBodyMembers_swigregister(_UpdateRigidBodyMembers)
9544 class _AccumulateRigidBodyDerivatives(IMP.SingletonModifier):
9545  r"""Proxy of C++ IMP::core::internal::_AccumulateRigidBodyDerivatives class."""
9546 
9547  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9548 
9549  def __init__(self, *args):
9550  r"""__init__(_AccumulateRigidBodyDerivatives self, std::string name="AccumulateRigidBodyDerivatives%1%") -> _AccumulateRigidBodyDerivatives"""
9551  _IMP_core._AccumulateRigidBodyDerivatives_swiginit(self, _IMP_core.new__AccumulateRigidBodyDerivatives(*args))
9552 
9553  def do_get_inputs(self, m, pis):
9554  r"""do_get_inputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9555  return _IMP_core._AccumulateRigidBodyDerivatives_do_get_inputs(self, m, pis)
9556 
9557  def do_get_outputs(self, m, pis):
9558  r"""do_get_outputs(_AccumulateRigidBodyDerivatives self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9559  return _IMP_core._AccumulateRigidBodyDerivatives_do_get_outputs(self, m, pis)
9560 
9561  def get_version_info(self):
9562  r"""get_version_info(_AccumulateRigidBodyDerivatives self) -> VersionInfo"""
9563  return _IMP_core._AccumulateRigidBodyDerivatives_get_version_info(self)
9564  __swig_destroy__ = _IMP_core.delete__AccumulateRigidBodyDerivatives
9565 
9566  def __str__(self):
9567  r"""__str__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9568  return _IMP_core._AccumulateRigidBodyDerivatives___str__(self)
9569 
9570  def __repr__(self):
9571  r"""__repr__(_AccumulateRigidBodyDerivatives self) -> std::string"""
9572  return _IMP_core._AccumulateRigidBodyDerivatives___repr__(self)
9573 
9574  @staticmethod
9575  def get_from(o):
9576  return _object_cast_to__AccumulateRigidBodyDerivatives(o)
9577 
9578 
9579 # Register _AccumulateRigidBodyDerivatives in _IMP_core:
9580 _IMP_core._AccumulateRigidBodyDerivatives_swigregister(_AccumulateRigidBodyDerivatives)
9581 class _NormalizeRotation(IMP.SingletonModifier):
9582  r"""Proxy of C++ IMP::core::internal::_NormalizeRotation class."""
9583 
9584  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9585 
9586  def __init__(self, *args):
9587  r"""__init__(_NormalizeRotation self, std::string name="NormalizeRotation%1%") -> _NormalizeRotation"""
9588  _IMP_core._NormalizeRotation_swiginit(self, _IMP_core.new__NormalizeRotation(*args))
9589 
9590  def do_get_inputs(self, m, pis):
9591  r"""do_get_inputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9592  return _IMP_core._NormalizeRotation_do_get_inputs(self, m, pis)
9593 
9594  def do_get_outputs(self, m, pis):
9595  r"""do_get_outputs(_NormalizeRotation self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9596  return _IMP_core._NormalizeRotation_do_get_outputs(self, m, pis)
9597 
9598  def get_version_info(self):
9599  r"""get_version_info(_NormalizeRotation self) -> VersionInfo"""
9600  return _IMP_core._NormalizeRotation_get_version_info(self)
9601  __swig_destroy__ = _IMP_core.delete__NormalizeRotation
9602 
9603  def __str__(self):
9604  r"""__str__(_NormalizeRotation self) -> std::string"""
9605  return _IMP_core._NormalizeRotation___str__(self)
9606 
9607  def __repr__(self):
9608  r"""__repr__(_NormalizeRotation self) -> std::string"""
9609  return _IMP_core._NormalizeRotation___repr__(self)
9610 
9611  @staticmethod
9612  def get_from(o):
9613  return _object_cast_to__NormalizeRotation(o)
9614 
9615 
9616 # Register _NormalizeRotation in _IMP_core:
9617 _IMP_core._NormalizeRotation_swigregister(_NormalizeRotation)
9618 class _RigidBodyNormalizeConstraint(IMP.Constraint):
9619  r"""Proxy of C++ IMP::core::internal::_RigidBodyNormalizeConstraint class."""
9620 
9621  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9622 
9623  def __init__(self, *args, **kwargs):
9624  raise AttributeError("No constructor defined - class is abstract")
9625 
9626  def get_before_modifier(self):
9627  r"""get_before_modifier(_RigidBodyNormalizeConstraint self) -> _NormalizeRotation"""
9628  return _IMP_core._RigidBodyNormalizeConstraint_get_before_modifier(self)
9629 
9630  def get_container(self):
9631  r"""get_container(_RigidBodyNormalizeConstraint self) -> Container"""
9632  return _IMP_core._RigidBodyNormalizeConstraint_get_container(self)
9633 
9634  def get_version_info(self):
9635  r"""get_version_info(_RigidBodyNormalizeConstraint self) -> VersionInfo"""
9636  return _IMP_core._RigidBodyNormalizeConstraint_get_version_info(self)
9637  __swig_destroy__ = _IMP_core.delete__RigidBodyNormalizeConstraint
9638 
9639  def __str__(self):
9640  r"""__str__(_RigidBodyNormalizeConstraint self) -> std::string"""
9641  return _IMP_core._RigidBodyNormalizeConstraint___str__(self)
9642 
9643  def __repr__(self):
9644  r"""__repr__(_RigidBodyNormalizeConstraint self) -> std::string"""
9645  return _IMP_core._RigidBodyNormalizeConstraint___repr__(self)
9646 
9647  @staticmethod
9648  def get_from(o):
9649  return _object_cast_to__RigidBodyNormalizeConstraint(o)
9650 
9651 
9652  def _get_jax(self):
9653  from IMP.algebra.jax import _quaternion_normalize
9654  import jax
9655  def apply_func(jm):
9656  # Assume that constraint acts on all rigid bodies
9657  allrbs = jm['rigid_bodies']
9658  allrbs.quaternion = _quaternion_normalize(allrbs.quaternion)
9659  return jm
9660  return self._wrap_jax(apply_func, keys=['rigid_bodies'])
9661 
9662 
9663 # Register _RigidBodyNormalizeConstraint in _IMP_core:
9664 _IMP_core._RigidBodyNormalizeConstraint_swigregister(_RigidBodyNormalizeConstraint)
9665 class _RigidBodyPositionConstraint(IMP.Constraint):
9666  r"""Proxy of C++ IMP::core::internal::_RigidBodyPositionConstraint class."""
9667 
9668  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9669 
9670  def __init__(self, *args, **kwargs):
9671  raise AttributeError("No constructor defined - class is abstract")
9672 
9673  def get_version_info(self):
9674  r"""get_version_info(_RigidBodyPositionConstraint self) -> VersionInfo"""
9675  return _IMP_core._RigidBodyPositionConstraint_get_version_info(self)
9676  __swig_destroy__ = _IMP_core.delete__RigidBodyPositionConstraint
9677 
9678  def get_before_modifier(self):
9679  r"""get_before_modifier(_RigidBodyPositionConstraint self) -> _UpdateRigidBodyMembers"""
9680  return _IMP_core._RigidBodyPositionConstraint_get_before_modifier(self)
9681 
9682  def get_after_modifier(self):
9683  r"""get_after_modifier(_RigidBodyPositionConstraint self) -> _AccumulateRigidBodyDerivatives"""
9684  return _IMP_core._RigidBodyPositionConstraint_get_after_modifier(self)
9685 
9686  def get_index(self):
9687  r"""get_index(_RigidBodyPositionConstraint self) -> ParticleIndex"""
9688  return _IMP_core._RigidBodyPositionConstraint_get_index(self)
9689 
9690  def __str__(self):
9691  r"""__str__(_RigidBodyPositionConstraint self) -> std::string"""
9692  return _IMP_core._RigidBodyPositionConstraint___str__(self)
9693 
9694  def __repr__(self):
9695  r"""__repr__(_RigidBodyPositionConstraint self) -> std::string"""
9696  return _IMP_core._RigidBodyPositionConstraint___repr__(self)
9697 
9698  @staticmethod
9699  def get_from(o):
9700  return _object_cast_to__RigidBodyPositionConstraint(o)
9701 
9702 
9703  def _get_jax(self):
9704  import jax
9705  from IMP.core import _jax_rigid
9706  def apply_func(jm, index):
9707  body = jm['rigid_bodies'].bodies[index]
9708  # todo: this could perhaps be better parallelized, as in most
9709  # cases (at least, without nested rigid bodies) the update of
9710  # one rigid body does not affect members of another body
9711  return body.update_members(jm)
9712  # Get rigid body index from particle index
9713  pindex = self.get_index()
9714  rbindex = _jax_rigid._get_rigid_body_index(self.get_model(), pindex)
9715  f = functools.partial(apply_func, index=rbindex)
9716  return self._wrap_jax(f, keys=['rigid_bodies'])
9717 
9718 
9719 # Register _RigidBodyPositionConstraint in _IMP_core:
9720 _IMP_core._RigidBodyPositionConstraint_swigregister(_RigidBodyPositionConstraint)
9721 class RigidBodyHierarchyGeometry(IMP.display.SingletonGeometry):
9722  r"""Proxy of C++ IMP::core::RigidBodyHierarchyGeometry class."""
9723 
9724  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9725 
9726  def __init__(self, rb, constituents):
9727  r"""__init__(RigidBodyHierarchyGeometry self, RigidBody rb, IMP::ParticlesTemp const & constituents) -> RigidBodyHierarchyGeometry"""
9728  _IMP_core.RigidBodyHierarchyGeometry_swiginit(self, _IMP_core.new_RigidBodyHierarchyGeometry(rb, constituents))
9729 
9730  def get_version_info(self):
9731  r"""get_version_info(RigidBodyHierarchyGeometry self) -> VersionInfo"""
9732  return _IMP_core.RigidBodyHierarchyGeometry_get_version_info(self)
9733  __swig_destroy__ = _IMP_core.delete_RigidBodyHierarchyGeometry
9734 
9735  def __str__(self):
9736  r"""__str__(RigidBodyHierarchyGeometry self) -> std::string"""
9737  return _IMP_core.RigidBodyHierarchyGeometry___str__(self)
9738 
9739  def __repr__(self):
9740  r"""__repr__(RigidBodyHierarchyGeometry self) -> std::string"""
9741  return _IMP_core.RigidBodyHierarchyGeometry___repr__(self)
9742 
9743  @staticmethod
9744  def get_from(o):
9745  return _object_cast_to_RigidBodyHierarchyGeometry(o)
9746 
9747 
9748 # Register RigidBodyHierarchyGeometry in _IMP_core:
9749 _IMP_core.RigidBodyHierarchyGeometry_swigregister(RigidBodyHierarchyGeometry)
9750 class RigidBodyDerivativeGeometry(IMP.display.SingletonGeometry):
9751  r"""Proxy of C++ IMP::core::RigidBodyDerivativeGeometry class."""
9752 
9753  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9754 
9755  def __init__(self, *args):
9756  r"""
9757  __init__(RigidBodyDerivativeGeometry self, Particle p) -> RigidBodyDerivativeGeometry
9758  __init__(RigidBodyDerivativeGeometry self, RigidBody d) -> RigidBodyDerivativeGeometry
9759  """
9760  _IMP_core.RigidBodyDerivativeGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativeGeometry(*args))
9761 
9762  def get_version_info(self):
9763  r"""get_version_info(RigidBodyDerivativeGeometry self) -> VersionInfo"""
9764  return _IMP_core.RigidBodyDerivativeGeometry_get_version_info(self)
9765  __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativeGeometry
9766 
9767  def __str__(self):
9768  r"""__str__(RigidBodyDerivativeGeometry self) -> std::string"""
9769  return _IMP_core.RigidBodyDerivativeGeometry___str__(self)
9770 
9771  def __repr__(self):
9772  r"""__repr__(RigidBodyDerivativeGeometry self) -> std::string"""
9773  return _IMP_core.RigidBodyDerivativeGeometry___repr__(self)
9774 
9775  @staticmethod
9776  def get_from(o):
9777  return _object_cast_to_RigidBodyDerivativeGeometry(o)
9778 
9779 
9780 # Register RigidBodyDerivativeGeometry in _IMP_core:
9781 _IMP_core.RigidBodyDerivativeGeometry_swigregister(RigidBodyDerivativeGeometry)
9782 class RigidBodyDerivativesGeometry(IMP.display.SingletonsGeometry):
9783  r"""Proxy of C++ IMP::core::RigidBodyDerivativesGeometry class."""
9784 
9785  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9786 
9787  def __init__(self, sc):
9788  r"""__init__(RigidBodyDerivativesGeometry self, SingletonContainer sc) -> RigidBodyDerivativesGeometry"""
9789  _IMP_core.RigidBodyDerivativesGeometry_swiginit(self, _IMP_core.new_RigidBodyDerivativesGeometry(sc))
9790 
9791  def get_version_info(self):
9792  r"""get_version_info(RigidBodyDerivativesGeometry self) -> VersionInfo"""
9793  return _IMP_core.RigidBodyDerivativesGeometry_get_version_info(self)
9794  __swig_destroy__ = _IMP_core.delete_RigidBodyDerivativesGeometry
9795 
9796  def __str__(self):
9797  r"""__str__(RigidBodyDerivativesGeometry self) -> std::string"""
9798  return _IMP_core.RigidBodyDerivativesGeometry___str__(self)
9799 
9800  def __repr__(self):
9801  r"""__repr__(RigidBodyDerivativesGeometry self) -> std::string"""
9802  return _IMP_core.RigidBodyDerivativesGeometry___repr__(self)
9803 
9804  @staticmethod
9805  def get_from(o):
9806  return _object_cast_to_RigidBodyDerivativesGeometry(o)
9807 
9808 
9809 # Register RigidBodyDerivativesGeometry in _IMP_core:
9810 _IMP_core.RigidBodyDerivativesGeometry_swigregister(RigidBodyDerivativesGeometry)
9811 class RigidBodyFrameGeometry(IMP.display.SingletonGeometry):
9812  r"""Proxy of C++ IMP::core::RigidBodyFrameGeometry class."""
9813 
9814  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9815 
9816  def __init__(self, *args):
9817  r"""
9818  __init__(RigidBodyFrameGeometry self, Particle p) -> RigidBodyFrameGeometry
9819  __init__(RigidBodyFrameGeometry self, RigidBody d) -> RigidBodyFrameGeometry
9820  """
9821  _IMP_core.RigidBodyFrameGeometry_swiginit(self, _IMP_core.new_RigidBodyFrameGeometry(*args))
9822 
9823  def get_version_info(self):
9824  r"""get_version_info(RigidBodyFrameGeometry self) -> VersionInfo"""
9825  return _IMP_core.RigidBodyFrameGeometry_get_version_info(self)
9826  __swig_destroy__ = _IMP_core.delete_RigidBodyFrameGeometry
9827 
9828  def __str__(self):
9829  r"""__str__(RigidBodyFrameGeometry self) -> std::string"""
9830  return _IMP_core.RigidBodyFrameGeometry___str__(self)
9831 
9832  def __repr__(self):
9833  r"""__repr__(RigidBodyFrameGeometry self) -> std::string"""
9834  return _IMP_core.RigidBodyFrameGeometry___repr__(self)
9835 
9836  @staticmethod
9837  def get_from(o):
9838  return _object_cast_to_RigidBodyFrameGeometry(o)
9839 
9840 
9841 # Register RigidBodyFrameGeometry in _IMP_core:
9842 _IMP_core.RigidBodyFrameGeometry_swigregister(RigidBodyFrameGeometry)
9843 class RigidBodyFramesGeometry(IMP.display.SingletonsGeometry):
9844  r"""Proxy of C++ IMP::core::RigidBodyFramesGeometry class."""
9845 
9846  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9847 
9848  def __init__(self, sc):
9849  r"""__init__(RigidBodyFramesGeometry self, SingletonContainer sc) -> RigidBodyFramesGeometry"""
9850  _IMP_core.RigidBodyFramesGeometry_swiginit(self, _IMP_core.new_RigidBodyFramesGeometry(sc))
9851 
9852  def get_version_info(self):
9853  r"""get_version_info(RigidBodyFramesGeometry self) -> VersionInfo"""
9854  return _IMP_core.RigidBodyFramesGeometry_get_version_info(self)
9855  __swig_destroy__ = _IMP_core.delete_RigidBodyFramesGeometry
9856 
9857  def __str__(self):
9858  r"""__str__(RigidBodyFramesGeometry self) -> std::string"""
9859  return _IMP_core.RigidBodyFramesGeometry___str__(self)
9860 
9861  def __repr__(self):
9862  r"""__repr__(RigidBodyFramesGeometry self) -> std::string"""
9863  return _IMP_core.RigidBodyFramesGeometry___repr__(self)
9864 
9865  @staticmethod
9866  def get_from(o):
9867  return _object_cast_to_RigidBodyFramesGeometry(o)
9868 
9869 
9870 # Register RigidBodyFramesGeometry in _IMP_core:
9871 _IMP_core.RigidBodyFramesGeometry_swigregister(RigidBodyFramesGeometry)
9872 class RigidBodyTorque(IMP.display.SegmentGeometry):
9873  r"""Proxy of C++ IMP::core::RigidBodyTorque class."""
9874 
9875  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9876 
9877  def __init__(self, p):
9878  r"""__init__(RigidBodyTorque self, Particle p) -> RigidBodyTorque"""
9879  _IMP_core.RigidBodyTorque_swiginit(self, _IMP_core.new_RigidBodyTorque(p))
9880 
9881  def __str__(self):
9882  r"""__str__(RigidBodyTorque self) -> std::string"""
9883  return _IMP_core.RigidBodyTorque___str__(self)
9884 
9885  def __repr__(self):
9886  r"""__repr__(RigidBodyTorque self) -> std::string"""
9887  return _IMP_core.RigidBodyTorque___repr__(self)
9888 
9889  @staticmethod
9890  def get_from(o):
9891  return _object_cast_to_RigidBodyTorque(o)
9892 
9893  __swig_destroy__ = _IMP_core.delete_RigidBodyTorque
9894 
9895 # Register RigidBodyTorque in _IMP_core:
9896 _IMP_core.RigidBodyTorque_swigregister(RigidBodyTorque)
9897 class NearestNeighborsClosePairsFinder(ClosePairsFinder):
9898  r"""Proxy of C++ IMP::core::NearestNeighborsClosePairsFinder class."""
9899 
9900  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9901 
9902  def __init__(self):
9903  r"""__init__(NearestNeighborsClosePairsFinder self) -> NearestNeighborsClosePairsFinder"""
9904  _IMP_core.NearestNeighborsClosePairsFinder_swiginit(self, _IMP_core.new_NearestNeighborsClosePairsFinder())
9905 
9906  def get_close_pairs(self, *args):
9907  r"""
9908  get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9909  get_close_pairs(NearestNeighborsClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
9910  get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
9911  get_close_pairs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
9912  """
9913  return _IMP_core.NearestNeighborsClosePairsFinder_get_close_pairs(self, *args)
9914 
9915  def do_get_inputs(self, m, pis):
9916  r"""do_get_inputs(NearestNeighborsClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
9917  return _IMP_core.NearestNeighborsClosePairsFinder_do_get_inputs(self, m, pis)
9918 
9919  def get_version_info(self):
9920  r"""get_version_info(NearestNeighborsClosePairsFinder self) -> VersionInfo"""
9921  return _IMP_core.NearestNeighborsClosePairsFinder_get_version_info(self)
9922  __swig_destroy__ = _IMP_core.delete_NearestNeighborsClosePairsFinder
9923 
9924  def __str__(self):
9925  r"""__str__(NearestNeighborsClosePairsFinder self) -> std::string"""
9926  return _IMP_core.NearestNeighborsClosePairsFinder___str__(self)
9927 
9928  def __repr__(self):
9929  r"""__repr__(NearestNeighborsClosePairsFinder self) -> std::string"""
9930  return _IMP_core.NearestNeighborsClosePairsFinder___repr__(self)
9931 
9932  @staticmethod
9933  def get_from(o):
9934  return _object_cast_to_NearestNeighborsClosePairsFinder(o)
9935 
9936 
9937 # Register NearestNeighborsClosePairsFinder in _IMP_core:
9938 _IMP_core.NearestNeighborsClosePairsFinder_swigregister(NearestNeighborsClosePairsFinder)
9939 class RestraintsScoringFunction(IMP.ScoringFunction):
9940  r"""Proxy of C++ IMP::core::RestraintsScoringFunction class."""
9941 
9942  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9943 
9944  def __init__(self, *args):
9945  r"""
9946  __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, double weight=1.0, double max=NO_MAX, std::string name="RestraintsScoringFunction%1%") -> RestraintsScoringFunction
9947  __init__(RestraintsScoringFunction self, _RestraintsAdaptor rs, std::string name) -> RestraintsScoringFunction
9948  __init__(RestraintsScoringFunction self) -> RestraintsScoringFunction
9949  """
9950  _IMP_core.RestraintsScoringFunction_swiginit(self, _IMP_core.new_RestraintsScoringFunction(*args))
9951 
9952  def do_add_score_and_derivatives(self, sa, ss):
9953  r"""do_add_score_and_derivatives(RestraintsScoringFunction self, ScoreAccumulator sa, IMP::ScoreStatesTemp const & ss)"""
9954  return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives(self, sa, ss)
9955 
9956  def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss):
9957  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)"""
9958  return _IMP_core.RestraintsScoringFunction_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss)
9959 
9960  def do_get_inputs(self):
9961  r"""do_get_inputs(RestraintsScoringFunction self) -> IMP::ModelObjectsTemp"""
9962  return _IMP_core.RestraintsScoringFunction_do_get_inputs(self)
9963 
9964  def get_restraints(self):
9965  r"""get_restraints(RestraintsScoringFunction self) -> IMP::Restraints"""
9966  return _IMP_core.RestraintsScoringFunction_get_restraints(self)
9967 
9968  def set_restraints(self, d):
9969  r"""set_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
9970  return _IMP_core.RestraintsScoringFunction_set_restraints(self, d)
9971 
9972  def get_number_of_restraints(self):
9973  r"""get_number_of_restraints(RestraintsScoringFunction self) -> unsigned int"""
9974  return _IMP_core.RestraintsScoringFunction_get_number_of_restraints(self)
9975 
9976  def clear_restraints(self):
9977  r"""clear_restraints(RestraintsScoringFunction self)"""
9978  return _IMP_core.RestraintsScoringFunction_clear_restraints(self)
9979 
9980  def get_restraint(self, i):
9981  r"""get_restraint(RestraintsScoringFunction self, unsigned int i) -> Restraint"""
9982  return _IMP_core.RestraintsScoringFunction_get_restraint(self, i)
9983 
9984  def erase_restraint(self, i):
9985  r"""erase_restraint(RestraintsScoringFunction self, unsigned int i)"""
9986  return _IMP_core.RestraintsScoringFunction_erase_restraint(self, i)
9987 
9988  def add_restraint(self, d):
9989  r"""add_restraint(RestraintsScoringFunction self, Restraint d) -> unsigned int"""
9990  return _IMP_core.RestraintsScoringFunction_add_restraint(self, d)
9991 
9992  def add_restraints(self, d):
9993  r"""add_restraints(RestraintsScoringFunction self, IMP::Restraints const & d)"""
9994  return _IMP_core.RestraintsScoringFunction_add_restraints(self, d)
9995 
9996  def _python_index_restraint(self, r, start, stop):
9997  r"""_python_index_restraint(RestraintsScoringFunction self, Restraint r, unsigned int start, unsigned int stop) -> unsigned int"""
9998  return _IMP_core.RestraintsScoringFunction__python_index_restraint(self, r, start, stop)
9999  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)
10000  def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
10001  def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
10002  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##Restraints")
10003 
10004  def get_version_info(self):
10005  r"""get_version_info(RestraintsScoringFunction self) -> VersionInfo"""
10006  return _IMP_core.RestraintsScoringFunction_get_version_info(self)
10007  __swig_destroy__ = _IMP_core.delete_RestraintsScoringFunction
10008 
10009  def __str__(self):
10010  r"""__str__(RestraintsScoringFunction self) -> std::string"""
10011  return _IMP_core.RestraintsScoringFunction___str__(self)
10012 
10013  def __repr__(self):
10014  r"""__repr__(RestraintsScoringFunction self) -> std::string"""
10015  return _IMP_core.RestraintsScoringFunction___repr__(self)
10016 
10017  @staticmethod
10018  def get_from(o):
10019  return _object_cast_to_RestraintsScoringFunction(o)
10020 
10021 
10022  def _get_as_binary(self):
10023  r"""_get_as_binary(RestraintsScoringFunction self) -> PyObject *"""
10024  return _IMP_core.RestraintsScoringFunction__get_as_binary(self)
10025 
10026  def _set_from_binary(self, p):
10027  r"""_set_from_binary(RestraintsScoringFunction self, PyObject * p)"""
10028  return _IMP_core.RestraintsScoringFunction__set_from_binary(self, p)
10029 
10030  def __getstate__(self):
10031  p = self._get_as_binary()
10032  if len(self.__dict__) > 1:
10033  d = self.__dict__.copy()
10034  del d['this']
10035  p = (d, p)
10036  return p
10037 
10038  def __setstate__(self, p):
10039  if not hasattr(self, 'this'):
10040  self.__init__()
10041  if isinstance(p, tuple):
10042  d, p = p
10043  self.__dict__.update(d)
10044  return self._set_from_binary(p)
10045 
10046 
10047  def _get_jax(self, space=None):
10048  import jax.numpy as jnp
10049  import IMP.jax
10050  import IMP._jax_util
10051  restraints = [r.get_derived_object() for r in self.restraints]
10052  space = space or IMP.jax.FreeSpace
10053  multi_funcs, funcs, keys = IMP._jax_util.get_restraints_jax_funcs_keys(
10054  restraints, space)
10055  def jax_sf(jm):
10056  rets = [f(jm) for f in multi_funcs]
10057  if funcs:
10058  rets.append(jnp.stack([f(jm) for f in funcs], axis=-1))
10059  scores = jnp.concatenate(rets, axis=-1)
10060  return jnp.sum(scores, axis=-1)
10061  return IMP._jax_util.JAXRestraintInfo(
10062  m=self.get_model(), score_func=jax_sf, weight=1.0, keys=keys)
10063 
10064 
10065 # Register RestraintsScoringFunction in _IMP_core:
10066 _IMP_core.RestraintsScoringFunction_swigregister(RestraintsScoringFunction)
10067 class RigidClosePairsFinder(ClosePairsFinder):
10068  r"""Proxy of C++ IMP::core::RigidClosePairsFinder class."""
10069 
10070  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10071 
10072  def __init__(self, cpf=None):
10073  r"""__init__(RigidClosePairsFinder self, ClosePairsFinder cpf=None) -> RigidClosePairsFinder"""
10074  _IMP_core.RigidClosePairsFinder_swiginit(self, _IMP_core.new_RigidClosePairsFinder(cpf))
10075 
10076  def do_get_inputs(self, m, pis):
10077  r"""do_get_inputs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10078  return _IMP_core.RigidClosePairsFinder_do_get_inputs(self, m, pis)
10079 
10080  def get_close_pairs(self, *args):
10081  r"""
10082  get_close_pairs(RigidClosePairsFinder self, Model m, ParticleIndex a, ParticleIndex b, IMP::ParticleIndexes const & pa, IMP::ParticleIndexes const & pb) -> IMP::ParticleIndexPairs
10083  get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
10084  get_close_pairs(RigidClosePairsFinder self, IMP::algebra::BoundingBox3Ds const & bas, IMP::algebra::BoundingBox3Ds const & bbs) -> IMP::IntPairs
10085  get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pc) -> IMP::ParticleIndexPairs
10086  get_close_pairs(RigidClosePairsFinder self, Model m, IMP::ParticleIndexes const & pca, IMP::ParticleIndexes const & pcb) -> IMP::ParticleIndexPairs
10087  """
10088  return _IMP_core.RigidClosePairsFinder_get_close_pairs(self, *args)
10089 
10090  def get_version_info(self):
10091  r"""get_version_info(RigidClosePairsFinder self) -> VersionInfo"""
10092  return _IMP_core.RigidClosePairsFinder_get_version_info(self)
10093  __swig_destroy__ = _IMP_core.delete_RigidClosePairsFinder
10094 
10095  def __str__(self):
10096  r"""__str__(RigidClosePairsFinder self) -> std::string"""
10097  return _IMP_core.RigidClosePairsFinder___str__(self)
10098 
10099  def __repr__(self):
10100  r"""__repr__(RigidClosePairsFinder self) -> std::string"""
10101  return _IMP_core.RigidClosePairsFinder___repr__(self)
10102 
10103  @staticmethod
10104  def get_from(o):
10105  return _object_cast_to_RigidClosePairsFinder(o)
10106 
10107 
10108  def _get_as_binary(self):
10109  r"""_get_as_binary(RigidClosePairsFinder self) -> PyObject *"""
10110  return _IMP_core.RigidClosePairsFinder__get_as_binary(self)
10111 
10112  def _set_from_binary(self, p):
10113  r"""_set_from_binary(RigidClosePairsFinder self, PyObject * p)"""
10114  return _IMP_core.RigidClosePairsFinder__set_from_binary(self, p)
10115 
10116  def __getstate__(self):
10117  p = self._get_as_binary()
10118  if len(self.__dict__) > 1:
10119  d = self.__dict__.copy()
10120  del d['this']
10121  p = (d, p)
10122  return p
10123 
10124  def __setstate__(self, p):
10125  if not hasattr(self, 'this'):
10126  self.__init__()
10127  if isinstance(p, tuple):
10128  d, p = p
10129  self.__dict__.update(d)
10130  return self._set_from_binary(p)
10131 
10132 
10133 # Register RigidClosePairsFinder in _IMP_core:
10134 _IMP_core.RigidClosePairsFinder_swigregister(RigidClosePairsFinder)
10135 class _SphereDistancePairScore(IMP.PairScore):
10136  r"""Proxy of C++ IMP::core::SphereDistancePairScore class."""
10137 
10138  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10139  __repr__ = _swig_repr
10140 
10141  def __init__(self, *args):
10142  r"""
10143  SphereDistancePairScore(UnaryFunction uf, std::string name="SphereDistancePairScore%1%") -> _SphereDistancePairScore
10144  __init__(_SphereDistancePairScore self) -> _SphereDistancePairScore
10145  """
10146  _IMP_core._SphereDistancePairScore_swiginit(self, _IMP_core.new__SphereDistancePairScore(*args))
10147 
10148  def do_get_inputs(self, m, pis):
10149  r"""do_get_inputs(_SphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10150  return _IMP_core._SphereDistancePairScore_do_get_inputs(self, m, pis)
10151 
10152  def get_score_functor(self, *args):
10153  r"""
10154  get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10155  get_score_functor(_SphereDistancePairScore self) -> _SphereDistanceUF
10156  """
10157  return _IMP_core._SphereDistancePairScore_get_score_functor(self, *args)
10158 
10159  def get_version_info(self):
10160  r"""get_version_info(_SphereDistancePairScore self) -> VersionInfo"""
10161  return _IMP_core._SphereDistancePairScore_get_version_info(self)
10162  __swig_destroy__ = _IMP_core.delete__SphereDistancePairScore
10163 
10164  @staticmethod
10165  def get_from(o):
10166  return _object_cast_to__SphereDistancePairScore(o)
10167 
10168 
10169  def _get_as_binary(self):
10170  r"""_get_as_binary(_SphereDistancePairScore self) -> PyObject *"""
10171  return _IMP_core._SphereDistancePairScore__get_as_binary(self)
10172 
10173  def _set_from_binary(self, p):
10174  r"""_set_from_binary(_SphereDistancePairScore self, PyObject * p)"""
10175  return _IMP_core._SphereDistancePairScore__set_from_binary(self, p)
10176 
10177  def __getstate__(self):
10178  p = self._get_as_binary()
10179  if len(self.__dict__) > 1:
10180  d = self.__dict__.copy()
10181  del d['this']
10182  p = (d, p)
10183  return p
10184 
10185  def __setstate__(self, p):
10186  if not hasattr(self, 'this'):
10187  self.__init__()
10188  if isinstance(p, tuple):
10189  d, p = p
10190  self.__dict__.update(d)
10191  return self._set_from_binary(p)
10192 
10193 
10194  def _get_jax(self, m, indexes, space):
10195  import jax.numpy as jnp
10196  def jax_score(jm, uf):
10197  xyzs = jm['xyz'][indexes]
10198  rs = jm['r'][indexes]
10199  diff = xyzs[:,0] - xyzs[:,1]
10200  drs = space.distance(diff) - rs.sum(axis=-1)
10201  return uf(drs)
10202  sfnc = self.get_score_functor()
10203  uf = sfnc.get_unary_function().get_derived_object()
10204  f = functools.partial(jax_score, uf=uf._get_jax())
10205  return self._wrap_jax(m, f)
10206 
10207 
10208 # Register _SphereDistancePairScore in _IMP_core:
10209 _IMP_core._SphereDistancePairScore_swigregister(_SphereDistancePairScore)
10210 class HarmonicUpperBoundSphereDistancePairScore(IMP.PairScore):
10211  r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDistancePairScore class."""
10212 
10213  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10214 
10215  def __init__(self, *args):
10216  r"""
10217  __init__(HarmonicUpperBoundSphereDistancePairScore self, double x0, double k, std::string name="HarmonicUpperBoundSphereDistancePairScore%1%") -> HarmonicUpperBoundSphereDistancePairScore
10218  __init__(HarmonicUpperBoundSphereDistancePairScore self) -> HarmonicUpperBoundSphereDistancePairScore
10219  """
10220  _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDistancePairScore(*args))
10221 
10222  def do_get_inputs(self, m, pis):
10223  r"""do_get_inputs(HarmonicUpperBoundSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10224  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_do_get_inputs(self, m, pis)
10225 
10226  def get_score_functor(self, *args):
10227  r"""
10228  get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore
10229  get_score_functor(HarmonicUpperBoundSphereDistancePairScore self) -> IMP::core::HarmonicUpperBoundSphereDistanceScore const &
10230  """
10231  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_score_functor(self, *args)
10232 
10233  def get_x0(self):
10234  r"""get_x0(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10235  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_x0(self)
10236 
10237  def get_k(self):
10238  r"""get_k(HarmonicUpperBoundSphereDistancePairScore self) -> double"""
10239  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_k(self)
10240 
10241  def get_version_info(self):
10242  r"""get_version_info(HarmonicUpperBoundSphereDistancePairScore self) -> VersionInfo"""
10243  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore_get_version_info(self)
10244  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDistancePairScore
10245 
10246  def __str__(self):
10247  r"""__str__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10248  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___str__(self)
10249 
10250  def __repr__(self):
10251  r"""__repr__(HarmonicUpperBoundSphereDistancePairScore self) -> std::string"""
10252  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore___repr__(self)
10253 
10254  @staticmethod
10255  def get_from(o):
10256  return _object_cast_to_HarmonicUpperBoundSphereDistancePairScore(o)
10257 
10258 
10259  def _get_as_binary(self):
10260  r"""_get_as_binary(HarmonicUpperBoundSphereDistancePairScore self) -> PyObject *"""
10261  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__get_as_binary(self)
10262 
10263  def _set_from_binary(self, p):
10264  r"""_set_from_binary(HarmonicUpperBoundSphereDistancePairScore self, PyObject * p)"""
10265  return _IMP_core.HarmonicUpperBoundSphereDistancePairScore__set_from_binary(self, p)
10266 
10267  def __getstate__(self):
10268  p = self._get_as_binary()
10269  if len(self.__dict__) > 1:
10270  d = self.__dict__.copy()
10271  del d['this']
10272  p = (d, p)
10273  return p
10274 
10275  def __setstate__(self, p):
10276  if not hasattr(self, 'this'):
10277  self.__init__()
10278  if isinstance(p, tuple):
10279  d, p = p
10280  self.__dict__.update(d)
10281  return self._set_from_binary(p)
10282 
10283 
10284  def _get_jax(self, m, indexes, space):
10285  import jax.numpy as jnp
10286  import jax.lax
10287  def jax_score(jm, d, k):
10288  xyzs = jm['xyz'][indexes]
10289  rs = jm['r'][indexes]
10290  diff = xyzs[:,0] - xyzs[:,1]
10291  drs = space.distance(diff) - rs.sum(axis=-1)
10292  return 0.5 * k * jax.lax.min(d - drs, 0.0) ** 2
10293  f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10294  return self._wrap_jax(m, f)
10295 
10296 
10297 # Register HarmonicUpperBoundSphereDistancePairScore in _IMP_core:
10298 _IMP_core.HarmonicUpperBoundSphereDistancePairScore_swigregister(HarmonicUpperBoundSphereDistancePairScore)
10299 class HarmonicUpperBoundSphereDiameterPairScore(IMP.PairScore):
10300  r"""Proxy of C++ IMP::core::HarmonicUpperBoundSphereDiameterPairScore class."""
10301 
10302  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10303 
10304  def __init__(self, d0, k):
10305  r"""__init__(HarmonicUpperBoundSphereDiameterPairScore self, double d0, double k) -> HarmonicUpperBoundSphereDiameterPairScore"""
10306  _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swiginit(self, _IMP_core.new_HarmonicUpperBoundSphereDiameterPairScore(d0, k))
10307 
10308  def get_rest_length(self):
10309  r"""get_rest_length(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10310  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_rest_length(self)
10311 
10312  def get_stiffness(self):
10313  r"""get_stiffness(HarmonicUpperBoundSphereDiameterPairScore self) -> double"""
10314  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_stiffness(self)
10315 
10316  def do_get_inputs(self, m, pis):
10317  r"""do_get_inputs(HarmonicUpperBoundSphereDiameterPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10318  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_do_get_inputs(self, m, pis)
10319 
10320  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10321  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"""
10322  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10323 
10324  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10325  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"""
10326  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10327 
10328  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10329  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"""
10330  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10331 
10332  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10333  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"""
10334  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10335 
10336  def get_version_info(self):
10337  r"""get_version_info(HarmonicUpperBoundSphereDiameterPairScore self) -> VersionInfo"""
10338  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_get_version_info(self)
10339  __swig_destroy__ = _IMP_core.delete_HarmonicUpperBoundSphereDiameterPairScore
10340 
10341  def __str__(self):
10342  r"""__str__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10343  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___str__(self)
10344 
10345  def __repr__(self):
10346  r"""__repr__(HarmonicUpperBoundSphereDiameterPairScore self) -> std::string"""
10347  return _IMP_core.HarmonicUpperBoundSphereDiameterPairScore___repr__(self)
10348 
10349  @staticmethod
10350  def get_from(o):
10351  return _object_cast_to_HarmonicUpperBoundSphereDiameterPairScore(o)
10352 
10353 
10354 # Register HarmonicUpperBoundSphereDiameterPairScore in _IMP_core:
10355 _IMP_core.HarmonicUpperBoundSphereDiameterPairScore_swigregister(HarmonicUpperBoundSphereDiameterPairScore)
10356 class HarmonicSphereDistancePairScore(IMP.PairScore):
10357  r"""Proxy of C++ IMP::core::HarmonicSphereDistancePairScore class."""
10358 
10359  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10360 
10361  def __init__(self, *args):
10362  r"""
10363  __init__(HarmonicSphereDistancePairScore self, double x0, double k, std::string name="HarmonicSphereDistancePairScore%1%") -> HarmonicSphereDistancePairScore
10364  __init__(HarmonicSphereDistancePairScore self) -> HarmonicSphereDistancePairScore
10365  """
10366  _IMP_core.HarmonicSphereDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSphereDistancePairScore(*args))
10367 
10368  def do_get_inputs(self, m, pis):
10369  r"""do_get_inputs(HarmonicSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10370  return _IMP_core.HarmonicSphereDistancePairScore_do_get_inputs(self, m, pis)
10371 
10372  def get_score_functor(self, *args):
10373  r"""
10374  get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore
10375  get_score_functor(HarmonicSphereDistancePairScore self) -> IMP::core::HarmonicSphereDistanceScore const &
10376  """
10377  return _IMP_core.HarmonicSphereDistancePairScore_get_score_functor(self, *args)
10378 
10379  def get_x0(self):
10380  r"""get_x0(HarmonicSphereDistancePairScore self) -> double"""
10381  return _IMP_core.HarmonicSphereDistancePairScore_get_x0(self)
10382 
10383  def get_k(self):
10384  r"""get_k(HarmonicSphereDistancePairScore self) -> double"""
10385  return _IMP_core.HarmonicSphereDistancePairScore_get_k(self)
10386 
10387  def get_version_info(self):
10388  r"""get_version_info(HarmonicSphereDistancePairScore self) -> VersionInfo"""
10389  return _IMP_core.HarmonicSphereDistancePairScore_get_version_info(self)
10390  __swig_destroy__ = _IMP_core.delete_HarmonicSphereDistancePairScore
10391 
10392  def __str__(self):
10393  r"""__str__(HarmonicSphereDistancePairScore self) -> std::string"""
10394  return _IMP_core.HarmonicSphereDistancePairScore___str__(self)
10395 
10396  def __repr__(self):
10397  r"""__repr__(HarmonicSphereDistancePairScore self) -> std::string"""
10398  return _IMP_core.HarmonicSphereDistancePairScore___repr__(self)
10399 
10400  @staticmethod
10401  def get_from(o):
10402  return _object_cast_to_HarmonicSphereDistancePairScore(o)
10403 
10404 
10405  def _get_as_binary(self):
10406  r"""_get_as_binary(HarmonicSphereDistancePairScore self) -> PyObject *"""
10407  return _IMP_core.HarmonicSphereDistancePairScore__get_as_binary(self)
10408 
10409  def _set_from_binary(self, p):
10410  r"""_set_from_binary(HarmonicSphereDistancePairScore self, PyObject * p)"""
10411  return _IMP_core.HarmonicSphereDistancePairScore__set_from_binary(self, p)
10412 
10413  def __getstate__(self):
10414  p = self._get_as_binary()
10415  if len(self.__dict__) > 1:
10416  d = self.__dict__.copy()
10417  del d['this']
10418  p = (d, p)
10419  return p
10420 
10421  def __setstate__(self, p):
10422  if not hasattr(self, 'this'):
10423  self.__init__()
10424  if isinstance(p, tuple):
10425  d, p = p
10426  self.__dict__.update(d)
10427  return self._set_from_binary(p)
10428 
10429 
10430  def _get_jax(self, m, indexes, space):
10431  import jax.numpy as jnp
10432  def jax_score(jm, d, k):
10433  xyzs = jm['xyz'][indexes]
10434  rs = jm['r'][indexes]
10435  diff = xyzs[:,0] - xyzs[:,1]
10436  drs = space.distance(diff) - rs.sum(axis=-1)
10437  return 0.5 * k * (d - drs)**2
10438  f = functools.partial(jax_score, d=self.get_x0(), k=self.get_k())
10439  return self._wrap_jax(m, f)
10440 
10441 
10442 # Register HarmonicSphereDistancePairScore in _IMP_core:
10443 _IMP_core.HarmonicSphereDistancePairScore_swigregister(HarmonicSphereDistancePairScore)
10444 class NormalizedSphereDistancePairScore(IMP.PairScore):
10445  r"""Proxy of C++ IMP::core::NormalizedSphereDistancePairScore class."""
10446 
10447  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10448 
10449  def __init__(self, *args):
10450  r"""__init__(NormalizedSphereDistancePairScore self, UnaryFunction f, FloatKey radius=IMP::FloatKey("radius")) -> NormalizedSphereDistancePairScore"""
10451  _IMP_core.NormalizedSphereDistancePairScore_swiginit(self, _IMP_core.new_NormalizedSphereDistancePairScore(*args))
10452 
10453  def do_get_inputs(self, m, pis):
10454  r"""do_get_inputs(NormalizedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10455  return _IMP_core.NormalizedSphereDistancePairScore_do_get_inputs(self, m, pis)
10456 
10457  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10458  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"""
10459  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10460 
10461  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10462  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"""
10463  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10464 
10465  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10466  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"""
10467  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10468 
10469  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10470  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"""
10471  return _IMP_core.NormalizedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10472 
10473  def get_version_info(self):
10474  r"""get_version_info(NormalizedSphereDistancePairScore self) -> VersionInfo"""
10475  return _IMP_core.NormalizedSphereDistancePairScore_get_version_info(self)
10476  __swig_destroy__ = _IMP_core.delete_NormalizedSphereDistancePairScore
10477 
10478  def __str__(self):
10479  r"""__str__(NormalizedSphereDistancePairScore self) -> std::string"""
10480  return _IMP_core.NormalizedSphereDistancePairScore___str__(self)
10481 
10482  def __repr__(self):
10483  r"""__repr__(NormalizedSphereDistancePairScore self) -> std::string"""
10484  return _IMP_core.NormalizedSphereDistancePairScore___repr__(self)
10485 
10486  @staticmethod
10487  def get_from(o):
10488  return _object_cast_to_NormalizedSphereDistancePairScore(o)
10489 
10490 
10491 # Register NormalizedSphereDistancePairScore in _IMP_core:
10492 _IMP_core.NormalizedSphereDistancePairScore_swigregister(NormalizedSphereDistancePairScore)
10493 class WeightedSphereDistancePairScore(IMP.PairScore):
10494  r"""Proxy of C++ IMP::core::WeightedSphereDistancePairScore class."""
10495 
10496  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10497 
10498  def __init__(self, *args):
10499  r"""__init__(WeightedSphereDistancePairScore self, UnaryFunction f, FloatKey weight, FloatKey radius=IMP::FloatKey("radius")) -> WeightedSphereDistancePairScore"""
10500  _IMP_core.WeightedSphereDistancePairScore_swiginit(self, _IMP_core.new_WeightedSphereDistancePairScore(*args))
10501 
10502  def do_get_inputs(self, m, pis):
10503  r"""do_get_inputs(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10504  return _IMP_core.WeightedSphereDistancePairScore_do_get_inputs(self, m, pis)
10505 
10506  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
10507  r"""evaluate_indexes(WeightedSphereDistancePairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
10508  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
10509 
10510  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
10511  r"""evaluate_indexes_scores(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"""
10512  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
10513 
10514  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
10515  r"""evaluate_indexes_delta(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"""
10516  return _IMP_core.WeightedSphereDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
10517 
10518  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
10519  r"""evaluate_if_good_indexes(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"""
10520  return _IMP_core.WeightedSphereDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
10521 
10522  def get_version_info(self):
10523  r"""get_version_info(WeightedSphereDistancePairScore self) -> VersionInfo"""
10524  return _IMP_core.WeightedSphereDistancePairScore_get_version_info(self)
10525  __swig_destroy__ = _IMP_core.delete_WeightedSphereDistancePairScore
10526 
10527  def __str__(self):
10528  r"""__str__(WeightedSphereDistancePairScore self) -> std::string"""
10529  return _IMP_core.WeightedSphereDistancePairScore___str__(self)
10530 
10531  def __repr__(self):
10532  r"""__repr__(WeightedSphereDistancePairScore self) -> std::string"""
10533  return _IMP_core.WeightedSphereDistancePairScore___repr__(self)
10534 
10535  @staticmethod
10536  def get_from(o):
10537  return _object_cast_to_WeightedSphereDistancePairScore(o)
10538 
10539 
10540 # Register WeightedSphereDistancePairScore in _IMP_core:
10541 _IMP_core.WeightedSphereDistancePairScore_swigregister(WeightedSphereDistancePairScore)
10542 class SoftSpherePairScore(IMP.PairScore):
10543  r"""Proxy of C++ IMP::core::SoftSpherePairScore class."""
10544 
10545  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10546 
10547  def __init__(self, *args):
10548  r"""
10549  __init__(SoftSpherePairScore self, double k, std::string name="SoftSpherePairScore%1%") -> SoftSpherePairScore
10550  __init__(SoftSpherePairScore self) -> SoftSpherePairScore
10551  """
10552  _IMP_core.SoftSpherePairScore_swiginit(self, _IMP_core.new_SoftSpherePairScore(*args))
10553 
10554  def do_get_inputs(self, m, pis):
10555  r"""do_get_inputs(SoftSpherePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10556  return _IMP_core.SoftSpherePairScore_do_get_inputs(self, m, pis)
10557 
10558  def get_score_functor(self, *args):
10559  r"""
10560  get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore
10561  get_score_functor(SoftSpherePairScore self) -> IMP::core::SoftSphereDistanceScore const &
10562  """
10563  return _IMP_core.SoftSpherePairScore_get_score_functor(self, *args)
10564 
10565  def get_k(self):
10566  r"""get_k(SoftSpherePairScore self) -> double"""
10567  return _IMP_core.SoftSpherePairScore_get_k(self)
10568 
10569  def get_version_info(self):
10570  r"""get_version_info(SoftSpherePairScore self) -> VersionInfo"""
10571  return _IMP_core.SoftSpherePairScore_get_version_info(self)
10572  __swig_destroy__ = _IMP_core.delete_SoftSpherePairScore
10573 
10574  def __str__(self):
10575  r"""__str__(SoftSpherePairScore self) -> std::string"""
10576  return _IMP_core.SoftSpherePairScore___str__(self)
10577 
10578  def __repr__(self):
10579  r"""__repr__(SoftSpherePairScore self) -> std::string"""
10580  return _IMP_core.SoftSpherePairScore___repr__(self)
10581 
10582  @staticmethod
10583  def get_from(o):
10584  return _object_cast_to_SoftSpherePairScore(o)
10585 
10586 
10587  def _get_as_binary(self):
10588  r"""_get_as_binary(SoftSpherePairScore self) -> PyObject *"""
10589  return _IMP_core.SoftSpherePairScore__get_as_binary(self)
10590 
10591  def _set_from_binary(self, p):
10592  r"""_set_from_binary(SoftSpherePairScore self, PyObject * p)"""
10593  return _IMP_core.SoftSpherePairScore__set_from_binary(self, p)
10594 
10595  def __getstate__(self):
10596  p = self._get_as_binary()
10597  if len(self.__dict__) > 1:
10598  d = self.__dict__.copy()
10599  del d['this']
10600  p = (d, p)
10601  return p
10602 
10603  def __setstate__(self, p):
10604  if not hasattr(self, 'this'):
10605  self.__init__()
10606  if isinstance(p, tuple):
10607  d, p = p
10608  self.__dict__.update(d)
10609  return self._set_from_binary(p)
10610 
10611 
10612  def _get_jax(self, m, indexes, space):
10613  import jax.numpy as jnp
10614  import jax.lax
10615  def jax_score(jm, k):
10616  xyzs = jm['xyz'][indexes]
10617  rs = jm['r'][indexes]
10618  diff = xyzs[:,0] - xyzs[:,1]
10619  drs = space.distance(diff) - rs.sum(axis=-1)
10620  return 0.5 * k * jax.lax.min(drs, 0.0) ** 2
10621  f = functools.partial(jax_score, k=self.get_k())
10622  return self._wrap_jax(m, f)
10623 
10624 
10625 # Register SoftSpherePairScore in _IMP_core:
10626 _IMP_core.SoftSpherePairScore_swigregister(SoftSpherePairScore)
10627 class SurfaceDistancePairScore(IMP.PairScore):
10628  r"""Proxy of C++ IMP::core::SurfaceDistancePairScore class."""
10629 
10630  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10631 
10632  def __init__(self, *args):
10633  r"""__init__(SurfaceDistancePairScore self, UnaryFunction uf, std::string name="SurfaceDistancePairScore%1%") -> SurfaceDistancePairScore"""
10634  _IMP_core.SurfaceDistancePairScore_swiginit(self, _IMP_core.new_SurfaceDistancePairScore(*args))
10635 
10636  def do_get_inputs(self, m, pis):
10637  r"""do_get_inputs(SurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10638  return _IMP_core.SurfaceDistancePairScore_do_get_inputs(self, m, pis)
10639 
10640  def get_version_info(self):
10641  r"""get_version_info(SurfaceDistancePairScore self) -> VersionInfo"""
10642  return _IMP_core.SurfaceDistancePairScore_get_version_info(self)
10643  __swig_destroy__ = _IMP_core.delete_SurfaceDistancePairScore
10644 
10645  def __str__(self):
10646  r"""__str__(SurfaceDistancePairScore self) -> std::string"""
10647  return _IMP_core.SurfaceDistancePairScore___str__(self)
10648 
10649  def __repr__(self):
10650  r"""__repr__(SurfaceDistancePairScore self) -> std::string"""
10651  return _IMP_core.SurfaceDistancePairScore___repr__(self)
10652 
10653  @staticmethod
10654  def get_from(o):
10655  return _object_cast_to_SurfaceDistancePairScore(o)
10656 
10657 
10658 # Register SurfaceDistancePairScore in _IMP_core:
10659 _IMP_core.SurfaceDistancePairScore_swigregister(SurfaceDistancePairScore)
10660 class SurfaceHeightPairScore(IMP.PairScore):
10661  r"""Proxy of C++ IMP::core::SurfaceHeightPairScore class."""
10662 
10663  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10664 
10665  def __init__(self, *args):
10666  r"""__init__(SurfaceHeightPairScore self, UnaryFunction uf, std::string name="SurfaceHeightPairScore%1%") -> SurfaceHeightPairScore"""
10667  _IMP_core.SurfaceHeightPairScore_swiginit(self, _IMP_core.new_SurfaceHeightPairScore(*args))
10668 
10669  def do_get_inputs(self, m, pis):
10670  r"""do_get_inputs(SurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10671  return _IMP_core.SurfaceHeightPairScore_do_get_inputs(self, m, pis)
10672 
10673  def get_version_info(self):
10674  r"""get_version_info(SurfaceHeightPairScore self) -> VersionInfo"""
10675  return _IMP_core.SurfaceHeightPairScore_get_version_info(self)
10676  __swig_destroy__ = _IMP_core.delete_SurfaceHeightPairScore
10677 
10678  def __str__(self):
10679  r"""__str__(SurfaceHeightPairScore self) -> std::string"""
10680  return _IMP_core.SurfaceHeightPairScore___str__(self)
10681 
10682  def __repr__(self):
10683  r"""__repr__(SurfaceHeightPairScore self) -> std::string"""
10684  return _IMP_core.SurfaceHeightPairScore___repr__(self)
10685 
10686  @staticmethod
10687  def get_from(o):
10688  return _object_cast_to_SurfaceHeightPairScore(o)
10689 
10690 
10691 # Register SurfaceHeightPairScore in _IMP_core:
10692 _IMP_core.SurfaceHeightPairScore_swigregister(SurfaceHeightPairScore)
10693 class SurfaceDepthPairScore(IMP.PairScore):
10694  r"""Proxy of C++ IMP::core::SurfaceDepthPairScore class."""
10695 
10696  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10697 
10698  def __init__(self, *args):
10699  r"""__init__(SurfaceDepthPairScore self, UnaryFunction uf, std::string name="SurfaceDepthPairScore%1%") -> SurfaceDepthPairScore"""
10700  _IMP_core.SurfaceDepthPairScore_swiginit(self, _IMP_core.new_SurfaceDepthPairScore(*args))
10701 
10702  def do_get_inputs(self, m, pis):
10703  r"""do_get_inputs(SurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10704  return _IMP_core.SurfaceDepthPairScore_do_get_inputs(self, m, pis)
10705 
10706  def get_version_info(self):
10707  r"""get_version_info(SurfaceDepthPairScore self) -> VersionInfo"""
10708  return _IMP_core.SurfaceDepthPairScore_get_version_info(self)
10709  __swig_destroy__ = _IMP_core.delete_SurfaceDepthPairScore
10710 
10711  def __str__(self):
10712  r"""__str__(SurfaceDepthPairScore self) -> std::string"""
10713  return _IMP_core.SurfaceDepthPairScore___str__(self)
10714 
10715  def __repr__(self):
10716  r"""__repr__(SurfaceDepthPairScore self) -> std::string"""
10717  return _IMP_core.SurfaceDepthPairScore___repr__(self)
10718 
10719  @staticmethod
10720  def get_from(o):
10721  return _object_cast_to_SurfaceDepthPairScore(o)
10722 
10723 
10724 # Register SurfaceDepthPairScore in _IMP_core:
10725 _IMP_core.SurfaceDepthPairScore_swigregister(SurfaceDepthPairScore)
10726 class HarmonicSurfaceDistancePairScore(IMP.PairScore):
10727  r"""Proxy of C++ IMP::core::HarmonicSurfaceDistancePairScore class."""
10728 
10729  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10730 
10731  def __init__(self, *args):
10732  r"""__init__(HarmonicSurfaceDistancePairScore self, double x0, double k, std::string name="HarmonicSurfaceDistancePairScore%1%") -> HarmonicSurfaceDistancePairScore"""
10733  _IMP_core.HarmonicSurfaceDistancePairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDistancePairScore(*args))
10734 
10735  def do_get_inputs(self, m, pis):
10736  r"""do_get_inputs(HarmonicSurfaceDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10737  return _IMP_core.HarmonicSurfaceDistancePairScore_do_get_inputs(self, m, pis)
10738 
10739  def get_version_info(self):
10740  r"""get_version_info(HarmonicSurfaceDistancePairScore self) -> VersionInfo"""
10741  return _IMP_core.HarmonicSurfaceDistancePairScore_get_version_info(self)
10742  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDistancePairScore
10743 
10744  def __str__(self):
10745  r"""__str__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10746  return _IMP_core.HarmonicSurfaceDistancePairScore___str__(self)
10747 
10748  def __repr__(self):
10749  r"""__repr__(HarmonicSurfaceDistancePairScore self) -> std::string"""
10750  return _IMP_core.HarmonicSurfaceDistancePairScore___repr__(self)
10751 
10752  @staticmethod
10753  def get_from(o):
10754  return _object_cast_to_HarmonicSurfaceDistancePairScore(o)
10755 
10756 
10757 # Register HarmonicSurfaceDistancePairScore in _IMP_core:
10758 _IMP_core.HarmonicSurfaceDistancePairScore_swigregister(HarmonicSurfaceDistancePairScore)
10759 class HarmonicSurfaceHeightPairScore(IMP.PairScore):
10760  r"""Proxy of C++ IMP::core::HarmonicSurfaceHeightPairScore class."""
10761 
10762  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10763 
10764  def __init__(self, *args):
10765  r"""__init__(HarmonicSurfaceHeightPairScore self, double x0, double k, std::string name="HarmonicSurfaceHeightPairScore%1%") -> HarmonicSurfaceHeightPairScore"""
10766  _IMP_core.HarmonicSurfaceHeightPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceHeightPairScore(*args))
10767 
10768  def do_get_inputs(self, m, pis):
10769  r"""do_get_inputs(HarmonicSurfaceHeightPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10770  return _IMP_core.HarmonicSurfaceHeightPairScore_do_get_inputs(self, m, pis)
10771 
10772  def get_version_info(self):
10773  r"""get_version_info(HarmonicSurfaceHeightPairScore self) -> VersionInfo"""
10774  return _IMP_core.HarmonicSurfaceHeightPairScore_get_version_info(self)
10775  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceHeightPairScore
10776 
10777  def __str__(self):
10778  r"""__str__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10779  return _IMP_core.HarmonicSurfaceHeightPairScore___str__(self)
10780 
10781  def __repr__(self):
10782  r"""__repr__(HarmonicSurfaceHeightPairScore self) -> std::string"""
10783  return _IMP_core.HarmonicSurfaceHeightPairScore___repr__(self)
10784 
10785  @staticmethod
10786  def get_from(o):
10787  return _object_cast_to_HarmonicSurfaceHeightPairScore(o)
10788 
10789 
10790 # Register HarmonicSurfaceHeightPairScore in _IMP_core:
10791 _IMP_core.HarmonicSurfaceHeightPairScore_swigregister(HarmonicSurfaceHeightPairScore)
10792 class HarmonicSurfaceDepthPairScore(IMP.PairScore):
10793  r"""Proxy of C++ IMP::core::HarmonicSurfaceDepthPairScore class."""
10794 
10795  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10796 
10797  def __init__(self, *args):
10798  r"""__init__(HarmonicSurfaceDepthPairScore self, double x0, double k, std::string name="HarmonicSurfaceDepthPairScore%1%") -> HarmonicSurfaceDepthPairScore"""
10799  _IMP_core.HarmonicSurfaceDepthPairScore_swiginit(self, _IMP_core.new_HarmonicSurfaceDepthPairScore(*args))
10800 
10801  def do_get_inputs(self, m, pis):
10802  r"""do_get_inputs(HarmonicSurfaceDepthPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10803  return _IMP_core.HarmonicSurfaceDepthPairScore_do_get_inputs(self, m, pis)
10804 
10805  def get_version_info(self):
10806  r"""get_version_info(HarmonicSurfaceDepthPairScore self) -> VersionInfo"""
10807  return _IMP_core.HarmonicSurfaceDepthPairScore_get_version_info(self)
10808  __swig_destroy__ = _IMP_core.delete_HarmonicSurfaceDepthPairScore
10809 
10810  def __str__(self):
10811  r"""__str__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10812  return _IMP_core.HarmonicSurfaceDepthPairScore___str__(self)
10813 
10814  def __repr__(self):
10815  r"""__repr__(HarmonicSurfaceDepthPairScore self) -> std::string"""
10816  return _IMP_core.HarmonicSurfaceDepthPairScore___repr__(self)
10817 
10818  @staticmethod
10819  def get_from(o):
10820  return _object_cast_to_HarmonicSurfaceDepthPairScore(o)
10821 
10822 
10823 # Register HarmonicSurfaceDepthPairScore in _IMP_core:
10824 _IMP_core.HarmonicSurfaceDepthPairScore_swigregister(HarmonicSurfaceDepthPairScore)
10825 class SoftSuperSurfacePairScore(IMP.PairScore):
10826  r"""Proxy of C++ IMP::core::SoftSuperSurfacePairScore class."""
10827 
10828  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10829 
10830  def __init__(self, *args):
10831  r"""__init__(SoftSuperSurfacePairScore self, double k, std::string name="SoftSuperSurfacePairScore%1%") -> SoftSuperSurfacePairScore"""
10832  _IMP_core.SoftSuperSurfacePairScore_swiginit(self, _IMP_core.new_SoftSuperSurfacePairScore(*args))
10833 
10834  def do_get_inputs(self, m, pis):
10835  r"""do_get_inputs(SoftSuperSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10836  return _IMP_core.SoftSuperSurfacePairScore_do_get_inputs(self, m, pis)
10837 
10838  def get_version_info(self):
10839  r"""get_version_info(SoftSuperSurfacePairScore self) -> VersionInfo"""
10840  return _IMP_core.SoftSuperSurfacePairScore_get_version_info(self)
10841  __swig_destroy__ = _IMP_core.delete_SoftSuperSurfacePairScore
10842 
10843  def __str__(self):
10844  r"""__str__(SoftSuperSurfacePairScore self) -> std::string"""
10845  return _IMP_core.SoftSuperSurfacePairScore___str__(self)
10846 
10847  def __repr__(self):
10848  r"""__repr__(SoftSuperSurfacePairScore self) -> std::string"""
10849  return _IMP_core.SoftSuperSurfacePairScore___repr__(self)
10850 
10851  @staticmethod
10852  def get_from(o):
10853  return _object_cast_to_SoftSuperSurfacePairScore(o)
10854 
10855 
10856 # Register SoftSuperSurfacePairScore in _IMP_core:
10857 _IMP_core.SoftSuperSurfacePairScore_swigregister(SoftSuperSurfacePairScore)
10858 class SoftSubSurfacePairScore(IMP.PairScore):
10859  r"""Proxy of C++ IMP::core::SoftSubSurfacePairScore class."""
10860 
10861  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10862 
10863  def __init__(self, *args):
10864  r"""__init__(SoftSubSurfacePairScore self, double k, std::string name="SoftSubSurfacePairScore%1%") -> SoftSubSurfacePairScore"""
10865  _IMP_core.SoftSubSurfacePairScore_swiginit(self, _IMP_core.new_SoftSubSurfacePairScore(*args))
10866 
10867  def do_get_inputs(self, m, pis):
10868  r"""do_get_inputs(SoftSubSurfacePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
10869  return _IMP_core.SoftSubSurfacePairScore_do_get_inputs(self, m, pis)
10870 
10871  def get_version_info(self):
10872  r"""get_version_info(SoftSubSurfacePairScore self) -> VersionInfo"""
10873  return _IMP_core.SoftSubSurfacePairScore_get_version_info(self)
10874  __swig_destroy__ = _IMP_core.delete_SoftSubSurfacePairScore
10875 
10876  def __str__(self):
10877  r"""__str__(SoftSubSurfacePairScore self) -> std::string"""
10878  return _IMP_core.SoftSubSurfacePairScore___str__(self)
10879 
10880  def __repr__(self):
10881  r"""__repr__(SoftSubSurfacePairScore self) -> std::string"""
10882  return _IMP_core.SoftSubSurfacePairScore___repr__(self)
10883 
10884  @staticmethod
10885  def get_from(o):
10886  return _object_cast_to_SoftSubSurfacePairScore(o)
10887 
10888 
10889 # Register SoftSubSurfacePairScore in _IMP_core:
10890 _IMP_core.SoftSubSurfacePairScore_swigregister(SoftSubSurfacePairScore)
10891 class SurfaceTetheredChain(IMP.UnaryFunction):
10892  r"""Proxy of C++ IMP::core::SurfaceTetheredChain class."""
10893 
10894  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10895 
10896  def __init__(self, link_num, link_length):
10897  r"""__init__(SurfaceTetheredChain self, int link_num, double link_length) -> SurfaceTetheredChain"""
10898  _IMP_core.SurfaceTetheredChain_swiginit(self, _IMP_core.new_SurfaceTetheredChain(link_num, link_length))
10899 
10900  def get_version_info(self):
10901  r"""get_version_info(SurfaceTetheredChain self) -> VersionInfo"""
10902  return _IMP_core.SurfaceTetheredChain_get_version_info(self)
10903  __swig_destroy__ = _IMP_core.delete_SurfaceTetheredChain
10904 
10905  def get_link_number(self):
10906  r"""get_link_number(SurfaceTetheredChain self) -> int"""
10907  return _IMP_core.SurfaceTetheredChain_get_link_number(self)
10908 
10909  def get_link_length(self):
10910  r"""get_link_length(SurfaceTetheredChain self) -> double"""
10911  return _IMP_core.SurfaceTetheredChain_get_link_length(self)
10912 
10913  def set_link_number(self, N):
10914  r"""set_link_number(SurfaceTetheredChain self, int N)"""
10915  return _IMP_core.SurfaceTetheredChain_set_link_number(self, N)
10916 
10917  def set_link_length(self, b):
10918  r"""set_link_length(SurfaceTetheredChain self, double b)"""
10919  return _IMP_core.SurfaceTetheredChain_set_link_length(self, b)
10920 
10921  def get_distance_at_minimum(self):
10922  r"""get_distance_at_minimum(SurfaceTetheredChain self) -> double"""
10923  return _IMP_core.SurfaceTetheredChain_get_distance_at_minimum(self)
10924 
10925  def get_average_distance(self):
10926  r"""get_average_distance(SurfaceTetheredChain self) -> double"""
10927  return _IMP_core.SurfaceTetheredChain_get_average_distance(self)
10928 
10929  def __str__(self):
10930  r"""__str__(SurfaceTetheredChain self) -> std::string"""
10931  return _IMP_core.SurfaceTetheredChain___str__(self)
10932 
10933  def __repr__(self):
10934  r"""__repr__(SurfaceTetheredChain self) -> std::string"""
10935  return _IMP_core.SurfaceTetheredChain___repr__(self)
10936 
10937  @staticmethod
10938  def get_from(o):
10939  return _object_cast_to_SurfaceTetheredChain(o)
10940 
10941 
10942 # Register SurfaceTetheredChain in _IMP_core:
10943 _IMP_core.SurfaceTetheredChain_swigregister(SurfaceTetheredChain)
10944 class SurfaceSymmetryConstraint(IMP.Constraint):
10945  r"""Proxy of C++ IMP::core::SurfaceSymmetryConstraint class."""
10946 
10947  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10948 
10949  def __init__(self, m, ss, rbs):
10950  r"""__init__(SurfaceSymmetryConstraint self, Model m, IMP::ParticleIndexPair const & ss, IMP::ParticleIndexPair const & rbs) -> SurfaceSymmetryConstraint"""
10951  _IMP_core.SurfaceSymmetryConstraint_swiginit(self, _IMP_core.new_SurfaceSymmetryConstraint(m, ss, rbs))
10952 
10953  def do_get_inputs(self):
10954  r"""do_get_inputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
10955  return _IMP_core.SurfaceSymmetryConstraint_do_get_inputs(self)
10956 
10957  def do_get_outputs(self):
10958  r"""do_get_outputs(SurfaceSymmetryConstraint self) -> IMP::ModelObjectsTemp"""
10959  return _IMP_core.SurfaceSymmetryConstraint_do_get_outputs(self)
10960 
10961  def get_version_info(self):
10962  r"""get_version_info(SurfaceSymmetryConstraint self) -> VersionInfo"""
10963  return _IMP_core.SurfaceSymmetryConstraint_get_version_info(self)
10964  __swig_destroy__ = _IMP_core.delete_SurfaceSymmetryConstraint
10965 
10966  def __str__(self):
10967  r"""__str__(SurfaceSymmetryConstraint self) -> std::string"""
10968  return _IMP_core.SurfaceSymmetryConstraint___str__(self)
10969 
10970  def __repr__(self):
10971  r"""__repr__(SurfaceSymmetryConstraint self) -> std::string"""
10972  return _IMP_core.SurfaceSymmetryConstraint___repr__(self)
10973 
10974  @staticmethod
10975  def get_from(o):
10976  return _object_cast_to_SurfaceSymmetryConstraint(o)
10977 
10978 
10979 # Register SurfaceSymmetryConstraint in _IMP_core:
10980 _IMP_core.SurfaceSymmetryConstraint_swigregister(SurfaceSymmetryConstraint)
10981 class SteepestDescent(IMP.AttributeOptimizer):
10982  r"""Proxy of C++ IMP::core::SteepestDescent class."""
10983 
10984  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10985 
10986  def __init__(self, *args):
10987  r"""__init__(SteepestDescent self, Model m, std::string name="SteepestDescent%1%") -> SteepestDescent"""
10988  _IMP_core.SteepestDescent_swiginit(self, _IMP_core.new_SteepestDescent(*args))
10989 
10990  def do_optimize(self, max_steps):
10991  r"""do_optimize(SteepestDescent self, unsigned int max_steps) -> IMP::Float"""
10992  return _IMP_core.SteepestDescent_do_optimize(self, max_steps)
10993 
10994  def get_version_info(self):
10995  r"""get_version_info(SteepestDescent self) -> VersionInfo"""
10996  return _IMP_core.SteepestDescent_get_version_info(self)
10997  __swig_destroy__ = _IMP_core.delete_SteepestDescent
10998 
10999  def set_threshold(self, t):
11000  r"""set_threshold(SteepestDescent self, IMP::Float t)"""
11001  return _IMP_core.SteepestDescent_set_threshold(self, t)
11002 
11003  def set_step_size(self, t):
11004  r"""set_step_size(SteepestDescent self, IMP::Float t)"""
11005  return _IMP_core.SteepestDescent_set_step_size(self, t)
11006 
11007  def set_maximum_step_size(self, t):
11008  r"""set_maximum_step_size(SteepestDescent self, IMP::Float t)"""
11009  return _IMP_core.SteepestDescent_set_maximum_step_size(self, t)
11010 
11011  def __str__(self):
11012  r"""__str__(SteepestDescent self) -> std::string"""
11013  return _IMP_core.SteepestDescent___str__(self)
11014 
11015  def __repr__(self):
11016  r"""__repr__(SteepestDescent self) -> std::string"""
11017  return _IMP_core.SteepestDescent___repr__(self)
11018 
11019  @staticmethod
11020  def get_from(o):
11021  return _object_cast_to_SteepestDescent(o)
11022 
11023 
11024 # Register SteepestDescent in _IMP_core:
11025 _IMP_core.SteepestDescent_swigregister(SteepestDescent)
11026 class TransformedDistancePairScore(IMP.PairScore):
11027  r"""Proxy of C++ IMP::core::TransformedDistancePairScore class."""
11028 
11029  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11030 
11031  def __init__(self, f, transformation):
11032  r"""__init__(TransformedDistancePairScore self, UnaryFunction f, Transformation3D transformation) -> TransformedDistancePairScore"""
11033  _IMP_core.TransformedDistancePairScore_swiginit(self, _IMP_core.new_TransformedDistancePairScore(f, transformation))
11034 
11035  def set_transformation(self, rot):
11036  r"""set_transformation(TransformedDistancePairScore self, Transformation3D rot)"""
11037  return _IMP_core.TransformedDistancePairScore_set_transformation(self, rot)
11038 
11039  def do_get_inputs(self, m, pis):
11040  r"""do_get_inputs(TransformedDistancePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11041  return _IMP_core.TransformedDistancePairScore_do_get_inputs(self, m, pis)
11042 
11043  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11044  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"""
11045  return _IMP_core.TransformedDistancePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11046 
11047  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11048  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"""
11049  return _IMP_core.TransformedDistancePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11050 
11051  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11052  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"""
11053  return _IMP_core.TransformedDistancePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11054 
11055  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11056  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"""
11057  return _IMP_core.TransformedDistancePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11058 
11059  def get_version_info(self):
11060  r"""get_version_info(TransformedDistancePairScore self) -> VersionInfo"""
11061  return _IMP_core.TransformedDistancePairScore_get_version_info(self)
11062  __swig_destroy__ = _IMP_core.delete_TransformedDistancePairScore
11063 
11064  def __str__(self):
11065  r"""__str__(TransformedDistancePairScore self) -> std::string"""
11066  return _IMP_core.TransformedDistancePairScore___str__(self)
11067 
11068  def __repr__(self):
11069  r"""__repr__(TransformedDistancePairScore self) -> std::string"""
11070  return _IMP_core.TransformedDistancePairScore___repr__(self)
11071 
11072  @staticmethod
11073  def get_from(o):
11074  return _object_cast_to_TransformedDistancePairScore(o)
11075 
11076 
11077 # Register TransformedDistancePairScore in _IMP_core:
11078 _IMP_core.TransformedDistancePairScore_swigregister(TransformedDistancePairScore)
11079 class TypedPairScore(IMP.PairScore):
11080  r"""Proxy of C++ IMP::core::TypedPairScore class."""
11081 
11082  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11083 
11084  def __init__(self, typekey, allow_invalid_types=True):
11085  r"""__init__(TypedPairScore self, IntKey typekey, bool allow_invalid_types=True) -> TypedPairScore"""
11086  _IMP_core.TypedPairScore_swiginit(self, _IMP_core.new_TypedPairScore(typekey, allow_invalid_types))
11087 
11088  def set_particle_type(self, arg2):
11089  r"""set_particle_type(TypedPairScore self, Particle arg2)"""
11090  return _IMP_core.TypedPairScore_set_particle_type(self, arg2)
11091 
11092  def set_pair_score(self, ps, atype, btype):
11093  r"""set_pair_score(TypedPairScore self, PairScore ps, IMP::Int atype, IMP::Int btype)"""
11094  return _IMP_core.TypedPairScore_set_pair_score(self, ps, atype, btype)
11095 
11096  def do_get_inputs(self, m, pis):
11097  r"""do_get_inputs(TypedPairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11098  return _IMP_core.TypedPairScore_do_get_inputs(self, m, pis)
11099 
11100  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11101  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"""
11102  return _IMP_core.TypedPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11103 
11104  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11105  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"""
11106  return _IMP_core.TypedPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11107 
11108  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11109  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"""
11110  return _IMP_core.TypedPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11111 
11112  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11113  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"""
11114  return _IMP_core.TypedPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11115 
11116  def get_version_info(self):
11117  r"""get_version_info(TypedPairScore self) -> VersionInfo"""
11118  return _IMP_core.TypedPairScore_get_version_info(self)
11119  __swig_destroy__ = _IMP_core.delete_TypedPairScore
11120 
11121  def __str__(self):
11122  r"""__str__(TypedPairScore self) -> std::string"""
11123  return _IMP_core.TypedPairScore___str__(self)
11124 
11125  def __repr__(self):
11126  r"""__repr__(TypedPairScore self) -> std::string"""
11127  return _IMP_core.TypedPairScore___repr__(self)
11128 
11129  @staticmethod
11130  def get_from(o):
11131  return _object_cast_to_TypedPairScore(o)
11132 
11133 
11134 # Register TypedPairScore in _IMP_core:
11135 _IMP_core.TypedPairScore_swigregister(TypedPairScore)
11136 class RigidBodyDistancePairScore(KClosePairsPairScore):
11137  r"""Proxy of C++ IMP::core::RigidBodyDistancePairScore class."""
11138 
11139  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11140 
11141  def __init__(self, ps, r):
11142  r"""__init__(RigidBodyDistancePairScore self, PairScore ps, Refiner r) -> RigidBodyDistancePairScore"""
11143  _IMP_core.RigidBodyDistancePairScore_swiginit(self, _IMP_core.new_RigidBodyDistancePairScore(ps, r))
11144 
11145  def __str__(self):
11146  r"""__str__(RigidBodyDistancePairScore self) -> std::string"""
11147  return _IMP_core.RigidBodyDistancePairScore___str__(self)
11148 
11149  def __repr__(self):
11150  r"""__repr__(RigidBodyDistancePairScore self) -> std::string"""
11151  return _IMP_core.RigidBodyDistancePairScore___repr__(self)
11152 
11153  @staticmethod
11154  def get_from(o):
11155  return _object_cast_to_RigidBodyDistancePairScore(o)
11156 
11157  __swig_destroy__ = _IMP_core.delete_RigidBodyDistancePairScore
11158 
11159 # Register RigidBodyDistancePairScore in _IMP_core:
11160 _IMP_core.RigidBodyDistancePairScore_swigregister(RigidBodyDistancePairScore)
11161 class RigidBodyAnglePairScore(IMP.PairScore):
11162  r"""Proxy of C++ IMP::core::RigidBodyAnglePairScore class."""
11163 
11164  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11165 
11166  def __init__(self, f):
11167  r"""__init__(RigidBodyAnglePairScore self, UnaryFunction f) -> RigidBodyAnglePairScore"""
11168  _IMP_core.RigidBodyAnglePairScore_swiginit(self, _IMP_core.new_RigidBodyAnglePairScore(f))
11169 
11170  def do_get_inputs(self, m, pis):
11171  r"""do_get_inputs(RigidBodyAnglePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11172  return _IMP_core.RigidBodyAnglePairScore_do_get_inputs(self, m, pis)
11173 
11174  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
11175  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"""
11176  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
11177 
11178  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
11179  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"""
11180  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
11181 
11182  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
11183  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"""
11184  return _IMP_core.RigidBodyAnglePairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
11185 
11186  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
11187  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"""
11188  return _IMP_core.RigidBodyAnglePairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
11189 
11190  def get_version_info(self):
11191  r"""get_version_info(RigidBodyAnglePairScore self) -> VersionInfo"""
11192  return _IMP_core.RigidBodyAnglePairScore_get_version_info(self)
11193  __swig_destroy__ = _IMP_core.delete_RigidBodyAnglePairScore
11194 
11195  def __str__(self):
11196  r"""__str__(RigidBodyAnglePairScore self) -> std::string"""
11197  return _IMP_core.RigidBodyAnglePairScore___str__(self)
11198 
11199  def __repr__(self):
11200  r"""__repr__(RigidBodyAnglePairScore self) -> std::string"""
11201  return _IMP_core.RigidBodyAnglePairScore___repr__(self)
11202 
11203  @staticmethod
11204  def get_from(o):
11205  return _object_cast_to_RigidBodyAnglePairScore(o)
11206 
11207 
11208 # Register RigidBodyAnglePairScore in _IMP_core:
11209 _IMP_core.RigidBodyAnglePairScore_swigregister(RigidBodyAnglePairScore)
11210 class TableRefiner(IMP.Refiner):
11211  r"""Proxy of C++ IMP::core::TableRefiner class."""
11212 
11213  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11214 
11215  def __init__(self):
11216  r"""__init__(TableRefiner self) -> TableRefiner"""
11217  _IMP_core.TableRefiner_swiginit(self, _IMP_core.new_TableRefiner())
11218 
11219  def add_particle(self, p, ps):
11220  r"""add_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11221  return _IMP_core.TableRefiner_add_particle(self, p, ps)
11222 
11223  def remove_particle(self, p):
11224  r"""remove_particle(TableRefiner self, Particle p)"""
11225  return _IMP_core.TableRefiner_remove_particle(self, p)
11226 
11227  def set_particle(self, p, ps):
11228  r"""set_particle(TableRefiner self, Particle p, IMP::ParticlesTemp const & ps)"""
11229  return _IMP_core.TableRefiner_set_particle(self, p, ps)
11230 
11231  def do_get_inputs(self, m, pis):
11232  r"""do_get_inputs(TableRefiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
11233  return _IMP_core.TableRefiner_do_get_inputs(self, m, pis)
11234 
11235  def get_version_info(self):
11236  r"""get_version_info(TableRefiner self) -> VersionInfo"""
11237  return _IMP_core.TableRefiner_get_version_info(self)
11238  __swig_destroy__ = _IMP_core.delete_TableRefiner
11239 
11240  def __str__(self):
11241  r"""__str__(TableRefiner self) -> std::string"""
11242  return _IMP_core.TableRefiner___str__(self)
11243 
11244  def __repr__(self):
11245  r"""__repr__(TableRefiner self) -> std::string"""
11246  return _IMP_core.TableRefiner___repr__(self)
11247 
11248  @staticmethod
11249  def get_from(o):
11250  return _object_cast_to_TableRefiner(o)
11251 
11252 
11253 # Register TableRefiner in _IMP_core:
11254 _IMP_core.TableRefiner_swigregister(TableRefiner)
11255 LOWER = _IMP_core.LOWER
11256 
11257 BOTH = _IMP_core.BOTH
11258 
11259 UPPER = _IMP_core.UPPER
11260 
11261 class MCCGSampler(IMP.Sampler):
11262  r"""Proxy of C++ IMP::core::MCCGSampler class."""
11263 
11264  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11265 
11266  def __init__(self, *args):
11267  r"""__init__(MCCGSampler self, Model m, std::string name="MCCG Sampler %1%") -> MCCGSampler"""
11268  _IMP_core.MCCGSampler_swiginit(self, _IMP_core.new_MCCGSampler(*args))
11269 
11270  def set_bounding_box(self, bb):
11271  r"""set_bounding_box(MCCGSampler self, BoundingBox3D bb)"""
11272  return _IMP_core.MCCGSampler_set_bounding_box(self, bb)
11273 
11274  def set_number_of_attempts(self, att):
11275  r"""set_number_of_attempts(MCCGSampler self, unsigned int att)"""
11276  return _IMP_core.MCCGSampler_set_number_of_attempts(self, att)
11277 
11278  def set_number_of_monte_carlo_steps(self, cg):
11279  r"""set_number_of_monte_carlo_steps(MCCGSampler self, unsigned int cg)"""
11280  return _IMP_core.MCCGSampler_set_number_of_monte_carlo_steps(self, cg)
11281 
11282  def set_number_of_conjugate_gradient_steps(self, cg):
11283  r"""set_number_of_conjugate_gradient_steps(MCCGSampler self, unsigned int cg)"""
11284  return _IMP_core.MCCGSampler_set_number_of_conjugate_gradient_steps(self, cg)
11285 
11286  def set_max_monte_carlo_step_size(self, *args):
11287  r"""
11288  set_max_monte_carlo_step_size(MCCGSampler self, double d)
11289  set_max_monte_carlo_step_size(MCCGSampler self, FloatKey k, double d)
11290  """
11291  return _IMP_core.MCCGSampler_set_max_monte_carlo_step_size(self, *args)
11292 
11293  def set_is_refining(self, tf):
11294  r"""set_is_refining(MCCGSampler self, bool tf)"""
11295  return _IMP_core.MCCGSampler_set_is_refining(self, tf)
11296 
11297  def set_local_optimizer(self, opt):
11298  r"""set_local_optimizer(MCCGSampler self, Optimizer opt)"""
11299  return _IMP_core.MCCGSampler_set_local_optimizer(self, opt)
11300 
11301  def set_save_rejected_configurations(self, tf):
11302  r"""set_save_rejected_configurations(MCCGSampler self, bool tf)"""
11303  return _IMP_core.MCCGSampler_set_save_rejected_configurations(self, tf)
11304 
11305  def get_rejected_configurations(self):
11306  r"""get_rejected_configurations(MCCGSampler self) -> ConfigurationSet"""
11307  return _IMP_core.MCCGSampler_get_rejected_configurations(self)
11308  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)
11309  def __set_optimizer_states(self, obj): IMP._list_util.set_varlist(self.optimizer_states, obj)
11310  def __del_optimizer_states(self): IMP._list_util.del_varlist(self.optimizer_states)
11311  optimizer_states = property(__get_optimizer_states, __set_optimizer_states, __del_optimizer_states, doc="List of ##ucnames")
11312 
11313  def remove_optimizer_state(self, d):
11314  r"""remove_optimizer_state(MCCGSampler self, OptimizerState d)"""
11315  return _IMP_core.MCCGSampler_remove_optimizer_state(self, d)
11316 
11317  def _python_index_optimizer_state(self, d, start, stop):
11318  r"""_python_index_optimizer_state(MCCGSampler self, OptimizerState d, unsigned int start, unsigned int stop) -> unsigned int"""
11319  return _IMP_core.MCCGSampler__python_index_optimizer_state(self, d, start, stop)
11320 
11321  def remove_optimizer_states(self, d):
11322  r"""remove_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & d)"""
11323  return _IMP_core.MCCGSampler_remove_optimizer_states(self, d)
11324 
11325  def set_optimizer_states(self, ps):
11326  r"""set_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & ps)"""
11327  return _IMP_core.MCCGSampler_set_optimizer_states(self, ps)
11328 
11329  def set_optimizer_states_order(self, objs):
11330  r"""set_optimizer_states_order(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11331  return _IMP_core.MCCGSampler_set_optimizer_states_order(self, objs)
11332 
11333  def add_optimizer_state(self, obj):
11334  r"""add_optimizer_state(MCCGSampler self, OptimizerState obj) -> unsigned int"""
11335  return _IMP_core.MCCGSampler_add_optimizer_state(self, obj)
11336 
11337  def add_optimizer_states(self, objs):
11338  r"""add_optimizer_states(MCCGSampler self, IMP::OptimizerStates const & objs)"""
11339  return _IMP_core.MCCGSampler_add_optimizer_states(self, objs)
11340 
11341  def clear_optimizer_states(self):
11342  r"""clear_optimizer_states(MCCGSampler self)"""
11343  return _IMP_core.MCCGSampler_clear_optimizer_states(self)
11344 
11345  def get_number_of_optimizer_states(self):
11346  r"""get_number_of_optimizer_states(MCCGSampler self) -> unsigned int"""
11347  return _IMP_core.MCCGSampler_get_number_of_optimizer_states(self)
11348 
11349  def get_has_optimizer_states(self):
11350  r"""get_has_optimizer_states(MCCGSampler self) -> bool"""
11351  return _IMP_core.MCCGSampler_get_has_optimizer_states(self)
11352 
11353  def get_optimizer_state(self, i):
11354  r"""get_optimizer_state(MCCGSampler self, unsigned int i) -> OptimizerState"""
11355  return _IMP_core.MCCGSampler_get_optimizer_state(self, i)
11356 
11357  def get_optimizer_states(self):
11358  r"""get_optimizer_states(MCCGSampler self) -> IMP::OptimizerStates"""
11359  return _IMP_core.MCCGSampler_get_optimizer_states(self)
11360 
11361  def erase_optimizer_state(self, i):
11362  r"""erase_optimizer_state(MCCGSampler self, unsigned int i)"""
11363  return _IMP_core.MCCGSampler_erase_optimizer_state(self, i)
11364 
11365  def reserve_optimizer_states(self, sz):
11366  r"""reserve_optimizer_states(MCCGSampler self, unsigned int sz)"""
11367  return _IMP_core.MCCGSampler_reserve_optimizer_states(self, sz)
11368 
11369  def do_sample(self):
11370  r"""do_sample(MCCGSampler self) -> ConfigurationSet"""
11371  return _IMP_core.MCCGSampler_do_sample(self)
11372 
11373  def get_version_info(self):
11374  r"""get_version_info(MCCGSampler self) -> VersionInfo"""
11375  return _IMP_core.MCCGSampler_get_version_info(self)
11376  __swig_destroy__ = _IMP_core.delete_MCCGSampler
11377 
11378  def __str__(self):
11379  r"""__str__(MCCGSampler self) -> std::string"""
11380  return _IMP_core.MCCGSampler___str__(self)
11381 
11382  def __repr__(self):
11383  r"""__repr__(MCCGSampler self) -> std::string"""
11384  return _IMP_core.MCCGSampler___repr__(self)
11385 
11386  @staticmethod
11387  def get_from(o):
11388  return _object_cast_to_MCCGSampler(o)
11389 
11390 
11391 # Register MCCGSampler in _IMP_core:
11392 _IMP_core.MCCGSampler_swigregister(MCCGSampler)
11393 class MinimumRestraint(IMP.Restraint):
11394  r"""Proxy of C++ IMP::core::MinimumRestraint class."""
11395 
11396  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11397 
11398  def __init__(self, *args):
11399  r"""__init__(MinimumRestraint self, unsigned int num, IMP::Restraints const & rs=IMP::Restraints(), std::string name="MinimumRestraint %1%") -> MinimumRestraint"""
11400  _IMP_core.MinimumRestraint_swiginit(self, _IMP_core.new_MinimumRestraint(*args))
11401 
11402  def do_get_inputs(self):
11403  r"""do_get_inputs(MinimumRestraint self) -> IMP::ModelObjectsTemp"""
11404  return _IMP_core.MinimumRestraint_do_get_inputs(self)
11405 
11406  def get_version_info(self):
11407  r"""get_version_info(MinimumRestraint self) -> VersionInfo"""
11408  return _IMP_core.MinimumRestraint_get_version_info(self)
11409  __swig_destroy__ = _IMP_core.delete_MinimumRestraint
11410  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)
11411  def __set_restraints(self, obj): IMP._list_util.set_varlist(self.restraints, obj)
11412  def __del_restraints(self): IMP._list_util.del_varlist(self.restraints)
11413  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##ucnames")
11414 
11415  def remove_restraint(self, d):
11416  r"""remove_restraint(MinimumRestraint self, Restraint d)"""
11417  return _IMP_core.MinimumRestraint_remove_restraint(self, d)
11418 
11419  def _python_index_restraint(self, d, start, stop):
11420  r"""_python_index_restraint(MinimumRestraint self, Restraint d, unsigned int start, unsigned int stop) -> unsigned int"""
11421  return _IMP_core.MinimumRestraint__python_index_restraint(self, d, start, stop)
11422 
11423  def remove_restraints(self, d):
11424  r"""remove_restraints(MinimumRestraint self, IMP::Restraints const & d)"""
11425  return _IMP_core.MinimumRestraint_remove_restraints(self, d)
11426 
11427  def set_restraints(self, ps):
11428  r"""set_restraints(MinimumRestraint self, IMP::Restraints const & ps)"""
11429  return _IMP_core.MinimumRestraint_set_restraints(self, ps)
11430 
11431  def set_restraints_order(self, objs):
11432  r"""set_restraints_order(MinimumRestraint self, IMP::Restraints const & objs)"""
11433  return _IMP_core.MinimumRestraint_set_restraints_order(self, objs)
11434 
11435  def add_restraint(self, obj):
11436  r"""add_restraint(MinimumRestraint self, Restraint obj) -> unsigned int"""
11437  return _IMP_core.MinimumRestraint_add_restraint(self, obj)
11438 
11439  def add_restraints(self, objs):
11440  r"""add_restraints(MinimumRestraint self, IMP::Restraints const & objs)"""
11441  return _IMP_core.MinimumRestraint_add_restraints(self, objs)
11442 
11443  def clear_restraints(self):
11444  r"""clear_restraints(MinimumRestraint self)"""
11445  return _IMP_core.MinimumRestraint_clear_restraints(self)
11446 
11447  def get_number_of_restraints(self):
11448  r"""get_number_of_restraints(MinimumRestraint self) -> unsigned int"""
11449  return _IMP_core.MinimumRestraint_get_number_of_restraints(self)
11450 
11451  def get_has_restraints(self):
11452  r"""get_has_restraints(MinimumRestraint self) -> bool"""
11453  return _IMP_core.MinimumRestraint_get_has_restraints(self)
11454 
11455  def get_restraint(self, i):
11456  r"""get_restraint(MinimumRestraint self, unsigned int i) -> Restraint"""
11457  return _IMP_core.MinimumRestraint_get_restraint(self, i)
11458 
11459  def get_restraints(self):
11460  r"""get_restraints(MinimumRestraint self) -> IMP::Restraints"""
11461  return _IMP_core.MinimumRestraint_get_restraints(self)
11462 
11463  def erase_restraint(self, i):
11464  r"""erase_restraint(MinimumRestraint self, unsigned int i)"""
11465  return _IMP_core.MinimumRestraint_erase_restraint(self, i)
11466 
11467  def reserve_restraints(self, sz):
11468  r"""reserve_restraints(MinimumRestraint self, unsigned int sz)"""
11469  return _IMP_core.MinimumRestraint_reserve_restraints(self, sz)
11470 
11471  def __str__(self):
11472  r"""__str__(MinimumRestraint self) -> std::string"""
11473  return _IMP_core.MinimumRestraint___str__(self)
11474 
11475  def __repr__(self):
11476  r"""__repr__(MinimumRestraint self) -> std::string"""
11477  return _IMP_core.MinimumRestraint___repr__(self)
11478 
11479  @staticmethod
11480  def get_from(o):
11481  return _object_cast_to_MinimumRestraint(o)
11482 
11483 
11484 # Register MinimumRestraint in _IMP_core:
11485 _IMP_core.MinimumRestraint_swigregister(MinimumRestraint)
11486 class Gaussian(RigidBody):
11487  r"""Proxy of C++ IMP::core::Gaussian class."""
11488 
11489  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11490 
11491  def __init__(self, *args):
11492  r"""
11493  __init__(Gaussian self) -> Gaussian
11494  __init__(Gaussian self, Model m, ParticleIndex id) -> Gaussian
11495  __init__(Gaussian self, _ParticleAdaptor d) -> Gaussian
11496  """
11497  _IMP_core.Gaussian_swiginit(self, _IMP_core.new_Gaussian(*args))
11498 
11499  def show(self, *args):
11500  r"""show(Gaussian self, _ostream out=std::cout)"""
11501  return _IMP_core.Gaussian_show(self, *args)
11502 
11503  @staticmethod
11504  def setup_particle(*args):
11505  r"""
11506  setup_particle(Model m, ParticleIndex pi) -> Gaussian
11507  setup_particle(_ParticleAdaptor pa) -> Gaussian
11508  setup_particle(Model m, ParticleIndex pi, Gaussian3D g) -> Gaussian
11509  setup_particle(_ParticleAdaptor pa, Gaussian3D g) -> Gaussian
11510  """
11511  return _IMP_core.Gaussian_setup_particle(*args)
11512 
11513  @staticmethod
11514  def get_local_covariance_key():
11515  r"""get_local_covariance_key() -> ObjectKey"""
11516  return _IMP_core.Gaussian_get_local_covariance_key()
11517 
11518  @staticmethod
11519  def get_global_covariance_key():
11520  r"""get_global_covariance_key() -> ObjectKey"""
11521  return _IMP_core.Gaussian_get_global_covariance_key()
11522 
11523  @staticmethod
11524  def get_is_setup(*args):
11525  r"""
11526  get_is_setup(_ParticleAdaptor p) -> bool
11527  get_is_setup(Model m, ParticleIndex pi) -> bool
11528  """
11529  return _IMP_core.Gaussian_get_is_setup(*args)
11530 
11531  def get_local_covariance(self):
11532  r"""get_local_covariance(Gaussian self) -> Eigen::Matrix3d"""
11533  return _IMP_core.Gaussian_get_local_covariance(self)
11534 
11535  def get_variances(self):
11536  r"""get_variances(Gaussian self) -> Vector3D"""
11537  return _IMP_core.Gaussian_get_variances(self)
11538 
11539  def get_global_covariance(self):
11540  r"""get_global_covariance(Gaussian self) -> Eigen::Matrix3d"""
11541  return _IMP_core.Gaussian_get_global_covariance(self)
11542 
11543  def get_gaussian(self):
11544  r"""get_gaussian(Gaussian self) -> Gaussian3D"""
11545  return _IMP_core.Gaussian_get_gaussian(self)
11546 
11547  def set_gaussian(self, g):
11548  r"""set_gaussian(Gaussian self, Gaussian3D g)"""
11549  return _IMP_core.Gaussian_set_gaussian(self, g)
11550 
11551  def set_local_covariance(self, covar):
11552  r"""set_local_covariance(Gaussian self, Eigen::Vector3d const covar)"""
11553  return _IMP_core.Gaussian_set_local_covariance(self, covar)
11554 
11555  def set_variances(self, v):
11556  r"""set_variances(Gaussian self, Vector3D v)"""
11557  return _IMP_core.Gaussian_set_variances(self, v)
11558 
11559  def set_global_covariance(self, covar):
11560  r"""set_global_covariance(Gaussian self, Eigen::Matrix3d covar)"""
11561  return _IMP_core.Gaussian_set_global_covariance(self, covar)
11562 
11563  def update_global_covariance(self):
11564  r"""update_global_covariance(Gaussian self)"""
11565  return _IMP_core.Gaussian_update_global_covariance(self)
11566 
11567  def add_attribute(self, *args):
11568  r"""
11569  add_attribute(Gaussian self, FloatKey k, IMP::Float v, bool opt)
11570  add_attribute(Gaussian self, FloatKey a0, IMP::Float a1)
11571  add_attribute(Gaussian self, IntKey a0, IMP::Int a1)
11572  add_attribute(Gaussian self, FloatsKey a0, IMP::Floats a1)
11573  add_attribute(Gaussian self, IntsKey a0, IMP::Ints a1)
11574  add_attribute(Gaussian self, StringKey a0, IMP::String a1)
11575  add_attribute(Gaussian self, ParticleIndexKey a0, Particle a1)
11576  add_attribute(Gaussian self, ObjectKey a0, Object a1)
11577  add_attribute(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11578  add_attribute(Gaussian self, SparseIntKey a0, IMP::Int a1)
11579  add_attribute(Gaussian self, SparseStringKey a0, IMP::String a1)
11580  add_attribute(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11581  """
11582  return _IMP_core.Gaussian_add_attribute(self, *args)
11583 
11584  def get_value(self, *args):
11585  r"""
11586  get_value(Gaussian self, FloatKey a0) -> IMP::Float
11587  get_value(Gaussian self, IntKey a0) -> IMP::Int
11588  get_value(Gaussian self, FloatsKey a0) -> IMP::Floats
11589  get_value(Gaussian self, IntsKey a0) -> IMP::Ints
11590  get_value(Gaussian self, StringKey a0) -> IMP::String
11591  get_value(Gaussian self, ParticleIndexKey a0) -> Particle
11592  get_value(Gaussian self, ObjectKey a0) -> Object
11593  get_value(Gaussian self, SparseFloatKey a0) -> IMP::Float
11594  get_value(Gaussian self, SparseIntKey a0) -> IMP::Int
11595  get_value(Gaussian self, SparseStringKey a0) -> IMP::String
11596  get_value(Gaussian self, SparseParticleIndexKey a0) -> ParticleIndex
11597  """
11598  return _IMP_core.Gaussian_get_value(self, *args)
11599 
11600  def set_value(self, *args):
11601  r"""
11602  set_value(Gaussian self, FloatKey a0, IMP::Float a1)
11603  set_value(Gaussian self, IntKey a0, IMP::Int a1)
11604  set_value(Gaussian self, FloatsKey a0, IMP::Floats a1)
11605  set_value(Gaussian self, IntsKey a0, IMP::Ints a1)
11606  set_value(Gaussian self, StringKey a0, IMP::String a1)
11607  set_value(Gaussian self, ParticleIndexKey a0, Particle a1)
11608  set_value(Gaussian self, ObjectKey a0, Object a1)
11609  set_value(Gaussian self, SparseFloatKey a0, IMP::Float a1)
11610  set_value(Gaussian self, SparseIntKey a0, IMP::Int a1)
11611  set_value(Gaussian self, SparseStringKey a0, IMP::String a1)
11612  set_value(Gaussian self, SparseParticleIndexKey a0, ParticleIndex a1)
11613  """
11614  return _IMP_core.Gaussian_set_value(self, *args)
11615 
11616  def remove_attribute(self, *args):
11617  r"""
11618  remove_attribute(Gaussian self, FloatKey a0)
11619  remove_attribute(Gaussian self, IntKey a0)
11620  remove_attribute(Gaussian self, FloatsKey a0)
11621  remove_attribute(Gaussian self, IntsKey a0)
11622  remove_attribute(Gaussian self, StringKey a0)
11623  remove_attribute(Gaussian self, ParticleIndexKey a0)
11624  remove_attribute(Gaussian self, ObjectKey a0)
11625  remove_attribute(Gaussian self, SparseFloatKey a0)
11626  remove_attribute(Gaussian self, SparseIntKey a0)
11627  remove_attribute(Gaussian self, SparseStringKey a0)
11628  remove_attribute(Gaussian self, SparseParticleIndexKey a0)
11629  """
11630  return _IMP_core.Gaussian_remove_attribute(self, *args)
11631 
11632  def has_attribute(self, *args):
11633  r"""
11634  has_attribute(Gaussian self, FloatKey a0) -> bool
11635  has_attribute(Gaussian self, IntKey a0) -> bool
11636  has_attribute(Gaussian self, FloatsKey a0) -> bool
11637  has_attribute(Gaussian self, IntsKey a0) -> bool
11638  has_attribute(Gaussian self, StringKey a0) -> bool
11639  has_attribute(Gaussian self, ParticleIndexKey a0) -> bool
11640  has_attribute(Gaussian self, ObjectKey a0) -> bool
11641  has_attribute(Gaussian self, SparseFloatKey a0) -> bool
11642  has_attribute(Gaussian self, SparseIntKey a0) -> bool
11643  has_attribute(Gaussian self, SparseStringKey a0) -> bool
11644  has_attribute(Gaussian self, SparseParticleIndexKey a0) -> bool
11645  """
11646  return _IMP_core.Gaussian_has_attribute(self, *args)
11647 
11648  def get_derivative(self, a0):
11649  r"""get_derivative(Gaussian self, FloatKey a0) -> double"""
11650  return _IMP_core.Gaussian_get_derivative(self, a0)
11651 
11652  def get_name(self):
11653  r"""get_name(Gaussian self) -> std::string"""
11654  return _IMP_core.Gaussian_get_name(self)
11655 
11656  def clear_caches(self):
11657  r"""clear_caches(Gaussian self)"""
11658  return _IMP_core.Gaussian_clear_caches(self)
11659 
11660  def set_name(self, a0):
11661  r"""set_name(Gaussian self, std::string a0)"""
11662  return _IMP_core.Gaussian_set_name(self, a0)
11663 
11664  def set_check_level(self, a0):
11665  r"""set_check_level(Gaussian self, IMP::CheckLevel a0)"""
11666  return _IMP_core.Gaussian_set_check_level(self, a0)
11667 
11668  def add_to_derivative(self, a0, a1, a2):
11669  r"""add_to_derivative(Gaussian self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
11670  return _IMP_core.Gaussian_add_to_derivative(self, a0, a1, a2)
11671 
11672  def set_is_optimized(self, a0, a1):
11673  r"""set_is_optimized(Gaussian self, FloatKey a0, bool a1)"""
11674  return _IMP_core.Gaussian_set_is_optimized(self, a0, a1)
11675 
11676  def get_is_optimized(self, a0):
11677  r"""get_is_optimized(Gaussian self, FloatKey a0) -> bool"""
11678  return _IMP_core.Gaussian_get_is_optimized(self, a0)
11679 
11680  def get_check_level(self):
11681  r"""get_check_level(Gaussian self) -> IMP::CheckLevel"""
11682  return _IMP_core.Gaussian_get_check_level(self)
11683 
11684  def __eq__(self, *args):
11685  r"""
11686  __eq__(Gaussian self, Gaussian o) -> bool
11687  __eq__(Gaussian self, Particle d) -> bool
11688  """
11689  return _IMP_core.Gaussian___eq__(self, *args)
11690 
11691  def __ne__(self, *args):
11692  r"""
11693  __ne__(Gaussian self, Gaussian o) -> bool
11694  __ne__(Gaussian self, Particle d) -> bool
11695  """
11696  return _IMP_core.Gaussian___ne__(self, *args)
11697 
11698  def __le__(self, *args):
11699  r"""
11700  __le__(Gaussian self, Gaussian o) -> bool
11701  __le__(Gaussian self, Particle d) -> bool
11702  """
11703  return _IMP_core.Gaussian___le__(self, *args)
11704 
11705  def __lt__(self, *args):
11706  r"""
11707  __lt__(Gaussian self, Gaussian o) -> bool
11708  __lt__(Gaussian self, Particle d) -> bool
11709  """
11710  return _IMP_core.Gaussian___lt__(self, *args)
11711 
11712  def __ge__(self, *args):
11713  r"""
11714  __ge__(Gaussian self, Gaussian o) -> bool
11715  __ge__(Gaussian self, Particle d) -> bool
11716  """
11717  return _IMP_core.Gaussian___ge__(self, *args)
11718 
11719  def __gt__(self, *args):
11720  r"""
11721  __gt__(Gaussian self, Gaussian o) -> bool
11722  __gt__(Gaussian self, Particle d) -> bool
11723  """
11724  return _IMP_core.Gaussian___gt__(self, *args)
11725 
11726  def __hash__(self):
11727  r"""__hash__(Gaussian self) -> std::size_t"""
11728  return _IMP_core.Gaussian___hash__(self)
11729 
11730  def __str__(self):
11731  r"""__str__(Gaussian self) -> std::string"""
11732  return _IMP_core.Gaussian___str__(self)
11733 
11734  def __repr__(self):
11735  r"""__repr__(Gaussian self) -> std::string"""
11736  return _IMP_core.Gaussian___repr__(self)
11737 
11738  def _get_as_binary(self):
11739  r"""_get_as_binary(Gaussian self) -> PyObject *"""
11740  return _IMP_core.Gaussian__get_as_binary(self)
11741 
11742  def _set_from_binary(self, p):
11743  r"""_set_from_binary(Gaussian self, PyObject * p)"""
11744  return _IMP_core.Gaussian__set_from_binary(self, p)
11745 
11746  def __getstate__(self):
11747  p = self._get_as_binary()
11748  if len(self.__dict__) > 1:
11749  d = self.__dict__.copy()
11750  del d['this']
11751  p = (d, p)
11752  return p
11753 
11754  def __setstate__(self, p):
11755  if not hasattr(self, 'this'):
11756  self.__init__()
11757  if isinstance(p, tuple):
11758  d, p = p
11759  self.__dict__.update(d)
11760  return self._set_from_binary(p)
11761 
11762  __swig_destroy__ = _IMP_core.delete_Gaussian
11763 
11764 # Register Gaussian in _IMP_core:
11765 _IMP_core.Gaussian_swigregister(Gaussian)
11766 class PairRestraint(IMP.Restraint):
11767  r"""Proxy of C++ IMP::core::PairRestraint class."""
11768 
11769  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11770 
11771  def __init__(self, *args):
11772  r"""
11773  __init__(PairRestraint self, Model m, PairScore ss, IMP::ParticleIndexPair const & vt, std::string name="PairRestraint %1%") -> PairRestraint
11774  __init__(PairRestraint self) -> PairRestraint
11775  """
11776  _IMP_core.PairRestraint_swiginit(self, _IMP_core.new_PairRestraint(*args))
11777 
11778  def get_score_object(self):
11779  r"""get_score_object(PairRestraint self) -> PairScore"""
11780  return _IMP_core.PairRestraint_get_score_object(self)
11781 
11782  def get_index(self):
11783  r"""get_index(PairRestraint self) -> IMP::PairScore::IndexArgument"""
11784  return _IMP_core.PairRestraint_get_index(self)
11785 
11786  def get_version_info(self):
11787  r"""get_version_info(PairRestraint self) -> VersionInfo"""
11788  return _IMP_core.PairRestraint_get_version_info(self)
11789  __swig_destroy__ = _IMP_core.delete_PairRestraint
11790 
11791  def __str__(self):
11792  r"""__str__(PairRestraint self) -> std::string"""
11793  return _IMP_core.PairRestraint___str__(self)
11794 
11795  def __repr__(self):
11796  r"""__repr__(PairRestraint self) -> std::string"""
11797  return _IMP_core.PairRestraint___repr__(self)
11798 
11799  @staticmethod
11800  def get_from(o):
11801  return _object_cast_to_PairRestraint(o)
11802 
11803 
11804  def _get_as_binary(self):
11805  r"""_get_as_binary(PairRestraint self) -> PyObject *"""
11806  return _IMP_core.PairRestraint__get_as_binary(self)
11807 
11808  def _set_from_binary(self, p):
11809  r"""_set_from_binary(PairRestraint self, PyObject * p)"""
11810  return _IMP_core.PairRestraint__set_from_binary(self, p)
11811 
11812  def __getstate__(self):
11813  p = self._get_as_binary()
11814  if len(self.__dict__) > 1:
11815  d = self.__dict__.copy()
11816  del d['this']
11817  p = (d, p)
11818  return p
11819 
11820  def __setstate__(self, p):
11821  if not hasattr(self, 'this'):
11822  self.__init__()
11823  if isinstance(p, tuple):
11824  d, p = p
11825  self.__dict__.update(d)
11826  return self._set_from_binary(p)
11827 
11828 
11829  def _get_jax(self, space):
11830  from . import _jax_util
11831  return _jax_util._get_jax_restraint(self, space)
11832 
11833  @classmethod
11834  def _get_jax_multiple(cls, restraints, space):
11835  from . import _jax_util
11836  return _jax_util._get_jax_multi_restraint(cls, restraints, space)
11837 
11838 
11839 # Register PairRestraint in _IMP_core:
11840 _IMP_core.PairRestraint_swigregister(PairRestraint)
11841 class SingletonRestraint(IMP.Restraint):
11842  r"""Proxy of C++ IMP::core::SingletonRestraint class."""
11843 
11844  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11845 
11846  def __init__(self, *args):
11847  r"""
11848  __init__(SingletonRestraint self, Model m, SingletonScore ss, ParticleIndex vt, std::string name="SingletonRestraint %1%") -> SingletonRestraint
11849  __init__(SingletonRestraint self) -> SingletonRestraint
11850  """
11851  _IMP_core.SingletonRestraint_swiginit(self, _IMP_core.new_SingletonRestraint(*args))
11852 
11853  def get_score_object(self):
11854  r"""get_score_object(SingletonRestraint self) -> SingletonScore"""
11855  return _IMP_core.SingletonRestraint_get_score_object(self)
11856 
11857  def get_index(self):
11858  r"""get_index(SingletonRestraint self) -> ParticleIndex"""
11859  return _IMP_core.SingletonRestraint_get_index(self)
11860 
11861  def get_version_info(self):
11862  r"""get_version_info(SingletonRestraint self) -> VersionInfo"""
11863  return _IMP_core.SingletonRestraint_get_version_info(self)
11864  __swig_destroy__ = _IMP_core.delete_SingletonRestraint
11865 
11866  def __str__(self):
11867  r"""__str__(SingletonRestraint self) -> std::string"""
11868  return _IMP_core.SingletonRestraint___str__(self)
11869 
11870  def __repr__(self):
11871  r"""__repr__(SingletonRestraint self) -> std::string"""
11872  return _IMP_core.SingletonRestraint___repr__(self)
11873 
11874  @staticmethod
11875  def get_from(o):
11876  return _object_cast_to_SingletonRestraint(o)
11877 
11878 
11879  def _get_as_binary(self):
11880  r"""_get_as_binary(SingletonRestraint self) -> PyObject *"""
11881  return _IMP_core.SingletonRestraint__get_as_binary(self)
11882 
11883  def _set_from_binary(self, p):
11884  r"""_set_from_binary(SingletonRestraint self, PyObject * p)"""
11885  return _IMP_core.SingletonRestraint__set_from_binary(self, p)
11886 
11887  def __getstate__(self):
11888  p = self._get_as_binary()
11889  if len(self.__dict__) > 1:
11890  d = self.__dict__.copy()
11891  del d['this']
11892  p = (d, p)
11893  return p
11894 
11895  def __setstate__(self, p):
11896  if not hasattr(self, 'this'):
11897  self.__init__()
11898  if isinstance(p, tuple):
11899  d, p = p
11900  self.__dict__.update(d)
11901  return self._set_from_binary(p)
11902 
11903 
11904  def _get_jax(self, space):
11905  from . import _jax_util
11906  return _jax_util._get_jax_restraint(self, space)
11907 
11908  @classmethod
11909  def _get_jax_multiple(cls, restraints, space):
11910  from . import _jax_util
11911  return _jax_util._get_jax_multi_restraint(cls, restraints, space)
11912 
11913 
11914 # Register SingletonRestraint in _IMP_core:
11915 _IMP_core.SingletonRestraint_swigregister(SingletonRestraint)
11916 class TripletRestraint(IMP.Restraint):
11917  r"""Proxy of C++ IMP::core::TripletRestraint class."""
11918 
11919  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11920 
11921  def __init__(self, *args):
11922  r"""
11923  __init__(TripletRestraint self, Model m, TripletScore ss, IMP::ParticleIndexTriplet const & vt, std::string name="TripletRestraint %1%") -> TripletRestraint
11924  __init__(TripletRestraint self) -> TripletRestraint
11925  """
11926  _IMP_core.TripletRestraint_swiginit(self, _IMP_core.new_TripletRestraint(*args))
11927 
11928  def get_score_object(self):
11929  r"""get_score_object(TripletRestraint self) -> TripletScore"""
11930  return _IMP_core.TripletRestraint_get_score_object(self)
11931 
11932  def get_index(self):
11933  r"""get_index(TripletRestraint self) -> IMP::TripletScore::IndexArgument"""
11934  return _IMP_core.TripletRestraint_get_index(self)
11935 
11936  def get_version_info(self):
11937  r"""get_version_info(TripletRestraint self) -> VersionInfo"""
11938  return _IMP_core.TripletRestraint_get_version_info(self)
11939  __swig_destroy__ = _IMP_core.delete_TripletRestraint
11940 
11941  def __str__(self):
11942  r"""__str__(TripletRestraint self) -> std::string"""
11943  return _IMP_core.TripletRestraint___str__(self)
11944 
11945  def __repr__(self):
11946  r"""__repr__(TripletRestraint self) -> std::string"""
11947  return _IMP_core.TripletRestraint___repr__(self)
11948 
11949  @staticmethod
11950  def get_from(o):
11951  return _object_cast_to_TripletRestraint(o)
11952 
11953 
11954  def _get_as_binary(self):
11955  r"""_get_as_binary(TripletRestraint self) -> PyObject *"""
11956  return _IMP_core.TripletRestraint__get_as_binary(self)
11957 
11958  def _set_from_binary(self, p):
11959  r"""_set_from_binary(TripletRestraint self, PyObject * p)"""
11960  return _IMP_core.TripletRestraint__set_from_binary(self, p)
11961 
11962  def __getstate__(self):
11963  p = self._get_as_binary()
11964  if len(self.__dict__) > 1:
11965  d = self.__dict__.copy()
11966  del d['this']
11967  p = (d, p)
11968  return p
11969 
11970  def __setstate__(self, p):
11971  if not hasattr(self, 'this'):
11972  self.__init__()
11973  if isinstance(p, tuple):
11974  d, p = p
11975  self.__dict__.update(d)
11976  return self._set_from_binary(p)
11977 
11978 
11979 # Register TripletRestraint in _IMP_core:
11980 _IMP_core.TripletRestraint_swigregister(TripletRestraint)
11981 class QuadRestraint(IMP.Restraint):
11982  r"""Proxy of C++ IMP::core::QuadRestraint class."""
11983 
11984  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
11985 
11986  def __init__(self, *args):
11987  r"""
11988  __init__(QuadRestraint self, Model m, QuadScore ss, IMP::ParticleIndexQuad const & vt, std::string name="QuadRestraint %1%") -> QuadRestraint
11989  __init__(QuadRestraint self) -> QuadRestraint
11990  """
11991  _IMP_core.QuadRestraint_swiginit(self, _IMP_core.new_QuadRestraint(*args))
11992 
11993  def get_score_object(self):
11994  r"""get_score_object(QuadRestraint self) -> QuadScore"""
11995  return _IMP_core.QuadRestraint_get_score_object(self)
11996 
11997  def get_index(self):
11998  r"""get_index(QuadRestraint self) -> IMP::QuadScore::IndexArgument"""
11999  return _IMP_core.QuadRestraint_get_index(self)
12000 
12001  def get_version_info(self):
12002  r"""get_version_info(QuadRestraint self) -> VersionInfo"""
12003  return _IMP_core.QuadRestraint_get_version_info(self)
12004  __swig_destroy__ = _IMP_core.delete_QuadRestraint
12005 
12006  def __str__(self):
12007  r"""__str__(QuadRestraint self) -> std::string"""
12008  return _IMP_core.QuadRestraint___str__(self)
12009 
12010  def __repr__(self):
12011  r"""__repr__(QuadRestraint self) -> std::string"""
12012  return _IMP_core.QuadRestraint___repr__(self)
12013 
12014  @staticmethod
12015  def get_from(o):
12016  return _object_cast_to_QuadRestraint(o)
12017 
12018 
12019  def _get_as_binary(self):
12020  r"""_get_as_binary(QuadRestraint self) -> PyObject *"""
12021  return _IMP_core.QuadRestraint__get_as_binary(self)
12022 
12023  def _set_from_binary(self, p):
12024  r"""_set_from_binary(QuadRestraint self, PyObject * p)"""
12025  return _IMP_core.QuadRestraint__set_from_binary(self, p)
12026 
12027  def __getstate__(self):
12028  p = self._get_as_binary()
12029  if len(self.__dict__) > 1:
12030  d = self.__dict__.copy()
12031  del d['this']
12032  p = (d, p)
12033  return p
12034 
12035  def __setstate__(self, p):
12036  if not hasattr(self, 'this'):
12037  self.__init__()
12038  if isinstance(p, tuple):
12039  d, p = p
12040  self.__dict__.update(d)
12041  return self._set_from_binary(p)
12042 
12043 
12044 # Register QuadRestraint in _IMP_core:
12045 _IMP_core.QuadRestraint_swigregister(QuadRestraint)
12046 class SingletonConstraint(IMP.Constraint):
12047  r"""Proxy of C++ IMP::core::SingletonConstraint class."""
12048 
12049  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12050 
12051  def __init__(self, *args):
12052  r"""
12053  __init__(SingletonConstraint self, SingletonModifier before, SingletonModifier after, Model m, ParticleIndex vt, std::string name="SingletonConstraint %1%", bool can_skip=False) -> SingletonConstraint
12054  __init__(SingletonConstraint self) -> SingletonConstraint
12055  """
12056  _IMP_core.SingletonConstraint_swiginit(self, _IMP_core.new_SingletonConstraint(*args))
12057 
12058  def get_before_modifier(self):
12059  r"""get_before_modifier(SingletonConstraint self) -> SingletonModifier"""
12060  return _IMP_core.SingletonConstraint_get_before_modifier(self)
12061 
12062  def get_index(self):
12063  r"""get_index(SingletonConstraint self) -> ParticleIndex"""
12064  return _IMP_core.SingletonConstraint_get_index(self)
12065 
12066  def get_version_info(self):
12067  r"""get_version_info(SingletonConstraint self) -> VersionInfo"""
12068  return _IMP_core.SingletonConstraint_get_version_info(self)
12069  __swig_destroy__ = _IMP_core.delete_SingletonConstraint
12070 
12071  def __str__(self):
12072  r"""__str__(SingletonConstraint self) -> std::string"""
12073  return _IMP_core.SingletonConstraint___str__(self)
12074 
12075  def __repr__(self):
12076  r"""__repr__(SingletonConstraint self) -> std::string"""
12077  return _IMP_core.SingletonConstraint___repr__(self)
12078 
12079  @staticmethod
12080  def get_from(o):
12081  return _object_cast_to_SingletonConstraint(o)
12082 
12083 
12084  def _get_as_binary(self):
12085  r"""_get_as_binary(SingletonConstraint self) -> PyObject *"""
12086  return _IMP_core.SingletonConstraint__get_as_binary(self)
12087 
12088  def _set_from_binary(self, p):
12089  r"""_set_from_binary(SingletonConstraint self, PyObject * p)"""
12090  return _IMP_core.SingletonConstraint__set_from_binary(self, p)
12091 
12092  def __getstate__(self):
12093  p = self._get_as_binary()
12094  if len(self.__dict__) > 1:
12095  d = self.__dict__.copy()
12096  del d['this']
12097  p = (d, p)
12098  return p
12099 
12100  def __setstate__(self, p):
12101  if not hasattr(self, 'this'):
12102  self.__init__()
12103  if isinstance(p, tuple):
12104  d, p = p
12105  self.__dict__.update(d)
12106  return self._set_from_binary(p)
12107 
12108 
12109  def _get_jax(self):
12110  import jax.numpy as jnp
12111  indexes = jnp.array([self.get_index()])
12112  mod = self.get_before_modifier().get_derived_object()
12113  ji = mod._get_jax(self.get_model(), indexes)
12114  return self._wrap_jax(ji.apply_func, keys=ji._keys)
12115 
12116 
12117 # Register SingletonConstraint in _IMP_core:
12118 _IMP_core.SingletonConstraint_swigregister(SingletonConstraint)
12119 class PairConstraint(IMP.Constraint):
12120  r"""Proxy of C++ IMP::core::PairConstraint class."""
12121 
12122  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12123 
12124  def __init__(self, *args):
12125  r"""
12126  __init__(PairConstraint self, PairModifier before, PairModifier after, Model m, IMP::ParticleIndexPair const & vt, std::string name="PairConstraint %1%", bool can_skip=False) -> PairConstraint
12127  __init__(PairConstraint self) -> PairConstraint
12128  """
12129  _IMP_core.PairConstraint_swiginit(self, _IMP_core.new_PairConstraint(*args))
12130 
12131  def get_before_modifier(self):
12132  r"""get_before_modifier(PairConstraint self) -> PairModifier"""
12133  return _IMP_core.PairConstraint_get_before_modifier(self)
12134 
12135  def get_index(self):
12136  r"""get_index(PairConstraint self) -> IMP::PairModifier::IndexArgument"""
12137  return _IMP_core.PairConstraint_get_index(self)
12138 
12139  def get_version_info(self):
12140  r"""get_version_info(PairConstraint self) -> VersionInfo"""
12141  return _IMP_core.PairConstraint_get_version_info(self)
12142  __swig_destroy__ = _IMP_core.delete_PairConstraint
12143 
12144  def __str__(self):
12145  r"""__str__(PairConstraint self) -> std::string"""
12146  return _IMP_core.PairConstraint___str__(self)
12147 
12148  def __repr__(self):
12149  r"""__repr__(PairConstraint self) -> std::string"""
12150  return _IMP_core.PairConstraint___repr__(self)
12151 
12152  @staticmethod
12153  def get_from(o):
12154  return _object_cast_to_PairConstraint(o)
12155 
12156 
12157  def _get_as_binary(self):
12158  r"""_get_as_binary(PairConstraint self) -> PyObject *"""
12159  return _IMP_core.PairConstraint__get_as_binary(self)
12160 
12161  def _set_from_binary(self, p):
12162  r"""_set_from_binary(PairConstraint self, PyObject * p)"""
12163  return _IMP_core.PairConstraint__set_from_binary(self, p)
12164 
12165  def __getstate__(self):
12166  p = self._get_as_binary()
12167  if len(self.__dict__) > 1:
12168  d = self.__dict__.copy()
12169  del d['this']
12170  p = (d, p)
12171  return p
12172 
12173  def __setstate__(self, p):
12174  if not hasattr(self, 'this'):
12175  self.__init__()
12176  if isinstance(p, tuple):
12177  d, p = p
12178  self.__dict__.update(d)
12179  return self._set_from_binary(p)
12180 
12181 
12182 # Register PairConstraint in _IMP_core:
12183 _IMP_core.PairConstraint_swigregister(PairConstraint)
12184 class TripletConstraint(IMP.Constraint):
12185  r"""Proxy of C++ IMP::core::TripletConstraint class."""
12186 
12187  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12188 
12189  def __init__(self, *args):
12190  r"""
12191  __init__(TripletConstraint self, TripletModifier before, TripletModifier after, Model m, IMP::ParticleIndexTriplet const & vt, std::string name="TripletConstraint %1%", bool can_skip=False) -> TripletConstraint
12192  __init__(TripletConstraint self) -> TripletConstraint
12193  """
12194  _IMP_core.TripletConstraint_swiginit(self, _IMP_core.new_TripletConstraint(*args))
12195 
12196  def get_before_modifier(self):
12197  r"""get_before_modifier(TripletConstraint self) -> TripletModifier"""
12198  return _IMP_core.TripletConstraint_get_before_modifier(self)
12199 
12200  def get_index(self):
12201  r"""get_index(TripletConstraint self) -> IMP::TripletModifier::IndexArgument"""
12202  return _IMP_core.TripletConstraint_get_index(self)
12203 
12204  def get_version_info(self):
12205  r"""get_version_info(TripletConstraint self) -> VersionInfo"""
12206  return _IMP_core.TripletConstraint_get_version_info(self)
12207  __swig_destroy__ = _IMP_core.delete_TripletConstraint
12208 
12209  def __str__(self):
12210  r"""__str__(TripletConstraint self) -> std::string"""
12211  return _IMP_core.TripletConstraint___str__(self)
12212 
12213  def __repr__(self):
12214  r"""__repr__(TripletConstraint self) -> std::string"""
12215  return _IMP_core.TripletConstraint___repr__(self)
12216 
12217  @staticmethod
12218  def get_from(o):
12219  return _object_cast_to_TripletConstraint(o)
12220 
12221 
12222  def _get_as_binary(self):
12223  r"""_get_as_binary(TripletConstraint self) -> PyObject *"""
12224  return _IMP_core.TripletConstraint__get_as_binary(self)
12225 
12226  def _set_from_binary(self, p):
12227  r"""_set_from_binary(TripletConstraint self, PyObject * p)"""
12228  return _IMP_core.TripletConstraint__set_from_binary(self, p)
12229 
12230  def __getstate__(self):
12231  p = self._get_as_binary()
12232  if len(self.__dict__) > 1:
12233  d = self.__dict__.copy()
12234  del d['this']
12235  p = (d, p)
12236  return p
12237 
12238  def __setstate__(self, p):
12239  if not hasattr(self, 'this'):
12240  self.__init__()
12241  if isinstance(p, tuple):
12242  d, p = p
12243  self.__dict__.update(d)
12244  return self._set_from_binary(p)
12245 
12246 
12247 # Register TripletConstraint in _IMP_core:
12248 _IMP_core.TripletConstraint_swigregister(TripletConstraint)
12249 class QuadConstraint(IMP.Constraint):
12250  r"""Proxy of C++ IMP::core::QuadConstraint class."""
12251 
12252  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12253 
12254  def __init__(self, *args):
12255  r"""
12256  __init__(QuadConstraint self, QuadModifier before, QuadModifier after, Model m, IMP::ParticleIndexQuad const & vt, std::string name="QuadConstraint %1%", bool can_skip=False) -> QuadConstraint
12257  __init__(QuadConstraint self) -> QuadConstraint
12258  """
12259  _IMP_core.QuadConstraint_swiginit(self, _IMP_core.new_QuadConstraint(*args))
12260 
12261  def get_before_modifier(self):
12262  r"""get_before_modifier(QuadConstraint self) -> QuadModifier"""
12263  return _IMP_core.QuadConstraint_get_before_modifier(self)
12264 
12265  def get_index(self):
12266  r"""get_index(QuadConstraint self) -> IMP::QuadModifier::IndexArgument"""
12267  return _IMP_core.QuadConstraint_get_index(self)
12268 
12269  def get_version_info(self):
12270  r"""get_version_info(QuadConstraint self) -> VersionInfo"""
12271  return _IMP_core.QuadConstraint_get_version_info(self)
12272  __swig_destroy__ = _IMP_core.delete_QuadConstraint
12273 
12274  def __str__(self):
12275  r"""__str__(QuadConstraint self) -> std::string"""
12276  return _IMP_core.QuadConstraint___str__(self)
12277 
12278  def __repr__(self):
12279  r"""__repr__(QuadConstraint self) -> std::string"""
12280  return _IMP_core.QuadConstraint___repr__(self)
12281 
12282  @staticmethod
12283  def get_from(o):
12284  return _object_cast_to_QuadConstraint(o)
12285 
12286 
12287  def _get_as_binary(self):
12288  r"""_get_as_binary(QuadConstraint self) -> PyObject *"""
12289  return _IMP_core.QuadConstraint__get_as_binary(self)
12290 
12291  def _set_from_binary(self, p):
12292  r"""_set_from_binary(QuadConstraint self, PyObject * p)"""
12293  return _IMP_core.QuadConstraint__set_from_binary(self, p)
12294 
12295  def __getstate__(self):
12296  p = self._get_as_binary()
12297  if len(self.__dict__) > 1:
12298  d = self.__dict__.copy()
12299  del d['this']
12300  p = (d, p)
12301  return p
12302 
12303  def __setstate__(self, p):
12304  if not hasattr(self, 'this'):
12305  self.__init__()
12306  if isinstance(p, tuple):
12307  d, p = p
12308  self.__dict__.update(d)
12309  return self._set_from_binary(p)
12310 
12311 
12312 # Register QuadConstraint in _IMP_core:
12313 _IMP_core.QuadConstraint_swigregister(QuadConstraint)
12314 class ConstantSingletonPredicate(IMP.SingletonPredicate):
12315  r"""Proxy of C++ IMP::core::ConstantSingletonPredicate class."""
12316 
12317  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12318 
12319  def __init__(self, *args):
12320  r"""
12321  __init__(ConstantSingletonPredicate self, int v, std::string name="ConstSingletonPredicate%1%") -> ConstantSingletonPredicate
12322  __init__(ConstantSingletonPredicate self) -> ConstantSingletonPredicate
12323  """
12324  _IMP_core.ConstantSingletonPredicate_swiginit(self, _IMP_core.new_ConstantSingletonPredicate(*args))
12325 
12326  def do_get_inputs(self, arg2, arg3):
12327  r"""do_get_inputs(ConstantSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12328  return _IMP_core.ConstantSingletonPredicate_do_get_inputs(self, arg2, arg3)
12329 
12330  def get_value(self, *args):
12331  r"""
12332  get_value(ConstantSingletonPredicate self, Particle a) -> int
12333  get_value(ConstantSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12334  """
12335  return _IMP_core.ConstantSingletonPredicate_get_value(self, *args)
12336 
12337  def get_value_index(self, *args):
12338  r"""
12339  get_value_index(ConstantSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12340  get_value_index(ConstantSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12341  """
12342  return _IMP_core.ConstantSingletonPredicate_get_value_index(self, *args)
12343 
12344  def get_version_info(self):
12345  r"""get_version_info(ConstantSingletonPredicate self) -> VersionInfo"""
12346  return _IMP_core.ConstantSingletonPredicate_get_version_info(self)
12347  __swig_destroy__ = _IMP_core.delete_ConstantSingletonPredicate
12348 
12349  def __str__(self):
12350  r"""__str__(ConstantSingletonPredicate self) -> std::string"""
12351  return _IMP_core.ConstantSingletonPredicate___str__(self)
12352 
12353  def __repr__(self):
12354  r"""__repr__(ConstantSingletonPredicate self) -> std::string"""
12355  return _IMP_core.ConstantSingletonPredicate___repr__(self)
12356 
12357  @staticmethod
12358  def get_from(o):
12359  return _object_cast_to_ConstantSingletonPredicate(o)
12360 
12361 
12362  def _get_as_binary(self):
12363  r"""_get_as_binary(ConstantSingletonPredicate self) -> PyObject *"""
12364  return _IMP_core.ConstantSingletonPredicate__get_as_binary(self)
12365 
12366  def _set_from_binary(self, p):
12367  r"""_set_from_binary(ConstantSingletonPredicate self, PyObject * p)"""
12368  return _IMP_core.ConstantSingletonPredicate__set_from_binary(self, p)
12369 
12370  def __getstate__(self):
12371  p = self._get_as_binary()
12372  if len(self.__dict__) > 1:
12373  d = self.__dict__.copy()
12374  del d['this']
12375  p = (d, p)
12376  return p
12377 
12378  def __setstate__(self, p):
12379  if not hasattr(self, 'this'):
12380  self.__init__()
12381  if isinstance(p, tuple):
12382  d, p = p
12383  self.__dict__.update(d)
12384  return self._set_from_binary(p)
12385 
12386 
12387 # Register ConstantSingletonPredicate in _IMP_core:
12388 _IMP_core.ConstantSingletonPredicate_swigregister(ConstantSingletonPredicate)
12389 class UnorderedTypeSingletonPredicate(IMP.SingletonPredicate):
12390  r"""Proxy of C++ IMP::core::UnorderedTypeSingletonPredicate class."""
12391 
12392  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12393 
12394  def __init__(self, *args):
12395  r"""__init__(UnorderedTypeSingletonPredicate self, std::string name="UnorderedTypeSingletonPredicate%1%") -> UnorderedTypeSingletonPredicate"""
12396  _IMP_core.UnorderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_UnorderedTypeSingletonPredicate(*args))
12397 
12398  def do_get_inputs(self, m, pis):
12399  r"""do_get_inputs(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12400  return _IMP_core.UnorderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12401 
12402  def get_value(self, *args):
12403  r"""
12404  get_value(UnorderedTypeSingletonPredicate self, Particle a) -> int
12405  get_value(UnorderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12406  """
12407  return _IMP_core.UnorderedTypeSingletonPredicate_get_value(self, *args)
12408 
12409  def get_value_index(self, *args):
12410  r"""
12411  get_value_index(UnorderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12412  get_value_index(UnorderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12413  """
12414  return _IMP_core.UnorderedTypeSingletonPredicate_get_value_index(self, *args)
12415 
12416  def get_version_info(self):
12417  r"""get_version_info(UnorderedTypeSingletonPredicate self) -> VersionInfo"""
12418  return _IMP_core.UnorderedTypeSingletonPredicate_get_version_info(self)
12419  __swig_destroy__ = _IMP_core.delete_UnorderedTypeSingletonPredicate
12420 
12421  def __str__(self):
12422  r"""__str__(UnorderedTypeSingletonPredicate self) -> std::string"""
12423  return _IMP_core.UnorderedTypeSingletonPredicate___str__(self)
12424 
12425  def __repr__(self):
12426  r"""__repr__(UnorderedTypeSingletonPredicate self) -> std::string"""
12427  return _IMP_core.UnorderedTypeSingletonPredicate___repr__(self)
12428 
12429  @staticmethod
12430  def get_from(o):
12431  return _object_cast_to_UnorderedTypeSingletonPredicate(o)
12432 
12433 
12434  def _get_as_binary(self):
12435  r"""_get_as_binary(UnorderedTypeSingletonPredicate self) -> PyObject *"""
12436  return _IMP_core.UnorderedTypeSingletonPredicate__get_as_binary(self)
12437 
12438  def _set_from_binary(self, p):
12439  r"""_set_from_binary(UnorderedTypeSingletonPredicate self, PyObject * p)"""
12440  return _IMP_core.UnorderedTypeSingletonPredicate__set_from_binary(self, p)
12441 
12442  def __getstate__(self):
12443  p = self._get_as_binary()
12444  if len(self.__dict__) > 1:
12445  d = self.__dict__.copy()
12446  del d['this']
12447  p = (d, p)
12448  return p
12449 
12450  def __setstate__(self, p):
12451  if not hasattr(self, 'this'):
12452  self.__init__()
12453  if isinstance(p, tuple):
12454  d, p = p
12455  self.__dict__.update(d)
12456  return self._set_from_binary(p)
12457 
12458 
12459 # Register UnorderedTypeSingletonPredicate in _IMP_core:
12460 _IMP_core.UnorderedTypeSingletonPredicate_swigregister(UnorderedTypeSingletonPredicate)
12461 class OrderedTypeSingletonPredicate(IMP.SingletonPredicate):
12462  r"""Proxy of C++ IMP::core::OrderedTypeSingletonPredicate class."""
12463 
12464  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12465 
12466  def __init__(self, *args):
12467  r"""__init__(OrderedTypeSingletonPredicate self, std::string name="OrderedTypeSingletonPredicate%1%") -> OrderedTypeSingletonPredicate"""
12468  _IMP_core.OrderedTypeSingletonPredicate_swiginit(self, _IMP_core.new_OrderedTypeSingletonPredicate(*args))
12469 
12470  def do_get_inputs(self, m, pis):
12471  r"""do_get_inputs(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12472  return _IMP_core.OrderedTypeSingletonPredicate_do_get_inputs(self, m, pis)
12473 
12474  def get_value(self, *args):
12475  r"""
12476  get_value(OrderedTypeSingletonPredicate self, IMP::core::ParticleTypes const & types) -> int
12477  get_value(OrderedTypeSingletonPredicate self, Particle a) -> int
12478  get_value(OrderedTypeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12479  """
12480  return _IMP_core.OrderedTypeSingletonPredicate_get_value(self, *args)
12481 
12482  def get_value_index(self, *args):
12483  r"""
12484  get_value_index(OrderedTypeSingletonPredicate self, Model m, ParticleIndex pi) -> int
12485  get_value_index(OrderedTypeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12486  """
12487  return _IMP_core.OrderedTypeSingletonPredicate_get_value_index(self, *args)
12488 
12489  def get_version_info(self):
12490  r"""get_version_info(OrderedTypeSingletonPredicate self) -> VersionInfo"""
12491  return _IMP_core.OrderedTypeSingletonPredicate_get_version_info(self)
12492  __swig_destroy__ = _IMP_core.delete_OrderedTypeSingletonPredicate
12493 
12494  def __str__(self):
12495  r"""__str__(OrderedTypeSingletonPredicate self) -> std::string"""
12496  return _IMP_core.OrderedTypeSingletonPredicate___str__(self)
12497 
12498  def __repr__(self):
12499  r"""__repr__(OrderedTypeSingletonPredicate self) -> std::string"""
12500  return _IMP_core.OrderedTypeSingletonPredicate___repr__(self)
12501 
12502  @staticmethod
12503  def get_from(o):
12504  return _object_cast_to_OrderedTypeSingletonPredicate(o)
12505 
12506 
12507 # Register OrderedTypeSingletonPredicate in _IMP_core:
12508 _IMP_core.OrderedTypeSingletonPredicate_swigregister(OrderedTypeSingletonPredicate)
12509 class AllSameSingletonPredicate(IMP.SingletonPredicate):
12510  r"""Proxy of C++ IMP::core::AllSameSingletonPredicate class."""
12511 
12512  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12513 
12514  def __init__(self, *args):
12515  r"""__init__(AllSameSingletonPredicate self, std::string name="AllSameSingletonPredicate%1%") -> AllSameSingletonPredicate"""
12516  _IMP_core.AllSameSingletonPredicate_swiginit(self, _IMP_core.new_AllSameSingletonPredicate(*args))
12517 
12518  def do_get_inputs(self, arg2, arg3):
12519  r"""do_get_inputs(AllSameSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12520  return _IMP_core.AllSameSingletonPredicate_do_get_inputs(self, arg2, arg3)
12521 
12522  def get_value(self, *args):
12523  r"""
12524  get_value(AllSameSingletonPredicate self, Particle a) -> int
12525  get_value(AllSameSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12526  """
12527  return _IMP_core.AllSameSingletonPredicate_get_value(self, *args)
12528 
12529  def get_value_index(self, *args):
12530  r"""
12531  get_value_index(AllSameSingletonPredicate self, Model m, ParticleIndex pi) -> int
12532  get_value_index(AllSameSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12533  """
12534  return _IMP_core.AllSameSingletonPredicate_get_value_index(self, *args)
12535 
12536  def get_version_info(self):
12537  r"""get_version_info(AllSameSingletonPredicate self) -> VersionInfo"""
12538  return _IMP_core.AllSameSingletonPredicate_get_version_info(self)
12539  __swig_destroy__ = _IMP_core.delete_AllSameSingletonPredicate
12540 
12541  def __str__(self):
12542  r"""__str__(AllSameSingletonPredicate self) -> std::string"""
12543  return _IMP_core.AllSameSingletonPredicate___str__(self)
12544 
12545  def __repr__(self):
12546  r"""__repr__(AllSameSingletonPredicate self) -> std::string"""
12547  return _IMP_core.AllSameSingletonPredicate___repr__(self)
12548 
12549  @staticmethod
12550  def get_from(o):
12551  return _object_cast_to_AllSameSingletonPredicate(o)
12552 
12553 
12554  def _get_as_binary(self):
12555  r"""_get_as_binary(AllSameSingletonPredicate self) -> PyObject *"""
12556  return _IMP_core.AllSameSingletonPredicate__get_as_binary(self)
12557 
12558  def _set_from_binary(self, p):
12559  r"""_set_from_binary(AllSameSingletonPredicate self, PyObject * p)"""
12560  return _IMP_core.AllSameSingletonPredicate__set_from_binary(self, p)
12561 
12562  def __getstate__(self):
12563  p = self._get_as_binary()
12564  if len(self.__dict__) > 1:
12565  d = self.__dict__.copy()
12566  del d['this']
12567  p = (d, p)
12568  return p
12569 
12570  def __setstate__(self, p):
12571  if not hasattr(self, 'this'):
12572  self.__init__()
12573  if isinstance(p, tuple):
12574  d, p = p
12575  self.__dict__.update(d)
12576  return self._set_from_binary(p)
12577 
12578 
12579 # Register AllSameSingletonPredicate in _IMP_core:
12580 _IMP_core.AllSameSingletonPredicate_swigregister(AllSameSingletonPredicate)
12581 class CoinFlipSingletonPredicate(IMP.SingletonPredicate):
12582  r"""Proxy of C++ IMP::core::CoinFlipSingletonPredicate class."""
12583 
12584  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12585 
12586  def __init__(self, *args):
12587  r"""__init__(CoinFlipSingletonPredicate self, double p, std::string name="CoinFlipSingletonPredicate%1%") -> CoinFlipSingletonPredicate"""
12588  _IMP_core.CoinFlipSingletonPredicate_swiginit(self, _IMP_core.new_CoinFlipSingletonPredicate(*args))
12589 
12590  def do_get_inputs(self, arg2, arg3):
12591  r"""do_get_inputs(CoinFlipSingletonPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12592  return _IMP_core.CoinFlipSingletonPredicate_do_get_inputs(self, arg2, arg3)
12593 
12594  def get_value(self, *args):
12595  r"""
12596  get_value(CoinFlipSingletonPredicate self, Particle a) -> int
12597  get_value(CoinFlipSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
12598  """
12599  return _IMP_core.CoinFlipSingletonPredicate_get_value(self, *args)
12600 
12601  def get_value_index(self, *args):
12602  r"""
12603  get_value_index(CoinFlipSingletonPredicate self, Model arg2, ParticleIndex arg3) -> int
12604  get_value_index(CoinFlipSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
12605  """
12606  return _IMP_core.CoinFlipSingletonPredicate_get_value_index(self, *args)
12607 
12608  def get_version_info(self):
12609  r"""get_version_info(CoinFlipSingletonPredicate self) -> VersionInfo"""
12610  return _IMP_core.CoinFlipSingletonPredicate_get_version_info(self)
12611  __swig_destroy__ = _IMP_core.delete_CoinFlipSingletonPredicate
12612 
12613  def __str__(self):
12614  r"""__str__(CoinFlipSingletonPredicate self) -> std::string"""
12615  return _IMP_core.CoinFlipSingletonPredicate___str__(self)
12616 
12617  def __repr__(self):
12618  r"""__repr__(CoinFlipSingletonPredicate self) -> std::string"""
12619  return _IMP_core.CoinFlipSingletonPredicate___repr__(self)
12620 
12621  @staticmethod
12622  def get_from(o):
12623  return _object_cast_to_CoinFlipSingletonPredicate(o)
12624 
12625 
12626 # Register CoinFlipSingletonPredicate in _IMP_core:
12627 _IMP_core.CoinFlipSingletonPredicate_swigregister(CoinFlipSingletonPredicate)
12628 class ConstantPairPredicate(IMP.PairPredicate):
12629  r"""Proxy of C++ IMP::core::ConstantPairPredicate class."""
12630 
12631  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12632 
12633  def __init__(self, *args):
12634  r"""
12635  __init__(ConstantPairPredicate self, int v, std::string name="ConstPairPredicate%1%") -> ConstantPairPredicate
12636  __init__(ConstantPairPredicate self) -> ConstantPairPredicate
12637  """
12638  _IMP_core.ConstantPairPredicate_swiginit(self, _IMP_core.new_ConstantPairPredicate(*args))
12639 
12640  def do_get_inputs(self, arg2, arg3):
12641  r"""do_get_inputs(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12642  return _IMP_core.ConstantPairPredicate_do_get_inputs(self, arg2, arg3)
12643 
12644  def get_value(self, *args):
12645  r"""
12646  get_value(ConstantPairPredicate self, IMP::ParticlePair const & a) -> int
12647  get_value(ConstantPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12648  """
12649  return _IMP_core.ConstantPairPredicate_get_value(self, *args)
12650 
12651  def get_value_index(self, *args):
12652  r"""
12653  get_value_index(ConstantPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12654  get_value_index(ConstantPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12655  """
12656  return _IMP_core.ConstantPairPredicate_get_value_index(self, *args)
12657 
12658  def get_version_info(self):
12659  r"""get_version_info(ConstantPairPredicate self) -> VersionInfo"""
12660  return _IMP_core.ConstantPairPredicate_get_version_info(self)
12661  __swig_destroy__ = _IMP_core.delete_ConstantPairPredicate
12662 
12663  def __str__(self):
12664  r"""__str__(ConstantPairPredicate self) -> std::string"""
12665  return _IMP_core.ConstantPairPredicate___str__(self)
12666 
12667  def __repr__(self):
12668  r"""__repr__(ConstantPairPredicate self) -> std::string"""
12669  return _IMP_core.ConstantPairPredicate___repr__(self)
12670 
12671  @staticmethod
12672  def get_from(o):
12673  return _object_cast_to_ConstantPairPredicate(o)
12674 
12675 
12676  def _get_as_binary(self):
12677  r"""_get_as_binary(ConstantPairPredicate self) -> PyObject *"""
12678  return _IMP_core.ConstantPairPredicate__get_as_binary(self)
12679 
12680  def _set_from_binary(self, p):
12681  r"""_set_from_binary(ConstantPairPredicate self, PyObject * p)"""
12682  return _IMP_core.ConstantPairPredicate__set_from_binary(self, p)
12683 
12684  def __getstate__(self):
12685  p = self._get_as_binary()
12686  if len(self.__dict__) > 1:
12687  d = self.__dict__.copy()
12688  del d['this']
12689  p = (d, p)
12690  return p
12691 
12692  def __setstate__(self, p):
12693  if not hasattr(self, 'this'):
12694  self.__init__()
12695  if isinstance(p, tuple):
12696  d, p = p
12697  self.__dict__.update(d)
12698  return self._set_from_binary(p)
12699 
12700 
12701 # Register ConstantPairPredicate in _IMP_core:
12702 _IMP_core.ConstantPairPredicate_swigregister(ConstantPairPredicate)
12703 class UnorderedTypePairPredicate(IMP.PairPredicate):
12704  r"""Proxy of C++ IMP::core::UnorderedTypePairPredicate class."""
12705 
12706  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12707 
12708  def __init__(self, *args):
12709  r"""__init__(UnorderedTypePairPredicate self, std::string name="UnorderedTypePairPredicate%1%") -> UnorderedTypePairPredicate"""
12710  _IMP_core.UnorderedTypePairPredicate_swiginit(self, _IMP_core.new_UnorderedTypePairPredicate(*args))
12711 
12712  def do_get_inputs(self, m, pis):
12713  r"""do_get_inputs(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12714  return _IMP_core.UnorderedTypePairPredicate_do_get_inputs(self, m, pis)
12715 
12716  def get_value(self, *args):
12717  r"""
12718  get_value(UnorderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12719  get_value(UnorderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12720  """
12721  return _IMP_core.UnorderedTypePairPredicate_get_value(self, *args)
12722 
12723  def get_value_index(self, *args):
12724  r"""
12725  get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12726  get_value_index(UnorderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12727  """
12728  return _IMP_core.UnorderedTypePairPredicate_get_value_index(self, *args)
12729 
12730  def get_version_info(self):
12731  r"""get_version_info(UnorderedTypePairPredicate self) -> VersionInfo"""
12732  return _IMP_core.UnorderedTypePairPredicate_get_version_info(self)
12733  __swig_destroy__ = _IMP_core.delete_UnorderedTypePairPredicate
12734 
12735  def __str__(self):
12736  r"""__str__(UnorderedTypePairPredicate self) -> std::string"""
12737  return _IMP_core.UnorderedTypePairPredicate___str__(self)
12738 
12739  def __repr__(self):
12740  r"""__repr__(UnorderedTypePairPredicate self) -> std::string"""
12741  return _IMP_core.UnorderedTypePairPredicate___repr__(self)
12742 
12743  @staticmethod
12744  def get_from(o):
12745  return _object_cast_to_UnorderedTypePairPredicate(o)
12746 
12747 
12748  def _get_as_binary(self):
12749  r"""_get_as_binary(UnorderedTypePairPredicate self) -> PyObject *"""
12750  return _IMP_core.UnorderedTypePairPredicate__get_as_binary(self)
12751 
12752  def _set_from_binary(self, p):
12753  r"""_set_from_binary(UnorderedTypePairPredicate self, PyObject * p)"""
12754  return _IMP_core.UnorderedTypePairPredicate__set_from_binary(self, p)
12755 
12756  def __getstate__(self):
12757  p = self._get_as_binary()
12758  if len(self.__dict__) > 1:
12759  d = self.__dict__.copy()
12760  del d['this']
12761  p = (d, p)
12762  return p
12763 
12764  def __setstate__(self, p):
12765  if not hasattr(self, 'this'):
12766  self.__init__()
12767  if isinstance(p, tuple):
12768  d, p = p
12769  self.__dict__.update(d)
12770  return self._set_from_binary(p)
12771 
12772 
12773 # Register UnorderedTypePairPredicate in _IMP_core:
12774 _IMP_core.UnorderedTypePairPredicate_swigregister(UnorderedTypePairPredicate)
12775 class OrderedTypePairPredicate(IMP.PairPredicate):
12776  r"""Proxy of C++ IMP::core::OrderedTypePairPredicate class."""
12777 
12778  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12779 
12780  def __init__(self, *args):
12781  r"""__init__(OrderedTypePairPredicate self, std::string name="OrderedTypePairPredicate%1%") -> OrderedTypePairPredicate"""
12782  _IMP_core.OrderedTypePairPredicate_swiginit(self, _IMP_core.new_OrderedTypePairPredicate(*args))
12783 
12784  def do_get_inputs(self, m, pis):
12785  r"""do_get_inputs(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
12786  return _IMP_core.OrderedTypePairPredicate_do_get_inputs(self, m, pis)
12787 
12788  def get_value(self, *args):
12789  r"""
12790  get_value(OrderedTypePairPredicate self, IMP::core::ParticleTypes const & types) -> int
12791  get_value(OrderedTypePairPredicate self, IMP::ParticlePair const & a) -> int
12792  get_value(OrderedTypePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12793  """
12794  return _IMP_core.OrderedTypePairPredicate_get_value(self, *args)
12795 
12796  def get_value_index(self, *args):
12797  r"""
12798  get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12799  get_value_index(OrderedTypePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12800  """
12801  return _IMP_core.OrderedTypePairPredicate_get_value_index(self, *args)
12802 
12803  def get_version_info(self):
12804  r"""get_version_info(OrderedTypePairPredicate self) -> VersionInfo"""
12805  return _IMP_core.OrderedTypePairPredicate_get_version_info(self)
12806  __swig_destroy__ = _IMP_core.delete_OrderedTypePairPredicate
12807 
12808  def __str__(self):
12809  r"""__str__(OrderedTypePairPredicate self) -> std::string"""
12810  return _IMP_core.OrderedTypePairPredicate___str__(self)
12811 
12812  def __repr__(self):
12813  r"""__repr__(OrderedTypePairPredicate self) -> std::string"""
12814  return _IMP_core.OrderedTypePairPredicate___repr__(self)
12815 
12816  @staticmethod
12817  def get_from(o):
12818  return _object_cast_to_OrderedTypePairPredicate(o)
12819 
12820 
12821 # Register OrderedTypePairPredicate in _IMP_core:
12822 _IMP_core.OrderedTypePairPredicate_swigregister(OrderedTypePairPredicate)
12823 class AllSamePairPredicate(IMP.PairPredicate):
12824  r"""Proxy of C++ IMP::core::AllSamePairPredicate class."""
12825 
12826  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12827 
12828  def __init__(self, *args):
12829  r"""__init__(AllSamePairPredicate self, std::string name="AllSamePairPredicate%1%") -> AllSamePairPredicate"""
12830  _IMP_core.AllSamePairPredicate_swiginit(self, _IMP_core.new_AllSamePairPredicate(*args))
12831 
12832  def do_get_inputs(self, arg2, arg3):
12833  r"""do_get_inputs(AllSamePairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12834  return _IMP_core.AllSamePairPredicate_do_get_inputs(self, arg2, arg3)
12835 
12836  def get_value(self, *args):
12837  r"""
12838  get_value(AllSamePairPredicate self, IMP::ParticlePair const & a) -> int
12839  get_value(AllSamePairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12840  """
12841  return _IMP_core.AllSamePairPredicate_get_value(self, *args)
12842 
12843  def get_value_index(self, *args):
12844  r"""
12845  get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
12846  get_value_index(AllSamePairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12847  """
12848  return _IMP_core.AllSamePairPredicate_get_value_index(self, *args)
12849 
12850  def get_version_info(self):
12851  r"""get_version_info(AllSamePairPredicate self) -> VersionInfo"""
12852  return _IMP_core.AllSamePairPredicate_get_version_info(self)
12853  __swig_destroy__ = _IMP_core.delete_AllSamePairPredicate
12854 
12855  def __str__(self):
12856  r"""__str__(AllSamePairPredicate self) -> std::string"""
12857  return _IMP_core.AllSamePairPredicate___str__(self)
12858 
12859  def __repr__(self):
12860  r"""__repr__(AllSamePairPredicate self) -> std::string"""
12861  return _IMP_core.AllSamePairPredicate___repr__(self)
12862 
12863  @staticmethod
12864  def get_from(o):
12865  return _object_cast_to_AllSamePairPredicate(o)
12866 
12867 
12868  def _get_as_binary(self):
12869  r"""_get_as_binary(AllSamePairPredicate self) -> PyObject *"""
12870  return _IMP_core.AllSamePairPredicate__get_as_binary(self)
12871 
12872  def _set_from_binary(self, p):
12873  r"""_set_from_binary(AllSamePairPredicate self, PyObject * p)"""
12874  return _IMP_core.AllSamePairPredicate__set_from_binary(self, p)
12875 
12876  def __getstate__(self):
12877  p = self._get_as_binary()
12878  if len(self.__dict__) > 1:
12879  d = self.__dict__.copy()
12880  del d['this']
12881  p = (d, p)
12882  return p
12883 
12884  def __setstate__(self, p):
12885  if not hasattr(self, 'this'):
12886  self.__init__()
12887  if isinstance(p, tuple):
12888  d, p = p
12889  self.__dict__.update(d)
12890  return self._set_from_binary(p)
12891 
12892 
12893 # Register AllSamePairPredicate in _IMP_core:
12894 _IMP_core.AllSamePairPredicate_swigregister(AllSamePairPredicate)
12895 class CoinFlipPairPredicate(IMP.PairPredicate):
12896  r"""Proxy of C++ IMP::core::CoinFlipPairPredicate class."""
12897 
12898  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12899 
12900  def __init__(self, *args):
12901  r"""__init__(CoinFlipPairPredicate self, double p, std::string name="CoinFlipPairPredicate%1%") -> CoinFlipPairPredicate"""
12902  _IMP_core.CoinFlipPairPredicate_swiginit(self, _IMP_core.new_CoinFlipPairPredicate(*args))
12903 
12904  def do_get_inputs(self, arg2, arg3):
12905  r"""do_get_inputs(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12906  return _IMP_core.CoinFlipPairPredicate_do_get_inputs(self, arg2, arg3)
12907 
12908  def get_value(self, *args):
12909  r"""
12910  get_value(CoinFlipPairPredicate self, IMP::ParticlePair const & a) -> int
12911  get_value(CoinFlipPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
12912  """
12913  return _IMP_core.CoinFlipPairPredicate_get_value(self, *args)
12914 
12915  def get_value_index(self, *args):
12916  r"""
12917  get_value_index(CoinFlipPairPredicate self, Model arg2, IMP::ParticleIndexPair const & arg3) -> int
12918  get_value_index(CoinFlipPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
12919  """
12920  return _IMP_core.CoinFlipPairPredicate_get_value_index(self, *args)
12921 
12922  def get_version_info(self):
12923  r"""get_version_info(CoinFlipPairPredicate self) -> VersionInfo"""
12924  return _IMP_core.CoinFlipPairPredicate_get_version_info(self)
12925  __swig_destroy__ = _IMP_core.delete_CoinFlipPairPredicate
12926 
12927  def __str__(self):
12928  r"""__str__(CoinFlipPairPredicate self) -> std::string"""
12929  return _IMP_core.CoinFlipPairPredicate___str__(self)
12930 
12931  def __repr__(self):
12932  r"""__repr__(CoinFlipPairPredicate self) -> std::string"""
12933  return _IMP_core.CoinFlipPairPredicate___repr__(self)
12934 
12935  @staticmethod
12936  def get_from(o):
12937  return _object_cast_to_CoinFlipPairPredicate(o)
12938 
12939 
12940 # Register CoinFlipPairPredicate in _IMP_core:
12941 _IMP_core.CoinFlipPairPredicate_swigregister(CoinFlipPairPredicate)
12942 class ConstantTripletPredicate(IMP.TripletPredicate):
12943  r"""Proxy of C++ IMP::core::ConstantTripletPredicate class."""
12944 
12945  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
12946 
12947  def __init__(self, *args):
12948  r"""
12949  __init__(ConstantTripletPredicate self, int v, std::string name="ConstTripletPredicate%1%") -> ConstantTripletPredicate
12950  __init__(ConstantTripletPredicate self) -> ConstantTripletPredicate
12951  """
12952  _IMP_core.ConstantTripletPredicate_swiginit(self, _IMP_core.new_ConstantTripletPredicate(*args))
12953 
12954  def do_get_inputs(self, arg2, arg3):
12955  r"""do_get_inputs(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
12956  return _IMP_core.ConstantTripletPredicate_do_get_inputs(self, arg2, arg3)
12957 
12958  def get_value(self, *args):
12959  r"""
12960  get_value(ConstantTripletPredicate self, IMP::ParticleTriplet const & a) -> int
12961  get_value(ConstantTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
12962  """
12963  return _IMP_core.ConstantTripletPredicate_get_value(self, *args)
12964 
12965  def get_value_index(self, *args):
12966  r"""
12967  get_value_index(ConstantTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
12968  get_value_index(ConstantTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
12969  """
12970  return _IMP_core.ConstantTripletPredicate_get_value_index(self, *args)
12971 
12972  def get_version_info(self):
12973  r"""get_version_info(ConstantTripletPredicate self) -> VersionInfo"""
12974  return _IMP_core.ConstantTripletPredicate_get_version_info(self)
12975  __swig_destroy__ = _IMP_core.delete_ConstantTripletPredicate
12976 
12977  def __str__(self):
12978  r"""__str__(ConstantTripletPredicate self) -> std::string"""
12979  return _IMP_core.ConstantTripletPredicate___str__(self)
12980 
12981  def __repr__(self):
12982  r"""__repr__(ConstantTripletPredicate self) -> std::string"""
12983  return _IMP_core.ConstantTripletPredicate___repr__(self)
12984 
12985  @staticmethod
12986  def get_from(o):
12987  return _object_cast_to_ConstantTripletPredicate(o)
12988 
12989 
12990  def _get_as_binary(self):
12991  r"""_get_as_binary(ConstantTripletPredicate self) -> PyObject *"""
12992  return _IMP_core.ConstantTripletPredicate__get_as_binary(self)
12993 
12994  def _set_from_binary(self, p):
12995  r"""_set_from_binary(ConstantTripletPredicate self, PyObject * p)"""
12996  return _IMP_core.ConstantTripletPredicate__set_from_binary(self, p)
12997 
12998  def __getstate__(self):
12999  p = self._get_as_binary()
13000  if len(self.__dict__) > 1:
13001  d = self.__dict__.copy()
13002  del d['this']
13003  p = (d, p)
13004  return p
13005 
13006  def __setstate__(self, p):
13007  if not hasattr(self, 'this'):
13008  self.__init__()
13009  if isinstance(p, tuple):
13010  d, p = p
13011  self.__dict__.update(d)
13012  return self._set_from_binary(p)
13013 
13014 
13015 # Register ConstantTripletPredicate in _IMP_core:
13016 _IMP_core.ConstantTripletPredicate_swigregister(ConstantTripletPredicate)
13017 class UnorderedTypeTripletPredicate(IMP.TripletPredicate):
13018  r"""Proxy of C++ IMP::core::UnorderedTypeTripletPredicate class."""
13019 
13020  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13021 
13022  def __init__(self, *args):
13023  r"""__init__(UnorderedTypeTripletPredicate self, std::string name="UnorderedTypeTripletPredicate%1%") -> UnorderedTypeTripletPredicate"""
13024  _IMP_core.UnorderedTypeTripletPredicate_swiginit(self, _IMP_core.new_UnorderedTypeTripletPredicate(*args))
13025 
13026  def do_get_inputs(self, m, pis):
13027  r"""do_get_inputs(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13028  return _IMP_core.UnorderedTypeTripletPredicate_do_get_inputs(self, m, pis)
13029 
13030  def get_value(self, *args):
13031  r"""
13032  get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13033  get_value(UnorderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13034  """
13035  return _IMP_core.UnorderedTypeTripletPredicate_get_value(self, *args)
13036 
13037  def get_value_index(self, *args):
13038  r"""
13039  get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13040  get_value_index(UnorderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13041  """
13042  return _IMP_core.UnorderedTypeTripletPredicate_get_value_index(self, *args)
13043 
13044  def get_version_info(self):
13045  r"""get_version_info(UnorderedTypeTripletPredicate self) -> VersionInfo"""
13046  return _IMP_core.UnorderedTypeTripletPredicate_get_version_info(self)
13047  __swig_destroy__ = _IMP_core.delete_UnorderedTypeTripletPredicate
13048 
13049  def __str__(self):
13050  r"""__str__(UnorderedTypeTripletPredicate self) -> std::string"""
13051  return _IMP_core.UnorderedTypeTripletPredicate___str__(self)
13052 
13053  def __repr__(self):
13054  r"""__repr__(UnorderedTypeTripletPredicate self) -> std::string"""
13055  return _IMP_core.UnorderedTypeTripletPredicate___repr__(self)
13056 
13057  @staticmethod
13058  def get_from(o):
13059  return _object_cast_to_UnorderedTypeTripletPredicate(o)
13060 
13061 
13062  def _get_as_binary(self):
13063  r"""_get_as_binary(UnorderedTypeTripletPredicate self) -> PyObject *"""
13064  return _IMP_core.UnorderedTypeTripletPredicate__get_as_binary(self)
13065 
13066  def _set_from_binary(self, p):
13067  r"""_set_from_binary(UnorderedTypeTripletPredicate self, PyObject * p)"""
13068  return _IMP_core.UnorderedTypeTripletPredicate__set_from_binary(self, p)
13069 
13070  def __getstate__(self):
13071  p = self._get_as_binary()
13072  if len(self.__dict__) > 1:
13073  d = self.__dict__.copy()
13074  del d['this']
13075  p = (d, p)
13076  return p
13077 
13078  def __setstate__(self, p):
13079  if not hasattr(self, 'this'):
13080  self.__init__()
13081  if isinstance(p, tuple):
13082  d, p = p
13083  self.__dict__.update(d)
13084  return self._set_from_binary(p)
13085 
13086 
13087 # Register UnorderedTypeTripletPredicate in _IMP_core:
13088 _IMP_core.UnorderedTypeTripletPredicate_swigregister(UnorderedTypeTripletPredicate)
13089 class OrderedTypeTripletPredicate(IMP.TripletPredicate):
13090  r"""Proxy of C++ IMP::core::OrderedTypeTripletPredicate class."""
13091 
13092  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13093 
13094  def __init__(self, *args):
13095  r"""__init__(OrderedTypeTripletPredicate self, std::string name="OrderedTypeTripletPredicate%1%") -> OrderedTypeTripletPredicate"""
13096  _IMP_core.OrderedTypeTripletPredicate_swiginit(self, _IMP_core.new_OrderedTypeTripletPredicate(*args))
13097 
13098  def do_get_inputs(self, m, pis):
13099  r"""do_get_inputs(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13100  return _IMP_core.OrderedTypeTripletPredicate_do_get_inputs(self, m, pis)
13101 
13102  def get_value(self, *args):
13103  r"""
13104  get_value(OrderedTypeTripletPredicate self, IMP::core::ParticleTypes const & types) -> int
13105  get_value(OrderedTypeTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13106  get_value(OrderedTypeTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13107  """
13108  return _IMP_core.OrderedTypeTripletPredicate_get_value(self, *args)
13109 
13110  def get_value_index(self, *args):
13111  r"""
13112  get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13113  get_value_index(OrderedTypeTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13114  """
13115  return _IMP_core.OrderedTypeTripletPredicate_get_value_index(self, *args)
13116 
13117  def get_version_info(self):
13118  r"""get_version_info(OrderedTypeTripletPredicate self) -> VersionInfo"""
13119  return _IMP_core.OrderedTypeTripletPredicate_get_version_info(self)
13120  __swig_destroy__ = _IMP_core.delete_OrderedTypeTripletPredicate
13121 
13122  def __str__(self):
13123  r"""__str__(OrderedTypeTripletPredicate self) -> std::string"""
13124  return _IMP_core.OrderedTypeTripletPredicate___str__(self)
13125 
13126  def __repr__(self):
13127  r"""__repr__(OrderedTypeTripletPredicate self) -> std::string"""
13128  return _IMP_core.OrderedTypeTripletPredicate___repr__(self)
13129 
13130  @staticmethod
13131  def get_from(o):
13132  return _object_cast_to_OrderedTypeTripletPredicate(o)
13133 
13134 
13135 # Register OrderedTypeTripletPredicate in _IMP_core:
13136 _IMP_core.OrderedTypeTripletPredicate_swigregister(OrderedTypeTripletPredicate)
13137 class AllSameTripletPredicate(IMP.TripletPredicate):
13138  r"""Proxy of C++ IMP::core::AllSameTripletPredicate class."""
13139 
13140  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13141 
13142  def __init__(self, *args):
13143  r"""__init__(AllSameTripletPredicate self, std::string name="AllSameTripletPredicate%1%") -> AllSameTripletPredicate"""
13144  _IMP_core.AllSameTripletPredicate_swiginit(self, _IMP_core.new_AllSameTripletPredicate(*args))
13145 
13146  def do_get_inputs(self, arg2, arg3):
13147  r"""do_get_inputs(AllSameTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13148  return _IMP_core.AllSameTripletPredicate_do_get_inputs(self, arg2, arg3)
13149 
13150  def get_value(self, *args):
13151  r"""
13152  get_value(AllSameTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13153  get_value(AllSameTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13154  """
13155  return _IMP_core.AllSameTripletPredicate_get_value(self, *args)
13156 
13157  def get_value_index(self, *args):
13158  r"""
13159  get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplet const & pi) -> int
13160  get_value_index(AllSameTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13161  """
13162  return _IMP_core.AllSameTripletPredicate_get_value_index(self, *args)
13163 
13164  def get_version_info(self):
13165  r"""get_version_info(AllSameTripletPredicate self) -> VersionInfo"""
13166  return _IMP_core.AllSameTripletPredicate_get_version_info(self)
13167  __swig_destroy__ = _IMP_core.delete_AllSameTripletPredicate
13168 
13169  def __str__(self):
13170  r"""__str__(AllSameTripletPredicate self) -> std::string"""
13171  return _IMP_core.AllSameTripletPredicate___str__(self)
13172 
13173  def __repr__(self):
13174  r"""__repr__(AllSameTripletPredicate self) -> std::string"""
13175  return _IMP_core.AllSameTripletPredicate___repr__(self)
13176 
13177  @staticmethod
13178  def get_from(o):
13179  return _object_cast_to_AllSameTripletPredicate(o)
13180 
13181 
13182  def _get_as_binary(self):
13183  r"""_get_as_binary(AllSameTripletPredicate self) -> PyObject *"""
13184  return _IMP_core.AllSameTripletPredicate__get_as_binary(self)
13185 
13186  def _set_from_binary(self, p):
13187  r"""_set_from_binary(AllSameTripletPredicate self, PyObject * p)"""
13188  return _IMP_core.AllSameTripletPredicate__set_from_binary(self, p)
13189 
13190  def __getstate__(self):
13191  p = self._get_as_binary()
13192  if len(self.__dict__) > 1:
13193  d = self.__dict__.copy()
13194  del d['this']
13195  p = (d, p)
13196  return p
13197 
13198  def __setstate__(self, p):
13199  if not hasattr(self, 'this'):
13200  self.__init__()
13201  if isinstance(p, tuple):
13202  d, p = p
13203  self.__dict__.update(d)
13204  return self._set_from_binary(p)
13205 
13206 
13207 # Register AllSameTripletPredicate in _IMP_core:
13208 _IMP_core.AllSameTripletPredicate_swigregister(AllSameTripletPredicate)
13209 class CoinFlipTripletPredicate(IMP.TripletPredicate):
13210  r"""Proxy of C++ IMP::core::CoinFlipTripletPredicate class."""
13211 
13212  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13213 
13214  def __init__(self, *args):
13215  r"""__init__(CoinFlipTripletPredicate self, double p, std::string name="CoinFlipTripletPredicate%1%") -> CoinFlipTripletPredicate"""
13216  _IMP_core.CoinFlipTripletPredicate_swiginit(self, _IMP_core.new_CoinFlipTripletPredicate(*args))
13217 
13218  def do_get_inputs(self, arg2, arg3):
13219  r"""do_get_inputs(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13220  return _IMP_core.CoinFlipTripletPredicate_do_get_inputs(self, arg2, arg3)
13221 
13222  def get_value(self, *args):
13223  r"""
13224  get_value(CoinFlipTripletPredicate self, IMP::ParticleTriplet const & a) -> int
13225  get_value(CoinFlipTripletPredicate self, IMP::ParticleTripletsTemp const & o) -> IMP::Ints
13226  """
13227  return _IMP_core.CoinFlipTripletPredicate_get_value(self, *args)
13228 
13229  def get_value_index(self, *args):
13230  r"""
13231  get_value_index(CoinFlipTripletPredicate self, Model arg2, IMP::ParticleIndexTriplet const & arg3) -> int
13232  get_value_index(CoinFlipTripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
13233  """
13234  return _IMP_core.CoinFlipTripletPredicate_get_value_index(self, *args)
13235 
13236  def get_version_info(self):
13237  r"""get_version_info(CoinFlipTripletPredicate self) -> VersionInfo"""
13238  return _IMP_core.CoinFlipTripletPredicate_get_version_info(self)
13239  __swig_destroy__ = _IMP_core.delete_CoinFlipTripletPredicate
13240 
13241  def __str__(self):
13242  r"""__str__(CoinFlipTripletPredicate self) -> std::string"""
13243  return _IMP_core.CoinFlipTripletPredicate___str__(self)
13244 
13245  def __repr__(self):
13246  r"""__repr__(CoinFlipTripletPredicate self) -> std::string"""
13247  return _IMP_core.CoinFlipTripletPredicate___repr__(self)
13248 
13249  @staticmethod
13250  def get_from(o):
13251  return _object_cast_to_CoinFlipTripletPredicate(o)
13252 
13253 
13254 # Register CoinFlipTripletPredicate in _IMP_core:
13255 _IMP_core.CoinFlipTripletPredicate_swigregister(CoinFlipTripletPredicate)
13256 class ConstantQuadPredicate(IMP.QuadPredicate):
13257  r"""Proxy of C++ IMP::core::ConstantQuadPredicate class."""
13258 
13259  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13260 
13261  def __init__(self, *args):
13262  r"""
13263  __init__(ConstantQuadPredicate self, int v, std::string name="ConstQuadPredicate%1%") -> ConstantQuadPredicate
13264  __init__(ConstantQuadPredicate self) -> ConstantQuadPredicate
13265  """
13266  _IMP_core.ConstantQuadPredicate_swiginit(self, _IMP_core.new_ConstantQuadPredicate(*args))
13267 
13268  def do_get_inputs(self, arg2, arg3):
13269  r"""do_get_inputs(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13270  return _IMP_core.ConstantQuadPredicate_do_get_inputs(self, arg2, arg3)
13271 
13272  def get_value(self, *args):
13273  r"""
13274  get_value(ConstantQuadPredicate self, IMP::ParticleQuad const & a) -> int
13275  get_value(ConstantQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13276  """
13277  return _IMP_core.ConstantQuadPredicate_get_value(self, *args)
13278 
13279  def get_value_index(self, *args):
13280  r"""
13281  get_value_index(ConstantQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13282  get_value_index(ConstantQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13283  """
13284  return _IMP_core.ConstantQuadPredicate_get_value_index(self, *args)
13285 
13286  def get_version_info(self):
13287  r"""get_version_info(ConstantQuadPredicate self) -> VersionInfo"""
13288  return _IMP_core.ConstantQuadPredicate_get_version_info(self)
13289  __swig_destroy__ = _IMP_core.delete_ConstantQuadPredicate
13290 
13291  def __str__(self):
13292  r"""__str__(ConstantQuadPredicate self) -> std::string"""
13293  return _IMP_core.ConstantQuadPredicate___str__(self)
13294 
13295  def __repr__(self):
13296  r"""__repr__(ConstantQuadPredicate self) -> std::string"""
13297  return _IMP_core.ConstantQuadPredicate___repr__(self)
13298 
13299  @staticmethod
13300  def get_from(o):
13301  return _object_cast_to_ConstantQuadPredicate(o)
13302 
13303 
13304  def _get_as_binary(self):
13305  r"""_get_as_binary(ConstantQuadPredicate self) -> PyObject *"""
13306  return _IMP_core.ConstantQuadPredicate__get_as_binary(self)
13307 
13308  def _set_from_binary(self, p):
13309  r"""_set_from_binary(ConstantQuadPredicate self, PyObject * p)"""
13310  return _IMP_core.ConstantQuadPredicate__set_from_binary(self, p)
13311 
13312  def __getstate__(self):
13313  p = self._get_as_binary()
13314  if len(self.__dict__) > 1:
13315  d = self.__dict__.copy()
13316  del d['this']
13317  p = (d, p)
13318  return p
13319 
13320  def __setstate__(self, p):
13321  if not hasattr(self, 'this'):
13322  self.__init__()
13323  if isinstance(p, tuple):
13324  d, p = p
13325  self.__dict__.update(d)
13326  return self._set_from_binary(p)
13327 
13328 
13329 # Register ConstantQuadPredicate in _IMP_core:
13330 _IMP_core.ConstantQuadPredicate_swigregister(ConstantQuadPredicate)
13331 class UnorderedTypeQuadPredicate(IMP.QuadPredicate):
13332  r"""Proxy of C++ IMP::core::UnorderedTypeQuadPredicate class."""
13333 
13334  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13335 
13336  def __init__(self, *args):
13337  r"""__init__(UnorderedTypeQuadPredicate self, std::string name="UnorderedTypeQuadPredicate%1%") -> UnorderedTypeQuadPredicate"""
13338  _IMP_core.UnorderedTypeQuadPredicate_swiginit(self, _IMP_core.new_UnorderedTypeQuadPredicate(*args))
13339 
13340  def do_get_inputs(self, m, pis):
13341  r"""do_get_inputs(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13342  return _IMP_core.UnorderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13343 
13344  def get_value(self, *args):
13345  r"""
13346  get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13347  get_value(UnorderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13348  """
13349  return _IMP_core.UnorderedTypeQuadPredicate_get_value(self, *args)
13350 
13351  def get_value_index(self, *args):
13352  r"""
13353  get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13354  get_value_index(UnorderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13355  """
13356  return _IMP_core.UnorderedTypeQuadPredicate_get_value_index(self, *args)
13357 
13358  def get_version_info(self):
13359  r"""get_version_info(UnorderedTypeQuadPredicate self) -> VersionInfo"""
13360  return _IMP_core.UnorderedTypeQuadPredicate_get_version_info(self)
13361  __swig_destroy__ = _IMP_core.delete_UnorderedTypeQuadPredicate
13362 
13363  def __str__(self):
13364  r"""__str__(UnorderedTypeQuadPredicate self) -> std::string"""
13365  return _IMP_core.UnorderedTypeQuadPredicate___str__(self)
13366 
13367  def __repr__(self):
13368  r"""__repr__(UnorderedTypeQuadPredicate self) -> std::string"""
13369  return _IMP_core.UnorderedTypeQuadPredicate___repr__(self)
13370 
13371  @staticmethod
13372  def get_from(o):
13373  return _object_cast_to_UnorderedTypeQuadPredicate(o)
13374 
13375 
13376  def _get_as_binary(self):
13377  r"""_get_as_binary(UnorderedTypeQuadPredicate self) -> PyObject *"""
13378  return _IMP_core.UnorderedTypeQuadPredicate__get_as_binary(self)
13379 
13380  def _set_from_binary(self, p):
13381  r"""_set_from_binary(UnorderedTypeQuadPredicate self, PyObject * p)"""
13382  return _IMP_core.UnorderedTypeQuadPredicate__set_from_binary(self, p)
13383 
13384  def __getstate__(self):
13385  p = self._get_as_binary()
13386  if len(self.__dict__) > 1:
13387  d = self.__dict__.copy()
13388  del d['this']
13389  p = (d, p)
13390  return p
13391 
13392  def __setstate__(self, p):
13393  if not hasattr(self, 'this'):
13394  self.__init__()
13395  if isinstance(p, tuple):
13396  d, p = p
13397  self.__dict__.update(d)
13398  return self._set_from_binary(p)
13399 
13400 
13401 # Register UnorderedTypeQuadPredicate in _IMP_core:
13402 _IMP_core.UnorderedTypeQuadPredicate_swigregister(UnorderedTypeQuadPredicate)
13403 class OrderedTypeQuadPredicate(IMP.QuadPredicate):
13404  r"""Proxy of C++ IMP::core::OrderedTypeQuadPredicate class."""
13405 
13406  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13407 
13408  def __init__(self, *args):
13409  r"""__init__(OrderedTypeQuadPredicate self, std::string name="OrderedTypeQuadPredicate%1%") -> OrderedTypeQuadPredicate"""
13410  _IMP_core.OrderedTypeQuadPredicate_swiginit(self, _IMP_core.new_OrderedTypeQuadPredicate(*args))
13411 
13412  def do_get_inputs(self, m, pis):
13413  r"""do_get_inputs(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
13414  return _IMP_core.OrderedTypeQuadPredicate_do_get_inputs(self, m, pis)
13415 
13416  def get_value(self, *args):
13417  r"""
13418  get_value(OrderedTypeQuadPredicate self, IMP::core::ParticleTypes const & types) -> int
13419  get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuad const & a) -> int
13420  get_value(OrderedTypeQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13421  """
13422  return _IMP_core.OrderedTypeQuadPredicate_get_value(self, *args)
13423 
13424  def get_value_index(self, *args):
13425  r"""
13426  get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13427  get_value_index(OrderedTypeQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13428  """
13429  return _IMP_core.OrderedTypeQuadPredicate_get_value_index(self, *args)
13430 
13431  def get_version_info(self):
13432  r"""get_version_info(OrderedTypeQuadPredicate self) -> VersionInfo"""
13433  return _IMP_core.OrderedTypeQuadPredicate_get_version_info(self)
13434  __swig_destroy__ = _IMP_core.delete_OrderedTypeQuadPredicate
13435 
13436  def __str__(self):
13437  r"""__str__(OrderedTypeQuadPredicate self) -> std::string"""
13438  return _IMP_core.OrderedTypeQuadPredicate___str__(self)
13439 
13440  def __repr__(self):
13441  r"""__repr__(OrderedTypeQuadPredicate self) -> std::string"""
13442  return _IMP_core.OrderedTypeQuadPredicate___repr__(self)
13443 
13444  @staticmethod
13445  def get_from(o):
13446  return _object_cast_to_OrderedTypeQuadPredicate(o)
13447 
13448 
13449 # Register OrderedTypeQuadPredicate in _IMP_core:
13450 _IMP_core.OrderedTypeQuadPredicate_swigregister(OrderedTypeQuadPredicate)
13451 class AllSameQuadPredicate(IMP.QuadPredicate):
13452  r"""Proxy of C++ IMP::core::AllSameQuadPredicate class."""
13453 
13454  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13455 
13456  def __init__(self, *args):
13457  r"""__init__(AllSameQuadPredicate self, std::string name="AllSameQuadPredicate%1%") -> AllSameQuadPredicate"""
13458  _IMP_core.AllSameQuadPredicate_swiginit(self, _IMP_core.new_AllSameQuadPredicate(*args))
13459 
13460  def do_get_inputs(self, arg2, arg3):
13461  r"""do_get_inputs(AllSameQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13462  return _IMP_core.AllSameQuadPredicate_do_get_inputs(self, arg2, arg3)
13463 
13464  def get_value(self, *args):
13465  r"""
13466  get_value(AllSameQuadPredicate self, IMP::ParticleQuad const & a) -> int
13467  get_value(AllSameQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13468  """
13469  return _IMP_core.AllSameQuadPredicate_get_value(self, *args)
13470 
13471  def get_value_index(self, *args):
13472  r"""
13473  get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuad const & pi) -> int
13474  get_value_index(AllSameQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13475  """
13476  return _IMP_core.AllSameQuadPredicate_get_value_index(self, *args)
13477 
13478  def get_version_info(self):
13479  r"""get_version_info(AllSameQuadPredicate self) -> VersionInfo"""
13480  return _IMP_core.AllSameQuadPredicate_get_version_info(self)
13481  __swig_destroy__ = _IMP_core.delete_AllSameQuadPredicate
13482 
13483  def __str__(self):
13484  r"""__str__(AllSameQuadPredicate self) -> std::string"""
13485  return _IMP_core.AllSameQuadPredicate___str__(self)
13486 
13487  def __repr__(self):
13488  r"""__repr__(AllSameQuadPredicate self) -> std::string"""
13489  return _IMP_core.AllSameQuadPredicate___repr__(self)
13490 
13491  @staticmethod
13492  def get_from(o):
13493  return _object_cast_to_AllSameQuadPredicate(o)
13494 
13495 
13496  def _get_as_binary(self):
13497  r"""_get_as_binary(AllSameQuadPredicate self) -> PyObject *"""
13498  return _IMP_core.AllSameQuadPredicate__get_as_binary(self)
13499 
13500  def _set_from_binary(self, p):
13501  r"""_set_from_binary(AllSameQuadPredicate self, PyObject * p)"""
13502  return _IMP_core.AllSameQuadPredicate__set_from_binary(self, p)
13503 
13504  def __getstate__(self):
13505  p = self._get_as_binary()
13506  if len(self.__dict__) > 1:
13507  d = self.__dict__.copy()
13508  del d['this']
13509  p = (d, p)
13510  return p
13511 
13512  def __setstate__(self, p):
13513  if not hasattr(self, 'this'):
13514  self.__init__()
13515  if isinstance(p, tuple):
13516  d, p = p
13517  self.__dict__.update(d)
13518  return self._set_from_binary(p)
13519 
13520 
13521 # Register AllSameQuadPredicate in _IMP_core:
13522 _IMP_core.AllSameQuadPredicate_swigregister(AllSameQuadPredicate)
13523 class CoinFlipQuadPredicate(IMP.QuadPredicate):
13524  r"""Proxy of C++ IMP::core::CoinFlipQuadPredicate class."""
13525 
13526  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13527 
13528  def __init__(self, *args):
13529  r"""__init__(CoinFlipQuadPredicate self, double p, std::string name="CoinFlipQuadPredicate%1%") -> CoinFlipQuadPredicate"""
13530  _IMP_core.CoinFlipQuadPredicate_swiginit(self, _IMP_core.new_CoinFlipQuadPredicate(*args))
13531 
13532  def do_get_inputs(self, arg2, arg3):
13533  r"""do_get_inputs(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
13534  return _IMP_core.CoinFlipQuadPredicate_do_get_inputs(self, arg2, arg3)
13535 
13536  def get_value(self, *args):
13537  r"""
13538  get_value(CoinFlipQuadPredicate self, IMP::ParticleQuad const & a) -> int
13539  get_value(CoinFlipQuadPredicate self, IMP::ParticleQuadsTemp const & o) -> IMP::Ints
13540  """
13541  return _IMP_core.CoinFlipQuadPredicate_get_value(self, *args)
13542 
13543  def get_value_index(self, *args):
13544  r"""
13545  get_value_index(CoinFlipQuadPredicate self, Model arg2, IMP::ParticleIndexQuad const & arg3) -> int
13546  get_value_index(CoinFlipQuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
13547  """
13548  return _IMP_core.CoinFlipQuadPredicate_get_value_index(self, *args)
13549 
13550  def get_version_info(self):
13551  r"""get_version_info(CoinFlipQuadPredicate self) -> VersionInfo"""
13552  return _IMP_core.CoinFlipQuadPredicate_get_version_info(self)
13553  __swig_destroy__ = _IMP_core.delete_CoinFlipQuadPredicate
13554 
13555  def __str__(self):
13556  r"""__str__(CoinFlipQuadPredicate self) -> std::string"""
13557  return _IMP_core.CoinFlipQuadPredicate___str__(self)
13558 
13559  def __repr__(self):
13560  r"""__repr__(CoinFlipQuadPredicate self) -> std::string"""
13561  return _IMP_core.CoinFlipQuadPredicate___repr__(self)
13562 
13563  @staticmethod
13564  def get_from(o):
13565  return _object_cast_to_CoinFlipQuadPredicate(o)
13566 
13567 
13568 # Register CoinFlipQuadPredicate in _IMP_core:
13569 _IMP_core.CoinFlipQuadPredicate_swigregister(CoinFlipQuadPredicate)
13570 class InBoundingBox3DSingletonPredicate(IMP.SingletonPredicate):
13571  r"""Proxy of C++ IMP::core::InBoundingBox3DSingletonPredicate class."""
13572 
13573  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13574 
13575  def __init__(self, *args):
13576  r"""__init__(InBoundingBox3DSingletonPredicate self, BoundingBox3D bb, std::string name="InBoundingBox3DSingletonPredicate%1%") -> InBoundingBox3DSingletonPredicate"""
13577  _IMP_core.InBoundingBox3DSingletonPredicate_swiginit(self, _IMP_core.new_InBoundingBox3DSingletonPredicate(*args))
13578 
13579  def do_get_inputs(self, m, pi):
13580  r"""do_get_inputs(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13581  return _IMP_core.InBoundingBox3DSingletonPredicate_do_get_inputs(self, m, pi)
13582 
13583  def get_value(self, *args):
13584  r"""
13585  get_value(InBoundingBox3DSingletonPredicate self, Particle a) -> int
13586  get_value(InBoundingBox3DSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13587  """
13588  return _IMP_core.InBoundingBox3DSingletonPredicate_get_value(self, *args)
13589 
13590  def get_value_index(self, *args):
13591  r"""
13592  get_value_index(InBoundingBox3DSingletonPredicate self, Model m, ParticleIndex pi) -> int
13593  get_value_index(InBoundingBox3DSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13594  """
13595  return _IMP_core.InBoundingBox3DSingletonPredicate_get_value_index(self, *args)
13596 
13597  def get_version_info(self):
13598  r"""get_version_info(InBoundingBox3DSingletonPredicate self) -> VersionInfo"""
13599  return _IMP_core.InBoundingBox3DSingletonPredicate_get_version_info(self)
13600  __swig_destroy__ = _IMP_core.delete_InBoundingBox3DSingletonPredicate
13601 
13602  def __str__(self):
13603  r"""__str__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13604  return _IMP_core.InBoundingBox3DSingletonPredicate___str__(self)
13605 
13606  def __repr__(self):
13607  r"""__repr__(InBoundingBox3DSingletonPredicate self) -> std::string"""
13608  return _IMP_core.InBoundingBox3DSingletonPredicate___repr__(self)
13609 
13610  @staticmethod
13611  def get_from(o):
13612  return _object_cast_to_InBoundingBox3DSingletonPredicate(o)
13613 
13614 
13615 # Register InBoundingBox3DSingletonPredicate in _IMP_core:
13616 _IMP_core.InBoundingBox3DSingletonPredicate_swigregister(InBoundingBox3DSingletonPredicate)
13617 class AttributeSingletonPredicate(IMP.SingletonPredicate):
13618  r"""Proxy of C++ IMP::core::AttributeSingletonPredicate class."""
13619 
13620  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13621 
13622  def __init__(self, *args):
13623  r"""__init__(AttributeSingletonPredicate self, IntKey bb, std::string name="AttributeSingletonPredicate%1%") -> AttributeSingletonPredicate"""
13624  _IMP_core.AttributeSingletonPredicate_swiginit(self, _IMP_core.new_AttributeSingletonPredicate(*args))
13625 
13626  def do_get_inputs(self, m, pi):
13627  r"""do_get_inputs(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13628  return _IMP_core.AttributeSingletonPredicate_do_get_inputs(self, m, pi)
13629 
13630  def get_value(self, *args):
13631  r"""
13632  get_value(AttributeSingletonPredicate self, Particle a) -> int
13633  get_value(AttributeSingletonPredicate self, IMP::ParticlesTemp const & o) -> IMP::Ints
13634  """
13635  return _IMP_core.AttributeSingletonPredicate_get_value(self, *args)
13636 
13637  def get_value_index(self, *args):
13638  r"""
13639  get_value_index(AttributeSingletonPredicate self, Model m, ParticleIndex pi) -> int
13640  get_value_index(AttributeSingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
13641  """
13642  return _IMP_core.AttributeSingletonPredicate_get_value_index(self, *args)
13643 
13644  def get_version_info(self):
13645  r"""get_version_info(AttributeSingletonPredicate self) -> VersionInfo"""
13646  return _IMP_core.AttributeSingletonPredicate_get_version_info(self)
13647  __swig_destroy__ = _IMP_core.delete_AttributeSingletonPredicate
13648 
13649  def __str__(self):
13650  r"""__str__(AttributeSingletonPredicate self) -> std::string"""
13651  return _IMP_core.AttributeSingletonPredicate___str__(self)
13652 
13653  def __repr__(self):
13654  r"""__repr__(AttributeSingletonPredicate self) -> std::string"""
13655  return _IMP_core.AttributeSingletonPredicate___repr__(self)
13656 
13657  @staticmethod
13658  def get_from(o):
13659  return _object_cast_to_AttributeSingletonPredicate(o)
13660 
13661 
13662 # Register AttributeSingletonPredicate in _IMP_core:
13663 _IMP_core.AttributeSingletonPredicate_swigregister(AttributeSingletonPredicate)
13664 class IsCollisionPairPredicate(IMP.PairPredicate):
13665  r"""Proxy of C++ IMP::core::IsCollisionPairPredicate class."""
13666 
13667  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13668 
13669  def __init__(self, *args):
13670  r"""__init__(IsCollisionPairPredicate self, std::string name="CollisionPairPredicate%1%") -> IsCollisionPairPredicate"""
13671  _IMP_core.IsCollisionPairPredicate_swiginit(self, _IMP_core.new_IsCollisionPairPredicate(*args))
13672 
13673  def do_get_inputs(self, m, pi):
13674  r"""do_get_inputs(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexes const & pi) -> IMP::ModelObjectsTemp"""
13675  return _IMP_core.IsCollisionPairPredicate_do_get_inputs(self, m, pi)
13676 
13677  def get_value(self, *args):
13678  r"""
13679  get_value(IsCollisionPairPredicate self, IMP::ParticlePair const & a) -> int
13680  get_value(IsCollisionPairPredicate self, IMP::ParticlePairsTemp const & o) -> IMP::Ints
13681  """
13682  return _IMP_core.IsCollisionPairPredicate_get_value(self, *args)
13683 
13684  def get_value_index(self, *args):
13685  r"""
13686  get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPair const & pi) -> int
13687  get_value_index(IsCollisionPairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
13688  """
13689  return _IMP_core.IsCollisionPairPredicate_get_value_index(self, *args)
13690 
13691  def get_version_info(self):
13692  r"""get_version_info(IsCollisionPairPredicate self) -> VersionInfo"""
13693  return _IMP_core.IsCollisionPairPredicate_get_version_info(self)
13694  __swig_destroy__ = _IMP_core.delete_IsCollisionPairPredicate
13695 
13696  def __str__(self):
13697  r"""__str__(IsCollisionPairPredicate self) -> std::string"""
13698  return _IMP_core.IsCollisionPairPredicate___str__(self)
13699 
13700  def __repr__(self):
13701  r"""__repr__(IsCollisionPairPredicate self) -> std::string"""
13702  return _IMP_core.IsCollisionPairPredicate___repr__(self)
13703 
13704  @staticmethod
13705  def get_from(o):
13706  return _object_cast_to_IsCollisionPairPredicate(o)
13707 
13708 
13709 # Register IsCollisionPairPredicate in _IMP_core:
13710 _IMP_core.IsCollisionPairPredicate_swigregister(IsCollisionPairPredicate)
13711 class AngleRestraint(TripletRestraint):
13712  r"""Proxy of C++ IMP::core::AngleRestraint class."""
13713 
13714  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13715 
13716  def __init__(self, *args):
13717  r"""
13718  __init__(AngleRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3) -> AngleRestraint
13719  __init__(AngleRestraint self) -> AngleRestraint
13720  """
13721  _IMP_core.AngleRestraint_swiginit(self, _IMP_core.new_AngleRestraint(*args))
13722  __swig_destroy__ = _IMP_core.delete_AngleRestraint
13723 
13724  def __str__(self):
13725  r"""__str__(AngleRestraint self) -> std::string"""
13726  return _IMP_core.AngleRestraint___str__(self)
13727 
13728  def __repr__(self):
13729  r"""__repr__(AngleRestraint self) -> std::string"""
13730  return _IMP_core.AngleRestraint___repr__(self)
13731 
13732  @staticmethod
13733  def get_from(o):
13734  return _object_cast_to_AngleRestraint(o)
13735 
13736 
13737  def _get_as_binary(self):
13738  r"""_get_as_binary(AngleRestraint self) -> PyObject *"""
13739  return _IMP_core.AngleRestraint__get_as_binary(self)
13740 
13741  def _set_from_binary(self, p):
13742  r"""_set_from_binary(AngleRestraint self, PyObject * p)"""
13743  return _IMP_core.AngleRestraint__set_from_binary(self, p)
13744 
13745  def __getstate__(self):
13746  p = self._get_as_binary()
13747  if len(self.__dict__) > 1:
13748  d = self.__dict__.copy()
13749  del d['this']
13750  p = (d, p)
13751  return p
13752 
13753  def __setstate__(self, p):
13754  if not hasattr(self, 'this'):
13755  self.__init__()
13756  if isinstance(p, tuple):
13757  d, p = p
13758  self.__dict__.update(d)
13759  return self._set_from_binary(p)
13760 
13761 
13762 # Register AngleRestraint in _IMP_core:
13763 _IMP_core.AngleRestraint_swigregister(AngleRestraint)
13764 class DihedralRestraint(QuadRestraint):
13765  r"""Proxy of C++ IMP::core::DihedralRestraint 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, *args):
13770  r"""
13771  __init__(DihedralRestraint self, Model m, UnaryFunction score_func, _ParticleIndexAdaptor p1, _ParticleIndexAdaptor p2, _ParticleIndexAdaptor p3, _ParticleIndexAdaptor p4) -> DihedralRestraint
13772  __init__(DihedralRestraint self) -> DihedralRestraint
13773  """
13774  _IMP_core.DihedralRestraint_swiginit(self, _IMP_core.new_DihedralRestraint(*args))
13775  __swig_destroy__ = _IMP_core.delete_DihedralRestraint
13776 
13777  def __str__(self):
13778  r"""__str__(DihedralRestraint self) -> std::string"""
13779  return _IMP_core.DihedralRestraint___str__(self)
13780 
13781  def __repr__(self):
13782  r"""__repr__(DihedralRestraint self) -> std::string"""
13783  return _IMP_core.DihedralRestraint___repr__(self)
13784 
13785  @staticmethod
13786  def get_from(o):
13787  return _object_cast_to_DihedralRestraint(o)
13788 
13789 
13790  def _get_as_binary(self):
13791  r"""_get_as_binary(DihedralRestraint self) -> PyObject *"""
13792  return _IMP_core.DihedralRestraint__get_as_binary(self)
13793 
13794  def _set_from_binary(self, p):
13795  r"""_set_from_binary(DihedralRestraint self, PyObject * p)"""
13796  return _IMP_core.DihedralRestraint__set_from_binary(self, p)
13797 
13798  def __getstate__(self):
13799  p = self._get_as_binary()
13800  if len(self.__dict__) > 1:
13801  d = self.__dict__.copy()
13802  del d['this']
13803  p = (d, p)
13804  return p
13805 
13806  def __setstate__(self, p):
13807  if not hasattr(self, 'this'):
13808  self.__init__()
13809  if isinstance(p, tuple):
13810  d, p = p
13811  self.__dict__.update(d)
13812  return self._set_from_binary(p)
13813 
13814 
13815 # Register DihedralRestraint in _IMP_core:
13816 _IMP_core.DihedralRestraint_swigregister(DihedralRestraint)
13817 class RigidBodyMover(MonteCarloMover):
13818  r"""Proxy of C++ IMP::core::RigidBodyMover class."""
13819 
13820  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13821 
13822  def __init__(self, *args):
13823  r"""
13824  __init__(RigidBodyMover self, Model m, ParticleIndex pi, IMP::Float max_translation, IMP::Float max_rotation) -> RigidBodyMover
13825  __init__(RigidBodyMover self) -> RigidBodyMover
13826  """
13827  _IMP_core.RigidBodyMover_swiginit(self, _IMP_core.new_RigidBodyMover(*args))
13828 
13829  def set_maximum_translation(self, mt):
13830  r"""set_maximum_translation(RigidBodyMover self, IMP::Float mt)"""
13831  return _IMP_core.RigidBodyMover_set_maximum_translation(self, mt)
13832 
13833  def set_maximum_rotation(self, mr):
13834  r"""set_maximum_rotation(RigidBodyMover self, IMP::Float mr)"""
13835  return _IMP_core.RigidBodyMover_set_maximum_rotation(self, mr)
13836 
13837  def get_maximum_translation(self):
13838  r"""get_maximum_translation(RigidBodyMover self) -> IMP::Float"""
13839  return _IMP_core.RigidBodyMover_get_maximum_translation(self)
13840 
13841  def get_maximum_rotation(self):
13842  r"""get_maximum_rotation(RigidBodyMover self) -> IMP::Float"""
13843  return _IMP_core.RigidBodyMover_get_maximum_rotation(self)
13844 
13845  def get_index(self):
13846  r"""get_index(RigidBodyMover self) -> ParticleIndex"""
13847  return _IMP_core.RigidBodyMover_get_index(self)
13848 
13849  def get_version_info(self):
13850  r"""get_version_info(RigidBodyMover self) -> VersionInfo"""
13851  return _IMP_core.RigidBodyMover_get_version_info(self)
13852  __swig_destroy__ = _IMP_core.delete_RigidBodyMover
13853 
13854  def __str__(self):
13855  r"""__str__(RigidBodyMover self) -> std::string"""
13856  return _IMP_core.RigidBodyMover___str__(self)
13857 
13858  def __repr__(self):
13859  r"""__repr__(RigidBodyMover self) -> std::string"""
13860  return _IMP_core.RigidBodyMover___repr__(self)
13861 
13862  @staticmethod
13863  def get_from(o):
13864  return _object_cast_to_RigidBodyMover(o)
13865 
13866 
13867  def _get_as_binary(self):
13868  r"""_get_as_binary(RigidBodyMover self) -> PyObject *"""
13869  return _IMP_core.RigidBodyMover__get_as_binary(self)
13870 
13871  def _set_from_binary(self, p):
13872  r"""_set_from_binary(RigidBodyMover self, PyObject * p)"""
13873  return _IMP_core.RigidBodyMover__set_from_binary(self, p)
13874 
13875  def __getstate__(self):
13876  p = self._get_as_binary()
13877  if len(self.__dict__) > 1:
13878  d = self.__dict__.copy()
13879  del d['this']
13880  p = (d, p)
13881  return p
13882 
13883  def __setstate__(self, p):
13884  if not hasattr(self, 'this'):
13885  self.__init__()
13886  if isinstance(p, tuple):
13887  d, p = p
13888  self.__dict__.update(d)
13889  return self._set_from_binary(p)
13890 
13891 
13892  def _get_jax(self, space):
13893  import jax.random
13894  import IMP.core._jax_rigid
13895  from IMP.algebra.jax import (get_random_vector_on_3d_sphere,
13896  get_random_vector_in_3d_sphere,
13897  get_rotation_about_normalized_axis,
13898  _quaternion_multiply)
13899  max_angle = self.get_maximum_rotation()
13900  max_translation = self.get_maximum_translation()
13901  particle_index = self.get_index()
13902  body_index = IMP.core._jax_rigid._get_rigid_body_index(
13903  self.get_model(), self.get_index())
13904 
13905  def init_func(key):
13906  return key
13907 
13908  def propose_func(jm, key):
13909  body = jm['rigid_bodies'].bodies[body_index]
13910  tf = body.get_transformation(jm)
13911 
13912  if max_translation > 0:
13913  key, subkey = jax.random.split(key)
13914  tf.translation = space.shift(
13915  tf.translation,
13916  get_random_vector_in_3d_sphere(subkey, max_translation)[0])
13917  if max_angle > 0:
13918  key, subkey1, subkey2 = jax.random.split(key, 3)
13919  axis_norm = get_random_vector_on_3d_sphere(subkey1, 1.0)[0]
13920  angle = jax.random.uniform(
13921  subkey2, minval=-max_angle, maxval=max_angle)
13922  rotation = get_rotation_about_normalized_axis(axis_norm, angle)
13923  tf.rotation = _quaternion_multiply(rotation, tf.rotation)
13924  jm = body.set_transformation_lazy(tf, jm)
13925  return jm, key, 1.0
13926 
13927  return self._wrap_jax(init_func, propose_func, keys=['rigid_bodies'])
13928 
13929 
13930 # Register RigidBodyMover in _IMP_core:
13931 _IMP_core.RigidBodyMover_swigregister(RigidBodyMover)
13932 class RigidBodyTunneler(MonteCarloMover):
13933  r"""Proxy of C++ IMP::core::RigidBodyTunneler class."""
13934 
13935  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
13936 
13937  def __init__(self, m, pis, ref, k, move_probability=1.):
13938  r"""__init__(RigidBodyTunneler self, Model m, IMP::ParticleIndexes pis, ParticleIndex ref, double k, double move_probability=1.) -> RigidBodyTunneler"""
13939  _IMP_core.RigidBodyTunneler_swiginit(self, _IMP_core.new_RigidBodyTunneler(m, pis, ref, k, move_probability))
13940 
13941  def add_entry_point(self, fl):
13942  r"""add_entry_point(RigidBodyTunneler self, IMP::Floats fl)"""
13943  return _IMP_core.RigidBodyTunneler_add_entry_point(self, fl)
13944 
13945  def reset_stats(self):
13946  r"""reset_stats(RigidBodyTunneler self)"""
13947  return _IMP_core.RigidBodyTunneler_reset_stats(self)
13948 
13949  def get_number_of_rejected_moves(self):
13950  r"""get_number_of_rejected_moves(RigidBodyTunneler self) -> unsigned int"""
13951  return _IMP_core.RigidBodyTunneler_get_number_of_rejected_moves(self)
13952 
13953  def get_number_of_proposed_moves(self):
13954  r"""get_number_of_proposed_moves(RigidBodyTunneler self) -> unsigned int"""
13955  return _IMP_core.RigidBodyTunneler_get_number_of_proposed_moves(self)
13956 
13957  def get_number_of_impossible_moves(self):
13958  r"""get_number_of_impossible_moves(RigidBodyTunneler self) -> unsigned int"""
13959  return _IMP_core.RigidBodyTunneler_get_number_of_impossible_moves(self)
13960 
13961  def get_number_of_calls(self):
13962  r"""get_number_of_calls(RigidBodyTunneler self) -> unsigned int"""
13963  return _IMP_core.RigidBodyTunneler_get_number_of_calls(self)
13964 
13965  @staticmethod
13966  def get_reduced_coordinates(*args):
13967  r"""
13968  get_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref) -> IMP::Floats
13969  get_reduced_coordinates(Model m, ParticleIndex pi) -> IMP::Floats
13970  """
13971  return _IMP_core.RigidBodyTunneler_get_reduced_coordinates(*args)
13972 
13973  @staticmethod
13974  def set_reduced_coordinates(m, target, ref, coords):
13975  r"""set_reduced_coordinates(Model m, ParticleIndex target, ParticleIndex ref, IMP::Floats coords)"""
13976  return _IMP_core.RigidBodyTunneler_set_reduced_coordinates(m, target, ref, coords)
13977 
13978  def get_version_info(self):
13979  r"""get_version_info(RigidBodyTunneler self) -> VersionInfo"""
13980  return _IMP_core.RigidBodyTunneler_get_version_info(self)
13981  __swig_destroy__ = _IMP_core.delete_RigidBodyTunneler
13982 
13983  def __str__(self):
13984  r"""__str__(RigidBodyTunneler self) -> std::string"""
13985  return _IMP_core.RigidBodyTunneler___str__(self)
13986 
13987  def __repr__(self):
13988  r"""__repr__(RigidBodyTunneler self) -> std::string"""
13989  return _IMP_core.RigidBodyTunneler___repr__(self)
13990 
13991  @staticmethod
13992  def get_from(o):
13993  return _object_cast_to_RigidBodyTunneler(o)
13994 
13995 
13996 # Register RigidBodyTunneler in _IMP_core:
13997 _IMP_core.RigidBodyTunneler_swigregister(RigidBodyTunneler)
13998 class RigidBodyUmbrella(IMP.Restraint):
13999  r"""Proxy of C++ IMP::core::RigidBodyUmbrella class."""
14000 
14001  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14002 
14003  def __init__(self, *args):
14004  r"""
14005  __init__(RigidBodyUmbrella self, Model m, ParticleIndex pi, ParticleIndex ref, IMP::Floats x0, double alpha, double k, std::string name="RigidBodyUmbrella %1%") -> RigidBodyUmbrella
14006  __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
14007  """
14008  _IMP_core.RigidBodyUmbrella_swiginit(self, _IMP_core.new_RigidBodyUmbrella(*args))
14009 
14010  def set_x0(self, *args):
14011  r"""
14012  set_x0(RigidBodyUmbrella self, IMP::Floats x0)
14013  set_x0(RigidBodyUmbrella self, double _lambda, IMP::Floats x1, IMP::Floats x2)
14014  """
14015  return _IMP_core.RigidBodyUmbrella_set_x0(self, *args)
14016 
14017  def get_x0(self):
14018  r"""get_x0(RigidBodyUmbrella self) -> IMP::Floats"""
14019  return _IMP_core.RigidBodyUmbrella_get_x0(self)
14020 
14021  def get_x(self):
14022  r"""get_x(RigidBodyUmbrella self) -> IMP::Floats"""
14023  return _IMP_core.RigidBodyUmbrella_get_x(self)
14024 
14025  def set_alpha(self, alpha):
14026  r"""set_alpha(RigidBodyUmbrella self, double alpha)"""
14027  return _IMP_core.RigidBodyUmbrella_set_alpha(self, alpha)
14028 
14029  def set_k(self, k):
14030  r"""set_k(RigidBodyUmbrella self, double k)"""
14031  return _IMP_core.RigidBodyUmbrella_set_k(self, k)
14032 
14033  def get_version_info(self):
14034  r"""get_version_info(RigidBodyUmbrella self) -> VersionInfo"""
14035  return _IMP_core.RigidBodyUmbrella_get_version_info(self)
14036  __swig_destroy__ = _IMP_core.delete_RigidBodyUmbrella
14037 
14038  def __str__(self):
14039  r"""__str__(RigidBodyUmbrella self) -> std::string"""
14040  return _IMP_core.RigidBodyUmbrella___str__(self)
14041 
14042  def __repr__(self):
14043  r"""__repr__(RigidBodyUmbrella self) -> std::string"""
14044  return _IMP_core.RigidBodyUmbrella___repr__(self)
14045 
14046  @staticmethod
14047  def get_from(o):
14048  return _object_cast_to_RigidBodyUmbrella(o)
14049 
14050 
14051 # Register RigidBodyUmbrella in _IMP_core:
14052 _IMP_core.RigidBodyUmbrella_swigregister(RigidBodyUmbrella)
14053 class VolumeRestraint(IMP.Restraint):
14054  r"""Proxy of C++ IMP::core::VolumeRestraint class."""
14055 
14056  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14057 
14058  def __init__(self, f, sc, volume):
14059  r"""__init__(VolumeRestraint self, UnaryFunction f, SingletonContainer sc, double volume) -> VolumeRestraint"""
14060  _IMP_core.VolumeRestraint_swiginit(self, _IMP_core.new_VolumeRestraint(f, sc, volume))
14061 
14062  def do_get_inputs(self):
14063  r"""do_get_inputs(VolumeRestraint self) -> IMP::ModelObjectsTemp"""
14064  return _IMP_core.VolumeRestraint_do_get_inputs(self)
14065 
14066  def get_version_info(self):
14067  r"""get_version_info(VolumeRestraint self) -> VersionInfo"""
14068  return _IMP_core.VolumeRestraint_get_version_info(self)
14069  __swig_destroy__ = _IMP_core.delete_VolumeRestraint
14070 
14071  def __str__(self):
14072  r"""__str__(VolumeRestraint self) -> std::string"""
14073  return _IMP_core.VolumeRestraint___str__(self)
14074 
14075  def __repr__(self):
14076  r"""__repr__(VolumeRestraint self) -> std::string"""
14077  return _IMP_core.VolumeRestraint___repr__(self)
14078 
14079  @staticmethod
14080  def get_from(o):
14081  return _object_cast_to_VolumeRestraint(o)
14082 
14083 
14084 # Register VolumeRestraint in _IMP_core:
14085 _IMP_core.VolumeRestraint_swigregister(VolumeRestraint)
14086 
14087 def get_centroid(ps):
14088  r"""get_centroid(IMP::core::XYZs const & ps) -> Vector3D"""
14089  return _IMP_core.get_centroid(ps)
14090 
14091 def get_bounding_box(ps):
14092  r"""get_bounding_box(IMP::core::XYZRs const & ps) -> BoundingBox3D"""
14093  return _IMP_core.get_bounding_box(ps)
14094 class MoveStatisticsScoreState(IMP.ScoreState):
14095  r"""Proxy of C++ IMP::core::MoveStatisticsScoreState class."""
14096 
14097  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14098 
14099  def __init__(self, ps):
14100  r"""__init__(MoveStatisticsScoreState self, IMP::ParticlesTemp const & ps) -> MoveStatisticsScoreState"""
14101  _IMP_core.MoveStatisticsScoreState_swiginit(self, _IMP_core.new_MoveStatisticsScoreState(ps))
14102 
14103  def show_statistics(self, *args):
14104  r"""show_statistics(MoveStatisticsScoreState self, _ostream out=std::cout)"""
14105  return _IMP_core.MoveStatisticsScoreState_show_statistics(self, *args)
14106 
14107  def reset(self):
14108  r"""reset(MoveStatisticsScoreState self)"""
14109  return _IMP_core.MoveStatisticsScoreState_reset(self)
14110 
14111  def do_before_evaluate(self):
14112  r"""do_before_evaluate(MoveStatisticsScoreState self)"""
14113  return _IMP_core.MoveStatisticsScoreState_do_before_evaluate(self)
14114 
14115  def do_after_evaluate(self, da):
14116  r"""do_after_evaluate(MoveStatisticsScoreState self, DerivativeAccumulator da)"""
14117  return _IMP_core.MoveStatisticsScoreState_do_after_evaluate(self, da)
14118 
14119  def do_get_inputs(self):
14120  r"""do_get_inputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
14121  return _IMP_core.MoveStatisticsScoreState_do_get_inputs(self)
14122 
14123  def do_get_outputs(self):
14124  r"""do_get_outputs(MoveStatisticsScoreState self) -> IMP::ModelObjectsTemp"""
14125  return _IMP_core.MoveStatisticsScoreState_do_get_outputs(self)
14126 
14127  def get_version_info(self):
14128  r"""get_version_info(MoveStatisticsScoreState self) -> VersionInfo"""
14129  return _IMP_core.MoveStatisticsScoreState_get_version_info(self)
14130  __swig_destroy__ = _IMP_core.delete_MoveStatisticsScoreState
14131 
14132  def __str__(self):
14133  r"""__str__(MoveStatisticsScoreState self) -> std::string"""
14134  return _IMP_core.MoveStatisticsScoreState___str__(self)
14135 
14136  def __repr__(self):
14137  r"""__repr__(MoveStatisticsScoreState self) -> std::string"""
14138  return _IMP_core.MoveStatisticsScoreState___repr__(self)
14139 
14140  @staticmethod
14141  def get_from(o):
14142  return _object_cast_to_MoveStatisticsScoreState(o)
14143 
14144 
14145 # Register MoveStatisticsScoreState in _IMP_core:
14146 _IMP_core.MoveStatisticsScoreState_swigregister(MoveStatisticsScoreState)
14147 IMP_PARTICLE_TYPE_INDEX = _IMP_core.IMP_PARTICLE_TYPE_INDEX
14148 
14149 class Typed(IMP.Decorator):
14150  r"""Proxy of C++ IMP::core::Typed class."""
14151 
14152  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14153 
14154  @staticmethod
14155  def get_type_key():
14156  r"""get_type_key() -> IntKey"""
14157  return _IMP_core.Typed_get_type_key()
14158 
14159  def __init__(self, *args):
14160  r"""
14161  __init__(Typed self) -> Typed
14162  __init__(Typed self, Model m, ParticleIndex id) -> Typed
14163  __init__(Typed self, _ParticleAdaptor d) -> Typed
14164  """
14165  _IMP_core.Typed_swiginit(self, _IMP_core.new_Typed(*args))
14166 
14167  def show(self, *args):
14168  r"""show(Typed self, _ostream out=std::cout)"""
14169  return _IMP_core.Typed_show(self, *args)
14170 
14171  @staticmethod
14172  def setup_particle(*args):
14173  r"""
14174  setup_particle(Model m, ParticleIndex pi, ParticleType t) -> Typed
14175  setup_particle(_ParticleAdaptor pa, ParticleType t) -> Typed
14176  """
14177  return _IMP_core.Typed_setup_particle(*args)
14178 
14179  @staticmethod
14180  def get_is_setup(*args):
14181  r"""
14182  get_is_setup(_ParticleAdaptor p) -> bool
14183  get_is_setup(Model m, ParticleIndex pi) -> bool
14184  """
14185  return _IMP_core.Typed_get_is_setup(*args)
14186 
14187  def get_type(self):
14188  r"""get_type(Typed self) -> ParticleType"""
14189  return _IMP_core.Typed_get_type(self)
14190 
14191  def set_type(self, pt):
14192  r"""set_type(Typed self, ParticleType pt)"""
14193  return _IMP_core.Typed_set_type(self, pt)
14194 
14195  def add_attribute(self, *args):
14196  r"""
14197  add_attribute(Typed self, FloatKey k, IMP::Float v, bool opt)
14198  add_attribute(Typed self, FloatKey a0, IMP::Float a1)
14199  add_attribute(Typed self, IntKey a0, IMP::Int a1)
14200  add_attribute(Typed self, FloatsKey a0, IMP::Floats a1)
14201  add_attribute(Typed self, IntsKey a0, IMP::Ints a1)
14202  add_attribute(Typed self, StringKey a0, IMP::String a1)
14203  add_attribute(Typed self, ParticleIndexKey a0, Particle a1)
14204  add_attribute(Typed self, ObjectKey a0, Object a1)
14205  add_attribute(Typed self, SparseFloatKey a0, IMP::Float a1)
14206  add_attribute(Typed self, SparseIntKey a0, IMP::Int a1)
14207  add_attribute(Typed self, SparseStringKey a0, IMP::String a1)
14208  add_attribute(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14209  """
14210  return _IMP_core.Typed_add_attribute(self, *args)
14211 
14212  def get_value(self, *args):
14213  r"""
14214  get_value(Typed self, FloatKey a0) -> IMP::Float
14215  get_value(Typed self, IntKey a0) -> IMP::Int
14216  get_value(Typed self, FloatsKey a0) -> IMP::Floats
14217  get_value(Typed self, IntsKey a0) -> IMP::Ints
14218  get_value(Typed self, StringKey a0) -> IMP::String
14219  get_value(Typed self, ParticleIndexKey a0) -> Particle
14220  get_value(Typed self, ObjectKey a0) -> Object
14221  get_value(Typed self, SparseFloatKey a0) -> IMP::Float
14222  get_value(Typed self, SparseIntKey a0) -> IMP::Int
14223  get_value(Typed self, SparseStringKey a0) -> IMP::String
14224  get_value(Typed self, SparseParticleIndexKey a0) -> ParticleIndex
14225  """
14226  return _IMP_core.Typed_get_value(self, *args)
14227 
14228  def set_value(self, *args):
14229  r"""
14230  set_value(Typed self, FloatKey a0, IMP::Float a1)
14231  set_value(Typed self, IntKey a0, IMP::Int a1)
14232  set_value(Typed self, FloatsKey a0, IMP::Floats a1)
14233  set_value(Typed self, IntsKey a0, IMP::Ints a1)
14234  set_value(Typed self, StringKey a0, IMP::String a1)
14235  set_value(Typed self, ParticleIndexKey a0, Particle a1)
14236  set_value(Typed self, ObjectKey a0, Object a1)
14237  set_value(Typed self, SparseFloatKey a0, IMP::Float a1)
14238  set_value(Typed self, SparseIntKey a0, IMP::Int a1)
14239  set_value(Typed self, SparseStringKey a0, IMP::String a1)
14240  set_value(Typed self, SparseParticleIndexKey a0, ParticleIndex a1)
14241  """
14242  return _IMP_core.Typed_set_value(self, *args)
14243 
14244  def remove_attribute(self, *args):
14245  r"""
14246  remove_attribute(Typed self, FloatKey a0)
14247  remove_attribute(Typed self, IntKey a0)
14248  remove_attribute(Typed self, FloatsKey a0)
14249  remove_attribute(Typed self, IntsKey a0)
14250  remove_attribute(Typed self, StringKey a0)
14251  remove_attribute(Typed self, ParticleIndexKey a0)
14252  remove_attribute(Typed self, ObjectKey a0)
14253  remove_attribute(Typed self, SparseFloatKey a0)
14254  remove_attribute(Typed self, SparseIntKey a0)
14255  remove_attribute(Typed self, SparseStringKey a0)
14256  remove_attribute(Typed self, SparseParticleIndexKey a0)
14257  """
14258  return _IMP_core.Typed_remove_attribute(self, *args)
14259 
14260  def has_attribute(self, *args):
14261  r"""
14262  has_attribute(Typed self, FloatKey a0) -> bool
14263  has_attribute(Typed self, IntKey a0) -> bool
14264  has_attribute(Typed self, FloatsKey a0) -> bool
14265  has_attribute(Typed self, IntsKey a0) -> bool
14266  has_attribute(Typed self, StringKey a0) -> bool
14267  has_attribute(Typed self, ParticleIndexKey a0) -> bool
14268  has_attribute(Typed self, ObjectKey a0) -> bool
14269  has_attribute(Typed self, SparseFloatKey a0) -> bool
14270  has_attribute(Typed self, SparseIntKey a0) -> bool
14271  has_attribute(Typed self, SparseStringKey a0) -> bool
14272  has_attribute(Typed self, SparseParticleIndexKey a0) -> bool
14273  """
14274  return _IMP_core.Typed_has_attribute(self, *args)
14275 
14276  def get_derivative(self, a0):
14277  r"""get_derivative(Typed self, FloatKey a0) -> double"""
14278  return _IMP_core.Typed_get_derivative(self, a0)
14279 
14280  def get_name(self):
14281  r"""get_name(Typed self) -> std::string"""
14282  return _IMP_core.Typed_get_name(self)
14283 
14284  def clear_caches(self):
14285  r"""clear_caches(Typed self)"""
14286  return _IMP_core.Typed_clear_caches(self)
14287 
14288  def set_name(self, a0):
14289  r"""set_name(Typed self, std::string a0)"""
14290  return _IMP_core.Typed_set_name(self, a0)
14291 
14292  def set_check_level(self, a0):
14293  r"""set_check_level(Typed self, IMP::CheckLevel a0)"""
14294  return _IMP_core.Typed_set_check_level(self, a0)
14295 
14296  def add_to_derivative(self, a0, a1, a2):
14297  r"""add_to_derivative(Typed self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14298  return _IMP_core.Typed_add_to_derivative(self, a0, a1, a2)
14299 
14300  def set_is_optimized(self, a0, a1):
14301  r"""set_is_optimized(Typed self, FloatKey a0, bool a1)"""
14302  return _IMP_core.Typed_set_is_optimized(self, a0, a1)
14303 
14304  def get_is_optimized(self, a0):
14305  r"""get_is_optimized(Typed self, FloatKey a0) -> bool"""
14306  return _IMP_core.Typed_get_is_optimized(self, a0)
14307 
14308  def get_check_level(self):
14309  r"""get_check_level(Typed self) -> IMP::CheckLevel"""
14310  return _IMP_core.Typed_get_check_level(self)
14311 
14312  def __eq__(self, *args):
14313  r"""
14314  __eq__(Typed self, Typed o) -> bool
14315  __eq__(Typed self, Particle d) -> bool
14316  """
14317  return _IMP_core.Typed___eq__(self, *args)
14318 
14319  def __ne__(self, *args):
14320  r"""
14321  __ne__(Typed self, Typed o) -> bool
14322  __ne__(Typed self, Particle d) -> bool
14323  """
14324  return _IMP_core.Typed___ne__(self, *args)
14325 
14326  def __le__(self, *args):
14327  r"""
14328  __le__(Typed self, Typed o) -> bool
14329  __le__(Typed self, Particle d) -> bool
14330  """
14331  return _IMP_core.Typed___le__(self, *args)
14332 
14333  def __lt__(self, *args):
14334  r"""
14335  __lt__(Typed self, Typed o) -> bool
14336  __lt__(Typed self, Particle d) -> bool
14337  """
14338  return _IMP_core.Typed___lt__(self, *args)
14339 
14340  def __ge__(self, *args):
14341  r"""
14342  __ge__(Typed self, Typed o) -> bool
14343  __ge__(Typed self, Particle d) -> bool
14344  """
14345  return _IMP_core.Typed___ge__(self, *args)
14346 
14347  def __gt__(self, *args):
14348  r"""
14349  __gt__(Typed self, Typed o) -> bool
14350  __gt__(Typed self, Particle d) -> bool
14351  """
14352  return _IMP_core.Typed___gt__(self, *args)
14353 
14354  def __hash__(self):
14355  r"""__hash__(Typed self) -> std::size_t"""
14356  return _IMP_core.Typed___hash__(self)
14357 
14358  def __str__(self):
14359  r"""__str__(Typed self) -> std::string"""
14360  return _IMP_core.Typed___str__(self)
14361 
14362  def __repr__(self):
14363  r"""__repr__(Typed self) -> std::string"""
14364  return _IMP_core.Typed___repr__(self)
14365 
14366  def _get_as_binary(self):
14367  r"""_get_as_binary(Typed self) -> PyObject *"""
14368  return _IMP_core.Typed__get_as_binary(self)
14369 
14370  def _set_from_binary(self, p):
14371  r"""_set_from_binary(Typed self, PyObject * p)"""
14372  return _IMP_core.Typed__set_from_binary(self, p)
14373 
14374  def __getstate__(self):
14375  p = self._get_as_binary()
14376  if len(self.__dict__) > 1:
14377  d = self.__dict__.copy()
14378  del d['this']
14379  p = (d, p)
14380  return p
14381 
14382  def __setstate__(self, p):
14383  if not hasattr(self, 'this'):
14384  self.__init__()
14385  if isinstance(p, tuple):
14386  d, p = p
14387  self.__dict__.update(d)
14388  return self._set_from_binary(p)
14389 
14390  __swig_destroy__ = _IMP_core.delete_Typed
14391 
14392 # Register Typed in _IMP_core:
14393 _IMP_core.Typed_swigregister(Typed)
14394 
14395 def __lshift__(*args):
14396  r"""
14397  __lshift__(_ostream out, XYZ n) -> _ostream
14398  __lshift__(_ostream out, XYZR n) -> _ostream
14399  __lshift__(_ostream out, Direction n) -> _ostream
14400  __lshift__(_ostream out, DirectionAngle n) -> _ostream
14401  __lshift__(_ostream out, Surface n) -> _ostream
14402  __lshift__(_ostream out, Centroid n) -> _ostream
14403  __lshift__(_ostream out, Cover n) -> _ostream
14404  __lshift__(_ostream out, Reference n) -> _ostream
14405  __lshift__(_ostream out, RigidMember n) -> _ostream
14406  __lshift__(_ostream out, RigidBody n) -> _ostream
14407  __lshift__(_ostream out, Gaussian n) -> _ostream
14408  __lshift__(_ostream out, Typed n) -> _ostream
14409  """
14410  return _IMP_core.__lshift__(*args)
14411 class WriteRestraintScoresOptimizerState(IMP.OptimizerState):
14412  r"""Proxy of C++ IMP::core::WriteRestraintScoresOptimizerState class."""
14413 
14414  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14415 
14416  def __init__(self, rs, out):
14417  r"""__init__(WriteRestraintScoresOptimizerState self, IMP::Restraints const & rs, TextOutput out) -> WriteRestraintScoresOptimizerState"""
14418  _IMP_core.WriteRestraintScoresOptimizerState_swiginit(self, _IMP_core.new_WriteRestraintScoresOptimizerState(rs, out))
14419 
14420  def get_version_info(self):
14421  r"""get_version_info(WriteRestraintScoresOptimizerState self) -> VersionInfo"""
14422  return _IMP_core.WriteRestraintScoresOptimizerState_get_version_info(self)
14423  __swig_destroy__ = _IMP_core.delete_WriteRestraintScoresOptimizerState
14424 
14425  def __str__(self):
14426  r"""__str__(WriteRestraintScoresOptimizerState self) -> std::string"""
14427  return _IMP_core.WriteRestraintScoresOptimizerState___str__(self)
14428 
14429  def __repr__(self):
14430  r"""__repr__(WriteRestraintScoresOptimizerState self) -> std::string"""
14431  return _IMP_core.WriteRestraintScoresOptimizerState___repr__(self)
14432 
14433  @staticmethod
14434  def get_from(o):
14435  return _object_cast_to_WriteRestraintScoresOptimizerState(o)
14436 
14437 
14438 # Register WriteRestraintScoresOptimizerState in _IMP_core:
14439 _IMP_core.WriteRestraintScoresOptimizerState_swigregister(WriteRestraintScoresOptimizerState)
14440 
14441 def assign_blame(rs, ps, attribute):
14442  r"""assign_blame(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, FloatKey attribute)"""
14443  return _IMP_core.assign_blame(rs, ps, attribute)
14444 
14445 def create_blame_geometries(*args):
14446  r"""create_blame_geometries(IMP::RestraintsTemp const & rs, IMP::ParticlesTemp const & ps, double max=NO_MAX, std::string name=std::string()) -> IMP::display::Geometries"""
14447  return _IMP_core.create_blame_geometries(*args)
14448 class MultipleBinormalRestraint(IMP.Restraint):
14449  r"""Proxy of C++ IMP::core::MultipleBinormalRestraint class."""
14450 
14451  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14452 
14453  def __init__(self, m, q1, q2):
14454  r"""__init__(MultipleBinormalRestraint self, Model m, IMP::ParticleIndexQuad const & q1, IMP::ParticleIndexQuad const & q2) -> MultipleBinormalRestraint"""
14455  _IMP_core.MultipleBinormalRestraint_swiginit(self, _IMP_core.new_MultipleBinormalRestraint(m, q1, q2))
14456 
14457  def add_term(self, term):
14458  r"""add_term(MultipleBinormalRestraint self, BinormalTerm term)"""
14459  return _IMP_core.MultipleBinormalRestraint_add_term(self, term)
14460 
14461  def do_get_inputs(self):
14462  r"""do_get_inputs(MultipleBinormalRestraint self) -> IMP::ModelObjectsTemp"""
14463  return _IMP_core.MultipleBinormalRestraint_do_get_inputs(self)
14464 
14465  def get_version_info(self):
14466  r"""get_version_info(MultipleBinormalRestraint self) -> VersionInfo"""
14467  return _IMP_core.MultipleBinormalRestraint_get_version_info(self)
14468  __swig_destroy__ = _IMP_core.delete_MultipleBinormalRestraint
14469 
14470  def __str__(self):
14471  r"""__str__(MultipleBinormalRestraint self) -> std::string"""
14472  return _IMP_core.MultipleBinormalRestraint___str__(self)
14473 
14474  def __repr__(self):
14475  r"""__repr__(MultipleBinormalRestraint self) -> std::string"""
14476  return _IMP_core.MultipleBinormalRestraint___repr__(self)
14477 
14478  @staticmethod
14479  def get_from(o):
14480  return _object_cast_to_MultipleBinormalRestraint(o)
14481 
14482 
14483 # Register MultipleBinormalRestraint in _IMP_core:
14484 _IMP_core.MultipleBinormalRestraint_swigregister(MultipleBinormalRestraint)
14485 class BinormalTerm(object):
14486  r"""Proxy of C++ IMP::core::BinormalTerm class."""
14487 
14488  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14489 
14490  def __init__(self):
14491  r"""__init__(BinormalTerm self) -> BinormalTerm"""
14492  _IMP_core.BinormalTerm_swiginit(self, _IMP_core.new_BinormalTerm())
14493 
14494  def set_correlation(self, correlation):
14495  r"""set_correlation(BinormalTerm self, double correlation)"""
14496  return _IMP_core.BinormalTerm_set_correlation(self, correlation)
14497 
14498  def set_weight(self, weight):
14499  r"""set_weight(BinormalTerm self, double weight)"""
14500  return _IMP_core.BinormalTerm_set_weight(self, weight)
14501 
14502  def set_means(self, means):
14503  r"""set_means(BinormalTerm self, IMP::FloatPair means)"""
14504  return _IMP_core.BinormalTerm_set_means(self, means)
14505 
14506  def set_standard_deviations(self, stdevs):
14507  r"""set_standard_deviations(BinormalTerm self, IMP::FloatPair stdevs)"""
14508  return _IMP_core.BinormalTerm_set_standard_deviations(self, stdevs)
14509 
14510  def show(self, *args):
14511  r"""show(BinormalTerm self, _ostream out=std::cout)"""
14512  return _IMP_core.BinormalTerm_show(self, *args)
14513 
14514  def __str__(self):
14515  r"""__str__(BinormalTerm self) -> std::string"""
14516  return _IMP_core.BinormalTerm___str__(self)
14517 
14518  def __repr__(self):
14519  r"""__repr__(BinormalTerm self) -> std::string"""
14520  return _IMP_core.BinormalTerm___repr__(self)
14521 
14522  def _get_as_binary(self):
14523  r"""_get_as_binary(BinormalTerm self) -> PyObject *"""
14524  return _IMP_core.BinormalTerm__get_as_binary(self)
14525 
14526  def _set_from_binary(self, p):
14527  r"""_set_from_binary(BinormalTerm self, PyObject * p)"""
14528  return _IMP_core.BinormalTerm__set_from_binary(self, p)
14529 
14530  def __getstate__(self):
14531  p = self._get_as_binary()
14532  if len(self.__dict__) > 1:
14533  d = self.__dict__.copy()
14534  del d['this']
14535  p = (d, p)
14536  return p
14537 
14538  def __setstate__(self, p):
14539  if not hasattr(self, 'this'):
14540  self.__init__()
14541  if isinstance(p, tuple):
14542  d, p = p
14543  self.__dict__.update(d)
14544  return self._set_from_binary(p)
14545 
14546  __swig_destroy__ = _IMP_core.delete_BinormalTerm
14547 
14548 # Register BinormalTerm in _IMP_core:
14549 _IMP_core.BinormalTerm_swigregister(BinormalTerm)
14550 class Provenance(IMP.Decorator):
14551  r"""Proxy of C++ IMP::core::Provenance class."""
14552 
14553  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14554 
14555  def get_previous(self):
14556  r"""get_previous(Provenance self) -> Provenance"""
14557  return _IMP_core.Provenance_get_previous(self)
14558 
14559  def set_previous(self, p):
14560  r"""set_previous(Provenance self, Provenance p)"""
14561  return _IMP_core.Provenance_set_previous(self, p)
14562 
14563  def __init__(self, *args):
14564  r"""
14565  __init__(Provenance self) -> Provenance
14566  __init__(Provenance self, Model m, ParticleIndex id) -> Provenance
14567  __init__(Provenance self, _ParticleAdaptor d) -> Provenance
14568  """
14569  _IMP_core.Provenance_swiginit(self, _IMP_core.new_Provenance(*args))
14570 
14571  @staticmethod
14572  def get_is_setup(*args):
14573  r"""
14574  get_is_setup(Model m, ParticleIndex pi) -> bool
14575  get_is_setup(_ParticleAdaptor p) -> bool
14576  """
14577  return _IMP_core.Provenance_get_is_setup(*args)
14578 
14579  def show(self, *args):
14580  r"""show(Provenance self, _ostream out=std::cout)"""
14581  return _IMP_core.Provenance_show(self, *args)
14582 
14583  @staticmethod
14584  def setup_particle(*args):
14585  r"""
14586  setup_particle(Model m, ParticleIndex pi) -> Provenance
14587  setup_particle(_ParticleAdaptor pa) -> Provenance
14588  """
14589  return _IMP_core.Provenance_setup_particle(*args)
14590 
14591  def add_attribute(self, *args):
14592  r"""
14593  add_attribute(Provenance self, FloatKey k, IMP::Float v, bool opt)
14594  add_attribute(Provenance self, FloatKey a0, IMP::Float a1)
14595  add_attribute(Provenance self, IntKey a0, IMP::Int a1)
14596  add_attribute(Provenance self, FloatsKey a0, IMP::Floats a1)
14597  add_attribute(Provenance self, IntsKey a0, IMP::Ints a1)
14598  add_attribute(Provenance self, StringKey a0, IMP::String a1)
14599  add_attribute(Provenance self, ParticleIndexKey a0, Particle a1)
14600  add_attribute(Provenance self, ObjectKey a0, Object a1)
14601  add_attribute(Provenance self, SparseFloatKey a0, IMP::Float a1)
14602  add_attribute(Provenance self, SparseIntKey a0, IMP::Int a1)
14603  add_attribute(Provenance self, SparseStringKey a0, IMP::String a1)
14604  add_attribute(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14605  """
14606  return _IMP_core.Provenance_add_attribute(self, *args)
14607 
14608  def get_value(self, *args):
14609  r"""
14610  get_value(Provenance self, FloatKey a0) -> IMP::Float
14611  get_value(Provenance self, IntKey a0) -> IMP::Int
14612  get_value(Provenance self, FloatsKey a0) -> IMP::Floats
14613  get_value(Provenance self, IntsKey a0) -> IMP::Ints
14614  get_value(Provenance self, StringKey a0) -> IMP::String
14615  get_value(Provenance self, ParticleIndexKey a0) -> Particle
14616  get_value(Provenance self, ObjectKey a0) -> Object
14617  get_value(Provenance self, SparseFloatKey a0) -> IMP::Float
14618  get_value(Provenance self, SparseIntKey a0) -> IMP::Int
14619  get_value(Provenance self, SparseStringKey a0) -> IMP::String
14620  get_value(Provenance self, SparseParticleIndexKey a0) -> ParticleIndex
14621  """
14622  return _IMP_core.Provenance_get_value(self, *args)
14623 
14624  def set_value(self, *args):
14625  r"""
14626  set_value(Provenance self, FloatKey a0, IMP::Float a1)
14627  set_value(Provenance self, IntKey a0, IMP::Int a1)
14628  set_value(Provenance self, FloatsKey a0, IMP::Floats a1)
14629  set_value(Provenance self, IntsKey a0, IMP::Ints a1)
14630  set_value(Provenance self, StringKey a0, IMP::String a1)
14631  set_value(Provenance self, ParticleIndexKey a0, Particle a1)
14632  set_value(Provenance self, ObjectKey a0, Object a1)
14633  set_value(Provenance self, SparseFloatKey a0, IMP::Float a1)
14634  set_value(Provenance self, SparseIntKey a0, IMP::Int a1)
14635  set_value(Provenance self, SparseStringKey a0, IMP::String a1)
14636  set_value(Provenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14637  """
14638  return _IMP_core.Provenance_set_value(self, *args)
14639 
14640  def remove_attribute(self, *args):
14641  r"""
14642  remove_attribute(Provenance self, FloatKey a0)
14643  remove_attribute(Provenance self, IntKey a0)
14644  remove_attribute(Provenance self, FloatsKey a0)
14645  remove_attribute(Provenance self, IntsKey a0)
14646  remove_attribute(Provenance self, StringKey a0)
14647  remove_attribute(Provenance self, ParticleIndexKey a0)
14648  remove_attribute(Provenance self, ObjectKey a0)
14649  remove_attribute(Provenance self, SparseFloatKey a0)
14650  remove_attribute(Provenance self, SparseIntKey a0)
14651  remove_attribute(Provenance self, SparseStringKey a0)
14652  remove_attribute(Provenance self, SparseParticleIndexKey a0)
14653  """
14654  return _IMP_core.Provenance_remove_attribute(self, *args)
14655 
14656  def has_attribute(self, *args):
14657  r"""
14658  has_attribute(Provenance self, FloatKey a0) -> bool
14659  has_attribute(Provenance self, IntKey a0) -> bool
14660  has_attribute(Provenance self, FloatsKey a0) -> bool
14661  has_attribute(Provenance self, IntsKey a0) -> bool
14662  has_attribute(Provenance self, StringKey a0) -> bool
14663  has_attribute(Provenance self, ParticleIndexKey a0) -> bool
14664  has_attribute(Provenance self, ObjectKey a0) -> bool
14665  has_attribute(Provenance self, SparseFloatKey a0) -> bool
14666  has_attribute(Provenance self, SparseIntKey a0) -> bool
14667  has_attribute(Provenance self, SparseStringKey a0) -> bool
14668  has_attribute(Provenance self, SparseParticleIndexKey a0) -> bool
14669  """
14670  return _IMP_core.Provenance_has_attribute(self, *args)
14671 
14672  def get_derivative(self, a0):
14673  r"""get_derivative(Provenance self, FloatKey a0) -> double"""
14674  return _IMP_core.Provenance_get_derivative(self, a0)
14675 
14676  def get_name(self):
14677  r"""get_name(Provenance self) -> std::string"""
14678  return _IMP_core.Provenance_get_name(self)
14679 
14680  def clear_caches(self):
14681  r"""clear_caches(Provenance self)"""
14682  return _IMP_core.Provenance_clear_caches(self)
14683 
14684  def set_name(self, a0):
14685  r"""set_name(Provenance self, std::string a0)"""
14686  return _IMP_core.Provenance_set_name(self, a0)
14687 
14688  def set_check_level(self, a0):
14689  r"""set_check_level(Provenance self, IMP::CheckLevel a0)"""
14690  return _IMP_core.Provenance_set_check_level(self, a0)
14691 
14692  def add_to_derivative(self, a0, a1, a2):
14693  r"""add_to_derivative(Provenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14694  return _IMP_core.Provenance_add_to_derivative(self, a0, a1, a2)
14695 
14696  def set_is_optimized(self, a0, a1):
14697  r"""set_is_optimized(Provenance self, FloatKey a0, bool a1)"""
14698  return _IMP_core.Provenance_set_is_optimized(self, a0, a1)
14699 
14700  def get_is_optimized(self, a0):
14701  r"""get_is_optimized(Provenance self, FloatKey a0) -> bool"""
14702  return _IMP_core.Provenance_get_is_optimized(self, a0)
14703 
14704  def get_check_level(self):
14705  r"""get_check_level(Provenance self) -> IMP::CheckLevel"""
14706  return _IMP_core.Provenance_get_check_level(self)
14707 
14708  def __eq__(self, *args):
14709  r"""
14710  __eq__(Provenance self, Provenance o) -> bool
14711  __eq__(Provenance self, Particle d) -> bool
14712  """
14713  return _IMP_core.Provenance___eq__(self, *args)
14714 
14715  def __ne__(self, *args):
14716  r"""
14717  __ne__(Provenance self, Provenance o) -> bool
14718  __ne__(Provenance self, Particle d) -> bool
14719  """
14720  return _IMP_core.Provenance___ne__(self, *args)
14721 
14722  def __le__(self, *args):
14723  r"""
14724  __le__(Provenance self, Provenance o) -> bool
14725  __le__(Provenance self, Particle d) -> bool
14726  """
14727  return _IMP_core.Provenance___le__(self, *args)
14728 
14729  def __lt__(self, *args):
14730  r"""
14731  __lt__(Provenance self, Provenance o) -> bool
14732  __lt__(Provenance self, Particle d) -> bool
14733  """
14734  return _IMP_core.Provenance___lt__(self, *args)
14735 
14736  def __ge__(self, *args):
14737  r"""
14738  __ge__(Provenance self, Provenance o) -> bool
14739  __ge__(Provenance self, Particle d) -> bool
14740  """
14741  return _IMP_core.Provenance___ge__(self, *args)
14742 
14743  def __gt__(self, *args):
14744  r"""
14745  __gt__(Provenance self, Provenance o) -> bool
14746  __gt__(Provenance self, Particle d) -> bool
14747  """
14748  return _IMP_core.Provenance___gt__(self, *args)
14749 
14750  def __hash__(self):
14751  r"""__hash__(Provenance self) -> std::size_t"""
14752  return _IMP_core.Provenance___hash__(self)
14753 
14754  def __str__(self):
14755  r"""__str__(Provenance self) -> std::string"""
14756  return _IMP_core.Provenance___str__(self)
14757 
14758  def __repr__(self):
14759  r"""__repr__(Provenance self) -> std::string"""
14760  return _IMP_core.Provenance___repr__(self)
14761 
14762  def _get_as_binary(self):
14763  r"""_get_as_binary(Provenance self) -> PyObject *"""
14764  return _IMP_core.Provenance__get_as_binary(self)
14765 
14766  def _set_from_binary(self, p):
14767  r"""_set_from_binary(Provenance self, PyObject * p)"""
14768  return _IMP_core.Provenance__set_from_binary(self, p)
14769 
14770  def __getstate__(self):
14771  p = self._get_as_binary()
14772  if len(self.__dict__) > 1:
14773  d = self.__dict__.copy()
14774  del d['this']
14775  p = (d, p)
14776  return p
14777 
14778  def __setstate__(self, p):
14779  if not hasattr(self, 'this'):
14780  self.__init__()
14781  if isinstance(p, tuple):
14782  d, p = p
14783  self.__dict__.update(d)
14784  return self._set_from_binary(p)
14785 
14786  __swig_destroy__ = _IMP_core.delete_Provenance
14787 
14788 # Register Provenance in _IMP_core:
14789 _IMP_core.Provenance_swigregister(Provenance)
14790 class StructureProvenance(Provenance):
14791  r"""Proxy of C++ IMP::core::StructureProvenance class."""
14792 
14793  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
14794 
14795  def set_filename(self, filename):
14796  r"""set_filename(StructureProvenance self, std::string filename)"""
14797  return _IMP_core.StructureProvenance_set_filename(self, filename)
14798 
14799  def get_filename(self):
14800  r"""get_filename(StructureProvenance self) -> std::string"""
14801  return _IMP_core.StructureProvenance_get_filename(self)
14802 
14803  def set_chain_id(self, chain_id):
14804  r"""set_chain_id(StructureProvenance self, std::string chain_id)"""
14805  return _IMP_core.StructureProvenance_set_chain_id(self, chain_id)
14806 
14807  def get_chain_id(self):
14808  r"""get_chain_id(StructureProvenance self) -> std::string"""
14809  return _IMP_core.StructureProvenance_get_chain_id(self)
14810 
14811  def set_residue_offset(self, residue_offset):
14812  r"""set_residue_offset(StructureProvenance self, int residue_offset)"""
14813  return _IMP_core.StructureProvenance_set_residue_offset(self, residue_offset)
14814 
14815  def get_residue_offset(self):
14816  r"""get_residue_offset(StructureProvenance self) -> int"""
14817  return _IMP_core.StructureProvenance_get_residue_offset(self)
14818 
14819  def __init__(self, *args):
14820  r"""
14821  __init__(StructureProvenance self) -> StructureProvenance
14822  __init__(StructureProvenance self, Model m, ParticleIndex id) -> StructureProvenance
14823  __init__(StructureProvenance self, _ParticleAdaptor d) -> StructureProvenance
14824  """
14825  _IMP_core.StructureProvenance_swiginit(self, _IMP_core.new_StructureProvenance(*args))
14826 
14827  @staticmethod
14828  def get_is_setup(*args):
14829  r"""
14830  get_is_setup(Model m, ParticleIndex pi) -> bool
14831  get_is_setup(_ParticleAdaptor p) -> bool
14832  """
14833  return _IMP_core.StructureProvenance_get_is_setup(*args)
14834 
14835  def show(self, *args):
14836  r"""show(StructureProvenance self, _ostream out=std::cout)"""
14837  return _IMP_core.StructureProvenance_show(self, *args)
14838 
14839  @staticmethod
14840  def setup_particle(*args):
14841  r"""
14842  setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14843  setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id, int residue_offset) -> StructureProvenance
14844  setup_particle(Model m, ParticleIndex pi, std::string filename, std::string chain_id) -> StructureProvenance
14845  setup_particle(_ParticleAdaptor pa, std::string filename, std::string chain_id) -> StructureProvenance
14846  setup_particle(Model m, ParticleIndex pi, StructureProvenance o) -> StructureProvenance
14847  setup_particle(_ParticleAdaptor pa, StructureProvenance o) -> StructureProvenance
14848  """
14849  return _IMP_core.StructureProvenance_setup_particle(*args)
14850 
14851  def add_attribute(self, *args):
14852  r"""
14853  add_attribute(StructureProvenance self, FloatKey k, IMP::Float v, bool opt)
14854  add_attribute(StructureProvenance self, FloatKey a0, IMP::Float a1)
14855  add_attribute(StructureProvenance self, IntKey a0, IMP::Int a1)
14856  add_attribute(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14857  add_attribute(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14858  add_attribute(StructureProvenance self, StringKey a0, IMP::String a1)
14859  add_attribute(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14860  add_attribute(StructureProvenance self, ObjectKey a0, Object a1)
14861  add_attribute(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14862  add_attribute(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14863  add_attribute(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14864  add_attribute(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14865  """
14866  return _IMP_core.StructureProvenance_add_attribute(self, *args)
14867 
14868  def get_value(self, *args):
14869  r"""
14870  get_value(StructureProvenance self, FloatKey a0) -> IMP::Float
14871  get_value(StructureProvenance self, IntKey a0) -> IMP::Int
14872  get_value(StructureProvenance self, FloatsKey a0) -> IMP::Floats
14873  get_value(StructureProvenance self, IntsKey a0) -> IMP::Ints
14874  get_value(StructureProvenance self, StringKey a0) -> IMP::String
14875  get_value(StructureProvenance self, ParticleIndexKey a0) -> Particle
14876  get_value(StructureProvenance self, ObjectKey a0) -> Object
14877  get_value(StructureProvenance self, SparseFloatKey a0) -> IMP::Float
14878  get_value(StructureProvenance self, SparseIntKey a0) -> IMP::Int
14879  get_value(StructureProvenance self, SparseStringKey a0) -> IMP::String
14880  get_value(StructureProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
14881  """
14882  return _IMP_core.StructureProvenance_get_value(self, *args)
14883 
14884  def set_value(self, *args):
14885  r"""
14886  set_value(StructureProvenance self, FloatKey a0, IMP::Float a1)
14887  set_value(StructureProvenance self, IntKey a0, IMP::Int a1)
14888  set_value(StructureProvenance self, FloatsKey a0, IMP::Floats a1)
14889  set_value(StructureProvenance self, IntsKey a0, IMP::Ints a1)
14890  set_value(StructureProvenance self, StringKey a0, IMP::String a1)
14891  set_value(StructureProvenance self, ParticleIndexKey a0, Particle a1)
14892  set_value(StructureProvenance self, ObjectKey a0, Object a1)
14893  set_value(StructureProvenance self, SparseFloatKey a0, IMP::Float a1)
14894  set_value(StructureProvenance self, SparseIntKey a0, IMP::Int a1)
14895  set_value(StructureProvenance self, SparseStringKey a0, IMP::String a1)
14896  set_value(StructureProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
14897  """
14898  return _IMP_core.StructureProvenance_set_value(self, *args)
14899 
14900  def remove_attribute(self, *args):
14901  r"""
14902  remove_attribute(StructureProvenance self, FloatKey a0)
14903  remove_attribute(StructureProvenance self, IntKey a0)
14904  remove_attribute(StructureProvenance self, FloatsKey a0)
14905  remove_attribute(StructureProvenance self, IntsKey a0)
14906  remove_attribute(StructureProvenance self, StringKey a0)
14907  remove_attribute(StructureProvenance self, ParticleIndexKey a0)
14908  remove_attribute(StructureProvenance self, ObjectKey a0)
14909  remove_attribute(StructureProvenance self, SparseFloatKey a0)
14910  remove_attribute(StructureProvenance self, SparseIntKey a0)
14911  remove_attribute(StructureProvenance self, SparseStringKey a0)
14912  remove_attribute(StructureProvenance self, SparseParticleIndexKey a0)
14913  """
14914  return _IMP_core.StructureProvenance_remove_attribute(self, *args)
14915 
14916  def has_attribute(self, *args):
14917  r"""
14918  has_attribute(StructureProvenance self, FloatKey a0) -> bool
14919  has_attribute(StructureProvenance self, IntKey a0) -> bool
14920  has_attribute(StructureProvenance self, FloatsKey a0) -> bool
14921  has_attribute(StructureProvenance self, IntsKey a0) -> bool
14922  has_attribute(StructureProvenance self, StringKey a0) -> bool
14923  has_attribute(StructureProvenance self, ParticleIndexKey a0) -> bool
14924  has_attribute(StructureProvenance self, ObjectKey a0) -> bool
14925  has_attribute(StructureProvenance self, SparseFloatKey a0) -> bool
14926  has_attribute(StructureProvenance self, SparseIntKey a0) -> bool
14927  has_attribute(StructureProvenance self, SparseStringKey a0) -> bool
14928  has_attribute(StructureProvenance self, SparseParticleIndexKey a0) -> bool
14929  """
14930  return _IMP_core.StructureProvenance_has_attribute(self, *args)
14931 
14932  def get_derivative(self, a0):
14933  r"""get_derivative(StructureProvenance self, FloatKey a0) -> double"""
14934  return _IMP_core.StructureProvenance_get_derivative(self, a0)
14935 
14936  def get_name(self):
14937  r"""get_name(StructureProvenance self) -> std::string"""
14938  return _IMP_core.StructureProvenance_get_name(self)
14939 
14940  def clear_caches(self):
14941  r"""clear_caches(StructureProvenance self)"""
14942  return _IMP_core.StructureProvenance_clear_caches(self)
14943 
14944  def set_name(self, a0):
14945  r"""set_name(StructureProvenance self, std::string a0)"""
14946  return _IMP_core.StructureProvenance_set_name(self, a0)
14947 
14948  def set_check_level(self, a0):
14949  r"""set_check_level(StructureProvenance self, IMP::CheckLevel a0)"""
14950  return _IMP_core.StructureProvenance_set_check_level(self, a0)
14951 
14952  def add_to_derivative(self, a0, a1, a2):
14953  r"""add_to_derivative(StructureProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
14954  return _IMP_core.StructureProvenance_add_to_derivative(self, a0, a1, a2)
14955 
14956  def set_is_optimized(self, a0, a1):
14957  r"""set_is_optimized(StructureProvenance self, FloatKey a0, bool a1)"""
14958  return _IMP_core.StructureProvenance_set_is_optimized(self, a0, a1)
14959 
14960  def get_is_optimized(self, a0):
14961  r"""get_is_optimized(StructureProvenance self, FloatKey a0) -> bool"""
14962  return _IMP_core.StructureProvenance_get_is_optimized(self, a0)
14963 
14964  def get_check_level(self):
14965  r"""get_check_level(StructureProvenance self) -> IMP::CheckLevel"""
14966  return _IMP_core.StructureProvenance_get_check_level(self)
14967 
14968  def __eq__(self, *args):
14969  r"""
14970  __eq__(StructureProvenance self, StructureProvenance o) -> bool
14971  __eq__(StructureProvenance self, Particle d) -> bool
14972  """
14973  return _IMP_core.StructureProvenance___eq__(self, *args)
14974 
14975  def __ne__(self, *args):
14976  r"""
14977  __ne__(StructureProvenance self, StructureProvenance o) -> bool
14978  __ne__(StructureProvenance self, Particle d) -> bool
14979  """
14980  return _IMP_core.StructureProvenance___ne__(self, *args)
14981 
14982  def __le__(self, *args):
14983  r"""
14984  __le__(StructureProvenance self, StructureProvenance o) -> bool
14985  __le__(StructureProvenance self, Particle d) -> bool
14986  """
14987  return _IMP_core.StructureProvenance___le__(self, *args)
14988 
14989  def __lt__(self, *args):
14990  r"""
14991  __lt__(StructureProvenance self, StructureProvenance o) -> bool
14992  __lt__(StructureProvenance self, Particle d) -> bool
14993  """
14994  return _IMP_core.StructureProvenance___lt__(self, *args)
14995 
14996  def __ge__(self, *args):
14997  r"""
14998  __ge__(StructureProvenance self, StructureProvenance o) -> bool
14999  __ge__(StructureProvenance self, Particle d) -> bool
15000  """
15001  return _IMP_core.StructureProvenance___ge__(self, *args)
15002 
15003  def __gt__(self, *args):
15004  r"""
15005  __gt__(StructureProvenance self, StructureProvenance o) -> bool
15006  __gt__(StructureProvenance self, Particle d) -> bool
15007  """
15008  return _IMP_core.StructureProvenance___gt__(self, *args)
15009 
15010  def __hash__(self):
15011  r"""__hash__(StructureProvenance self) -> std::size_t"""
15012  return _IMP_core.StructureProvenance___hash__(self)
15013 
15014  def __str__(self):
15015  r"""__str__(StructureProvenance self) -> std::string"""
15016  return _IMP_core.StructureProvenance___str__(self)
15017 
15018  def __repr__(self):
15019  r"""__repr__(StructureProvenance self) -> std::string"""
15020  return _IMP_core.StructureProvenance___repr__(self)
15021 
15022  def _get_as_binary(self):
15023  r"""_get_as_binary(StructureProvenance self) -> PyObject *"""
15024  return _IMP_core.StructureProvenance__get_as_binary(self)
15025 
15026  def _set_from_binary(self, p):
15027  r"""_set_from_binary(StructureProvenance self, PyObject * p)"""
15028  return _IMP_core.StructureProvenance__set_from_binary(self, p)
15029 
15030  def __getstate__(self):
15031  p = self._get_as_binary()
15032  if len(self.__dict__) > 1:
15033  d = self.__dict__.copy()
15034  del d['this']
15035  p = (d, p)
15036  return p
15037 
15038  def __setstate__(self, p):
15039  if not hasattr(self, 'this'):
15040  self.__init__()
15041  if isinstance(p, tuple):
15042  d, p = p
15043  self.__dict__.update(d)
15044  return self._set_from_binary(p)
15045 
15046  __swig_destroy__ = _IMP_core.delete_StructureProvenance
15047 
15048 # Register StructureProvenance in _IMP_core:
15049 _IMP_core.StructureProvenance_swigregister(StructureProvenance)
15050 class SampleProvenance(Provenance):
15051  r"""Proxy of C++ IMP::core::SampleProvenance class."""
15052 
15053  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15054 
15055  def set_method(self, method):
15056  r"""set_method(SampleProvenance self, std::string method)"""
15057  return _IMP_core.SampleProvenance_set_method(self, method)
15058 
15059  def get_method(self):
15060  r"""get_method(SampleProvenance self) -> std::string"""
15061  return _IMP_core.SampleProvenance_get_method(self)
15062 
15063  def set_number_of_frames(self, frames):
15064  r"""set_number_of_frames(SampleProvenance self, int frames)"""
15065  return _IMP_core.SampleProvenance_set_number_of_frames(self, frames)
15066 
15067  def get_number_of_frames(self):
15068  r"""get_number_of_frames(SampleProvenance self) -> int"""
15069  return _IMP_core.SampleProvenance_get_number_of_frames(self)
15070 
15071  def set_number_of_iterations(self, iterations):
15072  r"""set_number_of_iterations(SampleProvenance self, int iterations)"""
15073  return _IMP_core.SampleProvenance_set_number_of_iterations(self, iterations)
15074 
15075  def get_number_of_iterations(self):
15076  r"""get_number_of_iterations(SampleProvenance self) -> int"""
15077  return _IMP_core.SampleProvenance_get_number_of_iterations(self)
15078 
15079  def set_number_of_replicas(self, replicas):
15080  r"""set_number_of_replicas(SampleProvenance self, int replicas)"""
15081  return _IMP_core.SampleProvenance_set_number_of_replicas(self, replicas)
15082 
15083  def get_number_of_replicas(self):
15084  r"""get_number_of_replicas(SampleProvenance self) -> int"""
15085  return _IMP_core.SampleProvenance_get_number_of_replicas(self)
15086 
15087  def __init__(self, *args):
15088  r"""
15089  __init__(SampleProvenance self) -> SampleProvenance
15090  __init__(SampleProvenance self, Model m, ParticleIndex id) -> SampleProvenance
15091  __init__(SampleProvenance self, _ParticleAdaptor d) -> SampleProvenance
15092  """
15093  _IMP_core.SampleProvenance_swiginit(self, _IMP_core.new_SampleProvenance(*args))
15094 
15095  @staticmethod
15096  def get_is_setup(*args):
15097  r"""
15098  get_is_setup(Model m, ParticleIndex pi) -> bool
15099  get_is_setup(_ParticleAdaptor p) -> bool
15100  """
15101  return _IMP_core.SampleProvenance_get_is_setup(*args)
15102 
15103  def show(self, *args):
15104  r"""show(SampleProvenance self, _ostream out=std::cout)"""
15105  return _IMP_core.SampleProvenance_show(self, *args)
15106 
15107  @staticmethod
15108  def setup_particle(*args):
15109  r"""
15110  setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
15111  setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations, int replicas) -> SampleProvenance
15112  setup_particle(Model m, ParticleIndex pi, std::string method, int frames, int iterations) -> SampleProvenance
15113  setup_particle(_ParticleAdaptor pa, std::string method, int frames, int iterations) -> SampleProvenance
15114  setup_particle(Model m, ParticleIndex pi, SampleProvenance o) -> SampleProvenance
15115  setup_particle(_ParticleAdaptor pa, SampleProvenance o) -> SampleProvenance
15116  """
15117  return _IMP_core.SampleProvenance_setup_particle(*args)
15118 
15119  def add_attribute(self, *args):
15120  r"""
15121  add_attribute(SampleProvenance self, FloatKey k, IMP::Float v, bool opt)
15122  add_attribute(SampleProvenance self, FloatKey a0, IMP::Float a1)
15123  add_attribute(SampleProvenance self, IntKey a0, IMP::Int a1)
15124  add_attribute(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
15125  add_attribute(SampleProvenance self, IntsKey a0, IMP::Ints a1)
15126  add_attribute(SampleProvenance self, StringKey a0, IMP::String a1)
15127  add_attribute(SampleProvenance self, ParticleIndexKey a0, Particle a1)
15128  add_attribute(SampleProvenance self, ObjectKey a0, Object a1)
15129  add_attribute(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
15130  add_attribute(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
15131  add_attribute(SampleProvenance self, SparseStringKey a0, IMP::String a1)
15132  add_attribute(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15133  """
15134  return _IMP_core.SampleProvenance_add_attribute(self, *args)
15135 
15136  def get_value(self, *args):
15137  r"""
15138  get_value(SampleProvenance self, FloatKey a0) -> IMP::Float
15139  get_value(SampleProvenance self, IntKey a0) -> IMP::Int
15140  get_value(SampleProvenance self, FloatsKey a0) -> IMP::Floats
15141  get_value(SampleProvenance self, IntsKey a0) -> IMP::Ints
15142  get_value(SampleProvenance self, StringKey a0) -> IMP::String
15143  get_value(SampleProvenance self, ParticleIndexKey a0) -> Particle
15144  get_value(SampleProvenance self, ObjectKey a0) -> Object
15145  get_value(SampleProvenance self, SparseFloatKey a0) -> IMP::Float
15146  get_value(SampleProvenance self, SparseIntKey a0) -> IMP::Int
15147  get_value(SampleProvenance self, SparseStringKey a0) -> IMP::String
15148  get_value(SampleProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15149  """
15150  return _IMP_core.SampleProvenance_get_value(self, *args)
15151 
15152  def set_value(self, *args):
15153  r"""
15154  set_value(SampleProvenance self, FloatKey a0, IMP::Float a1)
15155  set_value(SampleProvenance self, IntKey a0, IMP::Int a1)
15156  set_value(SampleProvenance self, FloatsKey a0, IMP::Floats a1)
15157  set_value(SampleProvenance self, IntsKey a0, IMP::Ints a1)
15158  set_value(SampleProvenance self, StringKey a0, IMP::String a1)
15159  set_value(SampleProvenance self, ParticleIndexKey a0, Particle a1)
15160  set_value(SampleProvenance self, ObjectKey a0, Object a1)
15161  set_value(SampleProvenance self, SparseFloatKey a0, IMP::Float a1)
15162  set_value(SampleProvenance self, SparseIntKey a0, IMP::Int a1)
15163  set_value(SampleProvenance self, SparseStringKey a0, IMP::String a1)
15164  set_value(SampleProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15165  """
15166  return _IMP_core.SampleProvenance_set_value(self, *args)
15167 
15168  def remove_attribute(self, *args):
15169  r"""
15170  remove_attribute(SampleProvenance self, FloatKey a0)
15171  remove_attribute(SampleProvenance self, IntKey a0)
15172  remove_attribute(SampleProvenance self, FloatsKey a0)
15173  remove_attribute(SampleProvenance self, IntsKey a0)
15174  remove_attribute(SampleProvenance self, StringKey a0)
15175  remove_attribute(SampleProvenance self, ParticleIndexKey a0)
15176  remove_attribute(SampleProvenance self, ObjectKey a0)
15177  remove_attribute(SampleProvenance self, SparseFloatKey a0)
15178  remove_attribute(SampleProvenance self, SparseIntKey a0)
15179  remove_attribute(SampleProvenance self, SparseStringKey a0)
15180  remove_attribute(SampleProvenance self, SparseParticleIndexKey a0)
15181  """
15182  return _IMP_core.SampleProvenance_remove_attribute(self, *args)
15183 
15184  def has_attribute(self, *args):
15185  r"""
15186  has_attribute(SampleProvenance self, FloatKey a0) -> bool
15187  has_attribute(SampleProvenance self, IntKey a0) -> bool
15188  has_attribute(SampleProvenance self, FloatsKey a0) -> bool
15189  has_attribute(SampleProvenance self, IntsKey a0) -> bool
15190  has_attribute(SampleProvenance self, StringKey a0) -> bool
15191  has_attribute(SampleProvenance self, ParticleIndexKey a0) -> bool
15192  has_attribute(SampleProvenance self, ObjectKey a0) -> bool
15193  has_attribute(SampleProvenance self, SparseFloatKey a0) -> bool
15194  has_attribute(SampleProvenance self, SparseIntKey a0) -> bool
15195  has_attribute(SampleProvenance self, SparseStringKey a0) -> bool
15196  has_attribute(SampleProvenance self, SparseParticleIndexKey a0) -> bool
15197  """
15198  return _IMP_core.SampleProvenance_has_attribute(self, *args)
15199 
15200  def get_derivative(self, a0):
15201  r"""get_derivative(SampleProvenance self, FloatKey a0) -> double"""
15202  return _IMP_core.SampleProvenance_get_derivative(self, a0)
15203 
15204  def get_name(self):
15205  r"""get_name(SampleProvenance self) -> std::string"""
15206  return _IMP_core.SampleProvenance_get_name(self)
15207 
15208  def clear_caches(self):
15209  r"""clear_caches(SampleProvenance self)"""
15210  return _IMP_core.SampleProvenance_clear_caches(self)
15211 
15212  def set_name(self, a0):
15213  r"""set_name(SampleProvenance self, std::string a0)"""
15214  return _IMP_core.SampleProvenance_set_name(self, a0)
15215 
15216  def set_check_level(self, a0):
15217  r"""set_check_level(SampleProvenance self, IMP::CheckLevel a0)"""
15218  return _IMP_core.SampleProvenance_set_check_level(self, a0)
15219 
15220  def add_to_derivative(self, a0, a1, a2):
15221  r"""add_to_derivative(SampleProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15222  return _IMP_core.SampleProvenance_add_to_derivative(self, a0, a1, a2)
15223 
15224  def set_is_optimized(self, a0, a1):
15225  r"""set_is_optimized(SampleProvenance self, FloatKey a0, bool a1)"""
15226  return _IMP_core.SampleProvenance_set_is_optimized(self, a0, a1)
15227 
15228  def get_is_optimized(self, a0):
15229  r"""get_is_optimized(SampleProvenance self, FloatKey a0) -> bool"""
15230  return _IMP_core.SampleProvenance_get_is_optimized(self, a0)
15231 
15232  def get_check_level(self):
15233  r"""get_check_level(SampleProvenance self) -> IMP::CheckLevel"""
15234  return _IMP_core.SampleProvenance_get_check_level(self)
15235 
15236  def __eq__(self, *args):
15237  r"""
15238  __eq__(SampleProvenance self, SampleProvenance o) -> bool
15239  __eq__(SampleProvenance self, Particle d) -> bool
15240  """
15241  return _IMP_core.SampleProvenance___eq__(self, *args)
15242 
15243  def __ne__(self, *args):
15244  r"""
15245  __ne__(SampleProvenance self, SampleProvenance o) -> bool
15246  __ne__(SampleProvenance self, Particle d) -> bool
15247  """
15248  return _IMP_core.SampleProvenance___ne__(self, *args)
15249 
15250  def __le__(self, *args):
15251  r"""
15252  __le__(SampleProvenance self, SampleProvenance o) -> bool
15253  __le__(SampleProvenance self, Particle d) -> bool
15254  """
15255  return _IMP_core.SampleProvenance___le__(self, *args)
15256 
15257  def __lt__(self, *args):
15258  r"""
15259  __lt__(SampleProvenance self, SampleProvenance o) -> bool
15260  __lt__(SampleProvenance self, Particle d) -> bool
15261  """
15262  return _IMP_core.SampleProvenance___lt__(self, *args)
15263 
15264  def __ge__(self, *args):
15265  r"""
15266  __ge__(SampleProvenance self, SampleProvenance o) -> bool
15267  __ge__(SampleProvenance self, Particle d) -> bool
15268  """
15269  return _IMP_core.SampleProvenance___ge__(self, *args)
15270 
15271  def __gt__(self, *args):
15272  r"""
15273  __gt__(SampleProvenance self, SampleProvenance o) -> bool
15274  __gt__(SampleProvenance self, Particle d) -> bool
15275  """
15276  return _IMP_core.SampleProvenance___gt__(self, *args)
15277 
15278  def __hash__(self):
15279  r"""__hash__(SampleProvenance self) -> std::size_t"""
15280  return _IMP_core.SampleProvenance___hash__(self)
15281 
15282  def __str__(self):
15283  r"""__str__(SampleProvenance self) -> std::string"""
15284  return _IMP_core.SampleProvenance___str__(self)
15285 
15286  def __repr__(self):
15287  r"""__repr__(SampleProvenance self) -> std::string"""
15288  return _IMP_core.SampleProvenance___repr__(self)
15289 
15290  def _get_as_binary(self):
15291  r"""_get_as_binary(SampleProvenance self) -> PyObject *"""
15292  return _IMP_core.SampleProvenance__get_as_binary(self)
15293 
15294  def _set_from_binary(self, p):
15295  r"""_set_from_binary(SampleProvenance self, PyObject * p)"""
15296  return _IMP_core.SampleProvenance__set_from_binary(self, p)
15297 
15298  def __getstate__(self):
15299  p = self._get_as_binary()
15300  if len(self.__dict__) > 1:
15301  d = self.__dict__.copy()
15302  del d['this']
15303  p = (d, p)
15304  return p
15305 
15306  def __setstate__(self, p):
15307  if not hasattr(self, 'this'):
15308  self.__init__()
15309  if isinstance(p, tuple):
15310  d, p = p
15311  self.__dict__.update(d)
15312  return self._set_from_binary(p)
15313 
15314  __swig_destroy__ = _IMP_core.delete_SampleProvenance
15315 
15316 # Register SampleProvenance in _IMP_core:
15317 _IMP_core.SampleProvenance_swigregister(SampleProvenance)
15318 class CombineProvenance(Provenance):
15319  r"""Proxy of C++ IMP::core::CombineProvenance class."""
15320 
15321  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15322 
15323  def set_number_of_frames(self, frames):
15324  r"""set_number_of_frames(CombineProvenance self, int frames)"""
15325  return _IMP_core.CombineProvenance_set_number_of_frames(self, frames)
15326 
15327  def get_number_of_frames(self):
15328  r"""get_number_of_frames(CombineProvenance self) -> int"""
15329  return _IMP_core.CombineProvenance_get_number_of_frames(self)
15330 
15331  def set_number_of_runs(self, runs):
15332  r"""set_number_of_runs(CombineProvenance self, int runs)"""
15333  return _IMP_core.CombineProvenance_set_number_of_runs(self, runs)
15334 
15335  def get_number_of_runs(self):
15336  r"""get_number_of_runs(CombineProvenance self) -> int"""
15337  return _IMP_core.CombineProvenance_get_number_of_runs(self)
15338 
15339  def __init__(self, *args):
15340  r"""
15341  __init__(CombineProvenance self) -> CombineProvenance
15342  __init__(CombineProvenance self, Model m, ParticleIndex id) -> CombineProvenance
15343  __init__(CombineProvenance self, _ParticleAdaptor d) -> CombineProvenance
15344  """
15345  _IMP_core.CombineProvenance_swiginit(self, _IMP_core.new_CombineProvenance(*args))
15346 
15347  @staticmethod
15348  def get_is_setup(*args):
15349  r"""
15350  get_is_setup(Model m, ParticleIndex pi) -> bool
15351  get_is_setup(_ParticleAdaptor p) -> bool
15352  """
15353  return _IMP_core.CombineProvenance_get_is_setup(*args)
15354 
15355  def show(self, *args):
15356  r"""show(CombineProvenance self, _ostream out=std::cout)"""
15357  return _IMP_core.CombineProvenance_show(self, *args)
15358 
15359  @staticmethod
15360  def setup_particle(*args):
15361  r"""
15362  setup_particle(Model m, ParticleIndex pi, int runs, int frames) -> CombineProvenance
15363  setup_particle(_ParticleAdaptor pa, int runs, int frames) -> CombineProvenance
15364  setup_particle(Model m, ParticleIndex pi, CombineProvenance o) -> CombineProvenance
15365  setup_particle(_ParticleAdaptor pa, CombineProvenance o) -> CombineProvenance
15366  """
15367  return _IMP_core.CombineProvenance_setup_particle(*args)
15368 
15369  def add_attribute(self, *args):
15370  r"""
15371  add_attribute(CombineProvenance self, FloatKey k, IMP::Float v, bool opt)
15372  add_attribute(CombineProvenance self, FloatKey a0, IMP::Float a1)
15373  add_attribute(CombineProvenance self, IntKey a0, IMP::Int a1)
15374  add_attribute(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15375  add_attribute(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15376  add_attribute(CombineProvenance self, StringKey a0, IMP::String a1)
15377  add_attribute(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15378  add_attribute(CombineProvenance self, ObjectKey a0, Object a1)
15379  add_attribute(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15380  add_attribute(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15381  add_attribute(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15382  add_attribute(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15383  """
15384  return _IMP_core.CombineProvenance_add_attribute(self, *args)
15385 
15386  def get_value(self, *args):
15387  r"""
15388  get_value(CombineProvenance self, FloatKey a0) -> IMP::Float
15389  get_value(CombineProvenance self, IntKey a0) -> IMP::Int
15390  get_value(CombineProvenance self, FloatsKey a0) -> IMP::Floats
15391  get_value(CombineProvenance self, IntsKey a0) -> IMP::Ints
15392  get_value(CombineProvenance self, StringKey a0) -> IMP::String
15393  get_value(CombineProvenance self, ParticleIndexKey a0) -> Particle
15394  get_value(CombineProvenance self, ObjectKey a0) -> Object
15395  get_value(CombineProvenance self, SparseFloatKey a0) -> IMP::Float
15396  get_value(CombineProvenance self, SparseIntKey a0) -> IMP::Int
15397  get_value(CombineProvenance self, SparseStringKey a0) -> IMP::String
15398  get_value(CombineProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15399  """
15400  return _IMP_core.CombineProvenance_get_value(self, *args)
15401 
15402  def set_value(self, *args):
15403  r"""
15404  set_value(CombineProvenance self, FloatKey a0, IMP::Float a1)
15405  set_value(CombineProvenance self, IntKey a0, IMP::Int a1)
15406  set_value(CombineProvenance self, FloatsKey a0, IMP::Floats a1)
15407  set_value(CombineProvenance self, IntsKey a0, IMP::Ints a1)
15408  set_value(CombineProvenance self, StringKey a0, IMP::String a1)
15409  set_value(CombineProvenance self, ParticleIndexKey a0, Particle a1)
15410  set_value(CombineProvenance self, ObjectKey a0, Object a1)
15411  set_value(CombineProvenance self, SparseFloatKey a0, IMP::Float a1)
15412  set_value(CombineProvenance self, SparseIntKey a0, IMP::Int a1)
15413  set_value(CombineProvenance self, SparseStringKey a0, IMP::String a1)
15414  set_value(CombineProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15415  """
15416  return _IMP_core.CombineProvenance_set_value(self, *args)
15417 
15418  def remove_attribute(self, *args):
15419  r"""
15420  remove_attribute(CombineProvenance self, FloatKey a0)
15421  remove_attribute(CombineProvenance self, IntKey a0)
15422  remove_attribute(CombineProvenance self, FloatsKey a0)
15423  remove_attribute(CombineProvenance self, IntsKey a0)
15424  remove_attribute(CombineProvenance self, StringKey a0)
15425  remove_attribute(CombineProvenance self, ParticleIndexKey a0)
15426  remove_attribute(CombineProvenance self, ObjectKey a0)
15427  remove_attribute(CombineProvenance self, SparseFloatKey a0)
15428  remove_attribute(CombineProvenance self, SparseIntKey a0)
15429  remove_attribute(CombineProvenance self, SparseStringKey a0)
15430  remove_attribute(CombineProvenance self, SparseParticleIndexKey a0)
15431  """
15432  return _IMP_core.CombineProvenance_remove_attribute(self, *args)
15433 
15434  def has_attribute(self, *args):
15435  r"""
15436  has_attribute(CombineProvenance self, FloatKey a0) -> bool
15437  has_attribute(CombineProvenance self, IntKey a0) -> bool
15438  has_attribute(CombineProvenance self, FloatsKey a0) -> bool
15439  has_attribute(CombineProvenance self, IntsKey a0) -> bool
15440  has_attribute(CombineProvenance self, StringKey a0) -> bool
15441  has_attribute(CombineProvenance self, ParticleIndexKey a0) -> bool
15442  has_attribute(CombineProvenance self, ObjectKey a0) -> bool
15443  has_attribute(CombineProvenance self, SparseFloatKey a0) -> bool
15444  has_attribute(CombineProvenance self, SparseIntKey a0) -> bool
15445  has_attribute(CombineProvenance self, SparseStringKey a0) -> bool
15446  has_attribute(CombineProvenance self, SparseParticleIndexKey a0) -> bool
15447  """
15448  return _IMP_core.CombineProvenance_has_attribute(self, *args)
15449 
15450  def get_derivative(self, a0):
15451  r"""get_derivative(CombineProvenance self, FloatKey a0) -> double"""
15452  return _IMP_core.CombineProvenance_get_derivative(self, a0)
15453 
15454  def get_name(self):
15455  r"""get_name(CombineProvenance self) -> std::string"""
15456  return _IMP_core.CombineProvenance_get_name(self)
15457 
15458  def clear_caches(self):
15459  r"""clear_caches(CombineProvenance self)"""
15460  return _IMP_core.CombineProvenance_clear_caches(self)
15461 
15462  def set_name(self, a0):
15463  r"""set_name(CombineProvenance self, std::string a0)"""
15464  return _IMP_core.CombineProvenance_set_name(self, a0)
15465 
15466  def set_check_level(self, a0):
15467  r"""set_check_level(CombineProvenance self, IMP::CheckLevel a0)"""
15468  return _IMP_core.CombineProvenance_set_check_level(self, a0)
15469 
15470  def add_to_derivative(self, a0, a1, a2):
15471  r"""add_to_derivative(CombineProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15472  return _IMP_core.CombineProvenance_add_to_derivative(self, a0, a1, a2)
15473 
15474  def set_is_optimized(self, a0, a1):
15475  r"""set_is_optimized(CombineProvenance self, FloatKey a0, bool a1)"""
15476  return _IMP_core.CombineProvenance_set_is_optimized(self, a0, a1)
15477 
15478  def get_is_optimized(self, a0):
15479  r"""get_is_optimized(CombineProvenance self, FloatKey a0) -> bool"""
15480  return _IMP_core.CombineProvenance_get_is_optimized(self, a0)
15481 
15482  def get_check_level(self):
15483  r"""get_check_level(CombineProvenance self) -> IMP::CheckLevel"""
15484  return _IMP_core.CombineProvenance_get_check_level(self)
15485 
15486  def __eq__(self, *args):
15487  r"""
15488  __eq__(CombineProvenance self, CombineProvenance o) -> bool
15489  __eq__(CombineProvenance self, Particle d) -> bool
15490  """
15491  return _IMP_core.CombineProvenance___eq__(self, *args)
15492 
15493  def __ne__(self, *args):
15494  r"""
15495  __ne__(CombineProvenance self, CombineProvenance o) -> bool
15496  __ne__(CombineProvenance self, Particle d) -> bool
15497  """
15498  return _IMP_core.CombineProvenance___ne__(self, *args)
15499 
15500  def __le__(self, *args):
15501  r"""
15502  __le__(CombineProvenance self, CombineProvenance o) -> bool
15503  __le__(CombineProvenance self, Particle d) -> bool
15504  """
15505  return _IMP_core.CombineProvenance___le__(self, *args)
15506 
15507  def __lt__(self, *args):
15508  r"""
15509  __lt__(CombineProvenance self, CombineProvenance o) -> bool
15510  __lt__(CombineProvenance self, Particle d) -> bool
15511  """
15512  return _IMP_core.CombineProvenance___lt__(self, *args)
15513 
15514  def __ge__(self, *args):
15515  r"""
15516  __ge__(CombineProvenance self, CombineProvenance o) -> bool
15517  __ge__(CombineProvenance self, Particle d) -> bool
15518  """
15519  return _IMP_core.CombineProvenance___ge__(self, *args)
15520 
15521  def __gt__(self, *args):
15522  r"""
15523  __gt__(CombineProvenance self, CombineProvenance o) -> bool
15524  __gt__(CombineProvenance self, Particle d) -> bool
15525  """
15526  return _IMP_core.CombineProvenance___gt__(self, *args)
15527 
15528  def __hash__(self):
15529  r"""__hash__(CombineProvenance self) -> std::size_t"""
15530  return _IMP_core.CombineProvenance___hash__(self)
15531 
15532  def __str__(self):
15533  r"""__str__(CombineProvenance self) -> std::string"""
15534  return _IMP_core.CombineProvenance___str__(self)
15535 
15536  def __repr__(self):
15537  r"""__repr__(CombineProvenance self) -> std::string"""
15538  return _IMP_core.CombineProvenance___repr__(self)
15539 
15540  def _get_as_binary(self):
15541  r"""_get_as_binary(CombineProvenance self) -> PyObject *"""
15542  return _IMP_core.CombineProvenance__get_as_binary(self)
15543 
15544  def _set_from_binary(self, p):
15545  r"""_set_from_binary(CombineProvenance self, PyObject * p)"""
15546  return _IMP_core.CombineProvenance__set_from_binary(self, p)
15547 
15548  def __getstate__(self):
15549  p = self._get_as_binary()
15550  if len(self.__dict__) > 1:
15551  d = self.__dict__.copy()
15552  del d['this']
15553  p = (d, p)
15554  return p
15555 
15556  def __setstate__(self, p):
15557  if not hasattr(self, 'this'):
15558  self.__init__()
15559  if isinstance(p, tuple):
15560  d, p = p
15561  self.__dict__.update(d)
15562  return self._set_from_binary(p)
15563 
15564  __swig_destroy__ = _IMP_core.delete_CombineProvenance
15565 
15566 # Register CombineProvenance in _IMP_core:
15567 _IMP_core.CombineProvenance_swigregister(CombineProvenance)
15568 class FilterProvenance(Provenance):
15569  r"""Proxy of C++ IMP::core::FilterProvenance class."""
15570 
15571  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15572 
15573  def set_method(self, method):
15574  r"""set_method(FilterProvenance self, std::string method)"""
15575  return _IMP_core.FilterProvenance_set_method(self, method)
15576 
15577  def get_method(self):
15578  r"""get_method(FilterProvenance self) -> std::string"""
15579  return _IMP_core.FilterProvenance_get_method(self)
15580 
15581  def set_number_of_frames(self, frames):
15582  r"""set_number_of_frames(FilterProvenance self, int frames)"""
15583  return _IMP_core.FilterProvenance_set_number_of_frames(self, frames)
15584 
15585  def get_number_of_frames(self):
15586  r"""get_number_of_frames(FilterProvenance self) -> int"""
15587  return _IMP_core.FilterProvenance_get_number_of_frames(self)
15588 
15589  def set_threshold(self, threshold):
15590  r"""set_threshold(FilterProvenance self, double threshold)"""
15591  return _IMP_core.FilterProvenance_set_threshold(self, threshold)
15592 
15593  def get_threshold(self):
15594  r"""get_threshold(FilterProvenance self) -> double"""
15595  return _IMP_core.FilterProvenance_get_threshold(self)
15596 
15597  def __init__(self, *args):
15598  r"""
15599  __init__(FilterProvenance self) -> FilterProvenance
15600  __init__(FilterProvenance self, Model m, ParticleIndex id) -> FilterProvenance
15601  __init__(FilterProvenance self, _ParticleAdaptor d) -> FilterProvenance
15602  """
15603  _IMP_core.FilterProvenance_swiginit(self, _IMP_core.new_FilterProvenance(*args))
15604 
15605  @staticmethod
15606  def get_is_setup(*args):
15607  r"""
15608  get_is_setup(Model m, ParticleIndex pi) -> bool
15609  get_is_setup(_ParticleAdaptor p) -> bool
15610  """
15611  return _IMP_core.FilterProvenance_get_is_setup(*args)
15612 
15613  def show(self, *args):
15614  r"""show(FilterProvenance self, _ostream out=std::cout)"""
15615  return _IMP_core.FilterProvenance_show(self, *args)
15616 
15617  @staticmethod
15618  def setup_particle(*args):
15619  r"""
15620  setup_particle(Model m, ParticleIndex pi, std::string method, double threshold, int frames) -> FilterProvenance
15621  setup_particle(_ParticleAdaptor pa, std::string method, double threshold, int frames) -> FilterProvenance
15622  setup_particle(Model m, ParticleIndex pi, FilterProvenance o) -> FilterProvenance
15623  setup_particle(_ParticleAdaptor pa, FilterProvenance o) -> FilterProvenance
15624  """
15625  return _IMP_core.FilterProvenance_setup_particle(*args)
15626 
15627  def add_attribute(self, *args):
15628  r"""
15629  add_attribute(FilterProvenance self, FloatKey k, IMP::Float v, bool opt)
15630  add_attribute(FilterProvenance self, FloatKey a0, IMP::Float a1)
15631  add_attribute(FilterProvenance self, IntKey a0, IMP::Int a1)
15632  add_attribute(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15633  add_attribute(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15634  add_attribute(FilterProvenance self, StringKey a0, IMP::String a1)
15635  add_attribute(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15636  add_attribute(FilterProvenance self, ObjectKey a0, Object a1)
15637  add_attribute(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15638  add_attribute(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15639  add_attribute(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15640  add_attribute(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15641  """
15642  return _IMP_core.FilterProvenance_add_attribute(self, *args)
15643 
15644  def get_value(self, *args):
15645  r"""
15646  get_value(FilterProvenance self, FloatKey a0) -> IMP::Float
15647  get_value(FilterProvenance self, IntKey a0) -> IMP::Int
15648  get_value(FilterProvenance self, FloatsKey a0) -> IMP::Floats
15649  get_value(FilterProvenance self, IntsKey a0) -> IMP::Ints
15650  get_value(FilterProvenance self, StringKey a0) -> IMP::String
15651  get_value(FilterProvenance self, ParticleIndexKey a0) -> Particle
15652  get_value(FilterProvenance self, ObjectKey a0) -> Object
15653  get_value(FilterProvenance self, SparseFloatKey a0) -> IMP::Float
15654  get_value(FilterProvenance self, SparseIntKey a0) -> IMP::Int
15655  get_value(FilterProvenance self, SparseStringKey a0) -> IMP::String
15656  get_value(FilterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15657  """
15658  return _IMP_core.FilterProvenance_get_value(self, *args)
15659 
15660  def set_value(self, *args):
15661  r"""
15662  set_value(FilterProvenance self, FloatKey a0, IMP::Float a1)
15663  set_value(FilterProvenance self, IntKey a0, IMP::Int a1)
15664  set_value(FilterProvenance self, FloatsKey a0, IMP::Floats a1)
15665  set_value(FilterProvenance self, IntsKey a0, IMP::Ints a1)
15666  set_value(FilterProvenance self, StringKey a0, IMP::String a1)
15667  set_value(FilterProvenance self, ParticleIndexKey a0, Particle a1)
15668  set_value(FilterProvenance self, ObjectKey a0, Object a1)
15669  set_value(FilterProvenance self, SparseFloatKey a0, IMP::Float a1)
15670  set_value(FilterProvenance self, SparseIntKey a0, IMP::Int a1)
15671  set_value(FilterProvenance self, SparseStringKey a0, IMP::String a1)
15672  set_value(FilterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15673  """
15674  return _IMP_core.FilterProvenance_set_value(self, *args)
15675 
15676  def remove_attribute(self, *args):
15677  r"""
15678  remove_attribute(FilterProvenance self, FloatKey a0)
15679  remove_attribute(FilterProvenance self, IntKey a0)
15680  remove_attribute(FilterProvenance self, FloatsKey a0)
15681  remove_attribute(FilterProvenance self, IntsKey a0)
15682  remove_attribute(FilterProvenance self, StringKey a0)
15683  remove_attribute(FilterProvenance self, ParticleIndexKey a0)
15684  remove_attribute(FilterProvenance self, ObjectKey a0)
15685  remove_attribute(FilterProvenance self, SparseFloatKey a0)
15686  remove_attribute(FilterProvenance self, SparseIntKey a0)
15687  remove_attribute(FilterProvenance self, SparseStringKey a0)
15688  remove_attribute(FilterProvenance self, SparseParticleIndexKey a0)
15689  """
15690  return _IMP_core.FilterProvenance_remove_attribute(self, *args)
15691 
15692  def has_attribute(self, *args):
15693  r"""
15694  has_attribute(FilterProvenance self, FloatKey a0) -> bool
15695  has_attribute(FilterProvenance self, IntKey a0) -> bool
15696  has_attribute(FilterProvenance self, FloatsKey a0) -> bool
15697  has_attribute(FilterProvenance self, IntsKey a0) -> bool
15698  has_attribute(FilterProvenance self, StringKey a0) -> bool
15699  has_attribute(FilterProvenance self, ParticleIndexKey a0) -> bool
15700  has_attribute(FilterProvenance self, ObjectKey a0) -> bool
15701  has_attribute(FilterProvenance self, SparseFloatKey a0) -> bool
15702  has_attribute(FilterProvenance self, SparseIntKey a0) -> bool
15703  has_attribute(FilterProvenance self, SparseStringKey a0) -> bool
15704  has_attribute(FilterProvenance self, SparseParticleIndexKey a0) -> bool
15705  """
15706  return _IMP_core.FilterProvenance_has_attribute(self, *args)
15707 
15708  def get_derivative(self, a0):
15709  r"""get_derivative(FilterProvenance self, FloatKey a0) -> double"""
15710  return _IMP_core.FilterProvenance_get_derivative(self, a0)
15711 
15712  def get_name(self):
15713  r"""get_name(FilterProvenance self) -> std::string"""
15714  return _IMP_core.FilterProvenance_get_name(self)
15715 
15716  def clear_caches(self):
15717  r"""clear_caches(FilterProvenance self)"""
15718  return _IMP_core.FilterProvenance_clear_caches(self)
15719 
15720  def set_name(self, a0):
15721  r"""set_name(FilterProvenance self, std::string a0)"""
15722  return _IMP_core.FilterProvenance_set_name(self, a0)
15723 
15724  def set_check_level(self, a0):
15725  r"""set_check_level(FilterProvenance self, IMP::CheckLevel a0)"""
15726  return _IMP_core.FilterProvenance_set_check_level(self, a0)
15727 
15728  def add_to_derivative(self, a0, a1, a2):
15729  r"""add_to_derivative(FilterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15730  return _IMP_core.FilterProvenance_add_to_derivative(self, a0, a1, a2)
15731 
15732  def set_is_optimized(self, a0, a1):
15733  r"""set_is_optimized(FilterProvenance self, FloatKey a0, bool a1)"""
15734  return _IMP_core.FilterProvenance_set_is_optimized(self, a0, a1)
15735 
15736  def get_is_optimized(self, a0):
15737  r"""get_is_optimized(FilterProvenance self, FloatKey a0) -> bool"""
15738  return _IMP_core.FilterProvenance_get_is_optimized(self, a0)
15739 
15740  def get_check_level(self):
15741  r"""get_check_level(FilterProvenance self) -> IMP::CheckLevel"""
15742  return _IMP_core.FilterProvenance_get_check_level(self)
15743 
15744  def __eq__(self, *args):
15745  r"""
15746  __eq__(FilterProvenance self, FilterProvenance o) -> bool
15747  __eq__(FilterProvenance self, Particle d) -> bool
15748  """
15749  return _IMP_core.FilterProvenance___eq__(self, *args)
15750 
15751  def __ne__(self, *args):
15752  r"""
15753  __ne__(FilterProvenance self, FilterProvenance o) -> bool
15754  __ne__(FilterProvenance self, Particle d) -> bool
15755  """
15756  return _IMP_core.FilterProvenance___ne__(self, *args)
15757 
15758  def __le__(self, *args):
15759  r"""
15760  __le__(FilterProvenance self, FilterProvenance o) -> bool
15761  __le__(FilterProvenance self, Particle d) -> bool
15762  """
15763  return _IMP_core.FilterProvenance___le__(self, *args)
15764 
15765  def __lt__(self, *args):
15766  r"""
15767  __lt__(FilterProvenance self, FilterProvenance o) -> bool
15768  __lt__(FilterProvenance self, Particle d) -> bool
15769  """
15770  return _IMP_core.FilterProvenance___lt__(self, *args)
15771 
15772  def __ge__(self, *args):
15773  r"""
15774  __ge__(FilterProvenance self, FilterProvenance o) -> bool
15775  __ge__(FilterProvenance self, Particle d) -> bool
15776  """
15777  return _IMP_core.FilterProvenance___ge__(self, *args)
15778 
15779  def __gt__(self, *args):
15780  r"""
15781  __gt__(FilterProvenance self, FilterProvenance o) -> bool
15782  __gt__(FilterProvenance self, Particle d) -> bool
15783  """
15784  return _IMP_core.FilterProvenance___gt__(self, *args)
15785 
15786  def __hash__(self):
15787  r"""__hash__(FilterProvenance self) -> std::size_t"""
15788  return _IMP_core.FilterProvenance___hash__(self)
15789 
15790  def __str__(self):
15791  r"""__str__(FilterProvenance self) -> std::string"""
15792  return _IMP_core.FilterProvenance___str__(self)
15793 
15794  def __repr__(self):
15795  r"""__repr__(FilterProvenance self) -> std::string"""
15796  return _IMP_core.FilterProvenance___repr__(self)
15797 
15798  def _get_as_binary(self):
15799  r"""_get_as_binary(FilterProvenance self) -> PyObject *"""
15800  return _IMP_core.FilterProvenance__get_as_binary(self)
15801 
15802  def _set_from_binary(self, p):
15803  r"""_set_from_binary(FilterProvenance self, PyObject * p)"""
15804  return _IMP_core.FilterProvenance__set_from_binary(self, p)
15805 
15806  def __getstate__(self):
15807  p = self._get_as_binary()
15808  if len(self.__dict__) > 1:
15809  d = self.__dict__.copy()
15810  del d['this']
15811  p = (d, p)
15812  return p
15813 
15814  def __setstate__(self, p):
15815  if not hasattr(self, 'this'):
15816  self.__init__()
15817  if isinstance(p, tuple):
15818  d, p = p
15819  self.__dict__.update(d)
15820  return self._set_from_binary(p)
15821 
15822  __swig_destroy__ = _IMP_core.delete_FilterProvenance
15823 
15824 # Register FilterProvenance in _IMP_core:
15825 _IMP_core.FilterProvenance_swigregister(FilterProvenance)
15826 class ClusterProvenance(Provenance):
15827  r"""Proxy of C++ IMP::core::ClusterProvenance class."""
15828 
15829  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
15830 
15831  def set_number_of_members(self, members):
15832  r"""set_number_of_members(ClusterProvenance self, int members)"""
15833  return _IMP_core.ClusterProvenance_set_number_of_members(self, members)
15834 
15835  def get_number_of_members(self):
15836  r"""get_number_of_members(ClusterProvenance self) -> int"""
15837  return _IMP_core.ClusterProvenance_get_number_of_members(self)
15838 
15839  def set_precision(self, precision):
15840  r"""set_precision(ClusterProvenance self, double precision)"""
15841  return _IMP_core.ClusterProvenance_set_precision(self, precision)
15842 
15843  def get_precision(self):
15844  r"""get_precision(ClusterProvenance self) -> double"""
15845  return _IMP_core.ClusterProvenance_get_precision(self)
15846 
15847  def set_density(self, density):
15848  r"""set_density(ClusterProvenance self, std::string density)"""
15849  return _IMP_core.ClusterProvenance_set_density(self, density)
15850 
15851  def get_density(self):
15852  r"""get_density(ClusterProvenance self) -> std::string"""
15853  return _IMP_core.ClusterProvenance_get_density(self)
15854 
15855  def __init__(self, *args):
15856  r"""
15857  __init__(ClusterProvenance self) -> ClusterProvenance
15858  __init__(ClusterProvenance self, Model m, ParticleIndex id) -> ClusterProvenance
15859  __init__(ClusterProvenance self, _ParticleAdaptor d) -> ClusterProvenance
15860  """
15861  _IMP_core.ClusterProvenance_swiginit(self, _IMP_core.new_ClusterProvenance(*args))
15862 
15863  @staticmethod
15864  def get_is_setup(*args):
15865  r"""
15866  get_is_setup(Model m, ParticleIndex pi) -> bool
15867  get_is_setup(_ParticleAdaptor p) -> bool
15868  """
15869  return _IMP_core.ClusterProvenance_get_is_setup(*args)
15870 
15871  def show(self, *args):
15872  r"""show(ClusterProvenance self, _ostream out=std::cout)"""
15873  return _IMP_core.ClusterProvenance_show(self, *args)
15874 
15875  @staticmethod
15876  def setup_particle(*args):
15877  r"""
15878  setup_particle(Model m, ParticleIndex pi, int members) -> ClusterProvenance
15879  setup_particle(_ParticleAdaptor pa, int members) -> ClusterProvenance
15880  setup_particle(Model m, ParticleIndex pi, int members, double precision) -> ClusterProvenance
15881  setup_particle(_ParticleAdaptor pa, int members, double precision) -> ClusterProvenance
15882  setup_particle(Model m, ParticleIndex pi, int members, double precision, std::string density) -> ClusterProvenance
15883  setup_particle(_ParticleAdaptor pa, int members, double precision, std::string density) -> ClusterProvenance
15884  setup_particle(Model m, ParticleIndex pi, ClusterProvenance o) -> ClusterProvenance
15885  setup_particle(_ParticleAdaptor pa, ClusterProvenance o) -> ClusterProvenance
15886  """
15887  return _IMP_core.ClusterProvenance_setup_particle(*args)
15888 
15889  def add_attribute(self, *args):
15890  r"""
15891  add_attribute(ClusterProvenance self, FloatKey k, IMP::Float v, bool opt)
15892  add_attribute(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15893  add_attribute(ClusterProvenance self, IntKey a0, IMP::Int a1)
15894  add_attribute(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15895  add_attribute(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15896  add_attribute(ClusterProvenance self, StringKey a0, IMP::String a1)
15897  add_attribute(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15898  add_attribute(ClusterProvenance self, ObjectKey a0, Object a1)
15899  add_attribute(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15900  add_attribute(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15901  add_attribute(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15902  add_attribute(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15903  """
15904  return _IMP_core.ClusterProvenance_add_attribute(self, *args)
15905 
15906  def get_value(self, *args):
15907  r"""
15908  get_value(ClusterProvenance self, FloatKey a0) -> IMP::Float
15909  get_value(ClusterProvenance self, IntKey a0) -> IMP::Int
15910  get_value(ClusterProvenance self, FloatsKey a0) -> IMP::Floats
15911  get_value(ClusterProvenance self, IntsKey a0) -> IMP::Ints
15912  get_value(ClusterProvenance self, StringKey a0) -> IMP::String
15913  get_value(ClusterProvenance self, ParticleIndexKey a0) -> Particle
15914  get_value(ClusterProvenance self, ObjectKey a0) -> Object
15915  get_value(ClusterProvenance self, SparseFloatKey a0) -> IMP::Float
15916  get_value(ClusterProvenance self, SparseIntKey a0) -> IMP::Int
15917  get_value(ClusterProvenance self, SparseStringKey a0) -> IMP::String
15918  get_value(ClusterProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
15919  """
15920  return _IMP_core.ClusterProvenance_get_value(self, *args)
15921 
15922  def set_value(self, *args):
15923  r"""
15924  set_value(ClusterProvenance self, FloatKey a0, IMP::Float a1)
15925  set_value(ClusterProvenance self, IntKey a0, IMP::Int a1)
15926  set_value(ClusterProvenance self, FloatsKey a0, IMP::Floats a1)
15927  set_value(ClusterProvenance self, IntsKey a0, IMP::Ints a1)
15928  set_value(ClusterProvenance self, StringKey a0, IMP::String a1)
15929  set_value(ClusterProvenance self, ParticleIndexKey a0, Particle a1)
15930  set_value(ClusterProvenance self, ObjectKey a0, Object a1)
15931  set_value(ClusterProvenance self, SparseFloatKey a0, IMP::Float a1)
15932  set_value(ClusterProvenance self, SparseIntKey a0, IMP::Int a1)
15933  set_value(ClusterProvenance self, SparseStringKey a0, IMP::String a1)
15934  set_value(ClusterProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
15935  """
15936  return _IMP_core.ClusterProvenance_set_value(self, *args)
15937 
15938  def remove_attribute(self, *args):
15939  r"""
15940  remove_attribute(ClusterProvenance self, FloatKey a0)
15941  remove_attribute(ClusterProvenance self, IntKey a0)
15942  remove_attribute(ClusterProvenance self, FloatsKey a0)
15943  remove_attribute(ClusterProvenance self, IntsKey a0)
15944  remove_attribute(ClusterProvenance self, StringKey a0)
15945  remove_attribute(ClusterProvenance self, ParticleIndexKey a0)
15946  remove_attribute(ClusterProvenance self, ObjectKey a0)
15947  remove_attribute(ClusterProvenance self, SparseFloatKey a0)
15948  remove_attribute(ClusterProvenance self, SparseIntKey a0)
15949  remove_attribute(ClusterProvenance self, SparseStringKey a0)
15950  remove_attribute(ClusterProvenance self, SparseParticleIndexKey a0)
15951  """
15952  return _IMP_core.ClusterProvenance_remove_attribute(self, *args)
15953 
15954  def has_attribute(self, *args):
15955  r"""
15956  has_attribute(ClusterProvenance self, FloatKey a0) -> bool
15957  has_attribute(ClusterProvenance self, IntKey a0) -> bool
15958  has_attribute(ClusterProvenance self, FloatsKey a0) -> bool
15959  has_attribute(ClusterProvenance self, IntsKey a0) -> bool
15960  has_attribute(ClusterProvenance self, StringKey a0) -> bool
15961  has_attribute(ClusterProvenance self, ParticleIndexKey a0) -> bool
15962  has_attribute(ClusterProvenance self, ObjectKey a0) -> bool
15963  has_attribute(ClusterProvenance self, SparseFloatKey a0) -> bool
15964  has_attribute(ClusterProvenance self, SparseIntKey a0) -> bool
15965  has_attribute(ClusterProvenance self, SparseStringKey a0) -> bool
15966  has_attribute(ClusterProvenance self, SparseParticleIndexKey a0) -> bool
15967  """
15968  return _IMP_core.ClusterProvenance_has_attribute(self, *args)
15969 
15970  def get_derivative(self, a0):
15971  r"""get_derivative(ClusterProvenance self, FloatKey a0) -> double"""
15972  return _IMP_core.ClusterProvenance_get_derivative(self, a0)
15973 
15974  def get_name(self):
15975  r"""get_name(ClusterProvenance self) -> std::string"""
15976  return _IMP_core.ClusterProvenance_get_name(self)
15977 
15978  def clear_caches(self):
15979  r"""clear_caches(ClusterProvenance self)"""
15980  return _IMP_core.ClusterProvenance_clear_caches(self)
15981 
15982  def set_name(self, a0):
15983  r"""set_name(ClusterProvenance self, std::string a0)"""
15984  return _IMP_core.ClusterProvenance_set_name(self, a0)
15985 
15986  def set_check_level(self, a0):
15987  r"""set_check_level(ClusterProvenance self, IMP::CheckLevel a0)"""
15988  return _IMP_core.ClusterProvenance_set_check_level(self, a0)
15989 
15990  def add_to_derivative(self, a0, a1, a2):
15991  r"""add_to_derivative(ClusterProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
15992  return _IMP_core.ClusterProvenance_add_to_derivative(self, a0, a1, a2)
15993 
15994  def set_is_optimized(self, a0, a1):
15995  r"""set_is_optimized(ClusterProvenance self, FloatKey a0, bool a1)"""
15996  return _IMP_core.ClusterProvenance_set_is_optimized(self, a0, a1)
15997 
15998  def get_is_optimized(self, a0):
15999  r"""get_is_optimized(ClusterProvenance self, FloatKey a0) -> bool"""
16000  return _IMP_core.ClusterProvenance_get_is_optimized(self, a0)
16001 
16002  def get_check_level(self):
16003  r"""get_check_level(ClusterProvenance self) -> IMP::CheckLevel"""
16004  return _IMP_core.ClusterProvenance_get_check_level(self)
16005 
16006  def __eq__(self, *args):
16007  r"""
16008  __eq__(ClusterProvenance self, ClusterProvenance o) -> bool
16009  __eq__(ClusterProvenance self, Particle d) -> bool
16010  """
16011  return _IMP_core.ClusterProvenance___eq__(self, *args)
16012 
16013  def __ne__(self, *args):
16014  r"""
16015  __ne__(ClusterProvenance self, ClusterProvenance o) -> bool
16016  __ne__(ClusterProvenance self, Particle d) -> bool
16017  """
16018  return _IMP_core.ClusterProvenance___ne__(self, *args)
16019 
16020  def __le__(self, *args):
16021  r"""
16022  __le__(ClusterProvenance self, ClusterProvenance o) -> bool
16023  __le__(ClusterProvenance self, Particle d) -> bool
16024  """
16025  return _IMP_core.ClusterProvenance___le__(self, *args)
16026 
16027  def __lt__(self, *args):
16028  r"""
16029  __lt__(ClusterProvenance self, ClusterProvenance o) -> bool
16030  __lt__(ClusterProvenance self, Particle d) -> bool
16031  """
16032  return _IMP_core.ClusterProvenance___lt__(self, *args)
16033 
16034  def __ge__(self, *args):
16035  r"""
16036  __ge__(ClusterProvenance self, ClusterProvenance o) -> bool
16037  __ge__(ClusterProvenance self, Particle d) -> bool
16038  """
16039  return _IMP_core.ClusterProvenance___ge__(self, *args)
16040 
16041  def __gt__(self, *args):
16042  r"""
16043  __gt__(ClusterProvenance self, ClusterProvenance o) -> bool
16044  __gt__(ClusterProvenance self, Particle d) -> bool
16045  """
16046  return _IMP_core.ClusterProvenance___gt__(self, *args)
16047 
16048  def __hash__(self):
16049  r"""__hash__(ClusterProvenance self) -> std::size_t"""
16050  return _IMP_core.ClusterProvenance___hash__(self)
16051 
16052  def __str__(self):
16053  r"""__str__(ClusterProvenance self) -> std::string"""
16054  return _IMP_core.ClusterProvenance___str__(self)
16055 
16056  def __repr__(self):
16057  r"""__repr__(ClusterProvenance self) -> std::string"""
16058  return _IMP_core.ClusterProvenance___repr__(self)
16059 
16060  def _get_as_binary(self):
16061  r"""_get_as_binary(ClusterProvenance self) -> PyObject *"""
16062  return _IMP_core.ClusterProvenance__get_as_binary(self)
16063 
16064  def _set_from_binary(self, p):
16065  r"""_set_from_binary(ClusterProvenance self, PyObject * p)"""
16066  return _IMP_core.ClusterProvenance__set_from_binary(self, p)
16067 
16068  def __getstate__(self):
16069  p = self._get_as_binary()
16070  if len(self.__dict__) > 1:
16071  d = self.__dict__.copy()
16072  del d['this']
16073  p = (d, p)
16074  return p
16075 
16076  def __setstate__(self, p):
16077  if not hasattr(self, 'this'):
16078  self.__init__()
16079  if isinstance(p, tuple):
16080  d, p = p
16081  self.__dict__.update(d)
16082  return self._set_from_binary(p)
16083 
16084  __swig_destroy__ = _IMP_core.delete_ClusterProvenance
16085 
16086 # Register ClusterProvenance in _IMP_core:
16087 _IMP_core.ClusterProvenance_swigregister(ClusterProvenance)
16088 class ScriptProvenance(Provenance):
16089  r"""Proxy of C++ IMP::core::ScriptProvenance class."""
16090 
16091  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16092 
16093  def set_filename(self, filename):
16094  r"""set_filename(ScriptProvenance self, std::string filename)"""
16095  return _IMP_core.ScriptProvenance_set_filename(self, filename)
16096 
16097  def get_filename(self):
16098  r"""get_filename(ScriptProvenance self) -> std::string"""
16099  return _IMP_core.ScriptProvenance_get_filename(self)
16100 
16101  def __init__(self, *args):
16102  r"""
16103  __init__(ScriptProvenance self) -> ScriptProvenance
16104  __init__(ScriptProvenance self, Model m, ParticleIndex id) -> ScriptProvenance
16105  __init__(ScriptProvenance self, _ParticleAdaptor d) -> ScriptProvenance
16106  """
16107  _IMP_core.ScriptProvenance_swiginit(self, _IMP_core.new_ScriptProvenance(*args))
16108 
16109  @staticmethod
16110  def get_is_setup(*args):
16111  r"""
16112  get_is_setup(Model m, ParticleIndex pi) -> bool
16113  get_is_setup(_ParticleAdaptor p) -> bool
16114  """
16115  return _IMP_core.ScriptProvenance_get_is_setup(*args)
16116 
16117  def show(self, *args):
16118  r"""show(ScriptProvenance self, _ostream out=std::cout)"""
16119  return _IMP_core.ScriptProvenance_show(self, *args)
16120 
16121  @staticmethod
16122  def setup_particle(*args):
16123  r"""
16124  setup_particle(Model m, ParticleIndex pi, std::string filename) -> ScriptProvenance
16125  setup_particle(_ParticleAdaptor pa, std::string filename) -> ScriptProvenance
16126  setup_particle(Model m, ParticleIndex pi, ScriptProvenance o) -> ScriptProvenance
16127  setup_particle(_ParticleAdaptor pa, ScriptProvenance o) -> ScriptProvenance
16128  """
16129  return _IMP_core.ScriptProvenance_setup_particle(*args)
16130 
16131  def add_attribute(self, *args):
16132  r"""
16133  add_attribute(ScriptProvenance self, FloatKey k, IMP::Float v, bool opt)
16134  add_attribute(ScriptProvenance self, FloatKey a0, IMP::Float a1)
16135  add_attribute(ScriptProvenance self, IntKey a0, IMP::Int a1)
16136  add_attribute(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16137  add_attribute(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16138  add_attribute(ScriptProvenance self, StringKey a0, IMP::String a1)
16139  add_attribute(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16140  add_attribute(ScriptProvenance self, ObjectKey a0, Object a1)
16141  add_attribute(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16142  add_attribute(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16143  add_attribute(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16144  add_attribute(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16145  """
16146  return _IMP_core.ScriptProvenance_add_attribute(self, *args)
16147 
16148  def get_value(self, *args):
16149  r"""
16150  get_value(ScriptProvenance self, FloatKey a0) -> IMP::Float
16151  get_value(ScriptProvenance self, IntKey a0) -> IMP::Int
16152  get_value(ScriptProvenance self, FloatsKey a0) -> IMP::Floats
16153  get_value(ScriptProvenance self, IntsKey a0) -> IMP::Ints
16154  get_value(ScriptProvenance self, StringKey a0) -> IMP::String
16155  get_value(ScriptProvenance self, ParticleIndexKey a0) -> Particle
16156  get_value(ScriptProvenance self, ObjectKey a0) -> Object
16157  get_value(ScriptProvenance self, SparseFloatKey a0) -> IMP::Float
16158  get_value(ScriptProvenance self, SparseIntKey a0) -> IMP::Int
16159  get_value(ScriptProvenance self, SparseStringKey a0) -> IMP::String
16160  get_value(ScriptProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16161  """
16162  return _IMP_core.ScriptProvenance_get_value(self, *args)
16163 
16164  def set_value(self, *args):
16165  r"""
16166  set_value(ScriptProvenance self, FloatKey a0, IMP::Float a1)
16167  set_value(ScriptProvenance self, IntKey a0, IMP::Int a1)
16168  set_value(ScriptProvenance self, FloatsKey a0, IMP::Floats a1)
16169  set_value(ScriptProvenance self, IntsKey a0, IMP::Ints a1)
16170  set_value(ScriptProvenance self, StringKey a0, IMP::String a1)
16171  set_value(ScriptProvenance self, ParticleIndexKey a0, Particle a1)
16172  set_value(ScriptProvenance self, ObjectKey a0, Object a1)
16173  set_value(ScriptProvenance self, SparseFloatKey a0, IMP::Float a1)
16174  set_value(ScriptProvenance self, SparseIntKey a0, IMP::Int a1)
16175  set_value(ScriptProvenance self, SparseStringKey a0, IMP::String a1)
16176  set_value(ScriptProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16177  """
16178  return _IMP_core.ScriptProvenance_set_value(self, *args)
16179 
16180  def remove_attribute(self, *args):
16181  r"""
16182  remove_attribute(ScriptProvenance self, FloatKey a0)
16183  remove_attribute(ScriptProvenance self, IntKey a0)
16184  remove_attribute(ScriptProvenance self, FloatsKey a0)
16185  remove_attribute(ScriptProvenance self, IntsKey a0)
16186  remove_attribute(ScriptProvenance self, StringKey a0)
16187  remove_attribute(ScriptProvenance self, ParticleIndexKey a0)
16188  remove_attribute(ScriptProvenance self, ObjectKey a0)
16189  remove_attribute(ScriptProvenance self, SparseFloatKey a0)
16190  remove_attribute(ScriptProvenance self, SparseIntKey a0)
16191  remove_attribute(ScriptProvenance self, SparseStringKey a0)
16192  remove_attribute(ScriptProvenance self, SparseParticleIndexKey a0)
16193  """
16194  return _IMP_core.ScriptProvenance_remove_attribute(self, *args)
16195 
16196  def has_attribute(self, *args):
16197  r"""
16198  has_attribute(ScriptProvenance self, FloatKey a0) -> bool
16199  has_attribute(ScriptProvenance self, IntKey a0) -> bool
16200  has_attribute(ScriptProvenance self, FloatsKey a0) -> bool
16201  has_attribute(ScriptProvenance self, IntsKey a0) -> bool
16202  has_attribute(ScriptProvenance self, StringKey a0) -> bool
16203  has_attribute(ScriptProvenance self, ParticleIndexKey a0) -> bool
16204  has_attribute(ScriptProvenance self, ObjectKey a0) -> bool
16205  has_attribute(ScriptProvenance self, SparseFloatKey a0) -> bool
16206  has_attribute(ScriptProvenance self, SparseIntKey a0) -> bool
16207  has_attribute(ScriptProvenance self, SparseStringKey a0) -> bool
16208  has_attribute(ScriptProvenance self, SparseParticleIndexKey a0) -> bool
16209  """
16210  return _IMP_core.ScriptProvenance_has_attribute(self, *args)
16211 
16212  def get_derivative(self, a0):
16213  r"""get_derivative(ScriptProvenance self, FloatKey a0) -> double"""
16214  return _IMP_core.ScriptProvenance_get_derivative(self, a0)
16215 
16216  def get_name(self):
16217  r"""get_name(ScriptProvenance self) -> std::string"""
16218  return _IMP_core.ScriptProvenance_get_name(self)
16219 
16220  def clear_caches(self):
16221  r"""clear_caches(ScriptProvenance self)"""
16222  return _IMP_core.ScriptProvenance_clear_caches(self)
16223 
16224  def set_name(self, a0):
16225  r"""set_name(ScriptProvenance self, std::string a0)"""
16226  return _IMP_core.ScriptProvenance_set_name(self, a0)
16227 
16228  def set_check_level(self, a0):
16229  r"""set_check_level(ScriptProvenance self, IMP::CheckLevel a0)"""
16230  return _IMP_core.ScriptProvenance_set_check_level(self, a0)
16231 
16232  def add_to_derivative(self, a0, a1, a2):
16233  r"""add_to_derivative(ScriptProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16234  return _IMP_core.ScriptProvenance_add_to_derivative(self, a0, a1, a2)
16235 
16236  def set_is_optimized(self, a0, a1):
16237  r"""set_is_optimized(ScriptProvenance self, FloatKey a0, bool a1)"""
16238  return _IMP_core.ScriptProvenance_set_is_optimized(self, a0, a1)
16239 
16240  def get_is_optimized(self, a0):
16241  r"""get_is_optimized(ScriptProvenance self, FloatKey a0) -> bool"""
16242  return _IMP_core.ScriptProvenance_get_is_optimized(self, a0)
16243 
16244  def get_check_level(self):
16245  r"""get_check_level(ScriptProvenance self) -> IMP::CheckLevel"""
16246  return _IMP_core.ScriptProvenance_get_check_level(self)
16247 
16248  def __eq__(self, *args):
16249  r"""
16250  __eq__(ScriptProvenance self, ScriptProvenance o) -> bool
16251  __eq__(ScriptProvenance self, Particle d) -> bool
16252  """
16253  return _IMP_core.ScriptProvenance___eq__(self, *args)
16254 
16255  def __ne__(self, *args):
16256  r"""
16257  __ne__(ScriptProvenance self, ScriptProvenance o) -> bool
16258  __ne__(ScriptProvenance self, Particle d) -> bool
16259  """
16260  return _IMP_core.ScriptProvenance___ne__(self, *args)
16261 
16262  def __le__(self, *args):
16263  r"""
16264  __le__(ScriptProvenance self, ScriptProvenance o) -> bool
16265  __le__(ScriptProvenance self, Particle d) -> bool
16266  """
16267  return _IMP_core.ScriptProvenance___le__(self, *args)
16268 
16269  def __lt__(self, *args):
16270  r"""
16271  __lt__(ScriptProvenance self, ScriptProvenance o) -> bool
16272  __lt__(ScriptProvenance self, Particle d) -> bool
16273  """
16274  return _IMP_core.ScriptProvenance___lt__(self, *args)
16275 
16276  def __ge__(self, *args):
16277  r"""
16278  __ge__(ScriptProvenance self, ScriptProvenance o) -> bool
16279  __ge__(ScriptProvenance self, Particle d) -> bool
16280  """
16281  return _IMP_core.ScriptProvenance___ge__(self, *args)
16282 
16283  def __gt__(self, *args):
16284  r"""
16285  __gt__(ScriptProvenance self, ScriptProvenance o) -> bool
16286  __gt__(ScriptProvenance self, Particle d) -> bool
16287  """
16288  return _IMP_core.ScriptProvenance___gt__(self, *args)
16289 
16290  def __hash__(self):
16291  r"""__hash__(ScriptProvenance self) -> std::size_t"""
16292  return _IMP_core.ScriptProvenance___hash__(self)
16293 
16294  def __str__(self):
16295  r"""__str__(ScriptProvenance self) -> std::string"""
16296  return _IMP_core.ScriptProvenance___str__(self)
16297 
16298  def __repr__(self):
16299  r"""__repr__(ScriptProvenance self) -> std::string"""
16300  return _IMP_core.ScriptProvenance___repr__(self)
16301 
16302  def _get_as_binary(self):
16303  r"""_get_as_binary(ScriptProvenance self) -> PyObject *"""
16304  return _IMP_core.ScriptProvenance__get_as_binary(self)
16305 
16306  def _set_from_binary(self, p):
16307  r"""_set_from_binary(ScriptProvenance self, PyObject * p)"""
16308  return _IMP_core.ScriptProvenance__set_from_binary(self, p)
16309 
16310  def __getstate__(self):
16311  p = self._get_as_binary()
16312  if len(self.__dict__) > 1:
16313  d = self.__dict__.copy()
16314  del d['this']
16315  p = (d, p)
16316  return p
16317 
16318  def __setstate__(self, p):
16319  if not hasattr(self, 'this'):
16320  self.__init__()
16321  if isinstance(p, tuple):
16322  d, p = p
16323  self.__dict__.update(d)
16324  return self._set_from_binary(p)
16325 
16326  __swig_destroy__ = _IMP_core.delete_ScriptProvenance
16327 
16328 # Register ScriptProvenance in _IMP_core:
16329 _IMP_core.ScriptProvenance_swigregister(ScriptProvenance)
16330 class SoftwareProvenance(Provenance):
16331  r"""Proxy of C++ IMP::core::SoftwareProvenance class."""
16332 
16333  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16334 
16335  def set_software_name(self, name):
16336  r"""set_software_name(SoftwareProvenance self, std::string name)"""
16337  return _IMP_core.SoftwareProvenance_set_software_name(self, name)
16338 
16339  def get_software_name(self):
16340  r"""get_software_name(SoftwareProvenance self) -> std::string"""
16341  return _IMP_core.SoftwareProvenance_get_software_name(self)
16342 
16343  def set_version(self, version):
16344  r"""set_version(SoftwareProvenance self, std::string version)"""
16345  return _IMP_core.SoftwareProvenance_set_version(self, version)
16346 
16347  def get_version(self):
16348  r"""get_version(SoftwareProvenance self) -> std::string"""
16349  return _IMP_core.SoftwareProvenance_get_version(self)
16350 
16351  def set_location(self, location):
16352  r"""set_location(SoftwareProvenance self, std::string location)"""
16353  return _IMP_core.SoftwareProvenance_set_location(self, location)
16354 
16355  def get_location(self):
16356  r"""get_location(SoftwareProvenance self) -> std::string"""
16357  return _IMP_core.SoftwareProvenance_get_location(self)
16358 
16359  def __init__(self, *args):
16360  r"""
16361  __init__(SoftwareProvenance self) -> SoftwareProvenance
16362  __init__(SoftwareProvenance self, Model m, ParticleIndex id) -> SoftwareProvenance
16363  __init__(SoftwareProvenance self, _ParticleAdaptor d) -> SoftwareProvenance
16364  """
16365  _IMP_core.SoftwareProvenance_swiginit(self, _IMP_core.new_SoftwareProvenance(*args))
16366 
16367  @staticmethod
16368  def get_is_setup(*args):
16369  r"""
16370  get_is_setup(Model m, ParticleIndex pi) -> bool
16371  get_is_setup(_ParticleAdaptor p) -> bool
16372  """
16373  return _IMP_core.SoftwareProvenance_get_is_setup(*args)
16374 
16375  def show(self, *args):
16376  r"""show(SoftwareProvenance self, _ostream out=std::cout)"""
16377  return _IMP_core.SoftwareProvenance_show(self, *args)
16378 
16379  @staticmethod
16380  def setup_particle(*args):
16381  r"""
16382  setup_particle(Model m, ParticleIndex pi, std::string name, std::string version, std::string location) -> SoftwareProvenance
16383  setup_particle(_ParticleAdaptor pa, std::string name, std::string version, std::string location) -> SoftwareProvenance
16384  setup_particle(Model m, ParticleIndex pi, SoftwareProvenance o) -> SoftwareProvenance
16385  setup_particle(_ParticleAdaptor pa, SoftwareProvenance o) -> SoftwareProvenance
16386  """
16387  return _IMP_core.SoftwareProvenance_setup_particle(*args)
16388 
16389  def add_attribute(self, *args):
16390  r"""
16391  add_attribute(SoftwareProvenance self, FloatKey k, IMP::Float v, bool opt)
16392  add_attribute(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16393  add_attribute(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16394  add_attribute(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16395  add_attribute(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16396  add_attribute(SoftwareProvenance self, StringKey a0, IMP::String a1)
16397  add_attribute(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16398  add_attribute(SoftwareProvenance self, ObjectKey a0, Object a1)
16399  add_attribute(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16400  add_attribute(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16401  add_attribute(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16402  add_attribute(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16403  """
16404  return _IMP_core.SoftwareProvenance_add_attribute(self, *args)
16405 
16406  def get_value(self, *args):
16407  r"""
16408  get_value(SoftwareProvenance self, FloatKey a0) -> IMP::Float
16409  get_value(SoftwareProvenance self, IntKey a0) -> IMP::Int
16410  get_value(SoftwareProvenance self, FloatsKey a0) -> IMP::Floats
16411  get_value(SoftwareProvenance self, IntsKey a0) -> IMP::Ints
16412  get_value(SoftwareProvenance self, StringKey a0) -> IMP::String
16413  get_value(SoftwareProvenance self, ParticleIndexKey a0) -> Particle
16414  get_value(SoftwareProvenance self, ObjectKey a0) -> Object
16415  get_value(SoftwareProvenance self, SparseFloatKey a0) -> IMP::Float
16416  get_value(SoftwareProvenance self, SparseIntKey a0) -> IMP::Int
16417  get_value(SoftwareProvenance self, SparseStringKey a0) -> IMP::String
16418  get_value(SoftwareProvenance self, SparseParticleIndexKey a0) -> ParticleIndex
16419  """
16420  return _IMP_core.SoftwareProvenance_get_value(self, *args)
16421 
16422  def set_value(self, *args):
16423  r"""
16424  set_value(SoftwareProvenance self, FloatKey a0, IMP::Float a1)
16425  set_value(SoftwareProvenance self, IntKey a0, IMP::Int a1)
16426  set_value(SoftwareProvenance self, FloatsKey a0, IMP::Floats a1)
16427  set_value(SoftwareProvenance self, IntsKey a0, IMP::Ints a1)
16428  set_value(SoftwareProvenance self, StringKey a0, IMP::String a1)
16429  set_value(SoftwareProvenance self, ParticleIndexKey a0, Particle a1)
16430  set_value(SoftwareProvenance self, ObjectKey a0, Object a1)
16431  set_value(SoftwareProvenance self, SparseFloatKey a0, IMP::Float a1)
16432  set_value(SoftwareProvenance self, SparseIntKey a0, IMP::Int a1)
16433  set_value(SoftwareProvenance self, SparseStringKey a0, IMP::String a1)
16434  set_value(SoftwareProvenance self, SparseParticleIndexKey a0, ParticleIndex a1)
16435  """
16436  return _IMP_core.SoftwareProvenance_set_value(self, *args)
16437 
16438  def remove_attribute(self, *args):
16439  r"""
16440  remove_attribute(SoftwareProvenance self, FloatKey a0)
16441  remove_attribute(SoftwareProvenance self, IntKey a0)
16442  remove_attribute(SoftwareProvenance self, FloatsKey a0)
16443  remove_attribute(SoftwareProvenance self, IntsKey a0)
16444  remove_attribute(SoftwareProvenance self, StringKey a0)
16445  remove_attribute(SoftwareProvenance self, ParticleIndexKey a0)
16446  remove_attribute(SoftwareProvenance self, ObjectKey a0)
16447  remove_attribute(SoftwareProvenance self, SparseFloatKey a0)
16448  remove_attribute(SoftwareProvenance self, SparseIntKey a0)
16449  remove_attribute(SoftwareProvenance self, SparseStringKey a0)
16450  remove_attribute(SoftwareProvenance self, SparseParticleIndexKey a0)
16451  """
16452  return _IMP_core.SoftwareProvenance_remove_attribute(self, *args)
16453 
16454  def has_attribute(self, *args):
16455  r"""
16456  has_attribute(SoftwareProvenance self, FloatKey a0) -> bool
16457  has_attribute(SoftwareProvenance self, IntKey a0) -> bool
16458  has_attribute(SoftwareProvenance self, FloatsKey a0) -> bool
16459  has_attribute(SoftwareProvenance self, IntsKey a0) -> bool
16460  has_attribute(SoftwareProvenance self, StringKey a0) -> bool
16461  has_attribute(SoftwareProvenance self, ParticleIndexKey a0) -> bool
16462  has_attribute(SoftwareProvenance self, ObjectKey a0) -> bool
16463  has_attribute(SoftwareProvenance self, SparseFloatKey a0) -> bool
16464  has_attribute(SoftwareProvenance self, SparseIntKey a0) -> bool
16465  has_attribute(SoftwareProvenance self, SparseStringKey a0) -> bool
16466  has_attribute(SoftwareProvenance self, SparseParticleIndexKey a0) -> bool
16467  """
16468  return _IMP_core.SoftwareProvenance_has_attribute(self, *args)
16469 
16470  def get_derivative(self, a0):
16471  r"""get_derivative(SoftwareProvenance self, FloatKey a0) -> double"""
16472  return _IMP_core.SoftwareProvenance_get_derivative(self, a0)
16473 
16474  def get_name(self):
16475  r"""get_name(SoftwareProvenance self) -> std::string"""
16476  return _IMP_core.SoftwareProvenance_get_name(self)
16477 
16478  def clear_caches(self):
16479  r"""clear_caches(SoftwareProvenance self)"""
16480  return _IMP_core.SoftwareProvenance_clear_caches(self)
16481 
16482  def set_name(self, a0):
16483  r"""set_name(SoftwareProvenance self, std::string a0)"""
16484  return _IMP_core.SoftwareProvenance_set_name(self, a0)
16485 
16486  def set_check_level(self, a0):
16487  r"""set_check_level(SoftwareProvenance self, IMP::CheckLevel a0)"""
16488  return _IMP_core.SoftwareProvenance_set_check_level(self, a0)
16489 
16490  def add_to_derivative(self, a0, a1, a2):
16491  r"""add_to_derivative(SoftwareProvenance self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16492  return _IMP_core.SoftwareProvenance_add_to_derivative(self, a0, a1, a2)
16493 
16494  def set_is_optimized(self, a0, a1):
16495  r"""set_is_optimized(SoftwareProvenance self, FloatKey a0, bool a1)"""
16496  return _IMP_core.SoftwareProvenance_set_is_optimized(self, a0, a1)
16497 
16498  def get_is_optimized(self, a0):
16499  r"""get_is_optimized(SoftwareProvenance self, FloatKey a0) -> bool"""
16500  return _IMP_core.SoftwareProvenance_get_is_optimized(self, a0)
16501 
16502  def get_check_level(self):
16503  r"""get_check_level(SoftwareProvenance self) -> IMP::CheckLevel"""
16504  return _IMP_core.SoftwareProvenance_get_check_level(self)
16505 
16506  def __eq__(self, *args):
16507  r"""
16508  __eq__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16509  __eq__(SoftwareProvenance self, Particle d) -> bool
16510  """
16511  return _IMP_core.SoftwareProvenance___eq__(self, *args)
16512 
16513  def __ne__(self, *args):
16514  r"""
16515  __ne__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16516  __ne__(SoftwareProvenance self, Particle d) -> bool
16517  """
16518  return _IMP_core.SoftwareProvenance___ne__(self, *args)
16519 
16520  def __le__(self, *args):
16521  r"""
16522  __le__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16523  __le__(SoftwareProvenance self, Particle d) -> bool
16524  """
16525  return _IMP_core.SoftwareProvenance___le__(self, *args)
16526 
16527  def __lt__(self, *args):
16528  r"""
16529  __lt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16530  __lt__(SoftwareProvenance self, Particle d) -> bool
16531  """
16532  return _IMP_core.SoftwareProvenance___lt__(self, *args)
16533 
16534  def __ge__(self, *args):
16535  r"""
16536  __ge__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16537  __ge__(SoftwareProvenance self, Particle d) -> bool
16538  """
16539  return _IMP_core.SoftwareProvenance___ge__(self, *args)
16540 
16541  def __gt__(self, *args):
16542  r"""
16543  __gt__(SoftwareProvenance self, SoftwareProvenance o) -> bool
16544  __gt__(SoftwareProvenance self, Particle d) -> bool
16545  """
16546  return _IMP_core.SoftwareProvenance___gt__(self, *args)
16547 
16548  def __hash__(self):
16549  r"""__hash__(SoftwareProvenance self) -> std::size_t"""
16550  return _IMP_core.SoftwareProvenance___hash__(self)
16551 
16552  def __str__(self):
16553  r"""__str__(SoftwareProvenance self) -> std::string"""
16554  return _IMP_core.SoftwareProvenance___str__(self)
16555 
16556  def __repr__(self):
16557  r"""__repr__(SoftwareProvenance self) -> std::string"""
16558  return _IMP_core.SoftwareProvenance___repr__(self)
16559 
16560  def _get_as_binary(self):
16561  r"""_get_as_binary(SoftwareProvenance self) -> PyObject *"""
16562  return _IMP_core.SoftwareProvenance__get_as_binary(self)
16563 
16564  def _set_from_binary(self, p):
16565  r"""_set_from_binary(SoftwareProvenance self, PyObject * p)"""
16566  return _IMP_core.SoftwareProvenance__set_from_binary(self, p)
16567 
16568  def __getstate__(self):
16569  p = self._get_as_binary()
16570  if len(self.__dict__) > 1:
16571  d = self.__dict__.copy()
16572  del d['this']
16573  p = (d, p)
16574  return p
16575 
16576  def __setstate__(self, p):
16577  if not hasattr(self, 'this'):
16578  self.__init__()
16579  if isinstance(p, tuple):
16580  d, p = p
16581  self.__dict__.update(d)
16582  return self._set_from_binary(p)
16583 
16584  __swig_destroy__ = _IMP_core.delete_SoftwareProvenance
16585 
16586 # Register SoftwareProvenance in _IMP_core:
16587 _IMP_core.SoftwareProvenance_swigregister(SoftwareProvenance)
16588 class Provenanced(IMP.Decorator):
16589  r"""Proxy of C++ IMP::core::Provenanced class."""
16590 
16591  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16592 
16593  def get_provenance(self):
16594  r"""get_provenance(Provenanced self) -> Provenance"""
16595  return _IMP_core.Provenanced_get_provenance(self)
16596 
16597  def set_provenance(self, p):
16598  r"""set_provenance(Provenanced self, Provenance p)"""
16599  return _IMP_core.Provenanced_set_provenance(self, p)
16600 
16601  def __init__(self, *args):
16602  r"""
16603  __init__(Provenanced self) -> Provenanced
16604  __init__(Provenanced self, Model m, ParticleIndex id) -> Provenanced
16605  __init__(Provenanced self, _ParticleAdaptor d) -> Provenanced
16606  """
16607  _IMP_core.Provenanced_swiginit(self, _IMP_core.new_Provenanced(*args))
16608 
16609  @staticmethod
16610  def get_is_setup(*args):
16611  r"""
16612  get_is_setup(Model m, ParticleIndex pi) -> bool
16613  get_is_setup(_ParticleAdaptor p) -> bool
16614  """
16615  return _IMP_core.Provenanced_get_is_setup(*args)
16616 
16617  def show(self, *args):
16618  r"""show(Provenanced self, _ostream out=std::cout)"""
16619  return _IMP_core.Provenanced_show(self, *args)
16620 
16621  @staticmethod
16622  def setup_particle(*args):
16623  r"""
16624  setup_particle(Model m, ParticleIndex pi, Provenance p) -> Provenanced
16625  setup_particle(_ParticleAdaptor pa, Provenance p) -> Provenanced
16626  """
16627  return _IMP_core.Provenanced_setup_particle(*args)
16628 
16629  def add_attribute(self, *args):
16630  r"""
16631  add_attribute(Provenanced self, FloatKey k, IMP::Float v, bool opt)
16632  add_attribute(Provenanced self, FloatKey a0, IMP::Float a1)
16633  add_attribute(Provenanced self, IntKey a0, IMP::Int a1)
16634  add_attribute(Provenanced self, FloatsKey a0, IMP::Floats a1)
16635  add_attribute(Provenanced self, IntsKey a0, IMP::Ints a1)
16636  add_attribute(Provenanced self, StringKey a0, IMP::String a1)
16637  add_attribute(Provenanced self, ParticleIndexKey a0, Particle a1)
16638  add_attribute(Provenanced self, ObjectKey a0, Object a1)
16639  add_attribute(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16640  add_attribute(Provenanced self, SparseIntKey a0, IMP::Int a1)
16641  add_attribute(Provenanced self, SparseStringKey a0, IMP::String a1)
16642  add_attribute(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16643  """
16644  return _IMP_core.Provenanced_add_attribute(self, *args)
16645 
16646  def get_value(self, *args):
16647  r"""
16648  get_value(Provenanced self, FloatKey a0) -> IMP::Float
16649  get_value(Provenanced self, IntKey a0) -> IMP::Int
16650  get_value(Provenanced self, FloatsKey a0) -> IMP::Floats
16651  get_value(Provenanced self, IntsKey a0) -> IMP::Ints
16652  get_value(Provenanced self, StringKey a0) -> IMP::String
16653  get_value(Provenanced self, ParticleIndexKey a0) -> Particle
16654  get_value(Provenanced self, ObjectKey a0) -> Object
16655  get_value(Provenanced self, SparseFloatKey a0) -> IMP::Float
16656  get_value(Provenanced self, SparseIntKey a0) -> IMP::Int
16657  get_value(Provenanced self, SparseStringKey a0) -> IMP::String
16658  get_value(Provenanced self, SparseParticleIndexKey a0) -> ParticleIndex
16659  """
16660  return _IMP_core.Provenanced_get_value(self, *args)
16661 
16662  def set_value(self, *args):
16663  r"""
16664  set_value(Provenanced self, FloatKey a0, IMP::Float a1)
16665  set_value(Provenanced self, IntKey a0, IMP::Int a1)
16666  set_value(Provenanced self, FloatsKey a0, IMP::Floats a1)
16667  set_value(Provenanced self, IntsKey a0, IMP::Ints a1)
16668  set_value(Provenanced self, StringKey a0, IMP::String a1)
16669  set_value(Provenanced self, ParticleIndexKey a0, Particle a1)
16670  set_value(Provenanced self, ObjectKey a0, Object a1)
16671  set_value(Provenanced self, SparseFloatKey a0, IMP::Float a1)
16672  set_value(Provenanced self, SparseIntKey a0, IMP::Int a1)
16673  set_value(Provenanced self, SparseStringKey a0, IMP::String a1)
16674  set_value(Provenanced self, SparseParticleIndexKey a0, ParticleIndex a1)
16675  """
16676  return _IMP_core.Provenanced_set_value(self, *args)
16677 
16678  def remove_attribute(self, *args):
16679  r"""
16680  remove_attribute(Provenanced self, FloatKey a0)
16681  remove_attribute(Provenanced self, IntKey a0)
16682  remove_attribute(Provenanced self, FloatsKey a0)
16683  remove_attribute(Provenanced self, IntsKey a0)
16684  remove_attribute(Provenanced self, StringKey a0)
16685  remove_attribute(Provenanced self, ParticleIndexKey a0)
16686  remove_attribute(Provenanced self, ObjectKey a0)
16687  remove_attribute(Provenanced self, SparseFloatKey a0)
16688  remove_attribute(Provenanced self, SparseIntKey a0)
16689  remove_attribute(Provenanced self, SparseStringKey a0)
16690  remove_attribute(Provenanced self, SparseParticleIndexKey a0)
16691  """
16692  return _IMP_core.Provenanced_remove_attribute(self, *args)
16693 
16694  def has_attribute(self, *args):
16695  r"""
16696  has_attribute(Provenanced self, FloatKey a0) -> bool
16697  has_attribute(Provenanced self, IntKey a0) -> bool
16698  has_attribute(Provenanced self, FloatsKey a0) -> bool
16699  has_attribute(Provenanced self, IntsKey a0) -> bool
16700  has_attribute(Provenanced self, StringKey a0) -> bool
16701  has_attribute(Provenanced self, ParticleIndexKey a0) -> bool
16702  has_attribute(Provenanced self, ObjectKey a0) -> bool
16703  has_attribute(Provenanced self, SparseFloatKey a0) -> bool
16704  has_attribute(Provenanced self, SparseIntKey a0) -> bool
16705  has_attribute(Provenanced self, SparseStringKey a0) -> bool
16706  has_attribute(Provenanced self, SparseParticleIndexKey a0) -> bool
16707  """
16708  return _IMP_core.Provenanced_has_attribute(self, *args)
16709 
16710  def get_derivative(self, a0):
16711  r"""get_derivative(Provenanced self, FloatKey a0) -> double"""
16712  return _IMP_core.Provenanced_get_derivative(self, a0)
16713 
16714  def get_name(self):
16715  r"""get_name(Provenanced self) -> std::string"""
16716  return _IMP_core.Provenanced_get_name(self)
16717 
16718  def clear_caches(self):
16719  r"""clear_caches(Provenanced self)"""
16720  return _IMP_core.Provenanced_clear_caches(self)
16721 
16722  def set_name(self, a0):
16723  r"""set_name(Provenanced self, std::string a0)"""
16724  return _IMP_core.Provenanced_set_name(self, a0)
16725 
16726  def set_check_level(self, a0):
16727  r"""set_check_level(Provenanced self, IMP::CheckLevel a0)"""
16728  return _IMP_core.Provenanced_set_check_level(self, a0)
16729 
16730  def add_to_derivative(self, a0, a1, a2):
16731  r"""add_to_derivative(Provenanced self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
16732  return _IMP_core.Provenanced_add_to_derivative(self, a0, a1, a2)
16733 
16734  def set_is_optimized(self, a0, a1):
16735  r"""set_is_optimized(Provenanced self, FloatKey a0, bool a1)"""
16736  return _IMP_core.Provenanced_set_is_optimized(self, a0, a1)
16737 
16738  def get_is_optimized(self, a0):
16739  r"""get_is_optimized(Provenanced self, FloatKey a0) -> bool"""
16740  return _IMP_core.Provenanced_get_is_optimized(self, a0)
16741 
16742  def get_check_level(self):
16743  r"""get_check_level(Provenanced self) -> IMP::CheckLevel"""
16744  return _IMP_core.Provenanced_get_check_level(self)
16745 
16746  def __eq__(self, *args):
16747  r"""
16748  __eq__(Provenanced self, Provenanced o) -> bool
16749  __eq__(Provenanced self, Particle d) -> bool
16750  """
16751  return _IMP_core.Provenanced___eq__(self, *args)
16752 
16753  def __ne__(self, *args):
16754  r"""
16755  __ne__(Provenanced self, Provenanced o) -> bool
16756  __ne__(Provenanced self, Particle d) -> bool
16757  """
16758  return _IMP_core.Provenanced___ne__(self, *args)
16759 
16760  def __le__(self, *args):
16761  r"""
16762  __le__(Provenanced self, Provenanced o) -> bool
16763  __le__(Provenanced self, Particle d) -> bool
16764  """
16765  return _IMP_core.Provenanced___le__(self, *args)
16766 
16767  def __lt__(self, *args):
16768  r"""
16769  __lt__(Provenanced self, Provenanced o) -> bool
16770  __lt__(Provenanced self, Particle d) -> bool
16771  """
16772  return _IMP_core.Provenanced___lt__(self, *args)
16773 
16774  def __ge__(self, *args):
16775  r"""
16776  __ge__(Provenanced self, Provenanced o) -> bool
16777  __ge__(Provenanced self, Particle d) -> bool
16778  """
16779  return _IMP_core.Provenanced___ge__(self, *args)
16780 
16781  def __gt__(self, *args):
16782  r"""
16783  __gt__(Provenanced self, Provenanced o) -> bool
16784  __gt__(Provenanced self, Particle d) -> bool
16785  """
16786  return _IMP_core.Provenanced___gt__(self, *args)
16787 
16788  def __hash__(self):
16789  r"""__hash__(Provenanced self) -> std::size_t"""
16790  return _IMP_core.Provenanced___hash__(self)
16791 
16792  def __str__(self):
16793  r"""__str__(Provenanced self) -> std::string"""
16794  return _IMP_core.Provenanced___str__(self)
16795 
16796  def __repr__(self):
16797  r"""__repr__(Provenanced self) -> std::string"""
16798  return _IMP_core.Provenanced___repr__(self)
16799 
16800  def _get_as_binary(self):
16801  r"""_get_as_binary(Provenanced self) -> PyObject *"""
16802  return _IMP_core.Provenanced__get_as_binary(self)
16803 
16804  def _set_from_binary(self, p):
16805  r"""_set_from_binary(Provenanced self, PyObject * p)"""
16806  return _IMP_core.Provenanced__set_from_binary(self, p)
16807 
16808  def __getstate__(self):
16809  p = self._get_as_binary()
16810  if len(self.__dict__) > 1:
16811  d = self.__dict__.copy()
16812  del d['this']
16813  p = (d, p)
16814  return p
16815 
16816  def __setstate__(self, p):
16817  if not hasattr(self, 'this'):
16818  self.__init__()
16819  if isinstance(p, tuple):
16820  d, p = p
16821  self.__dict__.update(d)
16822  return self._set_from_binary(p)
16823 
16824  __swig_destroy__ = _IMP_core.delete_Provenanced
16825 
16826 # Register Provenanced in _IMP_core:
16827 _IMP_core.Provenanced_swigregister(Provenanced)
16828 
16829 def add_provenance(m, pi, p):
16830  r"""add_provenance(Model m, ParticleIndex pi, Provenance p)"""
16831  return _IMP_core.add_provenance(m, pi, p)
16832 
16833 def create_clone(p, m=None):
16834  r"""create_clone(Provenance p, Model m=None) -> Provenance"""
16835  return _IMP_core.create_clone(p, m)
16836 
16838  r"""
16839  get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16840  get_transformation_aligning_first_to_second(IMP::ParticlesTemp const & a, IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & b) -> Transformation3D
16841  get_transformation_aligning_first_to_second(IMP::Vector< IMP::VectorD< 3 >,std::allocator< IMP::VectorD< 3 > > > const & a, IMP::ParticlesTemp const & b) -> Transformation3D
16842  """
16843  return _IMP_core.get_transformation_aligning_first_to_second(*args)
16844 
16845 def create_restraint(ps, pp):
16846  r"""create_restraint(PairScore ps, IMP::ParticlePair pp) -> Restraint"""
16847  return _IMP_core.create_restraint(ps, pp)
16849  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::LOWER > class."""
16850 
16851  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16852 
16853  def __init__(self, *args):
16854  r"""
16855  __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicLowerBound
16856  __init__(TruncatedHarmonicLowerBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicLowerBound
16857  """
16858  _IMP_core.TruncatedHarmonicLowerBound_swiginit(self, _IMP_core.new_TruncatedHarmonicLowerBound(*args))
16859 
16860  def get_version_info(self):
16861  r"""get_version_info(TruncatedHarmonicLowerBound self) -> VersionInfo"""
16862  return _IMP_core.TruncatedHarmonicLowerBound_get_version_info(self)
16863  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicLowerBound
16864 
16865  def __str__(self):
16866  r"""__str__(TruncatedHarmonicLowerBound self) -> std::string"""
16867  return _IMP_core.TruncatedHarmonicLowerBound___str__(self)
16868 
16869  def __repr__(self):
16870  r"""__repr__(TruncatedHarmonicLowerBound self) -> std::string"""
16871  return _IMP_core.TruncatedHarmonicLowerBound___repr__(self)
16872 
16873  @staticmethod
16874  def get_from(o):
16875  return _object_cast_to_TruncatedHarmonic(o)
16876 
16877 
16878 # Register TruncatedHarmonicLowerBound in _IMP_core:
16879 _IMP_core.TruncatedHarmonicLowerBound_swigregister(TruncatedHarmonicLowerBound)
16881  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::UPPER > class."""
16882 
16883  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16884 
16885  def __init__(self, *args):
16886  r"""
16887  __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicUpperBound
16888  __init__(TruncatedHarmonicUpperBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicUpperBound
16889  """
16890  _IMP_core.TruncatedHarmonicUpperBound_swiginit(self, _IMP_core.new_TruncatedHarmonicUpperBound(*args))
16891 
16892  def get_version_info(self):
16893  r"""get_version_info(TruncatedHarmonicUpperBound self) -> VersionInfo"""
16894  return _IMP_core.TruncatedHarmonicUpperBound_get_version_info(self)
16895  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicUpperBound
16896 
16897  def __str__(self):
16898  r"""__str__(TruncatedHarmonicUpperBound self) -> std::string"""
16899  return _IMP_core.TruncatedHarmonicUpperBound___str__(self)
16900 
16901  def __repr__(self):
16902  r"""__repr__(TruncatedHarmonicUpperBound self) -> std::string"""
16903  return _IMP_core.TruncatedHarmonicUpperBound___repr__(self)
16904 
16905  @staticmethod
16906  def get_from(o):
16907  return _object_cast_to_TruncatedHarmonic(o)
16908 
16909 
16910 # Register TruncatedHarmonicUpperBound in _IMP_core:
16911 _IMP_core.TruncatedHarmonicUpperBound_swigregister(TruncatedHarmonicUpperBound)
16913  r"""Proxy of C++ IMP::core::TruncatedHarmonic< IMP::core::BOTH > class."""
16914 
16915  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16916 
16917  def __init__(self, *args):
16918  r"""
16919  __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold, IMP::Float limit) -> TruncatedHarmonicBound
16920  __init__(TruncatedHarmonicBound self, IMP::Float center, IMP::Float k, IMP::Float threshold) -> TruncatedHarmonicBound
16921  """
16922  _IMP_core.TruncatedHarmonicBound_swiginit(self, _IMP_core.new_TruncatedHarmonicBound(*args))
16923 
16924  def get_version_info(self):
16925  r"""get_version_info(TruncatedHarmonicBound self) -> VersionInfo"""
16926  return _IMP_core.TruncatedHarmonicBound_get_version_info(self)
16927  __swig_destroy__ = _IMP_core.delete_TruncatedHarmonicBound
16928 
16929  def __str__(self):
16930  r"""__str__(TruncatedHarmonicBound self) -> std::string"""
16931  return _IMP_core.TruncatedHarmonicBound___str__(self)
16932 
16933  def __repr__(self):
16934  r"""__repr__(TruncatedHarmonicBound self) -> std::string"""
16935  return _IMP_core.TruncatedHarmonicBound___repr__(self)
16936 
16937  @staticmethod
16938  def get_from(o):
16939  return _object_cast_to_TruncatedHarmonic(o)
16940 
16941 
16942 # Register TruncatedHarmonicBound in _IMP_core:
16943 _IMP_core.TruncatedHarmonicBound_swigregister(TruncatedHarmonicBound)
16944 class ParticleType(IMP._Value):
16945  r"""Proxy of C++ IMP::Key< 34897493 > class."""
16946 
16947  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
16948 
16949  def __init__(self, *args):
16950  r"""
16951  __init__(ParticleType self) -> ParticleType
16952  __init__(ParticleType self, std::string const & c, bool is_implicit_add_permitted=True) -> ParticleType
16953  __init__(ParticleType self, unsigned int i) -> ParticleType
16954  """
16955  _IMP_core.ParticleType_swiginit(self, _IMP_core.new_ParticleType(*args))
16956 
16957  @staticmethod
16958  def add_key(sc):
16959  r"""add_key(std::string const & sc) -> unsigned int"""
16960  return _IMP_core.ParticleType_add_key(sc)
16961 
16962  @staticmethod
16963  def get_existing_key(sc):
16964  r"""get_existing_key(std::string const & sc) -> ParticleType"""
16965  return _IMP_core.ParticleType_get_existing_key(sc)
16966 
16967  @staticmethod
16968  def get_key_exists(sc):
16969  r"""get_key_exists(std::string const & sc) -> bool"""
16970  return _IMP_core.ParticleType_get_key_exists(sc)
16971 
16972  def get_string(self):
16973  r"""get_string(ParticleType self) -> std::string const"""
16974  return _IMP_core.ParticleType_get_string(self)
16975 
16976  def __eq__(self, o):
16977  r"""__eq__(ParticleType self, ParticleType o) -> bool"""
16978  return _IMP_core.ParticleType___eq__(self, o)
16979 
16980  def __ne__(self, o):
16981  r"""__ne__(ParticleType self, ParticleType o) -> bool"""
16982  return _IMP_core.ParticleType___ne__(self, o)
16983 
16984  def __lt__(self, o):
16985  r"""__lt__(ParticleType self, ParticleType o) -> bool"""
16986  return _IMP_core.ParticleType___lt__(self, o)
16987 
16988  def __gt__(self, o):
16989  r"""__gt__(ParticleType self, ParticleType o) -> bool"""
16990  return _IMP_core.ParticleType___gt__(self, o)
16991 
16992  def __ge__(self, o):
16993  r"""__ge__(ParticleType self, ParticleType o) -> bool"""
16994  return _IMP_core.ParticleType___ge__(self, o)
16995 
16996  def __le__(self, o):
16997  r"""__le__(ParticleType self, ParticleType o) -> bool"""
16998  return _IMP_core.ParticleType___le__(self, o)
16999 
17000  def __hash__(self):
17001  r"""__hash__(ParticleType self) -> std::size_t"""
17002  return _IMP_core.ParticleType___hash__(self)
17003 
17004  def show(self, *args):
17005  r"""show(ParticleType self, _ostream out=std::cout)"""
17006  return _IMP_core.ParticleType_show(self, *args)
17007 
17008  @staticmethod
17009  def add_alias(old_key, new_name):
17010  r"""add_alias(ParticleType old_key, std::string new_name) -> ParticleType"""
17011  return _IMP_core.ParticleType_add_alias(old_key, new_name)
17012 
17013  @staticmethod
17014  def get_number_of_keys():
17015  r"""get_number_of_keys() -> unsigned int"""
17016  return _IMP_core.ParticleType_get_number_of_keys()
17017 
17018  def get_index(self):
17019  r"""get_index(ParticleType self) -> unsigned int"""
17020  return _IMP_core.ParticleType_get_index(self)
17021 
17022  @staticmethod
17023  def show_all(out):
17024  r"""show_all(_ostream out)"""
17025  return _IMP_core.ParticleType_show_all(out)
17026 
17027  @staticmethod
17028  def get_all_strings():
17029  r"""get_all_strings() -> IMP::Vector< std::string >"""
17030  return _IMP_core.ParticleType_get_all_strings()
17031 
17032  @staticmethod
17033  def get_number_unique():
17034  r"""get_number_unique() -> unsigned int"""
17035  return _IMP_core.ParticleType_get_number_unique()
17036 
17037  def __str__(self):
17038  r"""__str__(ParticleType self) -> std::string"""
17039  return _IMP_core.ParticleType___str__(self)
17040 
17041  def __repr__(self):
17042  r"""__repr__(ParticleType self) -> std::string"""
17043  return _IMP_core.ParticleType___repr__(self)
17044  __swig_destroy__ = _IMP_core.delete_ParticleType
17045 
17046 # Register ParticleType in _IMP_core:
17047 _IMP_core.ParticleType_swigregister(ParticleType)
17049  r"""Proxy of C++ IMP::core::GenericAttributeSingletonScore< UnaryFunction > class."""
17050 
17051  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17052  __repr__ = _swig_repr
17053 
17054  def __init__(self, f, k):
17055  r"""__init__(AttributeSingletonScore self, UnaryFunction f, FloatKey k) -> AttributeSingletonScore"""
17056  _IMP_core.AttributeSingletonScore_swiginit(self, _IMP_core.new_AttributeSingletonScore(f, k))
17057 
17058  def do_get_inputs(self, m, pis):
17059  r"""do_get_inputs(AttributeSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17060  return _IMP_core.AttributeSingletonScore_do_get_inputs(self, m, pis)
17061 
17062  def get_unary_function(self):
17063  r"""get_unary_function(AttributeSingletonScore self) -> UnaryFunction"""
17064  return _IMP_core.AttributeSingletonScore_get_unary_function(self)
17065 
17066  def get_key(self):
17067  r"""get_key(AttributeSingletonScore self) -> FloatKey"""
17068  return _IMP_core.AttributeSingletonScore_get_key(self)
17069 
17070  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17071  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"""
17072  return _IMP_core.AttributeSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17073 
17074  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17075  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"""
17076  return _IMP_core.AttributeSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17077 
17078  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17079  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"""
17080  return _IMP_core.AttributeSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17081 
17082  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17083  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"""
17084  return _IMP_core.AttributeSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17085 
17086  def get_version_info(self):
17087  r"""get_version_info(AttributeSingletonScore self) -> VersionInfo"""
17088  return _IMP_core.AttributeSingletonScore_get_version_info(self)
17089  __swig_destroy__ = _IMP_core.delete_AttributeSingletonScore
17090 
17091  @staticmethod
17092  def get_from(o):
17093  return _object_cast_to_AttributeSingletonScore(o)
17094 
17095 
17096  def _get_jax(self, m, indexes, space):
17097  def score_float_key(jm, key, uf):
17098  return uf(jm[key][indexes])
17099 
17100  def score_xyz_key(jm, xyz_index, uf):
17101  return uf(jm['xyz'][indexes, xyz_index])
17102 
17103  uf = self.get_unary_function().get_derived_object()._get_jax()
17104  key = self.get_key()
17105  # First 7 FloatKeys are reserved in IMP and have to be handled
17106  # specially
17107  if key.get_index() >= 7:
17108  need_keys = [key]
17109  f = functools.partial(score_float_key, key=key.get_string(), uf=uf)
17110  elif key == XYZR.get_radius_key():
17111  need_keys = [] # We already have the radius in the JAX model
17112  f = functools.partial(score_float_key, key='r', uf=uf)
17113  elif key in XYZ.get_xyz_keys():
17114  need_keys = [] # We already have coordinates in the JAX model
17115  xyz_index = XYZ.get_xyz_keys().index(key)
17116  f = functools.partial(score_xyz_key, xyz_index=xyz_index, uf=uf)
17117  else:
17118  raise NotImplementedError("No support for key %s" % key)
17119  return self._wrap_jax(m, f, keys=need_keys)
17120 
17121 
17122 # Register AttributeSingletonScore in _IMP_core:
17123 _IMP_core.AttributeSingletonScore_swigregister(AttributeSingletonScore)
17124 
17126  r"""create_generic_attribute_singleton_score(UnaryFunction uf, FloatKey k) -> AttributeSingletonScore"""
17127  return _IMP_core.create_generic_attribute_singleton_score(uf, k)
17129  r"""Proxy of C++ IMP::core::GenericBoundingBox3DSingletonScore< UnaryFunction > class."""
17130 
17131  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17132  __repr__ = _swig_repr
17133 
17134  def __init__(self, f, bb):
17135  r"""__init__(BoundingBox3DSingletonScore self, UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17136  _IMP_core.BoundingBox3DSingletonScore_swiginit(self, _IMP_core.new_BoundingBox3DSingletonScore(f, bb))
17137 
17138  def get_unary_function(self):
17139  r"""get_unary_function(BoundingBox3DSingletonScore self) -> UnaryFunction"""
17140  return _IMP_core.BoundingBox3DSingletonScore_get_unary_function(self)
17141 
17142  def get_bounding_box(self):
17143  r"""get_bounding_box(BoundingBox3DSingletonScore self) -> BoundingBox3D"""
17144  return _IMP_core.BoundingBox3DSingletonScore_get_bounding_box(self)
17145 
17146  def do_get_inputs(self, m, pis):
17147  r"""do_get_inputs(BoundingBox3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17148  return _IMP_core.BoundingBox3DSingletonScore_do_get_inputs(self, m, pis)
17149 
17150  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17151  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"""
17152  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17153 
17154  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17155  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"""
17156  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17157 
17158  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17159  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"""
17160  return _IMP_core.BoundingBox3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17161 
17162  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17163  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"""
17164  return _IMP_core.BoundingBox3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17165 
17166  def get_version_info(self):
17167  r"""get_version_info(BoundingBox3DSingletonScore self) -> VersionInfo"""
17168  return _IMP_core.BoundingBox3DSingletonScore_get_version_info(self)
17169  __swig_destroy__ = _IMP_core.delete_BoundingBox3DSingletonScore
17170 
17171  @staticmethod
17172  def get_from(o):
17173  return _object_cast_to_BoundingBox3DSingletonScore(o)
17174 
17175 
17176  def _get_jax(self, m, indexes, space):
17177  import jax.numpy as jnp
17178  def score(jm, box_min, box_max, uf):
17179  xyzs = jm['xyz'][indexes]
17180  diff = xyzs - jnp.clip(xyzs, box_min, box_max)
17181  outside = jnp.any(diff != 0., axis=-1)
17182  # Avoid taking the distance of a zero vector for points inside
17183  # the box, since the gradient of sqrt(0) is infinite (NaN)
17184  safe_diff = jnp.where(outside[..., jnp.newaxis], diff, 1.)
17185  drs = jnp.where(outside, space.distance(safe_diff), 0.)
17186  return jnp.where(outside, uf(drs), 0.)
17187  uf = self.get_unary_function().get_derived_object()
17188  bb = self.get_bounding_box()
17189  f = functools.partial(score, box_min=jnp.asarray(bb.get_corner(0)),
17190  box_max=jnp.asarray(bb.get_corner(1)),
17191  uf=uf._get_jax())
17192  return self._wrap_jax(m, f)
17193 
17194 
17195 # Register BoundingBox3DSingletonScore in _IMP_core:
17196 _IMP_core.BoundingBox3DSingletonScore_swigregister(BoundingBox3DSingletonScore)
17197 
17198 def create_bounding_box_3d_singleton_score(f, bb):
17199  r"""create_bounding_box_3d_singleton_score(UnaryFunction f, BoundingBox3D bb) -> BoundingBox3DSingletonScore"""
17200  return _IMP_core.create_bounding_box_3d_singleton_score(f, bb)
17202  r"""Proxy of C++ IMP::core::GenericBoundingSphere3DSingletonScore< UnaryFunction > class."""
17203 
17204  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17205  __repr__ = _swig_repr
17206 
17207  def __init__(self, f, sphere):
17208  r"""__init__(BoundingSphere3DSingletonScore self, UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17209  _IMP_core.BoundingSphere3DSingletonScore_swiginit(self, _IMP_core.new_BoundingSphere3DSingletonScore(f, sphere))
17210 
17211  def do_get_inputs(self, m, pis):
17212  r"""do_get_inputs(BoundingSphere3DSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17213  return _IMP_core.BoundingSphere3DSingletonScore_do_get_inputs(self, m, pis)
17214 
17215  def get_unary_function(self):
17216  r"""get_unary_function(BoundingSphere3DSingletonScore self) -> UnaryFunction"""
17217  return _IMP_core.BoundingSphere3DSingletonScore_get_unary_function(self)
17218 
17219  def get_sphere(self):
17220  r"""get_sphere(BoundingSphere3DSingletonScore self) -> Sphere3D"""
17221  return _IMP_core.BoundingSphere3DSingletonScore_get_sphere(self)
17222 
17223  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17224  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"""
17225  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17226 
17227  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17228  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"""
17229  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17230 
17231  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17232  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"""
17233  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17234 
17235  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17236  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"""
17237  return _IMP_core.BoundingSphere3DSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17238 
17239  def get_version_info(self):
17240  r"""get_version_info(BoundingSphere3DSingletonScore self) -> VersionInfo"""
17241  return _IMP_core.BoundingSphere3DSingletonScore_get_version_info(self)
17242  __swig_destroy__ = _IMP_core.delete_BoundingSphere3DSingletonScore
17243 
17244  @staticmethod
17245  def get_from(o):
17246  return _object_cast_to_BoundingSphere3DSingletonScore(o)
17247 
17248 
17249  def _get_jax(self, m, indexes, space):
17250  import numpy as np
17251  import jax.numpy as jnp
17252  def score(jm, use_radii, center, radius, uf):
17253  xyzs = jm['xyz'][indexes]
17254  radii = jnp.where(use_radii, jm['r'][indexes], 0.0)
17255  drs = space.distance(xyzs - center) + radii - radius
17256  return jnp.where(drs < 0.000001, 0.0, uf(drs))
17257  use_radii = np.array([XYZR.get_is_setup(m, IMP.ParticleIndex(ind))
17258  for ind in indexes])
17259  uf = self.get_unary_function().get_derived_object()
17260  sphere = self.get_sphere()
17261  f = functools.partial(score, use_radii=use_radii,
17262  center=jnp.asarray(sphere.get_center()),
17263  radius=sphere.get_radius(), uf=uf._get_jax())
17264  return self._wrap_jax(m, f)
17265 
17266 
17267 # Register BoundingSphere3DSingletonScore in _IMP_core:
17268 _IMP_core.BoundingSphere3DSingletonScore_swigregister(BoundingSphere3DSingletonScore)
17269 
17270 def create_bounding_sphere_3d_singleton_score(f, sphere):
17271  r"""create_bounding_sphere_3d_singleton_score(UnaryFunction f, Sphere3D sphere) -> BoundingSphere3DSingletonScore"""
17272  return _IMP_core.create_bounding_sphere_3d_singleton_score(f, sphere)
17274  r"""Proxy of C++ IMP::core::GenericDistanceToSingletonScore< UnaryFunction > class."""
17275 
17276  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
17277  __repr__ = _swig_repr
17278 
17279  def __init__(self, *args):
17280  r"""
17281  __init__(DistanceToSingletonScore self, UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore
17282  __init__(DistanceToSingletonScore self) -> DistanceToSingletonScore
17283  """
17284  _IMP_core.DistanceToSingletonScore_swiginit(self, _IMP_core.new_DistanceToSingletonScore(*args))
17285 
17286  def do_get_inputs(self, m, pis):
17287  r"""do_get_inputs(DistanceToSingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
17288  return _IMP_core.DistanceToSingletonScore_do_get_inputs(self, m, pis)
17289 
17290  def get_unary_function(self):
17291  r"""get_unary_function(DistanceToSingletonScore self) -> UnaryFunction"""
17292  return _IMP_core.DistanceToSingletonScore_get_unary_function(self)
17293 
17294  def get_point(self):
17295  r"""get_point(DistanceToSingletonScore self) -> Vector3D"""
17296  return _IMP_core.DistanceToSingletonScore_get_point(self)
17297 
17298  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
17299  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"""
17300  return _IMP_core.DistanceToSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
17301 
17302  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
17303  r"""evaluate_indexes_scores(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"""
17304  return _IMP_core.DistanceToSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
17305 
17306  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
17307  r"""evaluate_indexes_delta(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"""
17308  return _IMP_core.DistanceToSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
17309 
17310  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
17311  r"""evaluate_if_good_indexes(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"""
17312  return _IMP_core.DistanceToSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
17313 
17314  def get_version_info(self):
17315  r"""get_version_info(DistanceToSingletonScore self) -> VersionInfo"""
17316  return _IMP_core.DistanceToSingletonScore_get_version_info(self)
17317  __swig_destroy__ = _IMP_core.delete_DistanceToSingletonScore
17318 
17319  @staticmethod
17320  def get_from(o):
17321  return _object_cast_to_DistanceToSingletonScore(o)
17322 
17323 
17324  def _get_as_binary(self):
17325  r"""_get_as_binary(DistanceToSingletonScore self) -> PyObject *"""
17326  return _IMP_core.DistanceToSingletonScore__get_as_binary(self)
17327 
17328  def _set_from_binary(self, p):
17329  r"""_set_from_binary(DistanceToSingletonScore self, PyObject * p)"""
17330  return _IMP_core.DistanceToSingletonScore__set_from_binary(self, p)
17331 
17332  def __getstate__(self):
17333  p = self._get_as_binary()
17334  if len(self.__dict__) > 1:
17335  d = self.__dict__.copy()
17336  del d['this']
17337  p = (d, p)
17338  return p
17339 
17340  def __setstate__(self, p):
17341  if not hasattr(self, 'this'):
17342  self.__init__()
17343  if isinstance(p, tuple):
17344  d, p = p
17345  self.__dict__.update(d)
17346  return self._set_from_binary(p)
17347 
17348 
17349  def _get_jax(self, m, indexes, space):
17350  import jax.numpy as jnp
17351  def score(jm, point, uf):
17352  xyzs = jm['xyz'][indexes]
17353  drs = space.distance(xyzs - point)
17354  return uf(drs)
17355  uf = self.get_unary_function().get_derived_object()
17356  f = functools.partial(score, point=jnp.array(self.get_point()),
17357  uf=uf._get_jax())
17358  return self._wrap_jax(m, f)
17359 
17360 
17361 # Register DistanceToSingletonScore in _IMP_core:
17362 _IMP_core.DistanceToSingletonScore_swigregister(DistanceToSingletonScore)
17363 
17364 def create_distance_to_singleton_score(f, pt):
17365  r"""create_distance_to_singleton_score(UnaryFunction f, Vector3D pt) -> DistanceToSingletonScore"""
17366  return _IMP_core.create_distance_to_singleton_score(f, pt)
17367 
17368 class SphereDistancePairScore(_SphereDistancePairScore.__bases__[0]):
17369  def __init__(self, uf):
17370  if isinstance(uf, HarmonicUpperBound):
17371  p = HarmonicUpperBoundSphereDistancePairScore(
17372  uf.get_mean(), uf.get_k())
17373  elif isinstance(uf, HarmonicLowerBound):
17374  if uf.get_mean() == 0.0:
17375  p = SoftSpherePairScore(uf.get_k())
17376  else:
17377  p = _SphereDistancePairScore(uf)
17378  elif isinstance(uf, Harmonic):
17379  p = HarmonicSphereDistancePairScore(
17380  uf.get_mean(), uf.get_k())
17381  else:
17382  p = _SphereDistancePairScore(uf)
17383  self.__dict__['_proxied'] = p
17384  def __getattr__(self, key):
17385  return getattr(self._proxied, key)
17386  def __setattr__(self, key, val):
17387  return setattr(self._proxied, key, val)
17388 
17389  def __getstate__(self):
17390  return self.__dict__['_proxied']
17391 
17392  def __setstate__(self, p):
17393  self.__dict__['_proxied'] = p
17394 
17395  def _get_jax(self, *args, **kwargs):
17396  return self._proxied._get_jax(*args, **kwargs)
17397 
17398  @staticmethod
17399  def get_from(o):
17400  try:
17401  p = HarmonicUpperBoundSphereDistancePairScore.get_from(o)
17402  except ValueError:
17403  try:
17404  p = HarmonicSphereDistancePairScore.get_from(o)
17405  except ValueError:
17406  try:
17407  p = SoftSpherePairScore.get_from(o)
17408  except ValueError:
17409  p = _SphereDistancePairScore.get_from(o)
17410  obj = object.__new__(SphereDistancePairScore)
17411  obj.__dict__['_proxied'] = p
17412  return obj
17413 
17414 
17415 
17416 def get_all_provenance(p, types=[StructureProvenance, SampleProvenance,
17417  CombineProvenance, FilterProvenance,
17418  ClusterProvenance, ScriptProvenance,
17419  SoftwareProvenance]):
17420  """Yield all provenance decorators of the given types for the particle.
17421  By default, all provenance types are returned. Provenance is returned
17422  in order, most recent first. If the particle has no provenance
17423  information, an empty generator is returned."""
17424  if Provenanced.get_is_setup(p):
17425  prov = Provenanced(p).get_provenance()
17426  while prov:
17427  for c in types:
17428  if c.get_is_setup(prov):
17429  yield c(prov)
17430  prov = prov.get_previous()
17431 
17433  """Tag the given particle with the current Python script.
17434  This is a noop if the particle is already so tagged."""
17435  main = sys.modules['__main__']
17436 # Can't do anything if running from an interactive interpreter
17437  if not hasattr(main, '__file__'):
17438  return
17439  f = IMP.get_absolute_path(main.__file__)
17440  for prov in get_all_provenance(p, types=[ScriptProvenance]):
17441  if prov.get_filename() == f:
17442  return
17443  m = p.get_model()
17444  provp = IMP.Particle(m)
17445  provp.set_name('script')
17446  prov = ScriptProvenance.setup_particle(provp, f)
17447  add_provenance(m, p, prov)
17448 
17449 def add_software_provenance(p, name, version, location):
17450  """Tag the given particle with the software used to create it.
17451  This is a noop if the particle is already so tagged."""
17452  for prov in get_all_provenance(p, types=[SoftwareProvenance]):
17453  if prov.get_software_name() == name and prov.get_version() == version \
17454  and prov.get_location() == location:
17455  return
17456  m = p.get_model()
17457  provp = IMP.Particle(m)
17458  provp.set_name('software')
17459  prov = SoftwareProvenance.setup_particle(provp, name, version, location)
17460  add_provenance(m, p, prov)
17461 
17463  """Tag the given particle as being created by the current version of IMP."""
17464  add_software_provenance(p, name="Integrative Modeling Platform (IMP)",
17465  version=IMP.get_module_version(),
17466  location="https://integrativemodeling.org")
17467 
17468 
17469 def get_module_name():
17470  r"""get_module_name() -> std::string const"""
17471  return _IMP_core.get_module_name()
17472 
17473 def get_module_version():
17474  r"""get_module_version() -> std::string const"""
17475  return _IMP_core.get_module_version()
17476 
17477 def get_example_path(fname):
17478  r"""get_example_path(std::string fname) -> std::string"""
17479  return _IMP_core.get_example_path(fname)
17480 
17481 def get_data_path(fname):
17482  r"""get_data_path(std::string fname) -> std::string"""
17483  return _IMP_core.get_data_path(fname)
17484 
17485 from . import _version_check
17486 _version_check.check_version(get_module_version())
17487 __version__ = get_module_version()
17488 
17489 
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)
CheckLevel get_check_level()
Get the current audit mode.
Definition: exception.h:80
def add_script_provenance
Tag the given particle with the current Python script.
Utility functions for the JAX Python library.
Definition: algebra/jax.py:1
GenericBoundingSphere3DSingletonScore< UnaryFunction > BoundingSphere3DSingletonScore
Abstract predicate function.
Definition: QuadPredicate.h:31
Restraint * create_restraint(Score *s, const typename Score::Argument &t, std::string name=std::string())
Definition: generic.h:36
ParticleIndex get_root_rigid_body(RigidMember m)
Return the index of the outer-most rigid body containing the member.
algebra::ReferenceFrame3D get_initial_reference_frame(Model *m, const ParticleIndexes &pis)
The base class for geometry.
F visit_depth_first(HD d, F &f)
Apply functor F to each particle, traversing the hierarchy depth first.
XYZRs create_xyzr_particles(Model *m, unsigned int num, Float radius, Float box_side=10)
Create a set of particles with random coordinates.
A base class for geometry contained in particles.
double get_angle(Direction a, Direction b)
Get angle between directions.
A base class for geometry from a set of particles.
double get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d)
Compute the dihedral angle (in radians) between the four particles.
Make CGAL functionality available to IMP.
ParticlesTemp create_rigid_bodies(Model *m, unsigned int n, bool no_members=false)
An unbounded space with no periodic boundary conditions.
Definition: jax.py:62
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)
Return all close unordered pairs of particles taken from the SingletonContainer.
GenericHierarchies get_leaves(Hierarchy mhd)
Get all the leaves of the bit of hierarchy.
static FloatKeys get_internal_coordinate_keys()
Definition: rigid_bodies.h:618
Composable functors to implement scores via compile-time composition.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
GenericHierarchies get_all_descendants(Hierarchy mhd)
Get all the particles in the subtree.
A base class for geometry from a set of particles.
def add_imp_provenance
Tag the given particle as being created by the current version of IMP.
display::Geometries create_blame_geometries(const RestraintsTemp &rs, const ParticlesTemp &ps, double max=NO_MAX, std::string name=std::string())
void show_rigid_body_hierarchy(RigidBody rb, TextOutput out=TextOutput(std::cout))
Implement a constraint on the Model.
Definition: Constraint.h:49
void add_restraint(RMF::FileHandle fh, Restraint *hs)
def add_software_provenance
Tag the given particle with the software used to create it.
Abstract class for scoring object(s) of type ParticleIndexQuad.
Definition: QuadScore.h:44
Base class for objects in a Model that depend on other objects.
Definition: ModelObject.h:28
Abstract predicate function.
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Common base class for heavy weight IMP objects.
Definition: Object.h:111
double get_mean(const DoubleMatrix &mat, const IntMatrix &mask)
int get_number_of_frames(const ::npctransport_proto::Assignment &config, double time_step)
Abstract class for scoring object(s) of type ParticleIndex.
ScoreStates maintain invariants in the Model.
Definition: ScoreState.h:56
Base class for all optimizers.
Definition: Optimizer.h:48
GenericAttributeSingletonScore< UnaryFunction > AttributeSingletonScore
SurfaceGeometry * create_geometry(const Surface s, std::string name=std::string("SurfaceGeometry%1%"))
Create a geometry from a Surface.
Definition: Surface.h:191
void add_restraints(RMF::FileHandle fh, const Restraints &hs)
algebra::BoundingBoxD< 3 > get_bounding_box(const XYZRs &ps)
Get the bounding box.
const algebra::Vector3D & get_vector_geometry(XYZ d)
Definition: XYZ.h:135
Support for the JAX Python library.
Definition: jax.py:1
GenericHierarchies get_internal(Hierarchy mhd)
Get all the non-leaves of the bit of hierarchy.
Interface to specialized Particle types (e.g. atoms)
Definition: Decorator.h:119
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
std::string get_absolute_path(std::string file)
Convert a possibly relative path to an absolute path.
algebra::Sphere3D get_enclosing_sphere(const XYZs &v)
Get a sphere enclosing the set of XYZRs.
Base class for optimizers that act on individual attributes.
Basic functionality that is expected to be used by a wide variety of IMP users.
SurfaceGeometry * get_constrained_surface_geometry(const Surface s, std::string name="SurfaceGeometry%1%")
Get surface geometry constrained to the surface.
Definition: Surface.h:236
Abstract predicate function.
Definition: PairPredicate.h:31
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
Represents a scoring function on the model.
void set_vector_geometry(XYZ d, const algebra::Vector3D &v)
Definition: XYZ.h:131
Provenance create_clone(Provenance p, Model *m=nullptr)
Clone provenance (including previous provenance)
Shared optimizer state that is invoked upon commitment of new coordinates.
Hierarchy get_root(Hierarchy h)
Return the root of the hierarchy.
Abstract predicate function.
GenericBoundingBox3DSingletonScore< UnaryFunction > BoundingBox3DSingletonScore
Abstract class to implement hierarchical methods.
Definition: Refiner.h:36
double get_depth(const Surface &s, const XYZR &d)
Get depth of sphere below surface.
Definition: Surface.h:143
void set_enclosing_radius(XYZR b, const XYZs &v)
Set the radius of the first to enclose the list.
Class to handle individual particles of a Model object.
Definition: Particle.h:45
GenericAttributeSingletonScore< UF > * create_generic_attribute_singleton_score(UF *uf, FloatKey k)
void transform(RigidBody a, const algebra::Transformation3D &tr)
Transform a rigid body.
Definition: rigid_bodies.h:748
void assign_blame(const RestraintsTemp &rs, const ParticlesTemp &ps, FloatKey attribute)
std::string get_module_version()
Return the version of this module, as a string.
TruncatedHarmonic< BOTH > TruncatedHarmonicBound
TruncatedHarmonic< UPPER > TruncatedHarmonicUpperBound
static const FloatKeys & get_xyz_keys()
Get a vector containing the keys for x,y,z.
BallMover
Definition: BallMover.py:1
Output IMP model data in various file formats.
std::string get_chain_id(Hierarchy h)
Walk up the hierarchy to determine the chain id.
def get_all_provenance
Yield all provenance decorators of the given types for the particle.
Abstract class for scoring object(s) of type ParticleIndexTriplet.
Definition: TripletScore.h:44
void add_provenance(Model *m, ParticleIndex pi, Provenance p)
Add provenance to part of the model.
Tag part of the system to track how it was created.
Definition: provenance.h:632
double get_distance(const Surface &s, const XYZR &d)
Get distance from sphere to surface.
Definition: Surface.h:153
ParticleIndexes get_indexes(const ParticlesTemp &ps)
Get the indexes from a list of particles.
Abstract single variable functor class for score functions.
Definition: UnaryFunction.h:27
void set_enclosing_sphere(XYZR b, const XYZs &v, double slack=0)
Set the coordinates and radius of the first to enclose the list.
TruncatedHarmonic< LOWER > TruncatedHarmonicLowerBound
void set_check_level(CheckLevel tf)
Control runtime checks in the code.
Definition: exception.h:72
std::string get_module_version()
Return the version of this module, as a string.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56